From e62dccd1a4d521bbeb5e066fccf564826e79070f Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Fri, 7 May 2021 08:37:22 +0200 Subject: [PATCH] procps: update to 3.3.17 --- packages/procps/Makefile.in.patch | 15 +++++++-------- packages/procps/build.sh | 5 ++--- packages/procps/langinfo.patch | 20 ++++++++++++++++++++ packages/procps/pgrep.c.patch | 12 ------------ packages/procps/top-top.c.patch | 25 +++++++++++-------------- packages/procps/w.c.patch | 19 +++++++++---------- 6 files changed, 49 insertions(+), 47 deletions(-) create mode 100644 packages/procps/langinfo.patch delete mode 100644 packages/procps/pgrep.c.patch diff --git a/packages/procps/Makefile.in.patch b/packages/procps/Makefile.in.patch index 38d68a08a..80ceecfa5 100644 --- a/packages/procps/Makefile.in.patch +++ b/packages/procps/Makefile.in.patch @@ -1,18 +1,17 @@ Bionic lacks strverscmp as well. -diff -u -r ../procps-ng-3.3.14/Makefile.in ./Makefile.in ---- ../procps-ng-3.3.14/Makefile.in 2018-04-10 11:40:19.331497997 +0000 -+++ ./Makefile.in 2018-05-19 00:15:36.379445979 +0000 -@@ -136,7 +136,7 @@ +--- ./Makefile.in.orig 2021-02-09 10:11:25.000000000 +0000 ++++ ./Makefile.in 2021-05-07 05:31:39.777034650 +0000 +@@ -139,7 +139,7 @@ @WITH_NCURSES_TRUE@ watch.1 \ @WITH_NCURSES_TRUE@ top/top.1 --@CYGWIN_TRUE@@WITH_NCURSES_TRUE@am__append_18 = lib/strverscmp.c -+@WITH_NCURSES_TRUE@am__append_18 = lib/strverscmp.c - @CYGWIN_FALSE@@WITH_NCURSES_TRUE@am__append_19 = \ +-@CYGWIN_TRUE@@WITH_NCURSES_TRUE@am__append_20 = lib/strverscmp.c ++@WITH_NCURSES_TRUE@am__append_20 = lib/strverscmp.c + @CYGWIN_FALSE@@WITH_NCURSES_TRUE@am__append_21 = \ @CYGWIN_FALSE@@WITH_NCURSES_TRUE@ slabtop.1 -@@ -356,8 +356,8 @@ +@@ -367,8 +367,8 @@ tload_DEPENDENCIES = ./proc/libprocps.la $(am__DEPENDENCIES_2) am__top_top_SOURCES_DIST = top/top.h top/top.c top/top_nls.h \ top/top_nls.c lib/fileutils.c lib/strverscmp.c diff --git a/packages/procps/build.sh b/packages/procps/build.sh index d789be003..ebc4809ac 100644 --- a/packages/procps/build.sh +++ b/packages/procps/build.sh @@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://gitlab.com/procps-ng/procps TERMUX_PKG_DESCRIPTION="Utilities that give information about processes using the /proc filesystem" TERMUX_PKG_LICENSE="LGPL-2.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=3.3.16 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_VERSION=3.3.17 TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/procps-ng-$TERMUX_PKG_VERSION.tar.xz -TERMUX_PKG_SHA256=925eacd65dedcf9c98eb94e8978bbfb63f5de37294cc1047d81462ed477a20af +TERMUX_PKG_SHA256=4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4 TERMUX_PKG_DEPENDS="ncurses" TERMUX_PKG_BREAKS="procps-dev" TERMUX_PKG_REPLACES="procps-dev" diff --git a/packages/procps/langinfo.patch b/packages/procps/langinfo.patch new file mode 100644 index 000000000..6785a34e0 --- /dev/null +++ b/packages/procps/langinfo.patch @@ -0,0 +1,20 @@ +--- ./proc/escape.c.orig 2021-05-07 06:36:15.328549565 +0000 ++++ ./proc/escape.c 2021-05-07 06:35:26.598541593 +0000 +@@ -132,7 +132,7 @@ + + if(utf_init==0){ + /* first call -- check if UTF stuff is usable */ +- char *enc = nl_langinfo(CODESET); ++ char *enc = "UTF-8"; + utf_init = enc && strcasecmp(enc, "UTF-8")==0 ? 1 : -1; + } + if (utf_init==1 && MB_CUR_MAX>1) { +@@ -234,7 +234,7 @@ + char c; + + if(utf_sw == 0){ +- char *enc = nl_langinfo(CODESET); ++ char *enc = "UTF-8"; + utf_sw = enc && strcasecmp(enc, "UTF-8")==0 ? 1 : -1; + } + SECURE_ESCAPE_ARGS(dst, bufsize, *maxroom); diff --git a/packages/procps/pgrep.c.patch b/packages/procps/pgrep.c.patch deleted file mode 100644 index 3e800bdb0..000000000 --- a/packages/procps/pgrep.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../procps-ng-3.3.11/pgrep.c ./pgrep.c ---- ../procps-ng-3.3.11/pgrep.c 2015-08-09 01:54:54.298117295 -0400 -+++ ./pgrep.c 2016-04-12 01:14:09.647108539 -0400 -@@ -713,7 +713,7 @@ - {NULL, 0, NULL, 0} - }; - -- if (strstr (program_invocation_short_name, "pkill")) { -+ if (strstr (argv[0], "pkill")) { - int sig; - i_am_pkill = 1; - sig = signal_option(&argc, argv); diff --git a/packages/procps/top-top.c.patch b/packages/procps/top-top.c.patch index d3c4d0abd..218ad7c3c 100644 --- a/packages/procps/top-top.c.patch +++ b/packages/procps/top-top.c.patch @@ -1,7 +1,6 @@ -diff -u -r ../procps-ng-3.3.16/top/top.c ./top/top.c ---- ../procps-ng-3.3.16/top/top.c 2019-10-27 11:32:58.367231155 +0000 -+++ ./top/top.c 2019-12-11 23:36:33.427048000 +0000 -@@ -2479,7 +2479,7 @@ +--- ./top/top.c.orig 2021-02-09 10:11:25.000000000 +0000 ++++ ./top/top.c 2021-05-07 05:35:17.936501694 +0000 +@@ -2504,7 +2504,7 @@ (sorry Linux, but you'll have to close it for us) */ if (!fp) { if (!(fp = fopen("/proc/stat", "r"))) @@ -10,7 +9,7 @@ diff -u -r ../procps-ng-3.3.16/top/top.c ./top/top.c /* note: we allocate one more CPU_t via totSLOT than 'cpus' so that a slot can hold tics representing the /proc/stat cpu summary */ Cpu_tics = alloc_c(totSLOT * sizeof(CPU_t)); -@@ -4334,7 +4334,7 @@ +@@ -4389,7 +4389,7 @@ tmptty.c_cc[VERASE] = *key_backspace; #ifdef TERMIOS_ONLY if (-1 == tcsetattr(STDIN_FILENO, TCSAFLUSH, &tmptty)) @@ -19,7 +18,7 @@ diff -u -r ../procps-ng-3.3.16/top/top.c ./top/top.c tcgetattr(STDIN_FILENO, &Tty_tweaked); #endif // lastly, a nearly raw mode for unsolicited single keystrokes -@@ -4342,7 +4342,7 @@ +@@ -4397,7 +4397,7 @@ tmptty.c_cc[VMIN] = 1; tmptty.c_cc[VTIME] = 0; if (-1 == tcsetattr(STDIN_FILENO, TCSAFLUSH, &tmptty)) @@ -28,7 +27,7 @@ diff -u -r ../procps-ng-3.3.16/top/top.c ./top/top.c tcgetattr(STDIN_FILENO, &Tty_raw); #ifndef OFF_STDIOLBF -@@ -5808,7 +5808,7 @@ +@@ -5969,7 +5969,7 @@ if (!Numa_node_tot) goto numa_nope; @@ -36,19 +35,17 @@ diff -u -r ../procps-ng-3.3.16/top/top.c ./top/top.c + if (Cpu_tics && CHKw(w, View_CPUNOD)) { if (Numa_node_sel < 0) { // display the 1st /proc/stat line, then the nodes (if room) - summary_hlp(&Cpu_tics[smp_num_cpus], N_txt(WORD_allcpus_txt)); -@@ -5843,12 +5843,12 @@ + Msg_row += cpu_tics(&Cpu_tics[smp_num_cpus], N_txt(WORD_allcpus_txt), 1); +@@ -6004,10 +6004,10 @@ } } else numa_nope: - if (CHKw(w, View_CPUSUM)) { + if (Cpu_tics && CHKw(w, View_CPUSUM)) { // display just the 1st /proc/stat line - summary_hlp(&Cpu_tics[smp_num_cpus], N_txt(WORD_allcpus_txt)); - Msg_row += 1; - + Msg_row += cpu_tics(&Cpu_tics[smp_num_cpus], N_txt(WORD_allcpus_txt), 1); - } else { + } else if (Cpu_tics) { // display each cpu's states separately, screen height permitting... - for (i = 0; i < Cpu_faux_tot; i++) { - snprintf(tmp, sizeof(tmp), N_fmt(WORD_eachcpu_fmt), Cpu_tics[i].id); + if (w->rc.combine_cpus) { + for (i = 0; i < Cpu_faux_tot; i++) { diff --git a/packages/procps/w.c.patch b/packages/procps/w.c.patch index ba5dabcd4..6a2a34101 100644 --- a/packages/procps/w.c.patch +++ b/packages/procps/w.c.patch @@ -1,7 +1,6 @@ -diff -u -r ../procps-ng-3.3.9/w.c ./w.c ---- ../procps-ng-3.3.9/w.c 2013-10-11 00:43:35.000000000 +0200 -+++ ./w.c 2014-07-06 08:06:41.314880519 +0200 -@@ -186,13 +186,6 @@ +--- ./w.c.orig 2021-02-09 10:11:25.000000000 +0000 ++++ ./w.c 2021-05-07 05:42:59.852135096 +0000 +@@ -207,13 +207,6 @@ if (ip_addresses) { /* -i switch used */ memcpy(&ut_addr_v6, &u->ut_addr_v6, sizeof(ut_addr_v6)); @@ -15,12 +14,12 @@ diff -u -r ../procps-ng-3.3.9/w.c ./w.c if (ut_addr_v6[1] || ut_addr_v6[2] || ut_addr_v6[3]) { /* IPv6 */ if (!inet_ntop(AF_INET6, &ut_addr_v6, buf_ipv6, sizeof(buf_ipv6))) { -@@ -592,7 +585,7 @@ - printf(_(" IDLE WHAT\n")); - } - +@@ -626,7 +619,7 @@ + #ifdef HAVE_UTMPX_H + setutxent(); + #else - utmpname(UTMP_FILE); -+ // utmpname(UTMP_FILE); ++ utmpname(_PATH_UTMP); setutent(); + #endif if (user) { - for (;;) {