aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory A. Pratt <anarchy@gentoo.org>2018-04-09 10:36:34 -0500
committerJory A. Pratt <anarchy@gentoo.org>2018-04-09 10:36:34 -0500
commita66f4c45b4a569ef492385fb6952e10948fb58a3 (patch)
tree9a849909718f970923e23d820da714785d0f66dd /sys-process/procps
parentsys-kernel/linux-headers: new patch (diff)
downloadmusl-a66f4c45b4a569ef492385fb6952e10948fb58a3.tar.gz
musl-a66f4c45b4a569ef492385fb6952e10948fb58a3.tar.bz2
musl-a66f4c45b4a569ef492385fb6952e10948fb58a3.zip
sys-process/procps - remove unused macro and glibc header, thanks parazyd
Diffstat (limited to 'sys-process/procps')
-rw-r--r--sys-process/procps/Manifest1
-rw-r--r--sys-process/procps/files/procps-3.3.11-sysctl-manpage.patch32
-rw-r--r--sys-process/procps/files/procps-3.3.12-proc-tests.patch47
-rw-r--r--sys-process/procps/files/procps-3.3.13-remove_libio_h.patch25
-rw-r--r--sys-process/procps/files/procps-3.3.13-remove_unneeded_macros.patch38
-rw-r--r--sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch46
-rw-r--r--sys-process/procps/metadata.xml17
-rw-r--r--sys-process/procps/procps-3.3.13.ebuild83
8 files changed, 289 insertions, 0 deletions
diff --git a/sys-process/procps/Manifest b/sys-process/procps/Manifest
new file mode 100644
index 0000000..66b6b52
--- /dev/null
+++ b/sys-process/procps/Manifest
@@ -0,0 +1 @@
+DIST procps-ng-3.3.13.tar.xz 901156 BLAKE2B ee172016800d3570855873e38fc6ce1b05bb4f43e960097adf6ae806ca8140636d14b0fa8185b19b5580476f5943370d2f128f56ef7274bc66b30c80e0fe9c8b SHA512 9419a54b9875d4e33dd63face5c85cdbef1b8376416d469609128c9370c337a32b9b951c865e53c2ae6cfc8ce8eb7657f724a997cd3206d7af97ddf8a978e008
diff --git a/sys-process/procps/files/procps-3.3.11-sysctl-manpage.patch b/sys-process/procps/files/procps-3.3.11-sysctl-manpage.patch
new file mode 100644
index 0000000..3523aad
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.11-sysctl-manpage.patch
@@ -0,0 +1,32 @@
+--- procps-ng-3.3.11-orig/sysctl.8
++++ procps-ng-3.3.11/sysctl.8
+@@ -123,21 +123,21 @@
+ \fB\-V\fR, \fB\-\-version\fR
+ Display version information and exit.
+ .SH EXAMPLES
+-/sbin/sysctl \-a
++/usr/sbin/sysctl \-a
+ .br
+-/sbin/sysctl \-n kernel.hostname
++/usr/sbin/sysctl \-n kernel.hostname
+ .br
+-/sbin/sysctl \-w kernel.domainname="example.com"
++/usr/sbin/sysctl \-w kernel.domainname="example.com"
+ .br
+-/sbin/sysctl \-p/etc/sysctl.conf
++/usr/sbin/sysctl \-p/etc/sysctl.conf
+ .br
+-/sbin/sysctl \-a \-\-pattern forward
++/usr/sbin/sysctl \-a \-\-pattern forward
+ .br
+-/sbin/sysctl \-a \-\-pattern forward$
++/usr/sbin/sysctl \-a \-\-pattern forward$
+ .br
+-/sbin/sysctl \-a \-\-pattern 'net.ipv4.conf.(eth|wlan)0.arp'
++/usr/sbin/sysctl \-a \-\-pattern 'net.ipv4.conf.(eth|wlan)0.arp'
+ .br
+-/sbin/sysctl \-\-system \-\-pattern '^net.ipv6'
++/usr/sbin/sysctl \-\-system \-\-pattern '^net.ipv6'
+ .SH DEPRECATED PARAMETERS
+ The
+ .B base_reachable_time
diff --git a/sys-process/procps/files/procps-3.3.12-proc-tests.patch b/sys-process/procps/files/procps-3.3.12-proc-tests.patch
new file mode 100644
index 0000000..9549252
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.12-proc-tests.patch
@@ -0,0 +1,47 @@
+https://bugs.gentoo.org/583036
+http://www.freelists.org/post/procps/Patch-Test-suite-fails-if-procpidsmaps-is-absent,1
+
+From: tobbs@opentrash.com
+To: procps@freelists.org
+Date: Sun, 11 Sep 2016 15:01:29 +0200
+Subject: [procps] [Patch] Test suite fails if /proc/<pid>/smaps is absent
+Message-Id: <20160911130129.9A8B3322A81@astra4649.startdedicated.de>
+
+Summary: Some Linux systems do not have /proc/<pid>/smaps, hence the test
+suite fails. Attached a patch to skip tests in that case it.
+
+When pmap is called with either -c, -x, or -x it tries to read
+/proc/<pid>/smaps (pmap.c, l. 540). If not present it exits.
+The file /proc/<pid>/smaps exits on Linux systems only if the kernel is
+compiled with the option CONFIG_PROC_PAGE_MONITOR (see man page proc(5)).
+
+In the test suite some tests check the output of pmap -X et al, but they
+fail if /proc/<pid>/smaps is not present, because pmap does not produce
+their expected output.
+
+Attached a patch which checks if /proc/<pid>/smaps exits, if not it
+skipps the test related to it.
+
+Note: It is unclear what the 'expected' behaviour/output of pmap should
+be if the file /proc/<pid>/smaps is not present. Maybe add an additional
+test to check the return code if /proc/<pid>/smaps is absent.
+
+--- a/testsuite/pmap.test/pmap.exp
++++ b/testsuite/pmap.test/pmap.exp
+@@ -45,6 +45,11 @@
+ spawn $pmap -qd $mypid
+ expect_table $test $pmap_procname $pmap_device_items "\$"
+
++if { [ file readable "/proc/self/smaps" ] == 0 } {
++ unsupported "Skipping test which require pmap to access /proc/<pid>/smaps, because kernel seems to be compiled without CONFIG_PROC_PAGE_MONITOR."
++
++} else {
++
+ set test "pmap extended output"
+ spawn $pmap -x $mypid
+ expect_table $test $pmap_ext_header $pmap_ext_items $pmap_ext_footer
+@@ -66,3 +71,4 @@
+ spawn $pmap -XX 1
+ expect_pass $test "$pmap_initname\$"
+
++}
diff --git a/sys-process/procps/files/procps-3.3.13-remove_libio_h.patch b/sys-process/procps/files/procps-3.3.13-remove_libio_h.patch
new file mode 100644
index 0000000..720f30a
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.13-remove_libio_h.patch
@@ -0,0 +1,25 @@
+From 66d5f81b58c072ec43b7ed60864142076c9f146f Mon Sep 17 00:00:00 2001
+From: parazyd <parazyd@dyne.org>
+Date: Mon, 9 Apr 2018 17:13:21 +0200
+Subject: [PATCH 1/2] procio: Remove libio.h include.
+
+This is not needed and restores musl-libc compatibility.
+---
+ procio.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/procio.c b/procio.c
+index 479243e..ad9b4de 100644
+--- a/procio.c
++++ b/procio.c
+@@ -24,7 +24,6 @@
+ #endif
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <libio.h>
+ #include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+--
+2.17.0
+
diff --git a/sys-process/procps/files/procps-3.3.13-remove_unneeded_macros.patch b/sys-process/procps/files/procps-3.3.13-remove_unneeded_macros.patch
new file mode 100644
index 0000000..8471fa3
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.13-remove_unneeded_macros.patch
@@ -0,0 +1,38 @@
+From d8a2fd4dc00c88d739add2dc653a0e7cee8f9d2e Mon Sep 17 00:00:00 2001
+From: parazyd <parazyd@dyne.org>
+Date: Mon, 9 Apr 2018 17:14:27 +0200
+Subject: [PATCH 2/2] proc/numa: Remove unneeded macros.
+
+These macros break compatibility with musl-libc, and are not needed.
+---
+ proc/numa.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/proc/numa.h b/proc/numa.h
+index c198d9d..1b2b4eb 100644
+--- a/proc/numa.h
++++ b/proc/numa.h
+@@ -22,7 +22,9 @@
+
+ #include <features.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ void numa_init (void);
+ void numa_uninit (void);
+@@ -30,6 +32,8 @@ void numa_uninit (void);
+ extern int (*numa_max_node) (void);
+ extern int (*numa_node_of_cpu) (int);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif
+--
+2.17.0
+
diff --git a/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch
new file mode 100644
index 0000000..0039748
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch
@@ -0,0 +1,46 @@
+From 396cbc4cf36166217d877e2ff7e0a290758b0bc2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 27 Jun 2013 18:37:17 -0400
+Subject: [PATCH] kill: fix -PID handling
+
+Commit 19b6f48990b02aeca211b480625b95b2033c1017 tried to fix -PID
+handling, but the new logic ends up skipping over the arg. This is
+because getopt increments optind after it processed the -PID (even
+though it was an unknown option). We need to decrement it by one
+so the loop at the end of the code will process it for us.
+
+I also fixed some whitespace errors in that same commit.
+
+URL: http://code.google.com/p/chromium/issues/detail?id=255209
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ skill.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/skill.c b/skill.c
+index fb57305..074c5d7 100644
+--- a/skill.c
++++ b/skill.c
+@@ -390,7 +390,7 @@ static void __attribute__ ((__noreturn__))
+ else
+ sigopt++;
+
+- opterr=0; /* suppress errors on -123 */
++ opterr = 0; /* suppress errors on -123 */
+ while (loop == 1 && (i = getopt_long(argc, argv, "l::Ls:hV", longopts, NULL)) != -1)
+ switch (i) {
+ case 'l':
+@@ -423,7 +423,9 @@ static void __attribute__ ((__noreturn__))
+ xwarnx(_("invalid argument %c"), optopt);
+ kill_usage(stderr);
+ }
+- loop=0;
++ /* We need to back off by one since getopt() ate the -PID */
++ --optind;
++ loop = 0;
+ break;
+ default:
+ kill_usage(stderr);
+--
+1.8.2.1
+
diff --git a/sys-process/procps/metadata.xml b/sys-process/procps/metadata.xml
new file mode 100644
index 0000000..263e639
--- /dev/null
+++ b/sys-process/procps/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking.</flag>
+ <flag name="kill">Build the kill program</flag>
+ <flag name="modern-top">Enables new startup defaults of top. Keeps old defaults if disabled</flag>
+ <flag name="ncurses">Build programs that use ncurses: top, slabtop, watch</flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">procps</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-process/procps/procps-3.3.13.ebuild b/sys-process/procps/procps-3.3.13.ebuild
new file mode 100644
index 0000000..bc1799b
--- /dev/null
+++ b/sys-process/procps/procps-3.3.13.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="standard informational utilities and process-handling tools"
+HOMEPAGE="http://procps-ng.sourceforge.net/ https://gitlab.com/procps-ng/procps"
+SRC_URI="mirror://sourceforge/${PN}-ng/${PN}-ng-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0/5" # libprocps.so
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="elogind +kill modern-top +ncurses nls selinux static-libs systemd test unicode"
+
+COMMON_DEPEND="
+ elogind? ( sys-auth/elogind )
+ ncurses? ( >=sys-libs/ncurses-5.7-r7:=[unicode?] )
+ selinux? ( sys-libs/libselinux )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${COMMON_DEPEND}
+ elogind? ( virtual/pkgconfig )
+ ncurses? ( virtual/pkgconfig )
+ systemd? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )"
+RDEPEND="
+ ${COMMON_DEPEND}
+ kill? (
+ !sys-apps/coreutils[kill]
+ !sys-apps/util-linux[kill]
+ )
+ !<sys-apps/sysvinit-2.88-r6
+"
+
+S="${WORKDIR}/${PN}-ng-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.3.8-kill-neg-pid.patch # http://crbug.com/255209
+ "${FILESDIR}"/${PN}-3.3.11-sysctl-manpage.patch # 565304
+ "${FILESDIR}"/${PN}-3.3.12-proc-tests.patch # 583036
+ "${FILESDIR}"/${PN}-3.3.13-remove_libio_h.patch
+ "${FILESDIR}"/${PN}-3.3.13-remove_unneeded_macros.patch
+
+ # Upstream fixes
+)
+
+src_configure() {
+ # http://www.freelists.org/post/procps/PATCH-enable-transparent-large-file-support
+ append-lfs-flags #471102
+ local myeconfargs=(
+ --docdir='$(datarootdir)'/doc/${PF}
+ $(use_with elogind)
+ $(use_enable kill)
+ $(use_enable modern-top)
+ $(use_with ncurses)
+ $(use_enable nls)
+ $(use_enable selinux libselinux)
+ $(use_enable static-libs static)
+ $(use_with systemd)
+ $(use_enable unicode watch8bit)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ emake check </dev/null #461302
+}
+
+src_install() {
+ default
+ #dodoc sysctl.conf
+
+ 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 procps
+ find "${D}" -name '*.la' -delete || die
+}