* permissions of main folder for git-manpages.tar.gz @ 2020-09-08 15:56 Daniel Villeneuve 2020-09-09 0:09 ` Junio C Hamano 0 siblings, 1 reply; 5+ messages in thread From: Daniel Villeneuve @ 2020-09-08 15:56 UTC (permalink / raw) To: git Hi, I am using https://mirrors.edge.kernel.org/pub/software/scm/git/git-manpages-2.28.0.tar.gz to get the manpages part of git. There has been a change in the permissions of the top-level folder, from 2.22 (perms 2750) to 2.25 (perms 0700) to 2.28 (perms 2700). However, the permissions of other files/directories allow group/others read/execute, as before. This change broke my latest installations by preventing group members to see manpages (I did a chmod to fix that). Just sharing this observation, in case the change was not intentional. -- Daniel Villeneuve ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: permissions of main folder for git-manpages.tar.gz 2020-09-08 15:56 permissions of main folder for git-manpages.tar.gz Daniel Villeneuve @ 2020-09-09 0:09 ` Junio C Hamano 2020-09-09 3:28 ` Carlo Marcelo Arenas Belón 0 siblings, 1 reply; 5+ messages in thread From: Junio C Hamano @ 2020-09-09 0:09 UTC (permalink / raw) To: Daniel Villeneuve; +Cc: git Daniel Villeneuve <dvilleneuve.4142@gmail.com> writes: > I am using > https://mirrors.edge.kernel.org/pub/software/scm/git/git-manpages-2.28.0.tar.gz > to get the manpages part of git. > > There has been a change in the permissions of the top-level > folder, from 2.22 (perms 2750) to 2.25 (perms 0700) to 2.28 (perms > 2700). However, the permissions of other files/directories allow > group/others read/execute, as before. > > This change broke my latest installations by preventing group > members to see manpages (I did a chmod to fix that). > > Just sharing this observation, in case the change was not > intentional. Thanks for letting me know. The build procedure of these documentation tarballs pretty much just snapshots how I personally have these files locally and not something that was carefully designed to produce files for public consumption. I'm contemplating to apply something like the following patch to the build procedure so that I can externally control the mode bits recorded in the tarball by setting TAR_C_EXTRA_OPTS to options that overrides mode bits and stuff (it takes GNU tar unfortunately, but I suspect I am the only person that runs dist-doc target anyway) Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 86e5411f39..2a8510f6e6 100644 --- a/Makefile +++ b/Makefile @@ -3041,6 +3041,7 @@ artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \ $(TAR) czf "$(ARTIFACTS_DIRECTORY)/artifacts.tar.gz" $^ templates/blt/ .PHONY: artifacts-tar +TAR_C_EXTRA_OPTS = htmldocs = git-htmldocs-$(GIT_VERSION) manpages = git-manpages-$(GIT_VERSION) .PHONY: dist-doc distclean @@ -3048,7 +3049,7 @@ dist-doc: $(RM) -r .doc-tmp-dir mkdir .doc-tmp-dir $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc - cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . + cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_C_EXTRA_OPTS) . gzip -n -9 -f $(htmldocs).tar : $(RM) -r .doc-tmp-dir @@ -3058,7 +3059,7 @@ dist-doc: man5dir=../.doc-tmp-dir/man5 \ man7dir=../.doc-tmp-dir/man7 \ install - cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . + cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_C_EXTRA_OPTS) . gzip -n -9 -f $(manpages).tar $(RM) -r .doc-tmp-dir ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: permissions of main folder for git-manpages.tar.gz 2020-09-09 0:09 ` Junio C Hamano @ 2020-09-09 3:28 ` Carlo Marcelo Arenas Belón 2020-09-09 18:10 ` Junio C Hamano 2020-09-09 19:07 ` Junio C Hamano 0 siblings, 2 replies; 5+ messages in thread From: Carlo Marcelo Arenas Belón @ 2020-09-09 3:28 UTC (permalink / raw) To: Junio C Hamano; +Cc: Daniel Villeneuve, git On Tue, Sep 08, 2020 at 05:09:35PM -0700, Junio C Hamano wrote: > > I'm contemplating to apply something like the following patch to the > build procedure so that I can externally control the mode bits > recorded in the tarball by setting TAR_C_EXTRA_OPTS to options that > overrides mode bits and stuff (it takes GNU tar unfortunately, but > I suspect I am the only person that runs dist-doc target anyway) also useful (albeit not for the same reason) with BSD tar for adding things like "--check-links", either way don't forget the signed-off while adding: Tested-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Carlo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: permissions of main folder for git-manpages.tar.gz 2020-09-09 3:28 ` Carlo Marcelo Arenas Belón @ 2020-09-09 18:10 ` Junio C Hamano 2020-09-09 19:07 ` Junio C Hamano 1 sibling, 0 replies; 5+ messages in thread From: Junio C Hamano @ 2020-09-09 18:10 UTC (permalink / raw) To: Carlo Marcelo Arenas Belón; +Cc: Daniel Villeneuve, git Carlo Marcelo Arenas Belón <carenas@gmail.com> writes: > On Tue, Sep 08, 2020 at 05:09:35PM -0700, Junio C Hamano wrote: >> >> I'm contemplating to apply something like the following patch to the >> build procedure so that I can externally control the mode bits >> recorded in the tarball by setting TAR_C_EXTRA_OPTS to options that >> overrides mode bits and stuff (it takes GNU tar unfortunately, but >> I suspect I am the only person that runs dist-doc target anyway) > > also useful (albeit not for the same reason) with BSD tar for adding > things like "--check-links", either way don't forget the signed-off > while adding: > > Tested-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Thanks. I haven't even written a proposed log message yet, but I'll remember. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: permissions of main folder for git-manpages.tar.gz 2020-09-09 3:28 ` Carlo Marcelo Arenas Belón 2020-09-09 18:10 ` Junio C Hamano @ 2020-09-09 19:07 ` Junio C Hamano 1 sibling, 0 replies; 5+ messages in thread From: Junio C Hamano @ 2020-09-09 19:07 UTC (permalink / raw) To: Carlo Marcelo Arenas Belón; +Cc: Daniel Villeneuve, git Carlo Marcelo Arenas Belón <carenas@gmail.com> writes: > On Tue, Sep 08, 2020 at 05:09:35PM -0700, Junio C Hamano wrote: >> >> I'm contemplating to apply something like the following patch to the >> build procedure so that I can externally control the mode bits >> recorded in the tarball by setting TAR_C_EXTRA_OPTS to options that >> overrides mode bits and stuff (it takes GNU tar unfortunately, but >> I suspect I am the only person that runs dist-doc target anyway) > > also useful (albeit not for the same reason) with BSD tar for adding > things like "--check-links", either way don't forget the signed-off > while adding: > > Tested-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> I just realized that we should do the same for the soure release tarball, not just preformatted documentation tarballs that are not really sources. The use of the 'c' mode with 'tar' is an implementation detail of doing a 'distribution'; TAR_C_EXTRA_OPTS in the draft version was renamed to TAR_DIST_EXTRA_OPTS to make it more clear that this is for use with $(TAR) for dist targets. Thanks. -- >8 -- From: Junio C Hamano <gitster@pobox.com> Date: Wed, 9 Sep 2020 11:53:04 -0700 Subject: [PATCH] Makefile: allow extra tweaking of distribution tarball The maintainer's dist rules are used to produce distribution tarballs. They use "$(TAR) cf" and "$(TAR) rf" to produce archives out of a freshly created local installation area, which means that the built product can be affected by maintainer's umask and other local environment. Implementations of "tar" have ways (implementation specific, unfortunately) to force permission bits and other stuff to allow the user to hide these effects coming from the local environment. Teach our Makefile to allow the maintainer to tweak the invocation of the $(TAR) commands by setting TAR_DIST_EXTRA_OPTS. Signed-off-by: Junio C Hamano <gitster@pobox.com> --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 86e5411f39..62e8bfcf6e 100644 --- a/Makefile +++ b/Makefile @@ -2992,6 +2992,9 @@ quick-install-html: ### Maintainer's dist rules +# Allow tweaking to hide local environment effects, like perm bits. +# With GNU tar, "--mode=u+rwX,og+rX,og-w" would be a good idea, for example. +TAR_DIST_EXTRA_OPTS = GIT_TARNAME = git-$(GIT_VERSION) dist: git-archive$(X) configure ./git-archive --format=tar \ @@ -3000,7 +3003,7 @@ dist: git-archive$(X) configure @cp configure $(GIT_TARNAME) @echo $(GIT_VERSION) > $(GIT_TARNAME)/version @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version - $(TAR) rf $(GIT_TARNAME).tar \ + $(TAR) rf $(GIT_TARNAME).tar $(TAR_DIST_EXTRA_OPTS) \ $(GIT_TARNAME)/configure \ $(GIT_TARNAME)/version \ $(GIT_TARNAME)/git-gui/version @@ -3014,7 +3017,7 @@ ifdef DC_SHA1_SUBMODULE $(GIT_TARNAME)/sha1collisiondetection/lib/ @cp sha1collisiondetection/lib/ubc_check.[ch] \ $(GIT_TARNAME)/sha1collisiondetection/lib/ - $(TAR) rf $(GIT_TARNAME).tar \ + $(TAR) rf $(GIT_TARNAME).tar $(TAR_DIST_EXTRA_OPTS) \ $(GIT_TARNAME)/sha1collisiondetection/LICENSE.txt \ $(GIT_TARNAME)/sha1collisiondetection/lib/sha1.[ch] \ $(GIT_TARNAME)/sha1collisiondetection/lib/ubc_check.[ch] @@ -3048,7 +3051,7 @@ dist-doc: $(RM) -r .doc-tmp-dir mkdir .doc-tmp-dir $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc - cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . + cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_DIST_EXTRA_OPTS) . gzip -n -9 -f $(htmldocs).tar : $(RM) -r .doc-tmp-dir @@ -3058,7 +3061,7 @@ dist-doc: man5dir=../.doc-tmp-dir/man5 \ man7dir=../.doc-tmp-dir/man7 \ install - cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . + cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) . gzip -n -9 -f $(manpages).tar $(RM) -r .doc-tmp-dir -- 2.28.0-558-g7a0184fd7b ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-09 19:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-08 15:56 permissions of main folder for git-manpages.tar.gz Daniel Villeneuve 2020-09-09 0:09 ` Junio C Hamano 2020-09-09 3:28 ` Carlo Marcelo Arenas Belón 2020-09-09 18:10 ` Junio C Hamano 2020-09-09 19:07 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).