git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Makefile: use git init/add/commit/archive for dist-doc
@ 2020-10-10 16:45 René Scharfe
  2020-10-11  6:14 ` [PATCH 2/1] Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS René Scharfe
  2020-10-12 19:20 ` [PATCH] Makefile: use git init/add/commit/archive for dist-doc Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: René Scharfe @ 2020-10-10 16:45 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

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 <l.s.r@web.de>
---
 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

--
2.28.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/1] Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS
  2020-10-10 16:45 [PATCH] Makefile: use git init/add/commit/archive for dist-doc René Scharfe
@ 2020-10-11  6:14 ` René Scharfe
  2020-10-12 19:20 ` [PATCH] Makefile: use git init/add/commit/archive for dist-doc Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: René Scharfe @ 2020-10-11  6:14 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 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)/ \
--
2.28.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Makefile: use git init/add/commit/archive for dist-doc
  2020-10-10 16:45 [PATCH] Makefile: use git init/add/commit/archive for dist-doc René Scharfe
  2020-10-11  6:14 ` [PATCH 2/1] Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS René Scharfe
@ 2020-10-12 19:20 ` Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2020-10-12 19:20 UTC (permalink / raw)
  To: René Scharfe; +Cc: Git Mailing List

René Scharfe <l.s.r@web.de> writes:

> 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.

Hmph.  I vaguely recall somebody on a more exotic platform wanted
our "tar" invocations to be tweakable as their "tar" lacked options
or something like that, and hopefully pushing our build procedure in
this direction would help them.

Will queue.  Thanks.

> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
>  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
>
> --
> 2.28.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-12 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10 16:45 [PATCH] Makefile: use git init/add/commit/archive for dist-doc René Scharfe
2020-10-11  6:14 ` [PATCH 2/1] Makefile: remove the unused variable TAR_DIST_EXTRA_OPTS René Scharfe
2020-10-12 19:20 ` [PATCH] Makefile: use git init/add/commit/archive for dist-doc Junio C Hamano

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git