public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jory Pratt" <anarchy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/musl:master commit in: sys-process/procps/files/, sys-process/procps/
Date: Mon, 29 Mar 2021 17:41:21 +0000 (UTC)	[thread overview]
Message-ID: <1617039673.6c860eccb31ff23e590be1319e1e2f22f6361983.anarchy@gentoo> (raw)

commit:     6c860eccb31ff23e590be1319e1e2f22f6361983
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 29 17:41:13 2021 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Mon Mar 29 17:41:13 2021 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=6c860ecc

sys-process/procps: Workaround busted musl build

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 sys-process/procps/Manifest                        |  1 +
 .../files/procps-3.3.11-sysctl-manpage.patch       | 32 ++++++++
 .../procps/files/procps-3.3.12-proc-tests.patch    | 47 ++++++++++++
 .../procps/files/procps-3.3.17-musl-fix.patch      | 72 ++++++++++++++++++
 sys-process/procps/metadata.xml                    | 18 +++++
 sys-process/procps/procps-3.3.17.ebuild            | 85 ++++++++++++++++++++++
 6 files changed, 255 insertions(+)

diff --git a/sys-process/procps/Manifest b/sys-process/procps/Manifest
new file mode 100644
index 0000000..f9a2cf0
--- /dev/null
+++ b/sys-process/procps/Manifest
@@ -0,0 +1 @@
+DIST procps-ng-3.3.17.tar.xz 1008428 BLAKE2B 43aa1a21d4f0725b1c02457f343cf1fc66bc1771b25c6eaf689c9775c190e90545bfac1729f027abc4d3d13de37ffac4828554b5b25e12bcf6af9540de1695f3 SHA512 59e9a5013430fd9da508c4655d58375dc32e025bb502bb28fb9a92a48e4f2838b3355e92b4648f7384b2050064d17079bf4595d889822ebb5030006bc154a1a7

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.17-musl-fix.patch b/sys-process/procps/files/procps-3.3.17-musl-fix.patch
new file mode 100644
index 0000000..ec3d1f8
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.17-musl-fix.patch
@@ -0,0 +1,72 @@
+From 7bfe2b7c12b33aabca71491360c433d2d3f7bbf4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 24 Feb 2021 21:14:31 +0000
+Subject: [PATCH 1/2] w.c: correct musl builds
+
+No need to redefine UT_ stuff to something that does not exist.
+
+UT_ is already provided in musl but via utmp.h header, so include
+it always.
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ w.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/w.c b/w.c
+index 9d07ac9e..d10639b8 100644
+--- a/w.c
++++ b/w.c
+@@ -57,9 +57,8 @@
+ #include <unistd.h>
+ #ifdef HAVE_UTMPX_H
+ #	include <utmpx.h>
+-#else
+-#	include <utmp.h>
+ #endif
++#include <utmp.h>
+ #include <arpa/inet.h>
+ 
+ static int ignoreuser = 0;	/* for '-u' */
+@@ -72,12 +71,6 @@ typedef struct utmpx utmp_t;
+ typedef struct utmp utmp_t;
+ #endif
+ 
+-#if !defined(UT_HOSTSIZE) || defined(__UT_HOSTSIZE)
+-#	define UT_HOSTSIZE __UT_HOSTSIZE
+-#	define UT_LINESIZE __UT_LINESIZE
+-#	define UT_NAMESIZE __UT_NAMESIZE
+-#endif
+-
+ #ifdef W_SHOWFROM
+ # define FROM_STRING "on"
+ #else
+-- 
+GitLab
+
+
+From 145165aba6c659f3f0f3567a323a3e6170408ea6 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 24 Feb 2021 21:16:14 +0000
+Subject: [PATCH 2/2] proc/escape.c: add missing include
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ proc/escape.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/proc/escape.c b/proc/escape.c
+index 2e8fb7dd..e1f4612d 100644
+--- a/proc/escape.c
++++ b/proc/escape.c
+@@ -21,6 +21,7 @@
+ #include <sys/types.h>
+ #include <string.h>
+ #include <limits.h>
++#include <langinfo.h>
+ #include "procps.h"
+ #include "escape.h"
+ #include "readproc.h"
+-- 
+GitLab
+

diff --git a/sys-process/procps/metadata.xml b/sys-process/procps/metadata.xml
new file mode 100644
index 0000000..c0aa0de
--- /dev/null
+++ b/sys-process/procps/metadata.xml
@@ -0,0 +1,18 @@
+<?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>
+	<remote-id type="cpe">cpe:/a:procps_project:procps</remote-id>
+</upstream>
+</pkgmetadata>

diff --git a/sys-process/procps/procps-3.3.17.ebuild b/sys-process/procps/procps-3.3.17.ebuild
new file mode 100644
index 0000000..eb286fa
--- /dev/null
+++ b/sys-process/procps/procps-3.3.17.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic multilib-minimal toolchain-funcs usr-ldscript
+
+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/8" # libprocps.so
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~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}] )
+"
+BDEPEND="
+	elogind? ( virtual/pkgconfig )
+	ncurses? ( virtual/pkgconfig )
+	systemd? ( virtual/pkgconfig )
+	test? ( dev-util/dejagnu )
+"
+RDEPEND="${DEPEND}
+	kill? (
+		!sys-apps/coreutils[kill]
+		!sys-apps/util-linux[kill]
+	)
+	!<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
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.3.11-sysctl-manpage.patch # 565304
+	"${FILESDIR}"/${PN}-3.3.12-proc-tests.patch # 583036
+	"${FILESDIR}"/${PN}-3.3.17-musl-fix.patch
+)
+
+multilib_src_configure() {
+	# http://www.freelists.org/post/procps/PATCH-enable-transparent-large-file-support
+	append-lfs-flags #471102
+	local myeconfargs=(
+		$(multilib_native_use_with elogind) # No elogind multilib support
+		$(multilib_native_use_enable kill)
+		$(multilib_native_use_enable modern-top)
+		$(multilib_native_use_with ncurses)
+		$(use_enable nls)
+		$(use_enable selinux libselinux)
+		$(use_enable static-libs static)
+		$(use_with systemd)
+		$(use_enable unicode watch8bit)
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+	emake check </dev/null #461302
+}
+
+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 procps
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	find "${ED}" -type f -name '*.la' -delete || die
+}


             reply	other threads:[~2021-03-29 17:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 17:41 Jory Pratt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-12 16:23 [gentoo-commits] proj/musl:master commit in: sys-process/procps/files/, sys-process/procps/ Aric Belsito
2018-04-09 15:38 Jory Pratt
2016-07-15  5:35 Anthony G. Basile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1617039673.6c860eccb31ff23e590be1319e1e2f22f6361983.anarchy@gentoo \
    --to=anarchy@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox