forked from pool/psmisc
This commit is contained in:
parent
e7557a1642
commit
fc09b5b977
37
psmisc-22.6-netunix.patch
Normal file
37
psmisc-22.6-netunix.patch
Normal file
@ -0,0 +1,37 @@
|
||||
Files src/fuser and src/fuser differ
|
||||
--- src/fuser.c
|
||||
+++ src/fuser.c 2008-05-16 14:58:07.906452331 +0200
|
||||
@@ -1310,12 +1310,21 @@ void fill_unix_cache(struct unixsocket_l
|
||||
return;
|
||||
}
|
||||
while (fgets(line, BUFSIZ, fp) != NULL) {
|
||||
+ char * path;
|
||||
+ scanned_path = (char*)0;
|
||||
if (sscanf(line, "%*x: %*x %*x %*x %*x %*d %d %as",
|
||||
- &scanned_inode,
|
||||
- &scanned_path) != 2)
|
||||
+ &scanned_inode, &scanned_path) != 2) {
|
||||
+ if (scanned_path)
|
||||
+ free(scanned_path);
|
||||
continue;
|
||||
+ }
|
||||
+ if (scanned_path == (char*)0)
|
||||
+ continue;
|
||||
+ path = scanned_path;
|
||||
+ if (*scanned_path == '@')
|
||||
+ scanned_path++;
|
||||
if (stat(scanned_path, &st) < 0) {
|
||||
- free(scanned_path);
|
||||
+ free(path);
|
||||
continue;
|
||||
}
|
||||
if ( (newsocket = malloc(sizeof(struct unixsocket_list))) == NULL)
|
||||
@@ -1323,7 +1332,7 @@ void fill_unix_cache(struct unixsocket_l
|
||||
newsocket->sun_name = strdup(scanned_path);
|
||||
newsocket->inode = st.st_ino;
|
||||
newsocket->dev = st.st_dev;
|
||||
- newsocket->net_inode = scanned_inode;
|
||||
+ newsocket->net_inode = scanned_inode;
|
||||
newsocket->next = *unixsocket_head;
|
||||
*unixsocket_head = newsocket;
|
||||
} /* while */
|
@ -1,3 +1,37 @@
|
||||
--- doc/fuser.1
|
||||
+++ doc/fuser.1 2008-05-16 15:18:59.027600905 +0200
|
||||
@@ -80,8 +80,14 @@ List all known signal names.
|
||||
\fIname\fP specifies a file on a mounted file system or a block device that
|
||||
is mounted. All processes accessing files on that file system are listed.
|
||||
If a directory file is specified, it is automatically changed to
|
||||
-\fIname\fP/. to use any file system that might be mounted on that
|
||||
-directory.
|
||||
+\fIname\fP/. To use any file system that might be mounted on that
|
||||
+directory. Please note that due the required device ID comparision all
|
||||
+mounted file systems the
|
||||
+.BR stat (2)
|
||||
+system call will applied to every file system even on network file system
|
||||
+(NFS). If the NFS server does not respond or the network is down the
|
||||
+.BR stat (2)
|
||||
+may hang forever.
|
||||
.IP \fB\-n\ \fIspace\fP
|
||||
Select a different name space. The name spaces \fBfile\fP (file names, the
|
||||
default), \fBudp\fP (local UDP ports), and \fBtcp\fP (local TCP ports) are
|
||||
@@ -152,10 +158,13 @@ The \fB\-k\fP option only works on proce
|
||||
\fBfuser\fP will print an advice, but take no action beyond that.
|
||||
.SH BUGS
|
||||
.PP
|
||||
-fuser \-m /dev/sgX will show (or kill with the \-k flag) all processes, even
|
||||
+\fBfuser \-m \fI/dev/sgX\fR will show (or kill with the \fB\-k\fR flag) all processes, even
|
||||
if you don't have that device configured. There may be other devices it
|
||||
does this for too.
|
||||
.PP
|
||||
+\fBfuser \-m \fIname\fR may hang forever if there are NFS file systems mounted
|
||||
+and one of the NFS servers do not respond or the corresponding network is down.
|
||||
+.PP
|
||||
.B fuser
|
||||
cannot report on any processes that it doesn't have permission to look at
|
||||
the file descriptor table for. The most common time this problem occurs
|
||||
--- src/fuser.c
|
||||
+++ src/fuser.c 2007-12-19 18:45:34.954694000 +0100
|
||||
@@ -32,6 +32,7 @@
|
||||
@ -487,7 +521,7 @@
|
||||
|
||||
#ifdef DEBUG
|
||||
--- src/fuser.h
|
||||
+++ src/fuser.h 2007-12-19 18:50:05.501016610 +0100
|
||||
+++ src/fuser.h 2007-12-19 18:50:05.501016000 +0100
|
||||
@@ -80,9 +80,16 @@ struct unixsocket_list {
|
||||
struct unixsocket_list *next;
|
||||
};
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 16 17:19:31 CEST 2008 - werner@suse.de
|
||||
|
||||
- Add a warning about fusers option -m due NFS locks
|
||||
- Strip @ symbol from file names read from /proc/net/unix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 19 18:46:56 CET 2007 - werner@suse.de
|
||||
|
||||
|
54
psmisc.spec
54
psmisc.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package psmisc (Version 22.6)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: psmisc
|
||||
BuildRequires: gcc-c++ glibc-devel ncurses-devel
|
||||
Url: http://switch.dl.sourceforge.net/sourceforge/psmisc/
|
||||
@ -18,13 +19,14 @@ Group: System/Monitoring
|
||||
PreReq: %fillup_prereq %insserv_prereq
|
||||
AutoReqProv: on
|
||||
Version: 22.6
|
||||
Release: 1
|
||||
Release: 28
|
||||
Provides: ps:/usr/bin/killall
|
||||
Summary: Utilities for managing processes on your system
|
||||
Source: http://switch.dl.sourceforge.net/sourceforge/psmisc/psmisc-%{version}.tar.bz2
|
||||
Patch0: %name-%version.dif
|
||||
Patch1: %name-22.5-pstree.patch
|
||||
Patch2: %name-22.6-nfs4fuser.patch
|
||||
Patch3: %name-22.6-netunix.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define nopeek s390 s390x ia64
|
||||
|
||||
@ -46,6 +48,7 @@ Authors:
|
||||
%setup -q
|
||||
%patch1 -p0 -b .pstree
|
||||
%patch2 -p0 -b .nfs4fuser
|
||||
%patch3 -p0 -b .netunix
|
||||
%patch0 -p0
|
||||
|
||||
%build
|
||||
@ -88,9 +91,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man1/pstree.1*
|
||||
|
||||
%changelog
|
||||
* Wed Dec 19 2007 - werner@suse.de
|
||||
* Fri May 16 2008 werner@suse.de
|
||||
- Add a warning about fusers option -m due NFS locks
|
||||
- Strip @ symbol from file names read from /proc/net/unix
|
||||
* Wed Dec 19 2007 werner@suse.de
|
||||
- Enhance NFS patch for fuser (bug #346776)
|
||||
* Fri Dec 14 2007 - werner@suse.de
|
||||
* Fri Dec 14 2007 werner@suse.de
|
||||
- Update to psmisc-22.6
|
||||
* killall.1 mentions you can use -SIGxxx as well as just -XXX for
|
||||
signal Debian #431082
|
||||
@ -102,36 +108,36 @@ rm -rf $RPM_BUILD_ROOT
|
||||
* Patch for peekfd from Benno Schulenberg
|
||||
* Fixed up NLS for fuser, patch from Benno Schulenberg
|
||||
* killall asks for Signal (procname) if not SIGTERM
|
||||
* Thu Oct 04 2007 - bg@suse.de
|
||||
* Fri Oct 05 2007 bg@suse.de
|
||||
- Disable peekfd on hppa
|
||||
* Thu Apr 26 2007 - werner@suse.de
|
||||
* Thu Apr 26 2007 werner@suse.de
|
||||
- Args, peekfd is ix86 specific, disable on other architectures
|
||||
* Thu Apr 26 2007 - werner@suse.de
|
||||
* Thu Apr 26 2007 werner@suse.de
|
||||
- Update to psmisc-22.5
|
||||
* fuser tcp works on 64bit
|
||||
* Added new tool peekfd
|
||||
* killall uses /proc/<pid>/exe if inode comparision fails
|
||||
* fuser correctly parses remote tcp ports
|
||||
- Patched fuser to avoid to be locked on stalled NFS (bug #166912)
|
||||
* Thu Mar 29 2007 - rguenther@suse.de
|
||||
* Thu Mar 29 2007 rguenther@suse.de
|
||||
- Add ncurses-devel BuildRequires
|
||||
* Fri Sep 15 2006 - werner@suse.de
|
||||
* Fri Sep 15 2006 werner@suse.de
|
||||
- Update to psmisc version 22.3 which includes the previous fixes
|
||||
* Wed Feb 08 2006 - max@suse.de
|
||||
* Wed Feb 08 2006 max@suse.de
|
||||
- Fix exit code of fuser in silent mode [#148563].
|
||||
* Fri Jan 27 2006 - mmj@suse.de
|
||||
* Fri Jan 27 2006 mmj@suse.de
|
||||
- Fix finding AF_UNIX sockets [#142342]
|
||||
- Fix minor nits with net_*
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
* Wed Jan 25 2006 mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Thu Jan 12 2006 - mmj@suse.de
|
||||
* Thu Jan 12 2006 mmj@suse.de
|
||||
- Update to psmisc-22.1 including:
|
||||
* Updated PO files
|
||||
* fuser signals eg -INT work better
|
||||
* removed space out of fuser man page for -signal
|
||||
* fuser -s flag works
|
||||
* fix grep lines in Makefile for i386 arches
|
||||
* Fri Dec 16 2005 - mmj@suse.de
|
||||
* Fri Dec 16 2005 mmj@suse.de
|
||||
- update to psmisc-21.9 including:
|
||||
* Fixed install-exec-hook so only symlink pstree.x11 if file does
|
||||
not exist already.
|
||||
@ -143,17 +149,17 @@ rm -rf $RPM_BUILD_ROOT
|
||||
* fixed print_matches to only print unmatched objects if -a is
|
||||
specified and to output the header for -v
|
||||
* fixed argument parsing to handle groups like -av again
|
||||
* Fri Dec 09 2005 - ro@suse.de
|
||||
* Fri Dec 09 2005 ro@suse.de
|
||||
- disable selinux
|
||||
* Tue Nov 08 2005 - mmj@suse.de
|
||||
* Tue Nov 08 2005 mmj@suse.de
|
||||
- add patch to fix print_matches and commandline arguments parsing
|
||||
* Sun Nov 06 2005 - mmj@suse.de
|
||||
* Sun Nov 06 2005 mmj@suse.de
|
||||
- fuser returns 1 if no match found like before [#132180]
|
||||
* Tue Nov 01 2005 - mmj@suse.de
|
||||
* Tue Nov 01 2005 mmj@suse.de
|
||||
- Update to psmisc-21.7
|
||||
* Mon Aug 08 2005 - meissner@suse.de
|
||||
* Mon Aug 08 2005 meissner@suse.de
|
||||
- fixed buffer overflow in -k failure case with pids >= 10000
|
||||
* Mon Aug 16 2004 - garloff@suse.de
|
||||
* Mon Aug 16 2004 garloff@suse.de
|
||||
- Update to psmisc-21.5:
|
||||
* bugs fixed: UTF-8 line truncation (SF#757164), ss_family
|
||||
(SF#845292), docu (fuser, ...)
|
||||
@ -162,11 +168,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
* Cleanups: dev_t and ino_t usage, automake update
|
||||
* pstree -A(SCII) flag
|
||||
- Rediff patches.
|
||||
* Tue Jul 20 2004 - schwab@suse.de
|
||||
* Tue Jul 20 2004 schwab@suse.de
|
||||
- Use autoreconf.
|
||||
* Sun Apr 04 2004 - kukuk@suse.de
|
||||
* Sun Apr 04 2004 kukuk@suse.de
|
||||
- Add split alias [Bug #38279]
|
||||
* Sun Feb 15 2004 - stepan@suse.de
|
||||
* Sun Feb 15 2004 stepan@suse.de
|
||||
- update to v21.4
|
||||
* Sat Feb 14 2004 - kukuk@suse.de
|
||||
* Sat Feb 14 2004 kukuk@suse.de
|
||||
- Split from ps package
|
||||
|
Loading…
Reference in New Issue
Block a user