From 9608d38961cde66938861e89d2375213478bcefc Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Wed, 27 Jul 2022 13:54:14 +0000 Subject: [PATCH] tpm2-tss: align sysusers.d configuration to Fedora user/group allocation (rhbz#2103683) --- tpm2-tss-systemd-sysusers.conf | 2 ++ tpm2-tss.spec | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 tpm2-tss-systemd-sysusers.conf diff --git a/tpm2-tss-systemd-sysusers.conf b/tpm2-tss-systemd-sysusers.conf new file mode 100644 index 0000000..bf66465 --- /dev/null +++ b/tpm2-tss-systemd-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u tss 59 "Account used for TPM access" - - diff --git a/tpm2-tss.spec b/tpm2-tss.spec index c75a398..93e269b 100644 --- a/tpm2-tss.spec +++ b/tpm2-tss.spec @@ -5,7 +5,7 @@ Name: tpm2-tss Version: 3.2.0 -Release: 2%{?candidate:.%{candidate}}%{?dist} +Release: 3%{?candidate:.%{candidate}}%{?dist} Summary: TPM2.0 Software Stack # The entire source code is under BSD except implementation.h and tpmb.h which @@ -13,6 +13,7 @@ Summary: TPM2.0 Software Stack License: BSD and TCGL URL: https://github.com/tpm2-software/tpm2-tss Source0: https://github.com/tpm2-software/tpm2-tss/releases/download/%{version}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz +Source1: tpm2-tss-systemd-sysusers.conf # doxygen crash Patch0: tpm2-tss-3.0.0-doxygen.patch @@ -34,6 +35,7 @@ BuildRequires: libgcrypt-devel BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: systemd +BuildRequires: systemd-rpm-macros Requires(pre): shadow-utils %description @@ -63,16 +65,11 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %install %make_install find %{buildroot}%{_libdir} -type f -name \*.la -delete +rm %{buildroot}%{_sysusersdir}/tpm2-tss.conf +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/tpm2-tss.conf %pre -getent group tss >/dev/null || groupadd -f -g 59 -r tss -if ! getent passwd tss >/dev/null ; then - if ! getent passwd 59 >/dev/null ; then - useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss - else - useradd -r -g tss -d /dev/null -s /sbin/nologin -c "Account used for TPM access" tss - fi -fi +%sysusers_create_compat %{SOURCE1} exit 0 %ldconfig_scriptlets @@ -134,6 +131,10 @@ use tpm2-tss. %changelog +* Wed Jul 27 2022 Luca BRUNO - 3.2.0-3 +- Align sysusers.d configuration to Fedora user/group allocation + Resolves: rhbz#2103683 + * Sat Jul 23 2022 Fedora Release Engineering - 3.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild