git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] templates/Makefile: don't depend on local umask setting

From
Gerrit Pape <pape@smarden.org>
Date
Feb 28, 2008, 18:44 UTC
Message-ID
<20080228184442.13993.qmail@c0e6a439c34263.315fe32.mid.smarden.org>

Don't take the local umask setting into account when installing the templates/* files and directories, running 'make install' with umask set to 077 resulted in template/* installed with permissions 700 and 600.

The problem was discovered by Florian Zumbiehl, reported through
 http://bugs.debian.org/467518
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 templates/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/templates/Makefile b/templates/Makefile
index ebd3a62..bda9d13 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -29,10 +29,10 @@ boilerplates.made : $(bpsrc)
 		case "$$boilerplate" in *~) continue ;; esac && \
 		dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \
 		dir=`expr "$$dst" : '\(.*\)/'` && \
-		mkdir -p blt/$$dir && \
+		$(INSTALL) -d -m 755 blt/$$dir && \
 		case "$$boilerplate" in \
 		*--) ;; \
-		*) cp $$boilerplate blt/$$dst ;; \
+		*) cp -p $$boilerplate blt/$$dst ;; \
 		esac || exit; \
 	done && \
 	date >$@
@@ -48,4 +48,4 @@ clean:
 install: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_dir_SQ)'
 	(cd blt && $(TAR) cf - .) | \
-	(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)
+	(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && umask 022 && $(TAR) xf -)
-- 
1.5.4.3
Next: Junio C Hamano
Message 1 of 2 in “templates/Makefile: don't depend on local umask setting”
  1. templates/Makefile: don't depend on local umask settingGerrit Pape, Feb 28, 2008
  2. Junio C HamanoFeb 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.