[12373] | 1 | %bcond_with systemd |
---|
| 2 | |
---|
[521] | 3 | %{!?_initddir:%define _initddir /etc/rc.d/init.d} |
---|
[12373] | 4 | %global rpcbind_user_group rpc |
---|
[521] | 5 | |
---|
[11953] | 6 | %define _unpackaged_files_terminate_build 1 |
---|
| 7 | |
---|
[521] | 8 | Name: rpcbind |
---|
[11953] | 9 | Version: 1.2.5 |
---|
[12373] | 10 | Release: 2%{?_dist_release}%{?with_systemd:.systemd} |
---|
[521] | 11 | Summary: Universal Addresses to RPC Program Number Mapper |
---|
| 12 | Group: System Environment/Daemons |
---|
[12373] | 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 14 | Vendor: Project Vine |
---|
| 15 | Distribution: Vine Linux |
---|
| 16 | |
---|
| 17 | License: BSD |
---|
[521] | 18 | URL: http://nfsv4.bullopensource.org |
---|
| 19 | Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2 |
---|
[12373] | 20 | Source1: rpcbind.init |
---|
| 21 | Source2: %{name}.sysconfig |
---|
[521] | 22 | |
---|
[12373] | 23 | Patch001: rpcbind-1.2.5-rpcinfo-bufoverflow.patch |
---|
[11953] | 24 | |
---|
[12373] | 25 | Patch100: rpcbind-0.2.3-systemd-envfile.patch |
---|
| 26 | Patch101: rpcbind-0.2.3-systemd-tmpfiles.patch |
---|
| 27 | Patch102: rpcbind-0.2.4-runstatdir.patch |
---|
| 28 | Patch103: rpcbind-0.2.4-systemd-service.patch |
---|
| 29 | Patch104: rpcbind-0.2.4-systemd-rundir.patch |
---|
| 30 | |
---|
[521] | 31 | Requires: glibc-common setup |
---|
| 32 | Conflicts: man-pages < 2.43-12 |
---|
| 33 | BuildRequires: automake, autoconf, libtool |
---|
| 34 | BuildRequires: libtirpc-devel |
---|
| 35 | BuildRequires: quota |
---|
| 36 | BuildRequires: tcp_wrappers |
---|
| 37 | #BuildRequires: quota-devel |
---|
| 38 | #BuildRequires: tcp_wrappers-devel |
---|
| 39 | Requires(pre): /usr/sbin/groupadd /usr/sbin/groupdel |
---|
| 40 | Requires(pre): /usr/sbin/useradd /usr/sbin/userdel |
---|
| 41 | Requires(pre): coreutils |
---|
[12373] | 42 | Requires(pre): shadow-utils |
---|
| 43 | %if %{with systemd} |
---|
| 44 | %global rpcbind_state_dir /run/rpcbind |
---|
| 45 | BuildRequires: systemd |
---|
| 46 | BuildRequires: systemd-devel |
---|
| 47 | %{?systemd_requires} |
---|
| 48 | Requires(postun): coreutils |
---|
| 49 | %else |
---|
| 50 | %global rpcbind_state_dir %{_sharedstatedir}/rpcbind |
---|
[521] | 51 | Requires(post): /sbin/chkconfig |
---|
[12373] | 52 | Requires(post): /sbin/service |
---|
| 53 | Requires(preun): /sbin/chkconfig |
---|
| 54 | Requires(preun): /sbin/service |
---|
| 55 | Requires(postun): /sbin/service |
---|
| 56 | %endif |
---|
[521] | 57 | |
---|
| 58 | #Provides: portmap = %{version}-%{release} |
---|
| 59 | Provides: portmap = 4.0-66%{_dist_release} |
---|
| 60 | Obsoletes: portmap <= 4.0-65.3 |
---|
| 61 | |
---|
| 62 | %description |
---|
| 63 | The rpcbind utility is a server that converts RPC program numbers into |
---|
| 64 | universal addresses. It must be running on the host to be able to make |
---|
| 65 | RPC calls on a server on that machine. |
---|
| 66 | |
---|
[12373] | 67 | |
---|
[521] | 68 | %prep |
---|
| 69 | %setup -q |
---|
[11953] | 70 | # 1637562 - rpcinfo: Fix stack buffer overflow |
---|
| 71 | %patch001 -p1 |
---|
[521] | 72 | |
---|
[12373] | 73 | %if %{with systemd} |
---|
| 74 | %patch100 -p1 |
---|
| 75 | %patch101 -p1 |
---|
| 76 | %patch102 -p1 |
---|
| 77 | %patch103 -p1 |
---|
| 78 | %patch104 -p1 |
---|
| 79 | %endif |
---|
| 80 | |
---|
| 81 | |
---|
[521] | 82 | %build |
---|
| 83 | %ifarch s390 s390x |
---|
| 84 | PIE="-fPIE" |
---|
| 85 | %else |
---|
| 86 | PIE="-fpie" |
---|
| 87 | %endif |
---|
| 88 | export PIE |
---|
| 89 | |
---|
| 90 | CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`" |
---|
| 91 | |
---|
| 92 | autoreconf -fisv |
---|
| 93 | %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \ |
---|
| 94 | --enable-warmstarts \ |
---|
[12373] | 95 | --with-statedir="%rpcbind_state_dir" \ |
---|
| 96 | --with-rpcuser="%rpcbind_user_group" \ |
---|
[11953] | 97 | --with-nss-modules="files altfiles" \ |
---|
[12373] | 98 | %if !%{with systemd} |
---|
[11953] | 99 | --with-systemdsystemunitdir=no \ |
---|
[12373] | 100 | %endif |
---|
[521] | 101 | --enable-debug |
---|
| 102 | |
---|
| 103 | make all |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | %install |
---|
| 107 | rm -rf %{buildroot} |
---|
| 108 | mkdir -p %{buildroot}/sbin |
---|
| 109 | mkdir -p %{buildroot}/usr/sbin |
---|
[11953] | 110 | mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
---|
[521] | 111 | mkdir -p %{buildroot}%{_mandir}/man8 |
---|
[12373] | 112 | mkdir -p %{buildroot}%{rpcbind_state_dir} |
---|
| 113 | %if %{with systemd} |
---|
| 114 | mkdir -p %{buildroot}%{_unitdir} |
---|
| 115 | mkdir -p %{buildroot}%{_tmpfilesdir} |
---|
| 116 | %else |
---|
| 117 | mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d |
---|
| 118 | install -m 755 %{SOURCE1} %{buildroot}%{_initddir}/rpcbind |
---|
| 119 | %endif |
---|
| 120 | |
---|
[11953] | 121 | make DESTDIR=$RPM_BUILD_ROOT install |
---|
[521] | 122 | |
---|
[11953] | 123 | install -m 644 %{SOURCE2} %{buildroot}/etc/sysconfig/rpcbind |
---|
[521] | 124 | |
---|
[11953] | 125 | mv %{buildroot}%{_sbindir}/rpcbind %{buildroot}/sbin/ |
---|
| 126 | mv %{buildroot}%{_bindir}/rpcinfo %{buildroot}%{_sbindir}/ |
---|
| 127 | |
---|
[12373] | 128 | %if %{with systemd} |
---|
| 129 | sed -i -e 's|/usr/sbin/|/sbin/|' %{buildroot}%{_unitdir}/rpcbind.service |
---|
| 130 | %endif |
---|
| 131 | |
---|
| 132 | |
---|
[521] | 133 | %clean |
---|
| 134 | rm -rf %{buildroot} |
---|
| 135 | |
---|
[12373] | 136 | |
---|
[521] | 137 | %pre |
---|
| 138 | |
---|
| 139 | # Check the validity of the rpc uid and gid. |
---|
| 140 | # If they don't exist, create them |
---|
| 141 | # If they exist but are the wrong value, remove them |
---|
| 142 | # and recreate them with the correct value |
---|
| 143 | # If they exist and are the correct value do nothing |
---|
| 144 | rpcid=`getent passwd rpc | cut -d: -f 3` |
---|
| 145 | if [ -n "$rpcid" -a "$rpcid" != "32" ]; then |
---|
| 146 | /usr/sbin/userdel rpc 2> /dev/null || : |
---|
| 147 | /usr/sbin/groupdel rpc 2> /dev/null || : |
---|
| 148 | fi |
---|
| 149 | if [ -z "$rpcid" -o "$rpcid" != "32" ]; then |
---|
| 150 | /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1 |
---|
| 151 | /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \ |
---|
| 152 | -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1 |
---|
| 153 | fi |
---|
[12373] | 154 | |
---|
[521] | 155 | %post |
---|
[12373] | 156 | %if %{with systemd} |
---|
| 157 | %systemd_post rpcbind.service rpcbind.socket |
---|
| 158 | %else |
---|
[521] | 159 | /sbin/chkconfig --add %{name} |
---|
[12373] | 160 | %endif |
---|
[521] | 161 | |
---|
| 162 | %preun |
---|
[12373] | 163 | %if %{with systemd} |
---|
| 164 | %systemd_preun rpcbind.service rpcbind.socket |
---|
| 165 | %else |
---|
| 166 | if [ $1 -eq 0 -o -x /bin/systemctl ]; then |
---|
[521] | 167 | service rpcbind stop > /dev/null 2>&1 |
---|
| 168 | /sbin/chkconfig --del %{name} |
---|
| 169 | /usr/sbin/userdel rpc 2>/dev/null || : |
---|
| 170 | /usr/sbin/groupdel rpc 2>/dev/null || : |
---|
| 171 | rm -rf /var/lib/rpcbind |
---|
| 172 | fi |
---|
[12373] | 173 | %endif |
---|
| 174 | |
---|
[521] | 175 | %postun |
---|
[12373] | 176 | %if %{with systemd} |
---|
| 177 | %systemd_postun_with_restart rpcbind.service rpcbind.socket |
---|
| 178 | %else |
---|
| 179 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
[521] | 180 | service rpcbind condrestart > /dev/null 2>&1 |
---|
| 181 | fi |
---|
[12373] | 182 | %endif |
---|
[521] | 183 | |
---|
| 184 | %files |
---|
| 185 | %defattr(-,root,root) |
---|
[12373] | 186 | %license COPYING |
---|
[521] | 187 | %doc AUTHORS ChangeLog README |
---|
| 188 | /sbin/rpcbind |
---|
| 189 | %{_sbindir}/rpcinfo |
---|
| 190 | %{_mandir}/man8/* |
---|
[12373] | 191 | %config(noreplace) /etc/sysconfig/rpcbind |
---|
| 192 | %if %{with systemd} |
---|
| 193 | %{_unitdir}/%{name}.service |
---|
| 194 | %{_unitdir}/%{name}.socket |
---|
| 195 | %{_tmpfilesdir}/%{name}.conf |
---|
| 196 | %else |
---|
[521] | 197 | %config %{_initddir}/rpcbind |
---|
[12373] | 198 | %endif |
---|
| 199 | %attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir} |
---|
[521] | 200 | |
---|
| 201 | |
---|
| 202 | %changelog |
---|
[12373] | 203 | * Tue Apr 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.2.5-2 |
---|
| 204 | - added systemd support (disabled as default). |
---|
| 205 | |
---|
[11953] | 206 | * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.2.5-1 |
---|
| 207 | - updated to 1.2.5. |
---|
| 208 | - added Patch001. |
---|
| 209 | |
---|
[9828] | 210 | * Mon Nov 23 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.2.1-1 |
---|
| 211 | - update to 0.2.1 |
---|
| 212 | - remove Patch100 |
---|
| 213 | |
---|
[8067] | 214 | * Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.2.0-6 |
---|
| 215 | - rebuild with VineSeed environment |
---|
| 216 | |
---|
[521] | 217 | * Sun Feb 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.2.0-5 |
---|
| 218 | - Initial build for Vine Linux |
---|
| 219 | |
---|
| 220 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4 |
---|
| 221 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
| 222 | |
---|
| 223 | * Mon Jul 06 2009 Adam Jackson <ajax@redhat.com> 0.2.0-3 |
---|
| 224 | - Requires(pre): coreutils for cut(1). |
---|
| 225 | |
---|
| 226 | * Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2 |
---|
| 227 | - Fixed pre scriptle failure during upgrades (bz 507364) |
---|
| 228 | - Corrected the usage info to match what the rpcbind man |
---|
| 229 | page says. (bz 466332) |
---|
| 230 | - Correct package issues (bz 503508) |
---|
| 231 | |
---|
| 232 | * Fri May 29 2009 Steve Dickson <steved@redhat.com> - 0.2.0-1 |
---|
| 233 | - Updated to latest upstream release: 0.2.0 |
---|
| 234 | |
---|
| 235 | * Tue May 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.7-3 |
---|
| 236 | - Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems |
---|
| 237 | |
---|
| 238 | * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2 |
---|
| 239 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
| 240 | |
---|
| 241 | * Wed Nov 19 2008 Steve Dickson <steved@redhat.com> 0.1.7-1 |
---|
| 242 | - Update to latest upstream release: 0.1.7 |
---|
| 243 | |
---|
| 244 | * Tue Sep 30 2008 Steve Dickson <steved@redhat.com> 0.1.6-3 |
---|
| 245 | - Fixed a typo in the rpcbind.init script that stop warm starts |
---|
| 246 | from happening with conrestarts |
---|
| 247 | - Fixed scriptlet failure (bz 462533) |
---|
| 248 | |
---|
| 249 | * Tue Sep 16 2008 Steve Dickson <steved@redhat.com> 0.1.6-2 |
---|
| 250 | - Added usptream patches 01 thru 03 that do: |
---|
| 251 | * Introduce helpers for ipprot/netid mapping |
---|
| 252 | * Change how we decide on the netids to use for portmap |
---|
| 253 | * Simplify port live check in pmap_svc.c |
---|
| 254 | |
---|
| 255 | * Wed Jul 9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1 |
---|
| 256 | - Updated to latest upstream release 0.1.6 |
---|
| 257 | |
---|
| 258 | * Wed Jul 2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5 |
---|
| 259 | - Fixed SYNOPSIS section in the rpcinfo man page (bz 453729) |
---|
| 260 | |
---|
| 261 | * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4 |
---|
| 262 | - Removed the documentation about the non-existent |
---|
| 263 | '-L' flag (bz 446915) |
---|
| 264 | |
---|
| 265 | * Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3 |
---|
| 266 | - Set password and service lookups to be local (bz 447092) |
---|
| 267 | |
---|
| 268 | * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2 |
---|
| 269 | - rpcbind needs to downgrade to non-priviledgied group. |
---|
| 270 | |
---|
| 271 | * Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1 |
---|
| 272 | - Updated to latest upstream release 0.1.5 |
---|
| 273 | |
---|
| 274 | * Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14 |
---|
| 275 | - Fixed a warning in pmap_svc.c |
---|
| 276 | - Cleaned up warmstarts so uid are longer needed, also |
---|
| 277 | changed condrestarts to use warmstarts. (bz 428496) |
---|
| 278 | |
---|
| 279 | * Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13 |
---|
| 280 | - Fixed connectivity with Mac OS clients by making sure handle_reply() |
---|
| 281 | sets the correct fromlen in its recvfrom() call (bz 244492) |
---|
| 282 | |
---|
| 283 | * Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12 |
---|
| 284 | - Changed is_loopback() and check_access() see if the calling |
---|
| 285 | address is an address on a local interface, just not a loopback |
---|
| 286 | address (bz 358621). |
---|
| 287 | |
---|
| 288 | * Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11 |
---|
| 289 | - Reworked logic in initscript so the correct exit is |
---|
| 290 | used when networking does not exist or is set up |
---|
| 291 | incorrectly. |
---|
| 292 | |
---|
| 293 | * Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10 |
---|
| 294 | - Corrected a typo in the initscript from previous |
---|
| 295 | commit. |
---|
| 296 | |
---|
| 297 | * Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9 |
---|
| 298 | - Fixed typo in Summary (bz 331811) |
---|
| 299 | - Corrected init script (bz 247046) |
---|
| 300 | |
---|
| 301 | * Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8 |
---|
| 302 | - Fixed typo in init script (bz 248285) |
---|
| 303 | - Added autoconf rules to turn on secure host checking |
---|
| 304 | via libwrap. Also turned on host check by default (bz 248284) |
---|
| 305 | - Changed init script to start service in runlevel 2 (bz 251568) |
---|
| 306 | - Added a couple missing Requires(pre) (bz 247134) |
---|
| 307 | |
---|
| 308 | * Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7 |
---|
| 309 | - Fixed condrestarts (bz 241332) |
---|
| 310 | |
---|
| 311 | * Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6 |
---|
| 312 | - Fixed an ipv6 related segfault on startup (bz 240873) |
---|
| 313 | |
---|
| 314 | * Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5 |
---|
| 315 | - Added dependency on setup which contains the correct |
---|
| 316 | rpcbind /etc/service entry which in turns stops |
---|
| 317 | rpcbind from haning when NIS is enabled. (bz 236865) |
---|
| 318 | |
---|
| 319 | * Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4 |
---|
| 320 | - change man-pages requires into a conflicts as we don't have to have |
---|
| 321 | man-pages installed, but if we do, we need the newer version |
---|
| 322 | |
---|
| 323 | * Fri Apr 6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3 |
---|
| 324 | - Fixed the Provides and Obsoletes statments to correctly |
---|
| 325 | obsolete the portmap package. |
---|
| 326 | * Tue Apr 3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2 |
---|
| 327 | - Added dependency on glibc-common which allows the |
---|
| 328 | rpcinfo command to be installed in the correct place. |
---|
| 329 | - Added dependency on man-pages so the rpcinfo man |
---|
| 330 | pages don't conflict. |
---|
| 331 | - Added the creation of /var/lib/rpcbind which will be |
---|
| 332 | used to store state files. |
---|
| 333 | - Make rpcbind run with the 'rpc' uid/gid when it exists. |
---|
| 334 | |
---|
| 335 | * Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1 |
---|
| 336 | - Initial commit |
---|
| 337 | - Spec reviewed (bz 228894) |
---|
| 338 | - Added the Provides/Obsoletes which should |
---|
| 339 | cause rpcbind to replace portmapper |
---|