2008-08-25 04:58:08 +02:00
|
|
|
#
|
2011-02-18 13:42:02 +01:00
|
|
|
# spec file for package rpcbind
|
2008-08-25 04:58:08 +02:00
|
|
|
#
|
2016-02-22 16:04:42 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2008-08-25 04:58:08 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: rpcbind
|
2015-04-30 17:21:22 +02:00
|
|
|
Version: 0.2.3
|
2012-04-23 23:00:10 +02:00
|
|
|
Release: 0
|
2008-08-25 04:58:08 +02:00
|
|
|
Summary: Transport independent RPC portmapper
|
2013-05-06 14:57:11 +02:00
|
|
|
License: BSD-4-Clause
|
2012-04-23 23:00:10 +02:00
|
|
|
Group: Productivity/Networking/System
|
2014-01-30 15:01:34 +01:00
|
|
|
Url: git://git.infradead.org/users/steved/rpcbind.git
|
2012-01-19 10:20:35 +01:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2008-08-25 04:58:08 +02:00
|
|
|
Source2: sysconfig.rpcbind
|
|
|
|
Source3: rpcbind.xml
|
2008-12-01 18:07:56 +01:00
|
|
|
Source4: pmap_set.c
|
2008-08-25 04:58:08 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-11-27 08:53:03 +01:00
|
|
|
BuildRequires: libtirpc-devel >= 1.0.1
|
2011-11-26 08:26:01 +01:00
|
|
|
BuildRequires: libtool
|
2012-01-19 10:20:35 +01:00
|
|
|
BuildRequires: pkgconfig
|
2012-04-23 23:00:10 +02:00
|
|
|
BuildRequires: tcpd-devel
|
2014-06-06 12:05:32 +02:00
|
|
|
BuildRequires: pkgconfig(libsystemd-daemon)
|
2013-04-12 15:04:42 +02:00
|
|
|
PreReq: %fillup_prereq
|
2014-03-04 09:34:23 +01:00
|
|
|
Requires(pre): /usr/sbin/useradd
|
2014-12-12 19:57:32 +01:00
|
|
|
Patch1: 0001-systemd-unit-files.patch
|
2016-02-22 16:04:42 +01:00
|
|
|
Patch2: 0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
|
|
|
|
Patch3: 0003-Delete-the-unix-socket-only-if-we-have-created-it.patch
|
|
|
|
Patch4: 0004-Fix-memory-corruption-in-PMAP_CALLIT-code.patch
|
|
|
|
Patch5: 0005-security.c-removed-warning.patch
|
|
|
|
Patch6: 0006-don-t-use-svc_fdset.patch
|
2014-12-11 19:00:24 +01:00
|
|
|
Patch8: 0008-First-part-of-init_transport-refactoring.patch
|
|
|
|
Patch9: 0009-init_transport-move-the-registration-code-into-a-sep.patch
|
2014-12-12 19:57:32 +01:00
|
|
|
Patch10: 0010-Fix-the-behavior-when-specifying-the-h-option.patch
|
2014-12-11 19:00:24 +01:00
|
|
|
Patch11: 0011-Clean-up-the-way-we-handle-the-h-option-in-init_tran.patch
|
|
|
|
Patch14: 0014-When-using-systemd-redirect-syslog-calls-to-the-syst.patch
|
2016-02-22 16:04:42 +01:00
|
|
|
Patch30: 0030-systemd-fix-rmtcall.patch
|
|
|
|
Patch31: 0031-rpcbind-manpage.patch
|
2014-01-21 09:42:25 +01:00
|
|
|
|
2008-12-01 18:07:56 +01:00
|
|
|
%define statefile /var/lib/portmap.state
|
2012-01-19 10:20:35 +01:00
|
|
|
%{?systemd_requires}
|
2013-05-14 07:21:13 +02:00
|
|
|
Provides: portmap
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Rpcbind is a replacement for portmap. Whereas portmap supports only UDP
|
|
|
|
and TCP transports over INET (IPv4), rpcbind can be configured to work
|
|
|
|
on various transports supported by the TI-RPC. This includes TCP and
|
|
|
|
UDP over IPv6. Moreover, rpcbind provides additional functions in
|
|
|
|
regards to portmap.
|
|
|
|
|
|
|
|
%prep
|
2010-11-20 12:21:55 +01:00
|
|
|
%setup -q
|
2008-12-01 18:07:56 +01:00
|
|
|
cp %{SOURCE4} .
|
2012-04-23 23:00:10 +02:00
|
|
|
%patch1 -p1
|
2016-02-22 16:04:42 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
2014-12-11 19:00:24 +01:00
|
|
|
#%patch8 -p1
|
|
|
|
#%patch9 -p1
|
|
|
|
#%patch10 -p1
|
|
|
|
#%patch11 -p1
|
|
|
|
#%patch14 -p1
|
2016-02-22 16:04:42 +01:00
|
|
|
#%patch30 -p1
|
|
|
|
%patch31 -p1
|
2012-11-29 13:25:48 +01:00
|
|
|
|
2008-08-25 04:58:08 +02:00
|
|
|
%build
|
2012-01-19 10:20:35 +01:00
|
|
|
autoreconf -fiv
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS -fpie"
|
|
|
|
export LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
|
|
|
%configure \
|
2008-08-25 04:58:08 +02:00
|
|
|
--bindir=/sbin \
|
|
|
|
--enable-libwrap \
|
|
|
|
--enable-warmstarts \
|
2014-11-15 08:13:39 +01:00
|
|
|
--disable-debug \
|
2014-01-15 11:14:08 +01:00
|
|
|
--with-statedir=%{_localstatedir}/lib/rpcbind \
|
|
|
|
--with-rpcuser=rpc
|
2012-01-19 10:20:35 +01:00
|
|
|
|
2010-11-20 12:21:55 +01:00
|
|
|
%{__make} %{?jobs:-j%jobs}
|
2013-04-12 15:04:42 +02:00
|
|
|
%{__cc} -pie -fpie -fwhole-program -Wl,-z,relro,-z,now %{optflags} pmap_set.c -o pmap_set
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%_localstatedir/lib/rpcbind
|
|
|
|
# fillup template
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d
|
|
|
|
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d/
|
2008-12-01 18:07:56 +01:00
|
|
|
#
|
2008-12-02 00:41:06 +01:00
|
|
|
install -m 755 pmap_set $RPM_BUILD_ROOT/sbin/pmap_set2
|
2014-02-14 15:17:03 +01:00
|
|
|
# create symlink for rcrpcbind
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
|
|
|
ln -s /sbin/service $RPM_BUILD_ROOT%{_sbindir}/rcrpcbind
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2008-11-07 15:47:39 +01:00
|
|
|
%pre
|
2012-01-19 10:20:35 +01:00
|
|
|
%service_add_pre %{name}.service %{name}.socket
|
2008-11-07 15:47:39 +01:00
|
|
|
|
2014-01-15 11:14:08 +01:00
|
|
|
# Add "rpc" user
|
2014-03-04 19:37:47 +01:00
|
|
|
getent passwd rpc >/dev/null || /usr/sbin/useradd -r -g nogroup -d /var/lib/empty -s /sbin/nologin -c "user for rpcbind" rpc
|
2014-01-15 11:14:08 +01:00
|
|
|
exit 0
|
|
|
|
|
2008-08-25 04:58:08 +02:00
|
|
|
%preun
|
2012-01-19 10:20:35 +01:00
|
|
|
%service_del_preun %{name}.service %{name}.socket
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%post
|
2013-04-12 15:04:42 +02:00
|
|
|
%{fillup_only -n rpcbind}
|
2012-01-19 10:20:35 +01:00
|
|
|
%service_add_post %{name}.service %{name}.socket
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%postun
|
2012-01-19 10:20:35 +01:00
|
|
|
%service_del_postun %{name}.service %{name}.socket
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS ChangeLog COPYING NEWS README
|
2008-12-02 00:41:06 +01:00
|
|
|
/sbin/pmap_set2
|
2008-08-25 04:58:08 +02:00
|
|
|
/sbin/rpcbind
|
|
|
|
/sbin/rpcinfo
|
2014-02-14 15:17:03 +01:00
|
|
|
%{_sbindir}/rcrpcbind
|
2010-11-20 12:21:55 +01:00
|
|
|
%{_mandir}/*/*
|
2014-03-03 09:59:43 +01:00
|
|
|
%attr(-,rpc,root) %{_localstatedir}/lib/rpcbind
|
2008-08-25 04:58:08 +02:00
|
|
|
/var/adm/fillup-templates/sysconfig.rpcbind
|
|
|
|
%{_datadir}/omc/svcinfo.d/rpcbind.xml
|
2012-01-19 10:20:35 +01:00
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%{_unitdir}/%{name}.socket
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%changelog
|