From 2549f1db94d2b2bd2a99bcea8d4835dd3d4e07abb70db8554d2884ef63f3b4f9 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 6 Aug 2016 19:28:47 +0000 Subject: [PATCH] - added a systemd unit service file OBS-URL: https://build.opensuse.org/package/show/security/tpm2-0-tss?expand=0&rev=21 --- resourcemgr.service | 9 +++++++++ tpm2-0-tss.changes | 5 +++++ tpm2-0-tss.spec | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 resourcemgr.service diff --git a/resourcemgr.service b/resourcemgr.service new file mode 100644 index 0000000..9dcf41a --- /dev/null +++ b/resourcemgr.service @@ -0,0 +1,9 @@ +[Unit] +Description=TPM 2.0 Core Services Daemon + +[Service] +Type=forking +ExecStart=/usr/sbin/resourcemgr + +[Install] +WantedBy=multi-user.target diff --git a/tpm2-0-tss.changes b/tpm2-0-tss.changes index 756bd92..926511b 100644 --- a/tpm2-0-tss.changes +++ b/tpm2-0-tss.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Aug 6 19:28:27 UTC 2016 - meissner@suse.com + +- added a systemd unit service file + ------------------------------------------------------------------- Fri May 6 19:45:29 UTC 2016 - jengelh@inai.de diff --git a/tpm2-0-tss.spec b/tpm2-0-tss.spec index 4848e67..3c1dca0 100644 --- a/tpm2-0-tss.spec +++ b/tpm2-0-tss.spec @@ -24,11 +24,13 @@ License: BSD-2-Clause Group: Productivity/Security Url: https://github.com/01org/TPM2.0-TSS Source0: %{name}-%{version}.tar.gz +Source1: resourcemgr.service Source2: baselibs.conf BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: pkg-config +BuildRequires: systemd-rpm-macros Requires(pre): pwdutils BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -68,14 +70,30 @@ make %{?_smp_mflags} PTHREAD_LDFLAGS=-pthread %install %make_install find %{buildroot} -type f -name "*.la" -delete -print +install -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/resourcemgr.service +ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcresourcemgr %post -n libtss2-0 -p /sbin/ldconfig %postun -n libtss2-0 -p /sbin/ldconfig +%pre +%service_add_pre resourcemgr.service + +%post +%service_add_post resourcemgr.service + +%postun +%service_del_postun resourcemgr.service + +%preun +%service_del_preun resourcemgr.service + %files %defattr(-,root,root) %doc *.md ChangeLog LICENSE *.png %{_sbindir}/resourcemgr +/%{_unitdir}/resourcemgr.service +%{_sbindir}/rcresourcemgr %files devel %defattr(-,root,root)