rpcbind/rpcbind.spec

Fri, 11 Mar 2011 21:30:26 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 11 Mar 2011 21:30:26 +0100
changeset 0
4f133201e207
child 1
4667f24fe848
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

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

mercurial