Hello community,

here is the log from the commit of package qos for openSUSE:Factory checked in 
at 2018-11-15 12:41:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qos (Old)
 and      /work/SRC/openSUSE:Factory/.qos.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qos"

Thu Nov 15 12:41:44 2018 rev:6 rq:649083 version:1.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/qos/qos.changes  2017-12-14 11:03:26.662348645 
+0100
+++ /work/SRC/openSUSE:Factory/.qos.new/qos.changes     2018-11-15 
12:41:52.114153112 +0100
@@ -1,0 +2,5 @@
+Wed Nov 14 20:34:55 UTC 2018 - [email protected]
+
+- Convert from SysV to systemd service (bsc#1116033)
+
+-------------------------------------------------------------------

New:
----
  qos.service.in

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

Other differences:
------------------
++++++ qos.spec ++++++
--- /var/tmp/diff_new_pack.Ac5hNL/_old  2018-11-15 12:41:54.110150843 +0100
+++ /var/tmp/diff_new_pack.Ac5hNL/_new  2018-11-15 12:41:54.114150838 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package qos
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright 2013 Archie L. Cobbs.
 #
 # All modifications and additions to the file contributed by third parties
@@ -19,10 +19,11 @@
 
 #Compat macro for new _fillupdir macro introduced in Nov 2017
 %if ! %{defined _fillupdir}
-  %define _fillupdir %{_fillupdir}
+    %define _fillupdir /var/adm/fillup-templates
 %endif
 
-%define initdir     %{_sysconfdir}/init.d
+%define systemdsvc  %{_usr}/lib/systemd/system
+%define servicefile %{name}.service
 %define netconfdir  %{_sysconfdir}/sysconfig/network
 %define modprobe    /sbin/modprobe
 %define tcutil      %{_sbindir}/tc
@@ -37,11 +38,12 @@
 License:        Apache-2.0
 Group:          System/Management
 Source0:        %{name}-%{version}.tar.gz
+Source1:        %{servicefile}.in
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Url:            https://github.com/archiecobbs/qos
 Requires:       iproute2
-Requires(pre):      insserv-compat
 Requires(post):     %fillup_prereq
+%systemd_requires
 
 %description
 The Problem: Bufferbloat (see http://en.wikipedia.org/wiki/Bufferbloat)
@@ -73,36 +75,44 @@
 {
     sed -r \
         -e 's|@qosconfig@|%{netconfdir}/%{name}|g' \
+        -e 's|@qosprog@|%{_bindir}/%{name}|g' \
         -e 's|@modprobe@|%{modprobe}|g' \
         -e 's|@iputil@|%{iputil}|g' \
         -e 's|@tcutil@|%{tcutil}|g'
 }
 subst < src/scripts/%{name}.sh > %{name}
+subst < %{_sourcedir}/%{servicefile}.in > %{servicefile}
 
 %install
 
-# Install init script
-install -d -m 0755 %{buildroot}%{initdir}
-install -m 0755 %{name} %{buildroot}%{initdir}/
-install -d -m 0755 %{buildroot}%{_sbindir}
-ln -s %{initdir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
+# Install start/stop script (which is just the old SysV /etc/init.d file)
+install -d %{buildroot}%{_bindir}
+install  -m 0755 %{name} %{buildroot}%{_bindir}/
+
+# Install systemd service file
+install -d %{buildroot}%{systemdsvc}
+install %{servicefile} %{buildroot}%{systemdsvc}/
 
 # Install sysconfig template
-install -d -m 0755 %{buildroot}%{fillupdir}
-install -m 0755 src/fillup/sysconfig.%{name} %{buildroot}%{fillupdir}/
-
-%post
-%{fillup_only -n -d %{name} network}
+install -d -m 0755 %{buildroot}%{_fillupdir}
+install -m 0755 src/fillup/sysconfig.%{name} %{buildroot}%{_fillupdir}/
 
 %preun
-%{stop_on_removal %{name}}
+%service_del_preun %{name}.service
 
 %postun
-%{restart_on_update %{name}}
-%insserv_cleanup
+%service_del_postun %{name}.service
+
+%pre
+%service_add_pre %{name}.service
+
+%post
+%service_add_post %{name}.service
+%{fillup_only -n -d %{name} network}
 
 %files
-%attr(0755,root,root) %{initdir}/*
-%attr(0755,root,root) %{_sbindir}/*
+%attr(0644,root,root) %{systemdsvc}/%{servicefile}
+%attr(0644,root,root) %{_fillupdir}/sysconfig.%{name}
+%attr(0755,root,root) %{_bindir}/%{name}
 
 %changelog

++++++ qos.service.in ++++++
[Unit]
Description=QOS traffic shaping to avoid bufferbloat
After=network-pre.target
Documentation=https://github.com/archiecobbs/qos

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=@qosprog@ start
ExecStop=@qosprog@ stop

Reply via email to