Adjust file permissions also of files that are added during dh_quilt_patch stage
authorMichael Prokop <mika@grml.org>
Fri, 27 Jul 2012 13:02:59 +0000 (15:02 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 27 Jul 2012 13:03:06 +0000 (15:03 +0200)
For example debian/patches/15_networking_grml.patch generates a
new file scripts/live-bottom/23networking_grml which doesn't
have the according permissions set. As a result the script
won't be executed during initramfs bootup, so make sure we
don't run into this again.

debian/rules

index 910523b..e84a4b9 100755 (executable)
@@ -1,9 +1,6 @@
 #!/usr/bin/make -f
 
 build:
-       # this is needed because dpatch doesn't do file modes on diffs.
-       chmod a+rx scripts/live-bottom/*
-       chmod a+rx hooks/*
        # regular build.
        dh build
 
@@ -25,6 +22,12 @@ override_dh_auto_install:
        mkdir -p debian/live-boot-grml-initramfs-tools/usr/share
        mv debian/tmp/usr/share/initramfs-tools debian/live-boot-grml-initramfs-tools/usr/share
 
+       # this is needed because dpatch doesn't do file modes on diffs
+       # and we can't execute this fix during build stage as new files
+       # might be installed during dh_quilt_patch
+       chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/scripts/live-bottom/*
+       chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/hooks/*
+
 override_dh_builddeb:
        dh_builddeb -- -Zgzip -z9