summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2017-04-17 16:46:31 +0000
committerNiels Thykier <niels@thykier.net>2017-04-17 16:46:36 +0000
commit797fdc1dfbd658defb1a495c0df3890f76349b6e (patch)
treeef374728364b7b94f19aa0207c830506e57fb470
parent3a97a2039b1c9a902a78c41963a292a96abae335 (diff)
downloaddebhelper-797fdc1dfbd658defb1a495c0df3890f76349b6e.tar.gz
dh_fixperms: Add @mode_0755_patterns (for derivatives)
Debian has nothing general patterns that must be chmod'ed to 0755, but DilOS needs "*.so" and "*.so.*" to be 0755 (instead of 0644). As it only takes 2-3 lines of code to mode the patterns out of the logic, then lets have an empty list, so DilOS's changes can be smaller and limited to some data lists. Signed-off-by: Niels Thykier <niels@thykier.net>
-rwxr-xr-xdh_fixperms9
1 files changed, 5 insertions, 4 deletions
diff --git a/dh_fixperms b/dh_fixperms
index 6c782a2e..0e66a407 100755
--- a/dh_fixperms
+++ b/dh_fixperms
@@ -66,9 +66,9 @@ my @mode_0644_patterns = (
# OCaml native-code shared objects
'*.cmxs',
);
-# Turn the patterns in to a find pattern
-my $mode_0644_find_pattern = patterns2find_expr(@mode_0644_patterns);
-
+my @mode_0755_patterns = (
+ # None for Debian
+);
my $find_exclude_options='';
if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
$find_exclude_options="! \\( $dh{EXCLUDE_FIND} \\)";
@@ -116,7 +116,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
find_and_reset_perm(["${tmp}/${vendorarch}", "${tmp}/${vendorlib}"],
'a-X', "-type f -perm -5 -name '*.pm'");
- find_and_reset_perm($tmp, '0644', "-type f ${mode_0644_find_pattern}");
+ find_and_reset_perm($tmp, '0644', '-type f ' . patterns2find_expr(@mode_0644_patterns)) if @mode_0644_patterns;
+ find_and_reset_perm($tmp, '0755', '-type f ' . patterns2find_expr(@mode_0755_patterns)) if @mode_0755_patterns;
# Programs in the bin and init.d dirs should be executable..
find_and_reset_perm([map { "${tmp}/$_"} @executable_files_dirs], 'a+x', '-type f');