Accepting request 174631 from network

license update: BSD-4-Clause
Look at src/util.c (forwarded request 174628 from babelworx)

OBS-URL: https://build.opensuse.org/request/show/174631
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpcbind?expand=0&rev=30
This commit is contained in:
Stephan Kulow 2013-05-07 13:42:07 +00:00 committed by Git OBS Bridge
commit 7627f0e221
3 changed files with 20 additions and 135 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon May 6 12:20:44 UTC 2013 - cfarrell@suse.com
- license update: BSD-4-Clause
Look at src/util.c
-------------------------------------------------------------------
Thu Apr 4 00:32:00 UTC 2013 - crrodriguez@opensuse.org
- remove sysvinit support (read opensuse-packaging for details)
- remove "portmap" migration, according to the time machine
it went away in openSUSE 11.2 and the oldest supported version
is now 12.1
-------------------------------------------------------------------
Wed Nov 28 14:44:15 UTC 2012 - rmilasan@suse.com

View File

@ -1,84 +0,0 @@
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: portmap rpcbind
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Short-Description: TI-RPC program number mapper
# Description: TI-RPC program number mapper
### END INIT INFO
#
RPCBIND_BIN=/sbin/rpcbind
test -x $RPCBIND_BIN || { echo "$RPCBIND_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
. /etc/sysconfig/rpcbind
. /etc/rc.status
# Reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting rpcbind "
/sbin/startproc $RPCBIND_BIN $OPTIONS $RPCBIND_OPTIONS
rc_status -v
;;
stop)
echo -n "Shutting down rpcbind "
/sbin/killproc -TERM $RPCBIND_BIN
rc_status -v
;;
try-restart|condrestart)
## Do a restart only if the service was active before.
## Note: try-restart is now part of LSB (as of 1.9).
## RH has a similar command named condrestart.
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
# do a warmstart in this case, keeping the state
OPTIONS="-w" $0 restart
else
rc_reset # Not running is not a failure.
fi
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
rc_status
;;
force-reload)
$0 try-restart
rc_status
;;
reload)
# rpcbind does not support reload on signal
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for service rpcbind "
/sbin/checkproc $RPCBIND_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
exit 1
;;
esac
rc_exit

View File

@ -1,7 +1,7 @@
#
# spec file for package rpcbind
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -20,11 +20,10 @@ Name: rpcbind
Version: 0.2.0_git201103171419
Release: 0
Summary: Transport independent RPC portmapper
License: BSD-3-Clause
License: BSD-4-Clause
Group: Productivity/Networking/System
Url: http://git.infradead.org/users/steved/rpcbind.git
Source: %{name}-%{version}.tar.bz2
Source1: rpcbind.init
Source2: sysconfig.rpcbind
Source3: rpcbind.xml
Source4: pmap_set.c
@ -33,23 +32,15 @@ BuildRequires: libtirpc-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: tcpd-devel
Provides: portmap = 6.0+git20070716
Obsoletes: portmap <= 6.0+git20070716
# hopefully soon we will have this autogenerated from rpm
Provides: sysvinit(portmap)
Provides: sysvinit(rpcbind)
PreReq: %insserv_prereq %fillup_prereq /sbin/checkproc sysvinit(network)
PreReq: %fillup_prereq
Patch0: 0001-systemd-add-support-for-system-bus-activation.patch
Patch1: socket-activation-don-t-unlink-socket-we-didn-t-create
Patch2: socket-activation-fix-rpcbind-service-to-use-separate-sockets
Patch3: rpcbind-journal.patch
Patch4: move-lock-file-to-run-fs.patch
%define statefile /var/lib/portmap.state
%if 0%{?suse_version} > 1140
BuildRequires: systemd-devel
BuildRequires: pkgconfig(systemd)
%{?systemd_requires}
%define has_systemd 1
%endif
%description
Rpcbind is a replacement for portmap. Whereas portmap supports only UDP
@ -85,13 +76,10 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now"
--with-statedir=%{_localstatedir}/lib/rpcbind
%{__make} %{?jobs:-j%jobs}
%{__cc} -fwhole-program -Wl,-z,relro,-z,now %{optflags} pmap_set.c -o pmap_set
%{__cc} -pie -fpie -fwhole-program -Wl,-z,relro,-z,now %{optflags} pmap_set.c -o pmap_set
%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
# fillup template
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
@ -105,46 +93,17 @@ install -m 755 pmap_set $RPM_BUILD_ROOT/sbin/pmap_set2
rm -rf $RPM_BUILD_ROOT
%pre
# upgrade case from portmap
# 1. if portmap is running, dump portmap tables
if test -x /sbin/portmap && /sbin/checkproc /sbin/portmap; then
rm -f %statefile
test -x /sbin/pmap_dump && /sbin/pmap_dump > %statefile
fi
# 2. disable portmap service to be able to enable rpcbind
if test -x /sbin/portmap && /sbin/chkconfig -c portmap 3; then
/sbin/insserv -f -r portmap
fi
%if 0%{?has_systemd}
%service_add_pre %{name}.service %{name}.socket
%endif
%preun
%stop_on_removal rpcbind
%if 0%{?has_systemd}
%service_del_preun %{name}.service %{name}.socket
%endif
%post
%fillup_and_insserv rpcbind
# 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 || :
/sbin/pmap_set2 < %statefile
rm -f %statefile
fi
%if 0%{?has_systemd}
%{fillup_only -n rpcbind}
%service_add_post %{name}.service %{name}.socket
%endif
%postun
%restart_on_update rpcbind
%insserv_cleanup
%if 0%{?has_systemd}
%service_del_postun %{name}.service %{name}.socket
%endif
%files
%defattr(-,root,root)
@ -153,14 +112,10 @@ fi
/sbin/rpcbind
/sbin/rpcinfo
%{_mandir}/*/*
%config /etc/init.d/rpcbind
/sbin/rcrpcbind
%{_localstatedir}/lib/rpcbind
/var/adm/fillup-templates/sysconfig.rpcbind
%{_datadir}/omc/svcinfo.d/rpcbind.xml
%if 0%{?has_systemd}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket
%endif
%changelog