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
|
|
|
#
|
2020-03-09 11:56:01 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
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.
|
|
|
|
|
2019-06-13 15:16:58 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-08-25 04:58:08 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-11-24 11:22:37 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
2018-02-20 03:09:11 +01:00
|
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
2017-11-24 11:22:37 +01:00
|
|
|
%endif
|
2008-08-25 04:58:08 +02:00
|
|
|
Name: rpcbind
|
2018-11-07 08:44:47 +01:00
|
|
|
Version: 1.2.5
|
2012-04-23 23:00:10 +02:00
|
|
|
Release: 0
|
2008-08-25 04:58:08 +02:00
|
|
|
Summary: Transport independent RPC portmapper
|
2018-02-20 03:09:11 +01:00
|
|
|
# Git-Web: http://git.linux-nfs.org/?p=steved/rpcbind.git;a=summary
|
2013-05-06 14:57:11 +02:00
|
|
|
License: BSD-4-Clause
|
2012-04-23 23:00:10 +02:00
|
|
|
Group: Productivity/Networking/System
|
2018-06-05 02:29:55 +02:00
|
|
|
URL: http://rpcbind.sourceforge.net
|
2018-02-20 03:09:11 +01:00
|
|
|
Source: https://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
|
2008-08-25 04:58:08 +02:00
|
|
|
Source2: sysconfig.rpcbind
|
2008-12-01 18:07:56 +01:00
|
|
|
Source4: pmap_set.c
|
2020-03-09 11:56:01 +01:00
|
|
|
Source5: rpc-user.conf
|
2014-12-12 19:57:32 +01:00
|
|
|
Patch1: 0001-systemd-unit-files.patch
|
2019-06-13 15:16:58 +02:00
|
|
|
Patch2: 0001-change-lockingdir-to-run.patch
|
2016-02-22 16:04:42 +01:00
|
|
|
Patch31: 0031-rpcbind-manpage.patch
|
2018-02-20 03:09:11 +01:00
|
|
|
BuildRequires: libtirpc-devel >= 1.0.1
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: pkgconfig
|
2020-03-09 11:56:01 +01:00
|
|
|
BuildRequires: sysuser-shadow
|
|
|
|
BuildRequires: sysuser-tools
|
2018-02-20 03:09:11 +01:00
|
|
|
BuildRequires: tcpd-devel
|
|
|
|
BuildRequires: pkgconfig(libsystemd)
|
2018-06-05 02:29:55 +02:00
|
|
|
Requires(post): %fillup_prereq
|
2013-05-14 07:21:13 +02:00
|
|
|
Provides: portmap
|
2020-03-09 11:56:01 +01:00
|
|
|
%{?systemd_ordering}
|
2018-02-20 03:09:11 +01:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
BuildRequires: libnsl-devel
|
|
|
|
%endif
|
2020-03-09 11:56:01 +01:00
|
|
|
%sysusers_requires
|
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
|
2019-06-13 15:16:58 +02:00
|
|
|
%patch2 -p1
|
2016-02-22 16:04:42 +01:00
|
|
|
%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
|
2018-02-20 03:09:11 +01:00
|
|
|
export CFLAGS="%{optflags} -fpie"
|
2012-01-19 10:20:35 +01:00
|
|
|
export LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
|
|
|
%configure \
|
2018-11-07 08:44:47 +01:00
|
|
|
--bindir=/bin \
|
|
|
|
--sbindir=/sbin \
|
2008-08-25 04:58:08 +02:00
|
|
|
--enable-libwrap \
|
|
|
|
--enable-warmstarts \
|
2014-11-15 08:13:39 +01:00
|
|
|
--disable-debug \
|
2018-02-20 03:09:11 +01:00
|
|
|
--with-statedir=%{_rundir}/%{name} \
|
2016-06-09 17:36:14 +02:00
|
|
|
--with-rpcuser=rpc \
|
|
|
|
--with-systemdsystemunitdir=%{_unitdir}
|
2012-01-19 10:20:35 +01:00
|
|
|
|
2018-02-20 03:09:11 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
gcc -I/usr/include/tirpc -pie -fpie -fwhole-program -Wl,-z,relro,-z,now %{optflags} pmap_set.c -o pmap_set -ltirpc
|
2020-03-09 11:56:01 +01:00
|
|
|
%sysusers_generate_pre %{SOURCE5} rpc
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%install
|
2018-02-20 03:09:11 +01:00
|
|
|
%make_install
|
2008-08-25 04:58:08 +02:00
|
|
|
# fillup template
|
2018-02-20 03:09:11 +01:00
|
|
|
mkdir -p %{buildroot}%{_fillupdir}
|
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/
|
2020-03-09 11:56:01 +01:00
|
|
|
# sysusers.d config
|
|
|
|
mkdir -p %{buildroot}%{_sysusersdir}
|
|
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysusersdir}/
|
2008-12-01 18:07:56 +01:00
|
|
|
#
|
2018-02-20 03:09:11 +01:00
|
|
|
install -m 755 pmap_set %{buildroot}/sbin/pmap_set2
|
2014-02-14 15:17:03 +01:00
|
|
|
# create symlink for rcrpcbind
|
2018-11-07 08:44:47 +01:00
|
|
|
mkdir -p %{buildroot}/%{_sbindir}
|
|
|
|
ln -s service %{buildroot}/%{_sbindir}/rc%{name}
|
|
|
|
ln -s /bin/rpcinfo %{buildroot}/sbin/rpcinfo
|
2008-08-25 04:58:08 +02:00
|
|
|
|
2020-03-09 11:56:01 +01:00
|
|
|
%pre -f rpc.pre
|
2012-01-19 10:20:35 +01:00
|
|
|
%service_add_pre %{name}.service %{name}.socket
|
2008-11-07 15:47:39 +01:00
|
|
|
|
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}
|
2019-06-13 15:16:58 +02:00
|
|
|
%service_add_post %{name}.socket %{name}.service
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%postun
|
2019-06-13 15:16:58 +02:00
|
|
|
%service_del_postun %{name}.socket %{name}.service
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%files
|
2018-03-27 12:10:41 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS README
|
2008-12-02 00:41:06 +01:00
|
|
|
/sbin/pmap_set2
|
2018-02-20 03:09:11 +01:00
|
|
|
/sbin/%{name}
|
2018-11-07 08:44:47 +01:00
|
|
|
/bin/rpcinfo
|
2008-08-25 04:58:08 +02:00
|
|
|
/sbin/rpcinfo
|
2018-02-20 03:09:11 +01:00
|
|
|
%{_sbindir}/rc%{name}
|
2010-11-20 12:21:55 +01:00
|
|
|
%{_mandir}/*/*
|
2018-02-20 03:09:11 +01:00
|
|
|
%{_fillupdir}/sysconfig.%{name}
|
2020-03-09 11:56:01 +01:00
|
|
|
%{_sysusersdir}/rpc-user.conf
|
2012-01-19 10:20:35 +01:00
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%{_unitdir}/%{name}.socket
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%changelog
|