Rebase to lsof-4.93.2

Upstream moved to GitHub and tarball structure changed
Manpage patch needed to reflect the tarball changes
This commit is contained in:
Jan Rybar 2019-06-12 14:37:24 +02:00
parent 5c32991297
commit 3b359ddacc
5 changed files with 28 additions and 22 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/lsof_4.91-rh.tar.xz
/lsof-4.93.2-rh.tar.xz

View File

@ -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,

View File

@ -1,11 +1,11 @@
Summary: A utility which lists open files on a Linux/UNIX system
Name: lsof
Version: 4.91
Release: 3%{?dist}
Version: 4.93.2
Release: 1%{?dist}
# Sendmail .. lib/snpf.c
# LGPLv2+ .. lib/regex.c, regex.h
License: zlib and Sendmail and LGPLv2+
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.
@ -13,18 +13,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
@ -33,17 +32,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
@ -51,6 +51,11 @@ install -p -m 0644 lsof.8 ${RPM_BUILD_ROOT}%{_mandir}/man1/lsof.1
%{_mandir}/man*/*
%changelog
* Tue May 28 2019 Jan Rybar <jrybar@redhat.com> - 4.93.2-1
- Rebase to lsof-4.93.2
- Upstream moved to GitHub and tarball structure changed
- Manpage patch needed to reflect the tarball changes
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.91-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (lsof_4.91-rh.tar.xz) = c73037ef2b69ebb49ba4badc19508adafe0eff8216a4d7007aa084d8ba246cba4f5fd1d729a5e53fa2d55cb7f27dbaf340c72575b297e5ac331a1d547e986e70
SHA512 (lsof-4.93.2-rh.tar.xz) = 5bc7b42c7a270882c3d5288766c3e6c809b1264abff38072c1ece083635b745c0773ef5509c1a51d65bb998c9b1ea4e72889979aafd4a672aac5b81cbe71f1ff

View File

@ -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."