File lsof.spec of Package lsof

#
# spec file for package lsof (Version 4.80)
#
# Copyright (c) 2008 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.80
Release:        1
AutoReqProv:    on
Group:          System/Monitoring
License:        BSD 3-Clause; Other uncritical OpenSource License
Url:            http://people.freebsd.org/~abe/
Summary:        A Program That Lists Information about Files Opened by Processes
Source:         %{name}_%{version}_src.tar.bz2
Patch0:         %{name}_%{version}_src-include.diff
Patch1:         %{name}_%{version}_src-fmt.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  libselinux-devel

%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 <abe@purdue.edu>

%prep
%setup -q -n %{name}_%{version}_src
%patch0
%patch1

%build
./Configure -n linux
make 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 
for s in scripts/* ; do
	sed -e "s|/usr/local/bin/perl|/usr/bin/perl|g" $s >$s.new
	mv -f $s.new $s
done
mv scripts/00MANIFEST scripts/MANIFEST
mv scripts/00README scripts/README

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc SuSE_docs/* scripts
%doc %{_mandir}/man?/*
%{_bindir}/*

%changelog
* Mon Sep 08 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
  <conrads@cox.net>, who helped test the update.  Wesley
  Shields <wxs@FreeBSD.org> 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
  <edwin@FreeBSD.org>.
  * Added warnings for unsupported dialects or versions.
  * Added Linux support for the UDPLITE protocol.  Eric
  Dumazet <dada1@cosmosbay.com> 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
  <kawaljeet.malviya@gmail.com> 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/<PID>/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/<PID>/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 02 2005 mjancar@suse.cz
- update to 4.75
* Mon Feb 07 2005 mjancar@suse.cz
- update to 4.74
* Fri Aug 06 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 05 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 <width>" 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 03 2002 jderfina@suse.cz
- upgrade to version 4.65
* Thu Jul 11 2002 nadvornik@suse.cz
- updated to 4.64
* Tue Mar 05 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 08 2001 nadvornik@suse.cz
- update to 4.55
* Sun Dec 03 2000 smid@suse.cz
- new version 4.52
* Wed Oct 04 2000 smid@suse.cz
- new version 4.51
* Wed Apr 05 2000 smid@suse.cz
- upgrade to 4.49
- BuildRoot added
* Thu Jan 20 2000 aj@suse.de
- /usr/man -> /usr/share/man
* Thu Nov 04 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 01 1999 ro@suse.de
- update to 4.45
* Tue Mar 09 1999 ro@suse.de
- force LSOF_VERS=22003
* Tue Mar 09 1999 ro@suse.de
- use proc-base version for STABLE, now that we're 2.2-based
* Fri Mar 05 1999 ro@suse.de
- for BETA: use proc version
- changed proc/dlsof.h to work with glibc-2.1
* Sat Feb 27 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 09 1997 florian@suse.de
- update to version 4.16
* Wed Oct 08 1997 max@suse.de
- changed to rpm format and eliminated Makefile.Linux
* Mon Jul 07 1997 florian@suse.de
- update to version 4.11
* Sat Apr 26 1997 florian@suse.de
- add new package of lsof 4.05
openSUSE Build Service is sponsored by