Hi Hugo,

Hugo Buddelmeijer via <[email protected]> writes:

> Post scriptum: Writing this message gave me enough inspiration to 
> continue exploring this problem myself.  So I think I don't need any 
> help at the moment.  Nevertheless, I'm sharing this message anyway in 
> case someone does want to say something insightful, or in case it is 
> useful others.
>
>
> Hi all,
>
> I patched icedove in https://codeberg.org/guix/guix/pulls/7488, from a 
> branch in my own guix fork, 
> https://codeberg.org/hugobuddel/guix-mirror/src/branch/fix-icedove .
>
> Since the PR is not yet merged, I thought I'll use the branch to make an 
> inferior and install the package from there.  But I can't figure out how 
> to do it.
>
> I have this:
>
> ```
> $ cat my-manifest-icedove.scm
> (use-modules (srfi srfi-1)
>               (guix channels)
>               (guix inferior)
>               (guix packages))
>
> (define channels-icedove
>    (list (channel
>           (name 'guix)
>           (url "https://codeberg.org/hugobuddel/guix-mirror";)
>           (branch "fix-icedove"))))
>
> (define inferior-icedove
>    (inferior-for-channels channels-icedove))
>
> (define icedove-working
>    (first (lookup-inferior-packages inferior-icedove "icedove")))
>
> (packages->manifest
>   (list icedove-working))
> ```
>
> This setup works fine for a branch from guix proper, e.g. "gnome-team". 
> The problem seems to be that I cannot add an introduction, since I 
> cannot sign a commit with a key from .guix-authorizations:
>
> ```
> $ guix package -n -m my-manifest-icedove.scm
> Updating channel 'guix' from Git repository at 
> 'https://codeberg.org/hugobuddel/guix-mirror'...
> /mnt/data/hugo/system/my-manifest-icedove.scm:7:8: warning: channel 
> 'guix' lacks 'introduction' field but '.guix-authorizations' found
> guix package: error: channel 'guix' lacks an introduction and cannot be 
> authenticated
>
> hint: Add the missing introduction to your channels file to address the 
> issue.  Alternatively, you can pass `--disable-authentication', at the 
> risk of running unauthenticated and thus potentially malicious code.
> ```
>
> I'm fine with disabling authentication, but I don't know how to do that:
>
> ```
> $ guix package -n -m my-manifest-icedove.scm --disable-authentication
> guix package: error: disable-authentication: unrecognized option
> ```
>
>
> Any of you an idea on how disable authentication through `guix package -m`?

There is no way to do that, primarily because guix package is doing no
authentication. What you want to disable is the authentication of the
inferior-for-channels that is the one actually performing the auth. This
is also not supported at the moment. But it can be, it's just a simple
addition of (authenticate? #t) key argument, then passing it through to
the cached-channel-instance that already does support it. ..talking
about the guix/inferior.scm file.

>
>
> Oh, scouring the manual shows that "7.5 Invoking guix git authenticate" 
> has a paragraph about authenticating a "branch called personal-fork" 
> that "has a different introduction than other branches".  Sounds like 
> what I'm trying to do.
>
> It seems the solution is to properly sign my commits, and add a keyring 
> branch to my fork, and then update my .git/config.  It seems I don't 
> need to modify .guix-authorizations, but not sure.

You definitely need to update .guix-authorizations, that says what
users/keys are actually authorized. You will also need to update the
channel introduction you use when pulling the channel as your commit
updating the .guix-authorizations won't be signed by someone already
authorized, so authentication would fail without adapted introduction.

Rutherther

Reply via email to