Merge pull request #4710 from lazka/procps-ng-4.0.4
procps-ng: Update to 4.0.4
This commit is contained in:
commit
a8a832e1b3
@ -1,6 +1,6 @@
|
|||||||
pkgname=procps-ng
|
pkgname=procps-ng
|
||||||
pkgver=3.3.17
|
pkgver=4.0.4
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc='Utilities for monitoring your system and its processes'
|
pkgdesc='Utilities for monitoring your system and its processes'
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url='https://gitlab.com/procps-ng/procps'
|
url='https://gitlab.com/procps-ng/procps'
|
||||||
@ -16,29 +16,33 @@ conflicts=('procps')
|
|||||||
provides=('procps')
|
provides=('procps')
|
||||||
replaces=('procps')
|
replaces=('procps')
|
||||||
source=("https://downloads.sourceforge.net/project/${pkgname}/Production/${pkgname}-${pkgver}.tar.xz"{,.asc}
|
source=("https://downloads.sourceforge.net/project/${pkgname}/Production/${pkgname}-${pkgver}.tar.xz"{,.asc}
|
||||||
"procps-ng-3.3.12-msys2.patch"
|
"procps-ng-4.0.4-manpage.patch"
|
||||||
"procps-ng-3.3.17-ctty.patch"
|
"procps-ng-4.0.4-wchan.patch"
|
||||||
"procps-ng-3.3.17-wchar.patch")
|
"procps-ng-4.0.4-LDADD.patch")
|
||||||
sha256sums=('4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4'
|
sha256sums=('22870d6feb2478adb617ce4f09a787addaf2d260c5a8aa7b17d889a962c5e42e'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'e2d692b45dd2ba9840ec5cd6a25a9106bd0ac3ca36d1b4a120288be6575c6977'
|
'bbe3eacad042da824c78d634022c405f8900bc98b56744220f537216daa82bc7'
|
||||||
'e1a633c68b5cfa240582043cae7ee5a88c7231465c51d0d92775244142bd1f7c'
|
'6b89d78b1d48d3f7d704d12da05c6bc6d95d009f0b6833fa7a527f9ec909cc18'
|
||||||
'50d814cde311f6f72889221611aca8d8147ed4522573802229cf4716ae71933c')
|
'254768bf9fd844fd937df71f5201eda2f03dd7358ac365741de50c92afcccb41')
|
||||||
validpgpkeys=('5D2FB320B825D93904D205193938F96BDF50FEA5' # Craig Small <csmall@debian.org>
|
validpgpkeys=('5D2FB320B825D93904D205193938F96BDF50FEA5') # Craig Small <csmall@debian.org>
|
||||||
'5D3DF0F538B327C0AA7A77A2022166C0FF3C84E3') # Craig Small <csmall@debian.org>
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${srcdir}/procps-${pkgver}
|
cd ${srcdir}/procps-ng-${pkgver}
|
||||||
patch -p1 -i ${srcdir}/procps-ng-3.3.12-msys2.patch
|
|
||||||
patch -p1 -i ${srcdir}/procps-ng-3.3.17-ctty.patch
|
# from Cygwin
|
||||||
patch -p1 -i ${srcdir}/procps-ng-3.3.17-wchar.patch
|
patch -p2 -i ${srcdir}/procps-ng-4.0.4-manpage.patch
|
||||||
|
patch -p2 -i ${srcdir}/procps-ng-4.0.4-wchan.patch
|
||||||
|
patch -p2 -i ${srcdir}/procps-ng-4.0.4-LDADD.patch
|
||||||
|
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${srcdir}/procps-${pkgver}
|
cd ${srcdir}/procps-ng-${pkgver}
|
||||||
|
|
||||||
|
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
|
||||||
./configure \
|
./configure \
|
||||||
--build=${CHOST} \
|
--build=${CYGWIN_CHOST} \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--bindir=/usr/bin \
|
--bindir=/usr/bin \
|
||||||
--sbindir=/usr/bin \
|
--sbindir=/usr/bin \
|
||||||
@ -46,24 +50,20 @@ build() {
|
|||||||
--libdir=/usr/lib \
|
--libdir=/usr/lib \
|
||||||
--without-libiconv-prefix \
|
--without-libiconv-prefix \
|
||||||
--without-libintl-prefix \
|
--without-libintl-prefix \
|
||||||
CFLAGS="${CFLAGS} -I/usr/include/ncursesw" \
|
|
||||||
--enable-watch8bit \
|
--enable-watch8bit \
|
||||||
|
--disable-numa \
|
||||||
--disable-kill
|
--disable-kill
|
||||||
# kill is provided by util-linux
|
# kill is provided by util-linux
|
||||||
|
|
||||||
# Workaround.
|
make
|
||||||
# See https://github.com/msys2/MSYS2-packages/pull/1908#issuecomment-605453647
|
|
||||||
make -j1 proc/libprocps.la
|
|
||||||
|
|
||||||
make -j1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd ${srcdir}/procps-${pkgver}
|
cd ${srcdir}/procps-ng-${pkgver}
|
||||||
make check
|
make check
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd ${srcdir}/procps-${pkgver}
|
cd ${srcdir}/procps-ng-${pkgver}
|
||||||
make DESTDIR=${pkgdir} install
|
make DESTDIR=${pkgdir} install
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
diff -Naur procps-ng-3.3.12-orig/configure.ac procps-ng-3.3.12/configure.ac
|
|
||||||
--- procps-ng-3.3.12-orig/configure.ac 2016-07-10 05:49:25.000000000 +0800
|
|
||||||
+++ procps-ng-3.3.12/configure.ac 2016-10-26 16:29:11.941814400 +0800
|
|
||||||
@@ -169,6 +169,7 @@
|
|
||||||
AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
|
|
||||||
AM_CONDITIONAL(LINUX, test "x$host_os" = xlinux-gnu)
|
|
||||||
AM_CONDITIONAL(CYGWIN, test "x$host_os" = xcygwin)
|
|
||||||
+AM_CONDITIONAL(CYGWIN, test "x$host_os" = xmsys)
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([skill],
|
|
||||||
AS_HELP_STRING([--enable-skill], [build skill and snice]),
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -85,8 +85,12 @@
|
|
||||||
usrbin_execdir='${exec_prefix}/bin'
|
|
||||||
AC_SUBST([usrbin_execdir])
|
|
||||||
|
|
||||||
+AC_DEFINE([USE_PROC_CTTY], [0], [Use /proc/$PID/ctty to determine controlling TTY])
|
|
||||||
+AC_DEFINE([USE_SYS_SYSMACROS_H], [0], [Use "sys/sysmacros.h" to determine major/minor device numbers])
|
|
||||||
if test "x$host_os" = xcygwin
|
|
||||||
then
|
|
||||||
+ AC_DEFINE([USE_PROC_CTTY], [1], [Use /proc/$PID/ctty to determine controlling TTY])
|
|
||||||
+ AC_DEFINE([USE_SYS_SYSMACROS_H], [1], [Use "sys/sysmacros.h" to determine major/minor device numbers])
|
|
||||||
prefix=/usr
|
|
||||||
sysconfdir=/etc
|
|
||||||
libexecdir=/usr/lib
|
|
||||||
--- a/proc/devname.c
|
|
||||||
+++ b/proc/devname.c
|
|
||||||
@@ -40,7 +40,7 @@
|
|
||||||
* dev_to_tty top, ps
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#if 0
|
|
||||||
+#ifdef USE_SYS_SYSMACROS_H
|
|
||||||
#include <sys/sysmacros.h>
|
|
||||||
#define MAJOR_OF(d) ((unsigned)major(d))
|
|
||||||
#define MINOR_OF(d) ((unsigned)minor(d))
|
|
||||||
@@ -212,7 +212,7 @@
|
|
||||||
case 3: /* /dev/[pt]ty[p-za-o][0-9a-z] is 936 */
|
|
||||||
if(tmpmin > 255) return 0; // should never happen; array index protection
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
- sprintf(buf, "dev/cons%d", tmpmin);
|
|
||||||
+ sprintf(buf, "cons%d", tmpmin);
|
|
||||||
/* Skip stat call. The reason is that cons devices are local to
|
|
||||||
the processes running in that console. Calling stat from another
|
|
||||||
console or pty will return -1. */
|
|
||||||
@@ -300,7 +300,7 @@
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef __CYGWIN__
|
|
||||||
+#ifdef USE_PROC_CTTY
|
|
||||||
/* Cygwin keeps the name to the controlling tty in a virtual file called
|
|
||||||
/proc/PID/ctty, including a trailing LF (sigh). */
|
|
||||||
static int ctty_name(char *restrict const buf, int pid) {
|
|
||||||
@@ -332,7 +332,7 @@
|
|
||||||
unsigned i = 0;
|
|
||||||
int c;
|
|
||||||
if(dev == 0u) goto no_tty;
|
|
||||||
-#ifdef __CYGWIN__
|
|
||||||
+#ifdef USE_PROC_CTTY
|
|
||||||
if( ctty_name(tmp, pid )) goto abbrev;
|
|
||||||
#endif
|
|
||||||
if(driver_name(tmp, MAJOR_OF(dev), MINOR_OF(dev) )) goto abbrev;
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
--- a/lib/test_process.c
|
|
||||||
+++ b/lib/test_process.c
|
|
||||||
@@ -61,9 +61,11 @@
|
|
||||||
case SI_USER:
|
|
||||||
printf("SIG %s\n", signame);
|
|
||||||
break;
|
|
||||||
+#if !defined (__CYGWIN__)
|
|
||||||
case SI_QUEUE:
|
|
||||||
printf("SIG %s value=%d\n", signame, siginfo->si_int);
|
|
||||||
break;
|
|
||||||
+#endif
|
|
||||||
default:
|
|
||||||
printf("Unknown si_code %d\n", siginfo->si_code);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
--- a/proc/escape.c
|
|
||||||
+++ b/proc/escape.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include "escape.h"
|
|
||||||
#include "readproc.h"
|
|
||||||
|
|
||||||
-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__))
|
|
||||||
+#if defined (__CYGWIN__) || ((__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)))
|
|
||||||
# include <wchar.h>
|
|
||||||
# include <wctype.h>
|
|
||||||
# include <stdlib.h> /* MB_CUR_MAX */
|
|
||||||
@@ -53,7 +53,7 @@
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__))
|
|
||||||
+#if defined (__CYGWIN__) || ((__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)))
|
|
||||||
|
|
||||||
static int escape_str_utf8(char *restrict dst, const char *restrict src, int bufsize, int *maxcells){
|
|
||||||
int my_cells = 0;
|
|
||||||
@@ -127,7 +127,7 @@
|
|
||||||
int my_cells = 0;
|
|
||||||
int my_bytes = 0;
|
|
||||||
|
|
||||||
-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__))
|
|
||||||
+#if defined (__CYGWIN__) || ((__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)))
|
|
||||||
static int utf_init=0;
|
|
||||||
|
|
||||||
if(utf_init==0){
|
|
||||||
30
procps-ng/procps-ng-4.0.4-LDADD.patch
Normal file
30
procps-ng/procps-ng-4.0.4-LDADD.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
--- origsrc/procps-v4.0.4/Makefile.am
|
||||||
|
+++ src/procps-v4.0.4/Makefile.am
|
||||||
|
@@ -136,7 +136,7 @@
|
||||||
|
endif
|
||||||
|
dist_man_MANS += man/kill.1
|
||||||
|
src_kill_SOURCES = src/kill.c local/strutils.c local/fileutils.c local/signals.c
|
||||||
|
-src_kill_LDADD = $(LTLIBINTL)
|
||||||
|
+src_kill_LDADD = $(LDADD) $(LTLIBINTL)
|
||||||
|
else
|
||||||
|
EXTRA_DIST += man/kill.1
|
||||||
|
endif
|
||||||
|
@@ -179,7 +179,7 @@
|
||||||
|
endif
|
||||||
|
src_watch_SOURCES = src/watch.c local/strutils.c local/fileutils.c
|
||||||
|
src_watch_CFLAGS = @NCURSES_CFLAGS@
|
||||||
|
-src_watch_LDADD = @NCURSES_LIBS@ $(CYGWINFLAGS)
|
||||||
|
+src_watch_LDADD = @NCURSES_LIBS@ $(LDADD) $(CYGWINFLAGS)
|
||||||
|
src_top_top_SOURCES = \
|
||||||
|
src/top/top.h \
|
||||||
|
src/top/top.c \
|
||||||
|
@@ -225,7 +225,7 @@
|
||||||
|
endif
|
||||||
|
if !CYGWIN
|
||||||
|
src_pwdx_SOURCES = src/pwdx.c local/fileutils.c
|
||||||
|
-src_pwdx_LDADD= $(CYGWINFLAGS)
|
||||||
|
+src_pwdx_LDADD= $(LDADD) $(CYGWINFLAGS)
|
||||||
|
src_sysctl_SOURCES = \
|
||||||
|
src/sysctl.c \
|
||||||
|
local/fileutils.c \
|
||||||
|
|
||||||
29
procps-ng/procps-ng-4.0.4-manpage.patch
Normal file
29
procps-ng/procps-ng-4.0.4-manpage.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--- origsrc/procps-v4.0.4/Makefile.am
|
||||||
|
+++ src/procps-v4.0.4/Makefile.am
|
||||||
|
@@ -38,6 +38,7 @@ sbin_PROGRAMS = \
|
||||||
|
src/sysctl
|
||||||
|
else
|
||||||
|
transform += s/pscommand/procps/; $(program_transform_name)
|
||||||
|
+transform += ;s/^ps/procps/; $(program_transform_name)
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !CYGWIN
|
||||||
|
@@ -77,15 +78,15 @@ dist_man_MANS = \
|
||||||
|
man/vmstat.8 \
|
||||||
|
man/procps.3 \
|
||||||
|
man/procps_pids.3 \
|
||||||
|
- man/procps_misc.3
|
||||||
|
+ man/procps_misc.3 \
|
||||||
|
+ man/ps.1
|
||||||
|
|
||||||
|
if !CYGWIN
|
||||||
|
dist_man_MANS += \
|
||||||
|
man/pwdx.1 \
|
||||||
|
man/tload.1 \
|
||||||
|
man/sysctl.8 \
|
||||||
|
- man/sysctl.conf.5 \
|
||||||
|
- man/ps.1
|
||||||
|
+ man/sysctl.conf.5
|
||||||
|
|
||||||
|
if BUILD_PIDWAIT
|
||||||
|
dist_man_MANS += man/pidwait.1
|
||||||
11
procps-ng/procps-ng-4.0.4-wchan.patch
Normal file
11
procps-ng/procps-ng-4.0.4-wchan.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- origsrc/procps-v4.0.4/src/ps/output.c
|
||||||
|
+++ src/procps-v4.0.4/src/ps/output.c
|
||||||
|
@@ -796,6 +796,8 @@ static int pr_wchan(char *restrict const
|
||||||
|
size_t len;
|
||||||
|
setREL1(WCHAN_NAME)
|
||||||
|
w = rSv(WCHAN_NAME, str, pp);
|
||||||
|
+ if (!w)
|
||||||
|
+ w = "?";
|
||||||
|
len = strlen(w);
|
||||||
|
if(len>max_rightward) len=max_rightward;
|
||||||
|
memcpy(outbuf, w, len);
|
||||||
Loading…
x
Reference in New Issue
Block a user