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.