Fri, 11 Mar 2011 21:30:26 +0100
Import package vendor original specs for necessary manipulations.
1 %{!?_initddir:%define _initddir /etc/rc.d/init.d}
3 Name: rpcbind
4 Version: 0.2.0
5 Release: 8%{?dist}
6 Summary: Universal Addresses to RPC Program Number Mapper
7 Group: System Environment/Daemons
8 License: BSD
9 URL: http://nfsv4.bullopensource.org
11 BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
12 Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
13 Source1: rpcbind.init
15 Patch001: rpcbind-0.2.1-rc2.patch
17 #Patch100: rpcbind-0.2.0-usage-fix.patch
18 #Patch101: rpcbind-0.2.0-soreuseaddr-listner.patch
19 #Patch102: rpcbind-0.2.0-nofork.patch
21 Requires: glibc-common setup
22 Conflicts: man-pages < 2.43-12
23 BuildRequires: automake, autoconf, libtool
24 BuildRequires: libtirpc-devel, quota-devel, tcp_wrappers-devel
25 Requires(pre): /usr/sbin/groupadd /usr/sbin/groupdel
26 Requires(pre): /usr/sbin/useradd /usr/sbin/userdel
27 Requires(pre): coreutils
28 Requires(post): /sbin/chkconfig
29 Requires(post): /sbin/chkconfig
31 Provides: portmap = %{version}-%{release}
32 Obsoletes: portmap <= 4.0-65.3
34 %description
35 The rpcbind utility is a server that converts RPC program numbers into
36 universal addresses. It must be running on the host to be able to make
37 RPC calls on a server on that machine.
39 %prep
40 %setup -q
41 %patch001 -p1
43 %build
44 %ifarch s390 s390x
45 PIE="-fPIE"
46 %else
47 PIE="-fpie"
48 %endif
49 export PIE
51 RPCBUSR=rpc
52 RPCBDIR=/var/lib/rpcbind
53 CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
55 autoreconf -fisv
56 %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
57 --enable-warmstarts \
58 --with-statedir="$RPCBDIR" \
59 --with-rpcuser="$RPCBUSR" \
60 --enable-libwrap \
61 --enable-debug
63 make all
66 %install
67 rm -rf %{buildroot}
68 mkdir -p %{buildroot}/sbin
69 mkdir -p %{buildroot}/usr/sbin
70 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
71 mkdir -p %{buildroot}%{_mandir}/man8
72 mkdir -p %{buildroot}/var/lib/rpcbind
73 make DESTDIR=$RPM_BUILD_ROOT install
75 mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin
76 mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
77 install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initddir}/rpcbind
79 %clean
80 rm -rf %{buildroot}
82 %pre
84 # Check the validity of the rpc uid and gid.
85 # If they don't exist, create them
86 # If they exist but are the wrong value, remove them
87 # and recreate them with the correct value
88 # If they exist and are the correct value do nothing
89 rpcid=`getent passwd rpc | cut -d: -f 3`
90 if [ -n "$rpcid" -a "$rpcid" != "32" ]; then
91 /usr/sbin/userdel rpc 2> /dev/null || :
92 /usr/sbin/groupdel rpc 2> /dev/null || :
93 fi
94 if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
95 /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1
96 /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
97 -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
98 fi
99 %post
100 /sbin/chkconfig --add %{name}
102 %preun
103 if [ $1 -eq 0 ]; then
104 service rpcbind stop > /dev/null 2>&1
105 /sbin/chkconfig --del %{name}
106 /usr/sbin/userdel rpc 2>/dev/null || :
107 /usr/sbin/groupdel rpc 2>/dev/null || :
108 rm -rf /var/lib/rpcbind
109 fi
110 %postun
111 if [ "$1" -ge "1" ]; then
112 service rpcbind condrestart > /dev/null 2>&1
113 fi
115 %files
116 %defattr(-,root,root)
117 %doc AUTHORS ChangeLog README
118 /sbin/rpcbind
119 %{_sbindir}/rpcinfo
120 %{_mandir}/man8/*
121 %config %{_initddir}/rpcbind
123 %dir %attr(700,rpc,rpc) /var/lib/rpcbind
125 %changelog
126 * Tue Nov 30 2010 Steve Dickson <steved@redhat.com> - 0.2.0-8
127 - Updated to the latest upstream release: rpcbind-0.2.1-rc2
129 * Fri Jul 16 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.2.0-7
130 - correct license tag to BSD
132 * Tue Jul 13 2010 Steve Dickson <steved@redhat.com> - 0.2.0-6
133 - Made initscript LSB compliant (bz 614193)
134 - Added no fork patch
136 * Tue Jul 6 2010 Steve Dickson <steved@redhat.com> - 0.2.0-5
137 - Set SO_REUSEADDR on listening sockets (bz 597356)
139 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
140 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
142 * Mon Jul 06 2009 Adam Jackson <ajax@redhat.com> 0.2.0-3
143 - Requires(pre): coreutils for cut(1).
145 * Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2
146 - Fixed pre scriptle failure during upgrades (bz 507364)
147 - Corrected the usage info to match what the rpcbind man
148 page says. (bz 466332)
149 - Correct package issues (bz 503508)
151 * Fri May 29 2009 Steve Dickson <steved@redhat.com> - 0.2.0-1
152 - Updated to latest upstream release: 0.2.0
154 * Tue May 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.7-3
155 - Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems
157 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2
158 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
160 * Wed Nov 19 2008 Steve Dickson <steved@redhat.com> 0.1.7-1
161 - Update to latest upstream release: 0.1.7
163 * Tue Sep 30 2008 Steve Dickson <steved@redhat.com> 0.1.6-3
164 - Fixed a typo in the rpcbind.init script that stop warm starts
165 from happening with conrestarts
166 - Fixed scriptlet failure (bz 462533)
168 * Tue Sep 16 2008 Steve Dickson <steved@redhat.com> 0.1.6-2
169 - Added usptream patches 01 thru 03 that do:
170 * Introduce helpers for ipprot/netid mapping
171 * Change how we decide on the netids to use for portmap
172 * Simplify port live check in pmap_svc.c
174 * Wed Jul 9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1
175 - Updated to latest upstream release 0.1.6
177 * Wed Jul 2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5
178 - Fixed SYNOPSIS section in the rpcinfo man page (bz 453729)
180 * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4
181 - Removed the documentation about the non-existent
182 '-L' flag (bz 446915)
184 * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3
185 - Set password and service lookups to be local (bz 447092)
187 * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2
188 - rpcbind needs to downgrade to non-priviledgied group.
190 * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
191 - Updated to latest upstream release 0.1.5
193 * Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
194 - Fixed a warning in pmap_svc.c
195 - Cleaned up warmstarts so uid are longer needed, also
196 changed condrestarts to use warmstarts. (bz 428496)
198 * Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13
199 - Fixed connectivity with Mac OS clients by making sure handle_reply()
200 sets the correct fromlen in its recvfrom() call (bz 244492)
202 * Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12
203 - Changed is_loopback() and check_access() see if the calling
204 address is an address on a local interface, just not a loopback
205 address (bz 358621).
207 * Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11
208 - Reworked logic in initscript so the correct exit is
209 used when networking does not exist or is set up
210 incorrectly.
212 * Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10
213 - Corrected a typo in the initscript from previous
214 commit.
216 * Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9
217 - Fixed typo in Summary (bz 331811)
218 - Corrected init script (bz 247046)
220 * Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
221 - Fixed typo in init script (bz 248285)
222 - Added autoconf rules to turn on secure host checking
223 via libwrap. Also turned on host check by default (bz 248284)
224 - Changed init script to start service in runlevel 2 (bz 251568)
225 - Added a couple missing Requires(pre) (bz 247134)
227 * Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7
228 - Fixed condrestarts (bz 241332)
230 * Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6
231 - Fixed an ipv6 related segfault on startup (bz 240873)
233 * Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5
234 - Added dependency on setup which contains the correct
235 rpcbind /etc/service entry which in turns stops
236 rpcbind from haning when NIS is enabled. (bz 236865)
238 * Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
239 - change man-pages requires into a conflicts as we don't have to have
240 man-pages installed, but if we do, we need the newer version
242 * Fri Apr 6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3
243 - Fixed the Provides and Obsoletes statments to correctly
244 obsolete the portmap package.
245 * Tue Apr 3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
246 - Added dependency on glibc-common which allows the
247 rpcinfo command to be installed in the correct place.
248 - Added dependency on man-pages so the rpcinfo man
249 pages don't conflict.
250 - Added the creation of /var/lib/rpcbind which will be
251 used to store state files.
252 - Make rpcbind run with the 'rpc' uid/gid when it exists.
254 * Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
255 - Initial commit
256 - Spec reviewed (bz 228894)
257 - Added the Provides/Obsoletes which should
258 cause rpcbind to replace portmapper