Hello community,

here is the log from the commit of package mcelog for openSUSE:Factory checked 
in at 2013-12-19 15:09:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mcelog (Old)
 and      /work/SRC/openSUSE:Factory/.mcelog.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mcelog"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mcelog/mcelog.changes    2013-10-23 
19:23:59.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mcelog.new/mcelog.changes       2013-12-19 
15:09:21.000000000 +0100
@@ -1,0 +2,10 @@
+Sun Oct 27 18:00:04 UTC 2013 - crrodrig...@opensuse.org
+
+- Cleanup spec file
+- activate mcelog service via udev+systemd combo, if the kernel
+  registers a /dev/mcelog device the service will be automatically
+  started.
+- drop sysvinit scripts, add appropiate %pre %post invocations
+  of the needed systemd macros. 
+
+-------------------------------------------------------------------

Old:
----
  mcelog.service

New:
----
  90-mcelog.rules

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

Other differences:
------------------
++++++ mcelog.spec ++++++
--- /var/tmp/diff_new_pack.oOCpGo/_old  2013-12-19 15:09:22.000000000 +0100
+++ /var/tmp/diff_new_pack.oOCpGo/_new  2013-12-19 15:09:22.000000000 +0100
@@ -16,7 +16,6 @@
 #
 
 
-
 Name:           mcelog
 Summary:        Log Machine Check Events
 License:        GPL-2.0+
@@ -25,22 +24,19 @@
 Release:        0
 ExclusiveArch:  ix86 x86_64
 BuildRequires:  libesmtp-devel
+BuildRequires:  pkgconfig(systemd)
+BuildRequires:  pkgconfig(udev)
 Requires:       logrotate
-PreReq:         %insserv_prereq %fillup_prereq
 Source:         mcelog-%{version}.tar.bz2
-Source1:        mcelog.service
 Source2:        mcelog.sysconfig
 Source3:        mcelog.systemd
+Source4:        90-mcelog.rules
 Source6:        README.email_setup
 Patch1:         email.patch
 Patch2:         mcelog_invert_prefill_db_warning.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
-%if %suse_version > 1220
-%define         _unitdir /usr/lib/systemd
-%else
-%define         _unitdir /lib/systemd
-%endif
+PreReq:         %fillup_prereq
+%{?systemd_requires}
 
 %description
 mcelog retrieves machine check events from an x86-64 kernel in a cron
@@ -59,7 +55,7 @@
     Andi Kleen <a...@firstfloor.org>
 
 %prep
-%setup
+%setup -q
 %patch1 -p1
 %patch2 -p1
 
@@ -72,9 +68,6 @@
 export etcprefix=$RPM_BUILD_ROOT
 make -e install
 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
-mkdir -p $RPM_BUILD_ROOT/etc/init.d
-install -m755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/mcelog
-ln -s /etc/init.d/mcelog $RPM_BUILD_ROOT/usr/sbin/rcmcelog
 install -m644 mcelog.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mcelog
 
 mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
@@ -83,37 +76,37 @@
 mkdir -p $RPM_BUILD_ROOT/%_docdir/%name
 install -m 644 %SOURCE6 $RPM_BUILD_ROOT/%_docdir/%name/README.email_setup
 install -m 644 lk10-mcelog.pdf $RPM_BUILD_ROOT/%_docdir/%name/lk10-mcelog.pdf
-install -D -m 0644 %SOURCE3 %{buildroot}%{_unitdir}/system/mcelog.service
+install -D -m 0644 %SOURCE3 %{buildroot}%{_unitdir}/mcelog.service
+install -D -m 0644 %SOURCE4  %{buildroot}%{_udevrulesdir}/90-mcelog.rules
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%service_add_pre %{name}.service
+
 %post
-if [ -c /dev/mcelog ];then
-    %{fillup_and_insserv -y mcelog}
-fi
+%fillup_only
+%udev_rules_update
+%service_add_post %{name}.service
 
 %preun
-%{stop_on_removal mcelog}
+%service_del_preun %{name}.service
 
 %postun
-%{restart_on_update mcelog}
-%insserv_cleanup
+%service_del_postun %{name}.service
 
 %files
 %defattr (-,root,root,755)
 %{_mandir}/man8/*
 /usr/sbin/mcelog
 %config /etc/logrotate.d/mcelog
-/etc/init.d/mcelog
 %dir /etc/mcelog
 %config /etc/mcelog/mcelog.conf
 /var/adm/fillup-templates/sysconfig.mcelog
 /etc/mcelog/*trigger
-/usr/sbin/rcmcelog
-%dir %{_unitdir}
-%dir %{_unitdir}/system
-%{_unitdir}/system/mcelog.service
+%{_unitdir}/mcelog.service
+%{_udevrulesdir}/90-mcelog.rules
 %_docdir/%name
 
 %changelog

++++++ 90-mcelog.rules ++++++
ACTION=="add", KERNEL=="mcelog", SUBSYSTEM=="misc", TAG+="systemd", 
ENV{SYSTEMD_WANTS}+="mcelog.service"

++++++ mcelog.systemd ++++++
--- /var/tmp/diff_new_pack.oOCpGo/_old  2013-12-19 15:09:22.000000000 +0100
+++ /var/tmp/diff_new_pack.oOCpGo/_new  2013-12-19 15:09:22.000000000 +0100
@@ -1,8 +1,6 @@
 [Unit]
 Description=Machine Check Exception Logging Daemon
-After=syslog.target
 ConditionVirtualization=false
-ConditionPathExists=/dev/mcelog
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/mcelog

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to