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