From aedbfaae21e6518d825848ebfa0a3fc45fd99b8c Mon Sep 17 00:00:00 2001 From: Sergio Correia Date: Sat, 5 Sep 2020 12:01:15 -0300 Subject: [PATCH] Make sure clevis-luks-askpass is using the correct path, if enabled --- clevis.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/clevis.spec b/clevis.spec index 5b3fbef..47462eb 100644 --- a/clevis.spec +++ b/clevis.spec @@ -1,6 +1,6 @@ Name: clevis Version: 14 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Automated decryption framework License: GPLv3+ @@ -126,6 +126,17 @@ if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then fi exit 0 +%posttrans +# In case the clevis-luks-askpass is enabled, make sure it's using the +# correct target, which changed in v14. +[ "$(find /etc/systemd/system/ -name "clevis-luks-askpass*")" ] || exit 0 +find /etc/systemd/system/ -name "clevis-luks-askpass*" \ + | grep -q cryptsetup.target.wants && exit 0 + +find /etc/systemd/system/ -name "clevis-luks-askpass*" -exec rm {} + +systemctl enable clevis-luks-askpass.path >/dev/null 2>&1 || : +exit 0 + %files %license COPYING %{_datadir}/bash-completion/ @@ -171,6 +182,10 @@ exit 0 %attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2 %changelog +* Sat Sep 05 2020 Sergio Correia - 14-3 +- If clevis-luks-askpass is enabled, it may be using a wrong target, + since that changed in v14. Check and update it, if required. + * Mon Aug 31 2020 Sergio Correia - 14-2 - Update sources file with new v14 release.