Install headers with consistent mode
authorBen Hutchings <ben@decadent.org.uk>
Wed, 9 Sep 2015 00:24:56 +0000 (01:24 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 19 Jul 2018 00:13:54 +0000 (01:13 +0100)
Currently we ensure the installed headers are readable by everyone,
but write permissions will depend on the current umask.  Turn off the
group and other writable bits to ensure consistent results.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name install-headers-with-consistent-mode.patch

scripts/Kbuild.install

index 93c0396ce69fb25f86625528be3d9158c62de99d..cab68b11f853379cf3947909c5c6cd97d397a3d1 100644 (file)
@@ -102,7 +102,7 @@ header:
                ln -sf /usr/include/$(DEB_HOST_MULTIARCH)/asm $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/ || exit; \
        fi
        $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
-       $(Q)chmod -R a+rX $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
+       $(Q)chmod -R a+rX,go-w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
        $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
        $(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)