From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: fonts@gentoo.org, Matt Turner <mattst88@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH 2/2] font.eclass: Remove racy pkg_postinst code
Date: Tue, 8 Nov 2022 04:10:48 +0000 [thread overview]
Message-ID: <568F0AB7-82C2-4E35-828B-7617AF31B04D@gentoo.org> (raw)
In-Reply-To: <20221108011008.61823-2-mattst88@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1940 bytes --]
> On 8 Nov 2022, at 01:10, Matt Turner <mattst88@gentoo.org> wrote:
>
> Noticed on ChromeOS when installing a large number of font packages in
> parallel:
>
> /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
>
> The "#new" filename is the hint. Portage uses "#new" suffixes when
> copying files to the system, and then renames them to their final
> filenames.
>
> 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.
>
> Bug: https://bugs.gentoo.org/187774
> Signed-off-by: Matt Turner <mattst88@gentoo.org>
> ---
> eclass/font.eclass | 6 ------
> 1 file changed, 6 deletions(-)
>
> 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 = 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)?
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]
next prev parent reply other threads:[~2022-11-08 4:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 1:10 [gentoo-dev] [PATCH 1/2] media-fonts/x11fonts-jmk: Install files with 0644 permissions Matt Turner
2022-11-08 1:10 ` [gentoo-dev] [PATCH 2/2] font.eclass: Remove racy pkg_postinst code Matt Turner
2022-11-08 4:10 ` Sam James [this message]
2022-11-08 20:29 ` Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=568F0AB7-82C2-4E35-828B-7617AF31B04D@gentoo.org \
--to=sam@gentoo.org \
--cc=fonts@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=mattst88@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox