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

[PATCH (tig)] Supply explicit permission bits to 'install'.

From
Jeffrey C. Ollie <jeff@ocjtech.us>
Date
May 31, 2007, 19:20 UTC
Message-ID
<11806392321132-git-send-email-jeff@ocjtech.us>

'install' will install files with permissions set to '0755' if the permissions are not specified on the command line. Having the execute bits set on non-executable content is not desireable. Specify mode 0644 for non-executable content as well as specify mode 0755 for executable content (in case the defaults change or are different on different systems). Also tell 'install' to preserve timestamps.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 57196b0..f9adecb 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ doc-html: $(HTMLDOC)
 install: all
 	mkdir -p $(DESTDIR)$(bindir) && \
 	for prog in $(PROGS); do \
-		install $$prog $(DESTDIR)$(bindir); \
+		install -p -m 0755 $$prog $(DESTDIR)$(bindir); \
 	done
 
 install-doc-man: doc-man
@@ -46,8 +46,8 @@ install-doc-man: doc-man
 		 $(DESTDIR)$(mandir)/man5
 	for doc in $(MANDOC); do \
 		case "$$doc" in \
-		*.1) install $$doc $(DESTDIR)$(mandir)/man1 ;; \
-		*.5) install $$doc $(DESTDIR)$(mandir)/man5 ;; \
+		*.1) install -p -m 0644 $$doc $(DESTDIR)$(mandir)/man1 ;; \
+		*.5) install -p -m 0644 $$doc $(DESTDIR)$(mandir)/man5 ;; \
 		esac \
 	done
 
-- 
1.5.2.GIT
Next: Jonas Fonseca
Message 1 of 2 in “Supply explicit permission bits to 'install'.”
  1. Supply explicit permission bits to 'install'.Jeffrey C. Ollie, May 31, 2007
  2. Jonas FonsecaMay 31, 2007

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.