summaryrefslogtreecommitdiff
path: root/system/procps
diff options
context:
space:
mode:
Diffstat (limited to 'system/procps')
-rw-r--r--system/procps/APKBUILD17
-rw-r--r--system/procps/add-langinfo-header.patch11
-rw-r--r--system/procps/shell-portability.patch11
-rw-r--r--system/procps/use-utmpx.patch38
-rw-r--r--system/procps/ut-hostsize.patch14
-rw-r--r--system/procps/utmpx.patch44
6 files changed, 79 insertions, 56 deletions
diff --git a/system/procps/APKBUILD b/system/procps/APKBUILD
index 11ccc7172..e0c3aac92 100644
--- a/system/procps/APKBUILD
+++ b/system/procps/APKBUILD
@@ -1,19 +1,20 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=procps
-pkgver=3.3.17
+pkgver=4.0.5
pkgrel=0
pkgdesc="Utilities for monitoring your system and processes on your system"
url="https://gitlab.com/procps-ng/procps"
arch="all"
-license="GPL-2.0+ LGPL-2.0+"
+license="GPL-2.0+ AND LGPL-2.0+"
depends=""
checkdepends="dejagnu"
makedepends_build="autoconf automake libtool gettext-tiny"
makedepends_host="ncurses-dev utmps-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang libproc"
source="https://gitlab.com/procps-ng/procps/-/archive/v$pkgver/procps-v$pkgver.tar.bz2
- use-utmpx.patch
- add-langinfo-header.patch
+ shell-portability.patch
+ ut-hostsize.patch
+ utmpx.patch
"
builddir="$srcdir/$pkgname-v$pkgver"
@@ -24,6 +25,7 @@ prepare() {
}
build() {
+ export CFLAGS="$CFLAGS -D__UT_HOSTSIZE=UT_HOSTSIZE"
export LIBS="$LIBS -lutmps -lskarnet"
export VERSION="$pkgver"
./configure \
@@ -70,6 +72,7 @@ libproc() {
mv "$pkgdir"/lib "$subpkgdir"/
}
-sha512sums="7f4ad6a76b042a2478fa866ea63d6826129b08b734c6341155134fcc73c0cf0df429c369dbd5aa65b28ebeeb1ab6ee8df4f2dab2083951bad539bce916e14b64 procps-v3.3.17.tar.bz2
-77cfd89cf75e937806dd068a83da3ad548000b941401fce49a482988dc8db82438ade2a939cf6fe795a59059275ffc4a61520b169da60f53ecef408a24042bcf use-utmpx.patch
-f1085cec2fab869b94d2a4b45baf68d6316e8f2ac729cd23341ef27c871df91f83f8953a777a0e858b244d8faf5171f9c640b9e7616c9a5d9c816fa044b92a78 add-langinfo-header.patch"
+sha512sums="8fc75d8c205ea18605a1f1eccf487a4236cd0503543d5c2917bcb047e760beba3b25b4ad3cb3224a48b390ec9289993bd5fed77105fa97c6b464c17708e97403 procps-v4.0.5.tar.bz2
+99bb972229204afda5236e71bdfaeaca383e9ab509cd21b78140457193b7dcc301b1306a621fe5164d975928a2d17128ed23f46502dd36c1aa10daaef28b792c shell-portability.patch
+bb22cf9875f08d027825645f46d467fbfe4b7d7b0374412f44929577e7afc723b44495edd9751901c2ba2292b2a59e9e5d532324047fefd986c30675563f7f45 ut-hostsize.patch
+670b4ff2e160fd4090be5c2474a08f44f3560d177de6276c734236e176148edfd877ebee3e326df6ccdb62cabb5d6281b14326a61cda7df9b7349115d9ce7853 utmpx.patch"
diff --git a/system/procps/add-langinfo-header.patch b/system/procps/add-langinfo-header.patch
deleted file mode 100644
index 8498271e8..000000000
--- a/system/procps/add-langinfo-header.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ur a/proc/escape.c b/proc/escape.c
---- a/proc/escape.c 2022-05-04 06:50:01.750000000 +0000
-+++ b/proc/escape.c 2022-05-04 06:50:29.050000000 +0000
-@@ -20,6 +20,7 @@
- #include <stdio.h>
- #include <sys/types.h>
- #include <string.h>
-+#include <langinfo.h>
- #include <limits.h>
- #include "procps.h"
- #include "escape.h"
diff --git a/system/procps/shell-portability.patch b/system/procps/shell-portability.patch
new file mode 100644
index 000000000..98e161483
--- /dev/null
+++ b/system/procps/shell-portability.patch
@@ -0,0 +1,11 @@
+--- procps-v4.0.5/Makefile.am.old 2024-12-18 18:41:10.000000000 -0600
++++ procps-v4.0.5/Makefile.am 2025-06-16 04:03:21.753061719 -0500
+@@ -455,7 +455,7 @@
+ last_capname=`sed -n -e 's/^#define\s*CAP_LAST_CAP\s*\([A-Z_]*\)$$/\1/p' $(LNX_CAP_HEADER)`; \
+ capability_count=`sed -n -e "s/^#define\s*$$last_capname\s*\([0-9]*\)$$/\1/p" $(LNX_CAP_HEADER)`; \
+ sed -n -e 's/^#define\s*CAP_\([A-Z_]*\)\s*\([0-9]*\)$$/ [\2] = \"\L\1\",/p' $(LNX_CAP_HEADER) >> $@; \
+- echo -e "};\n\n" >> $@; \
++ printf '};\n\n' >> $@; \
+ echo "#define CAPABILITY_COUNT $$capability_count" >> $@; \
+ echo "$$capnames_footer" >> $@; \
+ echo ""; \
diff --git a/system/procps/use-utmpx.patch b/system/procps/use-utmpx.patch
deleted file mode 100644
index 608ea6182..000000000
--- a/system/procps/use-utmpx.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -ur a/proc/whattime.c b/proc/whattime.c
---- a/proc/whattime.c 2022-05-04 07:08:11.390000000 +0000
-+++ b/proc/whattime.c 2022-05-04 07:08:42.860000000 +0000
-@@ -33,7 +33,7 @@
- #include <fcntl.h>
- #include <unistd.h>
- #include <time.h>
--#include <utmp.h>
-+#include <utmpx.h>
- #include <sys/ioctl.h>
- #include "whattime.h"
- #include "sysinfo.h"
-@@ -42,7 +43,7 @@
- static double av[3];
-
- char *sprint_uptime(int human_readable) {
-- struct utmp *utmpstruct;
-+ struct utmpx *utmpstruct;
- int upminutes, uphours, updays, upweeks, upyears, updecades;
- int pos;
- int comma;
-@@ -98,13 +99,13 @@
- /* count the number of users */
-
- numuser = 0;
-- setutent();
-- while ((utmpstruct = getutent())) {
-+ setutxent();
-+ while ((utmpstruct = getutxent())) {
- if ((utmpstruct->ut_type == USER_PROCESS) &&
- (utmpstruct->ut_name[0] != '\0'))
- numuser++;
- }
-- endutent();
-+ endutxent();
-
- pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s");
-
diff --git a/system/procps/ut-hostsize.patch b/system/procps/ut-hostsize.patch
new file mode 100644
index 000000000..3bc3255f7
--- /dev/null
+++ b/system/procps/ut-hostsize.patch
@@ -0,0 +1,14 @@
+--- procps-v4.0.5/configure.ac.old 2024-12-18 18:41:10.000000000 -0600
++++ procps-v4.0.5/configure.ac 2025-06-16 03:13:14.743718810 -0500
+@@ -81,9 +81,9 @@
+ dnl Needed for musl
+ if test "x$ac_cv_header_utmpx_h" = xyes
+ then :
+-AC_CHECK_DECLS([__UT_HOSTSIZE],
++AC_CHECK_DECLS([UT_HOSTSIZE],
+ [AC_DEFINE([HAVE_UT_HOSTSIZE_IN_UTMPX], [1],
+- [Define if __UT_HOSTSIZE in utmpx.h])],
++ [Define if UT_HOSTSIZE in utmpx.h])],
+ [],
+ [[#include <utmpx.h>]])
+ fi
diff --git a/system/procps/utmpx.patch b/system/procps/utmpx.patch
new file mode 100644
index 000000000..c4af55ede
--- /dev/null
+++ b/system/procps/utmpx.patch
@@ -0,0 +1,44 @@
+--- procps-v4.0.5/library/uptime.c.old 2024-12-18 18:41:10.000000000 -0600
++++ procps-v4.0.5/library/uptime.c 2025-06-16 03:14:07.898014940 -0500
+@@ -30,7 +30,11 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
++#ifdef HAVE_UTMPX_H
++#include <utmpx.h>
++#else
+ #include <utmp.h>
++#endif
+ #ifdef WITH_SYSTEMD
+ #include <systemd/sd-daemon.h>
+ #include <systemd/sd-login.h>
+@@ -63,7 +67,7 @@
+ PROCPS_EXPORT int procps_users(void)
+ {
+ int numuser = 0;
+-#ifdef HAVE_UTMP_X
++#ifdef HAVE_UTMPX_H
+ struct utmpx *ut;
+ #else
+ struct utmp *ut;
+@@ -99,7 +103,7 @@
+ }
+ #endif
+
+-#ifdef HAVE_UTMP_X
++#ifdef HAVE_UTMPX_H
+ setutxent();
+ while ((ut = getutxent())) {
+ #else
+@@ -109,7 +113,11 @@
+ if ((ut->ut_type == USER_PROCESS) && (ut->ut_name[0] != '\0'))
+ numuser++;
+ }
++#ifdef HAVE_UTMPX_H
++ endutxent();
++#else
+ endutent();
++#endif
+
+ return numuser;
+ }