{"thread":{"id":"54387","subject":"[PATCH] Makefile: use git init/add/commit/archive for dist-doc","startedAt":"2020-10-10T23:10:39Z","lastAt":"2020-10-12T19:20:53Z","messageCount":3,"participants":["René Scharfe","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"407284","messageId":"40da2404-8504-e134-7176-f3429c081f12@web.de","threadId":"54387","inReplyTo":null,"subject":"[PATCH] Makefile: use git init/add/commit/archive for dist-doc","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2020-10-10T16:45:18Z","receivedAt":"2020-10-10T23:10:39Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Reduce the dependency on external tools by generating the distribution\narchives for HTML documentation and manpages using git commands instead\nof tar. This gives the archive entries the same meta data as those in\nthe dist archive for binaries.\n\nSigned-off-by: René Scharfe <l.s.r@web.de>\n---\n Makefile | 14 +++++++++++---\n 1 file changed, 11 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 95571ee3fc..b7f3708292 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3105,11 +3105,15 @@ artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \\\n htmldocs = git-htmldocs-$(GIT_VERSION)\n manpages = git-manpages-$(GIT_VERSION)\n .PHONY: dist-doc distclean\n-dist-doc:\n+dist-doc: git$X\n \t$(RM) -r .doc-tmp-dir\n \tmkdir .doc-tmp-dir\n \t$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc\n-\tcd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_DIST_EXTRA_OPTS) .\n+\t./git -C .doc-tmp-dir init\n+\t./git -C .doc-tmp-dir add .\n+\t./git -C .doc-tmp-dir commit -m htmldocs\n+\t./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \\\n+\t\t> $(htmldocs).tar\n \tgzip -n -9 -f $(htmldocs).tar\n \t:\n \t$(RM) -r .doc-tmp-dir\n@@ -3119,7 +3123,11 @@ dist-doc:\n \t\tman5dir=../.doc-tmp-dir/man5 \\\n \t\tman7dir=../.doc-tmp-dir/man7 \\\n \t\tinstall\n-\tcd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) .\n+\t./git -C .doc-tmp-dir init\n+\t./git -C .doc-tmp-dir add .\n+\t./git -C .doc-tmp-dir commit -m manpages\n+\t./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \\\n+\t\t> $(manpages).tar\n \tgzip -n -9 -f $(manpages).tar\n \t$(RM) -r .doc-tmp-dir\n\n--\n2.28.0\n"},{"id":"407289","messageId":"a3cf2838-b67d-841e-f5be-887825b5e1e7@web.de","threadId":"54387","inReplyTo":"40da2404-8504-e134-7176-f3429c081f12@web.de","subject":"[PATCH 2/1] Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2020-10-11T06:14:35Z","receivedAt":"2020-10-11T06:14:42Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Signed-off-by: René Scharfe <l.s.r@web.de>\n---\n Makefile | 3 ---\n 1 file changed, 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex b7f3708292..db8f07898d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3053,9 +3053,6 @@ quick-install-html:\n\n ### Maintainer's dist rules\n\n-# Allow tweaking to hide local environment effects, like perm bits.\n-# With GNU tar, \"--mode=u+rwX,og+rX,og-w\" would be a good idea, for example.\n-TAR_DIST_EXTRA_OPTS =\n GIT_TARNAME = git-$(GIT_VERSION)\n GIT_ARCHIVE_EXTRA_FILES = \\\n \t--prefix=$(GIT_TARNAME)/ \\\n--\n2.28.0\n"},{"id":"407368","messageId":"xmqqft6jp7xs.fsf@gitster.c.googlers.com","threadId":"54387","inReplyTo":"40da2404-8504-e134-7176-f3429c081f12@web.de","subject":"Re: [PATCH] Makefile: use git init/add/commit/archive for dist-doc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-12T19:20:47Z","receivedAt":"2020-10-12T19:20:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"René Scharfe <l.s.r@web.de> writes:\n\n> Reduce the dependency on external tools by generating the distribution\n> archives for HTML documentation and manpages using git commands instead\n> of tar. This gives the archive entries the same meta data as those in\n> the dist archive for binaries.\n\nHmph.  I vaguely recall somebody on a more exotic platform wanted\nour \"tar\" invocations to be tweakable as their \"tar\" lacked options\nor something like that, and hopefully pushing our build procedure in\nthis direction would help them.\n\nWill queue.  Thanks.\n\n> Signed-off-by: René Scharfe <l.s.r@web.de>\n> ---\n>  Makefile | 14 +++++++++++---\n>  1 file changed, 11 insertions(+), 3 deletions(-)\n>\n> diff --git a/Makefile b/Makefile\n> index 95571ee3fc..b7f3708292 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -3105,11 +3105,15 @@ artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \\\n>  htmldocs = git-htmldocs-$(GIT_VERSION)\n>  manpages = git-manpages-$(GIT_VERSION)\n>  .PHONY: dist-doc distclean\n> -dist-doc:\n> +dist-doc: git$X\n>  \t$(RM) -r .doc-tmp-dir\n>  \tmkdir .doc-tmp-dir\n>  \t$(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc\n> -\tcd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar $(TAR_DIST_EXTRA_OPTS) .\n> +\t./git -C .doc-tmp-dir init\n> +\t./git -C .doc-tmp-dir add .\n> +\t./git -C .doc-tmp-dir commit -m htmldocs\n> +\t./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \\\n> +\t\t> $(htmldocs).tar\n>  \tgzip -n -9 -f $(htmldocs).tar\n>  \t:\n>  \t$(RM) -r .doc-tmp-dir\n> @@ -3119,7 +3123,11 @@ dist-doc:\n>  \t\tman5dir=../.doc-tmp-dir/man5 \\\n>  \t\tman7dir=../.doc-tmp-dir/man7 \\\n>  \t\tinstall\n> -\tcd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar $(TAR_DIST_EXTRA_OPTS) .\n> +\t./git -C .doc-tmp-dir init\n> +\t./git -C .doc-tmp-dir add .\n> +\t./git -C .doc-tmp-dir commit -m manpages\n> +\t./git -C .doc-tmp-dir archive --format=tar --prefix=./ HEAD^{tree} \\\n> +\t\t> $(manpages).tar\n>  \tgzip -n -9 -f $(manpages).tar\n>  \t$(RM) -r .doc-tmp-dir\n>\n> --\n> 2.28.0\n"}]}