Hello community,

here is the log from the commit of package sblim-sfcb for openSUSE:Factory 
checked in at 2012-12-08 15:53:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sblim-sfcb (Old)
 and      /work/SRC/openSUSE:Factory/.sblim-sfcb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sblim-sfcb", Maintainer is "bwhite...@novell.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sblim-sfcb/sblim-sfcb.changes    2012-10-11 
11:24:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.sblim-sfcb.new/sblim-sfcb.changes       
2012-12-08 15:53:29.000000000 +0100
@@ -1,0 +2,10 @@
+Thu Nov 29 13:20:00 UTC 2012 - kkae...@suse.com
+
+- rename the systemd service to "sfcbd.service"
+
+-------------------------------------------------------------------
+Sat Nov 24 14:17:53 UTC 2012 - kkae...@suse.com
+
+- add support for systemd (openSUSE > 12, Fedora > 15)
+
+-------------------------------------------------------------------

New:
----
  sfcbd.service

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sblim-sfcb.spec ++++++
--- /var/tmp/diff_new_pack.KbBmKN/_old  2012-12-08 15:53:30.000000000 +0100
+++ /var/tmp/diff_new_pack.KbBmKN/_new  2012-12-08 15:53:30.000000000 +0100
@@ -16,6 +16,12 @@
 #
 
 
+%if 0%{?suse_version} > 1140 || 0%{?fedora_version} > 14
+%define has_systemd 1
+%else
+%define has_systemd 0
+%endif
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Summary:        Small Footprint CIM Broker
 License:        EPL-1.0
@@ -38,6 +44,7 @@
 Source4:        sfcb-pam.conf
 Source5:        %{name}-rpmlintrc
 Source6:        susefirewall.conf
+Source7:        sfcbd.service
 Patch1:         pending-upstream.patch
 Patch4:         0004-Don-t-call-tool_mm_flush-during-OPS_LoadProvider.patch
 Patch6:         0006-Reflect-provider-information-in-ps-via-argv.patch
@@ -50,8 +57,10 @@
 BuildRequires:  curl-devel
 %endif
 %if 0%{?suse_version} >= 1140
+%if 0%{?has_systemd} == 0
 Requires:       sysvinit-tools
 %endif
+%endif
 BuildRequires:  cim-schema
 BuildRequires:  libtool
 BuildRequires:  openssl-devel
@@ -71,6 +80,11 @@
 %endif
 %endif
 
+%if 0%{?has_systemd}
+BuildRequires:  systemd
+%{?systemd_requires}
+%endif
+
 Requires:       curl
 %if 0%{?suse_version} < 1120
 # unneeded explicit lib dependency
@@ -126,8 +140,6 @@
 touch test/slptest/Makefile.in
 touch test/localtests/Makefile.in
 sh ./autoconfiscate.sh
-#if test -d mofc; then cd mofc && autoreconf -f -i; fi
-#%%configure --enable-debug --enable-ssl --enable-pam --enable-ipv6 
CIMSCHEMA_SOURCE=%{SOURCE1} CIMSCHEMA_MOF=cimv216.mof CIMSCHEMA_SUBDIRS=y
 mkdir -p m4
 %if 0%{?rhel_version} == 0 && 0%{?centos_version} == 0
 WITH_SLP=--enable-slp
@@ -151,13 +163,18 @@
 make postinstall DESTDIR=$RPM_BUILD_ROOT
 # comment out - NWP - removing schema pkg
 #make DESTDIR=$RPM_BUILD_ROOT install-cimschema
-# remove docs from wrong dir.  They are handled by %doc macro in files list
+# remove docs from wrong dir.  They are handled by %%doc macro in files list
 rm -rf $RPM_BUILD_ROOT/usr/share/doc
 # remove unused libtool files
 rm -f $RPM_BUILD_ROOT/%{_libdir}/*a
 rm -f $RPM_BUILD_ROOT/%{_libdir}/sfcb/*a
 # make the cmpi directory that sfcb will own - for SuSE Autobuild checks of 
rpm directory ownership
 mkdir -p $RPM_BUILD_ROOT/%{_libdir}/cmpi
+%if 0%{?has_systemd}
+install -D -m 644 %{S:7} $RPM_BUILD_ROOT%{_unitdir}/sfcbd.service
+# remove the default-installed sfcb init script
+rm -f $RPM_BUILD_ROOT/etc/init.d/sfcb
+%else
 %if 0%{?suse_version}
 # override the default-installed sfcb init script - use the one from Source2
 # due to /etc/SuSE-release not available in autobuild, so won't install
@@ -165,6 +182,7 @@
 install %SOURCE2 $RPM_BUILD_ROOT/etc/init.d/sfcb
 ln -s /etc/init.d/sfcb $RPM_BUILD_ROOT/usr/sbin/rcsfcb
 %endif
+%endif
 # Added NWP 5/14/08 - transition to using cim-schema rpm instead of 
internal-built schema
 ln -sf /usr/share/mof/cim-current $RPM_BUILD_ROOT/%{_datadir}/sfcb/CIM
 install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/etc/pam.d/sfcb
@@ -173,6 +191,10 @@
 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
 install -m 0644 %SOURCE6 
$RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/sblim-sfcb
 %endif
+
+#
+# package list for %%files section
+
 echo "%defattr(-,root,root)" > _pkg_list
 # Added NWP 5/14/08 - moved from 'files schema'
 echo "%dir %{_datadir}/sfcb/" >> _pkg_list
@@ -192,7 +214,11 @@
 %endif
 echo "%doc README COPYING AUTHORS" >> _pkg_list
 echo "%doc %{_datadir}/man/man1/*" >> _pkg_list
+%if 0%{?has_systemd}
+echo "%{_unitdir}/sfcbd.service" >> _pkg_list
+%else
 echo "%{_sysconfdir}/init.d/sfcb" >> _pkg_list
+%endif
 echo "%{_localstatedir}/lib/sfcb" >> _pkg_list
 echo "%{_bindir}/*" >> _pkg_list
 echo "%{_sbindir}/*" >> _pkg_list
@@ -211,14 +237,24 @@
 then
   rm -rf %{_datadir}/sfcb/CIM
 fi
+# follow http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines
+%if 0%{?has_systemd}
+if [-f /var/lib/systemd/migrated/%{name}]; then
+%service_add_pre sfcbd.service
+fi
+%endif
 
 %post 
 test -n "$FIRST_ARG" || FIRST_ARG=$1
 #removed NWP, placed into init script for first service startup
-#%{_datadir}/sfcb/genSslCert.sh %{_sysconfdir}/sfcb
+#%%{_datadir}/sfcb/genSslCert.sh %%{_sysconfdir}/sfcb
+%if 0%{?has_systemd}
+%service_add_post sfcbd.service
+%else
 %if 0%{?suse_version}
 %{fillup_and_insserv -f sfcb}
 %endif
+%endif
 if test "$FIRST_ARG" -eq 1 ; then
    sfcbrepos -f 2> /dev/null || :
 fi
@@ -227,7 +263,11 @@
 exit 0
 
 %preun
+%if 0%{?has_systemd}
+%service_del_preun sfcbd.service
+%else
 %stop_on_removal sfcb
+%endif
 
 %postun
 test -n "$FIRST_ARG" || FIRST_ARG=$1
@@ -235,8 +275,12 @@
 if test "$FIRST_ARG" -ge 1 ; then
    sfcbrepos -f 2> /dev/null || :
 fi
+%if 0%{?has_systemd}
+%service_del_postun sfcbd.service
+%else
 %restart_on_update sfcb
 %insserv_cleanup
+%endif
 
 %files -f _pkg_list
 

++++++ sfcbd.service ++++++
[Unit]
Description=SFCB CIMOM service
After=syslog.target

[Service]
ExecStart=/usr/sbin/sfcbd

[Install]
WantedBy=multi-user.target
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to