commit: 23dd6f9f869621138b9789c13b393e6f96f3ceb8 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Nov 15 00:45:53 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Nov 15 00:50:45 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23dd6f9f
sys-apps/util-linux: make librtas conditional on USE=rtas It's not _always_ useful on PPC*. Let's set the cache variable in the build system based on a USE flag instead. (It also led to some sandbox issues being noticed with 'lscpu', which have been fixed separately in librtas now.) Closes: https://bugs.gentoo.org/722424 Bug: https://bugs.gentoo.org/705544 Signed-off-by: Sam James <sam <AT> gentoo.org> profiles/arch/base/package.use.mask | 4 ++++ profiles/arch/powerpc/package.use.mask | 4 ++++ sys-apps/util-linux/metadata.xml | 1 + sys-apps/util-linux/util-linux-2.37.2-r1.ebuild | 8 +++++--- sys-apps/util-linux/util-linux-9999.ebuild | 8 +++++--- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/profiles/arch/base/package.use.mask b/profiles/arch/base/package.use.mask index 41c7b0ecd2d3..4267075d6b0b 100644 --- a/profiles/arch/base/package.use.mask +++ b/profiles/arch/base/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Sam James <s...@gentoo.org> (2021-11-15) +# Only available on PPC*. +sys-apps/util-linux rtas + # Georgy Yakovlev <gyakov...@gentoo.org> (2021-11-01) # requires sys-apps/dbus-broker, which is not widely keyworded yet. sys-apps/systemd hostnamed-fallback diff --git a/profiles/arch/powerpc/package.use.mask b/profiles/arch/powerpc/package.use.mask index 3f3ccbe0567a..00d12c44c858 100644 --- a/profiles/arch/powerpc/package.use.mask +++ b/profiles/arch/powerpc/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Sam James <s...@gentoo.org> (2021-11-15) +# librtas is available on (only) ppc* +sys-apps/util-linux -rtas + # Michael Seifert <m.seif...@digitalernachschub.de> (2021-10-23) # dev-python/furo isn't keyworded here dev-python/argon2-cffi doc diff --git a/sys-apps/util-linux/metadata.xml b/sys-apps/util-linux/metadata.xml index 6d41d90fe50a..140ce7d62535 100644 --- a/sys-apps/util-linux/metadata.xml +++ b/sys-apps/util-linux/metadata.xml @@ -15,6 +15,7 @@ <flag name="kill">build the kill program</flag> <flag name="logger">build the logger program</flag> <flag name="pam">build runuser helper</flag> + <flag name="rtas">Add support for the Run Time Abstraction Services (RTAS)</flag> <flag name="su">build the su program</flag> <flag name="suid"> install mount/umount as setuid so non-root users may mount/umount devices, diff --git a/sys-apps/util-linux/util-linux-2.37.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.37.2-r1.ebuild index fc7d384e57b1..46c6b0ce7ed2 100644 --- a/sys-apps/util-linux/util-linux-2.37.2-r1.ebuild +++ b/sys-apps/util-linux/util-linux-2.37.2-r1.ebuild @@ -25,7 +25,7 @@ HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/ LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain" SLOT="0" -IUSE="audit build caps +cramfs cryptsetup fdformat +hardlink kill +logger magic ncurses nls pam python +readline selinux slang static-libs su +suid systemd test tty-helpers udev unicode userland_GNU" +IUSE="audit build caps +cramfs cryptsetup fdformat +hardlink kill +logger magic ncurses nls pam python +readline rtas selinux slang static-libs su +suid systemd test tty-helpers udev unicode userland_GNU" # Most lib deps here are related to programs rather than our libs, # so we rarely need to specify ${MULTILIB_USEDEP}. @@ -42,10 +42,9 @@ RDEPEND=" ) nls? ( virtual/libintl[${MULTILIB_USEDEP}] ) pam? ( sys-libs/pam ) - ppc? ( sys-libs/librtas ) - ppc64? ( sys-libs/librtas ) python? ( ${PYTHON_DEPS} ) readline? ( sys-libs/readline:0= ) + rtas? ( sys-libs/librtas ) selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) slang? ( sys-libs/slang ) !build? ( systemd? ( sys-apps/systemd ) ) @@ -160,6 +159,9 @@ multilib_src_configure() { export NCURSES6_CONFIG=false NCURSES5_CONFIG=false export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false + # Avoid automagic dependency on ppc* + export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas) + # configure args shared by python and non-python builds local commonargs=( --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild index 3b364c69d425..8f1152f9d80f 100644 --- a/sys-apps/util-linux/util-linux-9999.ebuild +++ b/sys-apps/util-linux/util-linux-9999.ebuild @@ -25,7 +25,7 @@ HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/ LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain" SLOT="0" -IUSE="audit build caps +cramfs cryptsetup fdformat +hardlink kill +logger magic ncurses nls pam python +readline selinux slang static-libs su +suid systemd test tty-helpers udev unicode userland_GNU" +IUSE="audit build caps +cramfs cryptsetup fdformat +hardlink kill +logger magic ncurses nls pam python +readline rtas selinux slang static-libs su +suid systemd test tty-helpers udev unicode userland_GNU" # Most lib deps here are related to programs rather than our libs, # so we rarely need to specify ${MULTILIB_USEDEP}. @@ -42,10 +42,9 @@ RDEPEND=" ) nls? ( virtual/libintl[${MULTILIB_USEDEP}] ) pam? ( sys-libs/pam ) - ppc? ( sys-libs/librtas ) - ppc64? ( sys-libs/librtas ) python? ( ${PYTHON_DEPS} ) readline? ( sys-libs/readline:0= ) + rtas? ( sys-libs/librtas ) selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) slang? ( sys-libs/slang ) !build? ( systemd? ( sys-apps/systemd ) ) @@ -155,6 +154,9 @@ multilib_src_configure() { export NCURSES6_CONFIG=false NCURSES5_CONFIG=false export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false + # Avoid automagic dependency on ppc* + export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas) + # configure args shared by python and non-python builds local commonargs=( --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"