Update to new upstream version

Simplified systemd snippets in spec file
This commit is contained in:
Honza Horák 2011-08-02 14:22:18 +02:00
parent 224fe21dd2
commit b345b1fe8e

View File

@ -1,8 +1,8 @@
Summary: The NIS (Network Information Service) server Summary: The NIS (Network Information Service) server
Url: http://www.linux-nis.org/nis/ypserv/index.html Url: http://www.linux-nis.org/nis/ypserv/index.html
Name: ypserv Name: ypserv
Version: 2.25 Version: 2.26
Release: 3%{?dist} Release: 1%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Daemons Group: System Environment/Daemons
Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypserv-%{version}.tar.bz2 Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypserv-%{version}.tar.bz2
@ -14,6 +14,7 @@ Requires: gawk, make, portmap, bash >= 2.0
Requires(post): systemd-units Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
Requires(post): systemd-sysv
Patch0: ypserv-2.5-redhat.patch Patch0: ypserv-2.5-redhat.patch
Patch1: ypserv-2.21-path.patch Patch1: ypserv-2.21-path.patch
@ -27,6 +28,7 @@ Patch8: ypserv-2.24-aliases.patch
Patch9: ypserv-2.25-systemd.patch Patch9: ypserv-2.25-systemd.patch
Patch10: ypserv-2.25-portmanfix.patch Patch10: ypserv-2.25-portmanfix.patch
BuildRequires: gdbm-devel BuildRequires: gdbm-devel
BuildRequires: systemd-units
%description %description
The Network Information Service (NIS) is a system that provides The Network Information Service (NIS) is a system that provides
@ -73,11 +75,11 @@ rm -rf $RPM_BUILD_ROOT
#make install ROOT=$RPM_BUILD_ROOT #make install ROOT=$RPM_BUILD_ROOT
%makeinstall libexecdir=$RPM_BUILD_ROOT%{_libdir}/yp INSTALL_PROGRAM=install %makeinstall libexecdir=$RPM_BUILD_ROOT%{_libdir}/yp INSTALL_PROGRAM=install
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/ $RPM_BUILD_ROOT%{_sysconfdir} mkdir -p $RPM_BUILD_ROOT%{_unitdir} $RPM_BUILD_ROOT%{_sysconfdir}
install -m644 etc/ypserv.conf $RPM_BUILD_ROOT%{_sysconfdir} install -m644 etc/ypserv.conf $RPM_BUILD_ROOT%{_sysconfdir}
install -m644 %{SOURCE1} $RPM_BUILD_ROOT/lib/systemd/system/ypserv.service install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/ypserv.service
install -m644 %{SOURCE2} $RPM_BUILD_ROOT/lib/systemd/system/yppasswdd.service install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/yppasswdd.service
install -m644 %{SOURCE3} $RPM_BUILD_ROOT/lib/systemd/system/ypxfrd.service install -m644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/ypxfrd.service
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cat >$RPM_BUILD_ROOT/etc/sysconfig/yppasswdd <<EOF cat >$RPM_BUILD_ROOT/etc/sysconfig/yppasswdd <<EOF
@ -121,21 +123,15 @@ fi
%preun %preun
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
# Package removal, not upgrade # Package removal, not upgrade
/bin/systemctl stop ypserv.service >/dev/null 2>&1 || : /bin/systemctl stop ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
/bin/systemctl --no-reload disable ypserv.service >/dev/null 2>&1 || : /bin/systemctl --no-reload disable ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
/bin/systemctl stop ypxfrd.service >/dev/null 2>&1 || :
/bin/systemctl --no-reload disable ypxfrd.service >/dev/null 2>&1 || :
/bin/systemctl stop yppasswdd.service >/dev/null 2>&1 || :
/bin/systemctl --no-reload disable yppasswdd.service >/dev/null 2>&1 || :
fi fi
%postun %postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ "$1" -ge "1" ] ; then if [ "$1" -ge "1" ] ; then
# Package upgrade, not uninstall # Package upgrade, not uninstall
/bin/systemctl try-restart ypserv.service >/dev/null 2>&1 || : /bin/systemctl try-restart ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
/bin/systemctl try-restart ypxfrd.service >/dev/null 2>&1 || :
/bin/systemctl try-restart yppasswdd.service >/dev/null 2>&1 || :
fi fi
exit 0 exit 0
@ -147,13 +143,17 @@ exit 0
%config(noreplace) %{_sysconfdir}/ypserv.conf %config(noreplace) %{_sysconfdir}/ypserv.conf
%config(noreplace) %{_sysconfdir}/sysconfig/yppasswdd %config(noreplace) %{_sysconfdir}/sysconfig/yppasswdd
%config(noreplace) /var/yp/* %config(noreplace) /var/yp/*
/lib/systemd/system/* %{_unitdir}/*
%{_libdir}/yp %{_libdir}/yp
%{_sbindir}/* %{_sbindir}/*
%{_mandir}/*/* %{_mandir}/*/*
%{_includedir}/*/* %{_includedir}/*/*
%changelog %changelog
* Tue Aug 02 2011 Honza Horak <hhorak@redhat.com> - 2.26-1
- Update to new upstream version
Simplified systemd snippets in spec file
* Wed Jun 14 2011 Honza Horak <hhorak@redhat.com> - 2.25-3 * Wed Jun 14 2011 Honza Horak <hhorak@redhat.com> - 2.25-3
- Adjust yppush man page and add a comment how to assign options - Adjust yppush man page and add a comment how to assign options
to yppush (#712239) to yppush (#712239)