Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Jan Rybar
ff670891b8 Use tirpc library for rpc, use standard Fedora build flags
Resolves: #1574669, #1548552
2018-07-03 16:29:42 +02:00
2 changed files with 25 additions and 2 deletions

12
lsof-4.89-tirpc.patch Normal file
View file

@ -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 <rpc/rpc.h>.
- 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 # }

View file

@ -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 <jrybar@redhat.com> - 4.89-9
- use tirpc library for rpc
- resolves: #1574669
- Use standard Fedora build flags
- resolves: #1548552
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.89-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild