diff --git a/ypbind.spec b/ypbind.spec index c596278..c25a0a5 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -1,7 +1,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Version: 1.37.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Daemons 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 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%{_libexecdir} -install -m 644 etc/yp.conf $RPM_BUILD_ROOT/etc/yp.conf -install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/dhcp/dhclient.d/nis.sh +install -m 644 etc/yp.conf $RPM_BUILD_ROOT%{_sysconfdir}/yp.conf +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 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-pre-setdomain 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} %post -%if 0%{?systemd_post:1} - %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 || : +%systemd_post %{name}.service %preun -%if 0%{?systemd_preun:1} - %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 +%systemd_preun %{name}.service %postun -%if 0%{?systemd_postun_with_restart:1} - %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 +%systemd_postun_with_restart %{name}.service %files -f %{name}.lang %{_sbindir}/* %{_mandir}/*/* %{_libexecdir}/* %{_unitdir}/* -/etc/dhcp/dhclient.d/* -%config(noreplace) /etc/yp.conf +%{_sysconfdir}/dhcp/dhclient.d/* +%config(noreplace) %{_sysconfdir}/yp.conf %dir /var/yp/binding %doc README NEWS COPYING %changelog +* Mon Jul 29 2013 Honza Horak - 3:1.37.1-4 +- Remove SysV init conversion and systemd macros compatible code + * Thu May 09 2013 Honza Horak - 3:1.37.1-3 - 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. (rhbz#696629) -* Wed Apr 28 2011 Honza Horak - 3:1.32-10 +* Thu Apr 28 2011 Honza Horak - 3:1.32-10 - Made EnvironmentFile in systemd definition optional (rhbz#632620) -* Wed Apr 14 2011 Honza Horak - 3:1.32-9 +* Thu Apr 14 2011 Honza Horak - 3:1.32-9 - Add native systemd unit file. (rhbz#693873) @@ -548,7 +517,7 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind * Sun Jun 24 2001 Elliot Lee - Bump release + rebuild. -* Fri Jun 4 2001 Preston Brown +* Mon Jun 4 2001 Preston Brown - small fixes for initscript. Sometimes had trouble on slower systems (#37463) * Sat Mar 3 2001 Preston Brown