From 52f951f7e05a908154611dad16aad43b737fa42a Mon Sep 17 00:00:00 2001 From: Jan Rybar Date: Aug 26 2019 14:05:42 +0000 Subject: Rebase to 23.2 with autosetup --- diff --git a/.gitignore b/.gitignore index 5f17ce0..1b9af78 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ psmisc-22.10.tar.gz /psmisc-22.20.tar.gz /psmisc-22.21.tar.gz /psmisc-23.1.tar.xz +/psmisc-23.2.tar.xz diff --git a/no-nullptr-sanity-stalls-nfs.patch b/no-nullptr-sanity-stalls-nfs.patch new file mode 100644 index 0000000..718ec53 --- /dev/null +++ b/no-nullptr-sanity-stalls-nfs.patch @@ -0,0 +1,59 @@ +From 499dfe62817f46e2132dd265dbe3603e5929279e Mon Sep 17 00:00:00 2001 +From: Jan Rybar +Date: Tue, 19 Feb 2019 16:39:17 +0100 +Subject: [PATCH] NULLptr sanity added in scan fns to avoid useless prep work + (stalls NFS) + +--- + src/fuser.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/fuser.c b/src/fuser.c +index c44cee8..b8662a3 100644 +--- a/src/fuser.c ++++ b/src/fuser.c +@@ -188,6 +188,9 @@ scan_procs(struct names *names_head, struct inode_list *ino_head, + pid_t pid, my_pid; + uid_t uid; + ++ if ( (ino_head == NULL) && (dev_head == NULL) ) ++ return; ++ + if ((topproc_dir = opendir("/proc")) == NULL) { + fprintf(stderr, _("Cannot open /proc directory: %s\n"), + strerror(errno)); +@@ -1873,6 +1876,10 @@ scan_knfsd(struct names *names_head, struct inode_list *ino_head, + char *find_space; + struct stat st; + ++ if ( (ino_head == NULL) && (dev_head == NULL) ) ++ return; ++ ++ + if ((fp = fopen(KNFSD_EXPORTS, "r")) == NULL) { + #ifdef DEBUG + printf("Cannot open %s\n", KNFSD_EXPORTS); +@@ -1919,6 +1926,10 @@ scan_mounts(struct names *names_head, struct inode_list *ino_head, + char *find_space; + struct stat st; + ++ if ( (ino_head == NULL) && (dev_head == NULL) ) ++ return; ++ ++ + if ((fp = fopen(PROC_MOUNTS, "r")) == NULL) { + fprintf(stderr, "Cannot open %s\n", PROC_MOUNTS); + return; +@@ -1962,6 +1973,9 @@ scan_swaps(struct names *names_head, struct inode_list *ino_head, + char *find_space; + struct stat st; + ++ if ( (ino_head == NULL) && (dev_head == NULL) ) ++ return; ++ + if ((fp = fopen(PROC_SWAPS, "r")) == NULL) { + /*fprintf(stderr, "Cannot open %s\n", PROC_SWAPS); */ + return; +-- +2.20.1 + diff --git a/psmisc-23.1-no-nullptr-sanity-stalls-nfs.patch b/psmisc-23.1-no-nullptr-sanity-stalls-nfs.patch deleted file mode 100644 index b860425..0000000 --- a/psmisc-23.1-no-nullptr-sanity-stalls-nfs.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up ./src/fuser.c.ori ./src/fuser.c ---- ./src/fuser.c.ori 2017-03-25 00:17:53.169339912 +0100 -+++ ./src/fuser.c 2019-02-19 16:42:04.781433478 +0100 -@@ -187,6 +187,9 @@ scan_procs(struct names *names_head, str - pid_t pid, my_pid; - uid_t uid; - -+ if ( (ino_head == NULL) && (dev_head == NULL) ) -+ return; -+ - if ((topproc_dir = opendir("/proc")) == NULL) { - fprintf(stderr, _("Cannot open /proc directory: %s\n"), - strerror(errno)); -@@ -1860,6 +1863,10 @@ scan_knfsd(struct names *names_head, str - char *find_space; - struct stat st; - -+ if ( (ino_head == NULL) && (dev_head == NULL) ) -+ return; -+ -+ - if ((fp = fopen(KNFSD_EXPORTS, "r")) == NULL) { - #ifdef DEBUG - printf("Cannot open %s\n", KNFSD_EXPORTS); -@@ -1906,6 +1913,10 @@ scan_mounts(struct names *names_head, st - char *find_space; - struct stat st; - -+ if ( (ino_head == NULL) && (dev_head == NULL) ) -+ return; -+ -+ - if ((fp = fopen(PROC_MOUNTS, "r")) == NULL) { - fprintf(stderr, "Cannot open %s\n", PROC_MOUNTS); - return; -@@ -1949,6 +1960,9 @@ scan_swaps(struct names *names_head, str - char *find_space; - struct stat st; - -+ if ( (ino_head == NULL) && (dev_head == NULL) ) -+ return; -+ - if ((fp = fopen(PROC_SWAPS, "r")) == NULL) { - /*fprintf(stderr, "Cannot open %s\n", PROC_SWAPS); */ - return; diff --git a/psmisc.spec b/psmisc.spec index 16525a7..06354e9 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -1,8 +1,8 @@ Summary: Utilities for managing processes on your system Name: psmisc -Version: 23.1 -Release: 7%{?dist} +Version: 23.2 +Release: 1%{?dist} License: GPLv2+ URL: https://gitlab.com/psmisc/psmisc @@ -10,13 +10,14 @@ Source: https://sourceforge.net/projects/%{name}/files/%{name}/%{name}-%{version #The following has been reworked by upstream in a different way ... we'll see #Patch1: psmisc-22.13-fuser-silent.patch -Patch2: psmisc-23.1-no-nullptr-sanity-stalls-nfs.patch +Patch2: no-nullptr-sanity-stalls-nfs.patch BuildRequires: libselinux-devel BuildRequires: gettext BuildRequires: ncurses-devel BuildRequires: autoconf automake BuildRequires: gcc +BuildRequires: git %description @@ -29,8 +30,7 @@ of processes that are using specified files or filesystems. The pslog command shows the path of log files owned by a given process. %prep -%setup -q -%patch2 -p1 +%autosetup -S git %build %configure --prefix=%{_prefix} --enable-selinux @@ -69,6 +69,9 @@ mv $RPM_BUILD_ROOT%{_bindir}/fuser $RPM_BUILD_ROOT%{_sbindir} %changelog +* Fri Aug 23 2019 Jan Rybar - 23.2-1 +- Rebase to 23.2 with autosetup + * Fri Jul 26 2019 Fedora Release Engineering - 23.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 5c3967a..f8b8ec1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (psmisc-23.1.tar.xz) = f678869ea555986a2538ada9630b74ce79304f3ee85cc9d69a3912d8d30ad491829eac0dcb69aae7003ee9b5de9645d2135b80a9e0b77824e60c417dc0be5f95 +SHA512 (psmisc-23.2.tar.xz) = a8d4e91443b66de1c4418fd74b5eb6dd42caddc937e75dfb35a4e49b9b35236db779e2a480c1693bcc7feaf0957b1028850134040685e88e6ff7ffcb572e20e8