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