From: Johannes Sixt <j.sixt@viscovery.net>
To: Gerrit Pape <pape@smarden.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Install builtins with the user and group of the installing personality
Date: Mon, 23 Feb 2009 18:00:52 +0100 [thread overview]
Message-ID: <49A2D644.6040106@viscovery.net> (raw)
In-Reply-To: <20090223155042.14806.qmail@518da7eef5d9e4.315fe32.mid.smarden.org>
Gerrit Pape schrieb:
> If 'make install' was run with sufficient privileges, then the installed
> builtins in gitexecdir, which are either hardlinked, symlinked, or copied,
> would receive the user and group of whoever built git. With this commit the
> git-add program is installed using $(INSTALL), and subsequently linked or
> copied to the other builtins.
>
> Signed-off-by: Gerrit Pape <pape@smarden.org>
> ---
> Makefile | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index b040a96..7401603 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1467,9 +1467,7 @@ ifneq (,$X)
> endif
> bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
> execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
> - { $(RM) "$$execdir/git-add$X" && \
> - ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
> - cp git-add$X "$$execdir/git-add$X"; } && \
> + $(INSTALL) git-add$X "$$execdir" && \
> { for p in $(filter-out git-add$X,$(BUILT_INS)); do \
> $(RM) "$$execdir/$$p" && \
> ln "$$execdir/git-add$X" "$$execdir/$$p" 2>/dev/null || \
I think the intent of the lines that you removed was actually this:
diff --git a/Makefile b/Makefile
index 27b9569..97087c3 100644
--- a/Makefile
+++ b/Makefile
@@ -1471,8 +1471,8 @@ endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
{ $(RM) "$$execdir/git-add$X" && \
- ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
- cp git-add$X "$$execdir/git-add$X"; } && \
+ ln "$$bindir/git$X" "$$execdir/git-add$X" 2>/dev/null || \
+ cp "$$bindir/git$X" "$$execdir/git-add$X"; } && \
{ for p in $(filter-out git-add$X,$(BUILT_INS)); do \
$(RM) "$$execdir/$$p" && \
ln "$$execdir/git-add$X" "$$execdir/$$p" 2>/dev/null || \
-- Hannes
next prev parent reply other threads:[~2009-02-23 17:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 15:50 [PATCH] Install builtins with the user and group of the installing personality Gerrit Pape
2009-02-23 17:00 ` Johannes Sixt [this message]
2009-02-24 8:58 ` Gerrit Pape
2009-02-25 9:54 ` Junio C Hamano
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=49A2D644.6040106@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pape@smarden.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).