All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: [PATCH] t/lib-gpg: adjust permissions for gnupg 2.1
Date: Wed, 03 Dec 2014 08:21:12 -0800	[thread overview]
Message-ID: <xmqqsigwk8lj.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20141203000553.GA28969@peff.net> (Jeff King's message of "Tue, 2 Dec 2014 19:05:53 -0500")

Jeff King <peff@peff.net> writes:

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

  reply	other threads:[~2014-12-03 16:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 23:09 [ANNOUNCE] Git v2.2.0 Junio C Hamano
2014-11-27 21:32 ` Steven Noonan
2014-11-28  4:46   ` Jeff King
2014-11-28  9:48   ` Michael J Gruber
2014-11-28 16:50     ` tests do not work with gpg 2.1 Jeff King
2014-12-02 12:55       ` Michael J Gruber
2014-12-02 13:40         ` [PATCH] t/lib-gpg: adjust permissions for gnupg 2.1 Michael J Gruber
2014-12-02 21:07           ` Jeff King
2014-12-02 23:57             ` Junio C Hamano
2014-12-03  0:05               ` Jeff King
2014-12-03 16:21                 ` Junio C Hamano [this message]
2014-12-03 11:23             ` Michael J Gruber
2014-12-03 16:45               ` Junio C Hamano
2014-12-02 21:21         ` tests do not work with gpg 2.1 Jeff King
2014-12-02 21:30           ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqsigwk8lj.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.