Blame SPECS/clevis.spec

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