]>
Commit | Line | Data |
---|---|---|
3c37f6c8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with rmtcalls # Remote Calls | |
67047356 | 4 | %bcond_without systemd # systemd |
3c37f6c8 | 5 | |
ab1fd8f8 | 6 | Summary: Universal addresses to RPC program number mapper |
b040aaa7 | 7 | Summary(pl.UTF-8): Demon odwzorowujący adresy uniwersalne na numery programów RPC |
ab1fd8f8 | 8 | Name: rpcbind |
7c844428 | 9 | Version: 1.2.6 |
08d09795 | 10 | Release: 2 |
9425805f | 11 | License: BSD |
ab1fd8f8 | 12 | Group: Daemons |
7c844428 JB |
13 | Source0: https://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 |
14 | # Source0-md5: 2d84ebbb7d6fb1fc3566d2d4b37f214b | |
ab1fd8f8 JR |
15 | Source1: %{name}.init |
16 | Source2: %{name}.sysconfig | |
04bc328c JR |
17 | Patch0: %{name}-libwrap.patch |
18 | Patch1: %{name}-syslog.patch | |
57474918 | 19 | Patch2: %{name}-sunrpc.patch |
6dcb5b58 | 20 | Patch3: %{name}-nss.h.patch |
743aa286 | 21 | Patch4: %{name}-systemd.patch |
91d7b714 | 22 | Patch6: %{name}-tcp-addrs.patch |
4f276cf9 AM |
23 | # http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php |
24 | URL: http://sourceforge.net/projects/rpcbind/ | |
9425805f | 25 | BuildRequires: autoconf >= 2.50 |
ab1fd8f8 | 26 | BuildRequires: automake |
8a22ccb4 | 27 | BuildRequires: libtirpc-devel >= 1:1.0.1 |
5cabda1b | 28 | BuildRequires: libtool |
ab1fd8f8 | 29 | BuildRequires: libwrap-devel |
9425805f | 30 | BuildRequires: pkgconfig |
7a5b9a75 | 31 | BuildRequires: rpmbuild(macros) >= 1.623 |
67047356 | 32 | %{?with_systemd:BuildRequires: systemd-devel} |
ab1fd8f8 | 33 | Requires(post,preun): /sbin/chkconfig |
9782f463 | 34 | Requires(post,preun,postun): systemd-units >= 38 |
ab1fd8f8 | 35 | Requires: /sbin/chkconfig |
2db5233f | 36 | Requires: rc-scripts >= 0.4.1.6 |
c84db1a4 | 37 | Requires: systemd-units >= 0.38 |
bad88060 | 38 | Provides: portmap = 8.0 |
ab1fd8f8 | 39 | Provides: user(rpc) |
7c844428 JB |
40 | Obsoletes: portmap < 6.1 |
41 | Obsoletes: rpcbind-systemd < 0.2.0-5 | |
b040aaa7 JB |
42 | Conflicts: clusternfs < 3.0-0.rc2.3 |
43 | Conflicts: flixengine < 8.0.8.2-1 | |
123d354b JR |
44 | Conflicts: nfs-utils < 1.1.0-0.rc2.1 |
45 | Conflicts: quota-rquotad < 1:3.14-4 | |
ab1fd8f8 JR |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
49 | The rpcbind utility is a server that converts RPC program numbers into | |
b040aaa7 | 50 | universal addresses. It must be running on the host to be able to make |
ab1fd8f8 JR |
51 | RPC calls on a server on that machine. |
52 | ||
b040aaa7 JB |
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. | |
57 | ||
ab1fd8f8 JR |
58 | %prep |
59 | %setup -q | |
04bc328c JR |
60 | %patch0 -p1 |
61 | %patch1 -p1 | |
57474918 | 62 | %patch2 -p1 |
6dcb5b58 | 63 | %patch3 -p1 |
743aa286 | 64 | %patch4 -p1 |
b7843589 | 65 | %patch6 -p1 |
ab1fd8f8 JR |
66 | |
67 | %build | |
5cabda1b | 68 | %{__libtoolize} |
ab1fd8f8 | 69 | %{__aclocal} |
b49db8b2 | 70 | %{__autoconf} |
ab1fd8f8 | 71 | %{__automake} |
b49db8b2 | 72 | %configure \ |
3c37f6c8 JB |
73 | --sbindir=/sbin \ |
74 | --bindir=%{_sbindir} \ | |
b49db8b2 | 75 | --enable-libwrap \ |
3c37f6c8 | 76 | %{?with_rmtcalls:--enable-rmtcalls} \ |
b49db8b2 JR |
77 | --enable-warmstarts \ |
78 | --with-statedir=/var/lib/rpcbind \ | |
b7843589 | 79 | --with-rpcuser=rpc \ |
67047356 | 80 | %if %{with systemd} |
743aa286 | 81 | --with-systemdsystemunitdir=%{systemdunitdir} |
67047356 MK |
82 | %else |
83 | --without-systemdsystemunitdir | |
84 | %endif | |
ab1fd8f8 JR |
85 | %{__make} |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
743aa286 | 89 | install -d $RPM_BUILD_ROOT{/sbin,%{_sbindir},/etc/{sysconfig,rc.d/init.d},/var/lib/rpcbind} |
ab1fd8f8 | 90 | |
743aa286 JB |
91 | %{__make} install \ |
92 | DESTDIR=$RPM_BUILD_ROOT | |
ab1fd8f8 | 93 | |
ab1fd8f8 JR |
94 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rpcbind |
95 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rpcbind | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %pre | |
101 | %useradd -u 22 -d /usr/share/empty -s /bin/false -c "Portmapper RPC User" -g nobody rpc | |
102 | ||
103 | %post | |
104 | /sbin/chkconfig --add rpcbind | |
105 | %service rpcbind restart | |
c84db1a4 | 106 | %systemd_post rpcbind.service |
ab1fd8f8 JR |
107 | |
108 | %postun | |
109 | if [ "$1" = "0" ]; then | |
110 | %userremove rpc | |
111 | fi | |
c84db1a4 | 112 | %systemd_reload |
ab1fd8f8 JR |
113 | |
114 | %preun | |
115 | if [ "$1" = "0" ]; then | |
116 | %service -q rpcbind stop | |
117 | /sbin/chkconfig --del rpcbind | |
118 | fi | |
7a5b9a75 JR |
119 | %systemd_preun rpcbind.service |
120 | ||
c84db1a4 | 121 | %triggerpostun -- %{name} < 0.2.0-5 |
7a5b9a75 JR |
122 | if [ -f /etc/sysconfig/rpcbind ]; then |
123 | . /etc/sysconfig/rpcbind | |
743aa286 JB |
124 | [ "$RPCBIND_VERBOSE" = "no" ] || RPCBIND_OPTIONS="-l" |
125 | [ "$RPCBIND_INSECURE" = "yes" ] && RPCBIND_OPTIONS="$RPCBIND_OPTIONS -i" | |
7a5b9a75 JR |
126 | for a in $RPCBIND_ADDRESSES ; do |
127 | RPCBIND_OPTIONS="$RPCBIND_OPTIONS -h $a" | |
128 | done | |
129 | [ -z "$RPCBIND_OPTIONS" ] && exit 0 | |
a5609ebb | 130 | %{__cp} -f /etc/sysconfig/rpcbind /etc/sysconfig/rpcbind.rpmsave |
8fdb0aee JR |
131 | echo >>/etc/sysconfig/rpcbind |
132 | echo "# Added by rpm trigger" >>/etc/sysconfig/rpcbind | |
7a5b9a75 JR |
133 | echo "RPCBIND_OPTIONS=\"$RPCBIND_OPTIONS\"" >> /etc/sysconfig/rpcbind |
134 | fi | |
c84db1a4 | 135 | %systemd_trigger rpcbind.service |
7a5b9a75 | 136 | |
ab1fd8f8 JR |
137 | %files |
138 | %defattr(644,root,root,755) | |
9425805f | 139 | %doc AUTHORS COPYING ChangeLog NEWS README |
ab1fd8f8 JR |
140 | %attr(754,root,root) /etc/rc.d/init.d/rpcbind |
141 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpcbind | |
9425805f JB |
142 | %attr(755,root,root) /sbin/rpcbind |
143 | %attr(755,root,root) %{_sbindir}/rpcinfo | |
144 | %{_mandir}/man8/rpcbind.8* | |
145 | %{_mandir}/man8/rpcinfo.8* | |
ab1fd8f8 | 146 | %dir %attr(700,rpc,root) %{_var}/lib/%{name} |
67047356 | 147 | %if %{with systemd} |
7a5b9a75 JR |
148 | %{systemdunitdir}/rpcbind.service |
149 | %{systemdunitdir}/rpcbind.socket | |
67047356 MK |
150 | %endif |
151 |