![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package psmisc for openSUSE:Factory checked in at 2017-06-24 08:34:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/psmisc (Old) and /work/SRC/openSUSE:Factory/.psmisc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "psmisc" Sat Jun 24 08:34:09 2017 rev:61 rq:505275 version:23.0 Changes: -------- --- /work/SRC/openSUSE:Factory/psmisc/psmisc.changes 2015-05-23 12:43:21.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.psmisc.new/psmisc.changes 2017-06-24 08:34:11.090674947 +0200 @@ -1,0 +2,54 @@ +Tue Jun 20 15:06:43 UTC 2017 - werner@suse.de + +- Update to version 23.0 + * killall: Fix process age race condition !11 Debian #822861 + * killall: only use scope of current namespace by default + * killall: better parsing of command names + * pstree: add cgroup namespaces !10 + * peekfd: Help give long options too !5 + * killall: correctly report when 32+ procs match !8 + * prtat: Remove duplicate options in man page !3 Debian #846387 + * pslog: New program to check what logs are open merge !1 + * fuser: increase path length for octal escaping SF [#37] + * Make usage of linked lists of devices found in + /proc/self/mountinfo optional + * Make timeout() in timeout.c work with shared mmap to + reduce the load due write/read the stat buffers + * Add list_sort() to lists.h to be able to sort lists + * fuser: Fixed typo for -M flag. Debian #740275 + * pstree: by default doesn't show threadnames, use -t to show + as it disables compaction. SF [#33] Debian #815902 + * pstree: Removed need for PATH_MAX Debian #750405 + * pstree: ignores disappeared processes. SF [#34] + * killall: -o and -y work with -r flags. SF [#64] + * m4/gettext.m4: Upgrade to gettext-0.19.4. + * m4/iconv.m4: Upgrade to gettext-0.19.4. + * m4/lib-ld.m4: Upgrade to gettext-0.19.4. + * m4/lib-link.m4: Upgrade to gettext-0.19.4. + * m4/lib-prefix.m4: Upgrade to gettext-0.19.4. + * m4/nls.m4: Upgrade to gettext-0.19.4. + * m4/po.m4: Upgrade to gettext-0.19.4. + * m4/progtest.m4: Upgrade to gettext-0.19.4. + * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.4. +- Make it build, that is create a po/POTFILES.in +- Remove obsolete patches + * psmisc-22.21-boo908063.patch + * psmisc-22.12-tigetstr.patch + * psmisc-22.21-upstream.patch + * psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch +- Rename patch psmisc-22.21.dif which becomes psmisc-23.0.dif +- Make /bin/fuser a symblic link of /usr/bin/fuser (boo#1029973) +- Last revision was 78 + +------------------------------------------------------------------- +Tue Jun 20 14:00:36 UTC 2017 - werner@suse.de + +- Modify psmisc-22.21.dif to enforce the usage of `m' flag in + sscanf() instead of `a' for allocation. Also avoid to small + buffers and include sys/sysmacros.h for makedev macro. +- Add the patch psmisc-22.21-lessnfs.patch to support device + files of mount points as well (boo#1044638) +- Add the patch psmisc-22.21-mntpt.patch to do strinfg comparision + only for NFS shares + +------------------------------------------------------------------- Old: ---- psmisc-22.12-tigetstr.patch psmisc-22.21-boo908063.patch psmisc-22.21-upstream.patch psmisc-22.21.dif psmisc-22.21.tar.gz psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch New: ---- psmisc-22.21-lessnfs.patch psmisc-22.21-mntpt.patch psmisc-23.0.dif psmisc-23.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ psmisc.spec ++++++ --- /var/tmp/diff_new_pack.rGEaFI/_old 2017-06-24 08:34:11.978549399 +0200 +++ /var/tmp/diff_new_pack.rGEaFI/_new 2017-06-24 08:34:11.982548834 +0200 @@ -1,7 +1,7 @@ # # spec file for package psmisc # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,26 +19,26 @@ Name: psmisc BuildRequires: automake BuildRequires: gcc-c++ +BuildRequires: gettext-devel BuildRequires: glibc-devel BuildRequires: libselinux-devel BuildRequires: ncurses-devel -Url: http://sourceforge.net/projects/psmisc/ -Version: 22.21 +Url: https://gitlab.com/psmisc/psmisc/ +Version: 23.0 Release: 0 Provides: ps:/usr/bin/killall Recommends: %{name}-lang Summary: Utilities for managing processes on your system License: GPL-2.0+ Group: System/Monitoring -Source: http://sourceforge.net/projects/psmisc/files/psmisc/%{name}-%{version}.tar.gz -Patch0: %name-22.21.dif -Patch1: %name-22.12-tigetstr.patch -Patch2: %name-22.21-pstree.patch -# PATCH-FIX-SUSE boo#boo908063 -- partly upstream already -Patch3: %name-22.21-boo908063.patch -Patch42: %{name}-22.21-upstream.patch -# PATCH-FIX-UPSTREAM psmisc-git-3638cc55b4d08851faba46635d737b24d016665b.patch bnc#874983 -Patch43: %{name}-git-3638cc55b4d08851faba46635d737b24d016665b.patch +%define hash 67b1da268f4c0ce6859980e3dfcfaec5b2448e80 +Source: https://gitlab.com/%{name}/%{name}/repository/archive.tar.bz2?ref=v%{version}#/%{name}-%{version}.tar.bz2 +Patch0: %{name}-%{version}.dif +Patch2: %{name}-22.21-pstree.patch +# PATCH-FIX-SUSE boo#908068 -- fuser -m not handling block devices properly +Patch4: %{name}-22.21-mntpt.patch +# PATCH-ADD-SUSE use string comparision only for nfs shares +Patch5: %{name}-22.21-lessnfs.patch %define have_peekfd %ix86 x86_64 ppc ppc64 ppc64le %arm mipsel m68k @@ -53,17 +53,21 @@ %lang_package %prep -%setup -q -%patch42 -p0 -b .up -%patch1 -p0 -b .tigetstr +ln -sf %{name}-v%{version}-%{hash} %{name}-%version +%setup -q -D -n %{name}-%version %patch2 -p0 -b .pstree -%patch3 -p0 -b .thread +%patch4 -p0 -b .mntpt +%patch5 -p0 -b .lessnfs %patch0 -p0 -b .0 -%patch43 -p1 -b .fuserfix %build +grep -h src/ po/*.po|\ + sed -r 's/^#: //'|\ + tr ' ' '\n'|\ + sort -t : -k1,1 -u|\ + sed -r 's/:[0-9]+$//' > po/POTFILES.in autoreconf -fi -CFLAGS="-D_GNU_SOURCE ${RPM_OPT_FLAGS} -pipe" +CFLAGS="-D_GNU_SOURCE -D_DEFAULT_SOURCE ${RPM_OPT_FLAGS} -pipe" CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS %configure --disable-rpath \ @@ -74,22 +78,24 @@ make %{?_smp_mflags} CFLAGS="$CFLAGS" "CC=$CC" %install -make DESTDIR=$RPM_BUILD_ROOT install -mkdir -p $RPM_BUILD_ROOT/bin/ -mv $RPM_BUILD_ROOT/usr/bin/fuser $RPM_BUILD_ROOT/bin/ +make DESTDIR=%{buildroot} install +mkdir -p %{buildroot}/bin/ +ln -sf %{_bindir}/fuser %{buildroot}/bin/ %ifnarch %have_peekfd -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/peekfd.1* +rm -f %{buildroot}%{_mandir}/man1/peekfd.1* %endif %find_lang psmisc %files %defattr (-,root,root,755) /bin/fuser +%{_bindir}/fuser %{_bindir}/killall %ifarch %have_peekfd %{_bindir}/peekfd %endif %{_bindir}/prtstat +%{_bindir}/pslog %{_bindir}/pstree %{_bindir}/pstree.x11 %{_mandir}/man1/fuser.1* @@ -98,6 +104,7 @@ %{_mandir}/man1/peekfd.1* %endif %{_mandir}/man1/prtstat.1* +%{_mandir}/man1/pslog.1* %{_mandir}/man1/pstree.1* %files lang -f %{name}.lang ++++++ psmisc-22.21-lessnfs.patch ++++++ Use string comparision only if case of searching for NFS shares --- src/fuser.c | 29 +++++++++++++++++++++-------- src/fuser.h | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) --- src/fuser.c +++ src/fuser.c 2017-06-20 14:30:08.176217649 +0000 @@ -2007,6 +2007,7 @@ static void clear_mntinfo(void) static void init_mntinfo(void) { + char type[256]; char mpoint[PATH_MAX*4 + 1]; // octal escaping takes 4 chars per 1 char int mid, parid, max = 0; uint maj, min; @@ -2018,8 +2019,8 @@ static void init_mntinfo(void) if ((mnt = fopen("/proc/self/mountinfo", "r")) == (FILE *) 0) return; while (fscanf - (mnt, "%i %i %u:%u %*s %s %*[^\n]", &mid, &parid, &maj, &min, - &mpoint[0]) == 5) { + (mnt, "%i %i %u:%u %*s %s %*s %*s - %s %*[^\n]", + &mid, &parid, &maj, &min, &mpoint[0], &type[0]) == 6) { const size_t nlen = strlen(mpoint); mntinfo_t *restrict mnt; if (posix_memalign @@ -2038,6 +2039,9 @@ static void init_mntinfo(void) mnt->parid = parid; mnt->dev = makedev(maj, min); mnt->id = mid; + if (strncmp("nfs", type, 3) == 0) + mnt->nfs = 1; + else mnt->nfs = 0; if (mid > max) max = mid; } @@ -2105,16 +2109,25 @@ static int mntstat(const char *path, str if (nlen < mnt->nlen) continue; if (mnt->nlen == 1) { /* root fs is the last entry */ - buf->st_dev = mnt->dev; - buf->st_ino = 0; - return 0; + if (mnt->nfs) { + fprintf(stderr, "NFS %s\n", use); + buf->st_dev = mnt->dev; + buf->st_ino = 0; + return 0; + } + errno = 0; + return stat(path, buf); } if (use[mnt->nlen] != '\0' && use[mnt->nlen] != '/') continue; if (strncmp(use, mnt->mpoint, mnt->nlen) == 0) { - buf->st_dev = mnt->dev; - buf->st_ino = 0; - return 0; + if (mnt->nfs) { + buf->st_dev = mnt->dev; + buf->st_ino = 0; + return 0; + } + errno = 0; + return stat(path, buf); } } errno = ENOENT; --- src/fuser.h +++ src/fuser.h 2017-06-20 14:28:48.013689702 +0000 @@ -91,7 +91,7 @@ struct mount_list { # include "lists.h" typedef struct mntinfo_s { list_t this; - int id, parid; + int id, parid, nfs:1; dev_t dev; size_t nlen; char *mpoint; ++++++ psmisc-22.21-mntpt.patch ++++++ For bug boo#908068: fuser -m not handling block devices properly Avoid string comparision for device files --- src/fuser.c | 7 +++++++ 1 file changed, 7 insertions(+) --- src/fuser.c +++ src/fuser.c 2017-06-20 13:56:29.717283482 +0000 @@ -1915,6 +1915,13 @@ static int mntstat(const char *path, str errno = 0; return stat(path, buf); } + if (strncmp("/dev/", use, 5) == 0) { + /* + * Could be a special file (socket, pipe, inotify) + */ + errno = 0; + return stat(path, buf); + } nlen = strlen(use); list_for_each(ptr, &mntinfo) { ++++++ psmisc-22.21-pstree.patch ++++++ --- /var/tmp/diff_new_pack.rGEaFI/_old 2017-06-24 08:34:12.010544875 +0200 +++ /var/tmp/diff_new_pack.rGEaFI/_new 2017-06-24 08:34:12.010544875 +0200 @@ -1,6 +1,10 @@ +--- + src/pstree.c | 37 ++++++++++++++++++++++++++++++------- + 1 file changed, 30 insertions(+), 7 deletions(-) + --- src/pstree.c -+++ src/pstree.c 2014-03-24 15:54:58.905193559 +0000 -@@ -69,6 +69,7 @@ extern const char *__progname; ++++ src/pstree.c 2017-06-20 14:24:15.670691071 +0000 +@@ -70,6 +70,7 @@ extern const char *__progname; #define UTF_HD "\342\224\254" /* U+252C, Horizontal and down */ #define VT_BEG "\033(0\017" /* use graphic chars */ @@ -8,7 +12,7 @@ #define VT_END "\033(B" /* back to normal char set */ #define VT_V "x" /* see UTF definitions above */ #define VT_VR "t" -@@ -397,6 +398,27 @@ static void out_scontext(security_contex +@@ -450,6 +451,27 @@ static void out_scontext(security_contex out_string("'"); } @@ -36,7 +40,7 @@ static void out_newline(void) { if (last_char && cur_x == output_width) -@@ -605,11 +627,12 @@ dump_tree(PROC * current, int level, int +@@ -662,11 +684,12 @@ dump_tree(PROC * current, int level, int for (lvl = 0; lvl < level; lvl++) { for (i = width[lvl] + 1; i; i--) out_char(' '); @@ -54,7 +58,7 @@ } if (rep < 2) add = 0; -@@ -714,7 +737,7 @@ dump_tree(PROC * current, int level, int +@@ -773,7 +796,7 @@ dump_tree(PROC * current, int level, int } width[level] = comm_len + cur_x - offset + add; if (cur_x >= output_width && trunc) { @@ -63,7 +67,7 @@ out_string("+"); out_newline(); return; -@@ -736,7 +759,7 @@ dump_tree(PROC * current, int level, int +@@ -797,7 +820,7 @@ dump_tree(PROC * current, int level, int } } if (first) { ++++++ psmisc-22.21.dif -> psmisc-23.0.dif ++++++ --- /work/SRC/openSUSE:Factory/psmisc/psmisc-22.21.dif 2014-03-27 06:16:00.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.psmisc.new/psmisc-23.0.dif 2017-06-24 08:34:10.318784093 +0200 @@ -1,6 +1,12 @@ +--- + configure.ac | 4 ++-- + doc/Makefile.am | 2 +- + src/fuser.c | 13 ++++++++----- + 3 files changed, 11 insertions(+), 8 deletions(-) + --- configure.ac -+++ configure.ac 2010-10-15 09:00:33.000000000 +0000 -@@ -40,7 +40,7 @@ fi ++++ configure.ac 2017-06-20 14:31:15.914973762 +0000 +@@ -42,7 +42,7 @@ fi if test "$enable_timeout_stat" = "static"; then AC_DEFINE([WITH_TIMEOUT_STAT], [2], [Use timeout on stat calls]) fi @@ -9,7 +15,7 @@ # Use string search for network based file systems but only if the system # has /proc/self/mountinfo -@@ -121,7 +121,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc +@@ -126,7 +126,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc struct user_regs_struct.rdi, struct user_regs_struct.rsi, struct user_regs_struct.rdx], [],[], @@ -18,9 +24,18 @@ #include <sys/user.h>]) AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3, struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>]) +--- doc/Makefile.am ++++ doc/Makefile.am 2017-06-20 15:23:10.973015404 +0000 +@@ -1,5 +1,5 @@ + +-man_MANS = killall.1 peekfd.1 prtstat.1 pstree.1 ++man_MANS = killall.1 peekfd.1 prtstat.1 pstree.1 pslog.1 + EXTRA_MANS = + + if WANT_FUSER --- src/fuser.c -+++ src/fuser.c 2014-03-24 15:56:40.134235583 +0000 -@@ -901,6 +901,7 @@ int main(int argc, char *argv[]) ++++ src/fuser.c 2017-06-20 14:33:26.908568387 +0000 +@@ -1041,6 +1041,7 @@ int main(int argc, char *argv[]) struct option *optr; char *nsptr; int skip_argv; @@ -28,23 +43,23 @@ struct option options[] = { {"all", 0, NULL, 'a'}, -@@ -941,6 +942,7 @@ int main(int argc, char *argv[]) - fill_unix_cache(&unixsockets); +@@ -1084,6 +1085,7 @@ int main(int argc, char *argv[]) #endif + atexit(atexit_free_lists); + seen_file = 0; for (argc_cnt = 1; argc_cnt < argc; argc_cnt++) { current_argv = argv[argc_cnt]; if (current_argv[0] == '-') { /* its an option */ -@@ -1093,6 +1095,7 @@ int main(int argc, char *argv[]) +@@ -1234,6 +1236,7 @@ int main(int argc, char *argv[]) } } this_name->matched_procs = NULL; + seen_file = 1; if (opts & (OPT_MOUNTS | OPT_ISMOUNTPOINT) - && this_name->name_space != NAMESPACE_FILE) - usage(_ -@@ -1144,7 +1147,7 @@ int main(int argc, char *argv[]) + && this_name->name_space != NAMESPACE_FILE) { + free(this_name); +@@ -1287,7 +1290,7 @@ int main(int argc, char *argv[]) names_tail->next = this_name; names_tail = this_name; } /* for across the argvs */ @@ -53,3 +68,25 @@ usage(_("No process specification given")); /* Check if -M flag was used and if so check mounts */ +@@ -1551,17 +1554,17 @@ check_dir(const pid_t pid, const char *d + struct device_list *dev_tmp; + struct unixsocket_list *sock_tmp; + struct stat st, lst; +- char dirpath[MAX_PATHNAME]; +- char filepath[MAX_PATHNAME]; ++ char dirpath[PATH_MAX+1]; ++ char filepath[PATH_MAX+1]; + +- snprintf(dirpath, MAX_PATHNAME, "/proc/%d/%s", pid, dirname); ++ snprintf(dirpath, PATH_MAX , "/proc/%d/%s", pid, dirname); + if ((dirp = opendir(dirpath)) == NULL) + return; + while ((direntry = readdir(dirp)) != NULL) { + if (direntry->d_name[0] < '0' || direntry->d_name[0] > '9') + continue; + +- snprintf(filepath, MAX_PATHNAME, "/proc/%d/%s/%s", ++ snprintf(filepath, PATH_MAX, "/proc/%d/%s/%s", + pid, dirname, direntry->d_name); + + if (timeout(thestat, filepath, &st, 5) != 0) { ++++++ psmisc-22.21.tar.gz -> psmisc-23.0.tar.bz2 ++++++ ++++ 45564 lines of diff (skipped)