Blame SPECS/clevis.spec

04a7a1
%global _hardened_build 1
04a7a1
04a7a1
Name:           clevis
95204d
Version:        13
95204d
Release:        3%{?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
95204d
Patch0001: 0001-Adjust-pin-tang-test-to-account-for-newer-tang-witho.patch
95204d
Patch0002: 0002-Fix-clevis-luks-unlock-and-add-related-tests.patch
95204d
Patch0003: 0003-Improve-error-message-when-bind-is-given-an-invalid-.patch
95204d
Patch0004: 0004-Add-rd.neednet-1-to-cmdline-only-if-there-are-device.patch
95204d
Patch0005: 0005-Add-the-option-to-extract-luks-passphrase-used-for-b.patch
95204d
Patch0006: 0006-Add-clevis-luks-regen-command.patch
95204d
Patch0007: 0007-Add-clevis-luks-report.patch
95204d
Patch0008: 0008-Use-one-clevis-luks-askpass-per-device.patch
95204d
Patch0009: 0009-Introduce-y-assume-yes-argument-to-clevis-luks-bind.patch
95204d
Patch0010: 0010-Add-clevis-luks-edit-command.patch
04a7a1
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
566fbd
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
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
Requires:       nc
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
04a7a1
getent group %{name} >/dev/null || groupadd -r %{name}
04a7a1
getent passwd %{name} >/dev/null || \
04a7a1
    useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
04a7a1
    -c "Clevis Decryption Framework unprivileged user" %{name}
04a7a1
exit 0
04a7a1
95204d
%pre systemd
95204d
if [ $1 -ge 0 ]; then
95204d
    # clevis-systemd < 11-8 shipped with clevis-luks-askpass.path unit.
95204d
    # Make sure it's gone.
95204d
    [ -e /usr/lib/systemd/system/clevis-luks-askpass.path ] && \
95204d
        systemctl disable clevis-luks-askpass.path
95204d
fi
95204d
exit 0
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
04a7a1
%{_bindir}/%{name}-decrypt
04a7a1
%{_bindir}/%{name}-encrypt-tang
04a7a1
%{_bindir}/%{name}-encrypt-tpm2
04a7a1
%{_bindir}/%{name}-encrypt-sss
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
566fbd
%{_bindir}/%{name}-luks-report-compare
566fbd
%{_bindir}/%{name}-luks-report-decode
566fbd
%{_bindir}/%{name}-luks-report-sss
566fbd
%{_bindir}/%{name}-luks-report-tang
95204d
%{_bindir}/%{name}-luks-edit
04a7a1
04a7a1
%files systemd
04a7a1
%{_libexecdir}/%{name}-luks-askpass
95204d
%{_unitdir}/%{name}-luks-askpass@.path
95204d
%{_unitdir}/%{name}-luks-askpass@.service
04a7a1
04a7a1
%files dracut
04a7a1
%{_prefix}/lib/dracut/modules.d/60%{name}
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
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