3 %bcond_with rmtcalls # Remote Calls
4 %bcond_without systemd # systemd
6 Summary: Universal addresses to RPC program number mapper
7 Summary(pl.UTF-8): Demon odwzorowujący adresy uniwersalne na numery programów RPC
13 Source0: https://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
14 # Source0-md5: 2d84ebbb7d6fb1fc3566d2d4b37f214b
16 Source2: %{name}.sysconfig
17 Patch0: %{name}-libwrap.patch
18 Patch1: %{name}-syslog.patch
19 Patch2: %{name}-sunrpc.patch
20 Patch3: %{name}-nss.h.patch
21 Patch4: %{name}-systemd.patch
22 Patch6: %{name}-tcp-addrs.patch
23 # http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php
24 URL: http://sourceforge.net/projects/rpcbind/
25 BuildRequires: autoconf >= 2.50
26 BuildRequires: automake
27 BuildRequires: libtirpc-devel >= 1:1.0.1
28 BuildRequires: libtool
29 BuildRequires: libwrap-devel
30 BuildRequires: pkgconfig
31 BuildRequires: rpmbuild(macros) >= 1.623
32 %{?with_systemd:BuildRequires: systemd-devel}
33 Requires(post,preun): /sbin/chkconfig
34 Requires(post,preun,postun): systemd-units >= 38
35 Requires: /sbin/chkconfig
36 Requires: rc-scripts >= 0.4.1.6
37 Requires: systemd-units >= 0.38
38 Provides: portmap = 8.0
40 Obsoletes: portmap < 6.1
41 Obsoletes: rpcbind-systemd < 0.2.0-5
42 Conflicts: clusternfs < 3.0-0.rc2.3
43 Conflicts: flixengine < 8.0.8.2-1
44 Conflicts: nfs-utils < 1.1.0-0.rc2.1
45 Conflicts: quota-rquotad < 1:3.14-4
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 The rpcbind utility is a server that converts RPC program numbers into
50 universal addresses. It must be running on the host to be able to make
51 RPC calls on a server on that machine.
53 %description -l pl.UTF-8
54 Narzędzie rpcbind to serwer konwertujący numery programów RPC na
55 adresy uniwersalne. Musi działać na maszynie, aby można było wykonywać
56 wywołania RPC na serwerze na tej maszynie.
74 --bindir=%{_sbindir} \
76 %{?with_rmtcalls:--enable-rmtcalls} \
78 --with-statedir=/var/lib/rpcbind \
81 --with-systemdsystemunitdir=%{systemdunitdir}
83 --without-systemdsystemunitdir
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d},/var/lib/rpcbind}
92 DESTDIR=$RPM_BUILD_ROOT
94 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind
95 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind
98 rm -rf $RPM_BUILD_ROOT
101 %useradd -u 22 -d /usr/share/empty -s /bin/false -c "Portmapper RPC User" -g nobody rpc
104 /sbin/chkconfig --add rpcbind
105 %service rpcbind restart
106 %systemd_post rpcbind.service
109 if [ "$1" = "0" ]; then
115 if [ "$1" = "0" ]; then
116 %service -q rpcbind stop
117 /sbin/chkconfig --del rpcbind
119 %systemd_preun rpcbind.service
121 %triggerpostun -- %{name} < 0.2.0-5
122 if [ -f /etc/sysconfig/rpcbind ]; then
123 . /etc/sysconfig/rpcbind
124 [ "$RPCBIND_VERBOSE" = "no" ] || RPCBIND_OPTIONS="-l"
125 [ "$RPCBIND_INSECURE" = "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i"
126 for a in $RPCBIND_ADDRESSES ; do
127 RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a"
129 [ -z "$RPCBIND_OPTIONS" ] && exit 0
130 %{__cp} -f /etc/sysconfig/rpcbind /etc/sysconfig/rpcbind.rpmsave
131 echo >>/etc/sysconfig/rpcbind
132 echo "# Added by rpm trigger" >>/etc/sysconfig/rpcbind
133 echo "RPCBIND_OPTIONS=\"$RPCBIND_OPTIONS\"" >> /etc/sysconfig/rpcbind
135 %systemd_trigger rpcbind.service
138 %defattr(644,root,root,755)
139 %doc AUTHORS COPYING ChangeLog NEWS README
140 %attr(754,root,root) /etc/rc.d/init.d/rpcbind
141 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind
142 %attr(755,root,root) /sbin/rpcbind
143 %attr(755,root,root) %{_sbindir}/rpcinfo
144 %{_mandir}/man8/rpcbind.8*
145 %{_mandir}/man8/rpcinfo.8*
146 %dir %attr(700,rpc,root) %{_var}/lib/%{name}
148 %{systemdunitdir}/rpcbind.service
149 %{systemdunitdir}/rpcbind.socket