cef823f
Name:           clevis
8a78fae
Version:        18
41f0cc2
Release:        2%{?dist}
cef823f
Summary:        Automated decryption framework
cef823f
cef823f
License:        GPLv3+
cef823f
URL:            https://github.com/latchset/%{name}
db769ff
Source0:        https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
cef823f
41f0cc2
Patch0001: 0001-systemd-account-for-unlocking-failures-in-clevis-luk.patch
41f0cc2
51c7134
BuildRequires:  git-core
Igor Gnatenko 9fe295c
BuildRequires:  gcc
db769ff
BuildRequires:  meson
db769ff
BuildRequires:  asciidoc
db769ff
BuildRequires:  ninja-build
db769ff
BuildRequires:  bash-completion
db769ff
536be1e
BuildRequires:  libjose-devel >= 8
e39c2e5
BuildRequires:  libluksmeta-devel >= 8
e39c2e5
BuildRequires:  audit-libs-devel
cef823f
BuildRequires:  libudisks2-devel
cef823f
BuildRequires:  openssl-devel
cef823f
bff126b
BuildRequires:  tpm2-tools >= 3.0.0
cef823f
BuildRequires:  desktop-file-utils
cef823f
BuildRequires:  pkgconfig
cef823f
BuildRequires:  systemd
cef823f
BuildRequires:  dracut
52a6475
BuildRequires:  tang >= 6
536be1e
BuildRequires:  curl
Sergio Correia 01ab2d4
BuildRequires:  cracklib-dicts
c3193c3
BuildRequires:  luksmeta
c3193c3
BuildRequires:  openssl
f809e95
BuildRequires:  diffutils
fe7d673
BuildRequires:  cryptsetup
f809e95
BuildRequires:  jq
cef823f
262c5de
Requires:       tpm2-tools >= 3.0.0
cef823f
Requires:       coreutils
536be1e
Requires:       jose >= 8
536be1e
Requires:       curl
226c6fd
Requires:       jq
5fd422d
Requires(pre):  shadow-utils
Benjamin Gilbert 1c516e4
Recommends:     cracklib-dicts
027831d
Recommends:     clevis-pin-tpm2
cef823f
cef823f
%description
cef823f
Clevis is a framework for automated decryption. It allows you to encrypt
cef823f
data using sophisticated unlocking policies which enable decryption to
cef823f
occur automatically.
cef823f
cef823f
The clevis package provides basic encryption/decryption policy support.
cef823f
Users can use this directly; but most commonly, it will be used as a
cef823f
building block for other packages. For example, see the clevis-luks
cef823f
and clevis-dracut packages for automatic root volume unlocking of LUKSv1
cef823f
volumes during early boot.
cef823f
cef823f
%package luks
f809e95
Summary:        LUKS integration for clevis
cef823f
Requires:       %{name}%{?_isa} = %{version}-%{release}
cef823f
Requires:       cryptsetup
e39c2e5
Requires:       luksmeta >= 8
cef823f
cef823f
%description luks
f809e95
LUKS integration for clevis. This package allows you to bind a LUKS
cef823f
volume to a clevis unlocking policy. For automated unlocking, an unlocker
cef823f
will also be required. See, for example, clevis-dracut and clevis-udisks2.
cef823f
e39c2e5
%package systemd
e39c2e5
Summary:        systemd integration for clevis
e39c2e5
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
e39c2e5
%if 0%{?fedora} > 27
e39c2e5
Requires:       systemd%{?_isa} >= 235-3
e39c2e5
%else
e39c2e5
%if 0%{?fedora} == 27
e39c2e5
Requires:       systemd%{?_isa} >= 234-9
e39c2e5
%else
e39c2e5
%if 0%{?fedora} == 26
e39c2e5
Requires:       systemd%{?_isa} >= 233-7
e39c2e5
%else
e39c2e5
Requires:       systemd%{?_isa} >= 236
e39c2e5
%endif
e39c2e5
%endif
e39c2e5
%endif
e39c2e5
e39c2e5
%description systemd
f809e95
Automatically unlocks LUKS _netdev block devices from /etc/crypttab.
e39c2e5
cef823f
%package dracut
cef823f
Summary:        Dracut integration for clevis
e39c2e5
Requires:       %{name}-systemd%{?_isa} = %{version}-%{release}
cef823f
Requires:       dracut-network
cef823f
cef823f
%description dracut
f809e95
Automatically unlocks LUKS block devices in early boot.
cef823f
cef823f
%package udisks2
cef823f
Summary:        UDisks2/Storaged integration for clevis
cef823f
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
cef823f
cef823f
%description udisks2
f809e95
Automatically unlocks LUKS block devices in desktop environments that
cef823f
use UDisks2 or storaged (like GNOME).
cef823f
cef823f
%prep
152a9bf
%autosetup -S git
cef823f
cef823f
%build
db769ff
%meson -Duser=clevis -Dgroup=clevis
db769ff
%meson_build
cef823f
cef823f
%install
db769ff
%meson_install
cef823f
cef823f
%check
cef823f
desktop-file-validate \
cef823f
  %{buildroot}/%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
db769ff
%meson_test
cef823f
5fd422d
%pre
6591584
getent group %{name} >/dev/null || groupadd -r %{name} &>/dev/null
042f090
getent passwd %{name} >/dev/null || \
042f090
    useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
6591584
    -c "Clevis Decryption Framework unprivileged user" %{name} &>/dev/null
027831d
# Add clevis user to tss group.
027831d
if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then
6591584
    usermod -a -G tss %{name} &>/dev/null
027831d
fi
042f090
exit 0
042f090
3657f1c
%posttrans
3657f1c
# In case the clevis-luks-askpass is enabled, make sure it's using the
3657f1c
# correct target, which changed in v14.
3657f1c
[ "$(find /etc/systemd/system/ -name "clevis-luks-askpass*")" ] || exit 0
3657f1c
find /etc/systemd/system/ -name "clevis-luks-askpass*" \
3657f1c
     | grep -q cryptsetup.target.wants && exit 0
3657f1c
3657f1c
find /etc/systemd/system/ -name "clevis-luks-askpass*" -exec rm {} +
3657f1c
systemctl enable clevis-luks-askpass.path >/dev/null 2>&1 || :
3657f1c
exit 0
3657f1c
cef823f
%files
cef823f
%license COPYING
db769ff
%{_datadir}/bash-completion/
536be1e
%{_bindir}/%{name}-decrypt-tang
262c5de
%{_bindir}/%{name}-decrypt-tpm2
536be1e
%{_bindir}/%{name}-decrypt-sss
536be1e
%{_bindir}/%{name}-decrypt
536be1e
%{_bindir}/%{name}-encrypt-tang
262c5de
%{_bindir}/%{name}-encrypt-tpm2
536be1e
%{_bindir}/%{name}-encrypt-sss
cef823f
%{_bindir}/%{name}
536be1e
%{_mandir}/man1/%{name}-encrypt-tang.1*
262c5de
%{_mandir}/man1/%{name}-encrypt-tpm2.1*
536be1e
%{_mandir}/man1/%{name}-encrypt-sss.1*
536be1e
%{_mandir}/man1/%{name}-decrypt.1*
536be1e
%{_mandir}/man1/%{name}.1*
cef823f
cef823f
%files luks
3738853
%{_mandir}/man7/%{name}-luks-unlockers.7*
e39c2e5
%{_mandir}/man1/%{name}-luks-unlock.1*
93bca47
%{_mandir}/man1/%{name}-luks-unbind.1*
e39c2e5
%{_mandir}/man1/%{name}-luks-bind.1*
f809e95
%{_mandir}/man1/%{name}-luks-list.1.*
878dc4a
%{_mandir}/man1/%{name}-luks-edit.1.*
878dc4a
%{_mandir}/man1/%{name}-luks-regen.1.*
878dc4a
%{_mandir}/man1/%{name}-luks-report.1.*
51c7134
%{_mandir}/man1/%{name}-luks-pass.1.*
e39c2e5
%{_bindir}/%{name}-luks-unlock
93bca47
%{_bindir}/%{name}-luks-unbind
e39c2e5
%{_bindir}/%{name}-luks-bind
f809e95
%{_bindir}/%{name}-luks-common-functions
f809e95
%{_bindir}/%{name}-luks-list
878dc4a
%{_bindir}/%{name}-luks-edit
878dc4a
%{_bindir}/%{name}-luks-regen
878dc4a
%{_bindir}/%{name}-luks-report
51c7134
%{_bindir}/%{name}-luks-pass
e39c2e5
e39c2e5
%files systemd
e39c2e5
%{_libexecdir}/%{name}-luks-askpass
e39c2e5
%{_unitdir}/%{name}-luks-askpass.path
e39c2e5
%{_unitdir}/%{name}-luks-askpass.service
cef823f
cef823f
%files dracut
cef823f
%{_prefix}/lib/dracut/modules.d/60%{name}
402b5b8
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-sss/module-setup.sh
402b5b8
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-tang/module-setup.sh
402b5b8
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-tpm2/module-setup.sh
cef823f
cef823f
%files udisks2
cef823f
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
cef823f
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
cef823f
cef823f
%changelog
41f0cc2
* Fri Oct 29 2021 Sergio Correia <scorreia@redhat.com> - 18-2
41f0cc2
  Account for unlocking failures in clevis-luks-askpass
41f0cc2
  Resolves: rhbz#1878892
41f0cc2
8a78fae
* Thu Apr 15 2021 Sergio Correia <scorreia@redhat.com> - 18-1
8a78fae
- Update to new clevis upstream release, v18.
8a78fae
1e6ebd6
* Wed Apr 14 2021 Sergio Correia <scorreia@redhat.com> - 17-1
1e6ebd6
- Update to new clevis upstream release, v17.
1e6ebd6
fe7d673
* Tue Mar 16 2021 Sergio Correia <scorreia@redhat.com> - 16-2
fe7d673
- Fix for -t option in clevis luks bind - backport upstream commit ea0d0c20
fe7d673
51c7134
* Tue Feb 09 2021 Sergio Correia <scorreia@redhat.com> - 16-1
51c7134
- Update to new clevis upstream release, v16.
51c7134
226c6fd
* Thu Oct 29 2020 Sergio Correia <scorreia@redhat.com> - 15-2
226c6fd
- Add jq to dependencies
226c6fd
878dc4a
* Wed Oct 28 2020 Sergio Correia <scorreia@redhat.com> - 15-1
878dc4a
- Update to new clevis upstream release, v15.
878dc4a
6591584
* Tue Sep 08 2020 Sergio Correia <scorreia@redhat.com> - 14-4
6591584
- Suppress output in pre scriptlet when adjusting users/groups
6591584
  Resolves: rhbz#1876729
6591584
2f39b9a
* Tue Sep 08 2020 Sergio Correia <scorreia@redhat.com> - 14-3
2f39b9a
- Backport upstream PR#230 - clevis-luks-askpass now exits cleanly
2f39b9a
  when receives a SIGTERM
2f39b9a
  Resolves: rhbz#1876001
2f39b9a
3657f1c
* Sat Sep 05 2020 Sergio Correia <scorreia@redhat.com> - 14-2
3657f1c
- If clevis-luks-askpass is enabled, it may be using a wrong target,
3657f1c
  since that changed in v14. Check and update it, if required.
3657f1c
027831d
* Mon Aug 31 2020 Sergio Correia <scorreia@redhat.com> - 14-1
027831d
- Update to new clevis upstream release, v14.
027831d
Benjamin Gilbert 1c516e4
* Sun Aug 02 2020 Benjamin Gilbert <bgilbert@redhat.com> - 13-3
Benjamin Gilbert 1c516e4
- Downgrade cracklib-dicts to Recommends
Benjamin Gilbert 1c516e4
5437116
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 13-2
5437116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5437116
f809e95
* Sun May 10 2020 Sergio Correia <scorreia@redhat.com> - 13-1
f809e95
- Update to new clevis upstream release, v13.
f809e95
f809e95
* Thu May 07 2020 Sergio Correia <scorreia@redhat.com> - 12-4
Sergio Correia 01ab2d4
- cracklib-dicts should be also listed as a build dependency, since
Sergio Correia 01ab2d4
  it's required for running some of the tests
Sergio Correia 01ab2d4
Sergio Correia da1cc2c
* Mon Apr 06 2020 Sergio Correia <scorreia@redhat.com> - 12-3
Sergio Correia da1cc2c
- Make cracklib-dicts a regular dependency
Sergio Correia da1cc2c
46bbd21
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12-2
46bbd21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
46bbd21
402b5b8
* Mon Jan 20 2020 Sergio Correia <scorreia@redhat.com> - 12-1
402b5b8
- Update to new clevis upstream release, v12.
402b5b8
e9acb55
* Thu Dec 19 2019 Sergio Correia <scorreia@redhat.com> - 11-11
e9acb55
- Backport upstream PR#70 - Handle case where we try to use a partially
e9acb55
  used luksmeta slot
e9acb55
  Resolves: rhbz#1672371
e9acb55
745ee46
* Thu Dec 05 2019 Sergio Correia <scorreia@redhat.com> - 11-10
745ee46
- Disable LUKS2 tests for now, since they fail randomly in Koji
745ee46
  builders, killing the build
745ee46
c3193c3
* Wed Dec 04 2019 Sergio Correia <scorreia@redhat.com> - 11-9
c3193c3
- Backport of upstream patches and the following fixes:
c3193c3
  - Rework the logic for reading the existing key
c3193c3
  - fix for different output from 'luksAddKey' command w/cryptsetup v2.0.2 (
c3193c3
  - pins/tang: check that key derivation key is available
c3193c3
b1fb02f
* Wed Oct 30 2019 Peter Robinson <pbrobinson@fedoraproject.org> 11-8
b1fb02f
- Drop need network patch
b1fb02f
0f1aa4e
* Fri Sep 06 2019 Javier Martinez Canillas <javierm@redhat.com> - 11-7
0f1aa4e
- Add support for tpm2-tools 4.0
0f1aa4e
03eb6fb
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11-6
03eb6fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
03eb6fb
4e89fd4
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11-5
4e89fd4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4e89fd4
8da96d5
* Thu Dec  6 2018 Peter Robinson <pbrobinson@fedoraproject.org> 11-4
8da96d5
- Update patch for work around
8da96d5
85b667e
* Thu Dec  6 2018 Peter Robinson <pbrobinson@fedoraproject.org> 11-3
85b667e
- Work around network requirement for early boot
85b667e
41ad3f9
* Fri Nov 09 2018 Javier Martinez Canillas <javierm@redhat.com> - 11-2
41ad3f9
- Delete remaining references to the removed http pin
41ad3f9
- Install cryptsetup and tpm2_pcrlist in the initramfs
41ad3f9
- Add device TCTI library to the initramfs
41ad3f9
  Resolves: rhbz#1644876
41ad3f9
41ad3f9
* Tue Aug 14 2018 Nathaniel McCallum <npmccallum@redhat.com> - 11-1
db769ff
- Update to v11
db769ff
81704e5
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10-2
81704e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
81704e5
93bca47
* Wed Mar 21 2018 Nathaniel McCallum <npmccallum@redhat.com> - 10-1
93bca47
- Update to v10
93bca47
262c5de
* Tue Feb 13 2018 Nathaniel McCallum <npmccallum@redhat.com> - 9-1
262c5de
- Update to v9
262c5de
1065982
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8-2
1065982
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1065982
3738853
* Mon Nov 13 2017 Nathaniel McCallum <npmccallum@redhat.com> - 8-1
3738853
- Update to v8
3738853
2333aac
* Wed Nov 08 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 7-2
2333aac
- Rebuild for cryptsetup-2.0.0
2333aac
e39c2e5
* Fri Oct 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 7-1
e39c2e5
- Update to v7
e39c2e5
96a509e
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-3
96a509e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
96a509e
233d695
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-2
233d695
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
233d695
5fd422d
* Tue Jun 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 6-1
5fd422d
- New upstream release
5fd422d
- Specify unprivileged user/group during configuration
5fd422d
- Move clevis user/group creation to base clevis package
5fd422d
042f090
* Mon Jun 26 2017 Nathaniel McCallum <npmccallum@redhat.com> - 5-1
042f090
- New upstream release
042f090
- Run clevis decryption from udisks2 under an unprivileged user
042f090
61115a6
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 4-1
61115a6
- New upstream release
61115a6
536be1e
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 3-1
536be1e
- New upstream release
536be1e
8161af8
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2-2
8161af8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8161af8
cef823f
* Fri Nov 18 2016 Nathaniel McCallum <npmccallum@redhat.com> - 2-1
cef823f
- New upstream release
cef823f
cef823f
* Mon Nov 14 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1-1
cef823f
- First release