2006-08-10 20:26:57 +00:00
|
|
|
%{!?_initdir:%define _initdir /etc/rc.d/init.d}
|
|
|
|
|
|
|
|
Name: rpcbind
|
|
|
|
Version: 0.1.4
|
2007-04-02 22:17:34 +00:00
|
|
|
Release: 2%{?dist}
|
2006-08-10 20:26:57 +00:00
|
|
|
Summary: Universal Addresses to RPC Program Number Napper
|
|
|
|
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://nfsv4.bullopensource.org/tarballs/rpcbind/rpcbind-0.1.4.tar.bz2
|
|
|
|
Source1: rpcbind.init
|
|
|
|
|
2007-04-03 08:50:53 +00:00
|
|
|
Requires: glibc-common >= 2.5.90-20
|
|
|
|
Requires: man-pages >= 2.43-12
|
2006-08-10 20:26:57 +00:00
|
|
|
BuildRequires: automake, autoconf, libtool
|
2007-02-21 20:03:02 +00:00
|
|
|
BuildRequires: libtirpc-devel quota
|
2006-08-10 20:26:57 +00:00
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
|
2007-04-03 08:50:53 +00:00
|
|
|
Provides: rpcinfo = %{version}-%{release}
|
2007-02-21 20:33:33 +00:00
|
|
|
Obsoletes: portmap < 0.1.4-1
|
|
|
|
|
2006-08-10 20:26:57 +00:00
|
|
|
Patch1: rpcbind-0.1.4-compile.patch
|
|
|
|
Patch2: rpcbind-0.1.4-debug.patch
|
|
|
|
Patch3: rpcbind-0.1.4-warmstarts.patch
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
%ifarch s390 s390x
|
|
|
|
PIE="-fPIE"
|
|
|
|
%else
|
|
|
|
PIE="-fpie"
|
|
|
|
%endif
|
|
|
|
export PIE
|
|
|
|
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 \
|
|
|
|
--enable-debug
|
2006-08-10 20:26:57 +00:00
|
|
|
|
|
|
|
make all
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
2007-04-03 08:50:53 +00:00
|
|
|
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
|
2007-04-03 08:50:53 +00:00
|
|
|
mkdir -p %{buildroot}/var/lib/rpcbind
|
2006-08-10 20:26:57 +00:00
|
|
|
|
2007-04-03 08:50:53 +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
|
|
|
|
2007-04-03 08:50:53 +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}
|
2007-04-03 08:50:53 +00:00
|
|
|
/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
|
2007-04-03 08:50:53 +00:00
|
|
|
/sbin/rpcbind
|
2007-04-02 22:17:34 +00:00
|
|
|
%{_sbindir}/rpcinfo
|
2006-08-10 20:26:57 +00:00
|
|
|
%{_mandir}/man8/*
|
|
|
|
%config %{_initdir}/rpcbind
|
|
|
|
|
2007-04-03 08:50:53 +00:00
|
|
|
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
|
|
|
|
|
2006-08-10 20:26:57 +00:00
|
|
|
%changelog
|
2007-04-03 10:21:24 +00:00
|
|
|
* Tue Apr 3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
|
2007-04-02 22:17:34 +00:00
|
|
|
- Added dependency on glibc-common which allows the
|
|
|
|
rpcinfo command to be installed in the correct place.
|
2007-04-03 08:50:53 +00:00
|
|
|
- Added dependency on man-pages so the rpcinfo man
|
|
|
|
pages don't conflict.
|
|
|
|
- Added the creation of /var/lib/rpcinfo which will be
|
|
|
|
used to store state files.
|
2007-04-02 22:17:34 +00:00
|
|
|
|
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)
|
2007-02-21 20:33:33 +00:00
|
|
|
- Added the Provides/Obsoletes which should
|
|
|
|
cause rpcbind to replace portmapper
|