summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/procps/0001-pt_BR-fix-translation-error.patch29
-rw-r--r--system/procps/APKBUILD30
-rw-r--r--system/procps/strtod.patch115
-rw-r--r--system/procps/use-utmpx.patch132
4 files changed, 178 insertions, 128 deletions
diff --git a/system/procps/0001-pt_BR-fix-translation-error.patch b/system/procps/0001-pt_BR-fix-translation-error.patch
new file mode 100644
index 000000000..68b06406f
--- /dev/null
+++ b/system/procps/0001-pt_BR-fix-translation-error.patch
@@ -0,0 +1,29 @@
+From 8e56c510e49330031c454481380552623eadf38f Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Sat, 16 Jun 2018 21:37:27 -0500
+Subject: [PATCH] pt_BR: fix translation error
+
+"agora" means "now"; "gora" is not a Portuguese word.
+
+\a is 'bell' character, which means the string will cause a bell to
+sound instead of printing the correct word.
+---
+ po/pt_BR.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/po/pt_BR.po b/po/pt_BR.po
+index e7a859f..3f0106e 100644
+--- a/po/pt_BR.po
++++ b/po/pt_BR.po
+@@ -3072,7 +3072,7 @@ msgstr "nome de campo não reconhecido \"%s\""
+
+ #: top/top_nls.c:429
+ msgid "even using field names only, window is now too small"
+-msgstr "mesmo usando nomes de campo apenas, janela é pequena demais \agora"
++msgstr "mesmo usando nomes de campo apenas, janela é pequena demais agora"
+
+ #: top/top_nls.c:431
+ msgid "Open Files"
+--
+2.15.0
+
diff --git a/system/procps/APKBUILD b/system/procps/APKBUILD
index 5b1a66592..f44733a59 100644
--- a/system/procps/APKBUILD
+++ b/system/procps/APKBUILD
@@ -1,18 +1,18 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=procps
-pkgver=3.3.12
-pkgrel=4
+pkgver=3.3.15
+pkgrel=0
pkgdesc="Utilities for monitoring your system and processes on your system"
url="https://gitlab.com/procps-ng/procps"
arch="all"
-license="GPL LGPL"
-makedepends_build="autoconf automake libtool gettext-dev"
-makedepends_host="ncurses-dev gettext-dev"
+license="GPL-2.0+ LGPL-2.0+"
+makedepends_build="autoconf automake libtool gettext-tiny"
+makedepends_host="ncurses-dev utmps-dev"
checkdepends="dejagnu"
-subpackages="$pkgname-dev $pkgname-doc libproc"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang libproc"
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/procps-ng/$pkgname/repository/archive.tar.gz?ref=v$pkgver
- strtod.patch"
-builddir="$srcdir/$pkgname-v$pkgver"
+ 0001-pt_BR-fix-translation-error.patch
+ use-utmpx.patch"
prepare() {
# NOTE: Name of the tarball's top-level directory contains SHA1.
@@ -27,7 +27,7 @@ prepare() {
build() {
cd "$builddir"
- export LIBS="$LIBS -lintl"
+ export LIBS="$LIBS -lutmps -lskarnet"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -38,6 +38,7 @@ build() {
--mandir=/usr/share/man \
--sysconfdir=/etc \
--docdir=/usr/share/doc \
+ --datarootdir=/usr/share \
--disable-static \
--disable-rpath \
--with-ncurses \
@@ -48,7 +49,8 @@ build() {
check() {
cd "$builddir"
- make check
+ # can't use `make check`; 'po' dir has no check target
+ make check-TESTS
}
package() {
@@ -67,10 +69,12 @@ package() {
libproc() {
pkgdesc="Library for monitoring system and processes"
+ license="LGPL-2.1+"
install -d "$subpkgdir"/
mv "$pkgdir"/lib "$subpkgdir"/
}
-sha512sums="a4400b9e13f8e9ec1c527a0e9e2e5580b6d007cae0f961b2a82c2924e4922232cee7a8be77badb45d608383758476da0260460d8e0801a5e88ced7cc6b8c10cc procps-3.3.12.tar.gz
-93449c3b431a40d9fbfe8a5681cbd3696a984565b99d6105cf988ae571beda0c815104a3a13bf6d20289705e4063b0a61d2658c422293095e3eb78c29c41053b strtod.patch"
+sha512sums="61017c98827cb9c325fe51f74e9e912cb6b130abdc69742678968a45f4a6f1f033bac4adaed19908197bc97a7426a7a27e04be361edb74ebff3dc0383b71fa53 procps-3.3.15.tar.gz
+d63c8df42f74f08f19276a8f4d0260624313801b138aa2b430a105328c3230427d3e81bc016ddde9fc995575e97961a3be8e4f5ded34c874cc613c645605a976 0001-pt_BR-fix-translation-error.patch
+6683b94f64848721ebce8254461fbd70a3efd048bf9579c5bbe298bd1ec00594c05640327f0e03475e583607f1f7405139b93fc9f06592d5593174cbf6d4119f use-utmpx.patch"
diff --git a/system/procps/strtod.patch b/system/procps/strtod.patch
deleted file mode 100644
index 9cc974b1b..000000000
--- a/system/procps/strtod.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 4ed44ab58e27a9a09902b9c5b49df484842b6c9a Mon Sep 17 00:00:00 2001
-From: Dr. Werner Fink <werner@suse.de>
-Date: Wed, 13 Jul 2016 20:08:51 +1000
-Subject: [PATCH] misc: fix strtod_nol_err tests
-
-A better way of implementing the string to double
-conversion and a better way of testing it.
-
-Signed-off-by: Craig Small <csmall@enc.com.au>
----
- include/strutils.h | 2 +-
- lib/strutils.c | 22 ++++++++++++----------
- lib/test_strtod_nol.c | 7 ++++---
- 4 files changed, 20 insertions(+), 18 deletions(-)
-
-diff --git a/include/strutils.h b/include/strutils.h
-index 85a6192..a5a15c9 100644
---- a/include/strutils.h
-+++ b/include/strutils.h
-@@ -7,6 +7,6 @@
-
- extern long strtol_or_err(const char *str, const char *errmesg);
- extern double strtod_or_err(const char *str, const char *errmesg);
--double strtod_nol_or_err(char *str, const char *errmesg);
-+extern double strtod_nol_or_err(char *str, const char *errmesg);
-
- #endif
-diff --git a/lib/strutils.c b/lib/strutils.c
-index e5245db..e0632c4 100644
---- a/lib/strutils.c
-+++ b/lib/strutils.c
-@@ -20,6 +20,8 @@
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-+#include <float.h>
-+#include <math.h>
- #include <stdlib.h>
- #include <ctype.h>
-
-@@ -71,9 +73,9 @@ double strtod_or_err(const char *str, const char *errmesg)
- */
- double strtod_nol_or_err(char *str, const char *errmesg)
- {
-- double num;
-+ long double num;
- const char *cp, *radix;
-- double mult;
-+ long double mult;
- int negative = 0;
-
- if (str != NULL && *str != '\0') {
-@@ -95,29 +97,29 @@ double strtod_nol_or_err(char *str, const char *errmesg)
- mult=0.1;
- while(isdigit(*radix)) {
- radix++;
-- mult *= 10;
-+ mult *= 10.0;
- }
- while(isdigit(*cp)) {
-- num += (*cp - '0') * mult;
-- mult /= 10;
-+ num += (long double)(*cp - '0') * mult;
-+ mult /= 10.0;
- cp++;
- }
- /* got the integers */
- if (*cp == '\0')
-- return (negative?-num:num);
-+ return (double)(negative?-num:num);
- if (*cp != '.' && *cp != ',')
- error(EXIT_FAILURE, EINVAL, "%s: '%s'", errmesg, str);
-
- cp++;
- mult = 0.1;
- while(isdigit(*cp)) {
-- num += (*cp - '0') * mult;
-- mult /= 10;
-+ num += (long double)(*cp - '0') * mult;
-+ mult /= 10.0;
- cp++;
- }
- if (*cp == '\0')
-- return (negative?-num:num);
-+ return (double)(negative?-num:num);
- }
- error(EXIT_FAILURE, errno, "%s: '%s'", errmesg, str);
-- return 0;
-+ return (double)0;
- }
-diff --git a/lib/test_strtod_nol.c b/lib/test_strtod_nol.c
-index 0be798c..736768a 100644
---- a/lib/test_strtod_nol.c
-+++ b/lib/test_strtod_nol.c
-@@ -1,4 +1,5 @@
--
-+#include <float.h>
-+#include <math.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include "strutils.h"
-@@ -33,8 +34,8 @@ int main(int argc, char *argv[])
- double val;
-
- for(i=0; tests[i].string != NULL; i++) {
-- if(strtod_nol_or_err(tests[i].string, "Cannot parse number") !=
-- tests[i].result) {
-+ val = strtod_nol_or_err(tests[i].string, "Cannot parse number");
-+ if(fabs(tests[i].result - val) > DBL_EPSILON) {
- fprintf(stderr, "FAIL: strtod_nol_or_err(\"%s\") != %f\n",
- tests[i].string, tests[i].result);
- return EXIT_FAILURE;
---
-libgit2 0.26.0
-
diff --git a/system/procps/use-utmpx.patch b/system/procps/use-utmpx.patch
new file mode 100644
index 000000000..83047cf22
--- /dev/null
+++ b/system/procps/use-utmpx.patch
@@ -0,0 +1,132 @@
+diff --git a/configure.ac b/configure.ac
+index bc84a0d..da2916e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -44,7 +44,7 @@ AC_PROG_MAKE_SET
+
+ # Checks for header files.
+ AC_HEADER_MAJOR
+-AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h langinfo.h libintl.h limits.h locale.h netinet/in.h stdint.h stdio_ext.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utmp.h values.h wchar.h wctype.h])
++AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h langinfo.h libintl.h limits.h locale.h netinet/in.h stdint.h stdio_ext.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utmp.h utmpx.h values.h wchar.h wctype.h])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_CHECK_HEADER_STDBOOL
+diff --git a/proc/whattime.c b/proc/whattime.c
+index c223cad..d55fd22 100644
+--- a/proc/whattime.c
++++ b/proc/whattime.c
+@@ -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 +42,7 @@ static char buf[256];
+ 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 +98,13 @@ char *sprint_uptime(int human_readable) {
+ /* 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/w.c b/w.c
+index 35710a3..6caa8a6 100644
+--- a/w.c
++++ b/w.c
+@@ -23,6 +23,7 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++#include "config.h"
+ #include "c.h"
+ #include "fileutils.h"
+ #include "nls.h"
+@@ -54,14 +55,22 @@
+ #include <termios.h>
+ #include <time.h>
+ #include <unistd.h>
+-#include <utmp.h>
++#ifdef HAVE_UTMPX_H
++# include <utmpx.h>
++#else
++# include <utmp.h>
++#endif
+ #include <arpa/inet.h>
+
+ static int ignoreuser = 0; /* for '-u' */
+ static int oldstyle = 0; /* for '-o' */
+ static proc_t **procs; /* our snapshot of the process table */
+
++#ifdef HAVE_UTMPX_H
++typedef struct utmpx utmp_t;
++#else
+ typedef struct utmp utmp_t;
++#endif
+
+ #ifdef W_SHOWFROM
+ # define FROM_STRING "on"
+@@ -604,11 +613,19 @@ int main(int argc, char **argv)
+ printf(_(" IDLE WHAT\n"));
+ }
+
++#ifdef HAVE_UTMPX_H
++ setutxent();
++#else
+ utmpname(UTMP_FILE);
+ setutent();
++#endif
+ if (user) {
+ for (;;) {
++#ifdef HAVE_UTMPX_H
++ u = getutxent();
++#else
+ u = getutent();
++#endif
+ if (unlikely(!u))
+ break;
+ if (u->ut_type != USER_PROCESS)
+@@ -619,7 +636,11 @@ int main(int argc, char **argv)
+ }
+ } else {
+ for (;;) {
++#ifdef HAVE_UTMPX_H
++ u = getutxent();
++#else
+ u = getutent();
++#endif
+ if (unlikely(!u))
+ break;
+ if (u->ut_type != USER_PROCESS)
+@@ -629,7 +650,11 @@ int main(int argc, char **argv)
+ fromlen, ip_addresses);
+ }
+ }
++#ifdef HAVE_UTMPX_H
++ endutxent();
++#else
+ endutent();
++#endif
+
+ return EXIT_SUCCESS;
+ }