From nobody Thu Jul 29 09:11:23 2021 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 734D312A9D95 for ; Thu, 29 Jul 2021 09:11:25 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gb4XF2hw5z3nVn; Thu, 29 Jul 2021 09:11:25 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-449.fritz.box (p200300cd5f2742001d65c9b40f93eff9.dip0.t-ipconnect.de [IPv6:2003:cd:5f27:4200:1d65:c9b4:f93:eff9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id C36CFCAE3; Thu, 29 Jul 2021 09:11:24 +0000 (UTC) (envelope-from se@freebsd.org) To: Baptiste Daroussin Cc: freebsd-hackers@freebsd.org, Craig Leres References: <2adca193-dbeb-8b5a-47a6-9e40e56ee80d@freebsd.org> <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu> From: Stefan Esser Subject: Re: pkg/poudriere: dangling symlink to pkg.pkg.sig Message-ID: Date: Thu, 29 Jul 2021 11:11:23 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 In-Reply-To: <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EMfT7LllNLLAwesktw1iiqX9XjeYWpdH0" X-ThisMailContainsUnwantedMimeParts: N This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EMfT7LllNLLAwesktw1iiqX9XjeYWpdH0 Content-Type: multipart/mixed; boundary="tn1CitlzSJyovAiXiGQNWWfUmwMtFz05U"; protected-headers="v1" From: Stefan Esser To: Baptiste Daroussin Cc: freebsd-hackers@freebsd.org, Craig Leres Message-ID: 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--