From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D5CFB158020 for ; Tue, 8 Nov 2022 04:11:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0E12E0965; Tue, 8 Nov 2022 04:11:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A022E0933 for ; Tue, 8 Nov 2022 04:11:03 +0000 (UTC) Content-Type: multipart/signed; boundary="Apple-Mail=_E1DBD824-E907-4608-BD52-6E2E71096121"; protocol="application/pgp-signature"; micalg=pgp-sha512 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: Re: [gentoo-dev] [PATCH 2/2] font.eclass: Remove racy pkg_postinst code From: Sam James In-Reply-To: <20221108011008.61823-2-mattst88@gentoo.org> Date: Tue, 8 Nov 2022 04:10:48 +0000 Cc: fonts@gentoo.org, Matt Turner Message-Id: <568F0AB7-82C2-4E35-828B-7617AF31B04D@gentoo.org> References: <20221108011008.61823-1-mattst88@gentoo.org> <20221108011008.61823-2-mattst88@gentoo.org> To: gentoo-dev@lists.gentoo.org X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Archives-Salt: eb165783-ab49-4e02-a84b-be8aee77f55b X-Archives-Hash: 92bd6d4e4fd81e1023fbc03ae88cdbc6 --Apple-Mail=_E1DBD824-E907-4608-BD52-6E2E71096121 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 8 Nov 2022, at 01:10, Matt Turner wrote: >=20 > Noticed on ChromeOS when installing a large number of font packages in > parallel: >=20 > /usr/share/fonts/noto/NotoSerifThai-Regular.ttf#new' from 0004 = (------r--) to 2440 (r--r-S---) > * ERROR: media-fonts/ipaex-004.01-r1::chromiumos failed (postinst = phase): > * failed to fix font files perms >=20 > The "#new" filename is the hint. Portage uses "#new" suffixes when > copying files to the system, and then renames them to their final > filenames. >=20 > This code was executing while another font was in the process of being > copied to the system. Font packages should just ensure that they = install > files with correct permissions to begin with, and all except > media-fonts/x11fonts-jmk already use 0644 permissions. > media-fonts/x11fonts-jmk used 0444 (which was probably fine) until the > previous commit which changes its installed files to 0644. >=20 > Bug: https://bugs.gentoo.org/187774 > Signed-off-by: Matt Turner > --- > eclass/font.eclass | 6 ------ > 1 file changed, 6 deletions(-) >=20 > diff --git a/eclass/font.eclass b/eclass/font.eclass > index 4970c959f7c..0196755ce3e 100644 > --- a/eclass/font.eclass > +++ b/eclass/font.eclass > @@ -186,12 +186,6 @@ font_src_install() { > # @DESCRIPTION: > # Updates fontcache if !prefix and media-libs/fontconfig installed > _update_fontcache() { > - if [[ -d "${EROOT}"/usr/share/fonts ]] ; then > - # unreadable font files =3D fontconfig segfaults > - find "${EROOT}"/usr/share/fonts/ -type f '!' -perm 0644 \ > - -exec chmod -v 0644 2>/dev/null {} + || die "failed to fix font = files perms" > - fi > - > if [[ -z ${ROOT} ]] ; then > if has_version media-libs/fontconfig ; then > ebegin "Updating global fontcache" > -- Can we put an fperms call in src_install just in case (like the eclass = originally had before moved to pkg_postinst)? --Apple-Mail=_E1DBD824-E907-4608-BD52-6E2E71096121 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY2nWyF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kLSeAP4l8quiFC1RnoxMNtveKkXI7cmZBBCN9UjQJfdy3JMCxAD6AhS2v1kPEb0j iWcHe7PSGfthC61/91A9MIyh9I2cbAg= =6kys -----END PGP SIGNATURE----- --Apple-Mail=_E1DBD824-E907-4608-BD52-6E2E71096121--