# # spec file for package lsof # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: lsof Version: 4.84 Release: 18.1 AutoReqProv: on Group: System/Monitoring License: Zlib Url: http://people.freebsd.org/~abe/ Summary: A Program That Lists Information about Files Opened by Processes # Always repack the source to remove legally problematic files - bnc#705143 # dialects/uw/uw7/sys/fs/{fifonode.h,namenode.h,README} Source: %{name}_%{version}_src_repacked.tar.bz2 Patch0: %{name}_4.81-include.patch Patch1: %{name}_4.81-fmt.patch Patch2: lsof-no-build-date-etc.patch Patch3: %{name}_4.81-perl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?sles_version} < 10 || 0%{?sles_version} > 10 #BuildRequires: libselinux-devel %endif BuildArch: i486 %description Lsof lists information about files opened by processes. An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream, or a network file (Internet socket, NFS file, or UNIX domain socket.) A specific file or all the files in a file system may be selected by path. Authors: -------- Victor A. Abell %prep %setup -q -n %{name}_%{version}_src %patch0 %patch1 %patch2 %patch3 %build ./Configure -n linux make %{?_smp_mflags} DEBUG="$RPM_OPT_FLAGS -Wall -Wno-unused" cd tests chmod u+w TestDB ./Add2TestDB make DEBUG="$RPM_OPT_FLAGS -Wall -Wno-unused" %install install -m755 -d $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_mandir}/man8 install -m755 lsof $RPM_BUILD_ROOT%{_bindir} install -m644 lsof.8 $RPM_BUILD_ROOT%{_mandir}/man8 mkdir SuSE_docs for s in 00* ; do mv $s SuSE_docs/${s#00} done %__sed -i -e "s|/usr/local/bin/perl|/usr/bin/perl|g" scripts/* mv scripts/00MANIFEST scripts/MANIFEST mv scripts/00README scripts/README %clean %{?buildroot:%__rm -rf "%{buildroot}"} %files %defattr(-, root, root) %doc SuSE_docs/* scripts %doc %{_mandir}/man8/lsof.8%{ext_man} %{_bindir}/lsof %changelog * Mon Mar 26 2012 cfarrell@suse.com - license update: Zlib lsof license is most similar to Zlib (also use SPDX format) * Tue Aug 16 2011 puzel@novell.com - repack the tarball to remove legally problematic files (bnc#705143) * Mon Jun 27 2011 ro@suse.de - change perl reference to /usr/bin/perl which actually exists * Thu Jun 9 2011 k0da@opensuse.org - perl4 refference causes missing perl4 dependency * Wed Jan 12 2011 puzel@novell.com - portability fixes (by Pascal) * Sun Aug 29 2010 cristian.rodriguez@opensuse.org - Do not include build host specific information including date and compilation time to make build-compare happy * Tue Aug 17 2010 puzel@novell.com - update to lsof 4.84 * corrects a man page nroff command error * recognizes FreeBSD 7.3 * adds improved task support, initially for Linux * Fri Apr 9 2010 puzel@novell.com - update to lsof 4.83 * corrects an over-zealous test that causes lsof to produce no ouput when the HASSECURITY and HASNOSOCKSECURITTY have been specified at lsof build time * fixes a typo with the LINUX_HASSELUNIX Configure variable * accepts LSOF_RANLIB from the environment * added Linux test for __UCLIBC__ * Fri Feb 19 2010 coolo@novell.com - fix 64bit issue (gcc 4.5) * Sun Dec 20 2009 jengelh@medozas.de - enable parallel build * Mon Jan 19 2009 prusnak@suse.cz - updated to 4.81 * Updated the Darwin libproc sources with changes from Allan Nathanson . Tested them on a iMac mini, provided by Apple Inc. * Changed dummy declarations in library source files to eliminate complaints about unused variables and empty object files. This change may not work on dialects I can no longer test; it has been tested on some versions of AIX, Darwin, FreeBSD, Linux and Solaris. * At the request of Hal Brooks added support for Linux /proc/net/packet files. Hal tested it. * Added socket file only performance enhancements to Linux and PSTAT-based HPUX lsof. * Added htonl call around improper usage of INADDR_LOOPBACK; report from an Apple engineer forwarded by Allan Nathanson . * Adjusted for FreeBSD-8.0 change in device number handling. The adjustment should work for FreeBSD 5 and above, should the 8.0 change be propagated downward. The problem was reported by Pav Lucistnik . An updated test system was provided by Erwin Lansing . * Reduced AIX support to version 5.3, since test systems with older versions are no longer available to me. * At the request of Marjo F. Mercado and Phil Shin applied some speed improvements to lsof, particularly when the files of interest are /Internet files -- i.e., selected with lsof's - i" option. Added a two new options to assist the improvements: 1) "-c^" to tell lsof to exclude the named command(s); and 2) "-stcp|ud>:[^]state' to tell lsof to include in its reporting or exclude ('^') from its reporting Internet files in the named states (e.g., LISTEN, ^CLOSE_WAIT, IDLE, etc.) For the most part these changes apply only to AIX, Darwin, FreeBSD, PSTAT-based HP-UX, Linux and Solaris, since those are the only places I could test them. They are controlled by the HASTCPUDPSTATE definition in each dialect's machine.h header file. Marjo and Phil provided HP-UX 11.23 and 11.31 test systems. * Fixed a stat(2) problem on HP-UX 11.31 while testing the speed improvements. * Adjusted for kernel header file changes in FreeBSD 8.0-CURRENT. Larry Rosenman provided a test system. * Added a warning for Solaris systems where VxFS node info can't be obtained from the VxFS utility library. The warning was requested by Tom Matthews . * Corrected mishandling of file system path name arguments that have trailing slashes, except, of course, the root file system, "/". Allan Nathanson reported the bug. * Mon Sep 8 2008 prusnak@suse.cz - updated to 4.80 * Updated for a FreeBSD 7.0 and above byte level locking change. The problem was reported by Conrad J. Sabatier , who helped test the update. Wesley Shields provided an 8.0-CURRENT test system. * Propagated the FreeBSD 7.0 and above locking changes to FreeBSD 6.x, based on a report from Edwin Groothuis . * Added warnings for unsupported dialects or versions. * Added Linux support for the UDPLITE protocol. Eric Dumazet supplied a patch. * Added a missing quote to the Configure script's FreeBSD stanza. * Added a usage.o rule to the HP-UX PSTAT-based Makefile. I mistakenly deleted the rule at revision 4.79. The missing rule was reported by Kawaljeet Kaur who tested the corrected Makefile. * Wed Aug 20 2008 prusnak@suse.cz - enabled SELinux support [Fate#303662] * Tue Apr 22 2008 prusnak@suse.cz - updated to 4.79 * improved Linux /proc file stream reading speed * improved TCP, TCP6, UDP and UDP6 hashing by determining the hash bucket count from the /proc/net sockstat and sockstat6 files * fixed a Linux maps file processing bug that prevented path names from having an embedded colon * added support for the Linux 2.6.22 kernel's /proc//fdinfo files - i.e. file offset and flags * fixed a Linux UNIX socket memory leak * corrected a getpidcon() error message * insured that inode numbers are handled correctly for their unsigned long long type * improved SELinux handling * fixed a socket file identification problem * added the ability to format the repeat mode marker line * Thu Jul 26 2007 prusnak@suse.cz - update to 4.78 * simplified stat() and lstat() usage * avoid processing /proc//maps file entries with zero device and node numbers * enabled ZFS support * Fri Oct 20 2006 mjancar@suse.cz - update to 4.77 * lots of small bugfixes - drop lsof_4.76_src-return.diff (included upstream) * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Sun Jan 15 2006 schwab@suse.de - Don't strip binaries. * Wed Jan 11 2006 mjancar@suse.cz - update to 4.76 * Tue Aug 2 2005 mjancar@suse.cz - update to 4.75 * Mon Feb 7 2005 mjancar@suse.cz - update to 4.74 * Fri Aug 6 2004 mjancar@suse.cz - update to 4.72 * Mon Apr 19 2004 mjancar@suse.cz - add return to nonvoid functions * Thu Feb 26 2004 mjancar@suse.cz - uopdate to 4.70 * Wed Nov 5 2003 ro@suse.de - fix make test as non-root * Thu Oct 30 2003 mjancar@suse.cz - update to 4.69 - no root for build * Thu Jul 24 2003 mjancar@suse.cz - update to 4.68 - kill obsolete patches * lsof_4.67_src-unescape.diff * lsof_4.68_src-uninitialized.diff * Thu Jun 12 2003 mjancar@suse.cz - unescape paths from /proc/mounts (Bug #27321) - fix mising prototypes and uninitialized variables * Tue Apr 22 2003 vbobek@suse.cz - updated to version 4.67 * added the "+c " option to enable optional changing of the COMMAND column output maximum width * many other fixes * Mon Feb 17 2003 vbobek@suse.cz - updated to version 4.66 * Tue Dec 3 2002 jderfina@suse.cz - upgrade to version 4.65 * Thu Jul 11 2002 nadvornik@suse.cz - updated to 4.64 * Tue Mar 5 2002 nadvornik@suse.cz - fixed permissions of man page * Mon Nov 26 2001 nadvornik@suse.cz - update to 4.60: - adds an IP version selector to the -i parameters - adds better handling of IPv6 selectors - makes safer lsof's ending of its child process - adds options to affect -v output - added example scripts to documentation * Tue Aug 14 2001 nadvornik@suse.cz - update to 4.57 * Thu Mar 8 2001 nadvornik@suse.cz - update to 4.55 * Sun Dec 3 2000 smid@suse.cz - new version 4.52 * Wed Oct 4 2000 smid@suse.cz - new version 4.51 * Wed Apr 5 2000 smid@suse.cz - upgrade to 4.49 - BuildRoot added * Thu Jan 20 2000 aj@suse.de - /usr/man -> /usr/share/man * Thu Nov 4 1999 ro@suse.de - update to 4.46 * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Wed Sep 1 1999 ro@suse.de - update to 4.45 * Tue Mar 9 1999 ro@suse.de - force LSOF_VERS=22003 * Tue Mar 9 1999 ro@suse.de - use proc-base version for STABLE, now that we're 2.2-based * Fri Mar 5 1999 ro@suse.de - for BETA: use proc version - changed proc/dlsof.h to work with glibc-2.1 * Fri Feb 26 1999 florian@suse.de - add security patches * Thu Dec 10 1998 ro@suse.de - disabled proc-version in Configure * Thu Dec 10 1998 ro@suse.de - update to 4.38 - added rh-patch for kmem/dlsof.h - compile as 2.0 (kmem) version * Tue Sep 22 1998 ro@suse.de - update to 4.37 / for now only the proc version works with glibc but that needs a running 2.1 kernel !!!! * Wed Jun 24 1998 ro@suse.de - update to 4.31 using diff from jurix/source * Thu Oct 9 1997 florian@suse.de - update to version 4.16 * Wed Oct 8 1997 max@suse.de - changed to rpm format and eliminated Makefile.Linux * Mon Jul 7 1997 florian@suse.de - update to version 4.11 * Sat Apr 26 1997 florian@suse.de - add new package of lsof 4.05