[debhelper-devel] [debhelper] 01/01: dh_fixperms: Correct permissions of reportbug files/scripts

Niels Thykier nthykier at moszumanska.debian.org
Thu Jan 1 20:54:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit dc11ca8fd57d0cef76138bd9596462be0cd3ec5d
Author: Fabian Greffrath <greffrath at leat.rub.de>
Date:   Thu Jan 1 21:53:15 2015 +0100

    dh_fixperms: Correct permissions of reportbug files/scripts
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog |  3 +++
 dh_fixperms      | 11 +++++++++++
 2 files changed, 14 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fb6aa10..70d94f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,9 @@ debhelper (9.20150101.1) UNRELEASED; urgency=medium
   * dh_gconf: Apply patch from Josselin Mouette to avoid
     dependency on gconf2 for installs of non-schema files.
     (Closes: #592958)
+  * dh_fixperms: Correct permissions of reportbug files and scripts.
+    Thanks to Fabian Greffrath for the report and a basic patch.
+    (Closes: #459548)
 
   [ Bernhard R. Link ]
   * Dh_lib: apply patch from Guillem Jover to support case-insensitive
diff --git a/dh_fixperms b/dh_fixperms
index b5f6adb..91fa2a5 100755
--- a/dh_fixperms
+++ b/dh_fixperms
@@ -113,6 +113,17 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		"-name '*.ali' $find_options -print0",
 		"2>/dev/null | xargs -0r chmod uga-w");
 
+	if ( -d "$tmp/usr/share/bug/$package") {
+		complex_doit("find $tmp/usr/share/bug/$package -type f",
+			"! -name 'script' $find_options -print0",
+			"2>/dev/null | xargs -0r chmod 644");
+		if ( -f "$tmp/usr/share/bug/$package/script" ) {
+			doit('chmod', '0755', "$tmp/usr/share/bug/$package/script");
+		}
+	} elsif ( -f "$tmp/usr/share/bug/$package" ) {
+		doit('chmod', '0755', "$tmp/usr/share/bug/$package");
+	}
+
 	# Lintian overrides should never be executable, too.
 	if (-d "$tmp/usr/share/lintian") {
 		complex_doit("find $tmp/usr/share/lintian/overrides",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list