changeset 1287:8c73c712e598

core/procps: upgrad to 3.3.17
author David Demelier <markand@malikania.fr>
date Tue, 16 Nov 2021 14:49:07 +0100
parents 53cb989f05ad
children 9867e578b1a9
files core/procps/patch-musl.patch core/procps/procps-post.sh core/procps/procps.sh core/procps/procps.sha1
diffstat 4 files changed, 58 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/procps/patch-musl.patch	Tue Nov 16 14:49:07 2021 +0100
@@ -0,0 +1,41 @@
+Pulling in utmpx.h which does not have UT_HOSTSIZE, UT_LINESIZE & UT_NAMESIZE defined.
+
+Causing:
+w.c: In function 'print_from':
+w.c:236:43: error: 'UT_HOSTSIZE' undeclared (first use in this function)
+  236 |    print_display_or_interface(u->ut_host, UT_HOSTSIZE, fromlen - len);
+      |                                           ^~~~~~~~~~~
+w.c:236:43: note: each undeclared identifier is reported only once for each function it appears in
+w.c: In function 'getproc':
+w.c:357:12: error: 'UT_NAMESIZE' undeclared (first use in this function)
+  357 |   char buf[UT_NAMESIZE + 1];
+....
+
+proc/escape.c:237:30: error: 'CODESET' undeclared (first use in this function)
+  237 |      char *enc = nl_langinfo(CODESET);
+
+--- a/w.c
++++ b/w.c
+@@ -55,11 +55,7 @@
+ #include <termios.h>
+ #include <time.h>
+ #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' */
+--- 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"
--- a/core/procps/procps-post.sh	Mon Nov 15 09:26:44 2021 +0100
+++ b/core/procps/procps-post.sh	Tue Nov 16 14:49:07 2021 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+# Copyright (c) 2019-2021 David Demelier <markand@malikania.fr>
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
--- a/core/procps/procps.sh	Mon Nov 15 09:26:44 2021 +0100
+++ b/core/procps/procps.sh	Tue Nov 16 14:49:07 2021 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+# Copyright (c) 2019-2021 David Demelier <markand@malikania.fr>
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -16,13 +16,13 @@
 #
 
 PKGNAME=procps
-PKGVERSION=3.3.15
+PKGVERSION=3.3.17
 PKGREVISION=1
 PKGLICENSE="GPL-2.0-only LGPL-2.1-or-later"
 PKGSUMMARY="monitoring tools"
 PKGDOWNLOAD="https://gitlab.com/procps-ng/procps/-/archive/v$PKGVERSION/$PKGNAME-v$PKGVERSION.tar.gz"
 PKGDEPENDS="ncurses"
-PKGOPTIONS="NLS"
+PKGOPTIONS="ELOGIND NLS"
 
 : ${CHOST:=$(uname -m)-linux-musl}
 : ${CBUILD:=$(uname -m)-linux-musl}
@@ -30,8 +30,16 @@
 : ${CFLAGS:=-O2}
 : ${LDFLAGS:=}
 : ${LIBS:=}
+: ${ELOGIND:=no}
 : ${NLS:=yes}
 
+if [ "$ELOGIND" = "yes" ]; then
+	PKGDEPENDS="elogind $PKGDEPENDS"
+	with_elogind="--with-elogind"
+else
+	with_elogind="--without-elogind"
+fi
+
 if [ "$NLS" = "yes" ]; then
 	PKGDEPENDS="gettext $PKGDEPENDS"
 	with_nls="--enable-nls"
@@ -42,9 +50,11 @@
 build()
 {
 	rm -rf $PKGNAME-v$PKGVERSION
-	tar xvf $PKGNAME-v$PKGVERSION.tar.gz
+	tar -xvf $PKGNAME-v$PKGVERSION.tar.gz
 	cd $PKGNAME-v$PKGVERSION
 
+	# https://git.alpinelinux.org/aports/plain/main/procps/musl-fixes.patch
+	patch -p1 < ../patch-musl.patch
 	./autogen.sh
 	CC="$CC" \
 	CFLAGS="$CFLAGS" \
@@ -58,6 +68,7 @@
 		--disable-libselinux \
 		--disable-kill \
 		--enable-shared \
+		$with_elogind \
 		$with_nls
 	make
 	make install DESTDIR=$DESTDIR
--- a/core/procps/procps.sha1	Mon Nov 15 09:26:44 2021 +0100
+++ b/core/procps/procps.sha1	Tue Nov 16 14:49:07 2021 +0100
@@ -1,1 +1,1 @@
-eb1b51216c7970973929325694d4ec1985899269  procps-v3.3.15.tar.gz
+091db4f07a55e17086a412927af5c02cddba14ab  procps-v3.3.17.tar.gz