From ff670891b88e3a9639d5a12d5234d947189c1d08 Mon Sep 17 00:00:00 2001 From: Jan Rybar Date: Tue, 3 Jul 2018 16:29:42 +0200 Subject: [PATCH] Use tirpc library for rpc, use standard Fedora build flags Resolves: #1574669, #1548552 --- lsof-4.89-tirpc.patch | 12 ++++++++++++ lsof.spec | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 lsof-4.89-tirpc.patch diff --git a/lsof-4.89-tirpc.patch b/lsof-4.89-tirpc.patch new file mode 100644 index 0000000..d2820bc --- /dev/null +++ b/lsof-4.89-tirpc.patch @@ -0,0 +1,12 @@ +diff -up ./Configure.ori ./Configure +--- ./Configure.ori 2015-07-07 22:17:04.000000000 +0200 ++++ ./Configure 2018-07-03 16:05:05.333524438 +0200 +@@ -2892,7 +2892,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/lsof.spec b/lsof.spec index 387c3d3..d58d8cf 100644 --- a/lsof.spec +++ b/lsof.spec @@ -1,7 +1,7 @@ Summary: A utility which lists open files on a Linux/UNIX system Name: lsof Version: 4.89 -Release: 8%{?dist} +Release: 9%{?dist} # Sendmail .. lib/snpf.c # LGPLv2+ .. lib/regex.c, regex.h License: zlib and Sendmail and LGPLv2+ @@ -20,8 +20,12 @@ 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-4.89-tirpc.patch +BuildRequires: gcc BuildRequires: libselinux-devel +BuildRequires: libtirpc-devel %description Lsof stands for LiSt Open Files, and it does just that: it lists information @@ -30,10 +34,11 @@ 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 DEBUG="$RPM_OPT_FLAGS" %{?_smp_mflags} +%make_build DEBUG="%{build_cflags} -I/usr/include/tirpc" CFGL="%{build_ldflags} -L./lib -llsof -lselinux -ltirpc" %install mkdir -p ${RPM_BUILD_ROOT}%{_bindir} @@ -47,6 +52,12 @@ install -p -m 0644 lsof.8 ${RPM_BUILD_ROOT}%{_mandir}/man1/lsof.1 %{_mandir}/man*/* %changelog +* Tue Jul 03 2018 Jan Rybar - 4.89-9 +- use tirpc library for rpc +- resolves: #1574669 +- Use standard Fedora build flags +- resolves: #1548552 + * Thu Feb 08 2018 Fedora Release Engineering - 4.89-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild