The following commit has been merged in the master branch:
commit 9bed8ce85e81798cb9759a34c3bf46244606ffc6
Author: Niels Thykier <[email protected]>
Date:   Thu Sep 8 21:01:14 2011 +0200

    Make t/debs umask resistant if they have a root/ dir

diff --git a/t/templates/debs/skel/Makefile.in 
b/t/templates/debs/skel/Makefile.in
index 59a28fa..c9b9737 100644
--- a/t/templates/debs/skel/Makefile.in
+++ b/t/templates/debs/skel/Makefile.in
@@ -1,8 +1,22 @@
 name = {$srcpkg}
 
-all:
+all: fix-perm
        create-deb -o $(name).deb control
 
 clean:
        rm -f *.tar.gz *.deb md5sums debian-binary
        rm -rf root/
+
+# If root/ exists, it is because the test ships with it.  Since the
+# test may have been checked out (or unpacked) with a "whack umask"
+# (anything but 0022), we reset the permissions to a reasonable
+# default.
+#
+# The contents of the deb usually is not what is tested by this suite
+# (t/tests is preferred for this), so the below merely handles the
+# AVERAGE CASE.  Tests that need special permissions (anything but
+# 0644 for files and 0755 for dirs) require manually setting the
+# permissions.
+fix-perm:
+       [ ! -d root/ ] || (find root/ -type d | xargs chmod 0755 && \
+                          find root/ -type f | xargs chmod 0644)

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to