GNU bug report logs - #31284
[PATCH 0/1] guix: Add git-fetch/impure.

Previous Next

Package: guix;

Reported by: Chris Marusich <cmmarusich <at> gmail.com>

Date: Fri, 27 Apr 2018 08:13:01 UTC

Severity: normal

Tags: patch

Done: Chris Marusich <cmmarusich <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#31284: closed ([PATCH 0/1] guix: Add git-fetch/impure.)
Date: Fri, 27 Apr 2018 08:20:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 27 Apr 2018 01:19:21 -0700
with message-id <87muxp12pi.fsf <at> gmail.com>
and subject line Re: Status: [PATCH 0/1] guix: Add git-fetch/impure.
has caused the debbugs.gnu.org bug report #31284,
regarding [PATCH 0/1] guix: Add git-fetch/impure.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
31284: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31284
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chris Marusich <cmmarusich <at> gmail.com>
To: bug-guix <at> gnu.org
Cc: Chris Marusich <cmmarusich <at> gmail.com>
Subject: [PATCH 0/1] guix: Add git-fetch/impure.
Date: Fri, 27 Apr 2018 01:12:17 -0700
Hi Guix!

Sometimes, a Git repository may only be available via an authenticated
SSH connection.  Even in the case of repositories that only contain
free software, this situation can arise for administrative or
compliance-related reasons.  How can one define a package in such a
situation?

This patch adds a new origin method, git-fetch/impure, which solves
that problem.  Specifically, git-fetch/impure creates a fixed-output
derivation that fetches the Git repository outside of a derivation, in
the environment of the invoking user.  In particular, this enables SSH
to communicate with the user's SSH agent, which in turn allows Git to
fetch the repository over an authenticated SSH connection.  In
addition, because it is a fixed-output derivation, the output of a
successful git-fetch/impure is guaranteed to be identical to the
output of a pure git-fetch for any given commit.

Here's a simple example:

(define-public guix-over-ssh
  (package
    (inherit guix)
    (name "guix-over-ssh")
    (source
     (origin
       (inherit (package-source guix))
       (method git-fetch/impure)
       (uri
        (git-reference
         (inherit (origin-uri (package-source guix)))
         (url "ssh://marusich <at> git.sv.gnu.org:/srv/git/guix.git")))))))

In this particular example, my username appears in the package
definition, but there is no reason why that has to be so.  In many
systems, it is possible to grant access to multiple users with
different SSH keys under a single shared user name.  And in other
systems, an automated build system might need to fetch sources using
its own unique system user name and SSH key.

All in all, I think this is pretty useful.  It enables developers to
define packages in environments where authenticated access to Git
repositories is required.  Please let me know what you think!

Chris Marusich (1):
  guix: Add git-fetch/impure.

 doc/guix.texi         |  24 +++++++
 guix/git-download.scm | 150 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 174 insertions(+)

-- 
2.17.0



[Message part 3 (message/rfc822, inline)]
From: Chris Marusich <cmmarusich <at> gmail.com>
To: 31284-done <at> debbugs.gnu.org
Subject: Re: Status: [PATCH 0/1] guix: Add git-fetch/impure.
Date: Fri, 27 Apr 2018 01:19:21 -0700
[Message part 4 (text/plain, inline)]
Hi,

Please ignore this bug report.  I intended to submit it to
guix-patches <at> gnu.org, but I entered the wrong email address.

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

This bug report was last modified 7 years and 84 days ago.

Previous Next


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