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

Re: Commit templates are not readable after 'make install'

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2008, 20:18 UTC
Message-ID
<7vprnd5b07.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7v8wu16sbc.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> Didn't 9907721 (templates/Makefile: don't depend on local umask setting,
> 2008-02-28) take care of that?
>
>     ... goes and looks ...
>
> Ah, that is only to propagate the wish of the person who _built_ it.
>
> You probably have a tight umask and have sources checked out unreadable to
> others, which is propagated to the installation (check the permission of
> files in your templates/blt directory to verify this conjecture).  And the
> build procedure is honoring your wish to make things unreadable to others.

I should have said "too tight a umask", but anyway, try this patch and see it helps.

-- >8 -- Fix permission bits on sources checked out with an overtight umask

Two patches 9907721 (templates/Makefile: don't depend on local umask setting, 2008-02-28) and 96cda0b (templates/Makefile: install is unnecessary, just use mkdir -p, 2008-08-21) tried to prevent an overtight umask the builder/installer might have from screwing over the installation procedure, but we forgot there was another source of trouble. If the person who checked out the source tree had an overtight umask, it will leak out to the built products, which is propagated to the installation destination.

 templates/Makefile |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git c/templates/Makefile w/templates/Makefile
index 0722a92..a12c6e2 100644
--- c/templates/Makefile
+++ w/templates/Makefile
@@ -31,9 +31,11 @@ boilerplates.made : $(bpsrc)
 		dir=`expr "$$dst" : '\(.*\)/'` && \
 		mkdir -p blt/$$dir && \
 		case "$$boilerplate" in \
-		*--) ;; \
-		*) cp -p $$boilerplate blt/$$dst ;; \
-		esac || exit; \
+		*--) continue;; \
+		esac && \
+		cp $$boilerplate blt/$$dst && \
+		if test -x "blt/$$dst"; then rx=rx; else rx=r; fi && \
+		chmod a+$$rx "blt/$$dst" || exit; \
 	done && \
 	date >$@
 
Previous: Junio C HamanoNext: Johannes Sixt
Message 3 of 6 in “Commit templates are not readable after 'make install'”
  1. Anatol PomozovSep 9, 2008
  2. Junio C HamanoSep 9, 2008
  3. Junio C HamanoSep 9, 2008
  4. Johannes SixtSep 10, 2008
  5. Junio C HamanoSep 10, 2008
  6. Anatol PomozovSep 11, 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.