From 6e9ce1a014ccb7072764e662aab83e8a2edd9ace Mon Sep 17 00:00:00 2001 From: Sergio Correia Date: Tue, 8 Sep 2020 10:34:44 -0300 Subject: [PATCH] Suppress output in %pre scriptlet when adjusting users/groups This approach is also used in other packages, e.g., systemd. Resolves: rhbz#1876729 --- clevis.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/clevis.spec b/clevis.spec index bf7adb6..19c5d06 100644 --- a/clevis.spec +++ b/clevis.spec @@ -1,6 +1,6 @@ Name: clevis Version: 14 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Automated decryption framework License: GPLv3+ @@ -118,13 +118,13 @@ desktop-file-validate \ %meson_test %pre -getent group %{name} >/dev/null || groupadd -r %{name} +getent group %{name} >/dev/null || groupadd -r %{name} &>/dev/null getent passwd %{name} >/dev/null || \ useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \ - -c "Clevis Decryption Framework unprivileged user" %{name} + -c "Clevis Decryption Framework unprivileged user" %{name} &>/dev/null # Add clevis user to tss group. if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then - usermod -a -G tss %{name} + usermod -a -G tss %{name} &>/dev/null fi exit 0 @@ -184,6 +184,10 @@ exit 0 %attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2 %changelog +* Tue Sep 08 2020 Sergio Correia - 14-5 +- Suppress output in pre scriptlet when adjusting users/groups + Resolves: rhbz#1876729 + * Tue Sep 08 2020 Sergio Correia - 14-4 - Backport upstream PR#230 - clevis-luks-askpass now exits cleanly when receives a SIGTERM