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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 67D1E13835B for ; Sat, 3 Apr 2021 22:10:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87C39E088A; Sat, 3 Apr 2021 22:10:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 64C13E088A for ; Sat, 3 Apr 2021 22:10:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BEEE6340B81 for ; Sat, 3 Apr 2021 22:10:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4AF4E636 for ; Sat, 3 Apr 2021 22:10:33 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1617487815.c8de8474d60db06f2cb98b4a06b32d09a526fb44.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust-bin/rust-bin-1.46.0.ebuild dev-lang/rust-bin/rust-bin-1.47.0-r1.ebuild dev-lang/rust-bin/rust-bin-1.48.0.ebuild dev-lang/rust-bin/rust-bin-1.49.0.ebuild dev-lang/rust-bin/rust-bin-1.50.0.ebuild dev-lang/rust-bin/rust-bin-1.51.0.ebuild X-VCS-Directories: dev-lang/rust-bin/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: c8de8474d60db06f2cb98b4a06b32d09a526fb44 X-VCS-Branch: master Date: Sat, 3 Apr 2021 22:10:33 +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: e6cfff2f-61b4-42e7-bb92-508cfc5cf4fd X-Archives-Hash: 6f8734b389d48ded4341b850bdd49456 commit: c8de8474d60db06f2cb98b4a06b32d09a526fb44 Author: Yiyang Wu gmail com> AuthorDate: Tue Mar 23 03:47:27 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Sat Apr 3 22:10:15 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8de8474 dev-lang/rust-bin: change interpreter for RAP (Gentoo prefix) Use patchelf to change interpreter to the ld.so inside prefix This fixes "GLIBC_*.*" not found bug when building with rust Package-Manager: Portage-3.0.17, Repoman-3.0.2 Closes: https://bugs.gentoo.org/739574 Closes: https://github.com/gentoo/gentoo/pull/20073 Signed-off-by: Yiyang Wu gmail.com> Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust-bin/rust-bin-1.46.0.ebuild | 25 +++++++++++++++++++++++-- dev-lang/rust-bin/rust-bin-1.47.0-r1.ebuild | 25 +++++++++++++++++++++++-- dev-lang/rust-bin/rust-bin-1.48.0.ebuild | 25 +++++++++++++++++++++++-- dev-lang/rust-bin/rust-bin-1.49.0.ebuild | 25 +++++++++++++++++++++++-- dev-lang/rust-bin/rust-bin-1.50.0.ebuild | 25 +++++++++++++++++++++++-- dev-lang/rust-bin/rust-bin-1.51.0.ebuild | 25 +++++++++++++++++++++++-- 6 files changed, 138 insertions(+), 12 deletions(-) diff --git a/dev-lang/rust-bin/rust-bin-1.46.0.ebuild b/dev-lang/rust-bin/rust-bin-1.46.0.ebuild index afa746bd1cb..cafc3fe0828 100644 --- a/dev-lang/rust-bin/rust-bin-1.46.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.46.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs multilib-minimal MY_P="rust-${PV}" @@ -14,10 +14,11 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})" LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="stable" KEYWORDS="amd64 arm arm64 ppc64 x86" -IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" DEPEND="" RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND="prefix? ( dev-util/patchelf )" REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" @@ -40,6 +41,16 @@ src_unpack() { mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die } +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + multilib_src_install() { if multilib_is_native_abi; then @@ -61,6 +72,16 @@ multilib_src_install() { --disable-ldconfig \ || die + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + local rustc=rustc-bin-${PV} local rustdoc=rustdoc-bin-${PV} local rustgdb=rust-gdb-bin-${PV} diff --git a/dev-lang/rust-bin/rust-bin-1.47.0-r1.ebuild b/dev-lang/rust-bin/rust-bin-1.47.0-r1.ebuild index f8a6a6b2ddb..a700c7022ff 100644 --- a/dev-lang/rust-bin/rust-bin-1.47.0-r1.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.47.0-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs multilib-minimal MY_P="rust-${PV}" @@ -14,10 +14,11 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})" LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="stable" KEYWORDS="amd64 arm arm64 ppc64 x86" -IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" DEPEND="" RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND="prefix? ( dev-util/patchelf )" REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" @@ -39,6 +40,16 @@ src_unpack() { mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die } +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + multilib_src_install() { if multilib_is_native_abi; then @@ -60,6 +71,16 @@ multilib_src_install() { --disable-ldconfig \ || die + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + local symlinks=( cargo rustc diff --git a/dev-lang/rust-bin/rust-bin-1.48.0.ebuild b/dev-lang/rust-bin/rust-bin-1.48.0.ebuild index df9fff31cfd..79ddf1a8db5 100644 --- a/dev-lang/rust-bin/rust-bin-1.48.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.48.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs multilib-minimal MY_P="rust-${PV}" @@ -14,10 +14,11 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})" LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="stable" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" DEPEND="" RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND="prefix? ( dev-util/patchelf )" REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" @@ -39,6 +40,16 @@ src_unpack() { mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die } +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + multilib_src_install() { if multilib_is_native_abi; then @@ -60,6 +71,16 @@ multilib_src_install() { --disable-ldconfig \ || die + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + local symlinks=( cargo rustc diff --git a/dev-lang/rust-bin/rust-bin-1.49.0.ebuild b/dev-lang/rust-bin/rust-bin-1.49.0.ebuild index df9fff31cfd..79ddf1a8db5 100644 --- a/dev-lang/rust-bin/rust-bin-1.49.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.49.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs multilib-minimal MY_P="rust-${PV}" @@ -14,10 +14,11 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})" LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="stable" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" DEPEND="" RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND="prefix? ( dev-util/patchelf )" REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" @@ -39,6 +40,16 @@ src_unpack() { mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die } +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + multilib_src_install() { if multilib_is_native_abi; then @@ -60,6 +71,16 @@ multilib_src_install() { --disable-ldconfig \ || die + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + local symlinks=( cargo rustc diff --git a/dev-lang/rust-bin/rust-bin-1.50.0.ebuild b/dev-lang/rust-bin/rust-bin-1.50.0.ebuild index 403dbcaf3fc..137bfca5f95 100644 --- a/dev-lang/rust-bin/rust-bin-1.50.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.50.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs multilib-minimal MY_P="rust-${PV}" @@ -14,10 +14,11 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})" LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="stable" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" DEPEND="" RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND="prefix? ( dev-util/patchelf )" REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" @@ -40,6 +41,16 @@ src_unpack() { mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die } +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + multilib_src_install() { if multilib_is_native_abi; then @@ -61,6 +72,16 @@ multilib_src_install() { --disable-ldconfig \ || die + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + local symlinks=( cargo rustc diff --git a/dev-lang/rust-bin/rust-bin-1.51.0.ebuild b/dev-lang/rust-bin/rust-bin-1.51.0.ebuild index 403dbcaf3fc..137bfca5f95 100644 --- a/dev-lang/rust-bin/rust-bin-1.51.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.51.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs multilib-minimal MY_P="rust-${PV}" @@ -14,10 +14,11 @@ SRC_URI="$(rust_all_arch_uris ${MY_P})" LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="stable" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" DEPEND="" RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND="prefix? ( dev-util/patchelf )" REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" @@ -40,6 +41,16 @@ src_unpack() { mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die } +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + multilib_src_install() { if multilib_is_native_abi; then @@ -61,6 +72,16 @@ multilib_src_install() { --disable-ldconfig \ || die + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + local symlinks=( cargo rustc