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

Re: [PATCH] t/lib-gpg: adjust permissions for gnupg 2.1

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 3, 2014, 16:21 UTC
Message-ID
<xmqqsigwk8lj.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20141203000553.GA28969@peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> On Tue, Dec 02, 2014 at 03:57:50PM -0800, Junio C Hamano wrote:
>
>> Wait.  After doing this,
>> 
>>     $ mkdir -p src/a && >src/b 2>src/a/c && chmod a-w src/b src/a/c
>>     $ cp -R src dst
>>     $ ls -lR dst
>> 
>> dst/b and dst/a/c are 0440 (with umask 0027, which makes src/b and
>> src/a/c also 0440, which is copied with "cp -R").
>
> Who is running that chmod and why? I know you are trying to simulate
> "somehow they lost their 'w' bit" here, but what is that "somehow"?

The very first thing I do after downloading and extracting a tarball for any random project, before doing configure or make, is to a-w on its files (but not directories, as I typically build in-place in the source tree even for projects that support VPATH build).

Some ill-mannered projects' build break with this by trying to munge their own source files. They are, well, badly written, and I would want to know about them, and that is one of the reasons behind a-w.

I do not know how widespread the practice is, but that was what I did for this project, too, when I tried out Linus's first version ;-) These days, I do "git init && git add ." instead, so it does not matter to me personally, but "cp -R" we do will matter to people who still care without fixing the mode bits of the copied ones that we intend to modify inside our tests and build procedure.

Previous: Jeff KingNext: Michael J Gruber
Message 11 of 15 in “[ANNOUNCE] Git v2.2.0”
  1. Junio C HamanoNov 26, 2014
  2. Steven NoonanNov 27, 2014
  3. Jeff KingNov 28, 2014
  4. Michael J GruberNov 28, 2014
  5. tests do not work with gpg 2.1Jeff King, Nov 28, 2014
  6. Michael J GruberDec 2, 2014
  7. t/lib-gpg: adjust permissions for gnupg 2.1Michael J Gruber, Dec 2, 2014
  8. Jeff KingDec 2, 2014
  9. Junio C HamanoDec 2, 2014
  10. Jeff KingDec 3, 2014
  11. Junio C HamanoDec 3, 2014
  12. Michael J GruberDec 3, 2014
  13. Junio C HamanoDec 3, 2014
  14. Jeff KingDec 2, 2014
  15. Jeff KingDec 2, 2014

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.