Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2021 11:11:23 +0200
From:      Stefan Esser <se@freebsd.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org, Craig Leres <leres@freebsd.org>
Subject:   Re: pkg/poudriere: dangling symlink to pkg.pkg.sig
Message-ID:  <cc9bc36c-0c7b-eb68-56d0-8c80a944ee5b@freebsd.org>
In-Reply-To: <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu>
References:  <2adca193-dbeb-8b5a-47a6-9e40e56ee80d@freebsd.org> <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--EMfT7LllNLLAwesktw1iiqX9XjeYWpdH0
Content-Type: multipart/mixed; boundary="tn1CitlzSJyovAiXiGQNWWfUmwMtFz05U";
 protected-headers="v1"
From: Stefan Esser <se@freebsd.org>
To: Baptiste Daroussin <bapt@FreeBSD.org>
Cc: freebsd-hackers@freebsd.org, Craig Leres <leres@freebsd.org>
Message-ID: <cc9bc36c-0c7b-eb68-56d0-8c80a944ee5b@freebsd.org>
Subject: Re: pkg/poudriere: dangling symlink to pkg.pkg.sig
References: <2adca193-dbeb-8b5a-47a6-9e40e56ee80d@freebsd.org>
 <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu>
In-Reply-To: <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu>

--tn1CitlzSJyovAiXiGQNWWfUmwMtFz05U
Content-Type: multipart/mixed;
 boundary="------------57853282F30EF0AE3ADE78E3"
Content-Language: de-DE

This is a multi-part message in MIME format.
--------------57853282F30EF0AE3ADE78E3
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Am 29.07.21 um 09:41 schrieb Baptiste Daroussin:
> On Tue, Jul 27, 2021 at 02:05:14PM -0700, Craig Leres wrote:
>>
>> For the last few days, approximately corresponding to when the pkg por=
t
>> upgraded to 1.17.0, the poudriere build process has been creating a da=
ngling
>> symlink from pkg.txz.sig to pkg.pkg.sig. Posting an issue to
>> github.com/freebsd/pkg did not prove useful; does anyone understand wh=
at
>> broke (and how to fix it)?
>>
>> I ran into this because I use a cron job to archive poudriere build tr=
ees;
>> the job does a diff -r of the latest pkg tree vs. the most recent arch=
ived
>> 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.
>=20
> In particular:
> https://cgit.freebsd.org/ports/commit/Mk/bsd.port.mk?id=3Dec2764d5ec493=
3f52cb0718663f60f1e1b1eed7f
>=20
> This is not done by pkg, so this is not a pkg bug, neither done by poud=
riere,
> this is done by the ports tree, this is a transition so that when someo=
ne 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.
>=20
> 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.
>=20
> 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 packa=
ge
> building)

The attached patch limits the creation of the symlink to FreeBSD
versions before 13.

Inline version for easy review (white-space might be damaged):

diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk




index c9532fa5af2e..1a942e8abc0c 100644




--- a/Mk/bsd.port.mk




+++ b/Mk/bsd.port.mk




@@ -3461,7 +3461,10 @@ ${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY=
}




        ${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE}









 .if !defined(_PKG_TRANSITIONING_TO_NEW_EXT)




-_EXTRA_PACKAGE_TARGET_DEP+=3D    ${PKGOLDLATESTFILE} ${PKGOLDSIGFILE}




+_EXTRA_PACKAGE_TARGET_DEP+=3D    ${PKGOLDLATESTFILE}




+.if ${OSVERSION} < 1300000




+_EXTRA_PACKAGE_TARGET_DEP+=3D    ${PKGOLDSIGFILE}




+.endif









 ${PKGOLDLATESTFILE}: ${PKGOLDFILE} ${PKGLATESTREPOSITORY}




        ${INSTALL} -l rs ${PKGOLDFILE} ${PKGOLDLATESTFILE}

Do you approve the commit?

Regards, STefan

--------------57853282F30EF0AE3ADE78E3
Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0";
 name="pkg-sig.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="pkg-sig.diff"

ZGlmZiAtLWdpdCBhL01rL2JzZC5wb3J0Lm1rIGIvTWsvYnNkLnBvcnQubWsKaW5kZXggYzk1
MzJmYTVhZjJlLi4xYTk0MmU4YWJjMGMgMTAwNjQ0Ci0tLSBhL01rL2JzZC5wb3J0Lm1rCisr
KyBiL01rL2JzZC5wb3J0Lm1rCkBAIC0zNDYxLDcgKzM0NjEsMTAgQEAgJHtQS0dMQVRFU1RG
SUxFfTogJHtQS0dGSUxFfSAke1BLR0xBVEVTVFJFUE9TSVRPUll9CiAJJHtJTlNUQUxMfSAt
bCBycyAke1BLR0ZJTEV9ICR7UEtHTEFURVNURklMRX0KIAogLmlmICFkZWZpbmVkKF9QS0df
VFJBTlNJVElPTklOR19UT19ORVdfRVhUKQotX0VYVFJBX1BBQ0tBR0VfVEFSR0VUX0RFUCs9
CSR7UEtHT0xETEFURVNURklMRX0gJHtQS0dPTERTSUdGSUxFfQorX0VYVFJBX1BBQ0tBR0Vf
VEFSR0VUX0RFUCs9CSR7UEtHT0xETEFURVNURklMRX0KKy5pZiAke09TVkVSU0lPTn0gPCAx
MzAwMDAwCitfRVhUUkFfUEFDS0FHRV9UQVJHRVRfREVQKz0JJHtQS0dPTERTSUdGSUxFfQor
LmVuZGlmCiAKICR7UEtHT0xETEFURVNURklMRX06ICR7UEtHT0xERklMRX0gJHtQS0dMQVRF
U1RSRVBPU0lUT1JZfQogCSR7SU5TVEFMTH0gLWwgcnMgJHtQS0dPTERGSUxFfSAke1BLR09M
RExBVEVTVEZJTEV9Cg==
--------------57853282F30EF0AE3ADE78E3--

--tn1CitlzSJyovAiXiGQNWWfUmwMtFz05U--

--EMfT7LllNLLAwesktw1iiqX9XjeYWpdH0
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmECcLsFAwAAAAAACgkQR+u171r99UQQ
/gf8DNxxbe8oeIWsSRWHUVHgR/kh7X/+dkDk3314DW8c7qxQDRyoR5wuynQYNw3ykiqT4DjZQ0NU
znYiwEvGdeKFb5mY1754Tv64lgTbxWQoETywJ2Em1CTglR/D7+4ClBXduSkCIpqNR0KSWr5PbTHF
hIlc0+UvUjuaBmpVAsn0thjBSXHNlt3ka9jF+KgKaCoFAR1SN7BMOaF+KDcmOsbHTeJ2xhEe/w9+
HX1dvWF1vEbZDJ/QSmfUu8iKDyKXH5jU+ZtzYgjqfFFmC0a4Z40+rZNkiae+ldZNJ2llhGV4kuuh
D3Crv9tU3uDxZPb57bzsDmIZg6FN0RXcaWQqlzWC2A==
=zKkg
-----END PGP SIGNATURE-----

--EMfT7LllNLLAwesktw1iiqX9XjeYWpdH0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cc9bc36c-0c7b-eb68-56d0-8c80a944ee5b>