Subject: Re: bug#76660: current guix pull doesn't authenticate

From: Tomas Volf <[email-masked]>
Date: Sat, 01 Mar 2025 22:41:16 +0100

Jack Hill <[email-masked]> writes:

> jackhill@lissome ~$ guix describe
> Generation 159  Feb 27 2025 22:08:27    (current)
>   guix f13f076
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: f13f0769688493271f43f31a016957355dbecb30
> jackhill@lissome ~$ guix pull
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: error: aborting update of channel 'guix' to commit 6ca7b07a251739dfaefa639e74c01e3013c9454c, which is not a descendant of f13f0769688493271f43f31a016957355dbecb30
> hint: This could indicate that the channel has been tampered with and is trying to force a
> roll-back, preventing you from getting the latest updates.  If you think this is not the
> case, explicitly allow non-forward updates.
>
> I don't have reason to believe the channel needs to be rolled back, I assume
> something is wrong with the savannah copy of the repo, but don't know. Can
> someone confirm?

Can confirm.

--8<---------------cut here---------------start------------->8---
/tmp/test$ /tmp/test/profile/bin/guix describe
Generation 1	Mar 01 2025 21:04:08	(current)
  guix f13f076
    repository URL: https://git.savannah.gnu.org/git/guix.git
    commit: f13f0769688493271f43f31a016957355dbecb30
/tmp/test$ /tmp/test/profile/bin/guix pull -q --commit=6ca7b07a251739dfaefa639e74c01e3013c9454c --profile=/tmp/test/profile
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guix pull: error: aborting update of channel 'guix' to commit 6ca7b07a251739dfaefa639e74c01e3013c9454c, which is not a descendant of f13f0769688493271f43f31a016957355dbecb30
hint: Use `--allow-downgrades' to force this downgrade.

--8<---------------cut here---------------end--------------->8---

There is nothing wrong with the repository, and the commit is a
descendant:

--8<---------------cut here---------------start------------->8---
$ git merge-base --is-ancestor f13f0769688493271f43f31a016957355dbecb30 6ca7b07a251739dfaefa639e74c01e3013c9454c
$ echo $?
0
--8<---------------cut here---------------end--------------->8---

Given that f13f0769688493271f43f31a016957355dbecb30 has fairly large
commit message, maybe the known bugs in how we are using guile-git
finally caught up with us.

I guess you can use the --allow-downgrades to by-pass the check after
you manually verify in the git repository the relation of the commits.
Sucks, but should allow you to pull.

Have a nice day,
Tomas
-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.