sys-process/procps: Sync with Gentoo

It's from Gentoo commit 6997d72cc73fb28fb11b25adca6f37b9a98e21cb.
This commit is contained in:
Flatcar Buildbot 2023-09-04 07:16:02 +00:00 committed by Krzesimir Nowak
parent 4bb663528d
commit 2416ca8095
6 changed files with 248 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST procps-ng-3.3.17.tar.xz 1008428 BLAKE2B 43aa1a21d4f0725b1c02457f343cf1fc66bc1771b25c6eaf689c9775c190e90545bfac1729f027abc4d3d13de37ffac4828554b5b25e12bcf6af9540de1695f3 SHA512 59e9a5013430fd9da508c4655d58375dc32e025bb502bb28fb9a92a48e4f2838b3355e92b4648f7384b2050064d17079bf4595d889822ebb5030006bc154a1a7
DIST procps-ng-4.0.4.tar.xz 1401540 BLAKE2B 63b972666ef9e92042be96739ffa15c787d0346b2d3ffcb0d240b0a4e999dc90024b2c5b058df683dd9d2c436ceb812abd0b115cc877a6ca1023988b86de443f SHA512 94375544e2422fefc23d7634063c49ef1be62394c46039444f85e6d2e87e45cfadc33accba5ca43c96897b4295bfb0f88d55a30204598ddb26ef66f0420cefb4

View File

@ -0,0 +1,27 @@
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

View File

@ -0,0 +1,52 @@
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 = \

View File

@ -0,0 +1,33 @@
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

View File

@ -0,0 +1,25 @@
--- a/testsuite/pmap.test/pmap.exp
+++ b/testsuite/pmap.test/pmap.exp
@@ -87,13 +87,15 @@ proc expect_twice_total { test } {
}
}
-set test "pmap X pid pid has same total"
-spawn $pmap -X $mypid $mypid
-expect_twice_total "$test"
-
-set test "pmap XX pid pid has same total"
-spawn $pmap -XX $mypid $mypid
-expect_twice_total "$test"
+# Fails in gentoo sandbox, needs investigation
+#set test "pmap X pid pid has same total"
+#spawn $pmap -X $mypid $mypid
+#expect_twice_total "$test"
+
+# Fails in gentoo sandbox, needs investigation
+#set test "pmap XX pid pid has same total"
+#spawn $pmap -XX $mypid $mypid
+#expect_twice_total "$test"
set test "pmap finding shm"
make_testshm_proc

View File

@ -0,0 +1,110 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools flag-o-matic multilib-minimal usr-ldscript
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
# are still hosted on SF.
SRC_URI="mirror://sourceforge/${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/0-ng"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="elogind +kill modern-top +ncurses nls selinux static-libs systemd test unicode"
RESTRICT="!test? ( test )"
DEPEND="
elogind? ( sys-auth/elogind )
ncurses? ( >=sys-libs/ncurses-5.7-r7:=[unicode(+)?] )
selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
systemd? ( sys-apps/systemd[${MULTILIB_USEDEP}] )
"
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
kill? (
!sys-apps/coreutils[kill]
!sys-apps/util-linux[kill]
)
"
BDEPEND="
elogind? ( virtual/pkgconfig )
ncurses? ( virtual/pkgconfig )
systemd? ( virtual/pkgconfig )
test? ( dev-util/dejagnu )
"
# https://bugs.gentoo.org/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
)
src_prepare() {
default
# Only for fix-tests-multilib.patch and fix-systemd-linkage.patch
eautoreconf
}
multilib_src_configure() {
# http://www.freelists.org/post/procps/PATCH-enable-transparent-large-file-support
# bug #471102
append-lfs-flags
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_use_with ncurses)
# bug #794997
$(multilib_native_use_enable !elibc_musl w)
$(multilib_native_use_enable unicode watch8bit)
$(use_enable nls)
$(use_enable selinux libselinux)
$(use_enable static-libs static)
$(use_with systemd)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_test() {
# bug #461302
emake check </dev/null
}
multilib_src_install() {
default
dodoc "${S}"/sysctl.conf
if multilib_is_native_abi ; then
dodir /bin
mv "${ED}"/usr/bin/ps "${ED}"/bin/ || die
if use kill ; then
mv "${ED}"/usr/bin/kill "${ED}"/bin/ || die
fi
gen_usr_ldscript -a proc2
fi
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -type f -name '*.la' -delete || die
}