From b981d0393908fdd8fe8b83fa7506ec846b8678b9a6cc4a6930a9f109fb601ba1 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Wed, 15 Nov 2017 11:44:33 +0000 Subject: [PATCH 1/3] - 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 --- fix_service_paths.diff | 42 ++++++++++++++++++++++++++++++++++++++++++ service_path.patch | 35 +++++++++++++++++++++++++++++++++++ tpm2.0-abrmd.changes | 7 +++++++ tpm2.0-abrmd.spec | 3 ++- 4 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 fix_service_paths.diff create mode 100644 service_path.patch diff --git a/fix_service_paths.diff b/fix_service_paths.diff new file mode 100644 index 0000000..b42d44a --- /dev/null +++ b/fix_service_paths.diff @@ -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 diff --git a/service_path.patch b/service_path.patch new file mode 100644 index 0000000..305ad12 --- /dev/null +++ b/service_path.patch @@ -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] diff --git a/tpm2.0-abrmd.changes b/tpm2.0-abrmd.changes index b172d0f..89700de 100644 --- a/tpm2.0-abrmd.changes +++ b/tpm2.0-abrmd.changes @@ -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 diff --git a/tpm2.0-abrmd.spec b/tpm2.0-abrmd.spec index f3dfbb1..b42ea12 100644 --- a/tpm2.0-abrmd.spec +++ b/tpm2.0-abrmd.spec @@ -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" From 177ba372463934d99d324695033919b0b7d991575de16b4b42f743565859b346 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Wed, 15 Nov 2017 12:20:34 +0000 Subject: [PATCH 2/3] - service_path.patch: 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=12 --- tpm2.0-abrmd.changes | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tpm2.0-abrmd.changes b/tpm2.0-abrmd.changes index 89700de..244dab1 100644 --- a/tpm2.0-abrmd.changes +++ b/tpm2.0-abrmd.changes @@ -1,9 +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. +- service_path.patch: 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 From 45aa70719e6fffeb7de2271fef961cb2294c7fb99e85a41d44b6719cfd10b1b9 Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Wed, 15 Nov 2017 12:21:15 +0000 Subject: [PATCH 3/3] removed bogus patch, added patch name to changes file. OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-abrmd?expand=0&rev=13 --- service_path.patch | 35 ----------------------------------- tpm2.0-abrmd.changes | 2 +- 2 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 service_path.patch diff --git a/service_path.patch b/service_path.patch deleted file mode 100644 index 305ad12..0000000 --- a/service_path.patch +++ /dev/null @@ -1,35 +0,0 @@ -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] diff --git a/tpm2.0-abrmd.changes b/tpm2.0-abrmd.changes index 244dab1..4526bdc 100644 --- a/tpm2.0-abrmd.changes +++ b/tpm2.0-abrmd.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Wed Nov 15 11:43:19 UTC 2017 - matthias.gerstner@suse.com -- service_path.patch: fixed broken systemd service unit (bnc#1066123). the +- fix_service_paths.diff: 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.