cef823f
%global _hardened_build 1
cef823f
cef823f
Name:           clevis
db769ff
Version:        11
a8c1d82
Release:        6%{?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
41ad3f9
Patch0: Delete-remaining-references-to-the-removed-http-pin.patch
41ad3f9
Patch1: Install-cryptsetup-and-tpm2_pcrlist-in-the-initramfs.patch
41ad3f9
Patch2: Add-device-TCTI-library-to-the-initramfs.patch
85b667e
Patch3: 0001-Drop-rd.neednet-1-for-the-time-being-so-tpm2-unlock-.patch
a8c1d82
Patch4: 0001-Backport-upstream-tests-and-fixes.patch
a8c1d82
Patch5: 0002-Handle-case-where-we-try-to-use-a-partially-used-luk.patch
41ad3f9
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
a8c1d82
BuildRequires:  cracklib-dicts
a8c1d82
BuildRequires:  luksmeta
a8c1d82
BuildRequires:  openssl
cef823f
262c5de
Requires:       tpm2-tools >= 3.0.0
cef823f
Requires:       coreutils
536be1e
Requires:       jose >= 8
536be1e
Requires:       curl
5fd422d
Requires(pre):  shadow-utils
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
cef823f
Summary:        LUKSv1 integration for clevis
cef823f
Requires:       %{name}%{?_isa} = %{version}-%{release}
cef823f
Requires:       cryptsetup
e39c2e5
Requires:       luksmeta >= 8
cef823f
cef823f
%description luks
cef823f
LUKSv1 integration for clevis. This package allows you to bind a LUKSv1
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
Requires:       nc
e39c2e5
e39c2e5
%description systemd
e39c2e5
Automatically unlocks LUKSv1 _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
cef823f
Automatically unlocks LUKSv1 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
cef823f
Automatically unlocks LUKSv1 block devices in desktop environments that
cef823f
use UDisks2 or storaged (like GNOME).
cef823f
cef823f
%prep
41ad3f9
%autosetup -p1
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
042f090
getent group %{name} >/dev/null || groupadd -r %{name}
042f090
getent passwd %{name} >/dev/null || \
042f090
    useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
042f090
    -c "Clevis Decryption Framework unprivileged user" %{name}
042f090
exit 0
042f090
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*
e39c2e5
%{_bindir}/%{name}-luks-unlock
93bca47
%{_bindir}/%{name}-luks-unbind
e39c2e5
%{_bindir}/%{name}-luks-bind
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}
cef823f
cef823f
%files udisks2
cef823f
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
cef823f
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
cef823f
cef823f
%changelog
a8c1d82
* Thu Dec 19 2019 Sergio Correia <scorreia@redhat.com> - 11-6
a8c1d82
- Backport of upstream tests and the following fixes:
a8c1d82
  - Rework the logic for reading the existing key
a8c1d82
  - fix for different output from 'luksAddKey' command w/cryptsetup v2.0.2 (
a8c1d82
  - pins/tang: check that key derivation key is available
a8c1d82
- Backport of upstream PR#70 - Handle case where we try to use a partially
a8c1d82
  used luksmeta slot
a8c1d82
  Resolves: rhbz#1672371
a8c1d82
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