1
0
forked from rpms/rpcbind
rpcbind/rpcbind.spec

199 lines
6.2 KiB
RPMSpec
Raw Normal View History

2006-08-10 20:26:57 +00:00
%{!?_initdir:%define _initdir /etc/rc.d/init.d}
Name: rpcbind
Version: 0.1.6
Release: 1%{?dist}
Summary: Universal Addresses to RPC Program Number Mapper
2006-08-10 20:26:57 +00:00
Group: System Environment/Daemons
License: GPL
2007-02-16 21:54:26 +00:00
URL: http://nfsv4.bullopensource.org
2006-08-10 20:26:57 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
2006-08-10 20:26:57 +00:00
Source1: rpcbind.init
Requires: glibc-common >= 2.5.90-20
Requires: setup >= 2.6.4-1
Conflicts: man-pages < 2.43-12
2006-08-10 20:26:57 +00:00
BuildRequires: automake, autoconf, libtool
2007-09-17 18:38:43 +00:00
BuildRequires: libtirpc-devel, quota, tcp_wrappers-devel
Requires(pre): /usr/sbin/groupadd /usr/sbin/groupdel
Requires(pre): /usr/sbin/useradd /usr/sbin/userdel
2006-08-10 20:26:57 +00:00
Requires(post): /sbin/chkconfig
Requires(post): /sbin/chkconfig
Provides: portmap = %{version}-%{release}
Obsoletes: portmap <= 4.0-65.3
2006-08-10 20:26:57 +00:00
%description
The rpcbind utility is a server that converts RPC program numbers into
universal addresses. It must be running on the host to be able to make
RPC calls on a server on that machine.
%prep
%setup -q
%build
%ifarch s390 s390x
PIE="-fPIE"
%else
PIE="-fpie"
%endif
export PIE
2007-04-03 13:22:24 +00:00
RPCBUSR=rpc
RPCBDIR=/var/lib/rpcbind
2006-08-10 20:26:57 +00:00
CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
autoreconf -fisv
%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
2007-02-21 20:03:02 +00:00
--enable-warmstarts \
--with-statedir="$RPCBDIR" \
2007-04-03 13:22:24 +00:00
--with-rpcuser="$RPCBUSR" \
--enable-libwrap \
2007-02-21 20:03:02 +00:00
--enable-debug
2006-08-10 20:26:57 +00:00
make all
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/sbin
mkdir -p %{buildroot}/usr/sbin
2006-08-10 20:26:57 +00:00
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
mkdir -p %{buildroot}%{_mandir}/man8
mkdir -p %{buildroot}/var/lib/rpcbind
2006-08-10 20:26:57 +00:00
install -m 755 src/rpcbind ${RPM_BUILD_ROOT}/sbin
install -m 755 src/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
install -m 644 man/rpcbind.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
install -m 644 man/rpcinfo.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
2006-08-10 20:26:57 +00:00
install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initdir}/rpcbind
%clean
2007-02-16 21:54:26 +00:00
rm -rf %{buildroot}
2006-08-10 20:26:57 +00:00
%pre
# if the rpc uid and gid is left over from the portmapper
# remove both of them.
/usr/sbin/userdel rpc 2> /dev/null || :
/usr/sbin/groupdel rpc 2> /dev/null || :
# Now re-add the rpc uid/gid
/usr/sbin/groupadd -g 32 rpc > /dev/null 2>&1
/usr/sbin/useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
-M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
2006-08-10 20:26:57 +00:00
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 -eq 0 ]; then
2007-02-21 20:03:02 +00:00
service rpcbind stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
/usr/sbin/userdel rpc 2>/dev/null || :
/usr/sbin/groupdel rpc 2>/dev/null || :
rm -rf /var/lib/rpcbind
2006-08-10 20:26:57 +00:00
fi
%postun
if [ "$1" -ge "1" ]; then
2007-02-21 20:03:02 +00:00
service rpcbind condrestart > /dev/null 2>&1
2006-08-10 20:26:57 +00:00
fi
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog README
/sbin/rpcbind
%{_sbindir}/rpcinfo
2006-08-10 20:26:57 +00:00
%{_mandir}/man8/*
%config %{_initdir}/rpcbind
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
2006-08-10 20:26:57 +00:00
%changelog
* Wed Jul 9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1
- Updated to latest upstream release 0.1.6
* Wed Jul 2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5
- Fixed SYNOPSIS section in the rpcinfo man page (bz 453729)
* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4
- Removed the documentation about the non-existent
'-L' flag (bz 446915)
* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3
- Set password and service lookups to be local (bz 447092)
* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2
- rpcbind needs to downgrade to non-priviledgied group.
* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
- Updated to latest upstream release 0.1.5
* Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
- Fixed a warning in pmap_svc.c
- Cleaned up warmstarts so uid are longer needed, also
changed condrestarts to use warmstarts. (bz 428496)
* Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13
- Fixed connectivity with Mac OS clients by making sure handle_reply()
sets the correct fromlen in its recvfrom() call (bz 244492)
* Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12
- Changed is_loopback() and check_access() see if the calling
address is an address on a local interface, just not a loopback
address (bz 358621).
* Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11
- Reworked logic in initscript so the correct exit is
used when networking does not exist or is set up
incorrectly.
* Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10
- Corrected a typo in the initscript from previous
commit.
* Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9
- Fixed typo in Summary (bz 331811)
- Corrected init script (bz 247046)
* Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
2007-09-15 15:58:21 +00:00
- Fixed typo in init script (bz 248285)
- Added autoconf rules to turn on secure host checking
via libwrap. Also turned on host check by default (bz 248284)
- Changed init script to start service in runlevel 2 (bz 251568)
- Added a couple missing Requires(pre) (bz 247134)
2007-05-25 09:02:12 +00:00
* Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7
- Fixed condrestarts (bz 241332)
* Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6
- Fixed an ipv6 related segfault on startup (bz 240873)
* Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5
- Added dependency on setup which contains the correct
rpcbind /etc/service entry which in turns stops
rpcbind from haning when NIS is enabled. (bz 236865)
* Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
- change man-pages requires into a conflicts as we don't have to have
man-pages installed, but if we do, we need the newer version
* Fri Apr 6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3
- Fixed the Provides and Obsoletes statments to correctly
obsolete the portmap package.
2007-04-03 10:21:24 +00:00
* Tue Apr 3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
- Added dependency on glibc-common which allows the
rpcinfo command to be installed in the correct place.
- Added dependency on man-pages so the rpcinfo man
pages don't conflict.
2007-04-03 13:23:00 +00:00
- Added the creation of /var/lib/rpcbind which will be
used to store state files.
- Make rpcbind run with the 'rpc' uid/gid when it exists.
2007-02-21 20:03:02 +00:00
* Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
2006-08-10 20:26:57 +00:00
- Initial commit
2007-02-21 20:03:02 +00:00
- Spec reviewed (bz 228894)
- Added the Provides/Obsoletes which should
cause rpcbind to replace portmapper