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