From 23c472f1dcd12541ef8adb4743d798a217070fc91887bc4972ea7e55158287fd Mon Sep 17 00:00:00 2001 From: Aurelien Aptel Date: Wed, 15 Mar 2017 16:25:04 +0000 Subject: [PATCH 1/2] Accepting request 479702 from home:aaptel:cifs-utils-systemd remove init script in SLE12SP2+ OBS-URL: https://build.opensuse.org/request/show/479702 OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=143 --- cifs-utils.changes | 5 +++++ cifs-utils.spec | 20 +++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/cifs-utils.changes b/cifs-utils.changes index c5a38af..5130ed8 100644 --- a/cifs-utils.changes +++ b/cifs-utils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 7 16:54:59 UTC 2017 - aaptel@suse.com + + - Get rid of init script on SLE12SP2. + ------------------------------------------------------------------- Thu Feb 2 15:31:14 UTC 2017 - aaptel@suse.com diff --git a/cifs-utils.spec b/cifs-utils.spec index e8e9933..8ac72ac 100644 --- a/cifs-utils.spec +++ b/cifs-utils.spec @@ -34,10 +34,15 @@ Source100: README.cifstab.migration %define NET_CFGDIR network-scripts %endif Source1: cifs.init -%if 0%{?suse_version} -PreReq: insserv %{?fillup_prereq} + +%if 0%{?suse_version} >= 1221 +%define systemd 1 %else -PreReq: /sbin/chkconfig +%define systemd 0 +%endif + +%if 0%{?suse_version} && 0%{?suse_version} < 1221 +PreReq: insserv %{?fillup_prereq} %endif %define initdir %{_sysconfdir}/init.d Provides: cifs-mount = %{version} @@ -119,8 +124,11 @@ autoreconf -i %{__make} %{?_smp_mflags} %install +%if ! %{systemd} mkdir -p \ ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d +%endif + %{__make} install \ DESTDIR=${RPM_BUILD_ROOT} %if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020 @@ -136,8 +144,12 @@ mkdir -p \ ${RPM_BUILD_ROOT}/%{_sysconfdir}/samba \ ${RPM_BUILD_ROOT}/%{_sbindir} \ ${RPM_BUILD_ROOT}/%{_rundir} + +%if ! %{systemd} install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/cifs ln -s service ${RPM_BUILD_ROOT}/%{_sbindir}/rccifs +%endif + touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script} \ ${RPM_BUILD_ROOT}%{_rundir}/cifs %endif @@ -175,8 +187,10 @@ touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${ %{_mandir}/man8/idmapwb.8.* %endif %if 0%{?suse_version} == 0 || 0%{?suse_version} > 1221 +%if ! %{systemd} %attr(0754,root,root) %config %{_sysconfdir}/init.d/cifs %{_sbindir}/rccifs +%endif %dir %{_sysconfdir}/samba %ghost %{_rundir}/cifs %endif From e86b12c800eab5b9537f8c8b48254edc8c0ec4465db97f63eadb654410440f9a Mon Sep 17 00:00:00 2001 From: Aurelien Aptel Date: Thu, 16 Mar 2017 12:42:49 +0000 Subject: [PATCH 2/2] - rewrite changelog (Get rid of init script on everything based off SLE12+ (bsc#1025471)) OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=144 --- cifs-utils.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cifs-utils.changes b/cifs-utils.changes index 5130ed8..a27e7e0 100644 --- a/cifs-utils.changes +++ b/cifs-utils.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Tue Mar 7 16:54:59 UTC 2017 - aaptel@suse.com - - Get rid of init script on SLE12SP2. + - Get rid of init script on everything based off SLE12+ (bsc#1025471). ------------------------------------------------------------------- Thu Feb 2 15:31:14 UTC 2017 - aaptel@suse.com