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

From: Tomas Volf <[email-masked]>
Date: Sun, 02 Mar 2025 20:08:50 +0100

Leo Famulari <[email-masked]> writes:

> On Sat, Mar 01, 2025 at 11:37:40AM -0500, Jack Hill wrote:
>> 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 successfully pulled from the latest commit on the 'master' branch:

Can you pull *any* commit from 6ca7b07a251739dfaefa639e74c01e3013c9454c?
I have just tried:

--8<---------------cut here---------------start------------->8---
$ /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/profile/bin/guix pull -q --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 56a374aa79fd93a90373417b9a33b27dda633449, 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.
--8<---------------cut here---------------end--------------->8---

So it does not work for 56a374aa79fd93a90373417b9a33b27dda633449
(current master) on my machine.  Out of curiosity, can you try to pull
current master, but from 6ca7b07a251739dfaefa639e74c01e3013c9454c?

>
> ------
> $ guix package -p ~/.config/guix/current -l
> [...]
> Generation 242	Mar 02 2025 13:45:23	(current)
>  + nonguix	45bde19	out	/gnu/store/ahqhr9qbhq9w83fl3yif8qy5vfkhay7c-nonguix
>  + guix   	56a374a	out	/gnu/store/lfwph6c7099c0f5dzfpffg1qm93va5iv-guix-56a374aa7
>  - nonguix	87c5b72	out	/gnu/store/1kbmg93s0sc3ic01pql1jic6nr8mzkhi-nonguix
>  - guix   	55a5181	out	/gnu/store/vc2sn17c6g7ww4akd7p9dcfby6zykr81-guix-55a5181e7
> ------
>
> This commit is a descendant of both of the commits from your error
> message.
>
> And `guix git authenticate` succeeds from 56a374a as well.
>
> So what's going on?

Possible explanation would be that there is a bug in the descendancy
detection when your current Guix is on specific commits (my guesstimate
would be the trigger is having large commit message, I have reported
this issue before).

Have a nice day,
Tomas

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