diff --git a/lsof-4.99.3.tar.gz b/lsof-4.99.3.tar.gz deleted file mode 100644 index 7ed39a176acdf3a66b0114165a0f1a0148d7ba4c..0000000000000000000000000000000000000000 Binary files a/lsof-4.99.3.tar.gz and /dev/null differ diff --git a/lsof-4.99.4.tar.gz b/lsof-4.99.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6547d27bc225c72c4dc444e7b157512c9ca4525a Binary files /dev/null and b/lsof-4.99.4.tar.gz differ diff --git a/lsof-man-page-section.patch b/lsof-man-page-section.patch new file mode 100644 index 0000000000000000000000000000000000000000..47da3750705a155de12ba477f1ee4f8d62ece2d5 --- /dev/null +++ b/lsof-man-page-section.patch @@ -0,0 +1,10 @@ +diff -up ./Lsof.8.ori ./Lsof.8 +--- ./Lsof.8.ori 2022-09-20 19:46:03.560004892 +0200 ++++ ./Lsof.8 2022-09-20 19:46:17.578086787 +0200 +@@ -1,5 +1,5 @@ + .so ./version +-.TH LSOF 8 Revision-\*(VN ++.TH LSOF 1 Revision-\*(VN + .\" Register )P is used neither by this file nor any groff macro. However, + .\" some versions of nroff require it. + .if !\n(.g \{\ diff --git a/lsof.spec b/lsof.spec index 813c3c83fc853a8d15c6756675428099f34a272d..7640b37ed4dfc0bd9f31149f9ca87a05f277dea8 100644 --- a/lsof.spec +++ b/lsof.spec @@ -1,55 +1,74 @@ Name: lsof -Version: 4.99.3 -Release: 2 +Version: 4.99.4 +Release: 1 Summary: A tool for list open files License: Zlib and Sendmail and LGPL-2.0-or-later -URL: https://people.freebsd.org/~abe/ -Source0: https://github.com/lsof-org/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +URL: https://lsof.readthedocs.io/en/latest/ +Source0: https://github.com/lsof-org/lsof/releases/download/%{version}/%{name}-%{version}.tar.gz +Patch0: lsof-man-page-section.patch -BuildRequires: gcc libtirpc-devel libselinux-devel groff-base +BuildRequires: gcc make +BuildRequires: pkgconfig(libtirpc) +BuildRequires: libselinux-devel +BuildRequires: /usr/bin/soelim %description Lsof is a free, open-source, Unix administrative tool for displays information about files open to Unix processes. It runs on many Unix dialects. -%package help -Summary: Doc files for %{name} -BuildArch: noarch -Requires: man +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} -%description help -The %{name}-help package contains doc files for %{name}. +%description devel +The %{name}-devel package contains libraries and header files for %{name}. + +%package_help %prep %autosetup -n %{name}-%{version} -p1 %build -LSOF_CC=%{__cc} ./Configure -n linux -%make_build DEBUG="%{build_cflags} -I/usr/include/tirpc" CFGL="%{build_ldflags} -L./lib -llsof -lselinux -ltirpc" -soelim -r Lsof.8 > lsof.1 +%configure --disable-static \ + --enable-security \ + --enable-no-sock-security +%make_build + +# rebase to 4.93 introduced change in Lsof.8 with unhandled .so inclusion +/usr/bin/soelim -r Lsof.8 > lsof.1 %install -mkdir -p %{buildroot}/%{_bindir} -install -p -m 0755 lsof %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{_mandir}/man1 -install -p -m 0644 lsof.1 %{buildroot}/%{_mandir}/man1/lsof.1 +%make_install + +install -m 0644 lsof.1 -D %{buildroot}%{_mandir}/man1/lsof.1 +rm -rf %{buildroot}%{_mandir}/man8/lsof.8* %check -pushd tests -chmod u+w TestDB -./Add2TestDB -make test %{?_smp_mflags} DEBUG="%{optflags} -Wall -Wno-unused" -popd +%make_build check %files +%license COPYING %doc 00CREDITS %{_bindir}/%{name} +%{_libdir}/lib%{name}.so.* + +%files devel +%{_libdir}/lib%{name}.so +%{_includedir}/*.h %files help %doc 00README 00FAQ 00LSOF-L 00QUICKSTART %{_mandir}/man*/* %changelog +* Wed Nov 20 2024 Funda Wang - 4.99.4-1 +- update version to 4.99.4 +- switch to autotools based build system per suggested by upstream +- new devel sub package, due to switching to autotools +- add two security-related build switches from archlinux: + - only allow root to list all open files + - allow anyone to list anyone else's socket files + * Thu Feb 22 2024 luofng -4.99.3-2 - Type: enhencement - CVE:NA diff --git a/lsof.yaml b/lsof.yaml index 44ff85dfada714dfc4d4fe449f6ab8aab33ab273..a202cde3ff9aaf382c8732771a9b3c4878f3db7a 100644 --- a/lsof.yaml +++ b/lsof.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: lsof-org/lsof tag_prefix: -seperator: +separator: .