Remove SysV init conversion and systemd macros compatible code

This commit is contained in:
Honza Horák 2013-07-29 17:53:18 +02:00
parent a0b4e0ffb7
commit ba2c17a9db

View File

@ -1,7 +1,7 @@
Summary: The NIS daemon which binds NIS clients to an NIS domain Summary: The NIS daemon which binds NIS clients to an NIS domain
Name: ypbind Name: ypbind
Version: 1.37.1 Version: 1.37.1
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/ypbind-mt/ypbind-mt-%{version}.tar.bz2 Source0: http://www.linux-nis.org/download/ypbind-mt/ypbind-mt-%{version}.tar.bz2
@ -68,11 +68,11 @@ make
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/var/yp/binding mkdir -p $RPM_BUILD_ROOT/var/yp/binding
mkdir -p $RPM_BUILD_ROOT/etc/dhcp/dhclient.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d
mkdir -p $RPM_BUILD_ROOT%{_unitdir} mkdir -p $RPM_BUILD_ROOT%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{_libexecdir} mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
install -m 644 etc/yp.conf $RPM_BUILD_ROOT/etc/yp.conf install -m 644 etc/yp.conf $RPM_BUILD_ROOT%{_sysconfdir}/yp.conf
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/dhcp/dhclient.d/nis.sh install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d/nis.sh
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/ypbind.service install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/ypbind.service
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-pre-setdomain install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-pre-setdomain
install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind
@ -80,59 +80,28 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind
%{find_lang} %{name} %{find_lang} %{name}
%post %post
%if 0%{?systemd_post:1} %systemd_post %{name}.service
%systemd_post %{name}.service
%else
# Package install, not upgrade
if [ $1 -eq 1 ]; then
/bin/systemctl daemon-reload >dev/null || :
fi
%endif
# Package with native systemd unit file is installed for the first time
%triggerun -- %{name} < 3:1.32-9
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply httpd
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
%preun %preun
%if 0%{?systemd_preun:1} %systemd_preun %{name}.service
%systemd_preun %{name}.service
%else
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || :
/bin/systemctl stop %{name}.service >/dev/null 2>&1 || :
fi
%endif
%postun %postun
%if 0%{?systemd_postun_with_restart:1} %systemd_postun_with_restart %{name}.service
%systemd_postun_with_restart %{name}.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ "$1" -ge "1" ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%endif
%files -f %{name}.lang %files -f %{name}.lang
%{_sbindir}/* %{_sbindir}/*
%{_mandir}/*/* %{_mandir}/*/*
%{_libexecdir}/* %{_libexecdir}/*
%{_unitdir}/* %{_unitdir}/*
/etc/dhcp/dhclient.d/* %{_sysconfdir}/dhcp/dhclient.d/*
%config(noreplace) /etc/yp.conf %config(noreplace) %{_sysconfdir}/yp.conf
%dir /var/yp/binding %dir /var/yp/binding
%doc README NEWS COPYING %doc README NEWS COPYING
%changelog %changelog
* Mon Jul 29 2013 Honza Horak <hhorak@redhat.com> - 3:1.37.1-4
- Remove SysV init conversion and systemd macros compatible code
* Thu May 09 2013 Honza Horak <hhorak@redhat.com> - 3:1.37.1-3 * Thu May 09 2013 Honza Horak <hhorak@redhat.com> - 3:1.37.1-3
- Enable PrivateTmp feature, just for the case - Enable PrivateTmp feature, just for the case
@ -246,11 +215,11 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind
NM_DBUS_SIGNAL_STATE_CHANGED. NM_DBUS_SIGNAL_STATE_CHANGED.
(rhbz#696629) (rhbz#696629)
* Wed Apr 28 2011 Honza Horak <hhorak@redhat.com> - 3:1.32-10 * Thu Apr 28 2011 Honza Horak <hhorak@redhat.com> - 3:1.32-10
- Made EnvironmentFile in systemd definition optional - Made EnvironmentFile in systemd definition optional
(rhbz#632620) (rhbz#632620)
* Wed Apr 14 2011 Honza Horak <hhorak@redhat.com> - 3:1.32-9 * Thu Apr 14 2011 Honza Horak <hhorak@redhat.com> - 3:1.32-9
- Add native systemd unit file. - Add native systemd unit file.
(rhbz#693873) (rhbz#693873)
@ -548,7 +517,7 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com> * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild. - Bump release + rebuild.
* Fri Jun 4 2001 Preston Brown <pbrown@redhat.com> * Mon Jun 4 2001 Preston Brown <pbrown@redhat.com>
- small fixes for initscript. Sometimes had trouble on slower systems (#37463) - small fixes for initscript. Sometimes had trouble on slower systems (#37463)
* Sat Mar 3 2001 Preston Brown <pbrown@redhat.com> * Sat Mar 3 2001 Preston Brown <pbrown@redhat.com>