annotate debian/patches/20_bins-syscall @ 4:c5749e43b1d7

Adding debian files (to original 1.1.29)
author Peter Gervai <grin@grin.hu>
date Wed, 15 Oct 2008 23:35:35 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
1 #! /bin/sh /usr/share/dpatch/dpatch-run
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
2 ## 20_bins-1.1.29-syscall.dpatch by <rousseau@localhost.localdomain>
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
3 ##
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
4 ## All lines beginning with `## DP:' are a description of the patch.
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
5 ## DP: No description.
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
6
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
7 @DPATCH@
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
8 --- bins-1.1.29.orig/bins
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
9 +++ bins-1.1.29/bins
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
10 @@ -3546,13 +3546,14 @@
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
11 $newpath = "$picdir$origName";
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
12 }
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
13 beVerboseN("Linking from $albumdir$newName to $newpath... ", 2);
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
14 - system("ln", "-sf", $newpath, "$albumdir$newName") == 0
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
15 + unlink("$albumdir$newName");
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
16 + symlink($newpath, "$albumdir$newName") == 1
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
17 or die("\nCannot link $albumdir$newName to $newpath: $?");
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
18 # the original file may be r/o but we don't have to modify it
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
19 # but it must be readable by the http deamon
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
20 if ($configHash->{updateOriginalPerms})
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
21 {
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
22 - system("chmod", "a+r", "$picdir$origName") == 0
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
23 + chmod(0644, "$picdir$origName") == 1
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
24 or die("\nCannot set read permission on $albumdir$newName: $?");
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
25 }
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
26 beVerboseN("done.", 2);
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
27 @@ -3563,7 +3564,7 @@
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
28 system("cp", "-p", "$picdir$origName", "$albumdir$newName") == 0
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
29 or die("\nCannot copy $picdir$origName to $albumdir$newName: $?");
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
30 # make it writable in case $origName was r/o
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
31 - system("chmod", "u+w,a+r", "$albumdir$newName") == 0
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
32 + chmod(0644, "$albumdir$newName") == 1
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
33 or die("\nCannot set write permission on $albumdir$newName: $?");
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
34 beVerboseN("done.", 2);
c5749e43b1d7 Adding debian files (to original 1.1.29)
Peter Gervai <grin@grin.hu>
parents:
diff changeset
35 return 1;