From 93e70311730b3c93c7f1357b7644355a5f04bba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 10 Oct 2020 18:45:18 +0200 Subject: [PATCH 1/2] Makefile: use git init/add/commit/archive for dist-doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reduce the dependency on external tools by generating the distribution archives for HTML documentation and manpages using git commands instead of tar. This gives the archive entries the same meta data as those in the dist archive for binaries. Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 95571ee3fc..b7f3708292 100644 --- a/Makefile +++ b/Makefile @@ -3105,11 +3105,15 @@ artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \ htmldocs = git-htmldocs-$(GIT_VERSION) manpages = git-manpages-$(GIT_VERSION) .PHONY: dist-doc distclean -dist-doc: +dist-doc: git$X $(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 $(TAR_DIST_EXTRA_OPTS) . + ./git -C .doc-tmp-dir init + ./git -C .doc-tmp-dir add . + ./git -C .doc-tmp-dir commit -m htmldocs + ./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \ + > $(htmldocs).tar gzip -n -9 -f $(htmldocs).tar : $(RM) -r .doc-tmp-dir @@ -3119,7 +3123,11 @@ dist-doc: man5dir=../.doc-tmp-dir/man5 \ man7dir=../.doc-tmp-dir/man7 \ install - cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) . + ./git -C .doc-tmp-dir init + ./git -C .doc-tmp-dir add . + ./git -C .doc-tmp-dir commit -m manpages + ./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \ + > $(manpages).tar gzip -n -9 -f $(manpages).tar $(RM) -r .doc-tmp-dir From 4813277ed871b9cfc0844482f42fec60e259577a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sun, 11 Oct 2020 08:14:35 +0200 Subject: [PATCH 2/2] Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index b7f3708292..db8f07898d 100644 --- a/Makefile +++ b/Makefile @@ -3053,9 +3053,6 @@ 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) GIT_ARCHIVE_EXTRA_FILES = \ --prefix=$(GIT_TARNAME)/ \