2008-08-25 04:58:08 +02:00
|
|
|
#
|
2010-11-20 12:22:00 +01:00
|
|
|
# spec file for package rpcbind (Version 0.2.0_git201007131952)
|
2008-08-25 04:58:08 +02:00
|
|
|
#
|
2010-11-20 12:22:00 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-08-25 04:58:08 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2010-11-20 12:22:00 +01:00
|
|
|
BuildRequires: libtirpc-devel
|
|
|
|
BuildRequires: tcpd-devel
|
|
|
|
BuildRequires: xz
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
Name: rpcbind
|
2010-11-20 12:22:00 +01:00
|
|
|
License: BSD3c
|
2008-08-25 04:58:08 +02:00
|
|
|
Group: Productivity/Networking/System
|
|
|
|
AutoReqProv: on
|
2010-11-20 12:21:55 +01:00
|
|
|
Version: 0.2.0_git201007131952
|
2010-11-20 12:22:00 +01:00
|
|
|
Release: 1
|
2008-08-25 04:58:08 +02:00
|
|
|
Summary: Transport independent RPC portmapper
|
2010-11-20 12:21:55 +01:00
|
|
|
Url: http://git.infradead.org/users/steved/rpcbind.git
|
|
|
|
Source: %{name}-%{version}.tar.xz
|
2008-08-25 04:58:08 +02:00
|
|
|
Source1: rpcbind.init
|
|
|
|
Source2: sysconfig.rpcbind
|
|
|
|
Source3: rpcbind.xml
|
2008-12-01 18:07:56 +01:00
|
|
|
Source4: pmap_set.c
|
2008-08-25 04:58:08 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Provides: portmap = 6.0+git20070716
|
2008-11-07 15:47:39 +01:00
|
|
|
Obsoletes: portmap <= 6.0+git20070716
|
2008-12-04 13:04:29 +01:00
|
|
|
PreReq: %insserv_prereq %fillup_prereq /sbin/checkproc
|
2008-12-01 18:07:56 +01:00
|
|
|
%define statefile /var/lib/portmap.state
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Rpcbind is a replacement for portmap. Whereas portmap supports only UDP
|
|
|
|
and TCP transports over INET (IPv4), rpcbind can be configured to work
|
|
|
|
on various transports supported by the TI-RPC. This includes TCP and
|
|
|
|
UDP over IPv6. Moreover, rpcbind provides additional functions in
|
|
|
|
regards to portmap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Gilles Quillard <gilles.quillard@bull.net>
|
|
|
|
Vincent ROQUETA <vincent.roqueta@ext.bull.net>
|
|
|
|
|
|
|
|
%prep
|
2010-11-20 12:21:55 +01:00
|
|
|
%setup -q
|
2008-12-01 18:07:56 +01:00
|
|
|
cp %{SOURCE4} .
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
autoreconf -fi
|
2010-11-20 12:21:55 +01:00
|
|
|
%configure --disable-static --with-pic \
|
2008-08-25 04:58:08 +02:00
|
|
|
--bindir=/sbin \
|
|
|
|
--enable-libwrap \
|
|
|
|
--enable-warmstarts \
|
|
|
|
--with-statedir=%{_localstatedir}/lib/rpcbind \
|
|
|
|
--enable-debug \
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -fpie" \
|
2010-11-20 12:21:55 +01:00
|
|
|
LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
|
|
|
%{__make} %{?jobs:-j%jobs}
|
|
|
|
cc -Wl,-z,relro,-z,now %{optflags} pmap_set.c -o pmap_set
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
|
|
|
|
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/rpcbind
|
|
|
|
ln -s /etc/init.d/rpcbind $RPM_BUILD_ROOT/sbin/rcrpcbind
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%_localstatedir/lib/rpcbind
|
|
|
|
# for now remove this man page since it conflicts with glibc
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_mandir}/man8/rpcinfo.8
|
|
|
|
# fillup template
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d
|
|
|
|
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%_datadir/omc/svcinfo.d/
|
2008-12-01 18:07:56 +01:00
|
|
|
#
|
2008-12-02 00:41:06 +01:00
|
|
|
install -m 755 pmap_set $RPM_BUILD_ROOT/sbin/pmap_set2
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2008-11-07 15:47:39 +01:00
|
|
|
%pre
|
|
|
|
# upgrade case from portmap
|
2008-12-01 18:07:56 +01:00
|
|
|
# 1. if portmap is running, dump portmap tables
|
2010-11-20 12:21:55 +01:00
|
|
|
if test -x /sbin/portmap && /sbin/checkproc /sbin/portmap; then
|
2008-12-01 18:07:56 +01:00
|
|
|
rm -f %statefile
|
|
|
|
test -x /sbin/pmap_dump && /sbin/pmap_dump > %statefile
|
|
|
|
fi
|
|
|
|
# 2. disable portmap service to be able to enable rpcbind
|
2008-12-04 13:04:29 +01:00
|
|
|
if test -x /sbin/portmap && /sbin/chkconfig -c portmap 3; then
|
2008-12-01 18:07:56 +01:00
|
|
|
/sbin/insserv -f -r portmap
|
2008-11-07 15:47:39 +01:00
|
|
|
fi
|
|
|
|
|
2008-08-25 04:58:08 +02:00
|
|
|
%preun
|
|
|
|
%stop_on_removal rpcbind
|
|
|
|
|
|
|
|
%post
|
|
|
|
%fillup_and_insserv -y rpcbind
|
2008-12-01 18:07:56 +01:00
|
|
|
# if portmap is running, we need to stop portmap *now*,
|
|
|
|
# start rpcbind and restore the old tables
|
|
|
|
if test -r %statefile; then
|
|
|
|
/etc/init.d/portmap stop > /dev/null || :
|
|
|
|
/etc/init.d/rpcbind start > /dev/null || :
|
2008-12-02 00:41:06 +01:00
|
|
|
/sbin/pmap_set2 < %statefile
|
2008-12-01 18:07:56 +01:00
|
|
|
rm -f %statefile
|
|
|
|
fi
|
2008-08-25 04:58:08 +02:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update rpcbind
|
|
|
|
%insserv_cleanup
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS ChangeLog COPYING NEWS README
|
2008-12-02 00:41:06 +01:00
|
|
|
/sbin/pmap_set2
|
2008-08-25 04:58:08 +02:00
|
|
|
/sbin/rpcbind
|
|
|
|
/sbin/rpcinfo
|
2010-11-20 12:21:55 +01:00
|
|
|
%{_mandir}/*/*
|
2008-08-25 04:58:08 +02:00
|
|
|
%config /etc/init.d/rpcbind
|
|
|
|
/sbin/rcrpcbind
|
|
|
|
%{_localstatedir}/lib/rpcbind
|
|
|
|
/var/adm/fillup-templates/sysconfig.rpcbind
|
|
|
|
%{_datadir}/omc/svcinfo.d/rpcbind.xml
|
|
|
|
|
|
|
|
%changelog
|