GNU bug report logs - #31488
[PATCH] gnu: git: Add "credential-netrc" output.

Previous Next

Package: guix-patches;

Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>

Date: Fri, 18 May 2018 09:23:01 UTC

Severity: normal

Tags: patch

Done: Gábor Boskovits <boskovits <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31488 in the body.
You can then email your comments to 31488 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#31488; Package guix-patches. (Fri, 18 May 2018 09:23:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Neidhardt <ambrevar <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 18 May 2018 09:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: git: Add "credential-netrc" output.
Date: Fri, 18 May 2018 11:22:07 +0200
* gnu/packages/version-control.scm (git): Add "credential-netrc"
output.
---
 gnu/packages/version-control.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index b41529d4f..4892c7ab8 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -188,6 +188,7 @@ as well as the classic centralized workflow.")
    (outputs '("out"                               ; the core
               "send-email"                        ; for git-send-email
               "svn"                               ; git-svn
+              "credential-netrc"                  ; git-credential-netrc
               "gui"))                             ; gitk, git gui
    (arguments
     `(#:make-flags `("V=1"                        ;more verbose compilation
@@ -217,6 +218,8 @@ as well as the classic centralized workflow.")
               (("/bin/sh") (which "sh"))
               (("/usr/bin/perl") (which "perl"))
               (("/usr/bin/python") (which "python")))
+            (substitute* "contrib/credential/netrc/git-credential-netrc"
+              (("/usr/bin/perl") (which "perl")))
             #t))
         (add-after 'configure 'add-PM.stamp
           (lambda _
@@ -271,6 +274,13 @@ as well as the classic centralized workflow.")
               (copy-file "contrib/completion/git-completion.bash"
                          (string-append completions "/git"))
               #t)))
+        (add-after 'install 'install-credential-netrc
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((netrc (assoc-ref outputs "credential-netrc"))
+                   (bin (string-append netrc "/bin")))
+              (mkdir-p bin)
+              (install-file "contrib/credential/netrc/git-credential-netrc" bin)
+              #t)))
         (add-after 'install 'split
           (lambda* (#:key inputs outputs #:allow-other-keys)
             ;; Split the binaries to the various outputs.
-- 
2.17.0





Information forwarded to guix-patches <at> gnu.org:
bug#31488; Package guix-patches. (Fri, 18 May 2018 12:52:02 GMT) Full text and rfc822 format available.

Message #8 received at 31488 <at> debbugs.gnu.org (full text, mbox):

From: "Tobias Geerinckx-Rice" <me <at> tobias.gr>
To: "Pierre Neidhardt" <ambrevar <at> gmail.com>, 31488 <at> debbugs.gnu.org
Subject: Re: [bug#31488] [PATCH] gnu: git: Add "credential-netrc" output.
Date: Fri, 18 May 2018 12:50:53 +0000
Pierre,

[Forgive my MUA's disdain for whitespace. I'm working on it.]

May 18, 2018 11:22 AM, "Pierre Neidhardt" <ambrevar <at> gmail.com> wrote:
> @@ -217,6 +218,8 @@ as well as the classic centralized workflow.")
> (("/bin/sh") (which "sh"))
> (("/usr/bin/perl") (which "perl"))
> (("/usr/bin/python") (which "python")))
> + (substitute* "contrib/credential/netrc/git-credential-netrc"
> + (("/usr/bin/perl") (which "perl")))
> #t))
> (add-after 'configure 'add-PM.stamp
> (lambda _

This phase is (still) called ‘patch-makefiles’. Could you tweak the name or move this to its own phase?

I've a preference for the latter, since it can then probably be moved before 'install-credential-netrc below to keep things together, but it's a slight one.

All that typed: is this even needed? It doesn't seem to be. The only mention of perl is the shebang, and those are already handled by the build system.

> @@ -271,6 +274,13 @@ as well as the classic centralized workflow.")
> (copy-file "contrib/completion/git-completion.bash"
> (string-append completions "/git"))
> #t)))
> + (add-after 'install 'install-credential-netrc
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((netrc (assoc-ref outputs "credential-netrc"))
> + (bin (string-append netrc "/bin")))
> + (mkdir-p bin)

INSTALL-FILE already implies MKDIR-P. That's one of its main features over COPY-FILE.

> + (install-file "contrib/credential/netrc/git-credential-netrc" bin)
> + #t)))
> (add-after 'install 'split
> (lambda* (#:key inputs outputs #:allow-other-keys)
> ;; Split the binaries to the various outputs.

I'll let others comment on the multiple outputs. I'm their resident fetishist, but not sufficiently informed to judge the ‘clutter’ vs. 48 KiB argument.

Sorry to reduce your work to a potential one-liner. The rest looks good to me. ;-)

Thanks!

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.




Information forwarded to guix-patches <at> gnu.org:
bug#31488; Package guix-patches. (Fri, 18 May 2018 13:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 31488 <at> debbugs.gnu.org (full text, mbox):

From: "Tobias Geerinckx-Rice" <me <at> tobias.gr>
To: "Pierre Neidhardt" <ambrevar <at> gmail.com>, 31488 <at> debbugs.gnu.org
Subject: Re: [bug#31488] [PATCH] gnu: git: Add "credential-netrc" output.
Date: Fri, 18 May 2018 13:05:37 +0000
May 18, 2018 2:50 PM, "Tobias Geerinckx-Rice" <me <at> tobias.gr> wrote:
> INSTALL-FILE already implies MKDIR-P. That's one of its main features over COPY-FILE.

Or only, in fact.

  (define (install-file file directory)
    (mkdir-p directory)
    (copy-file file (string-append directory "/" (basename file))))

There are quite a few spurious MKDIR-Ps still lurking in Guix that might
have been confusing.

Tidying time,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.




Information forwarded to guix-patches <at> gnu.org:
bug#31488; Package guix-patches. (Fri, 18 May 2018 13:25:02 GMT) Full text and rfc822 format available.

Message #14 received at 31488 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 31488 <at> debbugs.gnu.org
Subject: Re: [bug#31488] [PATCH] gnu: git: Add "credential-netrc" output.
Date: Fri, 18 May 2018 15:24:32 +0200
[Message part 1 (text/plain, inline)]
You are absolutely right, new patch inbound.

-- 
Pierre Neidhardt

'Tis more blessed to give than receive; for example, wedding presents.
		-- H.L. Mencken
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#31488; Package guix-patches. (Fri, 18 May 2018 13:26:02 GMT) Full text and rfc822 format available.

Message #17 received at 31488 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 31488 <at> debbugs.gnu.org
Subject: Re: [bug#31488] [PATCH] gnu: git: Add "credential-netrc" output.
Date: Fri, 18 May 2018 15:25:03 +0200
[Message part 1 (text/plain, inline)]
* gnu/packages/version-control.scm (git): Add "credential-netrc"
output.
---
 gnu/packages/version-control.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index b41529d4f..13861d251 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -188,6 +188,7 @@ as well as the classic centralized workflow.")
    (outputs '("out"                               ; the core
               "send-email"                        ; for git-send-email
               "svn"                               ; git-svn
+              "credential-netrc"                  ; git-credential-netrc
               "gui"))                             ; gitk, git gui
    (arguments
     `(#:make-flags `("V=1"                        ;more verbose compilation
@@ -271,6 +272,12 @@ as well as the classic centralized workflow.")
               (copy-file "contrib/completion/git-completion.bash"
                          (string-append completions "/git"))
               #t)))
+        (add-after 'install 'install-credential-netrc
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((netrc (assoc-ref outputs "credential-netrc")))
+              (install-file "contrib/credential/netrc/git-credential-netrc"
+                            (string-append netrc "/bin"))
+              #t)))
         (add-after 'install 'split
           (lambda* (#:key inputs outputs #:allow-other-keys)
             ;; Split the binaries to the various outputs.
-- 
2.17.0

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#31488; Package guix-patches. (Sat, 16 Jun 2018 16:20:02 GMT) Full text and rfc822 format available.

Message #20 received at 31488 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 31488 <at> debbugs.gnu.org
Subject: Re: [bug#31488] [PATCH] gnu: git: Add "credential-netrc" output.
Date: Sat, 16 Jun 2018 18:19:15 +0200
[Message part 1 (text/plain, inline)]
Update?

-- 
Pierre Neidhardt
[signature.asc (application/pgp-signature, inline)]

Reply sent to Gábor Boskovits <boskovits <at> gmail.com>:
You have taken responsibility. (Fri, 22 Jun 2018 09:50:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Neidhardt <ambrevar <at> gmail.com>:
bug acknowledged by developer. (Fri, 22 Jun 2018 09:50:02 GMT) Full text and rfc822 format available.

Message #25 received at 31488-done <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: 31488-done <at> debbugs.gnu.org
Subject: gnu: git: Add "credential-netrc" output.
Date: Fri, 22 Jun 2018 11:48:59 +0200
[Message part 1 (text/plain, inline)]
Thanks for the patch!
Pushed as *145b0693.*
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Jul 2018 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.