* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2024-05-09 23:48 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-05-09 23:48 UTC (permalink / raw
To: gentoo-commits
commit: 575b2c990c42dca1c38973906f9839c3c0efbf06
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 9 23:47:48 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 9 23:47:48 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=575b2c99
sys-apps/util-linux: backport umount --read-only fix to 2.39.x
Bug: https://bugs.gentoo.org/573760
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/util-linux-2.39.4-umount-readonly.patch | 35 ++
sys-apps/util-linux/util-linux-2.39.4-r1.ebuild | 417 +++++++++++++++++++++
2 files changed, 452 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.39.4-umount-readonly.patch b/sys-apps/util-linux/files/util-linux-2.39.4-umount-readonly.patch
new file mode 100644
index 000000000000..57c8903348af
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.4-umount-readonly.patch
@@ -0,0 +1,35 @@
+https://github.com/util-linux/util-linux/commit/9ba8eb5d89f0ebba8b3a542c041a5838e10a0d75
+https://bugs.gentoo.org/573760#c11
+
+From 9ba8eb5d89f0ebba8b3a542c041a5838e10a0d75 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Tue, 23 Apr 2024 10:29:37 +0200
+Subject: [PATCH] libmount: fix umount --read-only
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported-by: Krzysztof Olędzki <ole@ans.pl>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+(cherry picked from commit a20e7e23a8565e01b1c84de6924d1fbbdb1cfccc)
+--- a/libmount/src/context_umount.c
++++ b/libmount/src/context_umount.c
+@@ -267,6 +267,9 @@ static int lookup_umount_fs_by_statfs(struct libmnt_context *cxt, const char *tg
+ * So, let's use statfs() if possible (it's bad idea for --lazy/--force
+ * umounts as target is probably unreachable NFS, also for --detach-loop
+ * as this additionally needs to know the name of the loop device).
++ *
++ * For the "umount --read-only" command, we need to read the mountinfo
++ * to obtain the mount source.
+ */
+ if (mnt_context_is_restricted(cxt)
+ || *tgt != '/'
+@@ -275,6 +278,7 @@ static int lookup_umount_fs_by_statfs(struct libmnt_context *cxt, const char *tg
+ || mnt_context_is_lazy(cxt)
+ || mnt_context_is_nocanonicalize(cxt)
+ || mnt_context_is_loopdel(cxt)
++ || mnt_context_is_rdonly_umount(cxt)
+ || mnt_safe_stat(tgt, &st) != 0 || !S_ISDIR(st.st_mode)
+ || has_utab_entry(cxt, tgt))
+ return 1; /* not found */
+
diff --git a/sys-apps/util-linux/util-linux-2.39.4-r1.ebuild b/sys-apps/util-linux/util-linux-2.39.4-r1.ebuild
new file mode 100644
index 000000000000..0230482e78cd
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.39.4-r1.ebuild
@@ -0,0 +1,417 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-r1 multilib-minimal multiprocessing systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+ inherit autotools git-r3
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc
+ inherit verify-sig
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos"
+ fi
+
+ SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="
+ virtual/libcrypt:=
+ audit? ( >=sys-process/audit-2.6:= )
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib:= )
+ cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
+ hardlink? ( dev-libs/libpcre2:= )
+ ncurses? (
+ sys-libs/ncurses:=[unicode(+)?]
+ magic? ( sys-apps/file:0= )
+ )
+ nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
+ pam? ( sys-libs/pam )
+ 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 )
+ udev? ( virtual/libudev:= )
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ sys-devel/gettext
+ )
+ test? ( app-alternatives/bc )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ acct-group/root
+"
+RDEPEND+="
+ hardlink? ( !app-arch/hardlink )
+ logger? ( !>=app-admin/sysklogd-2.0[logger] )
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ su? (
+ !<sys-apps/shadow-4.7-r2
+ !>=sys-apps/shadow-4.7-r2[su]
+ )
+ !net-wireless/rfkill
+"
+
+if [[ ${PV} == 9999 ]] ; then
+ # Required for man-page generation
+ BDEPEND+=" dev-ruby/asciidoctor"
+else
+ BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.39.2-fincore-test.patch
+ "${FILESDIR}"/${PN}-2.39.2-backport-1d4456d.patch
+ "${FILESDIR}"/${PN}-2.39.3-musl-1.2.5-basename.patch
+ "${FILESDIR}"/${PN}-2.39.3-libmount-Fix-export-of-mnt_context_is_lazy-and-mnt_c.patch
+ "${FILESDIR}"/${PN}-2.39.3-fix-use-after-free.patch
+ "${FILESDIR}"/${PN}-2.39.4-umount-readonly.patch
+)
+
+pkg_pretend() {
+ if use su && ! use suid ; then
+ elog "su will be installed as suid despite USE=-suid (bug #832092)"
+ elog "To use su without suid, see e.g. Portage's suidctl feature."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ return
+ fi
+
+ if use verify-sig ; then
+ mkdir "${T}"/verify-sig || die
+ pushd "${T}"/verify-sig &>/dev/null || die
+
+ # Upstream sign the decompressed .tar
+ # Let's do it separately in ${T} then cleanup to avoid external
+ # effects on normal unpack.
+ cp "${DISTDIR}"/${MY_P}.tar.xz . || die
+ xz -d ${MY_P}.tar.xz || die
+ verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
+
+ popd &>/dev/null || die
+ rm -r "${T}"/verify-sig || die
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+
+ if use test ; then
+ # Known-failing tests
+ # TODO: investigate these
+ local known_failing_tests=(
+ # Subtest 'options-maximum-size-8192' fails
+ hardlink/options
+
+ # Fails in sandbox
+ lsns/ioctl_ns
+
+ lsfd/mkfds-symlink
+ lsfd/mkfds-rw-character-device
+ # Fails with network-sandbox at least in nspawn
+ lsfd/option-inet
+ utmp/last-ipv6
+ )
+
+ local known_failing_test
+ for known_failing_test in "${known_failing_tests[@]}" ; do
+ einfo "Removing known-failing test: ${known_failing_test}"
+ rm tests/ts/${known_failing_test} || die
+ done
+ fi
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+python_configure() {
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --disable-all-programs
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --with-python
+ --enable-libblkid
+ --enable-libmount
+ --enable-pylibmount
+ )
+
+ mkdir "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+ popd >/dev/null || die
+}
+
+multilib_src_configure() {
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. bug #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+
+ # bug #485486
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
+ # bug #545042
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
+
+ # Undo bad ncurses handling by upstream. Fall back to pkg-config.
+ # bug #601530
+ 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=(
+ --localstatedir="${EPREFIX}/var"
+ --runstatedir="${EPREFIX}/run"
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+
+ # Temporary workaround until ~2.39.2. 2.39.x introduced a big rewrite.
+ # https://github.com/util-linux/util-linux/issues/2287#issuecomment-1576640373
+ --disable-libmount-mountfd-support
+ )
+
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --without-python
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(multilib_native_use_with audit)
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable nls)
+ $(use_enable nls poman)
+ $(use_enable unicode widechar)
+ $(use_enable static-libs static)
+ $(use_with ncurses tinfo)
+ $(use_with selinux)
+
+ # TODO: Wire this up (bug #931118)
+ --without-econf
+ )
+
+ if use build ; then
+ myeconfargs+=(
+ --without-systemd
+ --without-udev
+ )
+ else
+ myeconfargs+=(
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ )
+ fi
+
+ if multilib_is_native_abi ; then
+ myeconfargs+=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-newgrp
+ --disable-nologin
+ --disable-pylibmount
+ --disable-raw
+ --disable-vipw
+ --enable-agetty
+ --enable-bash-completion
+ --enable-line
+ --enable-partx
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(use_enable caps setpriv)
+ $(use_enable cramfs)
+ $(use_enable fdformat)
+ $(use_enable hardlink)
+ $(use_enable kill)
+ $(use_enable logger)
+ $(use_enable ncurses pg)
+ $(use_enable su)
+ $(use_enable tty-helpers mesg)
+ $(use_enable tty-helpers wall)
+ $(use_enable tty-helpers write)
+ $(use_with cryptsetup)
+ )
+ if [[ ${PV} == *9999 ]] ; then
+ myeconfargs+=( --enable-asciidoc )
+ else
+ # Upstream is shipping pre-generated man-pages for releases
+ myeconfargs+=( --disable-asciidoc )
+ fi
+ else
+ myeconfargs+=(
+ --disable-all-programs
+ --disable-asciidoc
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --disable-poman
+
+ # build libraries
+ --enable-libuuid
+ --enable-libblkid
+ --enable-libsmartcols
+ --enable-libfdisk
+ --enable-libmount
+ )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ append-lfs-flags
+ multilib-minimal_src_configure
+}
+
+python_compile() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake all
+ popd >/dev/null || die
+}
+
+multilib_src_compile() {
+ emake all
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_compile
+ fi
+}
+
+python_test() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ popd >/dev/null || die
+}
+
+multilib_src_test() {
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_test
+ fi
+}
+
+python_install() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake DESTDIR="${D}" install
+ python_optimize
+ popd >/dev/null || die
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_install
+ fi
+
+ # This needs to be called AFTER python_install call, bug #689190
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ dosym hexdump /usr/bin/hd
+ newman - hd.1 <<< '.so man1/hexdump.1'
+
+ # e2fsprogs-libs didn't install .la files, and .pc work fine
+ find "${ED}" -name "*.la" -delete || die
+
+ if use pam ; then
+ # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+
+ newpamd "${FILESDIR}/su-l.pamd" su-l
+ fi
+
+ if use su && ! use suid ; then
+ # Always force suid su, even when USE=-suid, as su is useless
+ # for the overwhelming-majority case without suid.
+ # Users who wish to truly have a no-suid su can strip it out
+ # via e.g. Portage's suidctl or some other hook.
+ # See bug #832092
+ fperms u+s /bin/su
+ fi
+
+ # Note:
+ # Bash completion for "runuser" command is provided by same file which
+ # would also provide bash completion for "su" command. However, we don't
+ # use "su" command from this package.
+ # This triggers a known QA warning which we ignore for now to magically
+ # keep bash completion for "su" command which shadow package does not
+ # provide.
+
+ local ver=$(tools/git-version-gen .tarballversion)
+ local major=$(ver_cut 1 ${ver})
+ local minor=$(ver_cut 2 ${ver})
+ local release=$(ver_cut 3 ${ver})
+ export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}"
+}
+
+pkg_postinst() {
+ if ! use tty-helpers ; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2024-05-20 17:34 Mike Gilbert
0 siblings, 0 replies; 27+ messages in thread
From: Mike Gilbert @ 2024-05-20 17:34 UTC (permalink / raw
To: gentoo-commits
commit: 7ddfccad678873273113f79167393d738c53f4b4
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 16:04:30 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon May 20 17:34:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ddfccad
sys-apps/util-linux: init script tweaks
Set command_args_foreground="-FP".
Set command_user=uuidd.
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/util-linux/files/uuidd.initd | 2 ++
.../{util-linux-2.40.1-r2.ebuild => util-linux-2.40.1-r3.ebuild} | 0
2 files changed, 2 insertions(+)
diff --git a/sys-apps/util-linux/files/uuidd.initd b/sys-apps/util-linux/files/uuidd.initd
index b1e7e563b297..3ddedc3f3b7f 100644
--- a/sys-apps/util-linux/files/uuidd.initd
+++ b/sys-apps/util-linux/files/uuidd.initd
@@ -3,6 +3,8 @@
# Distributed under the terms of the GNU General Public License v2
command=/usr/sbin/uuidd
+command_args_foreground="-FP"
+command_user=uuidd
pidfile=/run/uuidd/uuidd.pid
depend() {
diff --git a/sys-apps/util-linux/util-linux-2.40.1-r2.ebuild b/sys-apps/util-linux/util-linux-2.40.1-r3.ebuild
similarity index 100%
rename from sys-apps/util-linux/util-linux-2.40.1-r2.ebuild
rename to sys-apps/util-linux/util-linux-2.40.1-r3.ebuild
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2024-03-28 16:44 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-03-28 16:44 UTC (permalink / raw
To: gentoo-commits
commit: 5af27a0a2b08e0035abb6a7e080aaa27cf80ce63
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 28 16:42:03 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 16:42:03 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5af27a0a
sys-apps/util-linux: backport fix for CVE-2024-28085
Bug: https://bugs.gentoo.org/927980
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/util-linux-2.39.3-CVE-2024-28085.patch | 25 ++
sys-apps/util-linux/util-linux-2.39.3-r6.ebuild | 415 +++++++++++++++++++++
2 files changed, 440 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.39.3-CVE-2024-28085.patch b/sys-apps/util-linux/files/util-linux-2.39.3-CVE-2024-28085.patch
new file mode 100644
index 000000000000..99092c05aa7e
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.3-CVE-2024-28085.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/927980
+https://people.rit.edu/sjf5462/6831711781/wall_2_27_2024.txt
+https://github.com/util-linux/util-linux/commit/404b0781f52f7c045ca811b2dceec526408ac253
+
+From 404b0781f52f7c045ca811b2dceec526408ac253 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 21 Mar 2024 11:16:20 +0100
+Subject: [PATCH] wall: fix escape sequence Injection [CVE-2024-28085]
+
+Let's use for all cases the same output function.
+
+Reported-by: Skyler Ferrante <sjf5462@rit.edu>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+--- a/term-utils/wall.c
++++ b/term-utils/wall.c
+@@ -368,7 +368,7 @@ static char *makemsg(char *fname, char **mvec, int mvecsz,
+ int i;
+
+ for (i = 0; i < mvecsz; i++) {
+- fputs(mvec[i], fs);
++ fputs_careful(mvec[i], fs, '^', true, TERM_WIDTH);
+ if (i < mvecsz - 1)
+ fputc(' ', fs);
+ }
+
diff --git a/sys-apps/util-linux/util-linux-2.39.3-r6.ebuild b/sys-apps/util-linux/util-linux-2.39.3-r6.ebuild
new file mode 100644
index 000000000000..256c7ca3c751
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.39.3-r6.ebuild
@@ -0,0 +1,415 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-r1 multilib-minimal multiprocessing systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+ inherit autotools git-r3
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc
+ inherit verify-sig
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos"
+ fi
+
+ SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="
+ virtual/libcrypt:=
+ audit? ( >=sys-process/audit-2.6:= )
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib:= )
+ cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
+ hardlink? ( dev-libs/libpcre2:= )
+ ncurses? (
+ sys-libs/ncurses:=[unicode(+)?]
+ magic? ( sys-apps/file:0= )
+ )
+ nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
+ pam? ( sys-libs/pam )
+ 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 )
+ udev? ( virtual/libudev:= )
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ sys-devel/gettext
+ )
+ test? ( app-alternatives/bc )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ acct-group/root
+"
+RDEPEND+="
+ hardlink? ( !app-arch/hardlink )
+ logger? ( !>=app-admin/sysklogd-2.0[logger] )
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ su? (
+ !<sys-apps/shadow-4.7-r2
+ !>=sys-apps/shadow-4.7-r2[su]
+ )
+ !net-wireless/rfkill
+"
+
+if [[ ${PV} == 9999 ]] ; then
+ # Required for man-page generation
+ BDEPEND+=" dev-ruby/asciidoctor"
+else
+ BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.39.2-fincore-test.patch
+ "${FILESDIR}"/${PN}-2.39.2-backport-pr2251.patch
+ "${FILESDIR}"/${PN}-2.39.2-backport-1d4456d.patch
+ "${FILESDIR}"/${PN}-2.39.3-libblkid-luks.patch
+ "${FILESDIR}"/${PN}-2.39.3-musl-1.2.5-basename.patch
+ "${FILESDIR}"/${PN}-2.39.3-libmount-Fix-export-of-mnt_context_is_lazy-and-mnt_c.patch
+ "${FILESDIR}"/${PN}-2.39.3-CVE-2024-28085.patch
+)
+
+pkg_pretend() {
+ if use su && ! use suid ; then
+ elog "su will be installed as suid despite USE=-suid (bug #832092)"
+ elog "To use su without suid, see e.g. Portage's suidctl feature."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ return
+ fi
+
+ if use verify-sig ; then
+ mkdir "${T}"/verify-sig || die
+ pushd "${T}"/verify-sig &>/dev/null || die
+
+ # Upstream sign the decompressed .tar
+ # Let's do it separately in ${T} then cleanup to avoid external
+ # effects on normal unpack.
+ cp "${DISTDIR}"/${MY_P}.tar.xz . || die
+ xz -d ${MY_P}.tar.xz || die
+ verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
+
+ popd &>/dev/null || die
+ rm -r "${T}"/verify-sig || die
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+
+ if use test ; then
+ # Known-failing tests
+ # TODO: investigate these
+ local known_failing_tests=(
+ # Subtest 'options-maximum-size-8192' fails
+ hardlink/options
+
+ # Fails in sandbox
+ lsns/ioctl_ns
+
+ lsfd/mkfds-symlink
+ lsfd/mkfds-rw-character-device
+ # Fails with network-sandbox at least in nspawn
+ lsfd/option-inet
+ utmp/last-ipv6
+ )
+
+ local known_failing_test
+ for known_failing_test in "${known_failing_tests[@]}" ; do
+ einfo "Removing known-failing test: ${known_failing_test}"
+ rm tests/ts/${known_failing_test} || die
+ done
+ fi
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+python_configure() {
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --disable-all-programs
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --with-python
+ --enable-libblkid
+ --enable-libmount
+ --enable-pylibmount
+ )
+
+ mkdir "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+ popd >/dev/null || die
+}
+
+multilib_src_configure() {
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. bug #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+
+ # bug #485486
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
+ # bug #545042
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
+
+ # Undo bad ncurses handling by upstream. Fall back to pkg-config.
+ # bug #601530
+ 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=(
+ --localstatedir="${EPREFIX}/var"
+ --runstatedir="${EPREFIX}/run"
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+
+ # Temporary workaround until ~2.39.2. 2.39.x introduced a big rewrite.
+ # https://github.com/util-linux/util-linux/issues/2287#issuecomment-1576640373
+ --disable-libmount-mountfd-support
+ )
+
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --without-python
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(multilib_native_use_with audit)
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable nls)
+ $(use_enable nls poman)
+ $(use_enable unicode widechar)
+ $(use_enable static-libs static)
+ $(use_with ncurses tinfo)
+ $(use_with selinux)
+ )
+
+ if use build ; then
+ myeconfargs+=(
+ --without-systemd
+ --without-udev
+ )
+ else
+ myeconfargs+=(
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ )
+ fi
+
+ if multilib_is_native_abi ; then
+ myeconfargs+=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-newgrp
+ --disable-nologin
+ --disable-pylibmount
+ --disable-raw
+ --disable-vipw
+ --enable-agetty
+ --enable-bash-completion
+ --enable-line
+ --enable-partx
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(use_enable caps setpriv)
+ $(use_enable cramfs)
+ $(use_enable fdformat)
+ $(use_enable hardlink)
+ $(use_enable kill)
+ $(use_enable logger)
+ $(use_enable ncurses pg)
+ $(use_enable su)
+ $(use_enable tty-helpers mesg)
+ $(use_enable tty-helpers wall)
+ $(use_enable tty-helpers write)
+ $(use_with cryptsetup)
+ )
+ if [[ ${PV} == *9999 ]] ; then
+ myeconfargs+=( --enable-asciidoc )
+ else
+ # Upstream is shipping pre-generated man-pages for releases
+ myeconfargs+=( --disable-asciidoc )
+ fi
+ else
+ myeconfargs+=(
+ --disable-all-programs
+ --disable-asciidoc
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --disable-poman
+
+ # build libraries
+ --enable-libuuid
+ --enable-libblkid
+ --enable-libsmartcols
+ --enable-libfdisk
+ --enable-libmount
+ )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ append-lfs-flags
+ multilib-minimal_src_configure
+}
+
+python_compile() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake all
+ popd >/dev/null || die
+}
+
+multilib_src_compile() {
+ emake all
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_compile
+ fi
+}
+
+python_test() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ popd >/dev/null || die
+}
+
+multilib_src_test() {
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_test
+ fi
+}
+
+python_install() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake DESTDIR="${D}" install
+ python_optimize
+ popd >/dev/null || die
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_install
+ fi
+
+ # This needs to be called AFTER python_install call, bug #689190
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ dosym hexdump /usr/bin/hd
+ newman - hd.1 <<< '.so man1/hexdump.1'
+
+ # e2fsprogs-libs didn't install .la files, and .pc work fine
+ find "${ED}" -name "*.la" -delete || die
+
+ if use pam ; then
+ # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+
+ newpamd "${FILESDIR}/su-l.pamd" su-l
+ fi
+
+ if use su && ! use suid ; then
+ # Always force suid su, even when USE=-suid, as su is useless
+ # for the overwhelming-majority case without suid.
+ # Users who wish to truly have a no-suid su can strip it out
+ # via e.g. Portage's suidctl or some other hook.
+ # See bug #832092
+ fperms u+s /bin/su
+ fi
+
+ # Note:
+ # Bash completion for "runuser" command is provided by same file which
+ # would also provide bash completion for "su" command. However, we don't
+ # use "su" command from this package.
+ # This triggers a known QA warning which we ignore for now to magically
+ # keep bash completion for "su" command which shadow package does not
+ # provide.
+
+ local ver=$(tools/git-version-gen .tarballversion)
+ local major=$(ver_cut 1 ${ver})
+ local minor=$(ver_cut 2 ${ver})
+ local release=$(ver_cut 3 ${ver})
+ export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}"
+}
+
+pkg_postinst() {
+ if ! use tty-helpers ; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2024-03-18 13:43 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-03-18 13:43 UTC (permalink / raw
To: gentoo-commits
commit: 5f364406d48c2e886059080044c3259a14d4bb5a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 18 13:34:04 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 18 13:42:49 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f364406
sys-apps/util-linux: backport fix for LVM2 metadata parsing, basename w/ musl-1.2.5
Closes: https://bugs.gentoo.org/926293
Closes: https://bugs.gentoo.org/926950
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/util-linux-2.39.3-libblkid-luks.patch | 40 ++
.../util-linux-2.39.3-musl-1.2.5-basename.patch | 56 +++
sys-apps/util-linux/util-linux-2.39.3-r4.ebuild | 413 +++++++++++++++++++++
3 files changed, 509 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.39.3-libblkid-luks.patch b/sys-apps/util-linux/files/util-linux-2.39.3-libblkid-luks.patch
new file mode 100644
index 000000000000..222243426d5e
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.3-libblkid-luks.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/926950
+https://gitlab.com/lvmteam/lvm2/-/issues/11
+https://bugzilla.opensuse.org/show_bug.cgi?id=1213227
+https://github.com/util-linux/util-linux/pull/2373
+https://github.com/util-linux/util-linux/commit/93ba7961779789217a1f814ce3110ff8c040c8c3
+
+From 93ba7961779789217a1f814ce3110ff8c040c8c3 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fvogt@suse.de>
+Date: Wed, 12 Jul 2023 15:48:27 +0200
+Subject: [PATCH] Revert "libblkid: try LUKS2 first when probing"
+
+mdadm superblocks before 1.1 are placed at the end of the device, which
+means that the data contained inside the array starts at offset 0. For
+LUKS inside MD, blkid falsely detects this as plain LUKS instead of a
+linux_raid_member. This causes e.g. dracut to not assemble the array
+during boot and system startup fails.
+
+This reverts commit b8889c0a214aeb3dd47bf1ab280fe5534b64d2aa.
+--- a/libblkid/src/superblocks/superblocks.c
++++ b/libblkid/src/superblocks/superblocks.c
+@@ -94,11 +94,6 @@ static int blkid_probe_set_usage(blkid_probe pr, int usage);
+ */
+ static const struct blkid_idinfo *idinfos[] =
+ {
+- /* In case the volume is locked with OPAL we are going to get
+- * an I/O error when reading past the LUKS header, so try it
+- * first. */
+- &luks_idinfo,
+-
+ /* RAIDs */
+ &linuxraid_idinfo,
+ &ddfraid_idinfo,
+@@ -124,6 +119,7 @@ static const struct blkid_idinfo *idinfos[] =
+ &snapcow_idinfo,
+ &verity_hash_idinfo,
+ &integrity_idinfo,
++ &luks_idinfo,
+ &vmfs_volume_idinfo,
+ &ubi_idinfo,
+ &vdo_idinfo,
diff --git a/sys-apps/util-linux/files/util-linux-2.39.3-musl-1.2.5-basename.patch b/sys-apps/util-linux/files/util-linux-2.39.3-musl-1.2.5-basename.patch
new file mode 100644
index 000000000000..519545e17088
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.3-musl-1.2.5-basename.patch
@@ -0,0 +1,56 @@
+https://bugs.gentoo.org/926293
+https://github.com/util-linux/util-linux/commit/77454e58d58f904cfdc02d3ca5bb65f1bd8739fc
+
+From 77454e58d58f904cfdc02d3ca5bb65f1bd8739fc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 3 Dec 2023 19:59:46 -0800
+Subject: [PATCH] login-utils: include libgen.h for basename API
+
+musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler
+
+include libgen.h for using the posix declaration of the funciton.
+
+Fixes
+
+../util-linux-2.39.2/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ 847 | shell_basename = basename(shell);
+ | ^
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/login-utils/su-common.c
++++ b/login-utils/su-common.c
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <libgen.h>
+ #include <security/pam_appl.h>
+ #ifdef HAVE_SECURITY_PAM_MISC_H
+ # include <security/pam_misc.h>
+@@ -840,17 +841,20 @@ static void run_shell(
+ su->simulate_login ? " login" : "",
+ su->fast_startup ? " fast-start" : ""));
+
++ char* tmp = xstrdup(shell);
+ if (su->simulate_login) {
+ char *arg0;
+ char *shell_basename;
+
+- shell_basename = basename(shell);
++ shell_basename = basename(tmp);
+ arg0 = xmalloc(strlen(shell_basename) + 2);
+ arg0[0] = '-';
+ strcpy(arg0 + 1, shell_basename);
+ args[0] = arg0;
+- } else
+- args[0] = basename(shell);
++ } else {
++ args[0] = basename(tmp);
++ }
++ free(tmp);
+
+ if (su->fast_startup)
+ args[argno++] = "-f";
+
diff --git a/sys-apps/util-linux/util-linux-2.39.3-r4.ebuild b/sys-apps/util-linux/util-linux-2.39.3-r4.ebuild
new file mode 100644
index 000000000000..ab8e27a235b6
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.39.3-r4.ebuild
@@ -0,0 +1,413 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ pam python-r1 multilib-minimal multiprocessing systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+ inherit autotools git-r3
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc
+ inherit verify-sig
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos"
+ fi
+
+ SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux"
+
+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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="
+ virtual/libcrypt:=
+ audit? ( >=sys-process/audit-2.6:= )
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib:= )
+ cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
+ hardlink? ( dev-libs/libpcre2:= )
+ ncurses? (
+ sys-libs/ncurses:=[unicode(+)?]
+ magic? ( sys-apps/file:0= )
+ )
+ nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
+ pam? ( sys-libs/pam )
+ 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 )
+ udev? ( virtual/libudev:= )
+ )
+"
+BDEPEND="
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ sys-devel/gettext
+ )
+ test? ( app-alternatives/bc )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ acct-group/root
+"
+RDEPEND+="
+ hardlink? ( !app-arch/hardlink )
+ logger? ( !>=app-admin/sysklogd-2.0[logger] )
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ su? (
+ !<sys-apps/shadow-4.7-r2
+ !>=sys-apps/shadow-4.7-r2[su]
+ )
+ !net-wireless/rfkill
+"
+
+if [[ ${PV} == 9999 ]] ; then
+ # Required for man-page generation
+ BDEPEND+=" dev-ruby/asciidoctor"
+else
+ BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.39.2-fincore-test.patch
+ "${FILESDIR}"/${PN}-2.39.2-backport-pr2251.patch
+ "${FILESDIR}"/${PN}-2.39.2-backport-1d4456d.patch
+ "${FILESDIR}"/${PN}-2.39.3-libblkid-luks.patch
+ "${FILESDIR}"/${PN}-2.39.3-musl-1.2.5-basename.patch
+)
+
+pkg_pretend() {
+ if use su && ! use suid ; then
+ elog "su will be installed as suid despite USE=-suid (bug #832092)"
+ elog "To use su without suid, see e.g. Portage's suidctl feature."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ return
+ fi
+
+ if use verify-sig ; then
+ mkdir "${T}"/verify-sig || die
+ pushd "${T}"/verify-sig &>/dev/null || die
+
+ # Upstream sign the decompressed .tar
+ # Let's do it separately in ${T} then cleanup to avoid external
+ # effects on normal unpack.
+ cp "${DISTDIR}"/${MY_P}.tar.xz . || die
+ xz -d ${MY_P}.tar.xz || die
+ verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
+
+ popd &>/dev/null || die
+ rm -r "${T}"/verify-sig || die
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+
+ if use test ; then
+ # Known-failing tests
+ # TODO: investigate these
+ local known_failing_tests=(
+ # Subtest 'options-maximum-size-8192' fails
+ hardlink/options
+
+ # Fails in sandbox
+ lsns/ioctl_ns
+
+ lsfd/mkfds-symlink
+ lsfd/mkfds-rw-character-device
+ # Fails with network-sandbox at least in nspawn
+ lsfd/option-inet
+ utmp/last-ipv6
+ )
+
+ local known_failing_test
+ for known_failing_test in "${known_failing_tests[@]}" ; do
+ einfo "Removing known-failing test: ${known_failing_test}"
+ rm tests/ts/${known_failing_test} || die
+ done
+ fi
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+python_configure() {
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --disable-all-programs
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --with-python
+ --enable-libblkid
+ --enable-libmount
+ --enable-pylibmount
+ )
+
+ mkdir "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+ popd >/dev/null || die
+}
+
+multilib_src_configure() {
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. bug #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+
+ # bug #485486
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
+ # bug #545042
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
+
+ # Undo bad ncurses handling by upstream. Fall back to pkg-config.
+ # bug #601530
+ 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=(
+ --localstatedir="${EPREFIX}/var"
+ --runstatedir="${EPREFIX}/run"
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+
+ # Temporary workaround until ~2.39.2. 2.39.x introduced a big rewrite.
+ # https://github.com/util-linux/util-linux/issues/2287#issuecomment-1576640373
+ --disable-libmount-mountfd-support
+ )
+
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --without-python
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(multilib_native_use_with audit)
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable nls)
+ $(use_enable nls poman)
+ $(use_enable unicode widechar)
+ $(use_enable static-libs static)
+ $(use_with ncurses tinfo)
+ $(use_with selinux)
+ )
+
+ if use build ; then
+ myeconfargs+=(
+ --without-systemd
+ --without-udev
+ )
+ else
+ myeconfargs+=(
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ )
+ fi
+
+ if multilib_is_native_abi ; then
+ myeconfargs+=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-newgrp
+ --disable-nologin
+ --disable-pylibmount
+ --disable-raw
+ --disable-vipw
+ --enable-agetty
+ --enable-bash-completion
+ --enable-line
+ --enable-partx
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(use_enable caps setpriv)
+ $(use_enable cramfs)
+ $(use_enable fdformat)
+ $(use_enable hardlink)
+ $(use_enable kill)
+ $(use_enable logger)
+ $(use_enable ncurses pg)
+ $(use_enable su)
+ $(use_enable tty-helpers mesg)
+ $(use_enable tty-helpers wall)
+ $(use_enable tty-helpers write)
+ $(use_with cryptsetup)
+ )
+ if [[ ${PV} == *9999 ]] ; then
+ myeconfargs+=( --enable-asciidoc )
+ else
+ # Upstream is shipping pre-generated man-pages for releases
+ myeconfargs+=( --disable-asciidoc )
+ fi
+ else
+ myeconfargs+=(
+ --disable-all-programs
+ --disable-asciidoc
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --disable-poman
+
+ # build libraries
+ --enable-libuuid
+ --enable-libblkid
+ --enable-libsmartcols
+ --enable-libfdisk
+ --enable-libmount
+ )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ append-lfs-flags
+ multilib-minimal_src_configure
+}
+
+python_compile() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake all
+ popd >/dev/null || die
+}
+
+multilib_src_compile() {
+ emake all
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_compile
+ fi
+}
+
+python_test() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ popd >/dev/null || die
+}
+
+multilib_src_test() {
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_test
+ fi
+}
+
+python_install() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake DESTDIR="${D}" install
+ python_optimize
+ popd >/dev/null || die
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_install
+ fi
+
+ # This needs to be called AFTER python_install call, bug #689190
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ dosym hexdump /usr/bin/hd
+ newman - hd.1 <<< '.so man1/hexdump.1'
+
+ # e2fsprogs-libs didn't install .la files, and .pc work fine
+ find "${ED}" -name "*.la" -delete || die
+
+ if use pam ; then
+ # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+
+ newpamd "${FILESDIR}/su-l.pamd" su-l
+ fi
+
+ if use su && ! use suid ; then
+ # Always force suid su, even when USE=-suid, as su is useless
+ # for the overwhelming-majority case without suid.
+ # Users who wish to truly have a no-suid su can strip it out
+ # via e.g. Portage's suidctl or some other hook.
+ # See bug #832092
+ fperms u+s /bin/su
+ fi
+
+ # Note:
+ # Bash completion for "runuser" command is provided by same file which
+ # would also provide bash completion for "su" command. However, we don't
+ # use "su" command from this package.
+ # This triggers a known QA warning which we ignore for now to magically
+ # keep bash completion for "su" command which shadow package does not
+ # provide.
+
+ local ver=$(tools/git-version-gen .tarballversion)
+ local major=$(ver_cut 1 ${ver})
+ local minor=$(ver_cut 2 ${ver})
+ local release=$(ver_cut 3 ${ver})
+ export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}"
+}
+
+pkg_postinst() {
+ if ! use tty-helpers ; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2023-12-29 1:03 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2023-12-29 1:03 UTC (permalink / raw
To: gentoo-commits
commit: 29e215dd7507b012a4111610f2157b744dc1e385
Author: Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk>
AuthorDate: Fri Dec 29 00:40:35 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 01:02:02 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29e215dd
sys-apps/util-linux: backport patch to build tests on hppa
See: https://github.com/util-linux/util-linux/commit/1d4456dd81a64a73685df9e5f1232d566818e453
Closes: https://bugs.gentoo.org/920904
Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Closes: https://github.com/gentoo/gentoo/pull/34526
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/util-linux-2.39.2-backport-1d4456d.patch | 33 ++++++++++++++++++++++
sys-apps/util-linux/util-linux-2.39.2-r1.ebuild | 1 +
sys-apps/util-linux/util-linux-2.39.3-r1.ebuild | 1 +
3 files changed, 35 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.39.2-backport-1d4456d.patch b/sys-apps/util-linux/files/util-linux-2.39.2-backport-1d4456d.patch
new file mode 100644
index 000000000000..3cce0bcab453
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.2-backport-1d4456d.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/920904
+https://github.com/util-linux/util-linux/commit/1d4456dd81a64a73685df9e5f1232d566818e453
+
+From 1d4456dd81a64a73685df9e5f1232d566818e453 Mon Sep 17 00:00:00 2001
+From: John David Anglin <dave@parisc-linux.org>
+Date: Mon, 7 Aug 2023 15:37:17 +0000
+Subject: [PATCH] enosys: fix build on hppa
+
+The following patch fixes the definition of SECCOMP_ARCH_NATIVE
+on hppa.
+
+Signed-off-by: John David Anglin <dave.anglin@bell.net>
+---
+ include/audit-arch.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/include/audit-arch.h b/include/audit-arch.h
+index 63d9eb52c1..f1354eec5d 100644
+--- a/include/audit-arch.h
++++ b/include/audit-arch.h
+@@ -57,6 +57,12 @@
+ # else
+ # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH64
+ # endif
++#elif __hppa__
++# if __SIZEOF_POINTER__ == 4
++# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PARISC
++# else
++# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PARISC64
++# endif
+ #else
+ # error Unknown target architecture
+ #endif
diff --git a/sys-apps/util-linux/util-linux-2.39.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.39.2-r1.ebuild
index f6d9af3560cd..28556848e5cd 100644
--- a/sys-apps/util-linux/util-linux-2.39.2-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.39.2-r1.ebuild
@@ -100,6 +100,7 @@ RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-2.39.2-fincore-test.patch
"${FILESDIR}"/${PN}-2.39.2-backport-pr2251.patch
+ "${FILESDIR}"/${PN}-2.39.2-backport-1d4456d.patch
)
pkg_pretend() {
diff --git a/sys-apps/util-linux/util-linux-2.39.3-r1.ebuild b/sys-apps/util-linux/util-linux-2.39.3-r1.ebuild
index dd2902dbc1f1..85b01bb6d900 100644
--- a/sys-apps/util-linux/util-linux-2.39.3-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.39.3-r1.ebuild
@@ -100,6 +100,7 @@ RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${PN}-2.39.2-fincore-test.patch
"${FILESDIR}"/${PN}-2.39.2-backport-pr2251.patch
+ "${FILESDIR}"/${PN}-2.39.2-backport-1d4456d.patch
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2023-11-15 10:39 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2023-11-15 10:39 UTC (permalink / raw
To: gentoo-commits
commit: 13688d9b6994558d6e78d6f9a80da685d8bd299b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 15 10:37:40 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 15 10:37:40 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13688d9b
sys-apps/util-linux: backport sparc test fix
Test-only fix. Thanks to glaubitz for the heads-up!
Closes: https://bugs.gentoo.org/627532
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/util-linux-2.39.2-fincore-test.patch | 23 ++++++++++++++++++++++
sys-apps/util-linux/util-linux-2.39.2.ebuild | 4 ++++
2 files changed, 27 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.39.2-fincore-test.patch b/sys-apps/util-linux/files/util-linux-2.39.2-fincore-test.patch
new file mode 100644
index 000000000000..f69876fe0a18
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.2-fincore-test.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/627532
+https://github.com/util-linux/util-linux/commit/f5715c117e727d4ff45e0d8568f188753620356e
+
+From f5715c117e727d4ff45e0d8568f188753620356e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Mon, 13 Nov 2023 21:05:59 +0100
+Subject: [PATCH] fincore: (tests) also use nosize error file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Link: https://lore.kernel.org/util-linux/b8cafd0d89878949705782312dfe800ec2779035.camel@physik.fu-berlin.de/
+Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
+--- a/tests/ts/fincore/count
++++ b/tests/ts/fincore/count
+@@ -107,6 +107,7 @@ if test -f "$TS_EXPECTED.$PAGE_SIZE"; then
+ OUT_COLUMNS="PAGES,SIZE,FILE"
+ else
+ TS_EXPECTED+=".nosize"
++ TS_EXPECTED_ERR+=".nosize"
+ OUT_COLUMNS="PAGES,FILE"
+ fi
+
diff --git a/sys-apps/util-linux/util-linux-2.39.2.ebuild b/sys-apps/util-linux/util-linux-2.39.2.ebuild
index 94d37237dd40..6655149f15a6 100644
--- a/sys-apps/util-linux/util-linux-2.39.2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.39.2.ebuild
@@ -95,6 +95,10 @@ fi
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.39.2-fincore-test.patch
+)
+
pkg_pretend() {
if use su && ! use suid ; then
elog "su will be installed as suid despite USE=-suid (bug #832092)"
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2023-08-03 19:03 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2023-08-03 19:03 UTC (permalink / raw
To: gentoo-commits
commit: 5a7839bf00b46ac9675d8e05998130d29e77135d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 3 19:02:43 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Aug 3 19:03:20 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a7839bf
sys-apps/util-linux: fix mount with older kernels (no statx); fix wall
Ended up backporting the wall fix as we need the mount w/ no statx
fix anyway.
Bug: https://bugs.gentoo.org/911336
Bug: https://github.com/util-linux/util-linux/issues/2409
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/util-linux-2.39.1-mount-no-statx.patch | 34 ++
.../files/util-linux-2.39.1-wall-no-tty.patch | 26 ++
sys-apps/util-linux/util-linux-2.39.1-r1.ebuild | 402 +++++++++++++++++++++
3 files changed, 462 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.39.1-mount-no-statx.patch b/sys-apps/util-linux/files/util-linux-2.39.1-mount-no-statx.patch
new file mode 100644
index 000000000000..02e8ef20c416
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.1-mount-no-statx.patch
@@ -0,0 +1,34 @@
+https://github.com/util-linux/util-linux/issues/2409
+https://github.com/util-linux/util-linux/commit/91c2cbdf3a04f2f3f4c4bb0d2a6053874bfa11ea
+
+From 91c2cbdf3a04f2f3f4c4bb0d2a6053874bfa11ea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Thu, 3 Aug 2023 07:13:28 +0200
+Subject: [PATCH] libmount: (utils) fix statx fallback
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If the systemcall is not available ENOSYS is returned.
+
+Under glibc the statx implementation also has its own fallback logic.
+As AT_STATX_DONT_SYNC can't be implemented correctly in that fallback
+logic the wrapper will return EINVAL in case the emulation is needed and
+AT_STATX_DONT_SYNC is set.
+So also use our own fallback in that case.
+
+Fixes: #2409
+Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
+--- a/libmount/src/utils.c
++++ b/libmount/src/utils.c
+@@ -133,7 +133,8 @@ static int safe_stat(const char *target, struct stat *st, int nofollow)
+ st->st_mode = stx.stx_mode;
+ }
+
+- if (rc == 0 || errno != EOPNOTSUPP)
++ if (rc == 0 ||
++ (errno != EOPNOTSUPP && errno != ENOSYS && errno != EINVAL))
+ return rc;
+ }
+ #endif
+
diff --git a/sys-apps/util-linux/files/util-linux-2.39.1-wall-no-tty.patch b/sys-apps/util-linux/files/util-linux-2.39.1-wall-no-tty.patch
new file mode 100644
index 000000000000..e95dbc358d33
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.1-wall-no-tty.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/911336
+https://github.com/util-linux/util-linux/pull/2412
+
+From 7d3713a6d541be0bac0bb78cc8fea1620583fd08 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 29 Jul 2023 17:32:57 -0400
+Subject: [PATCH] wall: do not error for ttys that do not exist
+
+Some wayland display managers (GDM) put strings like "seat0" in the
+ut_line field of utmp entries. These are not valid tty devices.
+
+Avoid writing a confusing error message for ttys that do not exist.
+
+Bug: https://bugs.gentoo.org/911336
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+--- a/term-utils/ttymsg.c
++++ b/term-utils/ttymsg.c
+@@ -100,7 +100,7 @@ ttymsg(struct iovec *iov, size_t iovcnt, char *line, int tmout) {
+ * if not running as root; not an error.
+ */
+ if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) {
+- if (errno == EBUSY || errno == EACCES)
++ if (errno == EBUSY || errno == EACCES || errno == ENOENT)
+ return NULL;
+
+ len = snprintf(errbuf, sizeof(errbuf), "%s: %m", device);
diff --git a/sys-apps/util-linux/util-linux-2.39.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.39.1-r1.ebuild
new file mode 100644
index 000000000000..f3add5efd6b6
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.39.1-r1.ebuild
@@ -0,0 +1,402 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
+ pam python-r1 multilib-minimal multiprocessing systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+ inherit autotools git-r3
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/karelzak.asc
+ inherit verify-sig
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos"
+ fi
+
+ SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux"
+
+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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="
+ virtual/libcrypt:=
+ audit? ( >=sys-process/audit-2.6:= )
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib:= )
+ cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
+ hardlink? ( dev-libs/libpcre2:= )
+ ncurses? (
+ sys-libs/ncurses:=[unicode(+)?]
+ magic? ( sys-apps/file:0= )
+ )
+ nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
+ pam? ( sys-libs/pam )
+ 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 ) )
+ udev? ( virtual/libudev:= )"
+BDEPEND="
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ sys-devel/gettext
+ )
+ test? ( sys-devel/bc )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ acct-group/root
+"
+RDEPEND+="
+ hardlink? ( !app-arch/hardlink )
+ logger? ( !>=app-admin/sysklogd-2.0[logger] )
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ su? (
+ !<sys-apps/shadow-4.7-r2
+ !>=sys-apps/shadow-4.7-r2[su]
+ )
+ !net-wireless/rfkill
+"
+
+if [[ ${PV} == 9999 ]] ; then
+ # Required for man-page generation
+ BDEPEND+=" dev-ruby/asciidoctor"
+else
+ BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.39.1-mount-no-statx.patch
+ "${FILESDIR}"/${PN}-2.39.1-wall-no-tty.patch
+)
+
+pkg_pretend() {
+ if use su && ! use suid ; then
+ elog "su will be installed as suid despite USE=-suid (bug #832092)"
+ elog "To use su without suid, see e.g. Portage's suidctl feature."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ return
+ fi
+
+ if use verify-sig ; then
+ mkdir "${T}"/verify-sig || die
+ pushd "${T}"/verify-sig &>/dev/null || die
+
+ # Upstream sign the decompressed .tar
+ # Let's do it separately in ${T} then cleanup to avoid external
+ # effects on normal unpack.
+ cp "${DISTDIR}"/${MY_P}.tar.xz . || die
+ xz -d ${MY_P}.tar.xz || die
+ verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
+
+ popd &>/dev/null || die
+ rm -r "${T}"/verify-sig || die
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+
+ if use test ; then
+ # Prevent uuidd test failure due to socket path limit, bug #593304
+ sed -i \
+ -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
+ tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
+
+ # Known-failing tests
+ # TODO: investigate these
+ local known_failing_tests=(
+ # Subtest 'options-maximum-size-8192' fails
+ hardlink/options
+
+ # Fails in sandbox
+ lsns/ioctl_ns
+
+ lsfd/mkfds-symlink
+ lsfd/mkfds-rw-character-device
+ )
+
+ local known_failing_test
+ for known_failing_test in "${known_failing_tests[@]}" ; do
+ einfo "Removing known-failing test: ${known_failing_test}"
+ rm tests/ts/${known_failing_test} || die
+ done
+
+ fi
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+python_configure() {
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --disable-all-programs
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --with-python
+ --enable-libblkid
+ --enable-libmount
+ --enable-pylibmount
+ )
+
+ mkdir "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+ popd >/dev/null || die
+}
+
+multilib_src_configure() {
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. bug #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+
+ # bug #485486
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
+ # bug #545042
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
+
+ # Undo bad ncurses handling by upstream. Fall back to pkg-config.
+ # bug #601530
+ 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=(
+ --localstatedir="${EPREFIX}/var"
+ --runstatedir="${EPREFIX}/run"
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+
+ # Temporary workaround until ~2.39.2. 2.39.x introduced a big rewrite.
+ # https://github.com/util-linux/util-linux/issues/2287#issuecomment-1576640373
+ --disable-libmount-mountfd-support
+ )
+
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --without-python
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(multilib_native_use_with audit)
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable nls)
+ $(use_enable nls poman)
+ $(use_enable unicode widechar)
+ $(use_enable static-libs static)
+ $(use_with ncurses tinfo)
+ $(use_with selinux)
+ )
+
+ if multilib_is_native_abi ; then
+ myeconfargs+=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-newgrp
+ --disable-nologin
+ --disable-pylibmount
+ --disable-raw
+ --disable-vipw
+ --enable-agetty
+ --enable-bash-completion
+ --enable-line
+ --enable-partx
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(use_enable caps setpriv)
+ $(use_enable cramfs)
+ $(use_enable fdformat)
+ $(use_enable hardlink)
+ $(use_enable kill)
+ $(use_enable logger)
+ $(use_enable ncurses pg)
+ $(use_enable su)
+ $(use_enable tty-helpers mesg)
+ $(use_enable tty-helpers wall)
+ $(use_enable tty-helpers write)
+ $(use_with cryptsetup)
+ )
+ if [[ ${PV} == *9999 ]] ; then
+ myeconfargs+=( --enable-asciidoc )
+ else
+ # Upstream is shipping pre-generated man-pages for releases
+ myeconfargs+=( --disable-asciidoc )
+ fi
+ else
+ myeconfargs+=(
+ --disable-all-programs
+ --disable-asciidoc
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --disable-poman
+
+ # build libraries
+ --enable-libuuid
+ --enable-libblkid
+ --enable-libsmartcols
+ --enable-libfdisk
+ --enable-libmount
+ )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ append-lfs-flags
+ multilib-minimal_src_configure
+}
+
+python_compile() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake all
+ popd >/dev/null || die
+}
+
+multilib_src_compile() {
+ emake all
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_compile
+ fi
+}
+
+python_test() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ popd >/dev/null || die
+}
+
+multilib_src_test() {
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_test
+ fi
+}
+
+python_install() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake DESTDIR="${D}" install
+ python_optimize
+ popd >/dev/null || die
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_install
+ fi
+
+ # This needs to be called AFTER python_install call, bug #689190
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi ; then
+ # Need the libs in /
+ gen_usr_ldscript -a blkid fdisk mount smartcols uuid
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didn't install .la files, and .pc work fine
+ find "${ED}" -name "*.la" -delete || die
+
+ if use pam ; then
+ # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+
+ newpamd "${FILESDIR}/su-l.pamd" su-l
+ fi
+
+ if use su && ! use suid ; then
+ # Always force suid su, even when USE=-suid, as su is useless
+ # for the overwhelming-majority case without suid.
+ # Users who wish to truly have a no-suid su can strip it out
+ # via e.g. Portage's suidctl or some other hook.
+ # See bug #832092
+ fperms u+s /bin/su
+ fi
+
+ # Note:
+ # Bash completion for "runuser" command is provided by same file which
+ # would also provide bash completion for "su" command. However, we don't
+ # use "su" command from this package.
+ # This triggers a known QA warning which we ignore for now to magically
+ # keep bash completion for "su" command which shadow package does not
+ # provide.
+
+ local ver=$(tools/git-version-gen .tarballversion)
+ local major=$(ver_cut 1 ${ver})
+ local minor=$(ver_cut 2 ${ver})
+ local release=$(ver_cut 3 ${ver})
+ export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}"
+}
+
+pkg_postinst() {
+ if ! use tty-helpers ; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2023-06-29 6:18 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2023-06-29 6:18 UTC (permalink / raw
To: gentoo-commits
commit: efd6ba4f2700a0d421ac88465d1f4a32e3505e84
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 29 06:17:04 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 29 06:17:17 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efd6ba4f
sys-apps/util-linux: drop 2.39-r4
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/util-linux/Manifest | 2 -
.../util-linux-2.39-check-for-mount_setattr.patch | 98 -----
.../util-linux-2.39-mount-dont-call-hooks.patch | 79 ----
.../util-linux-2.39-mount-parse-options-user.patch | 46 ---
.../util-linux-2.39-tests-for-mount_setattr.patch | 13 -
sys-apps/util-linux/util-linux-2.39-r4.ebuild | 400 ---------------------
6 files changed, 638 deletions(-)
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index ee5ae5dcfb43..42cecce9549c 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -2,5 +2,3 @@ DIST util-linux-2.38.1.tar.sign 833 BLAKE2B 2468c6b8c881d7a17666aac954edfd421085
DIST util-linux-2.38.1.tar.xz 7495904 BLAKE2B a0e86ca62f82adaccc01ad6ec5a058dac429b81c310989cbad136f96c2770c60bbd4287067817520e8e0653146a10f13128e0af32122402bab416e1c2d6680b8 SHA512 07f11147f67dfc6c8bc766dfc83266054e6ede776feada0566b447d13276b6882ee85c6fe53e8d94a17c03332106fc0549deca3cf5f2e92dda554e9bc0551957
DIST util-linux-2.39.1.tar.sign 833 BLAKE2B 8c1e7089bcec1f47f5c7b4ba60ca1c35955bdad99683f0682f6ba08171d3102079e7584989ea764e60096e0d64e5f9ffc8757c7feba23f79dafdb7942396a96a SHA512 6d6cabd24ebe3ce7437d98d08793b0b27d6240f2a28e08e216b4b1d358c9024fa1cec6d17df6cf7f024f97647cd31990db94716a575b08ad15f3a0b75797912b
DIST util-linux-2.39.1.tar.xz 8351164 BLAKE2B 1c2f3a77414dc9e99d17c426ca710524f898b6fd13bee120c08ceb375e475044ff6f2668f58bd799d0e3befe36de6cc1e161a1be7102e4590a8e372b6547ec1c SHA512 8fe2c9014f6161330610f7470b870855cecbd3fab9c187b75d8f22e16573c82516050479be39cfb9f7dd6d7ef1cc298d31d839b194dda5ec4daf0d1197ac71e9
-DIST util-linux-2.39.tar.sign 833 BLAKE2B f4b35d35f1d20094169c8651d127c6d1f37b0946bc72c40f4824d77f8c117a23ae2633ac2449e91ba316d4cac6e4f3c2afb9fd410302683384988dc794062d9e SHA512 f5df4f7e5c39995ad3c7b52f06bfc7759e53d4df82b2b42f09d4570faeff5c156e83e42be053b00b0bfb4a71e27bfa580fb996a92225eb8a0df46d9f296ef4ef
-DIST util-linux-2.39.tar.xz 8103428 BLAKE2B 39d415b6e303c21d2e5566bd29dd1803c67fbaed079fab85fab620db727a69c96f9c705a3671a639185c78ea1e70f374e21ef8694115ce42fa30c86b546023d1 SHA512 3d59a0f114c06be19ef7f86fca37ba5b9073823d011b3fc37997ddb00124b4505ea32903b78798a64dffbccf0ba645a692678ee845cc65a5b321824448a82a94
diff --git a/sys-apps/util-linux/files/util-linux-2.39-check-for-mount_setattr.patch b/sys-apps/util-linux/files/util-linux-2.39-check-for-mount_setattr.patch
deleted file mode 100644
index c1eb3748f782..000000000000
--- a/sys-apps/util-linux/files/util-linux-2.39-check-for-mount_setattr.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-https://bugs.gentoo.org/906797
-https://github.com/util-linux/util-linux/pull/2248
-
-From 1bd85b64632280d6bf0e86b4ff29da8b19321c5f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
-Date: Sat, 20 May 2023 06:38:20 +0200
-Subject: [PATCH] libmount: check for availability of mount_setattr
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If mount_setattr is not available but needed fall back to the legacy
-mount API.
-
-Fixes #2247
-
-Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---- a/libmount/src/hook_mount.c
-+++ b/libmount/src/hook_mount.c
-@@ -510,6 +510,15 @@ static inline int fsopen_is_supported(void)
- return rc;
- }
-
-+static inline int mount_setattr_is_supported(void)
-+{
-+ int rc;
-+
-+ errno = 0;
-+ rc = mount_setattr(-1, NULL, 0, NULL, 0);
-+ return !(rc == -1 && errno == ENOSYS);
-+}
-+
- /*
- * open_tree() and fsopen()
- */
-@@ -675,9 +684,14 @@ static int hook_prepare(struct libmnt_context *cxt,
- /* call mount_setattr() */
- if (!rc
- && cxt->helper == NULL
-- && (set != 0 || clr != 0 || (flags & MS_REMOUNT)))
-+ && (set != 0 || clr != 0 || (flags & MS_REMOUNT))) {
-+ if (!mount_setattr_is_supported()) {
-+ hookset_deinit(cxt, hs);
-+ return 1;
-+ }
- rc = mnt_context_append_hook(cxt, hs, MNT_STAGE_MOUNT, NULL,
- hook_set_vfsflags);
-+ }
-
- /* call move_mount() to attach target */
- if (!rc
-@@ -688,9 +702,14 @@ static int hook_prepare(struct libmnt_context *cxt,
- hook_attach_target);
-
- /* set propagation (has to be attached to VFS) */
-- if (!rc && mnt_optlist_get_propagation(ol))
-+ if (!rc && mnt_optlist_get_propagation(ol)) {
-+ if (!mount_setattr_is_supported()) {
-+ hookset_deinit(cxt, hs);
-+ return 1;
-+ }
- rc = mnt_context_append_hook(cxt, hs, MNT_STAGE_MOUNT_POST, NULL,
- hook_set_propagation);
-+ }
-
- DBG(HOOK, ul_debugobj(hs, "prepare mount done [rc=%d]", rc));
- return rc;
-diff --git a/tests/expected/mount/fallback-mount_setattr b/tests/expected/mount/fallback-mount_setattr
-new file mode 100644
-index 0000000000..3e18ebf09e
---- /dev/null
-+++ b/tests/expected/mount/fallback-mount_setattr
-@@ -0,0 +1 @@
-+private
---- a/tests/ts/mount/fallback
-+++ b/tests/ts/mount/fallback
-@@ -68,5 +68,21 @@ $TS_CMD_UMOUNT $MOUNTPOINT
- ts_finalize_subtest
-
-
-+ts_init_subtest "mount_setattr"
-+"$TS_CMD_MOUNT" "$DEVICE" "$MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
-+ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
-+$TS_HELPER_ENOSYS -s mount_setattr -- \
-+ "$TS_CMD_MOUNT" -o remount,ro "$MOUNTPOINT" \
-+ >> $TS_OUTPUT 2>> $TS_ERRLOG
-+$TS_CMD_FINDMNT --kernel --mountpoint "$MOUNTPOINT" --options "ro" &> /dev/null
-+[ "$?" == "0" ] || ts_die "Cannot find read-only in $MOUNTPOINT in /proc/self/mountinfo"
-+$TS_HELPER_ENOSYS -s mount_setattr -- \
-+ "$TS_CMD_MOUNT" --make-slave "$MOUNTPOINT" \
-+ >> $TS_OUTPUT 2>> $TS_ERRLOG
-+$TS_CMD_FINDMNT -n --kernel --mountpoint "$MOUNTPOINT" -o PROPAGATION >> $TS_OUTPUT
-+$TS_CMD_UMOUNT $MOUNTPOINT
-+ts_finalize_subtest
-+
-+
- ts_finalize
-
diff --git a/sys-apps/util-linux/files/util-linux-2.39-mount-dont-call-hooks.patch b/sys-apps/util-linux/files/util-linux-2.39-mount-dont-call-hooks.patch
deleted file mode 100644
index 96dfb1f2c234..000000000000
--- a/sys-apps/util-linux/files/util-linux-2.39-mount-dont-call-hooks.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-https://github.com/util-linux/util-linux/issues/2267
-https://github.com/storaged-project/libblockdev/pull/889
-https://bugzilla.redhat.com/show_bug.cgi?id=2189241
-https://github.com/util-linux/util-linux/commit/f94a7760ed7ce81389a6059f020238981627a70d
-
-From f94a7760ed7ce81389a6059f020238981627a70d Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Thu, 25 May 2023 11:48:24 +0200
-Subject: [PATCH] libmount: don't call hooks after mount.<type> helper
-
-In case more filesystems are specified (or when libmount follows
-/{etc,proc}/filesystems) then the library may try to use and
-initialize the new API because for some filesystems, we need
-exec(/sbin/mount.<type>) and for another fsopen().
-
-The hooks that use the API have to smart and detect that the mount
-operation was done in external /sbin/mount.<type> helper. And in this
-case, the new API file descriptors must be ignored.
-
-The exception is propagation flags, mount(8) can set the flags after
-exec(/sbin/mount.<type>), for example, "mount -t ntfs --make-private".
-
-Fixes: https://github.com/util-linux/util-linux/issues/2267
-Signed-off-by: Karel Zak <kzak@redhat.com>
---- a/libmount/src/context_mount.c
-+++ b/libmount/src/context_mount.c
-@@ -508,6 +508,8 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type)
- assert(cxt->fs);
- assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED));
-
-+ mnt_context_reset_status(cxt);
-+
- if (try_type) {
- rc = mnt_context_prepare_helper(cxt, "mount", try_type);
- if (rc)
---- a/libmount/src/hook_mount.c
-+++ b/libmount/src/hook_mount.c
-@@ -239,6 +239,10 @@ static int hook_create_mount(struct libmnt_context *cxt,
- int rc = 0;
-
- assert(cxt);
-+
-+ if (mnt_context_helper_executed(cxt))
-+ return 0;
-+
- assert(cxt->fs);
-
- api = get_sysapi(cxt);
-@@ -309,6 +313,9 @@ static int hook_reconfigure_mount(struct libmnt_context *cxt,
-
- assert(cxt);
-
-+ if (mnt_context_helper_executed(cxt))
-+ return 0;
-+
- api = get_sysapi(cxt);
- assert(api);
- assert(api->fd_tree >= 0);
-@@ -379,6 +386,9 @@ static int hook_set_vfsflags(struct libmnt_context *cxt,
- uint64_t set = 0, clr = 0;
- int rc = 0;
-
-+ if (mnt_context_helper_executed(cxt))
-+ return 0;
-+
- DBG(HOOK, ul_debugobj(hs, "setting VFS flags"));
-
- ol = mnt_context_get_optlist(cxt);
-@@ -471,6 +481,9 @@ static int hook_attach_target(struct libmnt_context *cxt,
- const char *target;
- int rc = 0;
-
-+ if (mnt_context_helper_executed(cxt))
-+ return 0;
-+
- target = mnt_fs_get_target(cxt->fs);
- if (!target)
- return -EINVAL;
-
diff --git a/sys-apps/util-linux/files/util-linux-2.39-mount-parse-options-user.patch b/sys-apps/util-linux/files/util-linux-2.39-mount-parse-options-user.patch
deleted file mode 100644
index e02d02c7f503..000000000000
--- a/sys-apps/util-linux/files/util-linux-2.39-mount-parse-options-user.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://bugs.gentoo.org/906797#c4
-https://bugs.gentoo.org/906859
-https://github.com/util-linux/util-linux/issues/2238
-https://github.com/util-linux/util-linux/commit/c0267687fd7b41b00d523d1985182d7eb574effd
-
-From c0267687fd7b41b00d523d1985182d7eb574effd Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Mon, 22 May 2023 15:00:25 +0200
-Subject: [PATCH] libmount: fix options prepend/insert and merging
-
- * the order of the new options should not be changed
- (for example prepend "a,b,c" to list with "d" has to generate "a,b,c,d", not "c,b,a,d")
-
- * make sure that options map is defined when merging options
-
-Fixes: https://github.com/util-linux/util-linux/issues/2238
-Signed-off-by: Karel Zak <kzak@redhat.com>
---- a/libmount/src/optlist.c
-+++ b/libmount/src/optlist.c
-@@ -338,6 +338,7 @@ int mnt_optlist_merge_opts(struct libmnt_optlist *ls)
-
- /* remove inverted option */
- else if (opt->ent && x->ent
-+ && opt->map == x->map
- && opt->ent->id == x->ent->id
- && (opt->ent->mask & MNT_INVERT
- || x->ent->mask & MNT_INVERT))
-@@ -520,6 +521,8 @@ static int optlist_add_optstr(struct libmnt_optlist *ls, const char *optstr,
- if (!opt)
- return -ENOMEM;
- opt->src = MNT_OPTSRC_STRING;
-+ if (where)
-+ where = &opt->opts;
- }
-
- optlist_cleanup_cache(ls);
-@@ -622,6 +625,8 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags,
- if (!opt)
- return -ENOMEM;
- opt->src = MNT_OPTSRC_FLAG;
-+ if (where)
-+ where = &opt->opts;
- }
-
- optlist_cleanup_cache(ls);
-
diff --git a/sys-apps/util-linux/files/util-linux-2.39-tests-for-mount_setattr.patch b/sys-apps/util-linux/files/util-linux-2.39-tests-for-mount_setattr.patch
deleted file mode 100644
index 0b0ade4e181c..000000000000
--- a/sys-apps/util-linux/files/util-linux-2.39-tests-for-mount_setattr.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://github.com/util-linux/util-linux/pull/2248
-https://bugs.gentoo.org/906797
-
---- a/tests/helpers/test_enosys.c
-+++ b/tests/helpers/test_enosys.c
-@@ -68,6 +68,7 @@ const struct syscall syscalls[] = {
- { "move_mount", __NR_move_mount },
- { "open_tree", __NR_open_tree },
- { "fsopen", __NR_fsopen },
-+ { "mount_setattr", __NR_mount_setattr },
- };
-
- int main(int argc, char **argv)
diff --git a/sys-apps/util-linux/util-linux-2.39-r4.ebuild b/sys-apps/util-linux/util-linux-2.39-r4.ebuild
deleted file mode 100644
index ee28e8b217dd..000000000000
--- a/sys-apps/util-linux/util-linux-2.39-r4.ebuild
+++ /dev/null
@@ -1,400 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
- pam python-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
- inherit autotools git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/karelzak.asc
- inherit verify-sig
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos"
- fi
-
- SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
- SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )"
-fi
-
-S="${WORKDIR}/${MY_P}"
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux"
-
-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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
-
-# Most lib deps here are related to programs rather than our libs,
-# so we rarely need to specify ${MULTILIB_USEDEP}.
-RDEPEND="
- virtual/libcrypt:=
- audit? ( >=sys-process/audit-2.6:= )
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib:= )
- cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
- hardlink? ( dev-libs/libpcre2:= )
- ncurses? (
- sys-libs/ncurses:=[unicode(+)?]
- magic? ( sys-apps/file:0= )
- )
- nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
- pam? ( sys-libs/pam )
- 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 ) )
- udev? ( virtual/libudev:= )"
-BDEPEND="
- virtual/pkgconfig
- nls? (
- app-text/po4a
- sys-devel/gettext
- )
- test? ( sys-devel/bc )
-"
-DEPEND="
- ${RDEPEND}
- virtual/os-headers
- acct-group/root
-"
-RDEPEND+="
- hardlink? ( !app-arch/hardlink )
- logger? ( !>=app-admin/sysklogd-2.0[logger] )
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- su? (
- !<sys-apps/shadow-4.7-r2
- !>=sys-apps/shadow-4.7-r2[su]
- )
- !net-wireless/rfkill
-"
-
-if [[ ${PV} == 9999 ]] ; then
- # Required for man-page generation
- BDEPEND+=" dev-ruby/asciidoctor"
-else
- BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )"
-fi
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
-RESTRICT="!test? ( test )"
-
-PATCHES=(
- "${FILESDIR}/${P}-check-for-mount_setattr.patch"
- "${FILESDIR}/${P}-tests-for-mount_setattr.patch"
- "${FILESDIR}/${P}-mount-parse-options-user.patch"
- "${FILESDIR}/${P}-mount-dont-call-hooks.patch"
-)
-
-pkg_pretend() {
- if use su && ! use suid ; then
- elog "su will be installed as suid despite USE=-suid (bug #832092)"
- elog "To use su without suid, see e.g. Portage's suidctl feature."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- return
- fi
-
- if use verify-sig ; then
- mkdir "${T}"/verify-sig || die
- pushd "${T}"/verify-sig &>/dev/null || die
-
- # Upstream sign the decompressed .tar
- # Let's do it separately in ${T} then cleanup to avoid external
- # effects on normal unpack.
- cp "${DISTDIR}"/${MY_P}.tar.xz . || die
- xz -d ${MY_P}.tar.xz || die
- verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
-
- popd &>/dev/null || die
- rm -r "${T}"/verify-sig || die
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- if use test ; then
- # Prevent uuidd test failure due to socket path limit, bug #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- # Known-failing tests
- # TODO: investigate these
- local known_failing_tests=(
- # Subtest 'options-maximum-size-8192' fails
- hardlink/options
-
- # Fails in sandbox
- lsns/ioctl_ns
-
- lsfd/mkfds-symlink
- lsfd/mkfds-rw-character-device
- )
-
- local known_failing_test
- for known_failing_test in "${known_failing_tests[@]}" ; do
- einfo "Removing known-failing test: ${known_failing_test}"
- rm tests/ts/${known_failing_test} || die
- done
-
- fi
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-python_configure() {
- local myeconfargs=(
- "${commonargs[@]}"
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- --with-python
- --enable-libblkid
- --enable-libmount
- --enable-pylibmount
- )
-
- mkdir "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. bug #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
-
- # bug #485486
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
- # bug #545042
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
-
- # Undo bad ncurses handling by upstream. Fall back to pkg-config.
- # bug #601530
- 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=(
- --localstatedir="${EPREFIX}/var"
- --runstatedir="${EPREFIX}/run"
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
- )
-
- local myeconfargs=(
- "${commonargs[@]}"
- --with-bashcompletiondir="$(get_bashcompdir)"
- --without-python
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(multilib_native_use_with audit)
- $(tc-has-tls || echo --disable-tls)
- $(use_enable nls)
- $(use_enable nls poman)
- $(use_enable unicode widechar)
- $(use_enable static-libs static)
- $(use_with ncurses tinfo)
- $(use_with selinux)
- )
-
- if multilib_is_native_abi ; then
- myeconfargs+=(
- --disable-chfn-chsh
- --disable-login
- --disable-newgrp
- --disable-nologin
- --disable-pylibmount
- --disable-raw
- --disable-vipw
- --enable-agetty
- --enable-bash-completion
- --enable-line
- --enable-partx
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- $(use_enable caps setpriv)
- $(use_enable cramfs)
- $(use_enable fdformat)
- $(use_enable hardlink)
- $(use_enable kill)
- $(use_enable logger)
- $(use_enable ncurses pg)
- $(use_enable su)
- $(use_enable tty-helpers mesg)
- $(use_enable tty-helpers wall)
- $(use_enable tty-helpers write)
- $(use_with cryptsetup)
- )
- if [[ ${PV} == *9999 ]] ; then
- myeconfargs+=( --enable-asciidoc )
- else
- # Upstream is shipping pre-generated man-pages for releases
- myeconfargs+=( --disable-asciidoc )
- fi
- else
- myeconfargs+=(
- --disable-all-programs
- --disable-asciidoc
- --disable-bash-completion
- --without-systemdsystemunitdir
- --disable-poman
-
- # build libraries
- --enable-libuuid
- --enable-libblkid
- --enable-libsmartcols
- --enable-libfdisk
- --enable-libmount
- )
- fi
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_configure
- fi
-}
-
-src_configure() {
- append-lfs-flags
- multilib-minimal_src_configure
-}
-
-python_compile() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake all
- popd >/dev/null || die
-}
-
-multilib_src_compile() {
- emake all
-
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_compile
- fi
-}
-
-python_test() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- popd >/dev/null || die
-}
-
-multilib_src_test() {
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_test
- fi
-}
-
-python_install() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake DESTDIR="${D}" install
- python_optimize
- popd >/dev/null || die
-}
-
-multilib_src_install() {
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_install
- fi
-
- # This needs to be called AFTER python_install call, bug #689190
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi ; then
- # Need the libs in /
- gen_usr_ldscript -a blkid fdisk mount smartcols uuid
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didn't install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if use pam ; then
- # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
-
- newpamd "${FILESDIR}/su-l.pamd" su-l
- fi
-
- if use su && ! use suid ; then
- # Always force suid su, even when USE=-suid, as su is useless
- # for the overwhelming-majority case without suid.
- # Users who wish to truly have a no-suid su can strip it out
- # via e.g. Portage's suidctl or some other hook.
- # See bug #832092
- fperms u+s /bin/su
- fi
-
- # Note:
- # Bash completion for "runuser" command is provided by same file which
- # would also provide bash completion for "su" command. However, we don't
- # use "su" command from this package.
- # This triggers a known QA warning which we ignore for now to magically
- # keep bash completion for "su" command which shadow package does not
- # provide.
-
- local ver=$(tools/git-version-gen .tarballversion)
- local major=$(ver_cut 1 ${ver})
- local minor=$(ver_cut 2 ${ver})
- local release=$(ver_cut 3 ${ver})
- export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}"
-}
-
-pkg_postinst() {
- if ! use tty-helpers ; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]] ; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2023-05-23 3:14 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2023-05-23 3:14 UTC (permalink / raw
To: gentoo-commits
commit: ca46cab3e9d658ced95d386616f0b2c3abda5400
Author: Hank Leininger <hlein <AT> korelogic <DOT> com>
AuthorDate: Sat May 20 19:38:04 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 23 03:09:25 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca46cab3
sys-apps/util-linux: Fix for mount_setattr use on <5.12 kernels
Backported pending upstream fix from
https://github.com/util-linux/util-linux/pull/2248
Note that there's at least one other breaking bug in util-linux-2.39
so the mask probably shouldn't be removed yet.
Bug: https://bugs.gentoo.org/906859
Closes: https://bugs.gentoo.org/906797
Closes: https://github.com/gentoo/gentoo/pull/31108
Signed-off-by: Hank Leininger <hlein <AT> korelogic.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../util-linux-2.39-check-for-mount_setattr.patch | 94 +++++
.../util-linux-2.39-tests-for-mount_setattr.patch | 13 +
sys-apps/util-linux/util-linux-2.39-r2.ebuild | 398 +++++++++++++++++++++
3 files changed, 505 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.39-check-for-mount_setattr.patch b/sys-apps/util-linux/files/util-linux-2.39-check-for-mount_setattr.patch
new file mode 100644
index 000000000000..538f33b30ffe
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39-check-for-mount_setattr.patch
@@ -0,0 +1,94 @@
+https://bugs.gentoo.org/906797
+https://github.com/util-linux/util-linux/pull/2248
+
+From 9b68f614c8d02ca41f077ba064e0a83d2ae7b1fe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sat, 20 May 2023 06:38:20 +0200
+Subject: [PATCH] libmount: check for availability of mount_setattr
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If mount_setattr is not available but needed fall back to the legacy
+mount API.
+
+Fixes #2247
+
+Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
+--- a/libmount/src/hook_mount.c
++++ b/libmount/src/hook_mount.c
+@@ -510,6 +510,15 @@ static inline int fsopen_is_supported(void)
+ return rc;
+ }
+
++static inline int mount_setattr_is_supported(void)
++{
++ int rc;
++
++ errno = 0;
++ rc = mount_setattr(-1, NULL, 0, NULL, 0);
++ return !(rc == -1 && errno == ENOSYS);
++}
++
+ /*
+ * open_tree() and fsopen()
+ */
+@@ -675,9 +684,12 @@ static int hook_prepare(struct libmnt_context *cxt,
+ /* call mount_setattr() */
+ if (!rc
+ && cxt->helper == NULL
+- && (set != 0 || clr != 0 || (flags & MS_REMOUNT)))
++ && (set != 0 || clr != 0 || (flags & MS_REMOUNT))) {
++ if (!mount_setattr_is_supported())
++ return 1;
+ rc = mnt_context_append_hook(cxt, hs, MNT_STAGE_MOUNT, NULL,
+ hook_set_vfsflags);
++ }
+
+ /* call move_mount() to attach target */
+ if (!rc
+@@ -688,9 +700,12 @@ static int hook_prepare(struct libmnt_context *cxt,
+ hook_attach_target);
+
+ /* set propagation (has to be attached to VFS) */
+- if (!rc && mnt_optlist_get_propagation(ol))
++ if (!rc && mnt_optlist_get_propagation(ol)) {
++ if (!mount_setattr_is_supported())
++ return 1;
+ rc = mnt_context_append_hook(cxt, hs, MNT_STAGE_MOUNT_POST, NULL,
+ hook_set_propagation);
++ }
+
+ DBG(HOOK, ul_debugobj(hs, "prepare mount done [rc=%d]", rc));
+ return rc;
+diff --git a/tests/expected/mount/fallback-mount_setattr b/tests/expected/mount/fallback-mount_setattr
+new file mode 100644
+index 0000000000..3e18ebf09e
+--- /dev/null
++++ b/tests/expected/mount/fallback-mount_setattr
+@@ -0,0 +1 @@
++private
+--- a/tests/ts/mount/fallback
++++ b/tests/ts/mount/fallback
+@@ -68,5 +68,21 @@ $TS_CMD_UMOUNT $MOUNTPOINT
+ ts_finalize_subtest
+
+
++ts_init_subtest "mount_setattr"
++"$TS_CMD_MOUNT" "$DEVICE" "$MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
++ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
++$TS_HELPER_ENOSYS -s mount_setattr -- \
++ "$TS_CMD_MOUNT" -o remount,ro "$MOUNTPOINT" \
++ >> $TS_OUTPUT 2>> $TS_ERRLOG
++$TS_CMD_FINDMNT --kernel --mountpoint "$MOUNTPOINT" --options "ro" &> /dev/null
++[ "$?" == "0" ] || ts_die "Cannot find read-only in $MOUNTPOINT in /proc/self/mountinfo"
++$TS_HELPER_ENOSYS -s mount_setattr -- \
++ "$TS_CMD_MOUNT" --make-slave "$MOUNTPOINT" \
++ >> $TS_OUTPUT 2>> $TS_ERRLOG
++$TS_CMD_FINDMNT -n --kernel --mountpoint "$MOUNTPOINT" -o PROPAGATION >> $TS_OUTPUT
++$TS_CMD_UMOUNT $MOUNTPOINT
++ts_finalize_subtest
++
++
+ ts_finalize
+
diff --git a/sys-apps/util-linux/files/util-linux-2.39-tests-for-mount_setattr.patch b/sys-apps/util-linux/files/util-linux-2.39-tests-for-mount_setattr.patch
new file mode 100644
index 000000000000..0b0ade4e181c
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39-tests-for-mount_setattr.patch
@@ -0,0 +1,13 @@
+https://github.com/util-linux/util-linux/pull/2248
+https://bugs.gentoo.org/906797
+
+--- a/tests/helpers/test_enosys.c
++++ b/tests/helpers/test_enosys.c
+@@ -68,6 +68,7 @@ const struct syscall syscalls[] = {
+ { "move_mount", __NR_move_mount },
+ { "open_tree", __NR_open_tree },
+ { "fsopen", __NR_fsopen },
++ { "mount_setattr", __NR_mount_setattr },
+ };
+
+ int main(int argc, char **argv)
diff --git a/sys-apps/util-linux/util-linux-2.39-r2.ebuild b/sys-apps/util-linux/util-linux-2.39-r2.ebuild
new file mode 100644
index 000000000000..43dd41681342
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.39-r2.ebuild
@@ -0,0 +1,398 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
+ pam python-r1 multilib-minimal multiprocessing systemd
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+ inherit autotools git-r3
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/karelzak.asc
+ inherit verify-sig
+
+ if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos"
+ fi
+
+ SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )"
+fi
+
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux"
+
+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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="
+ virtual/libcrypt:=
+ audit? ( >=sys-process/audit-2.6:= )
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib:= )
+ cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
+ hardlink? ( dev-libs/libpcre2:= )
+ ncurses? (
+ sys-libs/ncurses:=[unicode(+)?]
+ magic? ( sys-apps/file:0= )
+ )
+ nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
+ pam? ( sys-libs/pam )
+ 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 ) )
+ udev? ( virtual/libudev:= )"
+BDEPEND="
+ virtual/pkgconfig
+ nls? (
+ app-text/po4a
+ sys-devel/gettext
+ )
+ test? ( sys-devel/bc )
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/os-headers
+ acct-group/root
+"
+RDEPEND+="
+ hardlink? ( !app-arch/hardlink )
+ logger? ( !>=app-admin/sysklogd-2.0[logger] )
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ su? (
+ !<sys-apps/shadow-4.7-r2
+ !>=sys-apps/shadow-4.7-r2[su]
+ )
+ !net-wireless/rfkill
+"
+
+if [[ ${PV} == 9999 ]] ; then
+ # Required for man-page generation
+ BDEPEND+=" dev-ruby/asciidoctor"
+else
+ BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.39-check-for-mount_setattr.patch"
+ "${FILESDIR}/${PN}-2.39-tests-for-mount_setattr.patch"
+)
+
+pkg_pretend() {
+ if use su && ! use suid ; then
+ elog "su will be installed as suid despite USE=-suid (bug #832092)"
+ elog "To use su without suid, see e.g. Portage's suidctl feature."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]] ; then
+ git-r3_src_unpack
+ return
+ fi
+
+ if use verify-sig ; then
+ mkdir "${T}"/verify-sig || die
+ pushd "${T}"/verify-sig &>/dev/null || die
+
+ # Upstream sign the decompressed .tar
+ # Let's do it separately in ${T} then cleanup to avoid external
+ # effects on normal unpack.
+ cp "${DISTDIR}"/${MY_P}.tar.xz . || die
+ xz -d ${MY_P}.tar.xz || die
+ verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
+
+ popd &>/dev/null || die
+ rm -r "${T}"/verify-sig || die
+ fi
+
+ default
+}
+
+src_prepare() {
+ default
+
+ if use test ; then
+ # Prevent uuidd test failure due to socket path limit, bug #593304
+ sed -i \
+ -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
+ tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
+
+ # Known-failing tests
+ # TODO: investigate these
+ local known_failing_tests=(
+ # Subtest 'options-maximum-size-8192' fails
+ hardlink/options
+
+ # Fails in sandbox
+ lsns/ioctl_ns
+
+ lsfd/mkfds-symlink
+ lsfd/mkfds-rw-character-device
+ )
+
+ local known_failing_test
+ for known_failing_test in "${known_failing_tests[@]}" ; do
+ einfo "Removing known-failing test: ${known_failing_test}"
+ rm tests/ts/${known_failing_test} || die
+ done
+
+ fi
+
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+python_configure() {
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --disable-all-programs
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --with-python
+ --enable-libblkid
+ --enable-libmount
+ --enable-pylibmount
+ )
+
+ mkdir "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" >/dev/null || die
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+ popd >/dev/null || die
+}
+
+multilib_src_configure() {
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. bug #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+
+ # bug #485486
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
+ # bug #545042
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
+
+ # Undo bad ncurses handling by upstream. Fall back to pkg-config.
+ # bug #601530
+ 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=(
+ --localstatedir="${EPREFIX}/var"
+ --runstatedir="${EPREFIX}/run"
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ )
+
+ local myeconfargs=(
+ "${commonargs[@]}"
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --without-python
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(multilib_native_use_with readline)
+ $(multilib_native_use_with slang)
+ $(multilib_native_use_with systemd)
+ $(multilib_native_use_with udev)
+ $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(multilib_native_use_with audit)
+ $(tc-has-tls || echo --disable-tls)
+ $(use_enable nls)
+ $(use_enable nls poman)
+ $(use_enable unicode widechar)
+ $(use_enable static-libs static)
+ $(use_with ncurses tinfo)
+ $(use_with selinux)
+ )
+
+ if multilib_is_native_abi ; then
+ myeconfargs+=(
+ --disable-chfn-chsh
+ --disable-login
+ --disable-newgrp
+ --disable-nologin
+ --disable-pylibmount
+ --disable-raw
+ --disable-vipw
+ --enable-agetty
+ --enable-bash-completion
+ --enable-line
+ --enable-partx
+ --enable-rename
+ --enable-rfkill
+ --enable-schedutils
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(use_enable caps setpriv)
+ $(use_enable cramfs)
+ $(use_enable fdformat)
+ $(use_enable hardlink)
+ $(use_enable kill)
+ $(use_enable logger)
+ $(use_enable ncurses pg)
+ $(use_enable su)
+ $(use_enable tty-helpers mesg)
+ $(use_enable tty-helpers wall)
+ $(use_enable tty-helpers write)
+ $(use_with cryptsetup)
+ )
+ if [[ ${PV} == *9999 ]] ; then
+ myeconfargs+=( --enable-asciidoc )
+ else
+ # Upstream is shipping pre-generated man-pages for releases
+ myeconfargs+=( --disable-asciidoc )
+ fi
+ else
+ myeconfargs+=(
+ --disable-all-programs
+ --disable-asciidoc
+ --disable-bash-completion
+ --without-systemdsystemunitdir
+ --disable-poman
+
+ # build libraries
+ --enable-libuuid
+ --enable-libblkid
+ --enable-libsmartcols
+ --enable-libfdisk
+ --enable-libmount
+ )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_configure
+ fi
+}
+
+src_configure() {
+ append-lfs-flags
+ multilib-minimal_src_configure
+}
+
+python_compile() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake all
+ popd >/dev/null || die
+}
+
+multilib_src_compile() {
+ emake all
+
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_compile
+ fi
+}
+
+python_test() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ popd >/dev/null || die
+}
+
+multilib_src_test() {
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_test
+ fi
+}
+
+python_install() {
+ pushd "${BUILD_DIR}" >/dev/null || die
+ emake DESTDIR="${D}" install
+ python_optimize
+ popd >/dev/null || die
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi && use python ; then
+ python_foreach_impl python_install
+ fi
+
+ # This needs to be called AFTER python_install call, bug #689190
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi ; then
+ # Need the libs in /
+ gen_usr_ldscript -a blkid fdisk mount smartcols uuid
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didn't install .la files, and .pc work fine
+ find "${ED}" -name "*.la" -delete || die
+
+ if use pam ; then
+ # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
+ newpamd "${FILESDIR}/runuser.pamd" runuser
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+
+ newpamd "${FILESDIR}/su-l.pamd" su-l
+ fi
+
+ if use su && ! use suid ; then
+ # Always force suid su, even when USE=-suid, as su is useless
+ # for the overwhelming-majority case without suid.
+ # Users who wish to truly have a no-suid su can strip it out
+ # via e.g. Portage's suidctl or some other hook.
+ # See bug #832092
+ fperms u+s /bin/su
+ fi
+
+ # Note:
+ # Bash completion for "runuser" command is provided by same file which
+ # would also provide bash completion for "su" command. However, we don't
+ # use "su" command from this package.
+ # This triggers a known QA warning which we ignore for now to magically
+ # keep bash completion for "su" command which shadow package does not
+ # provide.
+
+ local ver=$(tools/git-version-gen .tarballversion)
+ local major=$(ver_cut 1 ${ver})
+ local minor=$(ver_cut 2 ${ver})
+ local release=$(ver_cut 3 ${ver})
+ export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}"
+}
+
+pkg_postinst() {
+ if ! use tty-helpers ; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2023-05-19 22:29 Mike Gilbert
0 siblings, 0 replies; 27+ messages in thread
From: Mike Gilbert @ 2023-05-19 22:29 UTC (permalink / raw
To: gentoo-commits
commit: ff5a27ef581b4190f1e95e6c32a33698ef11bd46
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri May 19 22:29:23 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri May 19 22:29:23 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff5a27ef
sys-apps/util-linux: drop 2.37.4, 2.38.1
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-apps/util-linux/Manifest | 1 -
.../util-linux-2.37.1-agetty_ctrl-c_erase.patch | 50 ---
.../util-linux-2.37.2-ioctl_ns-test-hang.patch | 37 --
sys-apps/util-linux/util-linux-2.37.4.ebuild | 333 -----------------
sys-apps/util-linux/util-linux-2.38.1.ebuild | 395 ---------------------
5 files changed, 816 deletions(-)
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index fbcb78e8c66a..b73c496ece4d 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -1,4 +1,3 @@
-DIST util-linux-2.37.4.tar.xz 6114232 BLAKE2B 7f6cd12ec9bc68a6db787be78c1ee19fdfbb37710df36d4278d869676ba531afd414097e57e5287efed6c7c80d6b6ef36d5812ff2bea611080d3ce5bf5ad4ac5 SHA512 ada2629b0a8e83ea83513e04f7b1ccceb3b8ab82acd119c5d8389d1abc48c92d0b591f39fb34b1fd65db3ab630f03a672a9f3dacf1a6e4f124bdb083fc1be6d7
DIST util-linux-2.38.1.tar.sign 833 BLAKE2B 2468c6b8c881d7a17666aac954edfd421085111937f5d0daada37a679e9bbfe61fc98bb57cca9bf7bea20be483f38e2a758039f9baf5b1a901852e2b5dd014d8 SHA512 d8b3e936065ae1dc105b8ce773c874bb037ebf84ee571676509543f79c39950180e7f252c6b0d4500119568ed4ac3aa7117793de839f983e9287f26649e91dad
DIST util-linux-2.38.1.tar.xz 7495904 BLAKE2B a0e86ca62f82adaccc01ad6ec5a058dac429b81c310989cbad136f96c2770c60bbd4287067817520e8e0653146a10f13128e0af32122402bab416e1c2d6680b8 SHA512 07f11147f67dfc6c8bc766dfc83266054e6ede776feada0566b447d13276b6882ee85c6fe53e8d94a17c03332106fc0549deca3cf5f2e92dda554e9bc0551957
DIST util-linux-2.39.tar.sign 833 BLAKE2B f4b35d35f1d20094169c8651d127c6d1f37b0946bc72c40f4824d77f8c117a23ae2633ac2449e91ba316d4cac6e4f3c2afb9fd410302683384988dc794062d9e SHA512 f5df4f7e5c39995ad3c7b52f06bfc7759e53d4df82b2b42f09d4570faeff5c156e83e42be053b00b0bfb4a71e27bfa580fb996a92225eb8a0df46d9f296ef4ef
diff --git a/sys-apps/util-linux/files/util-linux-2.37.1-agetty_ctrl-c_erase.patch b/sys-apps/util-linux/files/util-linux-2.37.1-agetty_ctrl-c_erase.patch
deleted file mode 100644
index 4828fd449f95..000000000000
--- a/sys-apps/util-linux/files/util-linux-2.37.1-agetty_ctrl-c_erase.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 6eb1c01e9dd25a73100f06db37190c63fd57d4d9 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Fri, 30 Jul 2021 11:50:46 +0200
-Subject: [PATCH] agetty: use CTRL+C to erase username
-
-aggety(8) from the beginning ignores ^C (the small exception was
-between 2.32 and 2.34 when this char has been misinterpreted).
-
-This patch forces agetty to interpret ^C like ^U, it means to
-erase the user's input and wait for a completely new username.
-The small difference is that for ^C it does not set 'kill character'.
-
-This change does not affect serial lines where ^C is still ignored like
-in previous decades. I'd like to avoid any regression as I have
-no clue if any serial lines do not send this control char in some
-context ...
-
-Fixes: https://github.com/karelzak/util-linux/issues/1399
-References: https://github.com/karelzak/util-linux/issues/1046
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- term-utils/agetty.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/term-utils/agetty.c b/term-utils/agetty.c
-index 3b3d5101a..d072d64d3 100644
---- a/term-utils/agetty.c
-+++ b/term-utils/agetty.c
-@@ -2267,6 +2267,11 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t
- break;
- case CTL('U'):
- cp->kill = ascval; /* set kill character */
-+ /* fallthrough */
-+ case CTL('C'):
-+ if (key == CTL('C') && !(op->flags & F_VCONSOLE))
-+ /* Ignore CTRL+C on serial line */
-+ break;
- while (bp > logname) {
- if ((tp->c_lflag & ECHO) == 0)
- write_all(1, erase[cp->parity], 3);
-@@ -2275,9 +2280,6 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t
- break;
- case CTL('D'):
- exit(EXIT_SUCCESS);
-- case CTL('C'):
-- /* Ignore */
-- break;
- default:
- if ((size_t)(bp - logname) >= sizeof(logname) - 1)
- log_err(_("%s: input overrun"), op->tty);
diff --git a/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch b/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch
deleted file mode 100644
index 73dc0b40a049..000000000000
--- a/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://github.com/karelzak/util-linux/commit/597ccb7bf564f65bb059bfe420224cab0fba46ac.patch
-
-From 597ccb7bf564f65bb059bfe420224cab0fba46ac Mon Sep 17 00:00:00 2001
-From: Chris Hofstaedtler <zeha@debian.org>
-Date: Fri, 20 Aug 2021 10:30:50 +0000
-Subject: [PATCH] tests: Skip lsns/ioctl_ns test if unshare fails
-
-Some parts of the Debian build infrastructure uses unshare to run the
-package build, and that appears to cause a "nested" unshare in the
-lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this
-point.
-
-Try running unshare before the actual test, and skip the test if unshare
-already fails.
-
-[kzak@redhat.com: - add --fork to the test
- - don't write to stdout/err]
-
-Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- tests/ts/lsns/ioctl_ns | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
-index ef6360607..fa626bfda 100755
---- a/tests/ts/lsns/ioctl_ns
-+++ b/tests/ts/lsns/ioctl_ns
-@@ -34,6 +34,8 @@ ts_check_prog "mkfifo"
- ts_check_prog "touch"
- ts_check_prog "uniq"
-
-+$TS_CMD_UNSHARE --user --pid --mount-proc --fork true &> /dev/null || ts_skip "no namespace support"
-+
- ts_cd "$TS_OUTDIR"
-
- # The parent process receives namespaces ids via FIFO_DATA from bash
diff --git a/sys-apps/util-linux/util-linux-2.37.4.ebuild b/sys-apps/util-linux/util-linux-2.37.4.ebuild
deleted file mode 100644
index 2d91b82760e5..000000000000
--- a/sys-apps/util-linux/util-linux-2.37.4.ebuild
+++ /dev/null
@@ -1,333 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9,10} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
- pam python-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3 autotools
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- [[ "${PV}" = *_rc* ]] || \
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos"
- SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux"
-
-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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
-
-# Most lib deps here are related to programs rather than our libs,
-# so we rarely need to specify ${MULTILIB_USEDEP}.
-RDEPEND="
- virtual/libcrypt:=
- audit? ( >=sys-process/audit-2.6:= )
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib:= )
- cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
- hardlink? ( dev-libs/libpcre2:= )
- ncurses? (
- sys-libs/ncurses:=[unicode(+)?]
- magic? ( sys-apps/file:0= )
- )
- nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
- pam? ( sys-libs/pam )
- 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 ) )
- udev? ( virtual/libudev:= )"
-BDEPEND="
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
-"
-DEPEND="
- ${RDEPEND}
- virtual/os-headers
-"
-RDEPEND+="
- hardlink? ( !app-arch/hardlink )
- logger? ( !>=app-admin/sysklogd-2.0[logger] )
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- su? (
- !<sys-apps/shadow-4.7-r2
- !>=sys-apps/shadow-4.7-r2[su]
- )
- !net-wireless/rfkill
-"
-
-# Required for man-page generation
-if [[ "${PV}" == 9999 ]] ; then
- BDEPEND+="
- dev-ruby/asciidoctor
- "
-fi
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
-RESTRICT="!test? ( test )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.37.1-agetty_ctrl-c_erase.patch #804972
- "${FILESDIR}"/${PN}-2.37.2-ioctl_ns-test-hang.patch # upstream test hang patch
-)
-
-pkg_pretend() {
- if use su && ! use suid ; then
- elog "su will be installed as suid despite USE=-suid (bug #832092)"
- elog "To use su without suid, see e.g. Portage's suidctl feature."
- fi
-}
-
-src_prepare() {
- default
-
- # Prevent uuidd test failure due to socket path limit. #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
-
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-python_configure() {
- local myeconfargs=(
- "${commonargs[@]}"
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- --with-python
- --enable-libblkid
- --enable-libmount
- --enable-pylibmount
- )
- mkdir "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
-
- # Undo bad ncurses handling by upstream. Fall back to pkg-config. #601530
- 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"
- )
-
- local myeconfargs=(
- "${commonargs[@]}"
- --with-bashcompletiondir="$(get_bashcompdir)"
- --without-python
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(multilib_native_use_with audit)
- $(tc-has-tls || echo --disable-tls)
- $(use_enable nls)
- $(use_enable unicode widechar)
- $(use_enable static-libs static)
- $(use_with ncurses tinfo)
- $(use_with selinux)
- )
- if multilib_is_native_abi ; then
- myeconfargs+=(
- --disable-chfn-chsh
- --disable-login
- --disable-newgrp
- --disable-nologin
- --disable-pylibmount
- --disable-raw
- --disable-vipw
- --enable-agetty
- --enable-bash-completion
- --enable-line
- --enable-partx
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- $(use_enable caps setpriv)
- $(use_enable cramfs)
- $(use_enable fdformat)
- $(use_enable hardlink)
- $(use_enable kill)
- $(use_enable logger)
- $(use_enable ncurses pg)
- $(use_enable su)
- $(use_enable tty-helpers mesg)
- $(use_enable tty-helpers wall)
- $(use_enable tty-helpers write)
- $(use_with cryptsetup)
- )
- if [[ ${PV} == *9999 ]] ; then
- myeconfargs+=( --enable-asciidoc )
- else
- # Upstream is shipping pre-generated man-pages for releases
- myeconfargs+=( --disable-asciidoc )
- fi
- else
- myeconfargs+=(
- --disable-all-programs
- --disable-asciidoc
- --disable-bash-completion
- --without-systemdsystemunitdir
- # build libraries
- --enable-libuuid
- --enable-libblkid
- --enable-libsmartcols
- --enable-libfdisk
- --enable-libmount
- )
- fi
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_configure
- fi
-}
-
-python_compile() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake all
- popd >/dev/null || die
-}
-
-multilib_src_compile() {
- emake all
-
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_compile
- fi
-}
-
-python_test() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- popd >/dev/null || die
-}
-
-multilib_src_test() {
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_test
- fi
-}
-
-python_install() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake DESTDIR="${D}" install
- python_optimize
- popd >/dev/null || die
-}
-
-multilib_src_install() {
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_install
- fi
-
- # This needs to be called AFTER python_install call (#689190)
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi ; then
- # need the libs in /
- gen_usr_ldscript -a blkid fdisk mount smartcols uuid
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if use pam ; then
- # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
-
- newpamd "${FILESDIR}/su-l.pamd" su-l
- fi
-
- if use su && ! use suid ; then
- # Always force suid su, even when USE=-suid, as su is useless
- # for the overwhelming-majority case without suid.
- # Users who wish to truly have a no-suid su can strip it out
- # via e.g. Portage's suidctl or some other hook.
- # See bug #832092
- fperms u+s /bin/su
- fi
-
- # Note:
- # Bash completion for "runuser" command is provided by same file which
- # would also provide bash completion for "su" command. However, we don't
- # use "su" command from this package.
- # This triggers a known QA warning which we ignore for now to magically
- # keep bash completion for "su" command which shadow package does not
- # provide.
-}
-
-pkg_postinst() {
- if ! use tty-helpers ; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]] ; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
diff --git a/sys-apps/util-linux/util-linux-2.38.1.ebuild b/sys-apps/util-linux/util-linux-2.38.1.ebuild
deleted file mode 100644
index e65375564384..000000000000
--- a/sys-apps/util-linux/util-linux-2.38.1.ebuild
+++ /dev/null
@@ -1,395 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
- pam python-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
- inherit autotools git-r3
-else
- VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/karelzak.asc
- inherit verify-sig
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos"
- fi
-
- SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
- SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )"
-fi
-
-S="${WORKDIR}/${MY_P}"
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux"
-
-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 rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode"
-
-# Most lib deps here are related to programs rather than our libs,
-# so we rarely need to specify ${MULTILIB_USEDEP}.
-RDEPEND="
- virtual/libcrypt:=
- audit? ( >=sys-process/audit-2.6:= )
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib:= )
- cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 )
- hardlink? ( dev-libs/libpcre2:= )
- ncurses? (
- sys-libs/ncurses:=[unicode(+)?]
- magic? ( sys-apps/file:0= )
- )
- nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
- pam? ( sys-libs/pam )
- 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 ) )
- udev? ( virtual/libudev:= )"
-BDEPEND="
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
-"
-DEPEND="
- ${RDEPEND}
- virtual/os-headers
- acct-group/root
-"
-RDEPEND+="
- hardlink? ( !app-arch/hardlink )
- logger? ( !>=app-admin/sysklogd-2.0[logger] )
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- su? (
- !<sys-apps/shadow-4.7-r2
- !>=sys-apps/shadow-4.7-r2[su]
- )
- !net-wireless/rfkill
-"
-
-if [[ ${PV} == 9999 ]] ; then
- # Required for man-page generation
- BDEPEND+=" dev-ruby/asciidoctor"
-else
- BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-karelzak )"
-fi
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
-RESTRICT="!test? ( test )"
-
-pkg_pretend() {
- if use su && ! use suid ; then
- elog "su will be installed as suid despite USE=-suid (bug #832092)"
- elog "To use su without suid, see e.g. Portage's suidctl feature."
- fi
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- return
- fi
-
- if use verify-sig ; then
- mkdir "${T}"/verify-sig || die
- pushd "${T}"/verify-sig &>/dev/null || die
-
- # Upstream sign the decompressed .tar
- # Let's do it separately in ${T} then cleanup to avoid external
- # effects on normal unpack.
- cp "${DISTDIR}"/${MY_P}.tar.xz . || die
- xz -d ${MY_P}.tar.xz || die
- verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
-
- popd &>/dev/null || die
- rm -r "${T}"/verify-sig || die
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- if use test ; then
- # Prevent uuidd test failure due to socket path limit, bug #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- # Known-failing tests
- # TODO: investigate these
- local known_failing_tests=(
- # Subtest 'options-maximum-size-8192' fails
- hardlink/options
-
- lsfd/mkfds-symlink
- lsfd/mkfds-rw-character-device
- )
-
- local known_failing_test
- for known_failing_test in "${known_failing_tests[@]}" ; do
- einfo "Removing known-failing test: ${known_failing_test}"
- rm tests/ts/${known_failing_test} || die
- done
-
- fi
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS, bug #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
-
- append-lfs-flags
-
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-python_configure() {
- local myeconfargs=(
- "${commonargs[@]}"
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- --with-python
- --enable-libblkid
- --enable-libmount
- --enable-pylibmount
- )
-
- mkdir "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
-
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. bug #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
-
- # bug #485486
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam)
- # bug #545042
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam)
-
- # Undo bad ncurses handling by upstream. Fall back to pkg-config.
- # bug #601530
- 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"
- )
-
- local myeconfargs=(
- "${commonargs[@]}"
- --with-bashcompletiondir="$(get_bashcompdir)"
- --without-python
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic')
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(multilib_native_use_with audit)
- $(tc-has-tls || echo --disable-tls)
- $(use_enable nls)
- $(use_enable unicode widechar)
- $(use_enable static-libs static)
- $(use_with ncurses tinfo)
- $(use_with selinux)
- )
-
- if multilib_is_native_abi ; then
- myeconfargs+=(
- --disable-chfn-chsh
- --disable-login
- --disable-newgrp
- --disable-nologin
- --disable-pylibmount
- --disable-raw
- --disable-vipw
- --enable-agetty
- --enable-bash-completion
- --enable-line
- --enable-partx
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- $(use_enable caps setpriv)
- $(use_enable cramfs)
- $(use_enable fdformat)
- $(use_enable hardlink)
- $(use_enable kill)
- $(use_enable logger)
- $(use_enable ncurses pg)
- $(use_enable su)
- $(use_enable tty-helpers mesg)
- $(use_enable tty-helpers wall)
- $(use_enable tty-helpers write)
- $(use_with cryptsetup)
- )
- if [[ ${PV} == *9999 ]] ; then
- myeconfargs+=( --enable-asciidoc )
- else
- # Upstream is shipping pre-generated man-pages for releases
- myeconfargs+=( --disable-asciidoc )
- fi
- else
- myeconfargs+=(
- --disable-all-programs
- --disable-asciidoc
- --disable-bash-completion
- --without-systemdsystemunitdir
-
- # build libraries
- --enable-libuuid
- --enable-libblkid
- --enable-libsmartcols
- --enable-libfdisk
- --enable-libmount
- )
- fi
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_configure
- fi
-}
-
-python_compile() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake all
- popd >/dev/null || die
-}
-
-multilib_src_compile() {
- emake all
-
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_compile
- fi
-}
-
-python_test() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- popd >/dev/null || die
-}
-
-multilib_src_test() {
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_test
- fi
-}
-
-python_install() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake DESTDIR="${D}" install
- python_optimize
- popd >/dev/null || die
-}
-
-multilib_src_install() {
- if multilib_is_native_abi && use python ; then
- python_foreach_impl python_install
- fi
-
- # This needs to be called AFTER python_install call, bug #689190
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi ; then
- # Need the libs in /
- gen_usr_ldscript -a blkid fdisk mount smartcols uuid
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didn't install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if use pam ; then
- # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
-
- newpamd "${FILESDIR}/su-l.pamd" su-l
- fi
-
- if use su && ! use suid ; then
- # Always force suid su, even when USE=-suid, as su is useless
- # for the overwhelming-majority case without suid.
- # Users who wish to truly have a no-suid su can strip it out
- # via e.g. Portage's suidctl or some other hook.
- # See bug #832092
- fperms u+s /bin/su
- fi
-
- # Note:
- # Bash completion for "runuser" command is provided by same file which
- # would also provide bash completion for "su" command. However, we don't
- # use "su" command from this package.
- # This triggers a known QA warning which we ignore for now to magically
- # keep bash completion for "su" command which shadow package does not
- # provide.
-
- local ver=$(tools/git-version-gen .tarballversion)
- local major=$(ver_cut 1 ${ver})
- local minor=$(ver_cut 2 ${ver})
- local release=$(ver_cut 3 ${ver})
- export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}"
-}
-
-pkg_postinst() {
- if ! use tty-helpers ; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]] ; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2023-02-11 22:13 Mike Gilbert
0 siblings, 0 replies; 27+ messages in thread
From: Mike Gilbert @ 2023-02-11 22:13 UTC (permalink / raw
To: gentoo-commits
commit: e3b100621b371849f79a62ba82c9fe2c4ef6b2dd
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 11 22:00:36 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Feb 11 22:13:14 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3b10062
sys-apps/util-linux: backport fix for implicit declartion of pidfd_open
Closes: https://bugs.gentoo.org/893966
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../util-linux-2.38.1-check-for-sys-pidfd.h.patch | 52 ++++++++++++++++++++++
....38.1-r1.ebuild => util-linux-2.38.1-r2.ebuild} | 10 ++---
2 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/sys-apps/util-linux/files/util-linux-2.38.1-check-for-sys-pidfd.h.patch b/sys-apps/util-linux/files/util-linux-2.38.1-check-for-sys-pidfd.h.patch
new file mode 100644
index 000000000000..0a1975fff685
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.38.1-check-for-sys-pidfd.h.patch
@@ -0,0 +1,52 @@
+https://github.com/util-linux/util-linux/pull/1769
+https://bugs.gentoo.org/893966
+
+From 84732a8849a08d42a9a95dcbee9005116be78eb8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 7 Aug 2022 14:39:19 -0700
+Subject: [PATCH] check for sys/pidfd.h
+
+This header in newer glibc defines the signatures of functions
+pidfd_send_signal() and pidfd_open() and when these functions are
+defined by libc then we need to include the relevant header to get
+the definitions. Clang 15+ has started to error out when function
+signatures are missing.
+
+Fixes errors like
+misc-utils/kill.c:402:6: error: call to undeclared function 'pidfd_send_signal'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ if (pidfd_send_signal(pfd, ctl->numsig, &info, 0) < 0)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 1 +
+ include/pidfd-utils.h | 4 +++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 51deeecd4e..daa8f0dca4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -342,6 +342,7 @@ AC_CHECK_HEADERS([ \
+ sys/mkdev.h \
+ sys/mount.h \
+ sys/param.h \
++ sys/pidfd.h \
+ sys/prctl.h \
+ sys/resource.h \
+ sys/sendfile.h \
+diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h
+index eddede9767..d9e33cbc57 100644
+--- a/include/pidfd-utils.h
++++ b/include/pidfd-utils.h
+@@ -4,8 +4,10 @@
+ #ifdef HAVE_SYS_SYSCALL_H
+ # include <sys/syscall.h>
+ # if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open)
++# ifdef HAVE_SYS_PIDFD_H
++# include <sys/pidfd.h>
++# endif
+ # include <sys/types.h>
+-
+ # ifndef HAVE_PIDFD_SEND_SIGNAL
+ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
+ unsigned int flags)
diff --git a/sys-apps/util-linux/util-linux-2.38.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.38.1-r2.ebuild
similarity index 98%
rename from sys-apps/util-linux/util-linux-2.38.1-r1.ebuild
rename to sys-apps/util-linux/util-linux-2.38.1-r2.ebuild
index 746b411e2e6e..f49e21c65cae 100644
--- a/sys-apps/util-linux/util-linux-2.38.1-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.38.1-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
+inherit toolchain-funcs autotools flag-o-matic bash-completion-r1 usr-ldscript \
pam python-r1 multilib-minimal multiprocessing systemd
MY_PV="${PV/_/-}"
@@ -93,6 +93,7 @@ RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${P}-more-posix-exit-on-eof.patch
+ "${FILESDIR}"/util-linux-2.38.1-check-for-sys-pidfd.h.patch
)
pkg_pretend() {
@@ -153,12 +154,7 @@ src_prepare() {
fi
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- else
- elibtoolize
- fi
+ eautoreconf
}
lfs_fallocate_test() {
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2022-01-24 16:08 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2022-01-24 16:08 UTC (permalink / raw
To: gentoo-commits
commit: 5a614c66095fee76fc55e9fdea5b58e9bd39ef02
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 24 16:06:17 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 24 16:06:17 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a614c66
sys-apps/util-linux: remove duplicate patch
Bug: https://bugs.gentoo.org/831978
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../util-linux-2.37.3-ioctl_ns-test-hang.patch | 37 ----------------------
sys-apps/util-linux/util-linux-2.37.3.ebuild | 2 +-
2 files changed, 1 insertion(+), 38 deletions(-)
diff --git a/sys-apps/util-linux/files/util-linux-2.37.3-ioctl_ns-test-hang.patch b/sys-apps/util-linux/files/util-linux-2.37.3-ioctl_ns-test-hang.patch
deleted file mode 100644
index 73dc0b40a049..000000000000
--- a/sys-apps/util-linux/files/util-linux-2.37.3-ioctl_ns-test-hang.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://github.com/karelzak/util-linux/commit/597ccb7bf564f65bb059bfe420224cab0fba46ac.patch
-
-From 597ccb7bf564f65bb059bfe420224cab0fba46ac Mon Sep 17 00:00:00 2001
-From: Chris Hofstaedtler <zeha@debian.org>
-Date: Fri, 20 Aug 2021 10:30:50 +0000
-Subject: [PATCH] tests: Skip lsns/ioctl_ns test if unshare fails
-
-Some parts of the Debian build infrastructure uses unshare to run the
-package build, and that appears to cause a "nested" unshare in the
-lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this
-point.
-
-Try running unshare before the actual test, and skip the test if unshare
-already fails.
-
-[kzak@redhat.com: - add --fork to the test
- - don't write to stdout/err]
-
-Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- tests/ts/lsns/ioctl_ns | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
-index ef6360607..fa626bfda 100755
---- a/tests/ts/lsns/ioctl_ns
-+++ b/tests/ts/lsns/ioctl_ns
-@@ -34,6 +34,8 @@ ts_check_prog "mkfifo"
- ts_check_prog "touch"
- ts_check_prog "uniq"
-
-+$TS_CMD_UNSHARE --user --pid --mount-proc --fork true &> /dev/null || ts_skip "no namespace support"
-+
- ts_cd "$TS_OUTDIR"
-
- # The parent process receives namespaces ids via FIFO_DATA from bash
diff --git a/sys-apps/util-linux/util-linux-2.37.3.ebuild b/sys-apps/util-linux/util-linux-2.37.3.ebuild
index 29ca2387ed7a..931702b50a7f 100644
--- a/sys-apps/util-linux/util-linux-2.37.3.ebuild
+++ b/sys-apps/util-linux/util-linux-2.37.3.ebuild
@@ -86,7 +86,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/${PN}-2.37.1-agetty_ctrl-c_erase.patch #804972
- "${FILESDIR}"/${P}-ioctl_ns-test-hang.patch # upstream test hang patch
+ "${FILESDIR}"/${PN}-2.37.2-ioctl_ns-test-hang.patch # upstream test hang patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2021-12-20 4:57 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2021-12-20 4:57 UTC (permalink / raw
To: gentoo-commits
commit: e1a92e8706aaf62d1850fddcf2739323afc44bcd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 20 04:57:08 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 20 04:57:08 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1a92e87
sys-apps/util-linux: fix 'su -l' (install pam configuration)
Reported-by: josef64
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/util-linux/files/su-l.pamd | 5 +++++
.../{util-linux-2.37.2-r2.ebuild => util-linux-2.37.2-r3.ebuild} | 3 +++
sys-apps/util-linux/util-linux-9999.ebuild | 3 +++
3 files changed, 11 insertions(+)
diff --git a/sys-apps/util-linux/files/su-l.pamd b/sys-apps/util-linux/files/su-l.pamd
new file mode 100644
index 000000000000..24f29d751f9f
--- /dev/null
+++ b/sys-apps/util-linux/files/su-l.pamd
@@ -0,0 +1,5 @@
+auth include su
+account include su
+password include su
+session optional pam_lastlog.so
+session include su
diff --git a/sys-apps/util-linux/util-linux-2.37.2-r2.ebuild b/sys-apps/util-linux/util-linux-2.37.2-r3.ebuild
similarity index 98%
rename from sys-apps/util-linux/util-linux-2.37.2-r2.ebuild
rename to sys-apps/util-linux/util-linux-2.37.2-r3.ebuild
index 69303ce82277..fbcdb0e57e81 100644
--- a/sys-apps/util-linux/util-linux-2.37.2-r2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.37.2-r3.ebuild
@@ -312,8 +312,11 @@ multilib_src_install_all() {
fi
if use pam ; then
+ # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
newpamd "${FILESDIR}/runuser.pamd" runuser
newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+
+ newpamd "${FILESDIR}/su-l.pamd" su-l
fi
# Note:
diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild
index 4ee312bbaff2..ef948cebe7e0 100644
--- a/sys-apps/util-linux/util-linux-9999.ebuild
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -307,8 +307,11 @@ multilib_src_install_all() {
fi
if use pam ; then
+ # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt
newpamd "${FILESDIR}/runuser.pamd" runuser
newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
+
+ newpamd "${FILESDIR}/su-l.pamd" su-l
fi
# Note:
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2021-09-03 20:57 Sam James
0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2021-09-03 20:57 UTC (permalink / raw
To: gentoo-commits
commit: 0653584024fa17597acc8a99039bd81080d02402
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 3 18:51:01 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 3 20:57:22 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06535840
sys-apps/util-linux: add ioctl_ns test hang patch
Bug: https://bugs.gentoo.org/809491
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../util-linux-2.37.2-ioctl_ns-test-hang.patch | 37 ++++++++++++++++++++++
sys-apps/util-linux/util-linux-2.37.2.ebuild | 1 +
2 files changed, 38 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch b/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch
new file mode 100644
index 00000000000..73dc0b40a04
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch
@@ -0,0 +1,37 @@
+https://github.com/karelzak/util-linux/commit/597ccb7bf564f65bb059bfe420224cab0fba46ac.patch
+
+From 597ccb7bf564f65bb059bfe420224cab0fba46ac Mon Sep 17 00:00:00 2001
+From: Chris Hofstaedtler <zeha@debian.org>
+Date: Fri, 20 Aug 2021 10:30:50 +0000
+Subject: [PATCH] tests: Skip lsns/ioctl_ns test if unshare fails
+
+Some parts of the Debian build infrastructure uses unshare to run the
+package build, and that appears to cause a "nested" unshare in the
+lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this
+point.
+
+Try running unshare before the actual test, and skip the test if unshare
+already fails.
+
+[kzak@redhat.com: - add --fork to the test
+ - don't write to stdout/err]
+
+Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ tests/ts/lsns/ioctl_ns | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
+index ef6360607..fa626bfda 100755
+--- a/tests/ts/lsns/ioctl_ns
++++ b/tests/ts/lsns/ioctl_ns
+@@ -34,6 +34,8 @@ ts_check_prog "mkfifo"
+ ts_check_prog "touch"
+ ts_check_prog "uniq"
+
++$TS_CMD_UNSHARE --user --pid --mount-proc --fork true &> /dev/null || ts_skip "no namespace support"
++
+ ts_cd "$TS_OUTDIR"
+
+ # The parent process receives namespaces ids via FIFO_DATA from bash
diff --git a/sys-apps/util-linux/util-linux-2.37.2.ebuild b/sys-apps/util-linux/util-linux-2.37.2.ebuild
index 7d33348c15d..83397becac5 100644
--- a/sys-apps/util-linux/util-linux-2.37.2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.37.2.ebuild
@@ -88,6 +88,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/${PN}-2.37.1-agetty_ctrl-c_erase.patch #804972
+ "${FILESDIR}"/${P}-ioctl_ns-test-hang.patch # upstream test hang patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2020-11-20 20:32 Lars Wendler
0 siblings, 0 replies; 27+ messages in thread
From: Lars Wendler @ 2020-11-20 20:32 UTC (permalink / raw
To: gentoo-commits
commit: 96166c8ac1333556c1c547950247b0ab622f11f5
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 20 20:30:44 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Nov 20 20:31:59 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96166c8a
sys-apps/util-linux: Revbump to fix user mount
Closes: https://bugs.gentoo.org/755878
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
...-linux-2.36.1-libmount_dont_use_symfollow.patch | 40 ++++++++++++++++++++++
...x-2.36.1.ebuild => util-linux-2.36.1-r1.ebuild} | 4 +++
2 files changed, 44 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.36.1-libmount_dont_use_symfollow.patch b/sys-apps/util-linux/files/util-linux-2.36.1-libmount_dont_use_symfollow.patch
new file mode 100644
index 00000000000..7c0b73f49d7
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.36.1-libmount_dont_use_symfollow.patch
@@ -0,0 +1,40 @@
+From 76bb9b30cfcf54b59591a57a3d2a747e514469b2 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 19 Nov 2020 09:49:16 +0100
+Subject: [PATCH] libmount: don't use "symfollow" for helpers on user mounts
+
+Addresses: https://github.com/karelzak/util-linux/issues/1193
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ libmount/src/context_mount.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
+index 8c394c1ff..dd1786176 100644
+--- a/libmount/src/context_mount.c
++++ b/libmount/src/context_mount.c
+@@ -415,6 +415,9 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr)
+ * string, because there is nothing like MS_EXEC (we only have
+ * MS_NOEXEC in mount flags and we don't care about the original
+ * mount string in libmount for VFS options).
++ *
++ * This use-case makes sense for MS_SECURE flags only (see
++ * mnt_optstr_get_flags() and mnt_context_merge_mflags()).
+ */
+ if (!(cxt->mountflags & MS_NOEXEC))
+ mnt_optstr_append_option(optstr, "exec", NULL);
+@@ -422,11 +425,8 @@ static int generate_helper_optstr(struct libmnt_context *cxt, char **optstr)
+ mnt_optstr_append_option(optstr, "suid", NULL);
+ if (!(cxt->mountflags & MS_NODEV))
+ mnt_optstr_append_option(optstr, "dev", NULL);
+- if (!(cxt->mountflags & MS_NOSYMFOLLOW))
+- mnt_optstr_append_option(optstr, "symfollow", NULL);
+ }
+
+-
+ if (cxt->flags & MNT_FL_SAVED_USER)
+ rc = mnt_optstr_set_option(optstr, "user", cxt->orig_user);
+ if (rc)
+--
+2.29.2
+
diff --git a/sys-apps/util-linux/util-linux-2.36.1.ebuild b/sys-apps/util-linux/util-linux-2.36.1-r1.ebuild
similarity index 99%
rename from sys-apps/util-linux/util-linux-2.36.1.ebuild
rename to sys-apps/util-linux/util-linux-2.36.1-r1.ebuild
index 902e36ad068..f7acbfdb151 100644
--- a/sys-apps/util-linux/util-linux-2.36.1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.36.1-r1.ebuild
@@ -75,6 +75,10 @@ RESTRICT="!test? ( test )"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${P}-libmount_dont_use_symfollow.patch" #755878
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2020-04-29 16:29 Mike Gilbert
0 siblings, 0 replies; 27+ messages in thread
From: Mike Gilbert @ 2020-04-29 16:29 UTC (permalink / raw
To: gentoo-commits
commit: c7ea8556fef6dcd2b7890e478bdfb3920e5a332a
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 29 16:25:37 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Apr 29 16:25:37 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7ea8556
sys-apps/util-linux: backport hwclock fix for glibc-2.31
Closes: https://bugs.gentoo.org/720006
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../util-linux-2.35.1-hwclock-glibc-2.31.patch | 165 +++++++++++
....35.1-r1.ebuild => util-linux-2.35.1-r2.ebuild} | 1 +
sys-apps/util-linux/util-linux-2.35.1.ebuild | 314 ---------------------
3 files changed, 166 insertions(+), 314 deletions(-)
diff --git a/sys-apps/util-linux/files/util-linux-2.35.1-hwclock-glibc-2.31.patch b/sys-apps/util-linux/files/util-linux-2.35.1-hwclock-glibc-2.31.patch
new file mode 100644
index 00000000000..c8b5cf76a23
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.35.1-hwclock-glibc-2.31.patch
@@ -0,0 +1,165 @@
+From cd781c405be82540484da3bfe3d3f17a39b8eb5c Mon Sep 17 00:00:00 2001
+From: J William Piggott <elseifthen@gmx.com>
+Date: Fri, 21 Feb 2020 20:03:47 -0500
+Subject: hwclock: make glibc 2.31 compatible
+
+______________________________________________________
+GNU C Library NEWS -- history of user-visible changes.
+Version 2.31
+Deprecated and removed features, and other changes affecting compatibility:
+
+* The settimeofday function can still be used to set a system-wide time
+ zone when the operating system supports it. This is because the Linux
+ kernel reused the API, on some architectures, to describe a system-wide
+ time-zone-like offset between the software clock maintained by the kernel,
+ and the "RTC" clock that keeps time when the system is shut down.
+
+ However, to reduce the odds of this offset being set by accident,
+ settimeofday can no longer be used to set the time and the offset
+ simultaneously. If both of its two arguments are non-null, the call
+ will fail (setting errno to EINVAL).
+
+ Callers attempting to set this offset should also be prepared for the call
+ to fail and set errno to ENOSYS; this already happens on the Hurd and on
+ some Linux architectures. The Linux kernel maintainers are discussing a
+ more principled replacement for the reused API. After a replacement
+ becomes available, we will change settimeofday to fail with ENOSYS on all
+ platforms when its 'tzp' argument is not a null pointer.
+
+ settimeofday itself is obsolescent according to POSIX. Programs that set
+ the system time should use clock_settime and/or the adjtime family of
+ functions instead. We may cease to make settimeofday available to newly
+ linked binaries after there is a replacement for Linux's time-zone-like
+ offset API.
+______________________________________________________
+
+hwclock(8) had one settimeofday(2) call where both args were set for
+--hctosys when the RTC was ticking UTC. This allowed setting the system
+time, timezone, and locking the warp_clock function with a single call.
+That operation now takes 3 calls of settimeofday(2).
+
+Although this common operation now takes three calls, the overall logic
+for the set_system_clock() function was simplified.
+
+Co-Author: Karel Zak <kzak@redhat.com>
+Signed-off-by: J William Piggott <elseifthen@gmx.com>
+---
+ sys-utils/hwclock.c | 71 ++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 37 insertions(+), 34 deletions(-)
+
+diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
+index e736da717..1191a8571 100644
+--- a/sys-utils/hwclock.c
++++ b/sys-utils/hwclock.c
+@@ -643,28 +643,28 @@ display_time(struct timeval hwctime)
+ * tz.tz_minuteswest argument and sets PCIL (see below). At boot settimeofday(2)
+ * has one-shot access to this function as shown in the table below.
+ *
+- * +-------------------------------------------------------------------+
+- * | settimeofday(tv, tz) |
+- * |-------------------------------------------------------------------|
+- * | Arguments | System Time | PCIL | | warp_clock |
+- * | tv | tz | set | warped | set | firsttime | locked |
+- * |---------|---------|---------------|------|-----------|------------|
+- * | pointer | NULL | yes | no | no | 1 | no |
+- * | pointer | pointer | yes | no | no | 0 | yes |
+- * | NULL | ptr2utc | no | no | no | 0 | yes |
+- * | NULL | pointer | no | yes | yes | 0 | yes |
+- * +-------------------------------------------------------------------+
++ * +-------------------------------------------------------------------------+
++ * | settimeofday(tv, tz) |
++ * |-------------------------------------------------------------------------|
++ * | Arguments | System Time | TZ | PCIL | | warp_clock |
++ * | tv | tz | set | warped | set | set | firsttime | locked |
++ * |---------|---------|---------------|-----|------|-----------|------------|
++ * | pointer | NULL | yes | no | no | no | 1 | no |
++ * | NULL | ptr2utc | no | no | yes | no | 0 | yes |
++ * | NULL | pointer | no | yes | yes | yes | 0 | yes |
++ * +-------------------------------------------------------------------------+
+ * ptr2utc: tz.tz_minuteswest is zero (UTC).
+ * PCIL: persistent_clock_is_local, sets the "11 minute mode" timescale.
+ * firsttime: locks the warp_clock function (initialized to 1 at boot).
++ * Since glibc v2.31 settimeofday() will fail if both args are non NULL
+ *
+ * +---------------------------------------------------------------------------+
+ * | op | RTC scale | settimeofday calls |
+ * |---------|-----------|-----------------------------------------------------|
+ * | systz | Local | 1) warps system time*, sets PCIL* and kernel tz |
+ * | systz | UTC | 1st) locks warp_clock* 2nd) sets kernel tz |
+- * | hctosys | Local | 1st) sets PCIL* 2nd) sets system time and kernel tz |
+- * | hctosys | UTC | 1) sets system time and kernel tz |
++ * | hctosys | Local | 1st) sets PCIL* & kernel tz 2nd) sets system time |
++ * | hctosys | UTC | 1st) locks warp* 2nd) sets tz 3rd) sets system time |
+ * +---------------------------------------------------------------------------+
+ * * only on first call after boot
+ */
+@@ -675,42 +675,45 @@ set_system_clock(const struct hwclock_control *ctl,
+ struct tm broken;
+ int minuteswest;
+ int rc = 0;
+- const struct timezone tz_utc = { 0 };
+
+ localtime_r(&newtime.tv_sec, &broken);
+ minuteswest = -get_gmtoff(&broken) / 60;
+
+ if (ctl->verbose) {
+- if (ctl->hctosys && !ctl->universal)
+- printf(_("Calling settimeofday(NULL, %d) to set "
+- "persistent_clock_is_local.\n"), minuteswest);
+- if (ctl->systz && ctl->universal)
++ if (ctl->universal) {
+ puts(_("Calling settimeofday(NULL, 0) "
+- "to lock the warp function."));
++ "to lock the warp_clock function."));
++ if (!( ctl->universal && !minuteswest ))
++ printf(_("Calling settimeofday(NULL, %d) "
++ "to set the kernel timezone.\n"),
++ minuteswest);
++ } else
++ printf(_("Calling settimeofday(NULL, %d) to warp "
++ "System time, set PCIL and the kernel tz.\n"),
++ minuteswest);
++
+ if (ctl->hctosys)
+- printf(_("Calling settimeofday(%ld.%06ld, %d)\n"),
+- newtime.tv_sec, newtime.tv_usec, minuteswest);
+- else {
+- printf(_("Calling settimeofday(NULL, %d) "), minuteswest);
+- if (ctl->universal)
+- puts(_("to set the kernel timezone."));
+- else
+- puts(_("to warp System time."));
+- }
++ printf(_("Calling settimeofday(%ld.%06ld, NULL) "
++ "to set the System time.\n"),
++ newtime.tv_sec, newtime.tv_usec);
+ }
+
+ if (!ctl->testing) {
++ const struct timezone tz_utc = { 0 };
+ const struct timezone tz = { minuteswest };
+
+- if (ctl->hctosys && !ctl->universal) /* set PCIL */
+- rc = settimeofday(NULL, &tz);
+- if (ctl->systz && ctl->universal) /* lock warp_clock */
++ /* If UTC RTC: lock warp_clock and PCIL */
++ if (ctl->universal)
+ rc = settimeofday(NULL, &tz_utc);
+- if (!rc && ctl->hctosys)
+- rc = settimeofday(&newtime, &tz);
+- else if (!rc)
++
++ /* Set kernel tz; if localtime RTC: warp_clock and set PCIL */
++ if (!rc && !( ctl->universal && !minuteswest ))
+ rc = settimeofday(NULL, &tz);
+
++ /* Set the System Clock */
++ if ((!rc || errno == ENOSYS) && ctl->hctosys)
++ rc = settimeofday(&newtime, NULL);
++
+ if (rc) {
+ warn(_("settimeofday() failed"));
+ return EXIT_FAILURE;
+--
+cgit 1.2-0.3.lf.el7
+
diff --git a/sys-apps/util-linux/util-linux-2.35.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.35.1-r2.ebuild
similarity index 99%
rename from sys-apps/util-linux/util-linux-2.35.1-r1.ebuild
rename to sys-apps/util-linux/util-linux-2.35.1-r2.ebuild
index c7848ba5518..68e7b84262b 100644
--- a/sys-apps/util-linux/util-linux-2.35.1-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.35.1-r2.ebuild
@@ -83,6 +83,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/util-linux-2.35.1-include_sys_types-header.patch
"${FILESDIR}"/util-linux-2.35.1-cleanup-pidfd-include.patch
+ "${FILESDIR}"/util-linux-2.35.1-hwclock-glibc-2.31.patch
)
src_prepare() {
diff --git a/sys-apps/util-linux/util-linux-2.35.1.ebuild b/sys-apps/util-linux/util-linux-2.35.1.ebuild
deleted file mode 100644
index 9153eb2da12..00000000000
--- a/sys-apps/util-linux/util-linux-2.35.1.ebuild
+++ /dev/null
@@ -1,314 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
- pam python-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3 autotools
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- [[ "${PV}" = *_rc* ]] || \
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
- SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux"
-
-LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="build caps +cramfs cryptsetup fdformat hardlink kill +logger ncurses nls pam python +readline 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}.
-RDEPEND="
- virtual/libcrypt:=
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib:= )
- cryptsetup? ( sys-fs/cryptsetup )
- ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
- nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- !build? ( systemd? ( sys-apps/systemd ) )
- udev? ( virtual/libudev:= )"
-BDEPEND="
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
-"
-DEPEND="
- ${RDEPEND}
- virtual/os-headers
-"
-RDEPEND+="
- hardlink? ( !app-arch/hardlink )
- logger? ( !>=app-admin/sysklogd-2.0[logger] )
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- su? (
- !<sys-apps/shadow-4.7-r2
- !>=sys-apps/shadow-4.7-r2[su]
- )
- !net-wireless/rfkill
- !sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-2.7-r1"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="!test? ( test )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}"/util-linux-2.35.1-include_sys_types-header.patch
- "${FILESDIR}"/util-linux-2.35.1-cleanup-pidfd-include.patch
-)
-
-src_prepare() {
- default
-
- # Prevent uuidd test failure due to socket path limit. #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- if ! use userland_GNU; then
- # test runner is using GNU-specific xargs call
- sed -i -e 's:xargs:gxargs:' tests/run.sh || die
- # test requires util-linux uuidgen (which we don't build)
- rm tests/ts/uuid/oids || die
- fi
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
-
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-python_configure() {
- local myeconfargs=(
- "${commonargs[@]}"
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- --with-python
- )
- if use userland_GNU; then
- myeconfargs+=(
- --enable-libblkid
- --enable-libmount
- --enable-pylibmount
- )
- fi
- mkdir "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
-
- # Undo bad ncurses handling by upstream. Fall back to pkg-config. #601530
- export NCURSES6_CONFIG=false NCURSES5_CONFIG=false
- export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false
-
- # configure args shared by python and non-python builds
- local commonargs=(
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
- )
-
- local myeconfargs=(
- "${commonargs[@]}"
- --with-bashcompletiondir="$(get_bashcompdir)"
- --without-python
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(tc-has-tls || echo --disable-tls)
- $(use_enable nls)
- $(use_enable unicode widechar)
- $(use_enable static-libs static)
- $(use_with ncurses tinfo)
- $(use_with selinux)
- )
- # build programs only on GNU, on *BSD we want libraries only
- if multilib_is_native_abi && use userland_GNU; then
- myeconfargs+=(
- --disable-chfn-chsh
- --disable-login
- --disable-nologin
- --disable-pylibmount
- --enable-agetty
- --enable-bash-completion
- --enable-line
- --enable-partx
- --enable-raw
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- $(use_enable caps setpriv)
- $(use_enable cramfs)
- $(use_enable fdformat)
- $(use_enable hardlink)
- $(use_enable kill)
- $(use_enable logger)
- $(use_enable su)
- $(use_enable tty-helpers mesg)
- $(use_enable tty-helpers wall)
- $(use_enable tty-helpers write)
- $(use_with cryptsetup)
- )
- else
- myeconfargs+=(
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- # build libraries
- --enable-libuuid
- --enable-libblkid
- --enable-libsmartcols
- --enable-libfdisk
- )
- if use userland_GNU; then
- # those libraries don't work on *BSD
- myeconfargs+=(
- --enable-libmount
- )
- fi
- fi
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_configure
- fi
-}
-
-python_compile() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake all
- popd >/dev/null || die
-}
-
-multilib_src_compile() {
- emake all
-
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_compile
- fi
-}
-
-python_test() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- popd >/dev/null || die
-}
-
-multilib_src_test() {
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_test
- fi
-}
-
-python_install() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake DESTDIR="${D}" install
- python_optimize
- popd >/dev/null || die
-}
-
-multilib_src_install() {
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_install
- fi
-
- # This needs to be called AFTER python_install call (#689190)
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use userland_GNU; then
- # need the libs in /
- gen_usr_ldscript -a blkid fdisk mount smartcols uuid
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if ! use userland_GNU; then
- # manpage collisions
- # TODO: figure out a good way to keep them
- rm "${ED}"/usr/share/man/man3/uuid* || die
- fi
-
- if use pam; then
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
- fi
-
- # Note:
- # Bash completion for "runuser" command is provided by same file which
- # would also provide bash completion for "su" command. However, we don't
- # use "su" command from this package.
- # This triggers a known QA warning which we ignore for now to magically
- # keep bash completion for "su" command which shadow package does not
- # provide.
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2019-11-19 10:37 Lars Wendler
0 siblings, 0 replies; 27+ messages in thread
From: Lars Wendler @ 2019-11-19 10:37 UTC (permalink / raw
To: gentoo-commits
commit: 42b3a2fd4a2e6b836f81040477bf3a982283ecd5
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 19 08:30:42 2019 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Nov 19 10:37:02 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42b3a2fd
sys-apps/util-linux: Removed old
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
sys-apps/util-linux/Manifest | 2 -
...p-oids-test-when-uuidgen-is-not-available.patch | 41 ---
.../files/util-linux-2.33-sparc-setarch.patch | 80 ------
sys-apps/util-linux/util-linux-2.33-r1.ebuild | 292 --------------------
sys-apps/util-linux/util-linux-2.33.1.ebuild | 296 ---------------------
5 files changed, 711 deletions(-)
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index c4d6b1f4e2c..d93241555ce 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -1,4 +1,2 @@
-DIST util-linux-2.33.1.tar.xz 4650936 BLAKE2B 9ee6bc1a1b800e8537f5552c28cf608f32e89c8ab716434a2de6b4b5e257c53065b9c11cd355f2ef759f69069071ef930790ecd55806deef300ce77f31e38e98 SHA512 94ada47e472b62a612c26fd5a5b7423e09366690a8a96f777191a5d920981eb0f224474bc2f128e827299bf60062770011332757e1551a8cd3764b5c70ae4ba2
DIST util-linux-2.33.2.tar.xz 4707024 BLAKE2B fdeed0a236edd26d268bccca8cde2cf1b7ecbff521ede9fa26ea22c8e5cdfc380a416a168789504b303f1b569d163e41f6630ee28829be7f2b2129fa14c4fffa SHA512 ac88790a0272366b384b54df19cb28318014d98819d5d96aa05528ff17ab57a8c66d012a2f1b59caca4c5d4ea669e8c041e1123517c1f1c2d9960ef701aaf749
-DIST util-linux-2.33.tar.xz 4663072 BLAKE2B df601f6aa6dd1e77c722d5e7350a3b14c6099057487384eb8cd7adee8693711c1d24663f76682c958884559fddf61cc4b6d987bdca70f88e6cb14109e328e8a9 SHA512 5eb419607c5a2634117a604d425d6413763d1e48910acabc7e19d574a4c3fb0ceb34a68671a8e4fe396a4c6d611932082f77cd669d009e218bf64095da0d5689
DIST util-linux-2.34.tar.xz 4974812 BLAKE2B d26b2f74d490eaee0a40d4c75a1a351ba165b4a52f9bbf6cf9d1afd7ae1382a3a3dfe41180584e97e9aaad6950f604cad928f30747590e3e1e669c8797689758 SHA512 2d0b76f63d32e7afb7acf61a83fabbfd58baa34ab78b3a331ce87f9c676a5fd71c56a493ded95039540d2c46b6048caaa38d7fb4491eb3d52d7b09dc54655cd7
diff --git a/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch b/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch
deleted file mode 100644
index 743dc89e242..00000000000
--- a/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Sun, 11 Nov 2018 02:17:55 +0100
-Subject: [PATCH] tests: run oids test only when uuidgen tool was built
-
-oids test did not check if uuidgen was available.
-
-oids test was also calling uuidgen from PATH which could result
-in wrong results if uuidgen from a previous util-linux installation
-was used.
-
-With this commit we will check if uuidgen was built and make sure
-that we only call the uuidgen binary we just built. If uuidgen is
-not available we will skip this test.
----
- tests/ts/uuid/oids | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/tests/ts/uuid/oids b/tests/ts/uuid/oids
-index 3b005c5b2..77e010c1d 100755
---- a/tests/ts/uuid/oids
-+++ b/tests/ts/uuid/oids
-@@ -20,12 +20,14 @@ ts_init "$*"
-
- : . > $TS_OUTPUT
-
--uuidgen --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
-+ts_check_test_command "$TS_CMD_UUIDGEN"
-
--uuidgen --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
-+$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
-
--uuidgen --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
-+$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
-
--uuidgen --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
-+$TS_CMD_UUIDGEN --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
-+
-+$TS_CMD_UUIDGEN --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
-
- ts_finalize
diff --git a/sys-apps/util-linux/files/util-linux-2.33-sparc-setarch.patch b/sys-apps/util-linux/files/util-linux-2.33-sparc-setarch.patch
deleted file mode 100644
index cbae6c0f263..00000000000
--- a/sys-apps/util-linux/files/util-linux-2.33-sparc-setarch.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 3fa06e049012218d883d0e1251df86bafbc446bf Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Thu, 22 Nov 2018 11:03:35 +0100
-Subject: [PATCH] setarch: fix obscure sparc32bash use-case
-
-Reported-by: Carlos Santos <casantos@datacom.com.br>
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- sys-utils/setarch.c | 28 ++++++++++++++++++----------
- 1 file changed, 18 insertions(+), 10 deletions(-)
-
-diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
-index a733f7b3c..7c0a63fbb 100644
---- a/sys-utils/setarch.c
-+++ b/sys-utils/setarch.c
-@@ -268,6 +268,7 @@ int main(int argc, char *argv[])
- int c;
- struct arch_domain *doms, *target;
- unsigned long pers_value = 0;
-+ char *shell = NULL, *shell_arg = NULL;
-
- /* Options without equivalent short options */
- enum {
-@@ -310,14 +311,14 @@ int main(int argc, char *argv[])
- archwrapper = strcmp(program_invocation_short_name, "setarch") != 0;
- if (archwrapper) {
- arch = program_invocation_short_name; /* symlinks to setarch */
--#if defined(__sparc64__) || defined(__sparc__)
-+
-+ /* Don't use ifdef sparc here, we get "Unrecognized architecture"
-+ * error message later if necessary */
- if (strcmp(arch, "sparc32bash") == 0) {
-- if (set_arch(arch, 0L, 0))
-- err(EXIT_FAILURE, _("Failed to set personality to %s"), arch);
-- execl("/bin/bash", "", NULL);
-- errexec("/bin/bash");
-+ shell = "/bin/bash";
-+ shell_arg = "";
-+ goto set_arch;
- }
--#endif
- } else {
- if (1 < argc && *argv[1] != '-') {
- arch = argv[1];
-@@ -391,6 +392,7 @@ int main(int argc, char *argv[])
- argc -= optind;
- argv += optind;
-
-+set_arch:
- /* get execution domain (architecture) */
- if (arch) {
- doms = init_arch_domains();
-@@ -422,17 +424,23 @@ int main(int argc, char *argv[])
- if (arch)
- verify_arch_domain(target, arch);
-
-+ if (!argc) {
-+ shell = "/bin/sh";
-+ shell_arg = "-sh";
-+ }
- if (verbose) {
-- printf(_("Execute command `%s'.\n"), argc ? argv[0] : "/bin/sh");
-+ printf(_("Execute command `%s'.\n"), shell ? shell : argv[0]);
- /* flush all output streams before exec */
- fflush(NULL);
- }
-
-- if (!argc) {
-- execl("/bin/sh", "-sh", NULL);
-- errexec("/bin/sh");
-+ /* Execute shell */
-+ if (shell) {
-+ execl(shell, shell_arg, NULL);
-+ errexec(shell);
- }
-
-+ /* Execute on command line specified command */
- execvp(argv[0], argv);
- errexec(argv[0]);
- }
diff --git a/sys-apps/util-linux/util-linux-2.33-r1.ebuild b/sys-apps/util-linux/util-linux-2.33-r1.ebuild
deleted file mode 100644
index 6fe51861efb..00000000000
--- a/sys-apps/util-linux/util-linux-2.33-r1.ebuild
+++ /dev/null
@@ -1,292 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
- pam python-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3 autotools
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- [[ "${PV}" = *_rc* ]] || \
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux"
- SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +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}.
-RDEPEND="caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib:= )
- ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
- nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- !build? ( systemd? ( sys-apps/systemd ) )
- udev? ( virtual/libudev:= )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-RDEPEND+="
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- !net-wireless/rfkill
- !sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-2.7-r1"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch"
- "${FILESDIR}/${P}-sparc-setarch.patch"
-)
-
-src_prepare() {
- default
-
- # Prevent uuidd test failure due to socket path limit. #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- if ! use userland_GNU; then
- # test runner is using GNU-specific xargs call
- sed -i -e 's:xargs:gxargs:' tests/run.sh || die
- # test requires util-linux uuidgen (which we don't build)
- rm tests/ts/uuid/oids || die
- fi
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
-
- # Undo bad ncurses handling by upstream. #601530
- sed -i -E \
- -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
- -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
- configure || die
-
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-python_configure() {
- local myeconfargs=(
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- --with-python
- )
- if use userland_GNU; then
- myeconfargs+=(
- --enable-libblkid
- --enable-libmount
- --enable-pylibmount
- )
- fi
- mkdir "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
-
- local myeconfargs=(
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
- --with-bashcompletiondir="$(get_bashcompdir)"
- --without-python
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(tc-has-tls || echo --disable-tls)
- $(use_enable nls)
- $(use_enable unicode widechar)
- $(use_enable static-libs static)
- $(use_with selinux)
- $(use_with ncurses tinfo)
- )
- # build programs only on GNU, on *BSD we want libraries only
- if multilib_is_native_abi && use userland_GNU; then
- myeconfargs+=(
- --disable-chfn-chsh
- --disable-login
- --disable-nologin
- --disable-pylibmount
- --disable-su
- --enable-agetty
- --enable-bash-completion
- --enable-line
- --enable-partx
- --enable-raw
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- $(use_enable caps setpriv)
- $(use_enable cramfs)
- $(use_enable fdformat)
- $(use_enable tty-helpers mesg)
- $(use_enable tty-helpers wall)
- $(use_enable tty-helpers write)
- $(use_enable kill)
- )
- else
- myeconfargs+=(
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- # build libraries
- --enable-libuuid
- --enable-libblkid
- --enable-libsmartcols
- --enable-libfdisk
- )
- if use userland_GNU; then
- # those libraries don't work on *BSD
- myeconfargs+=(
- --enable-libmount
- )
- fi
- fi
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_configure
- fi
-}
-
-python_compile() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake all
- popd >/dev/null || die
-}
-
-multilib_src_compile() {
- emake all
-
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_compile
- fi
-}
-
-python_test() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- popd >/dev/null || die
-}
-
-multilib_src_test() {
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_test
- fi
-}
-
-python_install() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake DESTDIR="${D}" install
- python_optimize
- popd >/dev/null || die
-}
-
-multilib_src_install() {
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_install
- fi
-
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use userland_GNU; then
- # need the libs in /
- gen_usr_ldscript -a blkid fdisk mount smartcols uuid
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if ! use userland_GNU; then
- # manpage collisions
- # TODO: figure out a good way to keep them
- rm "${ED%/}"/usr/share/man/man3/uuid* || die
- fi
-
- if use pam; then
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
- fi
-
- # Note:
- # Bash completion for "runuser" command is provided by same file which
- # would also provide bash completion for "su" command. However, we don't
- # use "su" command from this package.
- # This triggers a known QA warning which we ignore for now to magically
- # keep bash completion for "su" command which shadow package does not
- # provide.
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
diff --git a/sys-apps/util-linux/util-linux-2.33.1.ebuild b/sys-apps/util-linux/util-linux-2.33.1.ebuild
deleted file mode 100644
index a657fb7e12d..00000000000
--- a/sys-apps/util-linux/util-linux-2.33.1.ebuild
+++ /dev/null
@@ -1,296 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
- pam python-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3 autotools
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- [[ "${PV}" = *_rc* ]] || \
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
- SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +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}.
-RDEPEND="caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib:= )
- ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
- nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- !build? ( systemd? ( sys-apps/systemd ) )
- udev? ( virtual/libudev:= )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-RDEPEND+="
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- !net-wireless/rfkill
- !sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-2.7-r1"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- # In glibc-2.29+, a lot of changes were made to arch-specific
- # handling of `struct termios', which breaks atleast MIPS.
- # The below patch from upstream fixes this, and should be
- # in the next release.
- # See: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=963413a1adf6767ab17712097e288e1a346f63a7
- "${FILESDIR}/${P}-fix-struct_termios-check.patch"
-)
-
-src_prepare() {
- default
-
- # Prevent uuidd test failure due to socket path limit. #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- if ! use userland_GNU; then
- # test runner is using GNU-specific xargs call
- sed -i -e 's:xargs:gxargs:' tests/run.sh || die
- # test requires util-linux uuidgen (which we don't build)
- rm tests/ts/uuid/oids || die
- fi
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
-
- # Undo bad ncurses handling by upstream. #601530
- sed -i -E \
- -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
- -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
- configure || die
-
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-python_configure() {
- local myeconfargs=(
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- --with-python
- )
- if use userland_GNU; then
- myeconfargs+=(
- --enable-libblkid
- --enable-libmount
- --enable-pylibmount
- )
- fi
- mkdir "${BUILD_DIR}" || die
- pushd "${BUILD_DIR}" >/dev/null || die
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
- popd >/dev/null || die
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
-
- local myeconfargs=(
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
- --with-bashcompletiondir="$(get_bashcompdir)"
- --without-python
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(tc-has-tls || echo --disable-tls)
- $(use_enable nls)
- $(use_enable unicode widechar)
- $(use_enable static-libs static)
- $(use_with selinux)
- $(use_with ncurses tinfo)
- )
- # build programs only on GNU, on *BSD we want libraries only
- if multilib_is_native_abi && use userland_GNU; then
- myeconfargs+=(
- --disable-chfn-chsh
- --disable-login
- --disable-nologin
- --disable-pylibmount
- --disable-su
- --enable-agetty
- --enable-bash-completion
- --enable-line
- --enable-partx
- --enable-raw
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- $(use_enable caps setpriv)
- $(use_enable cramfs)
- $(use_enable fdformat)
- $(use_enable tty-helpers mesg)
- $(use_enable tty-helpers wall)
- $(use_enable tty-helpers write)
- $(use_enable kill)
- )
- else
- myeconfargs+=(
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- # build libraries
- --enable-libuuid
- --enable-libblkid
- --enable-libsmartcols
- --enable-libfdisk
- )
- if use userland_GNU; then
- # those libraries don't work on *BSD
- myeconfargs+=(
- --enable-libmount
- )
- fi
- fi
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_configure
- fi
-}
-
-python_compile() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake all
- popd >/dev/null || die
-}
-
-multilib_src_compile() {
- emake all
-
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_compile
- fi
-}
-
-python_test() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- popd >/dev/null || die
-}
-
-multilib_src_test() {
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_test
- fi
-}
-
-python_install() {
- pushd "${BUILD_DIR}" >/dev/null || die
- emake DESTDIR="${D}" install
- python_optimize
- popd >/dev/null || die
-}
-
-multilib_src_install() {
- if multilib_is_native_abi && use python; then
- python_foreach_impl python_install
- fi
-
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use userland_GNU; then
- # need the libs in /
- gen_usr_ldscript -a blkid fdisk mount smartcols uuid
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if ! use userland_GNU; then
- # manpage collisions
- # TODO: figure out a good way to keep them
- rm "${ED%/}"/usr/share/man/man3/uuid* || die
- fi
-
- if use pam; then
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
- fi
-
- # Note:
- # Bash completion for "runuser" command is provided by same file which
- # would also provide bash completion for "su" command. However, we don't
- # use "su" command from this package.
- # This triggers a known QA warning which we ignore for now to magically
- # keep bash completion for "su" command which shadow package does not
- # provide.
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2019-05-26 9:52 Lars Wendler
0 siblings, 0 replies; 27+ messages in thread
From: Lars Wendler @ 2019-05-26 9:52 UTC (permalink / raw
To: gentoo-commits
commit: 57ae9d389abac8b9ed262673172e5212dbe11dbc
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun May 26 09:52:16 2019 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun May 26 09:52:30 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57ae9d38
sys-apps/util-linux: Fixed heap-use-after-free in lsblk
Package-Manager: Portage-2.3.67, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
...ux-2.34_rc1-lsblk_fix_heap_use_after_free.patch | 23 ++++++++++++++++++++++
sys-apps/util-linux/util-linux-2.34_rc1.ebuild | 1 +
2 files changed, 24 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.34_rc1-lsblk_fix_heap_use_after_free.patch b/sys-apps/util-linux/files/util-linux-2.34_rc1-lsblk_fix_heap_use_after_free.patch
new file mode 100644
index 00000000000..41291205c5a
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.34_rc1-lsblk_fix_heap_use_after_free.patch
@@ -0,0 +1,23 @@
+From f6f8a671a9a45125b6261c08b849833bce0f39a8 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Mon, 6 May 2019 12:39:07 +0200
+Subject: [PATCH] lsblk: fix heap-use-after-free
+
+Addresses: https://github.com/karelzak/util-linux/issues/787
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ misc-utils/lsblk.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
+index 34a6cd9ca..30d5d9b4e 100644
+--- a/misc-utils/lsblk.c
++++ b/misc-utils/lsblk.c
+@@ -1560,6 +1560,7 @@ static int process_all_devices(struct lsblk_devtree *tr)
+ if (is_maj_excluded(dev->maj) || !is_maj_included(dev->maj)) {
+ DBG(DEV, ul_debug(" %s: ignore (by filter)", d->d_name));
+ lsblk_devtree_remove_device(tr, dev);
++ dev = NULL;
+ goto next;
+ }
+
diff --git a/sys-apps/util-linux/util-linux-2.34_rc1.ebuild b/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
index b222e422b0f..e45b41732ad 100644
--- a/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
@@ -64,6 +64,7 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
S="${WORKDIR}/${MY_P}"
PATCHES=(
+ "${FILESDIR}"/${P}-lsblk_fix_heap_use_after_free.patch
"${FILESDIR}"/${P}-lscpu_floating_point_exception_fix.patch
)
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2019-05-18 13:06 Lars Wendler
0 siblings, 0 replies; 27+ messages in thread
From: Lars Wendler @ 2019-05-18 13:06 UTC (permalink / raw
To: gentoo-commits
commit: 2cd01ca8bdcbdc612b10b6b69b652ab2904a3574
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat May 18 09:50:18 2019 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat May 18 13:06:21 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cd01ca8
sys-apps/util-linux: Fixed floating point exception in lscpu
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
...34_rc1-lscpu_floating_point_exception_fix.patch | 28 ++++++++++++++++++++++
sys-apps/util-linux/util-linux-2.34_rc1.ebuild | 4 ++++
2 files changed, 32 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.34_rc1-lscpu_floating_point_exception_fix.patch b/sys-apps/util-linux/files/util-linux-2.34_rc1-lscpu_floating_point_exception_fix.patch
new file mode 100644
index 00000000000..b1314e0e44c
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.34_rc1-lscpu_floating_point_exception_fix.patch
@@ -0,0 +1,28 @@
+From 836455917879333e94d4a535aa22f1235b5d4885 Mon Sep 17 00:00:00 2001
+From: Sami Kerola <kerolasa@iki.fi>
+Date: Sat, 18 May 2019 10:19:35 +0100
+Subject: [PATCH] lscpu: fix floating point exception
+
+FIXME: this commit should include vmware_fpe regression test inclusion.
+
+Caused-by: e5f721132ec8b8c933a396d8dcb3efcb67854f13
+Addresses: https://github.com/karelzak/util-linux/issues/788
+Reported-by: Lars Wendler <polynomial-c@gentoo.org>
+Signed-off-by: Sami Kerola <kerolasa@iki.fi>
+---
+ sys-utils/lscpu.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
+index ca7f6a037..7f6277f00 100644
+--- a/sys-utils/lscpu.c
++++ b/sys-utils/lscpu.c
+@@ -1925,6 +1925,8 @@ static int get_cache_full_size(struct lscpu_desc *desc,
+ /* Correction for CPU threads */
+ if (desc->nthreads > desc->ncores)
+ nshares /= (desc->nthreads / desc->ncores);
++ if (nshares < 1)
++ nshares = 1;
+
+ *res = (desc->ncores / nshares) * ca->size;
+ return 0;
diff --git a/sys-apps/util-linux/util-linux-2.34_rc1.ebuild b/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
index 1c6fd4ea22a..b222e422b0f 100644
--- a/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.34_rc1.ebuild
@@ -63,6 +63,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}"/${P}-lscpu_floating_point_exception_fix.patch
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2019-03-24 19:45 Joshua Kinard
0 siblings, 0 replies; 27+ messages in thread
From: Joshua Kinard @ 2019-03-24 19:45 UTC (permalink / raw
To: gentoo-commits
commit: 14577373ea94b996b856cad1c7f837fb79032d2f
Author: Joshua Kinard <kumba <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 24 19:43:33 2019 +0000
Commit: Joshua Kinard <kumba <AT> gentoo <DOT> org>
CommitDate: Sun Mar 24 19:45:12 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14577373
sys-apps/util-linux: Build fix on MIPS from upstream
In glibc-2.29, the definitions of 'struct termios' were consolidated
across architectures. This causes a build error in util-linux on MIPS
due to undefined struct members 'c_ospeed' and 'c_ispeed', which MIPS
does not have. The included patch from upstream fixes this, and should
be in the next util-linux release.
Signed-off-by: Joshua Kinard <kumba <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.12
...til-linux-2.33.1-fix-struct_termios-check.patch | 30 ++++++++++++++++++++++
sys-apps/util-linux/util-linux-2.33.1.ebuild | 7 +++++
2 files changed, 37 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.33.1-fix-struct_termios-check.patch b/sys-apps/util-linux/files/util-linux-2.33.1-fix-struct_termios-check.patch
new file mode 100644
index 00000000000..df52af45049
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.33.1-fix-struct_termios-check.patch
@@ -0,0 +1,30 @@
+From 963413a1adf6767ab17712097e288e1a346f63a7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Jan 2019 22:38:25 -0800
+Subject: [PATCH] ldattach: Check for value of _HAVE_STRUCT_TERMIOS_C_ISPEED
+
+in glibc 2.29+ checking for just existence of _HAVE_STRUCT_TERMIOS_C_ISPEED
+won't be enough, the value has to be checked
+
+see
+https://sourceware.org/git/?p=glibc.git;a=commit;h=e5a50db36eaa6e8c6427b3a971563240b633ca85
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sys-utils/ldattach.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c
+index d33d68535..fb50711eb 100644
+--- a/sys-utils/ldattach.c
++++ b/sys-utils/ldattach.c
+@@ -242,7 +242,7 @@ static int my_cfsetspeed(struct termios *ts, int speed)
+ * -- we have to bypass glibc and set the speed manually (because glibc
+ * checks for speed and supports Bxxx bit rates only)...
+ */
+-#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
++#if _HAVE_STRUCT_TERMIOS_C_ISPEED
+ # define BOTHER 0010000 /* non standard rate */
+ dbg("using non-standard speeds");
+ ts->c_ospeed = ts->c_ispeed = speed;
+
diff --git a/sys-apps/util-linux/util-linux-2.33.1.ebuild b/sys-apps/util-linux/util-linux-2.33.1.ebuild
index a671878bc14..503832c70fa 100644
--- a/sys-apps/util-linux/util-linux-2.33.1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.33.1.ebuild
@@ -90,6 +90,13 @@ src_prepare() {
configure || die
elibtoolize
+
+ # In glibc-2.29+, a lot of changes were made to arch-specific
+ # handling of `struct termios', which breaks atleast MIPS.
+ # The below patch from upstream fixes this, and should be
+ # in the next release.
+ # See: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=963413a1adf6767ab17712097e288e1a346f63a7
+ epatch "${FILESDIR}/${P}-fix-struct_termios-check.patch"
}
lfs_fallocate_test() {
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2018-11-11 1:50 Thomas Deutschmann
0 siblings, 0 replies; 27+ messages in thread
From: Thomas Deutschmann @ 2018-11-11 1:50 UTC (permalink / raw
To: gentoo-commits
commit: ecacc00aef905d57b8f8e6eccd21473494d53c72
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 01:50:12 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 11 01:50:25 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecacc00a
sys-apps/util-linux: fix oids test
Closes: https://bugs.gentoo.org/657640
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
...p-oids-test-when-uuidgen-is-not-available.patch | 41 ++++++++++++++++++++++
sys-apps/util-linux/util-linux-2.32.1-r1.ebuild | 1 +
sys-apps/util-linux/util-linux-2.33.ebuild | 4 +++
sys-apps/util-linux/util-linux-9999.ebuild | 4 +++
4 files changed, 50 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch b/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch
new file mode 100644
index 00000000000..743dc89e242
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch
@@ -0,0 +1,41 @@
+From 8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Sun, 11 Nov 2018 02:17:55 +0100
+Subject: [PATCH] tests: run oids test only when uuidgen tool was built
+
+oids test did not check if uuidgen was available.
+
+oids test was also calling uuidgen from PATH which could result
+in wrong results if uuidgen from a previous util-linux installation
+was used.
+
+With this commit we will check if uuidgen was built and make sure
+that we only call the uuidgen binary we just built. If uuidgen is
+not available we will skip this test.
+---
+ tests/ts/uuid/oids | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/tests/ts/uuid/oids b/tests/ts/uuid/oids
+index 3b005c5b2..77e010c1d 100755
+--- a/tests/ts/uuid/oids
++++ b/tests/ts/uuid/oids
+@@ -20,12 +20,14 @@ ts_init "$*"
+
+ : . > $TS_OUTPUT
+
+-uuidgen --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
++ts_check_test_command "$TS_CMD_UUIDGEN"
+
+-uuidgen --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
++$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
+
+-uuidgen --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
++$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
+
+-uuidgen --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
++$TS_CMD_UUIDGEN --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
++
++$TS_CMD_UUIDGEN --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
+
+ ts_finalize
diff --git a/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild
index 8334aa825c1..954f4398edf 100644
--- a/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild
@@ -65,6 +65,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/util-linux-2.32-python3-tests.patch"
+ "${FILESDIR}/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch"
)
src_prepare() {
diff --git a/sys-apps/util-linux/util-linux-2.33.ebuild b/sys-apps/util-linux/util-linux-2.33.ebuild
index 2e987185feb..e93eae675f8 100644
--- a/sys-apps/util-linux/util-linux-2.33.ebuild
+++ b/sys-apps/util-linux/util-linux-2.33.ebuild
@@ -63,6 +63,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch"
+)
+
src_prepare() {
default
diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild
index cdfc75a44ba..78f587fe30c 100644
--- a/sys-apps/util-linux/util-linux-9999.ebuild
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -63,6 +63,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch"
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2018-09-26 13:35 Lars Wendler
0 siblings, 0 replies; 27+ messages in thread
From: Lars Wendler @ 2018-09-26 13:35 UTC (permalink / raw
To: gentoo-commits
commit: fd738e2f9e26c7b42779593cabf9634663fa4f5f
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 26 13:34:15 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Sep 26 13:35:02 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd738e2f
sys-apps/util-linux: Removed old.
Package-Manager: Portage-2.3.50, Repoman-2.3.11
sys-apps/util-linux/Manifest | 1 -
.../util-linux-2.32_rc2-umount_completion.patch | 41 ----
sys-apps/util-linux/util-linux-2.30.2-r1.ebuild | 212 ------------------
sys-apps/util-linux/util-linux-2.32-r5.ebuild | 242 ---------------------
4 files changed, 496 deletions(-)
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index 18bd746f782..c05e3967f53 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -1,4 +1,3 @@
-DIST util-linux-2.30.2.tar.xz 4442624 BLAKE2B 7b76e255c9ee4d8b8f65f037a735808233edcdb8dce951038ae8983a3f4a6e493458622f6c7f6ce68d38672ac6dc5258b45b787c196dabede41cb19afc76e545 SHA512 b92ec16d5e8a405ad9ebbac8673bb49c5bf0a7f630118477f12c7a3c6b3b3ee5d56868632dd71fffd5c0434821207c2769f6859b9d398c2df770ec6487d7c32d
DIST util-linux-2.32.1.tar.xz 4561088 BLAKE2B 9e89b7fa2eacd51ad8c5cf90cc78df73de5d414c1039bb38784a376841806c1e0d38b702d29c6a8e91a2c3464fec1edcf68caaaa655400db2e5be483eb5efbcf SHA512 267fedae24a874ee4dc558081f6b8d07b33b955b0635f3348f021c111c17f2e95c01b2cbf909fe13c6ca448cbcf23c658c75f72f25749aa65e99f68fabb94698
DIST util-linux-2.32.tar.xz 4550128 BLAKE2B 0ce22bf93f98ac9827632094b2c3d50280da40394b910e483bf697c8751d532fea7006195baeef0dbc14708edd1204db8e2c87b22bd9f799911c61144a531bb0 SHA512 320c8d364f014aba16483dd26564d7cb47804337567c3e9c2dc495f3865f524e7480d3fec7ef5a05b6e99763b0278da70fffe6d2b88f3f1a832ada5932556482
DIST util-linux-2.33-rc1.tar.xz 4619236 BLAKE2B cee133c9d17fd86c5750d3a53e86d0beae2a53db7cf56b7602a7d497d5d615a85ed21ec8349b4a30b5d5dce3e29b3ac421e969b2a9230efca89ed8260f120352 SHA512 7a9de1a60854892f8b3215964a1a934d1fbcce92e159e542977094cbf12e156f37954764cf955e911f28411b8996ac1496c471d560d534204f9b6970dd605684
diff --git a/sys-apps/util-linux/files/util-linux-2.32_rc2-umount_completion.patch b/sys-apps/util-linux/files/util-linux-2.32_rc2-umount_completion.patch
deleted file mode 100644
index 1317c56f89e..00000000000
--- a/sys-apps/util-linux/files/util-linux-2.32_rc2-umount_completion.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 75f03badd7ed9f1dd951863d75e756883d3acc55 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Thu, 16 Nov 2017 16:27:32 +0100
-Subject: [PATCH] bash-completion: (umount) use findmnt, escape a space in
- paths
-
- # mount /dev/sdc1 /mnt/test/foo\ bar
- # umount <tab>
-
-has to return "/mnt/test/foo\ bar".
-
-Changes:
-
- * don't use mount | awk output, we have findmnt
- * force compgen use \n as entries separator
-
-Addresses: https://github.com/karelzak/util-linux/issues/539
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- bash-completion/umount | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/bash-completion/umount b/bash-completion/umount
-index d76cb9fff..98c90d61a 100644
---- a/bash-completion/umount
-+++ b/bash-completion/umount
-@@ -40,9 +40,10 @@ _umount_module()
- return 0
- ;;
- esac
-- local DEVS_MPOINTS
-- DEVS_MPOINTS="$(mount | awk '{print $1, $3}')"
-- COMPREPLY=( $(compgen -W "$DEVS_MPOINTS" -- $cur) )
-- return 0
-+
-+ local oldifs=$IFS
-+ IFS=$'\n'
-+ COMPREPLY=( $( compgen -W '$(findmnt -lno TARGET | sed "s/\([[:blank:]]\)/\\\\\1/g")' -- "$cur" ) )
-+ IFS=$oldifs
- }
- complete -F _umount_module umount
diff --git a/sys-apps/util-linux/util-linux-2.30.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.30.2-r1.ebuild
deleted file mode 100644
index dae5303c3ee..00000000000
--- a/sys-apps/util-linux/util-linux-2.30.2-r1.ebuild
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
- pam python-single-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3 autotools
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- [[ "${PV}" = *_rc* ]] || \
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
- SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
-
-# Most lib deps here are related to programs rather than our libs,
-# so we rarely need to specify ${MULTILIB_USEDEP}.
-RDEPEND="caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- !build? ( systemd? ( sys-apps/systemd ) )
- udev? ( virtual/libudev:= )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-RDEPEND+="
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- !sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-2.3-r2
- !<sys-apps/s390-tools-1.36.1-r1"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.32_rc2-umount_completion.patch" #649812
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Prevent uuidd test failure due to socket path limit. #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
-
- # Undo bad ncurses handling by upstream. #601530
- sed -i -E \
- -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
- -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
- configure || die
-
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
-
- local myeconfargs=(
- --disable-chfn-chsh
- --disable-login
- --disable-nologin
- --disable-reset
- --disable-su
- --docdir='${datarootdir}'/doc/${PF}
- --enable-agetty
- --enable-bash-completion
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
- --enable-line
- --enable-partx
- --enable-raw
- --enable-rename
- --enable-schedutils
- --with-bashcompletiondir="$(get_bashcompdir)"
- --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no")
- $(multilib_native_use_enable caps setpriv)
- $(multilib_native_use_enable cramfs)
- $(multilib_native_use_enable fdformat)
- $(multilib_native_use_enable nls)
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_enable tty-helpers mesg)
- $(multilib_native_use_enable tty-helpers wall)
- $(multilib_native_use_enable tty-helpers write)
- $(multilib_native_use_with python)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(tc-has-tls || echo --disable-tls)
- $(use_enable unicode widechar)
- $(use_enable kill)
- $(use_enable static-libs static)
- $(use_with selinux)
- $(usex ncurses '' '--without-tinfo')
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
- else
- # build libraries only
- emake -f Makefile -f - mylibs \
- <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- default
- else
- emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
- install-pkgconfigDATA install-uuidincHEADERS \
- install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
- install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
- fi
-
- if multilib_is_native_abi; then
- # need the libs in /
- gen_usr_ldscript -a blkid mount smartcols uuid
-
- use python && python_optimize
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if use pam; then
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
- fi
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
diff --git a/sys-apps/util-linux/util-linux-2.32-r5.ebuild b/sys-apps/util-linux/util-linux-2.32-r5.ebuild
deleted file mode 100644
index 9c2f9a602d9..00000000000
--- a/sys-apps/util-linux/util-linux-2.32-r5.ebuild
+++ /dev/null
@@ -1,242 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
- pam python-single-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3 autotools
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- [[ "${PV}" = *_rc* ]] || \
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
- SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +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}.
-RDEPEND="caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib:= )
- ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
- nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- !build? ( systemd? ( sys-apps/systemd ) )
- udev? ( virtual/libudev:= )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-RDEPEND+="
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- !net-wireless/rfkill
- !sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-2.7-r1"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/util-linux-2.32-python3-tests.patch"
-)
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- eapply "${FILESDIR}"/${P}-add-missing-lintl.patch
- touch -r "${S}"/configure "${S}"/libsmartcols/src/Makemodule.am || die
- touch -r "${S}"/configure "${S}"/libuuid/src/Makemodule.am || die
-
- # Prevent uuidd test failure due to socket path limit. #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- if ! use userland_GNU; then
- # test runner is using GNU-specific xargs call
- sed -i -e 's:xargs:gxargs:' tests/run.sh || die
- # test requires util-linux uuidgen (which we don't build)
- rm tests/ts/uuid/oids || die
- fi
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
-
- # Undo bad ncurses handling by upstream. #601530
- sed -i -E \
- -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
- -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
- configure || die
-
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
-
- local myeconfargs=(
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
- --with-bashcompletiondir="$(get_bashcompdir)"
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_with python)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(tc-has-tls || echo --disable-tls)
- $(use_enable nls)
- $(use_enable unicode widechar)
- $(use_enable static-libs static)
- $(use_with selinux)
- $(usex ncurses '' '--without-tinfo')
- )
- # build programs only on GNU, on *BSD we want libraries only
- if multilib_is_native_abi && use userland_GNU; then
- myeconfargs+=(
- --disable-chfn-chsh
- --disable-login
- --disable-nologin
- --disable-su
- --enable-agetty
- --enable-bash-completion
- --enable-line
- --enable-partx
- --enable-raw
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
- $(use_enable caps setpriv)
- $(use_enable cramfs)
- $(use_enable fdformat)
- $(use_enable tty-helpers mesg)
- $(use_enable tty-helpers wall)
- $(use_enable tty-helpers write)
- $(use_enable kill)
- )
- else
- myeconfargs+=(
- --disable-all-programs
- --disable-bash-completion
- --without-systemdsystemunitdir
- # build libraries
- --enable-libuuid
- --enable-libblkid
- --enable-libsmartcols
- --enable-libfdisk
- )
- if use userland_GNU; then
- # those libraries don't work on *BSD
- myeconfargs+=(
- --enable-libmount
- )
- fi
- fi
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_test() {
- emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- if multilib_is_native_abi && use userland_GNU; then
- # need the libs in /
- gen_usr_ldscript -a blkid fdisk mount smartcols uuid
-
- use python && python_optimize
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if ! use userland_GNU; then
- # manpage collisions
- # TODO: figure out a good way to keep them
- rm "${ED%/}"/usr/share/man/man3/uuid* || die
- fi
-
- if use pam; then
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
- fi
-
- # Note:
- # Bash completion for "runuser" command is provided by same file which
- # would also provide bash completion for "su" command. However, we don't
- # use "su" command from this package.
- # This triggers a known QA warning which we ignore for now to magically
- # keep bash completion for "su" command which shadow package does not
- # provide.
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2018-03-07 9:28 Lars Wendler
0 siblings, 0 replies; 27+ messages in thread
From: Lars Wendler @ 2018-03-07 9:28 UTC (permalink / raw
To: gentoo-commits
commit: c7127c999bb10a2fd2e7e73fb5154291327715ad
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 7 09:20:54 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Mar 7 09:20:54 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7127c99
sys-apps/util-linux: Removed old.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/util-linux/Manifest | 1 -
.../util-linux-2.31-too_generic_symbols_pt1.patch | 207 ------------
.../util-linux-2.31-too_generic_symbols_pt2.patch | 355 ---------------------
.../util-linux-2.31-too_generic_symbols_pt3.patch | 43 ---
sys-apps/util-linux/util-linux-2.31-r1.ebuild | 213 -------------
5 files changed, 819 deletions(-)
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index 856fed3eca1..b504d445e33 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -1,4 +1,3 @@
DIST util-linux-2.30.2.tar.xz 4442624 BLAKE2B 7b76e255c9ee4d8b8f65f037a735808233edcdb8dce951038ae8983a3f4a6e493458622f6c7f6ce68d38672ac6dc5258b45b787c196dabede41cb19afc76e545 SHA512 b92ec16d5e8a405ad9ebbac8673bb49c5bf0a7f630118477f12c7a3c6b3b3ee5d56868632dd71fffd5c0434821207c2769f6859b9d398c2df770ec6487d7c32d
DIST util-linux-2.31.1.tar.xz 4510096 BLAKE2B f2e4a398fe4ecc0bbfb7c2240698e3a37deed57eb48a028ddfb578ecc057c1c928b2082d13014f0dfdaf5a8274ee3a13993fdbc19b7e05e5a992505ac90de79a SHA512 d45c1e62e39f5d5c7a642071e7ccce44fe4ecaafec54d8c9a4e9d526280a6e25723bfa0eb068401e291579c0d067661775bbe085190d13ff16493f47360b7760
-DIST util-linux-2.31.tar.xz 4503892 BLAKE2B 8a9e2fc674cacbfabfc76cc0ab671f3fdb35d49de9f4ae8660b49df9e196878c2459d8fc57f6c9b6d2ad73cc56d970656ffcbc22deed97bb7a0cc28490a1fbb0 SHA512 48b668526e96a132736b882090d0e33c20b4b3a0e1760502d83118ed98ccc9423d310848a2bb73f82f85e9c19f6191075ae2c5269b007e76be1fbd7b6b88fbf5
DIST util-linux-2.32-rc2.tar.xz 4552488 BLAKE2B 31b17eff5e500f27e80f8354ebd71fa04c6c3faa8c17a36399362de5f6f8de7ae0344844325053dd680ba5b1ac48ed1b28ab20f76a1ea89d065dd01d1ae1215a SHA512 a7c3b5b84fa78aded1fc7b4e3111c140512f5e2e5851162659423a3905eadd746d65beedd3faf813b77e823d63f3c9b33db1f44f7b85e9006ff64f82fb3cadb7
diff --git a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt1.patch b/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt1.patch
deleted file mode 100644
index aa296d2bf2f..00000000000
--- a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt1.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-From ff5feb96ec70e8a3fde41bd591b28c9855dab3fc Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Tue, 12 Dec 2017 11:29:02 +0100
-Subject: [PATCH] lib/sha1: use ul_/UL_prefix for symbols
-
-Unfortunately, the symbols are visible in statically compiled libuuid
-and the names are too generic.
-
-Addresses: https://github.com/karelzak/util-linux/issues/548
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- include/sha1.h | 49 +++++++++++++++----------------------------------
- lib/sha1.c | 34 +++++++++++++++++-----------------
- libuuid/src/gen_uuid.c | 12 ++++++------
- 3 files changed, 38 insertions(+), 57 deletions(-)
-
-diff --git a/include/sha1.h b/include/sha1.h
-index 5c28bce92..62af1da6f 100644
---- a/include/sha1.h
-+++ b/include/sha1.h
-@@ -1,5 +1,5 @@
--#ifndef SHA1_H
--#define SHA1_H
-+#ifndef UTIL_LINUX_SHA1_H
-+#define UTIL_LINUX_SHA1_H
-
- /*
- SHA-1 in C
-@@ -9,38 +9,19 @@
-
- #include "stdint.h"
-
--#define SHA1LENGTH 20
-+#define UL_SHA1LENGTH 20
-
- typedef struct
- {
-- uint32_t state[5];
-- uint32_t count[2];
-- unsigned char buffer[64];
--} SHA1_CTX;
--
--void SHA1Transform(
-- uint32_t state[5],
-- const unsigned char buffer[64]
-- );
--
--void SHA1Init(
-- SHA1_CTX * context
-- );
--
--void SHA1Update(
-- SHA1_CTX * context,
-- const unsigned char *data,
-- uint32_t len
-- );
--
--void SHA1Final(
-- unsigned char digest[SHA1LENGTH],
-- SHA1_CTX * context
-- );
--
--void SHA1(
-- char *hash_out,
-- const char *str,
-- unsigned len);
--
--#endif /* SHA1_H */
-+ uint32_t state[5];
-+ uint32_t count[2];
-+ unsigned char buffer[64];
-+} UL_SHA1_CTX;
-+
-+void ul_SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
-+void ul_SHA1Init(UL_SHA1_CTX *context);
-+void ul_SHA1Update(UL_SHA1_CTX *context, const unsigned char *data, uint32_t len);
-+void ul_SHA1Final(unsigned char digest[UL_SHA1LENGTH], UL_SHA1_CTX *context);
-+void ul_SHA1(char *hash_out, const char *str, unsigned len);
-+
-+#endif /* UTIL_LINUX_SHA1_H */
-diff --git a/lib/sha1.c b/lib/sha1.c
-index a2ac7f8ef..62c036774 100644
---- a/lib/sha1.c
-+++ b/lib/sha1.c
-@@ -51,7 +51,7 @@ A million repetitions of "a"
-
- /* Hash a single 512-bit block. This is the core of the algorithm. */
-
--void SHA1Transform(
-+void ul_SHA1Transform(
- uint32_t state[5],
- const unsigned char buffer[64]
- )
-@@ -179,8 +179,8 @@ void SHA1Transform(
-
- /* SHA1Init - Initialize new context */
-
--void SHA1Init(
-- SHA1_CTX * context
-+void ul_SHA1Init(
-+ UL_SHA1_CTX * context
- )
- {
- /* SHA1 initialization constants */
-@@ -195,8 +195,8 @@ void SHA1Init(
-
- /* Run your data through this. */
-
--void SHA1Update(
-- SHA1_CTX * context,
-+void ul_SHA1Update(
-+ UL_SHA1_CTX * context,
- const unsigned char *data,
- uint32_t len
- )
-@@ -213,10 +213,10 @@ void SHA1Update(
- if ((j + len) > 63)
- {
- memcpy(&context->buffer[j], data, (i = 64 - j));
-- SHA1Transform(context->state, context->buffer);
-+ ul_SHA1Transform(context->state, context->buffer);
- for (; i + 63 < len; i += 64)
- {
-- SHA1Transform(context->state, &data[i]);
-+ ul_SHA1Transform(context->state, &data[i]);
- }
- j = 0;
- }
-@@ -228,9 +228,9 @@ void SHA1Update(
-
- /* Add padding and return the message digest. */
-
--void SHA1Final(
-+void ul_SHA1Final(
- unsigned char digest[20],
-- SHA1_CTX * context
-+ UL_SHA1_CTX * context
- )
- {
- unsigned i;
-@@ -262,13 +262,13 @@ void SHA1Final(
- }
- #endif
- c = 0200;
-- SHA1Update(context, &c, 1);
-+ ul_SHA1Update(context, &c, 1);
- while ((context->count[0] & 504) != 448)
- {
- c = 0000;
-- SHA1Update(context, &c, 1);
-+ ul_SHA1Update(context, &c, 1);
- }
-- SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
-+ ul_SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
- for (i = 0; i < 20; i++)
- {
- digest[i] = (unsigned char)
-@@ -279,18 +279,18 @@ void SHA1Final(
- memset(&finalcount, '\0', sizeof(finalcount));
- }
-
--void SHA1(
-+void ul_SHA1(
- char *hash_out,
- const char *str,
- unsigned len)
- {
-- SHA1_CTX ctx;
-+ UL_SHA1_CTX ctx;
- unsigned int ii;
-
-- SHA1Init(&ctx);
-+ ul_SHA1Init(&ctx);
- for (ii=0; ii<len; ii+=1)
-- SHA1Update(&ctx, (const unsigned char*)str + ii, 1);
-- SHA1Final((unsigned char *)hash_out, &ctx);
-+ ul_SHA1Update(&ctx, (const unsigned char*)str + ii, 1);
-+ ul_SHA1Final((unsigned char *)hash_out, &ctx);
- hash_out[20] = '\0';
- }
-
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index cf7cacd55..431bf2064 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -589,15 +589,15 @@ void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len
- */
- void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t len)
- {
-- SHA1_CTX ctx;
-- char hash[SHA1LENGTH];
-+ UL_SHA1_CTX ctx;
-+ char hash[UL_SHA1LENGTH];
-
-- SHA1Init(&ctx);
-+ ul_SHA1Init(&ctx);
- /* hash concatenation of well-known UUID with name */
-- SHA1Update(&ctx, ns, sizeof(uuid_t));
-- SHA1Update(&ctx, (const unsigned char *)name, len);
-+ ul_SHA1Update(&ctx, ns, sizeof(uuid_t));
-+ ul_SHA1Update(&ctx, (const unsigned char *)name, len);
-
-- SHA1Final((unsigned char *)hash, &ctx);
-+ ul_SHA1Final((unsigned char *)hash, &ctx);
-
- memcpy(out, hash, sizeof(uuid_t));
-
diff --git a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt2.patch b/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt2.patch
deleted file mode 100644
index f8276ec391c..00000000000
--- a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt2.patch
+++ /dev/null
@@ -1,355 +0,0 @@
-From 09a69dfc7720d5e0b7a646978a00a7c7a4411c37 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Tue, 12 Dec 2017 11:54:08 +0100
-Subject: [PATCH] lib/md5: use ul_/UL_ prefix
-
-The symbols names are too generic.
-
-Addresses: https://github.com/karelzak/util-linux/issues/548
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- disk-utils/mkfs.cramfs.c | 13 +++++++------
- include/md5.h | 25 ++++++++++---------------
- lib/md5.c | 26 +++++++++++++-------------
- libblkid/src/superblocks/hfs.c | 16 +++++++++-------
- libuuid/src/gen_uuid.c | 12 ++++++------
- misc-utils/mcookie.c | 14 +++++++-------
- tests/helpers/test_md5.c | 12 ++++++------
- 7 files changed, 58 insertions(+), 60 deletions(-)
-
-diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
-index a3e9aa48c..729765078 100644
---- a/disk-utils/mkfs.cramfs.c
-+++ b/disk-utils/mkfs.cramfs.c
-@@ -98,7 +98,7 @@ struct entry {
- /* stats */
- unsigned char *name;
- unsigned int mode, size, uid, gid;
-- unsigned char md5sum[MD5LENGTH];
-+ unsigned char md5sum[UL_MD5LENGTH];
- unsigned char flags; /* CRAMFS_EFLAG_* */
-
- /* FS data */
-@@ -194,16 +194,17 @@ do_munmap(char *start, unsigned int size, unsigned int mode){
- /* compute md5sums, so that we do not have to compare every pair of files */
- static void
- mdfile(struct entry *e) {
-- MD5_CTX ctx;
- char *start;
-
- start = do_mmap(e->path, e->size, e->mode);
- if (start == NULL) {
- e->flags |= CRAMFS_EFLAG_INVALID;
- } else {
-- MD5Init(&ctx);
-- MD5Update(&ctx, (unsigned char *) start, e->size);
-- MD5Final(e->md5sum, &ctx);
-+ UL_MD5_CTX ctx;
-+
-+ ul_MD5Init(&ctx);
-+ ul_MD5Update(&ctx, (unsigned char *) start, e->size);
-+ ul_MD5Final(e->md5sum, &ctx);
-
- do_munmap(start, e->size, e->mode);
-
-@@ -255,7 +256,7 @@ static int find_identical_file(struct entry *orig, struct entry *new, loff_t *fs
-
- if ((orig->flags & CRAMFS_EFLAG_MD5) &&
- (new->flags & CRAMFS_EFLAG_MD5) &&
-- !memcmp(orig->md5sum, new->md5sum, MD5LENGTH) &&
-+ !memcmp(orig->md5sum, new->md5sum, UL_MD5LENGTH) &&
- identical_file(orig, new)) {
- new->same = orig;
- *fslen_ub -= new->size;
-diff --git a/include/md5.h b/include/md5.h
-index d997e379d..d6991e1fd 100644
---- a/include/md5.h
-+++ b/include/md5.h
-@@ -1,29 +1,24 @@
--#ifndef MD5_H
--#define MD5_H
-+#ifndef UTIL_LINUX_MD5_H
-+#define UTIL_LINUX_MD5_H
-
--#ifdef HAVE_STDINT_H
- #include <stdint.h>
--#else
--typedef unsigned int uint32_t;
--#endif
-
--#define MD5LENGTH 16
-+#define UL_MD5LENGTH 16
-
--struct MD5Context {
-+struct UL_MD5Context {
- uint32_t buf[4];
- uint32_t bits[2];
- unsigned char in[64];
- };
-
--void MD5Init(struct MD5Context *context);
--void MD5Update(struct MD5Context *context, unsigned char const *buf,
-- unsigned len);
--void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *context);
--void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
-+void ul_MD5Init(struct UL_MD5Context *context);
-+void ul_MD5Update(struct UL_MD5Context *context, unsigned char const *buf, unsigned len);
-+void ul_MD5Final(unsigned char digest[UL_MD5LENGTH], struct UL_MD5Context *context);
-+void ul_MD5Transform(uint32_t buf[4], uint32_t const in[16]);
-
- /*
- * This is needed to make RSAREF happy on some MS-DOS compilers.
- */
--typedef struct MD5Context MD5_CTX;
-+typedef struct UL_MD5Context UL_MD5_CTX;
-
--#endif /* !MD5_H */
-+#endif /* !UTIL_LINUX_MD5_H */
-diff --git a/lib/md5.c b/lib/md5.c
-index 282e2d22a..3765ab93e 100644
---- a/lib/md5.c
-+++ b/lib/md5.c
-@@ -19,7 +19,7 @@
- #include "md5.h"
-
- #if !defined(WORDS_BIGENDIAN)
--#define byteReverse(buf, len) /* Nothing */
-+# define byteReverse(buf, len) /* Nothing */
- #else
- static void byteReverse(unsigned char *buf, unsigned longs);
-
-@@ -37,14 +37,14 @@ static void byteReverse(unsigned char *buf, unsigned longs)
- buf += 4;
- } while (--longs);
- }
--#endif
--#endif
-+#endif /* !ASM_MD5 */
-+#endif /* !WORDS_BIGENDIAN */
-
- /*
- * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
- * initialization constants.
- */
--void MD5Init(struct MD5Context *ctx)
-+void ul_MD5Init(struct UL_MD5Context *ctx)
- {
- ctx->buf[0] = 0x67452301;
- ctx->buf[1] = 0xefcdab89;
-@@ -59,7 +59,7 @@ void MD5Init(struct MD5Context *ctx)
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
--void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
-+void ul_MD5Update(struct UL_MD5Context *ctx, unsigned char const *buf, unsigned len)
- {
- uint32_t t;
-
-@@ -84,7 +84,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
- }
- memcpy(p, buf, t);
- byteReverse(ctx->in, 16);
-- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
-+ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in);
- buf += t;
- len -= t;
- }
-@@ -93,7 +93,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
- while (len >= 64) {
- memcpy(ctx->in, buf, 64);
- byteReverse(ctx->in, 16);
-- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
-+ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in);
- buf += 64;
- len -= 64;
- }
-@@ -104,10 +104,10 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
- }
-
- /*
-- * Final wrapup - pad to 64-byte boundary with the bit pattern
-+ * Final wrapup - pad to 64-byte boundary with the bit pattern
- * 1 0* (64-bit count of bits processed, MSB-first)
- */
--void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx)
-+void ul_MD5Final(unsigned char digest[UL_MD5LENGTH], struct UL_MD5Context *ctx)
- {
- unsigned count;
- unsigned char *p;
-@@ -128,7 +128,7 @@ void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx)
- /* Two lots of padding: Pad the first block to 64 bytes */
- memset(p, 0, count);
- byteReverse(ctx->in, 16);
-- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
-+ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in);
-
- /* Now fill the next block with 56 bytes */
- memset(ctx->in, 0, 56);
-@@ -145,9 +145,9 @@ void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx)
- memcpy(&ctx->in[14 * sizeof(uint32_t)], &ctx->bits[0], 4);
- memcpy(&ctx->in[15 * sizeof(uint32_t)], &ctx->bits[1], 4);
-
-- MD5Transform(ctx->buf, (uint32_t *) ctx->in);
-+ ul_MD5Transform(ctx->buf, (uint32_t *) ctx->in);
- byteReverse((unsigned char *) ctx->buf, 4);
-- memcpy(digest, ctx->buf, MD5LENGTH);
-+ memcpy(digest, ctx->buf, UL_MD5LENGTH);
- memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
- }
-
-@@ -170,7 +170,7 @@ void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *ctx)
- * reflect the addition of 16 longwords of new data. MD5Update blocks
- * the data and converts bytes into longwords for this routine.
- */
--void MD5Transform(uint32_t buf[4], uint32_t const in[16])
-+void ul_MD5Transform(uint32_t buf[4], uint32_t const in[16])
- {
- register uint32_t a, b, c, d;
-
-diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c
-index c2344114a..19f14ed0d 100644
---- a/libblkid/src/superblocks/hfs.c
-+++ b/libblkid/src/superblocks/hfs.c
-@@ -130,19 +130,21 @@ struct hfsplus_vol_header {
-
- static int hfs_set_uuid(blkid_probe pr, unsigned char const *hfs_info, size_t len)
- {
-- static unsigned char const hash_init[MD5LENGTH] = {
-+ static unsigned char const hash_init[UL_MD5LENGTH] = {
- 0xb3, 0xe2, 0x0f, 0x39, 0xf2, 0x92, 0x11, 0xd6,
- 0x97, 0xa4, 0x00, 0x30, 0x65, 0x43, 0xec, 0xac
- };
-- unsigned char uuid[MD5LENGTH];
-- struct MD5Context md5c;
-+ unsigned char uuid[UL_MD5LENGTH];
-+ struct UL_MD5Context md5c;
-
- if (memcmp(hfs_info, "\0\0\0\0\0\0\0\0", len) == 0)
- return -1;
-- MD5Init(&md5c);
-- MD5Update(&md5c, hash_init, MD5LENGTH);
-- MD5Update(&md5c, hfs_info, len);
-- MD5Final(uuid, &md5c);
-+
-+ ul_MD5Init(&md5c);
-+ ul_MD5Update(&md5c, hash_init, UL_MD5LENGTH);
-+ ul_MD5Update(&md5c, hfs_info, len);
-+ ul_MD5Final(uuid, &md5c);
-+
- uuid[6] = 0x30 | (uuid[6] & 0x0f);
- uuid[8] = 0x80 | (uuid[8] & 0x3f);
- return blkid_probe_set_uuid(pr, uuid);
-diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
-index 431bf2064..a374e75c9 100644
---- a/libuuid/src/gen_uuid.c
-+++ b/libuuid/src/gen_uuid.c
-@@ -564,15 +564,15 @@ void uuid_generate(uuid_t out)
- */
- void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len)
- {
-- MD5_CTX ctx;
-- char hash[MD5LENGTH];
-+ UL_MD5_CTX ctx;
-+ char hash[UL_MD5LENGTH];
-
-- MD5Init(&ctx);
-+ ul_MD5Init(&ctx);
- /* hash concatenation of well-known UUID with name */
-- MD5Update(&ctx, ns, sizeof(uuid_t));
-- MD5Update(&ctx, (const unsigned char *)name, len);
-+ ul_MD5Update(&ctx, ns, sizeof(uuid_t));
-+ ul_MD5Update(&ctx, (const unsigned char *)name, len);
-
-- MD5Final((unsigned char *)hash, &ctx);
-+ ul_MD5Final((unsigned char *)hash, &ctx);
-
- memcpy(out, hash, sizeof(uuid_t));
-
-diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c
-index e6c799d24..fd4227a09 100644
---- a/misc-utils/mcookie.c
-+++ b/misc-utils/mcookie.c
-@@ -41,7 +41,7 @@ enum {
- };
-
- struct mcookie_control {
-- struct MD5Context ctx;
-+ struct UL_MD5Context ctx;
- char **files;
- size_t nfiles;
- uint64_t maxsz;
-@@ -67,12 +67,12 @@ static uint64_t hash_file(struct mcookie_control *ctl, int fd)
- r = read_all(fd, (char *) buf, rdsz);
- if (r < 0)
- break;
-- MD5Update(&ctl->ctx, buf, r);
-+ ul_MD5Update(&ctl->ctx, buf, r);
- count += r;
- }
- /* Separate files with a null byte */
- buf[0] = '\0';
-- MD5Update(&ctl->ctx, buf, 1);
-+ ul_MD5Update(&ctl->ctx, buf, 1);
- return count;
- }
-
-@@ -131,7 +131,7 @@ int main(int argc, char **argv)
- {
- struct mcookie_control ctl = { .verbose = 0 };
- size_t i;
-- unsigned char digest[MD5LENGTH];
-+ unsigned char digest[UL_MD5LENGTH];
- unsigned char buf[RAND_BYTES];
- int c;
-
-@@ -180,14 +180,14 @@ int main(int argc, char **argv)
- free(ctl.files);
-
- random_get_bytes(&buf, RAND_BYTES);
-- MD5Update(&ctl.ctx, buf, RAND_BYTES);
-+ ul_MD5Update(&ctl.ctx, buf, RAND_BYTES);
- if (ctl.verbose)
- fprintf(stderr, P_("Got %d byte from %s\n",
- "Got %d bytes from %s\n", RAND_BYTES),
- RAND_BYTES, random_tell_source());
-
-- MD5Final(digest, &ctl.ctx);
-- for (i = 0; i < MD5LENGTH; i++)
-+ ul_MD5Final(digest, &ctl.ctx);
-+ for (i = 0; i < UL_MD5LENGTH; i++)
- printf("%02x", digest[i]);
- putchar('\n');
-
-diff --git a/tests/helpers/test_md5.c b/tests/helpers/test_md5.c
-index 471580e12..6f8dec4aa 100644
---- a/tests/helpers/test_md5.c
-+++ b/tests/helpers/test_md5.c
-@@ -7,22 +7,22 @@
- int main(void)
- {
- int i, ret;
-- struct MD5Context ctx;
-- unsigned char digest[MD5LENGTH];
-+ struct UL_MD5Context ctx;
-+ unsigned char digest[UL_MD5LENGTH];
- unsigned char buf[BUFSIZ];
-
-- MD5Init( &ctx );
-+ ul_MD5Init( &ctx );
-
- while(!feof(stdin) && !ferror(stdin)) {
- ret = fread(buf, 1, sizeof(buf), stdin);
- if (ret)
-- MD5Update( &ctx, buf, ret );
-+ ul_MD5Update( &ctx, buf, ret );
- }
-
- fclose(stdin);
-- MD5Final( digest, &ctx );
-+ ul_MD5Final( digest, &ctx );
-
-- for (i = 0; i < MD5LENGTH; i++)
-+ for (i = 0; i < UL_MD5LENGTH; i++)
- printf( "%02x", digest[i] );
- printf("\n");
- return 0;
diff --git a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt3.patch b/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt3.patch
deleted file mode 100644
index 2306a210e0b..00000000000
--- a/sys-apps/util-linux/files/util-linux-2.31-too_generic_symbols_pt3.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b4db227582f1d0a14c7b63de8d57e6052b753d57 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Tue, 12 Dec 2017 11:38:17 +0100
-Subject: [PATCH] test_sha1: update helper
-
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- tests/helpers/test_sha1.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/tests/helpers/test_sha1.c b/tests/helpers/test_sha1.c
-index 5a1972935..ad96da4f0 100644
---- a/tests/helpers/test_sha1.c
-+++ b/tests/helpers/test_sha1.c
-@@ -7,22 +7,22 @@
- int main(void)
- {
- int i, ret;
-- SHA1_CTX ctx;
-- unsigned char digest[SHA1LENGTH];
-+ UL_SHA1_CTX ctx;
-+ unsigned char digest[UL_SHA1LENGTH];
- unsigned char buf[BUFSIZ];
-
-- SHA1Init( &ctx );
-+ ul_SHA1Init( &ctx );
-
- while(!feof(stdin) && !ferror(stdin)) {
- ret = fread(buf, 1, sizeof(buf), stdin);
- if (ret)
-- SHA1Update( &ctx, buf, ret );
-+ ul_SHA1Update( &ctx, buf, ret );
- }
-
- fclose(stdin);
-- SHA1Final( digest, &ctx );
-+ ul_SHA1Final( digest, &ctx );
-
-- for (i = 0; i < SHA1LENGTH; i++)
-+ for (i = 0; i < UL_SHA1LENGTH; i++)
- printf( "%02x", digest[i] );
- printf("\n");
- return 0;
diff --git a/sys-apps/util-linux/util-linux-2.31-r1.ebuild b/sys-apps/util-linux/util-linux-2.31-r1.ebuild
deleted file mode 100644
index db7274a9a61..00000000000
--- a/sys-apps/util-linux/util-linux-2.31-r1.ebuild
+++ /dev/null
@@ -1,213 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
- pam python-single-r1 multilib-minimal multiprocessing systemd
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-r3 autotools
- EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- [[ "${PV}" = *_rc* ]] || \
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
- SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
-
-# Most lib deps here are related to programs rather than our libs,
-# so we rarely need to specify ${MULTILIB_USEDEP}.
-RDEPEND="caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:0= )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- !build? ( systemd? ( sys-apps/systemd ) )
- udev? ( virtual/libudev:= )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-RDEPEND+="
- kill? (
- !sys-apps/coreutils[kill]
- !sys-process/procps[kill]
- )
- !net-wireless/rfkill
- !sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-2.7-r1
- !<sys-apps/s390-tools-1.36.1-r1"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-PATCHES=(
- "${FILESDIR}"/${P}-too_generic_symbols_pt{1,2,3}.patch #641226
-)
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Prevent uuidd test failure due to socket path limit. #593304
- sed -i \
- -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
- tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
-
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
-
- # Undo bad ncurses handling by upstream. #601530
- sed -i -E \
- -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
- -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
- configure || die
-
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
-
- local myeconfargs=(
- --disable-chfn-chsh
- --disable-login
- --disable-nologin
- --disable-su
- --docdir='${datarootdir}'/doc/${PF}
- --enable-agetty
- --enable-bash-completion
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
- --enable-line
- --enable-partx
- --enable-raw
- --enable-rename
- --enable-rfkill
- --enable-schedutils
- --with-bashcompletiondir="$(get_bashcompdir)"
- --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_systemunitdir)" "no")
- $(multilib_native_use_enable caps setpriv)
- $(multilib_native_use_enable cramfs)
- $(multilib_native_use_enable fdformat)
- $(multilib_native_use_enable nls)
- $(multilib_native_use_enable suid makeinstall-chown)
- $(multilib_native_use_enable suid makeinstall-setuid)
- $(multilib_native_use_enable tty-helpers mesg)
- $(multilib_native_use_enable tty-helpers wall)
- $(multilib_native_use_enable tty-helpers write)
- $(multilib_native_use_with python)
- $(multilib_native_use_with readline)
- $(multilib_native_use_with slang)
- $(multilib_native_use_with systemd)
- $(multilib_native_use_with udev)
- $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
- $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
- $(tc-has-tls || echo --disable-tls)
- $(use_enable unicode widechar)
- $(use_enable kill)
- $(use_enable static-libs static)
- $(use_with selinux)
- $(usex ncurses '' '--without-tinfo')
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
- else
- # build libraries only
- emake -f Makefile -f - mylibs \
- <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- default
- else
- emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
- install-pkgconfigDATA install-uuidincHEADERS \
- install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
- install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
- fi
-
- if multilib_is_native_abi; then
- # need the libs in /
- gen_usr_ldscript -a blkid mount smartcols uuid
-
- use python && python_optimize
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- find "${ED}" -name "*.la" -delete || die
-
- if use pam; then
- newpamd "${FILESDIR}/runuser.pamd" runuser
- newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
- fi
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2018-03-07 9:28 Lars Wendler
0 siblings, 0 replies; 27+ messages in thread
From: Lars Wendler @ 2018-03-07 9:28 UTC (permalink / raw
To: gentoo-commits
commit: da1d16289d67d7d99ec17e1d04f0aa0bbab5c7b8
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 7 09:27:46 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Mar 7 09:27:46 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da1d1628
sys-apps/util-linux: Revbump fix bash-completion umount code execution
Committed straight to stable.
Bug: https://bugs.gentoo.org/649812
Package-Manager: Portage-2.3.24, Repoman-2.3.6
.../util-linux-2.32_rc2-umount_completion.patch | 41 ++++++++++++++++++++++
...x-2.30.2.ebuild => util-linux-2.30.2-r1.ebuild} | 4 +++
...x-2.31.1.ebuild => util-linux-2.31.1-r1.ebuild} | 4 +++
3 files changed, 49 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.32_rc2-umount_completion.patch b/sys-apps/util-linux/files/util-linux-2.32_rc2-umount_completion.patch
new file mode 100644
index 00000000000..1317c56f89e
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.32_rc2-umount_completion.patch
@@ -0,0 +1,41 @@
+From 75f03badd7ed9f1dd951863d75e756883d3acc55 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 16 Nov 2017 16:27:32 +0100
+Subject: [PATCH] bash-completion: (umount) use findmnt, escape a space in
+ paths
+
+ # mount /dev/sdc1 /mnt/test/foo\ bar
+ # umount <tab>
+
+has to return "/mnt/test/foo\ bar".
+
+Changes:
+
+ * don't use mount | awk output, we have findmnt
+ * force compgen use \n as entries separator
+
+Addresses: https://github.com/karelzak/util-linux/issues/539
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ bash-completion/umount | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/bash-completion/umount b/bash-completion/umount
+index d76cb9fff..98c90d61a 100644
+--- a/bash-completion/umount
++++ b/bash-completion/umount
+@@ -40,9 +40,10 @@ _umount_module()
+ return 0
+ ;;
+ esac
+- local DEVS_MPOINTS
+- DEVS_MPOINTS="$(mount | awk '{print $1, $3}')"
+- COMPREPLY=( $(compgen -W "$DEVS_MPOINTS" -- $cur) )
+- return 0
++
++ local oldifs=$IFS
++ IFS=$'\n'
++ COMPREPLY=( $( compgen -W '$(findmnt -lno TARGET | sed "s/\([[:blank:]]\)/\\\\\1/g")' -- "$cur" ) )
++ IFS=$oldifs
+ }
+ complete -F _umount_module umount
diff --git a/sys-apps/util-linux/util-linux-2.30.2.ebuild b/sys-apps/util-linux/util-linux-2.30.2-r1.ebuild
similarity index 98%
rename from sys-apps/util-linux/util-linux-2.30.2.ebuild
rename to sys-apps/util-linux/util-linux-2.30.2-r1.ebuild
index 09c71996e90..3077f85b78e 100644
--- a/sys-apps/util-linux/util-linux-2.30.2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.30.2-r1.ebuild
@@ -61,6 +61,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${PN}-2.32_rc2-umount_completion.patch" #649812
+)
+
pkg_setup() {
use python && python-single-r1_pkg_setup
}
diff --git a/sys-apps/util-linux/util-linux-2.31.1.ebuild b/sys-apps/util-linux/util-linux-2.31.1-r1.ebuild
similarity index 98%
rename from sys-apps/util-linux/util-linux-2.31.1.ebuild
rename to sys-apps/util-linux/util-linux-2.31.1-r1.ebuild
index 41dd4c18eec..ce356da9a59 100644
--- a/sys-apps/util-linux/util-linux-2.31.1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.31.1-r1.ebuild
@@ -62,6 +62,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${PN}-2.32_rc2-umount_completion.patch" #649812
+)
+
pkg_setup() {
use python && python-single-r1_pkg_setup
}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2017-02-26 0:18 Matt Thode
0 siblings, 0 replies; 27+ messages in thread
From: Matt Thode @ 2017-02-26 0:18 UTC (permalink / raw
To: gentoo-commits
commit: 842d4a25f18d382dd6b1ab906f1b2fa5410bae48
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 26 00:17:26 2017 +0000
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun Feb 26 00:18:00 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=842d4a25
sys-apps/util-linux: install pam.d files for runuser(-l)
The files installed are the same as the ones installed as of today
from the sys-auth/pambase-20150213 package. Specifically the su
pam file for runuser and the login file for runuser-l.
robbat2 said it was ok
Package-Manager: Portage-2.3.3, Repoman-2.3.1
sys-apps/util-linux/files/runuser-l.pamd | 5 +
sys-apps/util-linux/files/runuser.pamd | 8 +
sys-apps/util-linux/util-linux-2.29.2-r1.ebuild | 198 ++++++++++++++++++++++++
3 files changed, 211 insertions(+)
diff --git a/sys-apps/util-linux/files/runuser-l.pamd b/sys-apps/util-linux/files/runuser-l.pamd
new file mode 100644
index 0000000000..764143558b
--- /dev/null
+++ b/sys-apps/util-linux/files/runuser-l.pamd
@@ -0,0 +1,5 @@
+auth include system-local-login
+account include system-local-login
+password include system-local-login
+session optional pam_lastlog.so
+session include system-local-login
diff --git a/sys-apps/util-linux/files/runuser.pamd b/sys-apps/util-linux/files/runuser.pamd
new file mode 100644
index 0000000000..30c2834eac
--- /dev/null
+++ b/sys-apps/util-linux/files/runuser.pamd
@@ -0,0 +1,8 @@
+auth sufficient pam_rootok.so
+auth required pam_wheel.so use_uid
+auth include system-auth
+account include system-auth
+password include system-auth
+session include system-auth
+session required pam_env.so
+session optional pam_xauth.so
diff --git a/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild
new file mode 100644
index 0000000000..a4dccc6ab0
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.29.2-r1.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+# Most lib deps here are related to programs rather than our libs,
+# so we rarely need to specify ${MULTILIB_USEDEP}.
+RDEPEND="caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ !build? ( systemd? ( sys-apps/systemd ) )
+ udev? ( virtual/libudev:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+RDEPEND+="
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-process/procps[kill]
+ )
+ !sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-2.3-r2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ # Undo bad ncurses handling by upstream. #601530
+ sed -i -E \
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \
+ configure || die
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+
+ local myeconfargs=(
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
+ --docdir='${datarootdir}'/doc/${PF}
+ $(multilib_native_use_enable nls)
+ --enable-agetty
+ --with-bashcompletiondir="$(get_bashcompdir)"
+ --enable-bash-completion
+ $(multilib_native_use_enable caps setpriv)
+ --disable-chfn-chsh
+ $(multilib_native_use_enable cramfs)
+ $(multilib_native_use_enable fdformat)
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
+ $(usex ncurses '' '--without-tinfo')
+ $(use_enable unicode widechar)
+ $(use_enable kill)
+ --disable-login
+ $(multilib_native_use_enable tty-helpers mesg)
+ --disable-nologin
+ --enable-partx
+ $(multilib_native_use_with python)
+ --enable-raw
+ $(multilib_native_use_with readline)
+ --enable-rename
+ --disable-reset
+ --enable-schedutils
+ --disable-su
+ $(multilib_native_use_enable tty-helpers wall)
+ $(multilib_native_use_enable tty-helpers write)
+ $(multilib_native_use_enable suid makeinstall-chown)
+ $(multilib_native_use_enable suid makeinstall-setuid)
+ $(use_with selinux)
+ $(multilib_native_use_with slang)
+ $(use_enable static-libs static)
+ $(multilib_native_use_with systemd)
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no")
+ $(multilib_native_use_with udev)
+ $(tc-has-tls || echo --disable-tls)
+ )
+ ECONF_SOURCE=${S} \
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+
+ if use pam; then
+ dopamd "${FILESDIR}/runuser.pamd" runuser
+ dopamd "${FILESDIR}/runuser-l.pamd" runuser-l
+ fi
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2016-04-02 4:11 Mike Frysinger
0 siblings, 0 replies; 27+ messages in thread
From: Mike Frysinger @ 2016-04-02 4:11 UTC (permalink / raw
To: gentoo-commits
commit: 816224a7cee6615732891f846835291e2dcd119e
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 2 03:11:48 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Apr 2 04:11:37 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=816224a7
sys-apps/util-linux: drop old versions
sys-apps/util-linux/Manifest | 4 -
.../files/util-linux-2.24-fix-fdisk-on-alpha.patch | 13 --
.../files/util-linux-2.24-last-tests.patch | 86 ----------
.../files/util-linux-2.24-skip-last-tests.patch | 41 -----
.../files/util-linux-2.25-parallel-setarch.patch | 33 ----
...util-linux-2.25.2-runuser-bash-completion.patch | 33 ----
sys-apps/util-linux/metadata.xml | 1 -
sys-apps/util-linux/util-linux-2.24.1-r3.ebuild | 174 --------------------
sys-apps/util-linux/util-linux-2.24.2.ebuild | 177 --------------------
sys-apps/util-linux/util-linux-2.25.2-r2.ebuild | 183 ---------------------
sys-apps/util-linux/util-linux-2.27.ebuild | 182 --------------------
11 files changed, 927 deletions(-)
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index 888f6a4..28427c3 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -1,6 +1,2 @@
-DIST util-linux-2.24.1.tar.xz 3543692 SHA256 835eb6232cfab0118ef2e4fd649de0ba9f5bd1b8cbf9a7d4d84594541dec8410 SHA512 5636e1c57bd57954518e90ff0f079810cc2927f52bb925dde556ce2744a088577f8adbc19c19b2bd079efd253406767faa44d1de5f557e024762522e647f044b WHIRLPOOL 25862a85788eb1c275c7e06f3d2be8e6a9605811665e06a4b21d1e274fc4a5e19dd03e5c52061ee5d98ce8c86ba757a7f8076683edb603ad0c43c05ab5e52a51
-DIST util-linux-2.24.2.tar.xz 3586580 SHA256 1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0 SHA512 a0c03876ef19fa09e434e3e5362fb3f3e0a254b3b39a623ac7a9a207d06afce00366792244ed0fac86931f8340c046620660f33c3444a07a12037182fc191240 WHIRLPOOL 4b8185e1832145c050a8aa0761ae017d846ed58cd7e07710e4c32bf92a8f6e530bddb56dab70c8025eddb4cafafed79e658b0aced3a190b61b508078a438a9ed
-DIST util-linux-2.25.2.tar.xz 3703644 SHA256 e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6 SHA512 cf8c5bde78f844425150c2a81bdecb87aa57bcd5cebd177a78160835627f58037fa2cfe4db26fd8f35eedb3beb499a91492a297a27d065465e2ea0c6218dc387 WHIRLPOOL dd1685f2e694bf3de95acc3ba3170d231426c18c3395a867c815bbd3ab5ee0f07567b49d0ae083ce669c89db711e39fd2b990bc7321985ec2279d78816ec5258
DIST util-linux-2.26.2.tar.xz 3863868 SHA256 0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666 SHA512 1cb8e2f32882b3f496d31c250a45cfb61bedb79f7a2802b358c23134d4257fa9bc9cde8888cfa1aaba12109f82b93345c6dc0bec2d11629ffa084f2a4476a91b WHIRLPOOL 699ff057f9930fe53f44090817c64ffe089345e7aba4c836e18cd3d2088881add805640b0e41b8d60bc08e3632be919025417feb9c2ddda454c87821a59122ed
DIST util-linux-2.27.1.tar.xz 3964512 SHA256 0a818fcdede99aec43ffe6ca5b5388bff80d162f2f7bd4541dca94fecb87a290 SHA512 a450a0c2d26a6deaf5e53b8f6bddf59409aefb1f0aaf07393f68a418408fbc62c5da353c8ba53c7cac8ea6e3dddfad59161753d888c31f5ccea445e81accbad8 WHIRLPOOL b0641f013762a667efcb2fabe6e3e09dd09252835d841e25cde506aca3a74876ad34f8130f3227683c7e8f19359205c4014dfcd9055d860ae6e3e54621478639
-DIST util-linux-2.27.tar.xz 3968872 SHA256 fcbf04e3ef8377fc8369af7f9afee341c5eef9b02dd5a7ce71532d0957e86dc7 SHA512 06ee17f4801fd3e35fb4cf3717722ea3f709e3dd9f9153510c399742a5cfca341e3a3a400d35a091b74f0de3636e62c7a14b7dd91d63482b7b98b1991aa6fa3c WHIRLPOOL da19c56dfe424c59bc982096f08c02d864718f030bbad79661968f1da972ea10e0eacaa2477cda45ec9a3c688d220740ca2c8823918dae5139a943f6c9d8e2a4
diff --git a/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch b/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch
deleted file mode 100644
index f01a55d..0000000
--- a/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- libfdisk/src/bsd.c.orig 2014-06-11 10:15:47.000000000 +0200
-+++ libfdisk/src/bsd.c 2014-06-11 10:16:18.000000000 +0200
-@@ -787,8 +787,10 @@
- case 0x06: /* DOS 16-bit >=32M */
- case 0xe1: /* DOS access */
- case 0xe3: /* DOS R/O */
-+#if !defined (__alpha__)
- case 0xf2: /* DOS secondary */
- return BSD_FS_MSDOS;
-+#endif
- case 0x07: /* OS/2 HPFS */
- return BSD_FS_HPFS;
- default:
diff --git a/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch b/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch
deleted file mode 100644
index 77cf478..0000000
--- a/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-https://bugs.gentoo.org/501408
-
-From 3c76515abd2e80dc1da03041eb868b8c1e596fb1 Mon Sep 17 00:00:00 2001
-From: Sami Kerola <kerolasa@iki.fi>
-Date: Sun, 16 Feb 2014 23:54:18 +0000
-Subject: [PATCH] tests: align last.1 with recent phantom detection
-
-None existing account is not still-logged-in but gone mysteriously,
-assuming wtmp logout markup is missing.
-
-Signed-off-by: Sami Kerola <kerolasa@iki.fi>
----
- tests/expected/last/last | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/tests/expected/last/last b/tests/expected/last/last
-index 2ff5cc1..dfb140b 100644
---- a/tests/expected/last/last
-+++ b/tests/expected/last/last
-@@ -1,6 +1,6 @@
- ~~~ basic output ~~~
- rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14)
--torvalds linux hobby Mon Aug 26 00:57 still logged in
-+torvalds linux hobby Mon Aug 26 00:57 gone - no logout
- reboot system boot system-name Wed Aug 28 18:00 still running
- reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00)
- IPv4 root dns-server Wed Aug 28 13:00 - 14:00 (01:00)
-@@ -17,7 +17,7 @@ accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00)
- wtmp begins Wed Aug 28 03:00:00 2013
- ~~~ include system ~~~
- rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14)
--torvalds linux hobby Mon Aug 26 00:57 still logged in
-+torvalds linux hobby Mon Aug 26 00:57 gone - no logout
- reboot system boot system-name Wed Aug 28 18:00 still running
- shutdown system down system-name Wed Aug 28 17:00 - 18:00 (01:00)
- reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00)
-@@ -47,16 +47,16 @@ IPv4 root Wed Aug 28 13:00 - 14:00 (01:00) a.root-servers.net
-
- wtmp begins Wed Aug 28 03:00:00 2013
- ~~~ show ip ~~~
--torvalds linux 128.214.205.14 Mon Aug 26 00:57 still logged in
-+torvalds linux 128.214.205.14 Mon Aug 26 00:57 gone - no logout
-
- wtmp begins Wed Aug 28 03:00:00 2013
- ~~~ no host ~~~
--torvalds linux Mon Aug 26 00:57 still logged in
-+torvalds linux Mon Aug 26 00:57 gone - no logout
-
- wtmp begins Wed Aug 28 03:00:00 2013
- ~~~ full times ~~~
- rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14)
--torvalds linux hobby Mon Aug 26 00:57:08 1991 still logged in
-+torvalds linux hobby Mon Aug 26 00:57:08 1991 gone - no logout
- reboot system boot system-name Wed Aug 28 18:00:00 2013 still running
- reboot system boot system-name Wed Aug 28 16:00:00 2013 - Wed Aug 28 17:00:00 2013 (01:00)
- IPv4 root dns-server Wed Aug 28 13:00:00 2013 - Wed Aug 28 14:00:00 2013 (01:00)
-@@ -73,7 +73,7 @@ accounti foo nine Wed Aug 28 03:00:00 2013 - Wed Aug 28 04:
- wtmp begins Wed Aug 28 03:00:00 2013
- ~~~ no time ~~~
- rick long never-gonna-logo (24855+03:14)
--torvalds linux hobby logged in
-+torvalds linux hobby - no logout
- reboot system boot system-name running
- reboot system boot system-name (01:00)
- IPv4 root dns-server (01:00)
-@@ -90,7 +90,7 @@ accounti foo nine (01:00)
- wtmp begins Wed Aug 28 03:00:00 2013
- ~~~ iso-8601 time ~~~
- rick long never-gonna-logout 1970-01-01T00:00:00+0000 - 2038-01-19T03:14:07+0000 (24855+03:14)
--torvalds linux hobby 1991-08-26T00:57:08+0000 still logged in
-+torvalds linux hobby 1991-08-26T00:57:08+0000 gone - no logout
- reboot system boot system-name 2013-08-28T18:00:00+0000 still running
- reboot system boot system-name 2013-08-28T16:00:00+0000 - 2013-08-28T17:00:00+0000 (01:00)
- IPv4 root dns-server 2013-08-28T13:00:00+0000 - 2013-08-28T14:00:00+0000 (01:00)
-@@ -115,7 +115,7 @@ accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00)
- wtmp begins Wed Aug 28 03:00:00 2013
- ~~~ present ~~~
- rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14)
--torvalds linux hobby Mon Aug 26 00:57 still logged in
-+torvalds linux hobby Mon Aug 26 00:57 gone - no logout
- runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00)
-
- wtmp begins Wed Aug 28 03:00:00 2013
---
-1.8.5.5
-
diff --git a/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch b/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch
deleted file mode 100644
index 5148053..0000000
--- a/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 6b55612b9ad1193a042f3c3a1d9216e63b0d2907 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 22 Dec 2013 18:17:15 -0500
-Subject: [PATCH] tests: last: skip when last is not enabled
-
-References: https://bugs.gentoo.org/489794
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- tests/ts/last/ipv6 | 2 ++
- tests/ts/last/last | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/tests/ts/last/ipv6 b/tests/ts/last/ipv6
-index 8e2b01e..60b72bd 100755
---- a/tests/ts/last/ipv6
-+++ b/tests/ts/last/ipv6
-@@ -18,6 +18,8 @@ TS_DESC="last ipv6"
- . $TS_TOPDIR/functions.sh
- ts_init "$*"
-
-+[ -x $TS_CMD_LAST ] || ts_skip "last not enabled"
-+
- export LANG=C
- export TZ=GMT
-
-diff --git a/tests/ts/last/last b/tests/ts/last/last
-index 4ad38cb..83b7f8d 100755
---- a/tests/ts/last/last
-+++ b/tests/ts/last/last
-@@ -18,6 +18,8 @@ TS_DESC="last"
- . $TS_TOPDIR/functions.sh
- ts_init "$*"
-
-+[ -x $TS_CMD_LAST ] || ts_skip "last not enabled"
-+
- export LANG=C
- export TZ=GMT
-
---
-1.8.4.3
-
diff --git a/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch b/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch
deleted file mode 100644
index e694af5..0000000
--- a/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 762b4d8691c46964dfc0d40dab772191538c807a Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@chromium.org>
-Date: Sun, 3 May 2015 23:37:04 -0400
-Subject: [PATCH] build-sys: fix parallel builds w/setarch links
-
-The symlink generation tries to write to the sys-utils/ subdir but does
-not make sure that dir exists. This can sometimes lead to parallel build
-failures when building out-of-tree like:
-...
-echo ".so man8/setarch.8" > sys-utils/linux64.8
-/bin/bash: sys-utils/linux64.8: No such file or directory
-Makefile:11503: recipe for target 'sys-utils/linux64.8' failed
-make: *** [sys-utils/linux64.8] Error 1
-
-URL: https://bugs.gentoo.org/511812
-Signed-off-by: Mike Frysinger <vapier@chromium.org>
----
- sys-utils/Makemodule.am | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -10806,6 +10806,7 @@ install-exec-hook:
- @BUILD_VIPW_TRUE@ cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr
-
- @BUILD_SETARCH_TRUE@$(SETARCH_MAN_LINKS):
-+@BUILD_SETARCH_TRUE@ $(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@)
- @BUILD_SETARCH_TRUE@ $(AM_V_GEN)echo ".so man8/setarch.8" > $@
-
- @BUILD_SETARCH_TRUE@install-exec-hook-setarch:
---
-2.4.0
-
diff --git a/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch b/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch
deleted file mode 100644
index 85c4811..0000000
--- a/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://bugs.gentoo.org/522288
-
-From a95987423c4d7781a14ffda34f082086cd51f4f7 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Fri, 24 Oct 2014 12:08:22 -0400
-Subject: [PATCH] bash-completion: fix runuser install
-
-The runuser symlink used to depend on su being enabled, but a refactoring
-broke that. So if you build with runuser enabled but not su, you end up
-with a broken symlink. Rework the logic so it works in both cases.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- bash-completion/Makemodule.am | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/bash-completion/Makemodule.am b/bash-completion/Makemodule.am
-index 271a6db..045c2d5 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -11071,7 +10823,8 @@
- @BUILD_MOUNT_TRUE@@MAKEINSTALL_DO_SETUID_TRUE@ chmod 4755 $(DESTDIR)$(bindir)/umount
-
- @BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@install-data-hook-bashcomp-runuser::
--@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@ ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser
-+@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@@BUILD_SU_TRUE@ ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser
-+@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@@BUILD_SU_FALSE@ cp $(top_srcdir)/bash-completion/su $(DESTDIR)$(bashcompletiondir)/runuser
-
- clean-local-tests:
- rm -rf $(top_builddir)/tests/output $(top_builddir)/tests/diff
---
-2.1.2
-
diff --git a/sys-apps/util-linux/metadata.xml b/sys-apps/util-linux/metadata.xml
index c2ad0f9..9a5be00 100644
--- a/sys-apps/util-linux/metadata.xml
+++ b/sys-apps/util-linux/metadata.xml
@@ -8,7 +8,6 @@
<use>
<flag name="caps">build setpriv helper (run programs with diff capabilities)</flag>
<flag name="cramfs">build mkfs/fsck helpers for cramfs filesystems</flag>
- <flag name="cytune">build cytune for Cyclades-Z multiport serial cards</flag>
<flag name="fdformat">build fdformat (floppy disk format)</flag>
<flag name="kill">build the kill program</flag>
<flag name="pam">build runuser helper</flag>
diff --git a/sys-apps/util-linux/util-linux-2.24.1-r3.ebuild b/sys-apps/util-linux/util-linux-2.24.1-r3.ebuild
deleted file mode 100644
index 8c25f44..0000000
--- a/sys-apps/util-linux/util-linux-2.24.1-r3.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-
-inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
- python-single-r1 multilib-minimal
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-2 autotools
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
- SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="bash-completion caps +cramfs cytune fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
-
-RDEPEND="!sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !sys-block/eject
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-1.3-r2
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2 )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- udev? ( virtual/udev )
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
- )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
- epatch "${FILESDIR}"/${PN}-2.24-skip-last-tests.patch #491742
- epatch "${FILESDIR}"/${PN}-2.24-last-tests.patch #501408
- # http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/9237
- epatch "${FILESDIR}"/${PN}-2.24-fix-fdisk-on-alpha.patch
- find tests/ -name bigyear -delete #489794
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- ECONF_SOURCE=${S} \
- econf \
- --docdir="/usr/share/doc/${PF}" \
- --enable-fs-paths-extra=/usr/sbin:/bin:/usr/bin \
- $(multilib_native_use_enable nls) \
- --enable-agetty \
- --with-bashcompletiondir="$(get_bashcompdir)" \
- $(multilib_native_use_enable bash-completion) \
- $(multilib_native_use_enable caps setpriv) \
- $(multilib_native_use_enable cramfs) \
- $(multilib_native_use_enable cytune) \
- $(multilib_native_use_enable fdformat) \
- --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
- --disable-kill \
- --disable-login \
- $(multilib_native_use_enable tty-helpers mesg) \
- --disable-nologin \
- --enable-partx \
- $(multilib_native_use_with python) \
- --enable-raw \
- --enable-rename \
- --disable-reset \
- --enable-schedutils \
- --disable-su \
- $(multilib_native_use_enable tty-helpers wall) \
- $(multilib_native_use_enable tty-helpers write) \
- $(multilib_native_use_enable suid makeinstall-chown) \
- $(multilib_native_use_enable suid makeinstall-setuid) \
- $(use_with selinux) \
- $(multilib_native_use_with slang) \
- $(use_enable static-libs static) \
- $(multilib_native_use_with udev) \
- $(tc-has-tls || echo --disable-tls)
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
- else
- # build libraries only
- emake -f Makefile -f - mylibs \
- <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake check
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- default
- else
- emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
- install-pkgconfigDATA install-uuidincHEADERS \
- install-nodist_blkidincHEADERS install-nodist_mountincHEADERS
- fi
-
- if multilib_is_native_abi; then
- # need the libs in /
- gen_usr_ldscript -a blkid mount uuid
-
- use python && python_optimize
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- prune_libtool_files
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
diff --git a/sys-apps/util-linux/util-linux-2.24.2.ebuild b/sys-apps/util-linux/util-linux-2.24.2.ebuild
deleted file mode 100644
index 47d580b..0000000
--- a/sys-apps/util-linux/util-linux-2.24.2.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-
-inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
- python-single-r1 multilib-minimal
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-2 autotools
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
- SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="caps +cramfs cytune fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
-
-RDEPEND="!sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !sys-block/eject
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-1.3-r2
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2 )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- udev? ( virtual/udev )
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
- )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
- epatch "${FILESDIR}"/${PN}-2.24-last-tests.patch #501408
- # http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/9237
- epatch "${FILESDIR}"/${PN}-2.24-fix-fdisk-on-alpha.patch
- find tests/ -name bigyear -delete #489794
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- # We manually set --libdir to the default since on prefix, econf will set it to
- # a value which the configure script does not recognize. This makes it set the
- # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
- ECONF_SOURCE=${S} \
- econf \
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
- --libdir='${prefix}/'"$(get_libdir)" \
- $(multilib_native_use_enable nls) \
- --enable-agetty \
- --with-bashcompletiondir="$(get_bashcompdir)" \
- --enable-bash-completion \
- $(multilib_native_use_enable caps setpriv) \
- $(multilib_native_use_enable cramfs) \
- $(multilib_native_use_enable cytune) \
- $(multilib_native_use_enable fdformat) \
- --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
- --disable-kill \
- --disable-login \
- $(multilib_native_use_enable tty-helpers mesg) \
- --disable-nologin \
- --enable-partx \
- $(multilib_native_use_with python) \
- --enable-raw \
- --enable-rename \
- --disable-reset \
- --enable-schedutils \
- --disable-su \
- $(multilib_native_use_enable tty-helpers wall) \
- $(multilib_native_use_enable tty-helpers write) \
- $(multilib_native_use_enable suid makeinstall-chown) \
- $(multilib_native_use_enable suid makeinstall-setuid) \
- $(use_with selinux) \
- $(multilib_native_use_with slang) \
- $(use_enable static-libs static) \
- $(multilib_native_use_with udev) \
- $(tc-has-tls || echo --disable-tls)
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
- else
- # build libraries only
- emake -f Makefile -f - mylibs \
- <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake check
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- default
- else
- emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
- install-pkgconfigDATA install-uuidincHEADERS \
- install-nodist_blkidincHEADERS install-nodist_mountincHEADERS
- fi
-
- if multilib_is_native_abi; then
- # need the libs in /
- gen_usr_ldscript -a blkid mount uuid
-
- use python && python_optimize
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- prune_libtool_files
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
diff --git a/sys-apps/util-linux/util-linux-2.25.2-r2.ebuild b/sys-apps/util-linux/util-linux-2.25.2-r2.ebuild
deleted file mode 100644
index e99c954..0000000
--- a/sys-apps/util-linux/util-linux-2.25.2-r2.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-
-inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
- python-single-r1 multilib-minimal systemd
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-2 autotools
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
- SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
-
-RDEPEND="!sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !sys-block/eject
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-1.3-r2
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2 )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- systemd? ( sys-apps/systemd )
- udev? ( virtual/libudev )
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
- )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-runuser-bash-completion.patch #522288
- epatch "${FILESDIR}"/${PN}-2.25-parallel-setarch.patch #511812
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- # We manually set --libdir to the default since on prefix, econf will set it to
- # a value which the configure script does not recognize. This makes it set the
- # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
- ECONF_SOURCE=${S} \
- econf \
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
- --libdir='${prefix}/'"$(get_libdir)" \
- --docdir='${datarootdir}'/doc/${PF} \
- $(multilib_native_use_enable nls) \
- --enable-agetty \
- --with-bashcompletiondir="$(get_bashcompdir)" \
- --enable-bash-completion \
- $(multilib_native_use_enable caps setpriv) \
- --disable-chfn-chsh \
- $(multilib_native_use_enable cramfs) \
- $(multilib_native_use_enable fdformat) \
- --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
- --disable-kill \
- --disable-login \
- $(multilib_native_use_enable tty-helpers mesg) \
- --disable-nologin \
- --enable-partx \
- $(multilib_native_use_with python) \
- --enable-raw \
- --enable-rename \
- --disable-reset \
- --enable-schedutils \
- --disable-su \
- $(multilib_native_use_enable tty-helpers wall) \
- $(multilib_native_use_enable tty-helpers write) \
- $(multilib_native_use_enable suid makeinstall-chown) \
- $(multilib_native_use_enable suid makeinstall-setuid) \
- $(use_with selinux) \
- $(multilib_native_use_with slang) \
- $(use_enable static-libs static) \
- $(multilib_native_use_with systemd) \
- --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
- $(multilib_native_use_with udev) \
- $(tc-has-tls || echo --disable-tls)
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
- else
- # build libraries only
- emake -f Makefile -f - mylibs \
- <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake check
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- default
- else
- emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
- install-pkgconfigDATA install-uuidincHEADERS \
- install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
- install-nodist_smartcolsincHEADERS
- fi
-
- if multilib_is_native_abi; then
- # need the libs in /
- gen_usr_ldscript -a blkid mount smartcols uuid
-
- use python && python_optimize
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- prune_libtool_files
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
diff --git a/sys-apps/util-linux/util-linux-2.27.ebuild b/sys-apps/util-linux/util-linux-2.27.ebuild
deleted file mode 100644
index 9dc186f..0000000
--- a/sys-apps/util-linux/util-linux-2.27.ebuild
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-
-inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
- python-single-r1 multilib-minimal systemd
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-
-if [[ ${PV} == 9999 ]] ; then
- inherit git-2 autotools
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
- SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
-fi
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/"
-
-LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="build caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
-
-RDEPEND="!sys-process/schedutils
- !sys-apps/setarch
- !<sys-apps/sysvinit-2.88-r7
- !sys-block/eject
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- !<app-shells/bash-completion-1.3-r2
- caps? ( sys-libs/libcap-ng )
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
- pam? ( sys-libs/pam )
- python? ( ${PYTHON_DEPS} )
- selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
- slang? ( sys-libs/slang )
- !build? ( systemd? ( sys-apps/systemd ) )
- udev? ( virtual/libudev:= )
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-baselibs-20150406-r2
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
- )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- test? ( sys-devel/bc )
- virtual/os-headers"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- if [[ ${PV} == 9999 ]] ; then
- po/update-potfiles
- eautoreconf
- fi
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.${ABI}.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.${ABI}.c
-}
-
-multilib_src_configure() {
- lfs_fallocate_test
- # The scanf test in a run-time test which fails while cross-compiling.
- # Blindly assume a POSIX setup since we require libmount, and libmount
- # itself fails when the scanf test fails. #531856
- tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
- export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
- export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
- # We manually set --libdir to the default since on prefix, econf will set it to
- # a value which the configure script does not recognize. This makes it set the
- # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
- ECONF_SOURCE=${S} \
- econf \
- --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
- --libdir='${prefix}/'"$(get_libdir)" \
- --docdir='${datarootdir}'/doc/${PF} \
- $(multilib_native_use_enable nls) \
- --enable-agetty \
- --with-bashcompletiondir="$(get_bashcompdir)" \
- --enable-bash-completion \
- $(multilib_native_use_enable caps setpriv) \
- --disable-chfn-chsh \
- $(multilib_native_use_enable cramfs) \
- $(multilib_native_use_enable fdformat) \
- --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
- --disable-kill \
- --disable-login \
- $(multilib_native_use_enable tty-helpers mesg) \
- --disable-nologin \
- --enable-partx \
- $(multilib_native_use_with python) \
- --enable-raw \
- --enable-rename \
- --disable-reset \
- --enable-schedutils \
- --disable-su \
- $(multilib_native_use_enable tty-helpers wall) \
- $(multilib_native_use_enable tty-helpers write) \
- $(multilib_native_use_enable suid makeinstall-chown) \
- $(multilib_native_use_enable suid makeinstall-setuid) \
- $(use_with selinux) \
- $(multilib_native_use_with slang) \
- $(use_enable static-libs static) \
- $(multilib_native_use_with systemd) \
- --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
- $(multilib_native_use_with udev) \
- $(tc-has-tls || echo --disable-tls)
-}
-
-multilib_src_compile() {
- if multilib_is_native_abi; then
- default
- else
- # build libraries only
- emake -f Makefile -f - mylibs \
- <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
- fi
-}
-
-multilib_src_test() {
- multilib_is_native_abi && emake check
-}
-
-multilib_src_install() {
- if multilib_is_native_abi; then
- default
- else
- emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
- install-pkgconfigDATA install-uuidincHEADERS \
- install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
- install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
- fi
-
- if multilib_is_native_abi; then
- # need the libs in /
- gen_usr_ldscript -a blkid mount smartcols uuid
-
- use python && python_optimize
- fi
-}
-
-multilib_src_install_all() {
- dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
-
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- prune_libtool_files
-}
-
-pkg_postinst() {
- if ! use tty-helpers; then
- elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
- fi
-}
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
@ 2016-03-07 22:26 Mike Frysinger
0 siblings, 0 replies; 27+ messages in thread
From: Mike Frysinger @ 2016-03-07 22:26 UTC (permalink / raw
To: gentoo-commits
commit: 3769666d8426aeb5b8b2028b161168e0e09dddf3
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 7 22:25:35 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Mar 7 22:25:35 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3769666d
sys-apps/util-linux: fix building w/newer glibc
.../files/util-linux-2.27.1-sysmacros.patch | 278 +++++++++++++++++++++
sys-apps/util-linux/util-linux-2.27.1.ebuild | 1 +
2 files changed, 279 insertions(+)
diff --git a/sys-apps/util-linux/files/util-linux-2.27.1-sysmacros.patch b/sys-apps/util-linux/files/util-linux-2.27.1-sysmacros.patch
new file mode 100644
index 0000000..9c64e07
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.27.1-sysmacros.patch
@@ -0,0 +1,278 @@
+From 71cd37a19acef366ff12f322c78c711559764e13 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 7 Mar 2016 16:42:05 -0500
+Subject: [PATCH] include sysmacros.h where used
+
+BSD/Linux systems stick major/minor/makedev in sysmacros.h. Newer Linux
+libraries have been moving away from including sysmacros.h implicitly via
+sys/types.h, so include it directly.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+
+diff --git a/lib/ismounted.c b/lib/ismounted.c
+index f83be65..9b0e447 100644
+--- a/lib/ismounted.c
++++ b/lib/ismounted.c
+@@ -18,6 +18,7 @@
+ #include <sys/stat.h>
+ #include <ctype.h>
+ #include <sys/param.h>
++#include <sys/sysmacros.h>
+ #ifdef __APPLE__
+ #include <sys/ucred.h>
+ #include <sys/mount.h>
+diff --git a/lib/sysfs.c b/lib/sysfs.c
+index 9e973a4..4b46459 100644
+--- a/lib/sysfs.c
++++ b/lib/sysfs.c
+@@ -7,6 +7,7 @@
+ * Written by Karel Zak <kzak@redhat.com>
+ */
+ #include <ctype.h>
++#include <sys/sysmacros.h>
+
+ #include "c.h"
+ #include "at.h"
+diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c
+index fe8eab1..56f5336 100644
+--- a/login-utils/sulogin-consoles.c
++++ b/login-utils/sulogin-consoles.c
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+diff --git a/libblkid/src/devname.c b/libblkid/src/devname.c
+index dbbe5b5..d583800 100644
+--- a/libblkid/src/devname.c
++++ b/libblkid/src/devname.c
+@@ -25,6 +25,7 @@
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
++#include <sys/sysmacros.h>
+ #include <dirent.h>
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+diff --git a/libblkid/src/devno.c b/libblkid/src/devno.c
+index 58fbce5..4b8f3db 100644
+--- a/libblkid/src/devno.c
++++ b/libblkid/src/devno.c
+@@ -31,6 +31,7 @@
+ #endif
+ #include <fcntl.h>
+ #include <inttypes.h>
++#include <sys/sysmacros.h>
+
+ #include "blkidP.h"
+ #include "pathnames.h"
+diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
+index cee7008..29b4428 100644
+--- a/libmount/src/tab_parse.c
++++ b/libmount/src/tab_parse.c
+@@ -16,6 +16,7 @@
+ #include <limits.h>
+ #include <dirent.h>
+ #include <fcntl.h>
++#include <sys/sysmacros.h>
+
+ #include "at.h"
+ #include "mangle.h"
+diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
+index f72be14..e14119b 100644
+--- a/misc-utils/findmnt.c
++++ b/misc-utils/findmnt.c
+@@ -31,6 +31,7 @@
+ #include <assert.h>
+ #include <poll.h>
+ #include <sys/statvfs.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #ifdef HAVE_LIBUDEV
+ # include <libudev.h>
+diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
+index c9a39b3..6010167 100644
+--- a/misc-utils/lsblk.c
++++ b/misc-utils/lsblk.c
+@@ -26,6 +26,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <stdint.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <dirent.h>
+diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c
+index a47c1d0..7689964 100644
+--- a/misc-utils/lslocks.c
++++ b/misc-utils/lslocks.c
+@@ -30,6 +30,7 @@
+ #include <dirent.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+
+ #include <libmount.h>
+diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
+index 6f9e78b..2b7e712 100644
+--- a/disk-utils/fsck.c
++++ b/disk-utils/fsck.c
+@@ -30,6 +30,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/file.h>
+ #include <fcntl.h>
+ #include <limits.h>
+diff --git a/disk-utils/partx.c b/disk-utils/partx.c
+index 50bd6a4..955166b 100644
+--- a/disk-utils/partx.c
++++ b/disk-utils/partx.c
+@@ -19,6 +19,7 @@
+ #include <unistd.h>
+ #include <assert.h>
+ #include <dirent.h>
++#include <sys/sysmacros.h>
+
+ #include <blkid.h>
+ #include <libsmartcols.h>
+diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
+index 81371eb..9c1aacb 100644
+--- a/disk-utils/sfdisk.c
++++ b/disk-utils/sfdisk.c
+@@ -29,6 +29,7 @@
+ #include <errno.h>
+ #include <getopt.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <assert.h>
+ #include <fcntl.h>
+ #include <libsmartcols.h>
+diff --git a/libblkid/src/evaluate.c b/libblkid/src/evaluate.c
+index ffbe097..3d9a76b 100644
+--- a/libblkid/src/evaluate.c
++++ b/libblkid/src/evaluate.c
+@@ -12,6 +12,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <ctype.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c
+index c8e0bfe..4ba5411 100644
+--- a/libblkid/src/partitions/partitions.c
++++ b/libblkid/src/partitions/partitions.c
+@@ -15,6 +15,7 @@
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <errno.h>
+ #include <stdint.h>
+ #include <inttypes.h>
+diff --git a/libblkid/src/topology/dm.c b/libblkid/src/topology/dm.c
+index e061632..993161c 100644
+--- a/libblkid/src/topology/dm.c
++++ b/libblkid/src/topology/dm.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+
+ #include "topology.h"
+diff --git a/libblkid/src/topology/evms.c b/libblkid/src/topology/evms.c
+index 7a4fd55..b59b97b 100644
+--- a/libblkid/src/topology/evms.c
++++ b/libblkid/src/topology/evms.c
+@@ -18,6 +18,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+
+ #include "topology.h"
+diff --git a/libblkid/src/topology/lvm.c b/libblkid/src/topology/lvm.c
+index bd079d4..2ade0c2 100644
+--- a/libblkid/src/topology/lvm.c
++++ b/libblkid/src/topology/lvm.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+
+ #include "topology.h"
+diff --git a/libblkid/src/topology/md.c b/libblkid/src/topology/md.c
+index 5eba947..388f996 100644
+--- a/libblkid/src/topology/md.c
++++ b/libblkid/src/topology/md.c
+@@ -18,6 +18,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+
+ #include "topology.h"
+diff --git a/libmount/python/fs.c b/libmount/python/fs.c
+index 0789d37..651a7c5 100644
+--- a/libmount/python/fs.c
++++ b/libmount/python/fs.c
+@@ -27,6 +27,7 @@
+
+ #include "pylibmount.h"
+ #include <errno.h>
++#include <sys/sysmacros.h>
+
+ #define Fs_HELP "Fs(source=None, root=None, target=None, fstype=None, options=None, attributes=None, freq=0, passno=0)"
+
+diff --git a/libmount/src/fs.c b/libmount/src/fs.c
+index 2bab7d6..ab3155d 100644
+--- a/libmount/src/fs.c
++++ b/libmount/src/fs.c
+@@ -14,6 +14,7 @@
+ #include <ctype.h>
+ #include <blkid.h>
+ #include <stddef.h>
++#include <sys/sysmacros.h>
+
+ #include "mountP.h"
+ #include "strutils.h"
+diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
+index 1d57ab3..90a42b6 100644
+--- a/sys-utils/losetup.c
++++ b/sys-utils/losetup.c
+@@ -12,6 +12,7 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <inttypes.h>
+ #include <getopt.h>
+
+diff --git a/sys-utils/mountpoint.c b/sys-utils/mountpoint.c
+index ad9c1da..64d0a7e 100644
+--- a/sys-utils/mountpoint.c
++++ b/sys-utils/mountpoint.c
+@@ -31,6 +31,7 @@
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+
+ #include <libmount.h>
+
+--
+2.6.2
diff --git a/sys-apps/util-linux/util-linux-2.27.1.ebuild b/sys-apps/util-linux/util-linux-2.27.1.ebuild
index 6c46297..144441e 100644
--- a/sys-apps/util-linux/util-linux-2.27.1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.27.1.ebuild
@@ -72,6 +72,7 @@ src_prepare() {
po/update-potfiles
eautoreconf
fi
+ epatch "${FILESDIR}"/${P}-sysmacros.patch
elibtoolize
}
^ permalink raw reply related [flat|nested] 27+ messages in thread
end of thread, other threads:[~2024-05-20 17:35 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 23:48 [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-05-20 17:34 Mike Gilbert
2024-03-28 16:44 Sam James
2024-03-18 13:43 Sam James
2023-12-29 1:03 Sam James
2023-11-15 10:39 Sam James
2023-08-03 19:03 Sam James
2023-06-29 6:18 Sam James
2023-05-23 3:14 Sam James
2023-05-19 22:29 Mike Gilbert
2023-02-11 22:13 Mike Gilbert
2022-01-24 16:08 Sam James
2021-12-20 4:57 Sam James
2021-09-03 20:57 Sam James
2020-11-20 20:32 Lars Wendler
2020-04-29 16:29 Mike Gilbert
2019-11-19 10:37 Lars Wendler
2019-05-26 9:52 Lars Wendler
2019-05-18 13:06 Lars Wendler
2019-03-24 19:45 Joshua Kinard
2018-11-11 1:50 Thomas Deutschmann
2018-09-26 13:35 Lars Wendler
2018-03-07 9:28 Lars Wendler
2018-03-07 9:28 Lars Wendler
2017-02-26 0:18 Matt Thode
2016-04-02 4:11 Mike Frysinger
2016-03-07 22:26 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox