- fixed broken systemd service unit (bnc#1066123). the service unit file in

the upstream distribution tarball is already configured and looks for
  binaries and configuration files in the /usr/local prefix which is wrong.

OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-abrmd?expand=0&rev=11
This commit is contained in:
Matthias Gerstner 2017-11-15 11:44:33 +00:00 committed by Git OBS Bridge
parent aef1f3004c
commit b981d03939
4 changed files with 86 additions and 1 deletions

42
fix_service_paths.diff Normal file
View File

@ -0,0 +1,42 @@
Index: tpm2-abrmd-1.1.1/dist/tpm2-abrmd.service
===================================================================
--- tpm2-abrmd-1.1.1.orig/dist/tpm2-abrmd.service
+++ /dev/null
@@ -1,16 +0,0 @@
-# copy this file into /etc/systemd/system
-[Unit]
-Description=TPM2 Access Broker and Resource Management Daemon
-
-[Service]
-Type=dbus
-Restart=always
-RestartSec=5
-EnvironmentFile=-/usr/local/etc/default/tpm2-abrmd
-BusName=com.intel.tss2.Tabrmd
-StandardOutput=syslog
-ExecStart=/usr/local/sbin/tpm2-abrmd
-User=tss
-
-[Install]
-WantedBy=multi-user.target
Index: tpm2-abrmd-1.1.1/dist/tpm2-abrmd.service.in
===================================================================
--- /dev/null
+++ tpm2-abrmd-1.1.1/dist/tpm2-abrmd.service.in
@@ -0,0 +1,16 @@
+# copy this file into /etc/systemd/system
+[Unit]
+Description=TPM2 Access Broker and Resource Management Daemon
+
+[Service]
+Type=dbus
+Restart=always
+RestartSec=5
+EnvironmentFile=-@sysconfdir@/default/tpm2-abrmd
+BusName=com.intel.tss2.Tabrmd
+StandardOutput=syslog
+ExecStart=@SBINDIR@/tpm2-abrmd
+User=tss
+
+[Install]
+WantedBy=multi-user.target

35
service_path.patch Normal file
View File

@ -0,0 +1,35 @@
Index: tpm2-abrmd-1.1.1/dist/tpm2-abrmd.service
===================================================================
--- tpm2-abrmd-1.1.1.orig/dist/tpm2-abrmd.service
+++ /dev/null
@@ -1,16 +0,0 @@
-# copy this file into /etc/systemd/system
-[Unit]
-Description=TPM2 Access Broker and Resource Management Daemon
-
-[Service]
-Type=dbus
-Restart=always
-RestartSec=5
-EnvironmentFile=-/usr/local/etc/default/tpm2-abrmd
-BusName=com.intel.tss2.Tabrmd
-StandardOutput=syslog
-ExecStart=/usr/local/sbin/tpm2-abrmd
-User=tss
-
-[Install]
-WantedBy=multi-user.target
Index: tpm2-abrmd-1.1.1/dist/tpm2-abrmd.service.in
===================================================================
+++ tpm2-abrmd-1.1.1/dist/tpm2-abrmd.service.in
@@ -6,10 +6,10 @@ Description=TPM2 Access Broker and Resou
+Type=dbus
+Restart=always
+RestartSec=5
+EnvironmentFile=-@sysconfdir@/default/tpm2-abrmd
+BusName=com.intel.tss2.Tabrmd
+StandardOutput=syslog
+ExecStart=@SBINDIR@/tpm2-abrmd
+User=tss
+
+[Install]

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Nov 15 11:43:19 UTC 2017 - matthias.gerstner@suse.com
- fixed broken systemd service unit (bnc#1066123). the service unit file in
the upstream distribution tarball is already configured and looks for
binaries and configuration files in the /usr/local prefix which is wrong.
-------------------------------------------------------------------
Fri Sep 1 14:37:48 UTC 2017 - matthias.gerstner@suse.com

View File

@ -35,6 +35,7 @@ BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(sapi)
Requires(pre): pwdutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: fix_service_paths.diff
%description
The tpm2.0-abrmd package provides the TPM2 Access Broker & Resource Manager.
@ -65,7 +66,7 @@ use with the SAPI library (libsapi) like any other TCTI.
%prep
%setup -q -n tpm2-abrmd-%{version}
# %%patch0 -p1
%patch0 -p1
%build
export CFLAGS="%optflags -fPIE"