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 D1767158089 for ; Sat, 23 Sep 2023 11:07:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 214A42BC02A; Sat, 23 Sep 2023 11:07:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 065022BC02A for ; Sat, 23 Sep 2023 11:07:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 15CC633D3C7 for ; Sat, 23 Sep 2023 11:07:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9D83A11BC for ; Sat, 23 Sep 2023 11:07:24 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1695467034.b0b5e39f1247c3cae5c8d4618a20d396cf70937d.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: b0b5e39f1247c3cae5c8d4618a20d396cf70937d X-VCS-Branch: master Date: Sat, 23 Sep 2023 11:07:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c83f29ae-7d1b-4e06-b592-84a3bdcaba8c X-Archives-Hash: 1bcfcae87ee1edf4aa62d894eed5bd18 commit: b0b5e39f1247c3cae5c8d4618a20d396cf70937d Author: Fabian Groffen gentoo org> AuthorDate: Sat Sep 23 11:03:54 2023 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Sep 23 11:03:54 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b0b5e39f scripts/bootstrap-prefix: fix RAP stage3 on python due to init.d script Portage enforces init.d scripts must have a valid shebang, which means openrc-run must exist on the system. For RAP-systems this script is to be provided by openrc (in contrast to baselayout for non-RAP Prefix systems), however during bootstrap openrc is not pulled in, and in reality it never is. So provide a dummy openrc-run in the RAP path for stage3 before python or rsync are pulled in, such that Portage's QA check is happy about their init.d scripts. Closes: https://bugs.gentoo.org/913856 Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index e6a88b8325..b08a497f41 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -2028,6 +2028,18 @@ bootstrap_stage3() { grep -q 'esac' "${ROOT}"/usr/bin/rsync && \ rm "${ROOT}"/usr/bin/rsync + # sys-apps/baselayout will install a dummy openrc-run wrapper + # for any package that installs an init.d script, like rsync and + # python will need openrc-run to exist, else we'll die with a QA + # error, bug #858596. However it only does this for + # prefix-guest, so NOT For RAP, which results in bug #913856. + if [[ ! -x "${ROOT}"/sbin/openrc-run ]]; then + [[ -e "${ROOT}"/sbin ]] || mkdir -p "${ROOT}"/sbin + echo "We need openrc-run at ${ROOT}/sbin to merge some packages." \ + > "${ROOT}"/sbin/openrc-run + chmod +x "${ROOT}"/sbin/openrc-run + fi + pkgs=( sys-devel/binutils-config sys-libs/zlib @@ -2139,12 +2151,6 @@ bootstrap_stage3() { TIME_T_32_BIT_OK=yes \ pre_emerge_pkgs "" "${pkgs[@]}" || return 1 - if [[ ! -x "${ROOT}"/sbin/openrc-run ]]; then - echo "We need openrc-run at ${ROOT}/sbin to merge rsync." \ - > "${ROOT}"/sbin/openrc-run - chmod +x "${ROOT}"/sbin/openrc-run - fi - pkgs=( virtual/os-headers sys-devel/gettext @@ -3141,7 +3147,6 @@ if [[ ${CHOST} == *-linux-* ]] ; then [[ -z ${dist} ]] && dist=${ID} [[ -z ${dist} ]] && dist=${NAME} [[ -z ${rel} ]] && rel=${VERSION_ID} - fi [[ -z ${dist} ]] && dist=linux