[source] include: add umask prereq check

LEDE Commits lede-commits at lists.infradead.org
Tue Oct 4 02:09:12 PDT 2016


jow pushed a commit to source.git, branch master:
https://git.lede-project.org/5f80315634c66a647aed9673e10582acd8462d69

commit 5f80315634c66a647aed9673e10582acd8462d69
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Oct 4 11:04:50 2016 +0200

    include: add umask prereq check
    
    When building LEDE with umask values other than 022, the resulting packages
    will embed improper permissions, which may lead to random errors or non-
    functional scripts on the target.
    
    In order to make users aware of this problem, add a build-prereq check to
    assert a correct umask setting before starting the build.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 include/prereq-build.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 9c0717d..c3b88db 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -24,6 +24,10 @@ $(eval $(call TestHostCommand,case-sensitive-fs, \
 	rm -f $(TMP_DIR)/test.*; touch $(TMP_DIR)/test.fs; \
 		test ! -f $(TMP_DIR)/test.FS))
 
+$(eval $(call TestHostCommand,proper-umask, \
+	Please build with umask 022 - other values produce broken packages, \
+	umask | grep -xF 0022))
+
 $(eval $(call SetupHostCommand,gcc, \
 	Please install the GNU C Compiler (gcc), \
 	$(CC) --version | grep gcc, \



More information about the lede-commits mailing list