diff --git a/psmisc-22.5.dif b/psmisc-22.5.dif deleted file mode 100644 index cb414aa..0000000 --- a/psmisc-22.5.dif +++ /dev/null @@ -1,24 +0,0 @@ ---- configure.ac -+++ configure.ac 2007-04-25 16:58:08.888830481 +0200 -@@ -1,10 +1,10 @@ - dnl Process this file with autoconf to produce a configure script. --AC_PREREQ(2.61) -+AC_PREREQ(2.60) - AC_INIT([psmisc],[22.5]) - AC_CONFIG_SRCDIR([src/comm.h]) - AC_CONFIG_HEADER([config.h]) - AC_CONFIG_AUX_DIR([config]) --AM_INIT_AUTOMAKE([1.10]) -+AM_INIT_AUTOMAKE([1.9.6]) - - dnl Checks for programs. - AC_PROG_CXX -@@ -68,7 +68,7 @@ - - dnl Check for language stuff - AM_GNU_GETTEXT([external]) --AM_GNU_GETTEXT_VERSION([0.16.1]) -+AM_GNU_GETTEXT_VERSION([0.15]) - - dnl Checks for library functions. - AC_FUNC_CLOSEDIR_VOID diff --git a/psmisc-22.5.tar.bz2 b/psmisc-22.5.tar.bz2 deleted file mode 100644 index 2904fbd..0000000 --- a/psmisc-22.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57c9c29b54487cb8613a7a7d6509868b6c62001f3d589335dbcb7cb00b9f2b27 -size 226753 diff --git a/psmisc-22.5-nfs4fuser.patch b/psmisc-22.6-nfs4fuser.patch similarity index 76% rename from psmisc-22.5-nfs4fuser.patch rename to psmisc-22.6-nfs4fuser.patch index 95ffb0f..150a51f 100644 --- a/psmisc-22.5-nfs4fuser.patch +++ b/psmisc-22.6-nfs4fuser.patch @@ -1,20 +1,5 @@ ---- src/fuser.h -+++ src/fuser.h 2007-04-26 11:28:06.922891992 +0200 -@@ -80,6 +80,12 @@ struct unixsocket_list { - struct unixsocket_list *next; - }; - -+struct nfs_points { -+ struct nfs_points *next, *prev; -+ char * name; -+ size_t nlen; -+}; -+ - #define NAMESPACE_FILE 0 - #define NAMESPACE_TCP 1 - #define NAMESPACE_UDP 2 --- src/fuser.c -+++ src/fuser.c 2007-04-26 15:12:59.747963078 +0200 ++++ src/fuser.c 2007-12-19 18:45:34.954694000 +0100 @@ -32,6 +32,7 @@ #include #include @@ -50,7 +35,7 @@ static void usage (const char *errormsg) { -@@ -125,7 +129,7 @@ void print_version() +@@ -127,7 +131,7 @@ void print_version() "For more information about these matters, see the files named COPYING.\n")); } @@ -59,7 +44,7 @@ { DIR *topproc_dir; struct dirent *topproc_dent; -@@ -135,6 +139,9 @@ static void scan_procs(struct names *nam +@@ -137,6 +141,9 @@ static void scan_procs(struct names *nam pid_t pid, my_pid; uid_t uid; struct stat *cwd_stat, *exe_stat, *root_stat; @@ -69,7 +54,7 @@ if ( (fd_dirpath = malloc(MAX_PATHNAME)) == NULL) return; -@@ -155,19 +162,30 @@ static void scan_procs(struct names *nam +@@ -157,19 +164,30 @@ static void scan_procs(struct names *nam continue; uid = getpiduid(pid); @@ -103,7 +88,7 @@ if (exe_stat != NULL) { if (exe_stat->st_dev == ino_tmp->device && exe_stat->st_ino == ino_tmp->inode) { add_matched_proc(ino_tmp->name, pid, uid, ACCESS_EXE); -@@ -184,6 +202,21 @@ static void scan_procs(struct names *nam +@@ -186,6 +204,21 @@ static void scan_procs(struct names *nam add_matched_proc(ino_tmp->name, pid, uid, ACCESS_CWD); } } @@ -125,7 +110,7 @@ } check_dir(pid, "lib", dev_head, ino_head, uid, ACCESS_MMAP); check_dir(pid, "mmap", dev_head, ino_head, uid, ACCESS_MMAP); -@@ -323,10 +356,25 @@ int parse_mount(struct names *this_name, +@@ -325,10 +358,26 @@ int parse_mount(struct names *this_name, return 0; } @@ -140,7 +125,8 @@ + if ((opts & (OPT_MOUNTPOINT|OPT_MOUNTS)) == 0) { + free(this_name->filename); + this_name->filename = strdup(real); -+ add_inode(ino_list, this_name, st.st_dev, st.st_ino); ++ this_name->name_space |= NAMESPACE_NFS; ++ add_inode(ino_list, this_name, (dev_t)-1, (ino_t)-1); + return 0; + } + } @@ -152,7 +138,7 @@ if (stat(this_name->filename, &st) != 0) { fprintf(stderr,_("Cannot stat %s: %s\n"), this_name->filename, strerror(errno)); -@@ -340,30 +388,31 @@ int parse_file(struct names *this_name, +@@ -342,34 +391,44 @@ int parse_file(struct names *this_name, return 0; } @@ -164,8 +150,10 @@ - dev_t net_dev; - + -+ if (check4nfs(this_name->filename, NULL)) ++ if (check4nfs(this_name->filename, NULL)) { ++ this_name->name_space |= NAMESPACE_NFS; + return 0; ++ } + if (stat(this_name->filename, &st) != 0) { fprintf(stderr,_("Cannot stat %s: %s\n"), this_name->filename, @@ -191,7 +179,35 @@ { struct stat st; struct mountdev_list *mountptr; -@@ -650,6 +699,117 @@ void find_net6_sockets(struct inode_list + dev_t match_device; ++ char real[PATH_MAX+1] = ""; ++ ++ real[0] = '\0'; ++ if (check4nfs(this_name->filename, real)) { ++ this_name->name_space |= NAMESPACE_NFS; ++ goto skip; ++ } + + if (stat(this_name->filename, &st) != 0) { + fprintf(stderr,_("Cannot stat %s: %s\n"), this_name->filename, +@@ -388,6 +447,16 @@ int parse_mounts(struct names *this_name + } + } + return 0; ++skip: ++ match_device = -1; ++ for (mountptr = mounts ; mountptr != NULL ; mountptr = mountptr->next) { ++ if (strcmp(mountptr->dir, real) == 0) { ++ printf("Debug: adding parse_mounts() adding %s\n", ++ this_name->filename); ++ add_device(dev_list, this_name, match_device); ++ } ++ } ++ return 0; + } + + #ifdef WITH_IPV6 +@@ -652,6 +721,117 @@ void find_net6_sockets(struct inode_list } #endif @@ -309,7 +325,7 @@ int main(int argc, char *argv[]) { opt_type opts; -@@ -662,7 +822,7 @@ int main(int argc, char *argv[]) +@@ -664,7 +844,7 @@ int main(int argc, char *argv[]) struct device_list *match_devices = NULL; struct unixsocket_list *unixsockets = NULL; @@ -318,9 +334,9 @@ struct ip_connections *tcp_connection_list = NULL; struct ip_connections *udp_connection_list = NULL; #ifdef WITH_IPV6 -@@ -682,10 +842,6 @@ int main(int argc, char *argv[]) - opts = 0; - sig_number = SIGKILL; +@@ -691,10 +871,6 @@ int main(int argc, char *argv[]) + textdomain(PACKAGE); + #endif - netdev = find_net_dev(); - scan_mount_devices(opts, &mount_devices); @@ -329,7 +345,7 @@ /* getopt doesnt like things like -SIGBLAH */ for(optc = 1; optc < argc; optc++) { if (argv[optc][0] == '-') { /* its an option */ -@@ -773,6 +929,11 @@ int main(int argc, char *argv[]) +@@ -782,6 +958,11 @@ int main(int argc, char *argv[]) } continue; } @@ -341,7 +357,7 @@ /* File specifications */ if ( (this_name = malloc(sizeof(struct names))) == NULL) continue; -@@ -819,8 +980,8 @@ int main(int argc, char *argv[]) +@@ -828,8 +1009,8 @@ int main(int argc, char *argv[]) break; default: /* FILE */ this_name->filename = strdup(argv[optc]); @@ -352,7 +368,7 @@ if (opts & OPT_MOUNTPOINT || opts & OPT_MOUNTS) parse_mounts(this_name, mount_devices, &match_devices, opts); break; -@@ -848,22 +1009,22 @@ int main(int argc, char *argv[]) +@@ -857,22 +1038,22 @@ int main(int argc, char *argv[]) if (!ipv4_only) { #endif if (tcp_connection_list != NULL) @@ -380,7 +396,7 @@ #ifdef NFS_CHECKS scan_knfsd(names_head, match_devices); #endif /* NFS_CHECKS */ -@@ -969,7 +1130,7 @@ static int print_matches(struct names *n +@@ -978,7 +1159,7 @@ static int print_matches(struct names *n } @@ -389,7 +405,7 @@ { char pathname[256]; struct stat *st; -@@ -977,6 +1138,10 @@ static struct stat *get_pidstat(const pi +@@ -986,6 +1167,10 @@ static struct stat *get_pidstat(const pi if ( (st = malloc(sizeof(struct stat))) == NULL) return NULL; snprintf(pathname, 256, "/proc/%d/%s", pid, filename); @@ -400,7 +416,46 @@ if (stat(pathname, st) != 0) return NULL; else -@@ -1135,6 +1300,7 @@ void scan_mount_devices(const opt_type o +@@ -1019,6 +1204,8 @@ static void check_dir(const pid_t pid, c + fprintf(stderr, _("Cannot stat file %s: %s\n"),filepath, strerror(errno)); + } else { + for (dev_tmp = dev_head ; dev_tmp != NULL ; dev_tmp = dev_tmp->next) { ++ if (dev_tmp->name->name_space & NAMESPACE_NFS) ++ continue; + if (st.st_dev == dev_tmp->device) { + if (access == ACCESS_FILE && (lstat(filepath, &lst)==0) && (lst.st_mode & S_IWUSR)) { + add_matched_proc(dev_tmp->name, pid,uid, ACCESS_FILEWR|access); +@@ -1028,6 +1215,8 @@ static void check_dir(const pid_t pid, c + } + } + for (ino_tmp = ino_head ; ino_tmp != NULL ; ino_tmp = ino_tmp->next) { ++ if (ino_tmp->name->name_space & NAMESPACE_NFS) ++ continue; + if (st.st_dev == ino_tmp->device && st.st_ino == ino_tmp->inode) { + if (access == ACCESS_FILE && (lstat(filepath, &lst)==0) && (lst.st_mode & S_IWUSR)) { + add_matched_proc(ino_tmp->name, pid,uid, ACCESS_FILEWR|access); +@@ -1059,12 +1248,18 @@ static void check_map(const pid_t pid, c + if (sscanf(line, "%*s %*s %*s %x:%x %lld", + &tmp_maj, &tmp_min, &tmp_inode) == 3) { + tmp_device = tmp_maj * 256 + tmp_min; +- for(dev_tmp = dev_head ; dev_tmp != NULL ; dev_tmp = dev_tmp->next) ++ for(dev_tmp = dev_head ; dev_tmp != NULL ; dev_tmp = dev_tmp->next) { ++ if (dev_tmp->name->name_space & NAMESPACE_NFS) ++ continue; + if (dev_tmp->device == tmp_device) + add_matched_proc(dev_tmp->name, pid, uid, access); +- for(ino_tmp = ino_head ; ino_tmp != NULL ; ino_tmp = ino_tmp->next) ++ } ++ for(ino_tmp = ino_head ; ino_tmp != NULL ; ino_tmp = ino_tmp->next) { ++ if (ino_tmp->name->name_space & NAMESPACE_NFS) ++ continue; + if (ino_tmp->device == tmp_device && ino_tmp->inode == tmp_inode) + add_matched_proc(ino_tmp->name, pid, uid, access); ++ } + } + } + fclose(fp); +@@ -1144,6 +1339,7 @@ void scan_mount_devices(const opt_type o FILE *mntfp; struct mntent *mnt_ptr; struct stat st; @@ -408,14 +463,14 @@ if ( (mntfp = setmntent("/etc/mtab","r")) == NULL) { fprintf(stderr, _("Cannot open /etc/mtab: %s\n"), -@@ -1142,10 +1308,22 @@ void scan_mount_devices(const opt_type o +@@ -1151,10 +1347,22 @@ void scan_mount_devices(const opt_type o return; } while ( (mnt_ptr = getmntent(mntfp)) != NULL) { + real[0] = '\0'; + if (check4nfs(mnt_ptr->mnt_dir, real)) { + if ((opts & (OPT_MOUNTPOINT|OPT_MOUNTS)) == 0) { -+ add_mount_device(mount_devices, mnt_ptr->mnt_fsname, real, (dev_t)0); ++ add_mount_device(mount_devices, mnt_ptr->mnt_fsname, real, (dev_t)-1); + continue; + } + } @@ -431,3 +486,22 @@ } #ifdef DEBUG +--- src/fuser.h ++++ src/fuser.h 2007-12-19 18:50:05.501016610 +0100 +@@ -80,9 +80,16 @@ struct unixsocket_list { + struct unixsocket_list *next; + }; + ++struct nfs_points { ++ struct nfs_points *next, *prev; ++ char * name; ++ size_t nlen; ++}; ++ + #define NAMESPACE_FILE 0 + #define NAMESPACE_TCP 1 + #define NAMESPACE_UDP 2 ++#define NAMESPACE_NFS 4 + + #define MAX_PATHNAME 200 + #define MAX_CMDNAME 16 diff --git a/psmisc-22.6.dif b/psmisc-22.6.dif new file mode 100644 index 0000000..0e8b1c5 --- /dev/null +++ b/psmisc-22.6.dif @@ -0,0 +1,34 @@ +--- configure.ac ++++ configure.ac 2007-12-14 15:01:53.293387939 +0100 +@@ -1,10 +1,10 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_PREREQ(2.61) ++AC_PREREQ(2.60) + AC_INIT([psmisc],[22.6]) + AC_CONFIG_SRCDIR([src/comm.h]) + AC_CONFIG_HEADER([config.h]) + AC_CONFIG_AUX_DIR([config]) +-AM_INIT_AUTOMAKE([1.10]) ++AM_INIT_AUTOMAKE([1.9.6]) + + dnl Checks for programs. + AC_PROG_CXX +@@ -67,7 +67,8 @@ AC_CHECK_MEMBERS([struct user_regs_struc + struct user_regs_struct.rax, + struct user_regs_struct.rdi, + struct user_regs_struct.rsi, +- struct user_regs_struct.rdx], [],[], [#include ]) ++ struct user_regs_struct.rdx], [],[], [#include ++ #include ]) + AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3, + struct pt_regs.gpr], [],[], [#include ]) + AM_CONDITIONAL(WANT_PEEKFD_I386, +@@ -88,7 +89,7 @@ AM_CONDITIONAL(WANT_PEEKFD_PPC, + + dnl Check for language stuff + AM_GNU_GETTEXT([external]) +-AM_GNU_GETTEXT_VERSION([0.16.1]) ++AM_GNU_GETTEXT_VERSION([0.15]) + + dnl Checks for library functions. + AC_FUNC_CLOSEDIR_VOID diff --git a/psmisc-22.6.tar.bz2 b/psmisc-22.6.tar.bz2 new file mode 100644 index 0000000..8dd8b2e --- /dev/null +++ b/psmisc-22.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4a3f58fe7a968634741376469129ec935c692d07ab2468d2d875c6eb096ccbe +size 229476 diff --git a/psmisc.changes b/psmisc.changes index d686a0e..d6c52c5 100644 --- a/psmisc.changes +++ b/psmisc.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Wed Dec 19 18:46:56 CET 2007 - werner@suse.de + +- Enhance NFS patch for fuser (bug #346776) + +------------------------------------------------------------------- +Fri Dec 14 14:18:03 CET 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 + * Added support for PPC architecture for peekfd + * Updated the Chinese simplified po file + * Added support for x86_64 architecture for peekfd + * Added Chinese simplified po file + * Updated Dutch, Vietnamese, Polish and Italian translations + * 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 4 23:40:19 CEST 2007 - bg@suse.de diff --git a/psmisc.spec b/psmisc.spec index 49e0c34..f3c530d 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -1,5 +1,5 @@ # -# spec file for package psmisc (Version 22.5) +# spec file for package psmisc (Version 22.6) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -17,16 +17,16 @@ License: GPL v2 or later Group: System/Monitoring PreReq: %fillup_prereq %insserv_prereq AutoReqProv: on -Version: 22.5 -Release: 31 +Version: 22.6 +Release: 1 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-%version-pstree.patch -Patch2: %name-%version-nfs4fuser.patch +Patch1: %name-22.5-pstree.patch +Patch2: %name-22.6-nfs4fuser.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define nopeek s390 s390x ppc ppc64 x86_64 ia64 hppa +%define nopeek s390 s390x ia64 %description The psmisc package contains utilities for managing processes on your @@ -86,7 +86,22 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/peekfd.1* %endif %{_mandir}/man1/pstree.1* + %changelog +* Wed Dec 19 2007 - werner@suse.de +- Enhance NFS patch for fuser (bug #346776) +* 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 + * Added support for PPC architecture for peekfd + * Updated the Chinese simplified po file + * Added support for x86_64 architecture for peekfd + * Added Chinese simplified po file + * Updated Dutch, Vietnamese, Polish and Italian translations + * 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 - Disable peekfd on hppa * Thu Apr 26 2007 - werner@suse.de