%define initdir /etc/rc.d/init.d Summary: A program which manages RPC connections. Name: portmap Version: 4.0 Release: 63%{?_dist_release} Group: System Environment/Daemons License: BSD Source0: ftp://coast.cs.purdue.edu/pub/tools/unix/portmap/portmap_4.tar.gz Source1: portmap.init Source2: pmap_set.8 Source3: pmap_dump.8 Source4: portmap.8 Patch0: portmap-4.0-linux.patch Patch1: portmap-malloc.patch Patch2: portmap-4.0-cleanup.patch Patch3: portmap-4.0-rpc_user.patch Patch4: portmap-4.0-sigpipe.patch Patch5: portmap-4.0-errno.patch Patch6: portmap-4.0-pie.patch Patch7: portmap-4.0-loopback.patch Source101: portmap.init.vine #Prereq: /sbin/chkconfig /etc/init.d Prereq: /sbin/chkconfig BuildRoot: %{_tmppath}/%{name}-%{version}-root #Requires: initscripts >= 5.54 BuildRequires: tcp_wrappers %description The portmapper program is a security tool which prevents theft of NIS (YP), NFS and other sensitive information via the portmapper. A portmapper manages RPC connections, which are used by protocols like NFS and NIS. The portmap package should be installed on any machine which acts as a server for protocols using RPC. %prep %setup -q -n portmap_4 %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 -b .rpcuser %patch4 -p1 -b .sigpipe %patch5 -p1 -b .errno %patch6 -p1 -b .pie %patch7 -p1 -b .lo %build make FACILITY=LOG_AUTH ZOMBIES='-DIGNORE_SIGCHLD -Dlint' LIBS="-Wl,-Bstatic -lwrap -Wl,-Bdynamic -lnsl" RPM_OPT_FLAGS="$RPM_OPT_FLAGS" AUX="" %install rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}/sbin install -m 755 -s portmap ${RPM_BUILD_ROOT}/sbin mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} install -m 755 -s pmap_set ${RPM_BUILD_ROOT}%{_sbindir} install -m 755 -s pmap_dump ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 install -m 644 $RPM_SOURCE_DIR/pmap_set.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 install -m 644 $RPM_SOURCE_DIR/pmap_dump.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 install -m 644 $RPM_SOURCE_DIR/portmap.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 mkdir -p $RPM_BUILD_ROOT%{initdir} #install -m 755 $RPM_SOURCE_DIR/portmap.init ${RPM_BUILD_ROOT}%{initdir}/portmap install -m 755 $RPM_SOURCE_DIR/portmap.init.vine ${RPM_BUILD_ROOT}%{initdir}/portmap %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add portmap /usr/sbin/groupadd -g 32 rpc > /dev/null 2>&1 /usr/sbin/useradd -c "Portmapper RPC user" -d / -g 32 -M -s /bin/false -u 32 rpc > /dev/null 2>&1 exit 0 %triggerpostun -- portmap <= portmap-4.0-22 /sbin/chkconfig --add portmap %preun if [ $1 = 0 ] ; then service portmap stop > /dev/null 2>&1 /sbin/chkconfig --del portmap fi %postun if [ "$1" -ge "1" ]; then service portmap condrestart > /dev/null 2>&1 fi %files %defattr(-,root,root) %doc README CHANGES BLURB /sbin/portmap %{_sbindir}/pmap_dump %{_sbindir}/pmap_set %{_mandir}/man8/* %config %{initdir}/portmap %changelog * Fri Aug 15 2008 Shu KONNO 4.0-63vl5 - applied new versioning policy, spec in utf-8 * Sun Nov 05 2006 Daisuke SUZUKI 4.0-63vl2 - rebuilt * Thu Nov 18 2004 Ryoichi INAGAKI 4.0-63vl1 - added Patches from Fedora development * Thu Aug 12 2004 Steve Dickson - Added the -l argument that allows only loopback bindings. * Thu Feb 12 2004 Thomas Woerner 4.0-58 - added PIE patch from Ulrich Drepper - added BuildRequires: tcp_wrappers * Fri Sep 19 2003 Ryoichi INAGAKI 4.0-56vl1 - rebuild with new toolchains - s/Copyright/License/ - added Patch from Rawhide 4.0-56.1 * Fri Dec 13 2002 Daniel J Walsh 4.0-51 - Replace extern int errno with include * Thu Dec 12 2002 Daniel J Walsh 4.0-50 - Change spec file to stop building auxilliary files - Fix Makefile to build correctly on x86-64 - Fix strerror.c to build correctly on x86-64 * Thu Aug 16 2001 - 4.0-38vl1: install portmap.init w/o i18n support for Vine * Sun Jun 24 2001 Elliot Lee - Bump release + rebuild. * Sun Apr 29 2001 Bill Nottingham - fix condrestart * Fri Apr 20 2001 Trond Eivind Glomsr藷? - Remove "¥n" from echo statement (#36721) * Wed Feb 28 2001 Trond Eivind Glomsr藷? - clear group memberships (#23195) * Sun Feb 11 2001 Trond Eivind Glomsr藷? - don't die on SIGPIPE (#21748) - Fix condrestart so it maintains portmap state * Wed Feb 7 2001 Trond Eivind Glomsr藷? - improve i18n * Wed Jan 24 2001 Matt Wilson - new style i18n init script * Fri Jan 19 2001 Trond Eivind Glomsr藷? - fix manpage (#13218) - gettextize - exit if /etc/sysconfig/network doesn't exist and make sure it works when networking is off (#23757) * Tue Jan 2 2001 Bill Nottingham - setgid too, not just setuid (#23195) * Thu Aug 10 2000 Jeff Johnson - add restart shell function (#15914). * Sun Aug 6 2000 Philipp Knirsch - Changed the uid/gid of the rpc user to be 32/32 * Fri Aug 4 2000 Philipp Knirsch - Fixed a build warning for daemon.c (missing include) - Portmap now running under user rpc if possible (#12427) * Wed Aug 2 2000 Bill Nottingham - start a little later (after syslog) - do dump/reload on restart (#14612) * Thu Jul 20 2000 Bill Nottingham - move initscript back * Wed Jul 12 2000 Prospector - automatic rebuild * Sat Jul 8 2000 Bill Nottingham - make trigger work on a few later versions * Tue Jun 27 2000 Than Ngo - /etc/rc.d/init.d -> /etc/init.d - condrestart in %postun - fix initscript - add requires initscript - remove links from packaging * Tue Jun 6 2000 Jeff Johnson - FHS packaging. * Wed May 10 2000 Jeff Johnson - apply cleanup patch (H.J. Lu) * Mon Feb 7 2000 Jeff Johnson - compress man pages. * Wed Dec 1 1999 Bill Nottingham - add patch to fix some malloc issues from HP * Fri Sep 10 1999 Bill Nottingham - chkconfig --del in %preun, not %postun * Mon Aug 16 1999 Bill Nottingham - initscript munging * Tue Mar 23 1999 Preston Brown - added man pages. * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 14) * Fri Dec 18 1998 Cristian Gafton - build for glibc 2.1 * Tue Jul 7 1998 Jeff Johnson - start/stop portmap at levels 11/89 * Mon May 04 1998 Cristian Gafton - fixed the trigger script * Fri May 01 1998 Jeff Johnson - added triggerpostun * Fri May 01 1998 Cristian Gafton - added %trigger to fix a previously broken package * Thu Apr 23 1998 Michael K. Johnson - enhanced initscripts * Thu Jan 08 1998 Erik Troan - rebuilt against glibc 2.0.6 * Tue Oct 28 1997 Erik Troan - fixed service name in stop section of init script * Tue Oct 21 1997 Donnie Barnes - fixed chkconfig support * Sun Oct 19 1997 Erik Troan - added restart, status commands to init script - added chkconfig support - uses a buildroot and %attr tags * Fri Jul 18 1997 Erik Troan - built against glibc