- upgrade to 4.81
- lsof_4.80-threads.patch - rebased
This commit is contained in:
parent
a02b060122
commit
a7e8a17b77
@ -1 +1 @@
|
||||
lsof_4.80-rh.tar.bz2
|
||||
lsof_4.81-rh.tar.bz2
|
||||
|
14
lsof.spec
14
lsof.spec
@ -1,7 +1,7 @@
|
||||
Summary: A utility which lists open files on a Linux/UNIX system
|
||||
Name: lsof
|
||||
Version: 4.80
|
||||
Release: 2%{?dist}
|
||||
Version: 4.81
|
||||
Release: 1%{?dist}
|
||||
License: zlib
|
||||
Group: Development/Debuggers
|
||||
|
||||
@ -11,7 +11,7 @@ Group: Development/Debuggers
|
||||
# The script you can found in CVS or download from:
|
||||
# http://cvs.fedoraproject.org/viewcvs/rpms/lsof/devel/upstream2downstream.sh
|
||||
#
|
||||
%define lsofrh lsof_4.80-rh
|
||||
%define lsofrh lsof_4.81-rh
|
||||
Source0: %{lsofrh}.tar.bz2
|
||||
URL: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof
|
||||
|
||||
@ -19,7 +19,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: libselinux-devel
|
||||
|
||||
Patch1: lsof_4.80-threads.patch
|
||||
# 184338 - allow lsof access nptl threads
|
||||
Patch1: lsof_4.81-threads.patch
|
||||
|
||||
%description
|
||||
Lsof stands for LiSt Open Files, and it does just that: it lists
|
||||
@ -28,7 +29,6 @@ UNIX system.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{lsofrh}
|
||||
# 184338 - allow lsof access nptl threads
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
@ -53,6 +53,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Tue Dec 2 2008 Karel Zak <kzak@redhat.com> 4.81-1
|
||||
- upgrade to 4.81
|
||||
- lsof_4.80-threads.patch - rebased
|
||||
|
||||
* Thu Aug 7 2008 Tom "spot" Callaway <tcallawa@redhat.com> 4.80-2
|
||||
- fix license tag
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dproc.c
|
||||
--- lsof_4.80-rh/dialects/linux/dproc.c.th 2008-04-15 15:32:34.000000000 +0200
|
||||
+++ lsof_4.80-rh/dialects/linux/dproc.c 2008-05-20 01:21:39.000000000 +0200
|
||||
@@ -84,7 +84,8 @@ _PROTOTYPE(static void process_proc_map,
|
||||
diff -up lsof_4.81-rh/dialects/linux/dproc.c.kzak lsof_4.81-rh/dialects/linux/dproc.c
|
||||
--- lsof_4.81-rh/dialects/linux/dproc.c.kzak 2008-10-21 18:17:25.000000000 +0200
|
||||
+++ lsof_4.81-rh/dialects/linux/dproc.c 2008-12-02 10:54:54.000000000 +0100
|
||||
@@ -89,7 +89,8 @@ _PROTOTYPE(static void process_proc_map,
|
||||
_PROTOTYPE(static int process_id,(char *idp, int idpl, char *cmd, UID_ARG uid,
|
||||
int pid, int ppid, int pgid));
|
||||
_PROTOTYPE(static int statEx,(char *p, struct stat *s, int *ss));
|
||||
@ -11,7 +11,7 @@ diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dpro
|
||||
|
||||
#if defined(HASSELINUX)
|
||||
_PROTOTYPE(static int cmp_cntx_eq,(char *pcntx, char *ucntx));
|
||||
@@ -154,6 +155,7 @@ gather_proc_info()
|
||||
@@ -159,6 +160,7 @@ gather_proc_info()
|
||||
struct dirent *dp;
|
||||
struct stat sb;
|
||||
int lwp, n, nl, pgid, pid, ppid, rv, tx;
|
||||
@ -19,7 +19,7 @@ diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dpro
|
||||
static char *lwppath = (char *)NULL;
|
||||
static int lwppathl = 0;
|
||||
static char *path = (char *)NULL;
|
||||
@@ -246,6 +248,13 @@ gather_proc_info()
|
||||
@@ -252,6 +254,13 @@ gather_proc_info()
|
||||
while ((dp = readdir(ps))) {
|
||||
if (nm2id(dp->d_name, &pid, &n))
|
||||
continue;
|
||||
@ -33,7 +33,7 @@ diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dpro
|
||||
/*
|
||||
* Build path to PID's directory.
|
||||
*/
|
||||
@@ -259,7 +268,14 @@ gather_proc_info()
|
||||
@@ -265,7 +274,14 @@ gather_proc_info()
|
||||
Exit(1);
|
||||
}
|
||||
}
|
||||
@ -49,12 +49,12 @@ diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dpro
|
||||
n += (pidx + 1);
|
||||
/*
|
||||
* Process the PID's stat info.
|
||||
@@ -1016,6 +1032,64 @@ process_id(idp, idpl, cmd, uid, pid, ppi
|
||||
@@ -1007,6 +1023,64 @@ process_id(idp, idpl, cmd, uid, pid, ppi
|
||||
return(0);
|
||||
}
|
||||
|
||||
+/* fill tid if the initial thread is zombie,
|
||||
+ * but other thread still alive
|
||||
+/* fill tid if the initial thread is zombie,
|
||||
+ * but other thread still alive
|
||||
+ *
|
||||
+ * returns -1=error, 0=nothing, 1=ok
|
||||
+ */
|
||||
@ -80,7 +80,7 @@ diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dpro
|
||||
+ return -1;
|
||||
+ if (_pid != pid)
|
||||
+ return -1; /* corrupted /proc? */
|
||||
+ if (pstate!='Z')
|
||||
+ if (pstate!='Z')
|
||||
+ return 0; /* ignore normal proceses */
|
||||
+
|
||||
+ snpf(path, sizeof(path), "%s/%d/task", PROCFS, pid);
|
||||
@ -88,12 +88,12 @@ diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dpro
|
||||
+ /* open /proc/<pid>/task */
|
||||
+ if (!(tdp = opendir(path)))
|
||||
+ return 0; /* kernel < 2.6.x */
|
||||
+
|
||||
+
|
||||
+ /* look for first alive thread */
|
||||
+ while ((td = readdir(tdp))) {
|
||||
+ if (strcmp(td->d_name, ".")==0 || strcmp(td->d_name, "..")==0)
|
||||
+ continue;
|
||||
+
|
||||
+
|
||||
+ /* /proc/<pid>/task/<tid>/stat */
|
||||
+ snpf(path, sizeof(path), "%s/%d/task/%s/stat", PROCFS, pid, td->d_name);
|
||||
+ if (!(f = fopen(path, "r")))
|
||||
@ -114,7 +114,7 @@ diff -up lsof_4.80-rh/dialects/linux/dproc.c.th lsof_4.80-rh/dialects/linux/dpro
|
||||
|
||||
/*
|
||||
* process_proc_map() - process the memory map of a process
|
||||
@@ -1259,12 +1333,6 @@ read_id_stat(ty, p, id, cmd, ppid, pgid)
|
||||
@@ -1250,12 +1324,6 @@ read_id_stat(ty, p, id, cmd, ppid, pgid)
|
||||
return(1);
|
||||
}
|
||||
/*
|
2
sources
2
sources
@ -1 +1 @@
|
||||
f5db1a8e2cb8337ed043ca68178955e6 lsof_4.80-rh.tar.bz2
|
||||
b5ef18418760dd304b223a4acb3e14d7 lsof_4.81-rh.tar.bz2
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script removes non-linux dialects from upstream source package before release.
|
||||
# There is a problem with copyrights for some UN*Xes ... also .. this script merges all
|
||||
# to the one normal tarball and rename all to lsof_X.XX-rh.
|
||||
# This script removes non-linux dialects from upstream source package before
|
||||
# release. There is a problem with copyrights for some UN*Xes ... also .. this
|
||||
# script merges all to the one normal tarball and rename all to lsof_X.XX-rh.
|
||||
#
|
||||
# Usage: ./upstream2downstream <usptream-tarball>
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user