mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
sys-process/procps: Sync with Gentoo
It's from Gentoo commit dd1f3445914bf214fb1b2b11117ca7e898cf793a. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
0fcb06b9e5
commit
11551eef3d
@ -1,2 +1,3 @@
|
||||
DIST procps-ng-4.0.4.tar.xz 1401540 BLAKE2B 63b972666ef9e92042be96739ffa15c787d0346b2d3ffcb0d240b0a4e999dc90024b2c5b058df683dd9d2c436ceb812abd0b115cc877a6ca1023988b86de443f SHA512 94375544e2422fefc23d7634063c49ef1be62394c46039444f85e6d2e87e45cfadc33accba5ca43c96897b4295bfb0f88d55a30204598ddb26ef66f0420cefb4
|
||||
DIST procps-ng-4.0.5.tar.xz 1517672 BLAKE2B 4b273ac7737202147fbf392995da1c5ff385df2b53ad84180b6412dc45c2a671e81d7659c0a5824c0d8c19fa37cbf2e58b0545841c74399b3717a9f27fd26c23 SHA512 c27730743210cf850c4af98e1fb81bc8ee8d550b07b9eedb34a5b9d661263d0f1bc92c4e73802a0ed8d4405854aef4bc542bff283c28e8fbb6dabb967f9e4359
|
||||
DIST procps-ng-4.0.6.tar.xz 1580516 BLAKE2B 20acd79cf60e2967f82724ef432a239c29fd12fc6d24dac5d606eac6a167a7ad46001c08796fa2a910afc709d1e7c3ee1b9260d9753339f423b21fb457264c6b SHA512 c499aa14b6c94eda3a455bfe0d2d3c74c79dd718bffbd20207bd0831cb87725b83a76e4ee537a49ddf112bd1248a156d35da00035cbcd4c22037a20dcb4bdc9c
|
||||
DIST procps-ng-4.0.6.tar.xz.asc 833 BLAKE2B baaf361cf5e173fafa090930c2cd06769b9cecb95c5b0c41e38d1d5d4ac342b098e3906b836c610f177c8a582c4fe1bc76b8fa8afb111c85c394137d7fad19b7 SHA512 a5cee151b5a1591efad4f91ca75e43e0b7fc9d2d403db1d71d7e0937b8916c1fcffaa22369ca5289e2e5989cca35c3a6073efcfc969026a59738e793bdf28331
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
https://gitlab.com/procps-ng/procps/-/commit/ca004d4657d5e8b468a4552ede429be53193a3a9
|
||||
|
||||
From ca004d4657d5e8b468a4552ede429be53193a3a9 Mon Sep 17 00:00:00 2001
|
||||
From: Craig Small <csmall@dropbear.xyz>
|
||||
Date: Thu, 31 Aug 2023 22:24:23 +1000
|
||||
Subject: [PATCH] build-sys: Add systemd/elogind to w
|
||||
|
||||
Depending on the compiler flags, w needs to be explictly linked
|
||||
to libsystemd or elogind even though libproc2 is linked to it.
|
||||
|
||||
Signed-off-by: Craig Small <csmall@dropbear.xyz>
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -149,6 +149,13 @@ endif
|
||||
|
||||
dist_man_MANS += man/w.1
|
||||
src_w_SOURCES = src/w.c local/fileutils.c
|
||||
+src_w_LDADD = $(LDADD)
|
||||
+if WITH_SYSTEMD
|
||||
+src_w_LDADD += @SYSTEMD_LIBS@
|
||||
+endif
|
||||
+if WITH_ELOGIND
|
||||
+src_w_LDADD += @ELOGIND_LIBS@
|
||||
+endif
|
||||
else
|
||||
EXTRA_DIST += man/w.1
|
||||
endif
|
||||
@ -1,52 +0,0 @@
|
||||
https://gitlab.com/procps-ng/procps/-/merge_requests/205
|
||||
|
||||
From 4b6b91b393c0f5d3ec26910785cb3e3a463fcb57 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Sat, 2 Sep 2023 10:46:38 +0100
|
||||
Subject: [PATCH] testsuite: skip tests where relevant binaries aren't built
|
||||
|
||||
* With --without-ncurses, slabtop isn't built.
|
||||
* With --disable-w, w isn't built.
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/testsuite/Makefile.am
|
||||
+++ b/testsuite/Makefile.am
|
||||
@@ -14,16 +14,23 @@ if LINUX
|
||||
# 3d807ae853b8b4264da156065b34f1447658a8ba
|
||||
DEJATOOL += \
|
||||
pmap
|
||||
+
|
||||
if !CYGWIN
|
||||
-DEJATOOL += \
|
||||
- slabtop \
|
||||
- sysctl
|
||||
+if WITH_NCURSES
|
||||
+DEJATOOL += slabtop
|
||||
+endif
|
||||
+
|
||||
+DEJATOOL += sysctl
|
||||
endif
|
||||
|
||||
if BUILD_KILL
|
||||
DEJATOOL += kill
|
||||
endif
|
||||
|
||||
+if BUILD_W
|
||||
+DEJATOOL += w
|
||||
+endif
|
||||
+
|
||||
DEJATOOL += \
|
||||
free \
|
||||
lib \
|
||||
@@ -31,10 +38,8 @@ DEJATOOL += \
|
||||
pkill \
|
||||
ps \
|
||||
pwdx \
|
||||
- slabtop \
|
||||
uptime \
|
||||
- vmstat \
|
||||
- w
|
||||
+ vmstat
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
@ -1,33 +0,0 @@
|
||||
https://bugs.gentoo.org/565304
|
||||
--- a/man/sysctl.8
|
||||
+++ b/man/sysctl.8
|
||||
@@ -141,21 +141,21 @@ replaced (by having a new configuration file with the same name in a
|
||||
directory of higher priority) or partially replaced (by having a configuration
|
||||
file that is ordered later).
|
||||
.SH EXAMPLES
|
||||
-/sbin/sysctl \-a
|
||||
+/usr/bin/sysctl \-a
|
||||
.br
|
||||
-/sbin/sysctl \-n kernel.hostname
|
||||
+/usr/bin/sysctl \-n kernel.hostname
|
||||
.br
|
||||
-/sbin/sysctl \-w kernel.domainname="example.com"
|
||||
+/usr/bin/sysctl \-w kernel.domainname="example.com"
|
||||
.br
|
||||
-/sbin/sysctl \-p/etc/sysctl.conf
|
||||
+/usr/bin/sysctl \-p/etc/sysctl.conf
|
||||
.br
|
||||
-/sbin/sysctl \-a \-\-pattern forward
|
||||
+/usr/bin/sysctl \-a \-\-pattern forward
|
||||
.br
|
||||
-/sbin/sysctl \-a \-\-pattern forward$
|
||||
+/usr/bin/sysctl \-a \-\-pattern forward$
|
||||
.br
|
||||
-/sbin/sysctl \-a \-\-pattern 'net.ipv4.conf.(eth|wlan)0.arp'
|
||||
+/usr/bin/sysctl \-a \-\-pattern 'net.ipv4.conf.(eth|wlan)0.arp'
|
||||
.br
|
||||
-/sbin/sysctl \-\-pattern '\[char94]net.ipv6' \-\-system
|
||||
+/usr/bin/sysctl \-\-pattern '\[char94]net.ipv6' \-\-system
|
||||
.SH DEPRECATED PARAMETERS
|
||||
The
|
||||
.B base_reachable_time
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
https://bugs.gentoo.org/969469
|
||||
https://gitlab.com/procps-ng/procps/-/issues/412
|
||||
https://gitlab.com/procps-ng/procps/-/merge_requests/284
|
||||
|
||||
From 5574f049830ec8f76b5042855b65b418a0b3e8f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
|
||||
Date: Fri, 30 Jan 2026 13:05:18 +0100
|
||||
Subject: [PATCH] library: Fix off-by-one error in procps_pid_length
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Section "pid_max" in Linux admin-guide/sysctl/kernel.rst says:
|
||||
|
||||
| PID allocation wrap value. When the kernel's next PID value
|
||||
| reaches this value, it wraps back to a minimum PID value.
|
||||
| PIDs of value "pid_max" or larger are not allocated.
|
||||
|
||||
In particular, when pid_max == 10**N exactly, then the largest
|
||||
possible PID is 10**N - 1, i.e. the length is N.
|
||||
|
||||
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
||||
---
|
||||
library/sysinfo.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/library/sysinfo.c b/library/sysinfo.c
|
||||
index 35a99220..aad90f56 100644
|
||||
--- a/library/sysinfo.c
|
||||
+++ b/library/sysinfo.c
|
||||
@@ -139,9 +139,14 @@ PROCPS_EXPORT unsigned int procps_pid_length(void)
|
||||
pid_length = DEFAULT_PID_LENGTH;
|
||||
if ((fp = fopen(PROCFS_PID_MAX, "r")) != NULL) {
|
||||
if (fgets(pidbuf, sizeof(pidbuf), fp) != NULL) {
|
||||
- pid_length = strlen(pidbuf);
|
||||
- if (pidbuf[pid_length-1] == '\n')
|
||||
- --pid_length;
|
||||
+ errno = 0;
|
||||
+ long pid_max = strtol(pidbuf, NULL, 10);
|
||||
+ if (errno == 0 && pid_max > 0) {
|
||||
+ pid_max--;
|
||||
+ pid_length = 1;
|
||||
+ while ((pid_max /= 10) > 0)
|
||||
+ pid_length++;
|
||||
+ }
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
@ -0,0 +1,41 @@
|
||||
https://bugs.gentoo.org/969014
|
||||
https://gitlab.com/procps-ng/procps/-/issues/410
|
||||
https://gitlab.com/procps-ng/procps/-/merge_requests/282
|
||||
|
||||
From 98f60043abb4d45661b3adee261e4a14cf94c025 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
|
||||
Date: Sun, 25 Jan 2026 13:35:34 +0100
|
||||
Subject: [PATCH] sysctl: Respect ignore_failure also for close_stream
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the kernel rejects an unknown value for given a key, then output
|
||||
will be pending and close_stream will fail (typically with ENOENT).
|
||||
|
||||
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
||||
---
|
||||
src/sysctl.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/sysctl.c b/src/sysctl.c
|
||||
index d04d5e36..b702fd9f 100644
|
||||
--- a/src/sysctl.c
|
||||
+++ b/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) {
|
||||
- warn(_("setting key \"%s\""), dotted_key);
|
||||
+ warn(_("setting key \"%s\"%s"),
|
||||
+ dotted_key, (ignore_failure?_(", ignoring"):""));
|
||||
free(dotted_key);
|
||||
- return EXIT_FAILURE;
|
||||
+ if (!ignore_failure)
|
||||
+ rc = EXIT_FAILURE;
|
||||
+ return rc;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -15,7 +15,7 @@ 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"
|
||||
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 )"
|
||||
|
||||
@ -29,8 +29,6 @@ DEPEND="
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
!<app-i18n/man-pages-l10n-4.2.0-r1
|
||||
!<app-i18n/man-pages-de-2.12-r1
|
||||
!<app-i18n/man-pages-pl-0.7-r1
|
||||
!<app-i18n/man-pages-zh_CN-1.6.4.2
|
||||
kill? (
|
||||
!sys-apps/coreutils[kill]
|
||||
@ -55,6 +53,9 @@ PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.0.5-top-legacy-config-vuln.patch # bug #958286
|
||||
"${FILESDIR}"/${PN}-4.0.5-macos.patch
|
||||
"${FILESDIR}"/${PN}-4.0.5-pgrep-old-linux-headers.patch # bug #911375
|
||||
"${FILESDIR}"/${PN}-4.0.5-pidwait-half.patch # bug #959706
|
||||
"${FILESDIR}"/${PN}-4.0.5-pgrep-pidwait.patch
|
||||
"${FILESDIR}"/${PN}-4.0.5-sysctl-ignore_failure.patch # bug #969014
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
@ -1,26 +1,31 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# 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
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/craigsmall.asc
|
||||
inherit autotools flag-o-matic multilib-minimal verify-sig 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.4, the dist tarballs
|
||||
# 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"
|
||||
SRC_URI="
|
||||
https://downloads.sourceforge.net/${PN}-ng/${PN}-ng-${PV}.tar.xz
|
||||
verify-sig? ( https://downloads.sourceforge.net/${PN}-ng/${PN}-ng-${PV}.tar.xz.asc )
|
||||
"
|
||||
S="${WORKDIR}"/${PN}-ng-${PV}
|
||||
|
||||
# See bug #913210
|
||||
LICENSE="GPL-2+ LGPL-2+ LGPL-2.1+"
|
||||
SLOT="0/0-ng"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
|
||||
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}] )
|
||||
@ -28,8 +33,7 @@ DEPEND="
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
!<app-i18n/man-pages-l10n-4.2.0-r1
|
||||
!<app-i18n/man-pages-de-2.12-r1
|
||||
!<app-i18n/man-pages-pl-0.7-r1
|
||||
!<app-i18n/man-pages-zh_CN-1.6.4.2
|
||||
kill? (
|
||||
!sys-apps/coreutils[kill]
|
||||
!sys-apps/util-linux[kill]
|
||||
@ -37,25 +41,27 @@ RDEPEND="
|
||||
"
|
||||
BDEPEND="
|
||||
elogind? ( virtual/pkgconfig )
|
||||
elibc_musl? ( virtual/pkgconfig )
|
||||
ncurses? ( virtual/pkgconfig )
|
||||
systemd? ( virtual/pkgconfig )
|
||||
test? ( dev-util/dejagnu )
|
||||
verify-sig? ( sec-keys/openpgp-keys-craigsmall )
|
||||
"
|
||||
|
||||
# https://bugs.gentoo.org/898830
|
||||
# bug #898830
|
||||
QA_CONFIG_IMPL_DECL_SKIP=( makedev )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.0.4-sysctl-manpage.patch # bug #565304
|
||||
"${FILESDIR}"/${PN}-4.0.4-fix-tests-multilib.patch
|
||||
"${FILESDIR}"/${PN}-4.0.4-xfail-pmap-test.patch
|
||||
"${FILESDIR}"/${P}-fix-systemd-linkage.patch
|
||||
"${FILESDIR}"/${PN}-4.0.5-sysctl-manpage.patch # bug #565304
|
||||
"${FILESDIR}"/${PN}-4.0.6-sysctl-ignore_failure.patch
|
||||
"${FILESDIR}"/${PN}-4.0.6-pid-off-by-one.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Only for fix-tests-multilib.patch and fix-systemd-linkage.patch
|
||||
# Only needed for fix-tests-multilib.patch and pgrep-old-linux-headers.patch
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
@ -64,12 +70,19 @@ multilib_src_configure() {
|
||||
# bug #471102
|
||||
append-lfs-flags
|
||||
|
||||
# Workaround for bug 969592
|
||||
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)
|
||||
@ -91,7 +104,7 @@ multilib_src_configure() {
|
||||
multilib_src_test() {
|
||||
local ps="${BUILD_DIR}/src/ps/pscommand"
|
||||
if [[ $("${ps}" --no-headers -o cls -q $$) == IDL ]]; then
|
||||
# bug 708230
|
||||
# bug #708230
|
||||
ewarn "Skipping tests due to SCHED_IDLE"
|
||||
else
|
||||
# bug #461302
|
||||
@ -104,10 +117,11 @@ multilib_src_install() {
|
||||
|
||||
dodoc "${S}"/sysctl.conf
|
||||
|
||||
if multilib_is_native_abi ; then
|
||||
if multilib_is_native_abi; then
|
||||
# We keep ps and kill in /bin per bug #565304.
|
||||
dodir /bin
|
||||
mv "${ED}"/usr/bin/ps "${ED}"/bin/ || die
|
||||
if use kill ; then
|
||||
if use kill; then
|
||||
mv "${ED}"/usr/bin/kill "${ED}"/bin/ || die
|
||||
fi
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user