From 5f3b47a9fc8e62fff86dd5bec11378f6e28ca199b21bc3a229265febf39c88ac Mon Sep 17 00:00:00 2001 From: Christian Kornacker Date: Tue, 18 Feb 2014 17:40:34 +0000 Subject: [PATCH] - don't deliver SysV init files to systemd distributions OBS-URL: https://build.opensuse.org/package/show/network/krb5?expand=0&rev=119 --- krb5-mini.changes | 5 +++++ krb5-mini.spec | 34 +++++++++++++++++++++++++--------- krb5.changes | 5 +++++ krb5.spec | 34 +++++++++++++++++++++++++--------- 4 files changed, 60 insertions(+), 18 deletions(-) diff --git a/krb5-mini.changes b/krb5-mini.changes index f58b3e4..6f9e823 100644 --- a/krb5-mini.changes +++ b/krb5-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 15:27:15 UTC 2014 - ckornacker@suse.com + +- don't deliver SysV init files to systemd distributions + ------------------------------------------------------------------- Tue Jan 21 14:28:05 UTC 2014 - ckornacker@suse.com diff --git a/krb5-mini.spec b/krb5-mini.spec index ff96b5f..6af8cee 100644 --- a/krb5-mini.spec +++ b/krb5-mini.spec @@ -46,6 +46,7 @@ BuildRequires: python-libxml2 BuildRequires: python-lxml %if 0%{?suse_version} >= 1210 BuildRequires: pkgconfig(systemd) +%{?systemd_requires} %endif # bug437293 %ifarch ppc64 @@ -287,17 +288,18 @@ do done # and binaries too chmod 0755 %{buildroot}/usr/lib/mit/bin/ksu -# install init scripts -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 755 %{vendorFiles}/kadmind.init %{buildroot}%{_sysconfdir}/init.d/kadmind -install -m 755 %{vendorFiles}/krb5kdc.init %{buildroot}%{_sysconfdir}/init.d/krb5kdc -install -m 755 %{vendorFiles}/kpropd.init %{buildroot}%{_sysconfdir}/init.d/kpropd # install systemd files %if 0%{?suse_version} >= 1210 mkdir -p %{buildroot}%{_unitdir} install -m 644 %{vendorFiles}/kadmind.service %{buildroot}%{_unitdir} install -m 644 %{vendorFiles}/krb5kdc.service %{buildroot}%{_unitdir} install -m 644 %{vendorFiles}/kpropd.service %{buildroot}%{_unitdir} +%else +# install init scripts +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 755 %{vendorFiles}/kadmind.init %{buildroot}%{_sysconfdir}/init.d/kadmind +install -m 755 %{vendorFiles}/krb5kdc.init %{buildroot}%{_sysconfdir}/init.d/krb5kdc +install -m 755 %{vendorFiles}/kpropd.init %{buildroot}%{_sysconfdir}/init.d/kpropd %endif # install sysconfig templates mkdir -p $RPM_BUILD_ROOT/%{_var}/adm/fillup-templates @@ -310,9 +312,21 @@ find . -type f -name '*.ps' -exec gzip -9 {} \; # create rc* links mkdir -p %{buildroot}/usr/bin/ mkdir -p %{buildroot}/usr/sbin/ +%if 0%{?suse_version} >= 1210 +%if 0%{?suse_version} > 1220 +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rckadmind +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rckrb5kdc +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rckpropd +%else +ln -s /sbin/service %{buildroot}%{_sbindir}/rckadmind +ln -s /sbin/service %{buildroot}%{_sbindir}/rckrb5kdc +ln -s /sbin/service %{buildroot}%{_sbindir}/rcpropd +%endif +%else ln -sf ../../etc/init.d/kadmind %{buildroot}/usr/sbin/rckadmind ln -sf ../../etc/init.d/krb5kdc %{buildroot}/usr/sbin/rckrb5kdc ln -sf ../../etc/init.d/kpropd %{buildroot}/usr/sbin/rckpropd +%endif # create links for kinit and klist, because of the java ones ln -sf ../../usr/lib/mit/bin/kinit %{buildroot}/usr/bin/kinit ln -sf ../../usr/lib/mit/bin/klist %{buildroot}/usr/bin/klist @@ -487,11 +501,12 @@ rm -f %{buildroot}/%{_libdir}/krb5/plugins/preauth/otp.so %attr(0600,root,root) %config(noreplace) %{_localstatedir}/lib/kerberos/krb5kdc/kadm5.dict %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/k* %{_var}/adm/fillup-templates/sysconfig.* -%{_sysconfdir}/init.d/* %if 0%{?suse_version} >= 1210 %{_unitdir}/kadmind.service %{_unitdir}/krb5kdc.service %{_unitdir}/kpropd.service +%else +%{_sysconfdir}/init.d/* %endif %{_libdir}/libgssapi_krb5.* %{_libdir}/libgssrpc.so.* @@ -580,13 +595,14 @@ rm -f %{buildroot}/%{_libdir}/krb5/plugins/preauth/otp.so %defattr(-,root,root) %attr(0700,root,root) %dir /var/log/krb5 %config(noreplace) %{_sysconfdir}/logrotate.d/krb5-server -%{_sysconfdir}/init.d/kadmind -%{_sysconfdir}/init.d/krb5kdc -%{_sysconfdir}/init.d/kpropd %if 0%{?suse_version} >= 1210 %{_unitdir}/kadmind.service %{_unitdir}/krb5kdc.service %{_unitdir}/kpropd.service +%else +%{_sysconfdir}/init.d/kadmind +%{_sysconfdir}/init.d/krb5kdc +%{_sysconfdir}/init.d/kpropd %endif %dir %{krb5docdir} %dir /usr/lib/mit diff --git a/krb5.changes b/krb5.changes index 641ed61..969c292 100644 --- a/krb5.changes +++ b/krb5.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 18 15:25:57 UTC 2014 - ckornacker@suse.com + +- don't deliver SysV init files to systemd distributions + ------------------------------------------------------------------- Tue Jan 21 14:23:37 UTC 2014 - ckornacker@suse.com diff --git a/krb5.spec b/krb5.spec index 9f0dad7..f52023b 100644 --- a/krb5.spec +++ b/krb5.spec @@ -46,6 +46,7 @@ BuildRequires: python-libxml2 BuildRequires: python-lxml %if 0%{?suse_version} >= 1210 BuildRequires: pkgconfig(systemd) +%{?systemd_requires} %endif # bug437293 %ifarch ppc64 @@ -287,17 +288,18 @@ do done # and binaries too chmod 0755 %{buildroot}/usr/lib/mit/bin/ksu -# install init scripts -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 755 %{vendorFiles}/kadmind.init %{buildroot}%{_sysconfdir}/init.d/kadmind -install -m 755 %{vendorFiles}/krb5kdc.init %{buildroot}%{_sysconfdir}/init.d/krb5kdc -install -m 755 %{vendorFiles}/kpropd.init %{buildroot}%{_sysconfdir}/init.d/kpropd # install systemd files %if 0%{?suse_version} >= 1210 mkdir -p %{buildroot}%{_unitdir} install -m 644 %{vendorFiles}/kadmind.service %{buildroot}%{_unitdir} install -m 644 %{vendorFiles}/krb5kdc.service %{buildroot}%{_unitdir} install -m 644 %{vendorFiles}/kpropd.service %{buildroot}%{_unitdir} +%else +# install init scripts +mkdir -p %{buildroot}%{_sysconfdir}/init.d +install -m 755 %{vendorFiles}/kadmind.init %{buildroot}%{_sysconfdir}/init.d/kadmind +install -m 755 %{vendorFiles}/krb5kdc.init %{buildroot}%{_sysconfdir}/init.d/krb5kdc +install -m 755 %{vendorFiles}/kpropd.init %{buildroot}%{_sysconfdir}/init.d/kpropd %endif # install sysconfig templates mkdir -p $RPM_BUILD_ROOT/%{_var}/adm/fillup-templates @@ -310,9 +312,21 @@ find . -type f -name '*.ps' -exec gzip -9 {} \; # create rc* links mkdir -p %{buildroot}/usr/bin/ mkdir -p %{buildroot}/usr/sbin/ +%if 0%{?suse_version} >= 1210 +%if 0%{?suse_version} > 1220 +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rckadmind +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rckrb5kdc +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rckpropd +%else +ln -s /sbin/service %{buildroot}%{_sbindir}/rckadmind +ln -s /sbin/service %{buildroot}%{_sbindir}/rckrb5kdc +ln -s /sbin/service %{buildroot}%{_sbindir}/rcpropd +%endif +%else ln -sf ../../etc/init.d/kadmind %{buildroot}/usr/sbin/rckadmind ln -sf ../../etc/init.d/krb5kdc %{buildroot}/usr/sbin/rckrb5kdc ln -sf ../../etc/init.d/kpropd %{buildroot}/usr/sbin/rckpropd +%endif # create links for kinit and klist, because of the java ones ln -sf ../../usr/lib/mit/bin/kinit %{buildroot}/usr/bin/kinit ln -sf ../../usr/lib/mit/bin/klist %{buildroot}/usr/bin/klist @@ -487,11 +501,12 @@ rm -f %{buildroot}/%{_libdir}/krb5/plugins/preauth/otp.so %attr(0600,root,root) %config(noreplace) %{_localstatedir}/lib/kerberos/krb5kdc/kadm5.dict %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/k* %{_var}/adm/fillup-templates/sysconfig.* -%{_sysconfdir}/init.d/* %if 0%{?suse_version} >= 1210 %{_unitdir}/kadmind.service %{_unitdir}/krb5kdc.service %{_unitdir}/kpropd.service +%else +%{_sysconfdir}/init.d/* %endif %{_libdir}/libgssapi_krb5.* %{_libdir}/libgssrpc.so.* @@ -580,13 +595,14 @@ rm -f %{buildroot}/%{_libdir}/krb5/plugins/preauth/otp.so %defattr(-,root,root) %attr(0700,root,root) %dir /var/log/krb5 %config(noreplace) %{_sysconfdir}/logrotate.d/krb5-server -%{_sysconfdir}/init.d/kadmind -%{_sysconfdir}/init.d/krb5kdc -%{_sysconfdir}/init.d/kpropd %if 0%{?suse_version} >= 1210 %{_unitdir}/kadmind.service %{_unitdir}/krb5kdc.service %{_unitdir}/kpropd.service +%else +%{_sysconfdir}/init.d/kadmind +%{_sysconfdir}/init.d/krb5kdc +%{_sysconfdir}/init.d/kpropd %endif %dir %{krb5docdir} %dir /usr/lib/mit