From 797fdc1dfbd658defb1a495c0df3890f76349b6e Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Mon, 17 Apr 2017 16:46:31 +0000 Subject: 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 --- dh_fixperms | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'dh_fixperms') 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'); -- cgit v1.2.3