commit mcstrans for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package mcstrans for openSUSE:Factory checked in at 2014-09-09 19:00:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mcstrans (Old)
and /work/SRC/openSUSE:Factory/.mcstrans.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mcstrans"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mcstrans/mcstrans.changes 2012-12-14 09:43:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mcstrans.new/mcstrans.changes 2014-09-09 19:00:14.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Sep 8 08:07:00 UTC 2014 - jsegitz@suse.com
+
+- altered package to use systemd. Removed
+ mcstrans-0.3.3-initscript.patch since it's no longer necessary
+- added mcstrans-0.3.3-writepid.patch to write pid files to the
+ correct location
+
+-------------------------------------------------------------------
Old:
----
mcstrans-0.3.3-initscript.patch
New:
----
mcstrans-0.3.3-writepid.patch
mcstransd.service
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mcstrans.spec ++++++
--- /var/tmp/diff_new_pack.FJm16A/_old 2014-09-09 19:00:16.000000000 +0200
+++ /var/tmp/diff_new_pack.FJm16A/_new 2014-09-09 19:00:16.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package mcstrans
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products 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,14 +24,18 @@
License: GPL-2.0+
Group: System/Management
Source: %{name}-%{version}.tgz
-Patch0: %{name}-%{version}-initscript.patch
+Source1: mcstransd.service
+Patch0: %{name}-%{version}-writepid.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Requires: aaa_base
+BuildRequires: aaa_base
BuildRequires: libcap-devel
BuildRequires: libselinux-devel >= 1.30.3
BuildRequires: libsepol-devel-static
BuildRequires: pcre-devel
+BuildRequires: systemd
+%{?systemd_requires}
Provides: setransd
-PreReq: %insserv_prereq %fillup_prereq
%description
Security-enhanced Linux is a feature of the Linux® kernel and a number
@@ -49,7 +53,7 @@
%prep
%setup -q
-%patch0
+%patch0 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
@@ -58,29 +62,33 @@
%install
mkdir -p $RPM_BUILD_ROOT/%{_lib}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
+mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="$RPM_BUILD_ROOT%{_libdir}" SHLIBDIR="$RPM_BUILD_ROOT/%{_lib}" install
rm -f $RPM_BUILD_ROOT%{_sbindir}/*
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
-install -D -m 0755 $RPM_BUILD_ROOT/etc/rc.d/init.d/mcstrans $RPM_BUILD_ROOT/etc/init.d/mcstrans
+rm $RPM_BUILD_ROOT/etc/rc.d/init.d/mcstrans
+install -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/
rm -rf $RPM_BUILD_ROOT/etc/rc.d
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
-ln -sf ../../etc/init.d/mcstrans $RPM_BUILD_ROOT%{_sbindir}/rcmcstrans
+ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcmcstransd
%post
-%fillup_and_insserv mcstrans
+%service_add_post mcstransd.service
%preun
-%stop_on_removal mcstrans
+%service_del_preun mcstransd.service
%postun
-%restart_on_update mcstrans
-%insserv_cleanup
+%service_del_postun mcstransd.service
+
+%pre
+%service_add_pre mcstransd.service
%files
%defattr(-,root,root)
-%{_sysconfdir}/init.d/mcstrans
-%{_sbindir}/rcmcstrans
+%{_unitdir}/mcstransd.service
/sbin/mcstransd
+/usr/sbin/rcmcstransd
%{_mandir}/man8/mcs.8*
%{_mandir}/man8/mcstransd.8*
%{_mandir}/man8/setrans.conf.8*
++++++ mcstrans-0.3.3-writepid.patch ++++++
diff -up mcstrans-0.3.2/src/mcstransd.c.writepid mcstrans-0.3.2/src/mcstransd.c
--- mcstrans-0.3.2/src/mcstransd.c.writepid 2011-01-05 10:32:25.000000000 -0500
+++ mcstrans-0.3.2/src/mcstransd.c 2012-02-01 16:14:02.085806490 -0500
@@ -4,6 +4,7 @@
#include
participants (1)
-
root@hilbert.suse.de