{"thread":{"id":"12368","subject":"[PATCH] templates/Makefile: don't depend on local umask setting","startedAt":"2008-02-28T18:44:42Z","lastAt":"2008-02-28T20:52:25Z","messageCount":2,"participants":["Gerrit Pape","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"70290","messageId":"20080228184442.13993.qmail@c0e6a439c34263.315fe32.mid.smarden.org","threadId":"12368","inReplyTo":null,"subject":"[PATCH] templates/Makefile: don't depend on local umask setting","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2008-02-28T18:44:42Z","receivedAt":"2008-02-28T18:44:42Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"Don't take the local umask setting into account when installing the\ntemplates/* files and directories, running 'make install' with umask set\nto 077 resulted in template/* installed with permissions 700 and 600.\n\nThe problem was discovered by Florian Zumbiehl, reported through\n http://bugs.debian.org/467518\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n templates/Makefile |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/templates/Makefile b/templates/Makefile\nindex ebd3a62..bda9d13 100644\n--- a/templates/Makefile\n+++ b/templates/Makefile\n@@ -29,10 +29,10 @@ boilerplates.made : $(bpsrc)\n \t\tcase \"$$boilerplate\" in *~) continue ;; esac && \\\n \t\tdst=`echo \"$$boilerplate\" | sed -e 's|^this|.|;s|--|/|g'` && \\\n \t\tdir=`expr \"$$dst\" : '\\(.*\\)/'` && \\\n-\t\tmkdir -p blt/$$dir && \\\n+\t\t$(INSTALL) -d -m 755 blt/$$dir && \\\n \t\tcase \"$$boilerplate\" in \\\n \t\t*--) ;; \\\n-\t\t*) cp $$boilerplate blt/$$dst ;; \\\n+\t\t*) cp -p $$boilerplate blt/$$dst ;; \\\n \t\tesac || exit; \\\n \tdone && \\\n \tdate >$@\n@@ -48,4 +48,4 @@ clean:\n install: all\n \t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_dir_SQ)'\n \t(cd blt && $(TAR) cf - .) | \\\n-\t(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)\n+\t(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && umask 022 && $(TAR) xf -)\n-- \n1.5.4.3\n\n"},{"id":"70310","messageId":"7vve48hkhi.fsf@gitster.siamese.dyndns.org","threadId":"12368","inReplyTo":"20080228184442.13993.qmail@c0e6a439c34263.315fe32.mid.smarden.org","subject":"Re: [PATCH] templates/Makefile: don't depend on local umask setting","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-28T20:52:25Z","receivedAt":"2008-02-28T20:52:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Gerrit Pape <pape@smarden.org> writes:\n\n> Don't take the local umask setting into account when installing the\n> templates/* files and directories, running 'make install' with umask set\n> to 077 resulted in template/* installed with permissions 700 and 600.\n\nWell spotted.  As the current Makefile seems to assume the users\nlike 022 umask (existing \"$(INSTALL) -d\" uses \"-m 755\"), your\nchanges are consistent with it.\n\n"}]}