- fix configure.ac to include all the required headers for peekfd

- remove kernel-headers again -- not needed in rawhide
This commit is contained in:
Tomas Smetana 2008-04-07 10:34:10 +00:00
parent 8610abb7bc
commit 51f7118672
6 changed files with 20 additions and 94 deletions

View File

@ -1,11 +0,0 @@
--- psmisc-22.3/src/fuser.c.kzak 2007-03-01 13:20:17.000000000 +0100
+++ psmisc-22.3/src/fuser.c 2007-03-01 13:01:38.000000000 +0100
@@ -249,7 +249,7 @@
ip_tmp->name = this_name;
ip_tmp->lcl_port = lcl_port;
ip_tmp->rmt_port = rmt_port;
- memcpy(&(ip_tmp->rmt_port),&(rmt_port),sizeof(struct in6_addr));
+ memcpy(&(ip_tmp->rmt_address),&(rmt_address),sizeof(struct in6_addr));
ip_tmp->next = ip_head;
*ip_list = ip_tmp;

View File

@ -1,37 +0,0 @@
--- psmisc-22.3/src/killall.c.kzak 2007-04-02 11:45:04.000000000 +0200
+++ psmisc-22.3/src/killall.c 2007-04-02 12:56:54.000000000 +0200
@@ -372,16 +372,29 @@
}
else
{
+ int ok = 1;
+
if (asprintf (&path, PROC_BASE "/%d/exe", pid_table[i]) < 0)
continue;
if (stat (path, &st) < 0)
+ ok = 0;
+
+ else if (sts[j].st_dev != st.st_dev ||
+ sts[j].st_ino != st.st_ino)
{
- free (path);
- continue;
- }
- free (path);
- if (sts[j].st_dev != st.st_dev || sts[j].st_ino != st.st_ino)
+ /* maybe the binary has been modified and std[j].st_ino
+ * is not reliable anymore. We need to compare paths.
+ */
+ char linkbuf[PATH_MAX];
+
+ if (readlink(path, linkbuf, sizeof(linkbuf)) <= 0 ||
+ strcmp(namelist[j], linkbuf))
+ ok = 0;
+ }
+
+ free(path);
+ if (!ok)
continue;
}
} /* non-regex */

View File

@ -1,12 +0,0 @@
diff -up psmisc-22.6/configure.ac.peekfd64 psmisc-22.6/configure.ac
--- psmisc-22.6/configure.ac.peekfd64 2007-12-03 13:23:34.000000000 +0100
+++ psmisc-22.6/configure.ac 2007-12-03 13:23:52.000000000 +0100
@@ -67,7 +67,7 @@ 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 <sys/user.h>])
+ struct user_regs_struct.rdx], [],[], [#include <linux/user.h>])
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
AM_CONDITIONAL(WANT_PEEKFD_I386,

View File

@ -1,30 +0,0 @@
diff -up psmisc-22.6/src/Makefile.am.secarch psmisc-22.6/src/Makefile.am
--- psmisc-22.6/src/Makefile.am.secarch 2007-12-10 12:11:04.000000000 +0100
+++ psmisc-22.6/src/Makefile.am 2007-12-10 12:11:37.000000000 +0100
@@ -5,14 +5,17 @@ bin_PROGRAMS = fuser killall pstree oldf
if WANT_PEEKFD_I386
bin_PROGRAMS += peekfd
AM_CFLAGS += -DI386
+ peekfd_SOURCES = peekfd.c
endif
if WANT_PEEKFD_X86_64
bin_PROGRAMS += peekfd
AM_CFLAGS += -DX86_64
+ peekfd_SOURCES = peekfd.c
endif
if WANT_PEEKFD_PPC
bin_PROGRAMS += peekfd
AM_CFLAGS += -DPPC
+ peekfd_SOURCES = peekfd.c
endif
oldfuser_SOURCES = oldfuser.c comm.h signals.c signals.h loop.h i18n.h
@@ -23,8 +26,6 @@ killall_SOURCES = killall.c comm.h signa
killall_LDADD = @SELINUX_LIB@
-peekfd_SOURCES = peekfd.c
-
pstree_SOURCES = pstree.c comm.h i18n.h
pstree_LDADD = @TERMCAP_LIB@ @SELINUX_LIB@

13
psmisc-22.6-types.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up psmisc-22.6/configure.ac.types psmisc-22.6/configure.ac
--- psmisc-22.6/configure.ac.types 2008-04-07 12:21:50.000000000 +0200
+++ psmisc-22.6/configure.ac 2008-04-07 12:22:14.000000000 +0200
@@ -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 <sys/user.h>])
+ struct user_regs_struct.rdx], [],[], [#include <sys/types.h>
+ #include <sys/user.h>])
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
AM_CONDITIONAL(WANT_PEEKFD_I386,

View File

@ -1,20 +1,19 @@
Summary: Utilities for managing processes on your system
Name: psmisc
Version: 22.6
Release: 4%{?dist}
Release: 5%{?dist}
License: BSD/GPLv2+
Group: Applications/System
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
URL: http://psmisc.sourceforge.net
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: psmisc-22.6-peekfd64.patch
Patch0: psmisc-22.6-types.patch
BuildRequires: libselinux-devel
BuildRequires: gettext
BuildRequires: ncurses-devel
BuildRequires: autoconf automake
BuildRequires: kernel-headers
%description
The psmisc package contains utilities for managing processes on your
@ -26,7 +25,7 @@ of processes that are using specified files or filesystems.
%prep
%setup -q
%patch0 -p1
%patch -p1 -b .types
%build
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
@ -67,6 +66,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Mon Apr 07 2008 Tomas Smetana <tsmetana@redhat.com> 22.6-5
- fix configure.ac to include all the required headers for peekfd
- remove kernel-headers again -- not needed in rawhide
* Mon Apr 07 2008 Tomas Smetana <tsmetana@redhat.com> 22.6-4
- fix #440762 - add kernel-headers to build reuqirements