Remove systemd-units and systemd-sysv requirements
Clean-up SysV init conversion code Clean-up systemd preset macros compatibility code
This commit is contained in:
parent
c387ac8088
commit
d389cb01f9
75
ypserv.spec
75
ypserv.spec
|
@ -4,7 +4,7 @@ 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.31
|
Version: 2.31
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2
|
Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2
|
||||||
|
@ -16,10 +16,9 @@ Source5: yppasswdd-pre-setdomain
|
||||||
|
|
||||||
Requires: gawk, make, portmap, bash >= 2.0
|
Requires: gawk, make, portmap, bash >= 2.0
|
||||||
Requires: tokyocabinet
|
Requires: tokyocabinet
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd
|
||||||
Requires(preun): systemd-units
|
Requires(preun): systemd
|
||||||
Requires(postun): systemd-units
|
Requires(postun): systemd
|
||||||
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
|
||||||
|
@ -34,7 +33,7 @@ Patch9: ypserv-2.29-relro.patch
|
||||||
Patch10: ypserv-2.31-netgrprecur.patch
|
Patch10: ypserv-2.31-netgrprecur.patch
|
||||||
|
|
||||||
BuildRequires: tokyocabinet-devel
|
BuildRequires: tokyocabinet-devel
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd
|
||||||
BuildRequires: autoconf, automake
|
BuildRequires: autoconf, automake
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
|
|
||||||
|
@ -127,54 +126,19 @@ EOF
|
||||||
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/rpc.yppasswdd.env
|
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/rpc.yppasswdd.env
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?systemd_post:1}
|
%systemd_post ypserv.service
|
||||||
%systemd_post ypserv.service
|
%systemd_post ypxfrd.service
|
||||||
%systemd_post ypxfrd.service
|
%systemd_post yppasswdd.service
|
||||||
%systemd_post yppasswdd.service
|
|
||||||
%else
|
|
||||||
# Package with native systemd unit file is installed for the first time
|
|
||||||
if [ $1 -eq 1 ]; then
|
|
||||||
# Package install, not upgrade
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%triggerun -- ypserv < 2.25-2
|
|
||||||
if /sbin/chkconfig --level 3 ypserv ; then
|
|
||||||
/bin/systemctl --no-reload enable ypserv.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
if /sbin/chkconfig --level 3 ypxfrd ; then
|
|
||||||
/bin/systemctl --no-reload enable ypxfrd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
if /sbin/chkconfig --level 3 yppasswdd ; then
|
|
||||||
/bin/systemctl --no-reload enable yppasswdd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if 0%{?systemd_preun:1}
|
%systemd_preun ypserv.service
|
||||||
%systemd_preun ypserv.service
|
%systemd_preun ypxfrd.service
|
||||||
%systemd_preun ypxfrd.service
|
%systemd_preun yppasswdd.service
|
||||||
%systemd_preun yppasswdd.service
|
|
||||||
%else
|
|
||||||
if [ $1 -eq 0 ] ; then
|
|
||||||
# Package removal, not upgrade
|
|
||||||
/bin/systemctl stop ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl --no-reload disable ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if 0%{?systemd_postun_with_restart:1}
|
%systemd_postun_with_restart ypserv.service
|
||||||
%systemd_postun_with_restart ypserv.service
|
%systemd_postun_with_restart ypxfrd.service
|
||||||
%systemd_postun_with_restart ypxfrd.service
|
%systemd_postun_with_restart yppasswdd.service
|
||||||
%systemd_postun_with_restart yppasswdd.service
|
|
||||||
%else
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
if [ "$1" -ge "1" ] ; then
|
|
||||||
# Package upgrade, not uninstall
|
|
||||||
/bin/systemctl try-restart ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%fedora>=18
|
%if 0%fedora>=18
|
||||||
|
|
||||||
|
@ -258,6 +222,11 @@ fi
|
||||||
%{_includedir}/*/*
|
%{_includedir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 29 2013 Honza Horak <hhorak@redhat.com> - 2.31-4
|
||||||
|
- Remove systemd-units and systemd-sysv requirements
|
||||||
|
- Clean-up SysV init conversion code
|
||||||
|
- Clean-up systemd preset macros compatibility code
|
||||||
|
|
||||||
* Mon May 27 2013 Honza Horak <hhorak@redhat.com> - 2.31-3
|
* Mon May 27 2013 Honza Horak <hhorak@redhat.com> - 2.31-3
|
||||||
- Fix crash when netgroups include recursive dependency
|
- Fix crash when netgroups include recursive dependency
|
||||||
|
|
||||||
|
@ -372,15 +341,15 @@ fi
|
||||||
- Update to new upstream version
|
- Update to new upstream version
|
||||||
Simplified systemd snippets in spec file
|
Simplified systemd snippets in spec file
|
||||||
|
|
||||||
* Wed Jun 14 2011 Honza Horak <hhorak@redhat.com> - 2.25-3
|
* Tue 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)
|
||||||
|
|
||||||
* Wed May 10 2011 Honza Horak <hhorak@redhat.com> - 2.25-2
|
* Tue May 10 2011 Honza Horak <hhorak@redhat.com> - 2.25-2
|
||||||
- Add systemd native services files for ypserv, ypxfrd and yppasswdd
|
- Add systemd native services files for ypserv, ypxfrd and yppasswdd
|
||||||
(#696903)
|
(#696903)
|
||||||
|
|
||||||
* Wed May 10 2011 Honza Horak <hhorak@redhat.com> - 2.25-1
|
* Tue May 10 2011 Honza Horak <hhorak@redhat.com> - 2.25-1
|
||||||
- Update to new upstream version, which contains .staticanal patch
|
- Update to new upstream version, which contains .staticanal patch
|
||||||
|
|
||||||
* Fri May 06 2011 Honza Horak <hhorak@redhat.com> - 2.24-4
|
* Fri May 06 2011 Honza Horak <hhorak@redhat.com> - 2.24-4
|
||||||
|
|
Loading…
Reference in New Issue