Hello community,

here is the log from the commit of package scmon for openSUSE:Factory checked 
in at 2019-08-08 14:23:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/scmon (Old)
 and      /work/SRC/openSUSE:Factory/.scmon.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "scmon"

Thu Aug  8 14:23:47 2019 rev:19 rq:721597 version:0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/scmon/scmon.changes      2017-04-12 
18:23:00.924270437 +0200
+++ /work/SRC/openSUSE:Factory/.scmon.new.9556/scmon.changes    2019-08-08 
14:23:48.464345366 +0200
@@ -1,0 +2,6 @@
+Fri Feb  8 10:35:06 UTC 2019 - [email protected]
+
+- Add systemd support.
+  [bsc#1116035, smon-add-systemd-support.patch]
+
+-------------------------------------------------------------------

New:
----
  smon-add-systemd-support.patch

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

Other differences:
------------------
++++++ scmon.spec ++++++
--- /var/tmp/diff_new_pack.cGY4DN/_old  2019-08-08 14:23:49.008345282 +0200
+++ /var/tmp/diff_new_pack.cGY4DN/_new  2019-08-08 14:23:49.012345282 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package scmon
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,13 +12,13 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           scmon
 Summary:        Makes waiting for smart card events easy
-License:        GPL-2.0
+License:        GPL-2.0-only
 Group:          System/Daemons
 Version:        0.4
 Release:        0
@@ -31,7 +31,9 @@
 Patch4:         scmon-dbus-policy.patch
 # PATCH-FIX-OPENSUSE scmon-includes.patch [email protected] -- Fix implicit 
declarations.
 Patch5:         scmon-includes.patch
-Requires(pre): %insserv_prereq
+# PATCH-FIX-OPENSUSE smon-add-systemd-support.patch [email protected] -- Add 
systemd support
+Patch6:         smon-add-systemd-support.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  pkgconfig
 %if 0%{?suse_version} <= 1010
@@ -44,7 +46,21 @@
 BuildRequires:  dbus-1-glib-devel
 BuildRequires:  mozilla-nspr-devel
 BuildRequires:  mozilla-nss-devel
+BuildRequires:  systemd-rpm-macros
+%endif
+
+%if 0%{?suse_version} >= 1500
+%bcond_without systemd
+%else
+%bcond_with systemd
 %endif
+
+%if %{with systemd}
+%{?systemd_requires}
+%else
+Requires(pre): %insserv_prereq
+%endif
+
 %if 0%{?fedora_version} == 6
 BuildRequires:  dbus-devel
 BuildRequires:  dbus-glib-devel
@@ -74,6 +90,7 @@
 %patch3 -p1
 %patch4
 %patch5 -p1
+%patch6 -p1
 
 %build
 %configure
@@ -81,28 +98,54 @@
 
 %install
 %makeinstall
+%if %{with systemd}
+install -m 644 -D init/scmon.service %{buildroot}%{_unitdir}/scmon.service
+ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcscmon
+%else
 mkdir -p %{?buildroot:%{buildroot}}%{_sysconfdir}/init.d
 cp init/scmon.sle %{?buildroot:%{buildroot}}%{_sysconfdir}/init.d/scmon
 ln -s %{_sysconfdir}/init.d/scmon %{?buildroot:%{buildroot}}%{_sbindir}/rcscmon
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with systemd}
+%pre
+%service_add_pre scmon.service
+%endif
+
 %post
+%if %{with systemd}
+%service_add_post scmon.service
+%else
 %{fillup_and_insserv scmon}
+%endif
 
 %preun
+%if %{with systemd}
+%service_del_preun scmon.service
+%else
 %{stop_on_removal}
+%endif
 
 %postun
-%{restart_on_update}
+%{restart_on_update scmon}
+%if %{with systemd}
+%service_del_postun scmon.service
+%else
 %{insserv_cleanup}
+%endif
 
 %files
 %defattr(-,root,root,-)
 %doc
 %config %{_sysconfdir}/dbus-1/system.d/com.novell.Pkcs11Monitor.conf
+%if %{with systemd}
+%{_unitdir}/scmon.service
+%else
 %{_sysconfdir}/init.d/scmon
+%endif
 %{_datadir}/dbus-1/services/com.novell.Pkcs11Monitor.service
 %{_sbindir}/scmon
 %{_sbindir}/rcscmon

++++++ smon-add-systemd-support.patch ++++++
Index: scmon-0.4/init/scmon.service
===================================================================
--- /dev/null
+++ scmon-0.4/init/scmon.service
@@ -0,0 +1,16 @@
+[Unit]
+Description = Smart Card Monitor
+Documentation = http://code.google.com/p/loolixbodes/wiki/scmon
+Requires=pcscd.socket
+Requires=dbus.socket
+Requires=remote-fs.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/scmon.pid
+ExecStart=/usr/sbin/scmon
+ExecStop=/sbin/killproc -TERM /usr/sbin/scmon
+ExecReload=/sbin/killproc -TERM /usr/sbin/scmon && /usr/sbin/scmon
+
+[Install]
+WantedBy=multi-user.target

Reply via email to