Blame SPECS/clevis.spec

77fb27
%global _hardened_build 1
77fb27
77fb27
Name:           clevis
d78bb9
Version:        15
536bf0
Release:        11%{?dist}
77fb27
Summary:        Automated decryption framework
77fb27
77fb27
License:        GPLv3+
77fb27
URL:            https://github.com/latchset/%{name}
77fb27
Source0:        https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
77fb27
d78bb9
Patch0001: 0001-Fixes-for-dealing-with-newer-tang-without-tangd-upda.patch
d78bb9
Patch0002: 0002-Add-the-option-to-extract-luks-passphrase-used-for-b.patch
91b2d5
Patch0003: 0003-systemd-account-for-unlocking-failures-in-clevis-luk.patch
9742fa
Patch0004: 0004-systemd-drop-ncat-dependency.patch
9742fa
Patch0005: 0005-Stop-sending-stderr-to-the-void-when-decryption-does.patch
9742fa
Patch0006: 0006-luks-enable-debugging-in-clevis-scripts-when-rd.debu.patch
9742fa
Patch0007: 0007-luks-explicitly-specify-pbkdf-iterations-to-cryptset.patch
9742fa
Patch0008: 0008-tang-dump-url-on-error-communication.patch
9742fa
Patch0009: 0009-feat-rename-the-test-pin-to-null-pin.patch
536bf0
Patch0010: 0010-avoid-clevis-invalid-msg.patch
536bf0
Patch0011: 0011-Improve-boot-performance-by-removing-key-check.patch
77fb27
d78bb9
BuildRequires:  git
77fb27
BuildRequires:  gcc
77fb27
BuildRequires:  meson
77fb27
BuildRequires:  asciidoc
77fb27
BuildRequires:  ninja-build
77fb27
BuildRequires:  bash-completion
77fb27
77fb27
BuildRequires:  libjose-devel >= 8
77fb27
BuildRequires:  libluksmeta-devel >= 8
77fb27
BuildRequires:  audit-libs-devel
77fb27
BuildRequires:  libudisks2-devel
77fb27
BuildRequires:  openssl-devel
77fb27
77fb27
BuildRequires:  tpm2-tools >= 3.0.0
77fb27
BuildRequires:  desktop-file-utils
77fb27
BuildRequires:  pkgconfig
77fb27
BuildRequires:  systemd
77fb27
BuildRequires:  dracut
77fb27
BuildRequires:  tang >= 6
77fb27
BuildRequires:  curl
ef20f4
BuildRequires:  luksmeta
ef20f4
BuildRequires:  cracklib-dicts
9742fa
BuildRequires:  jq
ef20f4
BuildRequires:  diffutils
ef20f4
BuildRequires:  expect
3700a9
BuildRequires:  openssl
77fb27
3700a9
Requires:       cracklib-dicts
77fb27
Requires:       tpm2-tools >= 3.0.0
77fb27
Requires:       coreutils
77fb27
Requires:       jose >= 8
77fb27
Requires:       curl
3700a9
Requires:       jq
77fb27
Requires(pre):  shadow-utils
536bf0
Requires(post): systemd
77fb27
77fb27
%description
77fb27
Clevis is a framework for automated decryption. It allows you to encrypt
77fb27
data using sophisticated unlocking policies which enable decryption to
77fb27
occur automatically.
77fb27
77fb27
The clevis package provides basic encryption/decryption policy support.
77fb27
Users can use this directly; but most commonly, it will be used as a
77fb27
building block for other packages. For example, see the clevis-luks
3700a9
and clevis-dracut packages for automatic root volume unlocking of LUKS
77fb27
volumes during early boot.
77fb27
77fb27
%package luks
3700a9
Summary:        LUKS integration for clevis
77fb27
Requires:       %{name}%{?_isa} = %{version}-%{release}
77fb27
Requires:       cryptsetup
77fb27
Requires:       luksmeta >= 8
77fb27
77fb27
%description luks
3700a9
LUKS integration for clevis. This package allows you to bind a LUKS
77fb27
volume to a clevis unlocking policy. For automated unlocking, an unlocker
77fb27
will also be required. See, for example, clevis-dracut and clevis-udisks2.
77fb27
77fb27
%package systemd
77fb27
Summary:        systemd integration for clevis
77fb27
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
77fb27
%if 0%{?fedora} > 27
77fb27
Requires:       systemd%{?_isa} >= 235-3
77fb27
%else
77fb27
%if 0%{?fedora} == 27
77fb27
Requires:       systemd%{?_isa} >= 234-9
77fb27
%else
77fb27
%if 0%{?fedora} == 26
77fb27
Requires:       systemd%{?_isa} >= 233-7
77fb27
%else
77fb27
Requires:       systemd%{?_isa} >= 236
77fb27
%endif
77fb27
%endif
77fb27
%endif
77fb27
77fb27
%description systemd
3700a9
Automatically unlocks clevis-bound LUKS block devices during boot.
77fb27
77fb27
%package dracut
77fb27
Summary:        Dracut integration for clevis
77fb27
Requires:       %{name}-systemd%{?_isa} = %{version}-%{release}
77fb27
Requires:       dracut-network
77fb27
77fb27
%description dracut
3700a9
Automatically unlocks LUKS block devices in early boot.
77fb27
77fb27
%package udisks2
77fb27
Summary:        UDisks2/Storaged integration for clevis
77fb27
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
77fb27
77fb27
%description udisks2
3700a9
Automatically unlocks LUKS block devices in desktop environments that
77fb27
use UDisks2 or storaged (like GNOME).
77fb27
77fb27
%prep
3700a9
%autosetup -S git
77fb27
77fb27
%build
77fb27
%meson -Duser=clevis -Dgroup=clevis
77fb27
%meson_build
77fb27
77fb27
%install
77fb27
%meson_install
77fb27
77fb27
%check
77fb27
desktop-file-validate \
77fb27
  %{buildroot}/%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
77fb27
%meson_test
77fb27
77fb27
%pre
d78bb9
getent group %{name} >/dev/null || groupadd -r %{name} &>/dev/null
77fb27
getent passwd %{name} >/dev/null || \
77fb27
    useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
d78bb9
    -c "Clevis Decryption Framework unprivileged user" %{name} &>/dev/null
d78bb9
# Add clevis user to tss group.
d78bb9
if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then
d78bb9
    usermod -a -G tss %{name} &>/dev/null
d78bb9
fi
77fb27
exit 0
77fb27
536bf0
%post systemd
536bf0
systemctl preset %{name}-luks-askpass.path >/dev/null 2>&1 || :
ef20f4
77fb27
%files
77fb27
%license COPYING
77fb27
%{_datadir}/bash-completion/
77fb27
%{_bindir}/%{name}-decrypt-tang
77fb27
%{_bindir}/%{name}-decrypt-tpm2
77fb27
%{_bindir}/%{name}-decrypt-sss
9742fa
%{_bindir}/%{name}-decrypt-null
77fb27
%{_bindir}/%{name}-decrypt
77fb27
%{_bindir}/%{name}-encrypt-tang
77fb27
%{_bindir}/%{name}-encrypt-tpm2
77fb27
%{_bindir}/%{name}-encrypt-sss
9742fa
%{_bindir}/%{name}-encrypt-null
77fb27
%{_bindir}/%{name}
77fb27
%{_mandir}/man1/%{name}-encrypt-tang.1*
77fb27
%{_mandir}/man1/%{name}-encrypt-tpm2.1*
77fb27
%{_mandir}/man1/%{name}-encrypt-sss.1*
77fb27
%{_mandir}/man1/%{name}-decrypt.1*
77fb27
%{_mandir}/man1/%{name}.1*
77fb27
77fb27
%files luks
77fb27
%{_mandir}/man7/%{name}-luks-unlockers.7*
77fb27
%{_mandir}/man1/%{name}-luks-unlock.1*
77fb27
%{_mandir}/man1/%{name}-luks-unbind.1*
77fb27
%{_mandir}/man1/%{name}-luks-bind.1*
3700a9
%{_mandir}/man1/%{name}-luks-list.1*
3700a9
%{_mandir}/man1/%{name}-luks-pass.1*
ef20f4
%{_mandir}/man1/%{name}-luks-regen.1*
ef20f4
%{_mandir}/man1/%{name}-luks-report.1*
3700a9
%{_mandir}/man1/%{name}-luks-edit.1*
77fb27
%{_bindir}/%{name}-luks-unlock
77fb27
%{_bindir}/%{name}-luks-unbind
77fb27
%{_bindir}/%{name}-luks-bind
ef20f4
%{_bindir}/%{name}-luks-common-functions
3700a9
%{_bindir}/%{name}-luks-list
3700a9
%{_bindir}/%{name}-luks-pass
ef20f4
%{_bindir}/%{name}-luks-regen
ef20f4
%{_bindir}/%{name}-luks-report
3700a9
%{_bindir}/%{name}-luks-edit
77fb27
77fb27
%files systemd
77fb27
%{_libexecdir}/%{name}-luks-askpass
d78bb9
%{_unitdir}/%{name}-luks-askpass.path
d78bb9
%{_unitdir}/%{name}-luks-askpass.service
77fb27
77fb27
%files dracut
77fb27
%{_prefix}/lib/dracut/modules.d/60%{name}
9742fa
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-null
3700a9
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-sss
3700a9
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-tang
3700a9
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-tpm2
77fb27
77fb27
%files udisks2
77fb27
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
77fb27
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
77fb27
77fb27
%changelog
536bf0
* Tue Aug 02 2022 Sergio Arroutbi <sarroutb@redhat.com> - 15-11
536bf0
- Start clevis-luks-askpass.path service according to global policy
536bf0
  Resolves: rhbz#2107081
536bf0
536bf0
* Thu Jul 21 2022 Sergio Arroutbi <sarroutb@redhat.com> - 15-10
536bf0
- Improve boot performance by removing key check
536bf0
  Resolves: rhbz#2099748
536bf0
536bf0
* Wed Jun 22 2022 Sergio Arroutbi <sarroutb@redhat.com> - 15-9
536bf0
- Avoid invalid message for clevis command
536bf0
  Resolves: rhbz#2099325
536bf0
9742fa
* Wed Jan 26 2022 Sergio Correia <scorreia@redhat.com> - 15-8
9742fa
- Support a null pin
9742fa
  Resolves: rhbz#2028096
9742fa
9742fa
* Fri Jan 21 2022 Sergio Arroutbi <sarroutb@redhat.com> - 15-7
9742fa
- Dump server information on server error communication
9742fa
  Resolves: rhbz#2020193
9742fa
9742fa
* Tue Jan 04 2022 Sergio Correia <scorreia@redhat.com> - 15-6
9742fa
- Explicitly specify pbkdf iterations to cryptsetup
9742fa
  Resolves: rhbz#1979256
9742fa
9742fa
* Wed Dec 01 2021 Sergio Correia <scorreia@redhat.com> - 15-5
9742fa
- Enable debugging in clevis scripts when rd.debug is set
9742fa
  Resolves: rhbz#1980742
9742fa
9742fa
* Thu Nov 25 2021 Sergio Correia <scorreia@redhat.com> - 15-4
9742fa
- Stop sending stderr to the void when decryption doesn't happen
9742fa
  Resolves: rhbz#1976880
9742fa
9742fa
* Thu Nov 18 2021 Sergio Correia <scorreia@redhat.com> - 15-3
9742fa
- Drop ncat dependency
9742fa
  Resolves: rhbz#1949289
9742fa
9742fa
* Wed Nov 17 2021 Sergio Correia <scorreia@redhat.com> - 15-2
91b2d5
- Account for unlocking failures in clevis-luks-askpass
9742fa
  Resolves: rhbz#2018292
91b2d5
d78bb9
* Mon Oct 26 2020 Sergio Correia <scorreia@redhat.com> - 15-1
d78bb9
- Update to latest upstream release, v15
d78bb9
  Resolves: rhbz#1887836
d78bb9
  Resolves: rhbz#1853651
d78bb9
  Resolves: rhbz#1874460
d78bb9
3700a9
* Wed May 20 2020 Sergio Correia <scorreia@redhat.com> - 13-3
3700a9
- Add clevis luks edit command
3700a9
  Resolves: rhbz#1436735
3700a9
3700a9
* Mon May 18 2020 Sergio Correia <scorreia@redhat.com> - 13-2
3700a9
- Introduce -y (assume yes) argument to clevis luks bind
3700a9
  Resolves: rhbz#1819767
3700a9
3700a9
* Sun May 10 2020 Sergio Correia <scorreia@redhat.com> - 13-1
3700a9
- Update to new upstream release, v13
3700a9
  Resolves: rhbz#1827225
3700a9
  Resolves: rhbz#1827665
3700a9
  Resolves: rhbz#1801556
3700a9
  Resolves: rhbz#1784448
3700a9
  Resolves: rhbz#1826917
3700a9
  Resolves: rhbz#1812014
3700a9
3700a9
* Sun Feb 02 2020 Sergio Correia <scorreia@redhat.com> - 11-9
ef20f4
- Improve clevis luks regen not to unbind+bind in every case
ef20f4
  Resolves: rhbz#1795675
ef20f4
ef20f4
* Mon Jan 13 2020 Sergio Correia <scorreia@redhat.com> - 11-8
ef20f4
- Use one clevis-luks-askpass per device
ef20f4
  Resolves: rhbz#1784524
ef20f4
ef20f4
* Sat Nov 30 2019 Sergio Correia <scorreia@redhat.com> - 11-7
ef20f4
- Add rd.neednet=1 to cmdline only if there are devices bound to tang
ef20f4
  Resolves: rhbz#1762028
ef20f4
ef20f4
* Sat Nov 30 2019 Sergio Correia <scorreia@redhat.com> - 11-6
ef20f4
- Add option to extract luks passphrase used for binding
ef20f4
  Resolves: rhbz#1436780
ef20f4
ef20f4
* Thu Nov 28 2019 Sergio Correia <scorreia@redhat.com> - 11-5
ef20f4
- Add support for listing existing PBD policies in place
ef20f4
  Resolves: rhbz#1766526
ef20f4
ef20f4
* Fri Oct 18 2019 Sergio Correia <scorreia@redhat.com> - 11-4
ef20f4
- Improve error message when bind is given an invalid PIN
ef20f4
  Resolves: rhbz#1543380
ef20f4
ef20f4
* Wed Oct 16 2019 Sergio Correia <scorreia@redhat.com> - 11-3
ef20f4
- Add clevis luks report and regen
ef20f4
  Resolves: rhbz#1564566
ef20f4
  Resolves: rhbz#1564559
ef20f4
77fb27
* Fri Jan 04 2019 Daniel Kopecek <dkopecek@redhat.com> - 11-2
77fb27
- Check that key derivation key is available
77fb27
- Delete remaining references to the removed http pin
77fb27
- Install cryptsetup and tpm2_pcrlist in the initramfs
77fb27
- Add device TCTI library to the initramfs
77fb27
  Resolves: rhbz#1648004
77fb27
  Resolves: rhbz#1650246
77fb27
77fb27
* Tue Aug 14 2018 Nathaniel McCallum <npmccallum@redhat.com> - 11-1
77fb27
- Update to v11
77fb27
77fb27
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10-2
77fb27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
77fb27
77fb27
* Wed Mar 21 2018 Nathaniel McCallum <npmccallum@redhat.com> - 10-1
77fb27
- Update to v10
77fb27
77fb27
* Tue Feb 13 2018 Nathaniel McCallum <npmccallum@redhat.com> - 9-1
77fb27
- Update to v9
77fb27
77fb27
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8-2
77fb27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
77fb27
77fb27
* Mon Nov 13 2017 Nathaniel McCallum <npmccallum@redhat.com> - 8-1
77fb27
- Update to v8
77fb27
77fb27
* Wed Nov 08 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 7-2
77fb27
- Rebuild for cryptsetup-2.0.0
77fb27
77fb27
* Fri Oct 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 7-1
77fb27
- Update to v7
77fb27
77fb27
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-3
77fb27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
77fb27
77fb27
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-2
77fb27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
77fb27
77fb27
* Tue Jun 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 6-1
77fb27
- New upstream release
77fb27
- Specify unprivileged user/group during configuration
77fb27
- Move clevis user/group creation to base clevis package
77fb27
77fb27
* Mon Jun 26 2017 Nathaniel McCallum <npmccallum@redhat.com> - 5-1
77fb27
- New upstream release
77fb27
- Run clevis decryption from udisks2 under an unprivileged user
77fb27
77fb27
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 4-1
77fb27
- New upstream release
77fb27
77fb27
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 3-1
77fb27
- New upstream release
77fb27
77fb27
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2-2
77fb27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
77fb27
77fb27
* Fri Nov 18 2016 Nathaniel McCallum <npmccallum@redhat.com> - 2-1
77fb27
- New upstream release
77fb27
77fb27
* Mon Nov 14 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1-1
77fb27
- First release