Re: pkg/poudriere: dangling symlink to pkg.pkg.sig

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Thu, 29 Jul 2021 07:41:07 UTC
On Tue, Jul 27, 2021 at 02:05:14PM -0700, Craig Leres wrote:
> 
> For the last few days, approximately corresponding to when the pkg port
> upgraded to 1.17.0, the poudriere build process has been creating a dangling
> symlink from pkg.txz.sig to pkg.pkg.sig. Posting an issue to
> github.com/freebsd/pkg did not prove useful; does anyone understand what
> broke (and how to fix it)?
> 
> I ran into this because I use a cron job to archive poudriere build trees;
> the job does a diff -r of the latest pkg tree vs. the most recent archived
> tree (to decide if the new tree is worth archiving).
> 
> 		Craig
> 
I told you to have a look at the commit in the ports tree in the github issue,
which apparently you did not.

In particular:
https://cgit.freebsd.org/ports/commit/Mk/bsd.port.mk?id=ec2764d5ec4933f52cb0718663f60f1e1b1eed7f

This is not done by pkg, so this is not a pkg bug, neither done by poudriere,
this is done by the ports tree, this is a transition so that when someone is
signing his own repo, he has valid signature for FreeBSD 12.2 and 11.4 which are
the 2 systems which do not know about .pkg extention for the bootstrap of pkg.

The safest way to do that was to create a dead symlink so the when pkg.pkg.sig
appears the symlink is not dead anymore and bootstrap signature can be checked.

1 improvements that can be done, (I don't have time to do it right now: limit
this to only be created on FreeBSD 12 and 11, limit it to cluster package
building)

Best regards,
Bapt