Apply systemd-preset in clevis-systemd postinstall
This change calls "systemd preset" command after clevis-systemd postinstall, so that it applies distro global policies after installation, allowing to start the service when global policies indicate so Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
This commit is contained in:
parent
1b2bdf29ff
commit
fb2f34f129
20
clevis.spec
20
clevis.spec
@ -1,6 +1,6 @@
|
|||||||
Name: clevis
|
Name: clevis
|
||||||
Version: 18
|
Version: 18
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: Automated decryption framework
|
Summary: Automated decryption framework
|
||||||
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -45,6 +45,7 @@ Requires: jose >= 8
|
|||||||
Requires: curl
|
Requires: curl
|
||||||
Requires: jq
|
Requires: jq
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
|
Requires(post): systemd
|
||||||
Recommends: cracklib-dicts
|
Recommends: cracklib-dicts
|
||||||
Recommends: clevis-pin-tpm2
|
Recommends: clevis-pin-tpm2
|
||||||
|
|
||||||
@ -130,17 +131,6 @@ if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then
|
|||||||
fi
|
fi
|
||||||
exit 0
|
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
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_datadir}/bash-completion/
|
%{_datadir}/bash-completion/
|
||||||
@ -194,7 +184,13 @@ exit 0
|
|||||||
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
|
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
|
||||||
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
|
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
|
||||||
|
|
||||||
|
%post systemd
|
||||||
|
systemctl preset %{name}-luks-askpass.path >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 28 2022 Sergio Arroutbi <sarroutb@redhat.com> - 18-7
|
||||||
|
Start clevis-luks-askpass.patch service according to global policy
|
||||||
|
|
||||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 18-6
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 18-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user