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 E18D6158020 for ; Tue, 8 Nov 2022 01:10:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AC7E4E0948; Tue, 8 Nov 2022 01:10:16 +0000 (UTC) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (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 762B8E093E for ; Tue, 8 Nov 2022 01:10:16 +0000 (UTC) Received: by mail-qv1-f41.google.com with SMTP id n18so9335250qvt.11 for ; Mon, 07 Nov 2022 17:10:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f8YMWUgP9C8QjcPDfRfN+H+avOcMRy5kSCv5FWc3TE0=; b=BQZQ1eq1QKm+vN1rsKuwbrKvYih/mfI1l2d3ZVnFNU3peXex6Dr9VJH+NrETp+37m/ DCGX15z5VOlroPzn2E8nH65GOSR/HIfOSoqK9N8e8WlBYrTrwXXbfju0hefOQE4x/e6f Dl0lv0v3KoHYUn2j4qcO6xfgQ9kqKmoKnyGCciH4+C6VHEdgdxo6b2N09mZkJ/KY2cVx vfVzQ5LRwaaIeEFsvyDIwYa955iKiehKie/H3zdUV/aUeAeH8GQuEpzjyEMBBJJblbwj 39IDC415ywuD6zg3t3t0IOFz73IgBADqENC08PdmkQNvZ5fkJfVsBOM8kth3OFAiv+CD +ZBw== X-Gm-Message-State: ACrzQf36F9/coYs12pp88K6fECdog7n50j0xNlONgLHjdEuJxzAzMDvo E9hTrATG7A7UEq0n6MaMM26ZGKVZ9EA= X-Google-Smtp-Source: AMsMyM5TUQjVdBt6DmZu2YBE6+iZPGut2rZQfeJyed4EHgwiCuDCKiNxQKDmMM75PWVDfvAExD3hPQ== X-Received: by 2002:a05:6214:19cb:b0:4bb:6a28:83bc with SMTP id j11-20020a05621419cb00b004bb6a2883bcmr48319416qvc.102.1667869815425; Mon, 07 Nov 2022 17:10:15 -0800 (PST) Received: from localhost ([162.208.5.36]) by smtp.gmail.com with ESMTPSA id v20-20020a05622a145400b0035cd6a4ba3csm7306476qtx.39.2022.11.07.17.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 17:10:14 -0800 (PST) From: Matt Turner To: gentoo-dev@lists.gentoo.org Cc: fonts@gentoo.org, Matt Turner Subject: [gentoo-dev] [PATCH 2/2] font.eclass: Remove racy pkg_postinst code Date: Mon, 7 Nov 2022 20:10:08 -0500 Message-Id: <20221108011008.61823-2-mattst88@gentoo.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221108011008.61823-1-mattst88@gentoo.org> References: <20221108011008.61823-1-mattst88@gentoo.org> 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 Content-Transfer-Encoding: 8bit X-Archives-Salt: 7ec1d3e9-bafb-4858-9073-3609dab0bbe8 X-Archives-Hash: 3381921b18b92275a8dd79e396fefe75 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 --- 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" -- 2.37.4