From 006b356a9bcf18b842e3ca58823721327f268666 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Oct 2012 19:09:09 +0100 Subject: [PATCH] Update to 22.20. - Contains a fix for: http://sourceforge.net/p/psmisc/bugs/53/ - Fix src/pstree.c when SELinux is available. --- .gitignore | 1 + psmisc-22.20-fix-selinux-in-pstree.patch | 39 ++++++++++++++++++++++++ psmisc.spec | 14 +++++++-- sources | 2 +- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 psmisc-22.20-fix-selinux-in-pstree.patch diff --git a/.gitignore b/.gitignore index e9900d2..bb38783 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ psmisc-22.10.tar.gz /psmisc-22.15.tar.gz /psmisc-22.16.tar.gz /psmisc-22.19.tar.gz +/psmisc-22.20.tar.gz diff --git a/psmisc-22.20-fix-selinux-in-pstree.patch b/psmisc-22.20-fix-selinux-in-pstree.patch new file mode 100644 index 0000000..d89d6c1 --- /dev/null +++ b/psmisc-22.20-fix-selinux-in-pstree.patch @@ -0,0 +1,39 @@ +--- psmisc-22.20/src/pstree.c 2012-09-19 14:05:43.000000000 +0100 ++++ psmisc-22.20-selinux/src/pstree.c 2012-10-08 19:18:13.992951873 +0100 +@@ -140,7 +140,12 @@ + static int dumped = 0; /* used by dump_by_user */ + static int charlen = 0; /* length of character */ + ++#ifdef WITH_SELINUX ++static void fix_orphans(security_context_t scontext); ++#else + static void fix_orphans(void); ++#endif ++ + /* + * Allocates additional buffer space for width and more as needed. + * The first call will allocate the first buffer. +@@ -787,7 +792,11 @@ + } + } + (void) closedir(dir); ++#ifdef WITH_SELINUX ++ fix_orphans(scontext); ++#else + fix_orphans(); ++#endif + if (print_args) + free(buffer); + if (empty) { +@@ -796,7 +805,11 @@ + } + } + ++#ifdef WITH_SELINUX ++static void fix_orphans(security_context_t scontext) ++#else + static void fix_orphans(void) ++#endif + { + /* When using kernel 3.3 with hidepid feature enabled on /proc + * then we need fake root pid and gather all the orphan processes diff --git a/psmisc.spec b/psmisc.spec index afa3837..d4cedd5 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing processes on your system Name: psmisc -Version: 22.19 -Release: 2%{?dist} +Version: 22.20 +Release: 1%{?dist} License: GPLv2+ Group: Applications/System Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz @@ -15,6 +15,9 @@ BuildRequires: autoconf automake #The following has been reworked by upstream in a different way ... we'll see #Patch1: psmisc-22.13-fuser-silent.patch +# Patch sent upstream 2012-10-08. +Patch2: psmisc-22.20-fix-selinux-in-pstree.patch + %description The psmisc package contains utilities for managing processes on your system: pstree, killall and fuser. The pstree command displays a tree @@ -26,6 +29,8 @@ of processes that are using specified files or filesystems. %prep %setup -q +%patch2 -p1 + %build %configure --prefix=%{_prefix} --enable-selinux make %{?_smp_mflags} @@ -55,6 +60,11 @@ mv $RPM_BUILD_ROOT%{_bindir}/fuser $RPM_BUILD_ROOT/sbin %doc AUTHORS ChangeLog COPYING README %changelog +* Mon Oct 08 2012 Richard W.M. Jones 22.20-1 +- Update to 22.20. + Contains a fix for: http://sourceforge.net/p/psmisc/bugs/53/ +- Fix src/pstree.c when SELinux is available. + * Sat Jul 21 2012 Fedora Release Engineering - 22.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index ee6f4be..12be186 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -38563b4760ffce54b0eadf99cb5b16e8 psmisc-22.19.tar.gz +a25fc99a6dc7fa7ae6e4549be80b401f psmisc-22.20.tar.gz