diff --git a/sys-process/procps/files/procps-4.0.5-sysctl-ignore_failure.patch b/sys-process/procps/files/procps-4.0.5-sysctl-ignore_failure.patch new file mode 100644 index 0000000000000..393da09f853ec --- /dev/null +++ b/sys-process/procps/files/procps-4.0.5-sysctl-ignore_failure.patch @@ -0,0 +1,21 @@ +Don't error for close_stream failure if the config line begins with "-" +https://bugs.gentoo.org/969014 +https://gitlab.com/procps-ng/procps/-/issues/410 + +--- procps-ng-4.0.5/src/sysctl.c ++++ procps-ng-4.0.5/src/sysctl.c +@@ -623,9 +623,12 @@ static int WriteSetting( + if (0 < fprintf(fp, "%s\n", value)) + rc = EXIT_SUCCESS; + if (close_stream(fp) != 0) { +- xwarn(_("setting key \"%s\""), dotted_key); ++ xwarn(_("setting key \"%s\"%s"), ++ dotted_key, (ignore_failure?_(", ignoring"):"")); + free(dotted_key); +- return EXIT_FAILURE; ++ if (!ignore_failure) ++ rc = EXIT_FAILURE; ++ return rc; + } + } + } diff --git a/sys-process/procps/procps-4.0.5-r4.ebuild b/sys-process/procps/procps-4.0.5-r4.ebuild new file mode 100644 index 0000000000000..a517263d84dc3 --- /dev/null +++ b/sys-process/procps/procps-4.0.5-r4.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="Standard informational utilities and process-handling tools" +HOMEPAGE="https://gitlab.com/procps-ng/procps" +# Per e.g. https://gitlab.com/procps-ng/procps/-/releases/v4.0.5, the dist tarballs +# are still hosted on SF. +SRC_URI="https://downloads.sourceforge.net/${PN}-ng/${PN}-ng-${PV}.tar.xz" +S="${WORKDIR}"/${PN}-ng-${PV} + +# See bug #913210 +LICENSE="GPL-2+ LGPL-2+ LGPL-2.1+" +SLOT="0/1-ng" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="elogind +kill modern-top +ncurses nls selinux static-libs skill systemd test unicode" +RESTRICT="!test? ( test )" + +DEPEND=" + elogind? ( sys-auth/elogind ) + elibc_musl? ( sys-libs/error-standalone ) + ncurses? ( >=sys-libs/ncurses-5.7-r7:=[unicode(+)?] ) + selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${DEPEND} + !4.0.5 + if use elibc_musl ; then + append-cflags "$($(tc-getPKG_CONFIG) --cflags error-standalone)" + append-libs "$($(tc-getPKG_CONFIG) --libs error-standalone)" + fi + + local myeconfargs=( + # No elogind multilib support + $(multilib_native_use_with elogind) + $(multilib_native_use_enable kill) + $(multilib_native_use_enable modern-top) + $(multilib_native_enable pidof) + $(multilib_native_enable pidwait) + $(multilib_native_use_with ncurses) + # bug #794997 + $(multilib_native_use_enable !elibc_musl w) + $(use_enable nls) + $(use_enable selinux libselinux) + $(use_enable static-libs static) + $(use_with systemd) + $(use_enable skill) + ) + + if use ncurses; then + # Only pass whis when we are building the 'watch' command + myeconfargs+=( $(multilib_native_use_enable unicode watch8bit) ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_test() { + local ps="${BUILD_DIR}/src/ps/pscommand" + if [[ $("${ps}" --no-headers -o cls -q $$) == IDL ]]; then + # bug #708230 + ewarn "Skipping tests due to SCHED_IDLE" + else + # bug #461302 + emake check