Mailinglist Archive: opensuse-commit (1906 mails)

< Previous Next >
commit scsirastools for openSUSE:Factory
Hello community,

here is the log from the commit of package scsirastools for openSUSE:Factory
checked in at 2019-04-01 12:37:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/scsirastools (Old)
and /work/SRC/openSUSE:Factory/.scsirastools.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "scsirastools"

Mon Apr 1 12:37:31 2019 rev:19 rq:689763 version:1.6.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/scsirastools/scsirastools.changes
2017-03-20 17:13:17.458285242 +0100
+++ /work/SRC/openSUSE:Factory/.scsirastools.new.25356/scsirastools.changes
2019-04-01 12:37:35.281892243 +0200
@@ -1,0 +2,7 @@
+Thu Mar 14 11:31:13 UTC 2019 - josef.moellers@xxxxxxxx
+
+- Added systemd support.
+ [bsc#1116036, scsirastools-add-systemd-support.patch,
+ sgdisk.service, sgraid.service]
+
+-------------------------------------------------------------------

New:
----
scsirastools-add-systemd-support.patch
sgdisk.service
sgraid.service

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

Other differences:
------------------
++++++ scsirastools.spec ++++++
--- /var/tmp/diff_new_pack.yYmVy2/_old 2019-04-01 12:37:39.061894088 +0200
+++ /var/tmp/diff_new_pack.yYmVy2/_new 2019-04-01 12:37:39.061894088 +0200
@@ -1,7 +1,7 @@
#
# spec file for package scsirastools
#
-# 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
@@ -24,10 +24,13 @@
Group: Hardware/Other
Url: http://scsirastools.sourceforge.net/
Source:
http://downloads.sourceforge.net/project/%{name}/%{name}-%{version}.tar.gz
+Source1: sgdisk.service
+Source2: sgraid.service
Patch0: %{name}-1.6.4-SUSE.diff
Patch2: %{name}-install
Patch3: %{name}-single-dev.diff
Patch4: %{name}-stop-using-var-lock-subsys.patch
+Patch5: %{name}-add-systemd-support.patch
BuildRequires: automake
Requires: mdadm
PreReq: %insserv_prereq
@@ -69,6 +72,7 @@
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1

%build
autoreconf -fi
@@ -79,25 +83,45 @@
make DESTDIR=%{buildroot} install %{?_smp_mflags}
# lets use /sbin
mv %{buildroot}%{_sbindir}/* %{buildroot}/sbin/
+# systemd support
+# 1) move the sysv init scripts away
+install -d %{buildroot}%{_datadir}/scsirastools/scripts
+mv %{buildroot}%{_initddir}/sgraid %{buildroot}%{_datadir}/scsirastools/scripts
+mv %{buildroot}%{_initddir}/sgdisk %{buildroot}%{_datadir}/scsirastools/scripts
+install -d %{buildroot}%{_unitdir}
+install -m 444 %{SOURCE1} %{buildroot}%{_unitdir}
+install -m 444 %{SOURCE2} %{buildroot}%{_unitdir}

%files
%defattr(-,root,root)
/sbin/sg*
/sbin/md*
/sbin/getmd
-%config %{_initddir}/sgraid
-%config %{_initddir}/sgdisk
+%{_datadir}/scsirastools
+%config %{_datadir}/scsirastools/scripts/sgraid
+%config %{_datadir}/scsirastools/scripts/sgdisk
+%{_unitdir}/sgdisk.service
+%{_unitdir}/sgraid.service
%{_mandir}/man8/sg*.8.gz
%dir %{_datadir}/scsirastools
%{_datadir}/scsirastools/*.mdf
%{_datadir}/scsirastools/rescan-scsi-bus.sh
%doc %{_defaultdocdir}/%{name}

+%pre
+%service_add_pre sgdisk.service
+%service_add_pre sgraid.service
+
+%post
+%service_add_post sgdisk.service
+%service_add_post sgraid.service
+
%preun
-%stop_on_removal
+%service_del_preun sgdisk.service
+%service_del_preun sgraid.service

%postun
-%insserv_cleanup
-%restart_on_update
+%service_del_postun sgdisk.service
+%service_del_postun sgraid.service

%changelog

++++++ scsirastools-add-systemd-support.patch ++++++
Index: scsirastools-1.6.4/src/sgcommon.c
===================================================================
--- scsirastools-1.6.4.orig/src/sgcommon.c
+++ scsirastools-1.6.4/src/sgcommon.c
@@ -72,6 +72,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
#include <errno.h>
#include <sys/ioctl.h>
#include <fcntl.h>
+#include <sys/sysmacros.h>
#include "sgsub.h"
#include "sgcommon.h"

Index: scsirastools-1.6.4/src/sgsubmon.c
===================================================================
--- scsirastools-1.6.4.orig/src/sgsubmon.c
+++ scsirastools-1.6.4/src/sgsubmon.c
@@ -45,6 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
#include <time.h>
#include <sys/ioctl.h>
#include <scsi/sg.h>
+#include <sys/sysmacros.h>

#define PATH_MAX 64
#include <dirent.h>
Index: scsirastools-1.6.4/files/sgdisk
===================================================================
--- scsirastools-1.6.4.orig/files/sgdisk
+++ scsirastools-1.6.4/files/sgdisk
@@ -15,7 +15,7 @@
# Description: sgdisk is used to start/stop the sgdiskmon software raid1 daemon
### END INIT INFO

-if [ -f /etc/SuSE-release ]; then
+if [ -f /etc/SuSE-release ] || fgrep -siq suse /etc/os-release; then
osver=suse
elif [ -f /etc/redhat-release ]; then
osver=redhat
Index: scsirastools-1.6.4/files/sgraid
===================================================================
--- scsirastools-1.6.4.orig/files/sgraid
+++ scsirastools-1.6.4/files/sgraid
@@ -15,7 +15,7 @@
# Description: sgraid is used to start/stop the sgraidmon software raid1 daemon
### END INIT INFO

-if [ -f /etc/SuSE-release ]; then
+if [ -f /etc/SuSE-release ] || fgrep -siq suse /etc/os-release; then
osver=suse
elif [ -f /etc/redhat-release ]; then
osver=redhat
++++++ sgdisk.service ++++++
# /run/systemd/generator.late/sgdisk.service
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/usr/share/scsirastools/scripts/sgdisk
Description=LSB: sgdiskmon daemon

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/usr/share/scsirastools/scripts/sgdisk start
ExecStop=/usr/share/scsirastools/scripts//sgdisk stop

[Install]
WantedBy=multi-user.target
++++++ sgraid.service ++++++
# /run/systemd/generator.late/sgraid.service
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/usr/share/scsirastools/scripts/sgraid
Description=LSB: sgraidmon daemon

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/usr/share/scsirastools/scripts/sgraid start
ExecStop=/usr/share/scsirastools/scripts/sgraid stop

[Install]
WantedBy=multi-user.target

< Previous Next >
This Thread