From 447068c27c618ed8f3afa36f9592c89a369c677c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Jul 2020 06:11:56 -0400 Subject: [PATCH] import lsof-4.93.2-1.el8 --- .gitignore | 2 +- .lsof.metadata | 2 +- SOURCES/lsof-man-page-section.patch | 8 ++++---- SOURCES/lsof-tirpc.patch | 11 ----------- SOURCES/upstream2downstream.sh | 18 +++++++++--------- SPECS/lsof.spec | 22 ++++++++++++++-------- 6 files changed, 29 insertions(+), 34 deletions(-) delete mode 100644 SOURCES/lsof-tirpc.patch diff --git a/.gitignore b/.gitignore index dc300c6..7a234a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/lsof_4.91-rh.tar.xz +SOURCES/lsof-4.93.2-rh.tar.xz diff --git a/.lsof.metadata b/.lsof.metadata index 5ae5a66..3110b0d 100644 --- a/.lsof.metadata +++ b/.lsof.metadata @@ -1 +1 @@ -64d6df407d856466dd0a0b0d7feb49d8fd79ddc5 SOURCES/lsof_4.91-rh.tar.xz +fc65518ea135309e4426ab1f44eb97eefd95bc96 SOURCES/lsof-4.93.2-rh.tar.xz diff --git a/SOURCES/lsof-man-page-section.patch b/SOURCES/lsof-man-page-section.patch index 5faae78..861baec 100644 --- a/SOURCES/lsof-man-page-section.patch +++ b/SOURCES/lsof-man-page-section.patch @@ -1,8 +1,8 @@ -diff -upr lsof_4.89-rh.orig/lsof.8 lsof_4.89-rh/lsof.8 ---- lsof_4.89-rh.orig/lsof.8 2015-11-30 13:09:37.785075681 +0100 -+++ lsof_4.89-rh/lsof.8 2015-11-30 13:10:11.663029129 +0100 +diff -up ./Lsof.8.ori ./Lsof.8 +--- ./Lsof.8.ori 2019-05-28 15:32:49.945667234 +0200 ++++ ./Lsof.8 2019-05-28 15:33:06.182865931 +0200 @@ -1,5 +1,5 @@ - .ds VN 4.91 + .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, diff --git a/SOURCES/lsof-tirpc.patch b/SOURCES/lsof-tirpc.patch deleted file mode 100644 index efe343e..0000000 --- a/SOURCES/lsof-tirpc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- lsof_4.91-rh/Configure.orig 2018-05-22 15:54:57.275682247 +0200 -+++ lsof_4.91-rh/Configure 2018-05-22 15:55:22.314556548 +0200 -@@ -2945,7 +2945,7 @@ return(0); } - - # Test for . - -- if ! test -r ${LSOF_INCLUDE}/rpc/rpc.h # { -+ if ! test -r ${LSOF_INCLUDE}/tirpc/rpc/rpc.h # { - then - LSOF_CFGF="$LSOF_CFGF -DHASNORPC_H" - fi # } diff --git a/SOURCES/upstream2downstream.sh b/SOURCES/upstream2downstream.sh index 247ee29..0dd7b87 100755 --- a/SOURCES/upstream2downstream.sh +++ b/SOURCES/upstream2downstream.sh @@ -12,27 +12,27 @@ # UPSTREAM="$1" -NAME=$(basename $UPSTREAM .tar.bz2) +NAME=$(basename $UPSTREAM .tar.gz) MYPWD=$(pwd) TMP=$(mktemp -d) echo echo -n "Extracting upstream code..." -tar -jxf $UPSTREAM -C $TMP +tar -xf $UPSTREAM -C $TMP cd $TMP/$NAME -tar xf "$NAME"_src.tar -echo " done." - -echo -n "Moving files to downstream directory..." -mv "$NAME"_src/ "$NAME"-rh -mv README* 00* RELEASE* "$NAME"-rh echo " done." echo -n "Removing non-Linux dialects..." -rm -rf "$NAME"-rh/dialects/{aix,darwin,du,freebsd,hpux,n+obsd,n+os,osr,sun,uw} +rm -rf ./dialects/{aix,darwin,du,freebsd,hpux,n+obsd,n+os,osr,sun,uw} +echo " done." + +echo -n "Removing unused distribution scripts..." +rm -rf ./support echo " done." echo -n "Creating final downstream tarball..." +cd .. +mv $NAME $NAME-rh tar Jcf $MYPWD/"$NAME"-rh.tar.xz "$NAME"-rh echo " done." diff --git a/SPECS/lsof.spec b/SPECS/lsof.spec index d20ea82..edc47ac 100644 --- a/SPECS/lsof.spec +++ b/SPECS/lsof.spec @@ -1,12 +1,12 @@ Summary: A utility which lists open files on a Linux/UNIX system Name: lsof -Version: 4.91 -Release: 2%{?dist} +Version: 4.93.2 +Release: 1%{?dist} # Sendmail .. lib/snpf.c # LGPLv2+ .. lib/regex.c, regex.h License: zlib and Sendmail and LGPLv2+ Group: Development/Debuggers -URL: http://people.freebsd.org/~abe/ +URL: https://github.com/lsof-org/lsof # lsof contains licensed code that we cannot ship. Therefore we use # upstream2downstream.sh script to remove the code before shipping it. @@ -14,18 +14,17 @@ URL: http://people.freebsd.org/~abe/ # The script can be found in SCM or downloaded from: # http://pkgs.fedoraproject.org/cgit/lsof.git/tree/upstream2downstream.sh -%global lsofrh lsof_%{version}-rh +%global lsofrh lsof-%{version}-rh Source0: %{lsofrh}.tar.xz Source1: upstream2downstream.sh # BZ#1260300 - move lsof man page to section 1 Patch0: lsof-man-page-section.patch -# BZ#1574669 - glibc deprecated Sun RPC, use TIRPC instead -Patch1: lsof-tirpc.patch BuildRequires: gcc BuildRequires: libselinux-devel BuildRequires: libtirpc-devel +BuildRequires: groff-base %description Lsof stands for LiSt Open Files, and it does just that: it lists information @@ -34,17 +33,18 @@ about files that are open by the processes running on a UNIX system. %prep %setup -q -n %{lsofrh} %patch0 -p1 -b .man-page-section -%patch1 -p1 -b .tirpc %build ./Configure -n linux %make_build DEBUG="%{build_cflags} -I/usr/include/tirpc" CFGL="%{build_ldflags} -L./lib -llsof -lselinux -ltirpc" +# rebase to 4.93 introduced change in Lsof.8 with unhandled .so inclusion +soelim -r Lsof.8 > lsof.1 %install mkdir -p ${RPM_BUILD_ROOT}%{_bindir} install -p -m 0755 lsof ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 -install -p -m 0644 lsof.8 ${RPM_BUILD_ROOT}%{_mandir}/man1/lsof.1 +install -p -m 0644 lsof.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/lsof.1 %files %doc 00README 00CREDITS 00FAQ 00LSOF-L 00QUICKSTART @@ -52,6 +52,12 @@ install -p -m 0644 lsof.8 ${RPM_BUILD_ROOT}%{_mandir}/man1/lsof.1 %{_mandir}/man*/* %changelog +* Fri Apr 17 2020 Jan Rybar - 4.93.2-1 +- Rebase to lsof-4.93.2 +- Upstream moved to GitHub (original unreachable) and tarball structure changed +- Manpage patch needed to reflect the tarball changes +- Resolves: rhbz#1778228 + * Fri Jul 13 2018 Fedora Release Engineering - 4.91-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild