From nobody Thu Jul 29 09:18:19 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 957A312AA9FC for ; Thu, 29 Jul 2021 09:18:21 +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 4Gb4hF3cgpz3ptk; Thu, 29 Jul 2021 09:18:21 +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 D970EC868; Thu, 29 Jul 2021 09:18:20 +0000 (UTC) (envelope-from se@freebsd.org) From: Stefan Esser To: Baptiste Daroussin Cc: freebsd-hackers@freebsd.org, Craig Leres References: <2adca193-dbeb-8b5a-47a6-9e40e56ee80d@freebsd.org> <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu> Subject: Re: pkg/poudriere: dangling symlink to pkg.pkg.sig [inline patch fixed] Message-ID: <6c707473-9e1d-8ca9-6cd7-af21774a9f74@freebsd.org> Date: Thu, 29 Jul 2021 11:18:19 +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="tJ5uNZZEx7gEmGulTrx6qvSjoUSwCakK5" X-ThisMailContainsUnwantedMimeParts: N This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tJ5uNZZEx7gEmGulTrx6qvSjoUSwCakK5 Content-Type: multipart/mixed; boundary="pBVNSJMH52CyARz4dCSLASjP4ZZun32lP"; protected-headers="v1" From: Stefan Esser To: Baptiste Daroussin Cc: freebsd-hackers@freebsd.org, Craig Leres Message-ID: <6c707473-9e1d-8ca9-6cd7-af21774a9f74@freebsd.org> Subject: Re: pkg/poudriere: dangling symlink to pkg.pkg.sig [inline patch fixed] References: <2adca193-dbeb-8b5a-47a6-9e40e56ee80d@freebsd.org> <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu> In-Reply-To: <20210729074107.yuv6a4tcj55wpbvt@aniel.nours.eu> --pBVNSJMH52CyARz4dCSLASjP4ZZun32lP Content-Type: multipart/mixed; boundary="------------E582BDCAAC691F7F19DCCA94" Content-Language: en-US This is a multi-part message in MIME format. --------------E582BDCAAC691F7F19DCCA94 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [Resending, the inline diff had significant white-space issues ...] 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 --------------E582BDCAAC691F7F19DCCA94 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== --------------E582BDCAAC691F7F19DCCA94-- --pBVNSJMH52CyARz4dCSLASjP4ZZun32lP-- --tJ5uNZZEx7gEmGulTrx6qvSjoUSwCakK5 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+u171r99UT9 RwgAuPjbRSkSHGXqB6Am9mDB10VtOuS+DgRwWYmrFXCOzPoCIVoJ27MkS3eUCIY9+AAEimHvtSCL +sWFTPng/Ry/lDmczkCViQd3U7m3BUvwtFQn/kaj7+98yYEd5MK/o2f1RlYU3fPrp5fMwTEfgeSG ZveYXvq89U4cWi0YlDuuM5cVJNPfcvQGMCO+BLcu4m+3ZkHmO7s43yttqc9RZ4VwRhcGS6k8DyRS yiw+r0r1LmnqcK/DenGZXRCgB9l03E4SsQe4b8YxUdTnqP2WnNUnTjhyvIe5T9Em/sIZVIxa6A6k 1eJL6MxgAjtxOUDH7RmrhO0AXX3EhxxNZm0n+SNngQ== =oejC -----END PGP SIGNATURE----- --tJ5uNZZEx7gEmGulTrx6qvSjoUSwCakK5--