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

Re: [PATCH 7/8] Makefile: don't delete dist tarballs directly by name

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 5, 2020, 22:01 UTC
Message-ID
<xmqqr1p7h38t.fsf@gitster.c.googlers.com>
In-Reply-To
<48fdd198-93ad-7282-27e6-9a0c6de93067@ramsayjones.plus.com>
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
Show 21 quoted lines
> diff --git a/.gitignore b/.gitignore
> index 6232d33924..425b8cc2a4 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -191,6 +191,7 @@
>  /gitweb/static/gitweb.min.*
>  /config-list.h
>  /command-list.h
> +/dist-tars
>  *.tar.gz
>  *.dsc
>  *.deb
> diff --git a/Makefile b/Makefile
> index 90e91a2185..bc9ce28bc3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3083,6 +3083,7 @@ dist: git-archive$(X) configure
>  		--prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar
>  	@$(RM) -r .dist-tmp-dir
>  	gzip -f -9 $(GIT_TARNAME).tar
> +	@echo $(GIT_TARNAME).tar.gz >>dist-tars

Sorry, but I'd rather not to see such a longer-term "list of files to be removed" on the filesystem. This invites attackers to write a rogue test addition that writes into ../../dist-tars something like "~/.gitconfig" and wait for me to say "make clean".

Previous: Ramsay JonesNext: Junio C Hamano
Message 2 of 9 in “Makefile: don't delete dist tarballs directly by name”
  1. 7/8 Makefile: don't delete dist tarballs directly by nameRamsay Jones, Nov 5, 2020
  2. Junio C HamanoNov 5, 2020
  3. Junio C HamanoNov 5, 2020
  4. Ramsay JonesNov 6, 2020
  5. Junio C HamanoNov 6, 2020
  6. Ramsay JonesNov 6, 2020
  7. Junio C HamanoNov 6, 2020
  8. Ramsay JonesNov 6, 2020
  9. Ramsay JonesNov 6, 2020

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.