Blame SPECS/clevis.spec

b5339b
Name:           clevis
b5339b
Version:        18
260951
Release:        5%{?dist}
b5339b
Summary:        Automated decryption framework
b5339b
b5339b
License:        GPLv3+
b5339b
URL:            https://github.com/latchset/%{name}
b5339b
Source0:        https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
b5339b
Source1:        clevis.sysusers
b5339b
b5339b
Patch0001: 0001-sss-use-BN_set_word-x-0-instead-of-BN_zero.patch
260951
Patch0002: 0002-systemd-account-for-unlocking-failures-in-clevis-luk.patch
b5339b
b5339b
BuildRequires:  git-core
b5339b
BuildRequires:  gcc
b5339b
BuildRequires:  meson
b5339b
BuildRequires:  asciidoc
b5339b
BuildRequires:  ninja-build
b5339b
BuildRequires:  bash-completion
b5339b
b5339b
BuildRequires:  libjose-devel >= 8
b5339b
BuildRequires:  libluksmeta-devel >= 8
b5339b
BuildRequires:  audit-libs-devel
b5339b
BuildRequires:  libudisks2-devel
b5339b
BuildRequires:  openssl-devel
b5339b
b5339b
BuildRequires:  tpm2-tools >= 4.0.0
b5339b
BuildRequires:  desktop-file-utils
b5339b
BuildRequires:  pkgconfig
b5339b
BuildRequires:  systemd
b5339b
BuildRequires:  systemd-rpm-macros
b5339b
BuildRequires:  dracut
b5339b
BuildRequires:  tang >= 6
b5339b
BuildRequires:  curl
b5339b
BuildRequires:  cracklib-dicts
b5339b
BuildRequires:  luksmeta
b5339b
BuildRequires:  openssl
b5339b
BuildRequires:  diffutils
b5339b
BuildRequires:  cryptsetup
b5339b
BuildRequires:  jq
b5339b
b5339b
Requires:       tpm2-tools >= 4.0.0
b5339b
Requires:       coreutils
b5339b
Requires:       jose >= 8
b5339b
Requires:       curl
b5339b
Requires:       jq
b5339b
Requires(pre):  shadow-utils
b5339b
Recommends:     cracklib-dicts
b5339b
b5339b
%description
b5339b
Clevis is a framework for automated decryption. It allows you to encrypt
b5339b
data using sophisticated unlocking policies which enable decryption to
b5339b
occur automatically.
b5339b
b5339b
The clevis package provides basic encryption/decryption policy support.
b5339b
Users can use this directly; but most commonly, it will be used as a
b5339b
building block for other packages. For example, see the clevis-luks
b5339b
and clevis-dracut packages for automatic root volume unlocking of LUKSv1
b5339b
volumes during early boot.
b5339b
b5339b
%package luks
b5339b
Summary:        LUKS integration for clevis
b5339b
Requires:       %{name}%{?_isa} = %{version}-%{release}
b5339b
Requires:       cryptsetup
b5339b
Requires:       luksmeta >= 8
b5339b
b5339b
%description luks
b5339b
LUKS integration for clevis. This package allows you to bind a LUKS
b5339b
volume to a clevis unlocking policy. For automated unlocking, an unlocker
b5339b
will also be required. See, for example, clevis-dracut and clevis-udisks2.
b5339b
b5339b
%package systemd
b5339b
Summary:        systemd integration for clevis
b5339b
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
b5339b
%if 0%{?fedora} > 27
b5339b
Requires:       systemd%{?_isa} >= 235-3
b5339b
%else
b5339b
%if 0%{?fedora} == 27
b5339b
Requires:       systemd%{?_isa} >= 234-9
b5339b
%else
b5339b
%if 0%{?fedora} == 26
b5339b
Requires:       systemd%{?_isa} >= 233-7
b5339b
%else
b5339b
Requires:       systemd%{?_isa} >= 236
b5339b
%endif
b5339b
%endif
b5339b
%endif
b5339b
b5339b
%description systemd
b5339b
Automatically unlocks LUKS _netdev block devices from /etc/crypttab.
b5339b
b5339b
%package dracut
b5339b
Summary:        Dracut integration for clevis
b5339b
Requires:       %{name}-systemd%{?_isa} = %{version}-%{release}
b5339b
Requires:       dracut-network
b5339b
b5339b
%description dracut
b5339b
Automatically unlocks LUKS block devices in early boot.
b5339b
b5339b
%package udisks2
b5339b
Summary:        UDisks2/Storaged integration for clevis
b5339b
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
b5339b
b5339b
%description udisks2
b5339b
Automatically unlocks LUKS block devices in desktop environments that
b5339b
use UDisks2 or storaged (like GNOME).
b5339b
b5339b
%prep
b5339b
%autosetup -S git
b5339b
b5339b
%build
b5339b
%meson -Duser=clevis -Dgroup=clevis
b5339b
%meson_build
b5339b
b5339b
%install
b5339b
%meson_install
b5339b
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/clevis.conf
b5339b
b5339b
%check
b5339b
desktop-file-validate \
b5339b
  %{buildroot}/%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
b5339b
%meson_test
b5339b
b5339b
%pre
b5339b
%sysusers_create_compat %{SOURCE1}
b5339b
# Add clevis user to tss group.
b5339b
if getent group tss >/dev/null && ! groups %{name} | grep -q "\btss\b"; then
b5339b
    usermod -a -G tss %{name} &>/dev/null
b5339b
fi
b5339b
exit 0
b5339b
b5339b
%posttrans
b5339b
# In case the clevis-luks-askpass is enabled, make sure it's using the
b5339b
# correct target, which changed in v14.
b5339b
[ "$(find /etc/systemd/system/ -name "clevis-luks-askpass*")" ] || exit 0
b5339b
find /etc/systemd/system/ -name "clevis-luks-askpass*" \
b5339b
     | grep -q cryptsetup.target.wants && exit 0
b5339b
b5339b
find /etc/systemd/system/ -name "clevis-luks-askpass*" -exec rm {} +
b5339b
systemctl enable clevis-luks-askpass.path >/dev/null 2>&1 || :
b5339b
exit 0
b5339b
b5339b
%files
b5339b
%license COPYING
b5339b
%{_datadir}/bash-completion/
b5339b
%{_bindir}/%{name}-decrypt-tang
b5339b
%{_bindir}/%{name}-decrypt-tpm2
b5339b
%{_bindir}/%{name}-decrypt-sss
b5339b
%{_bindir}/%{name}-decrypt
b5339b
%{_bindir}/%{name}-encrypt-tang
b5339b
%{_bindir}/%{name}-encrypt-tpm2
b5339b
%{_bindir}/%{name}-encrypt-sss
b5339b
%{_bindir}/%{name}
b5339b
%{_mandir}/man1/%{name}-encrypt-tang.1*
b5339b
%{_mandir}/man1/%{name}-encrypt-tpm2.1*
b5339b
%{_mandir}/man1/%{name}-encrypt-sss.1*
b5339b
%{_mandir}/man1/%{name}-decrypt.1*
b5339b
%{_mandir}/man1/%{name}.1*
b5339b
%{_sysusersdir}/clevis.conf
b5339b
b5339b
%files luks
b5339b
%{_mandir}/man7/%{name}-luks-unlockers.7*
b5339b
%{_mandir}/man1/%{name}-luks-unlock.1*
b5339b
%{_mandir}/man1/%{name}-luks-unbind.1*
b5339b
%{_mandir}/man1/%{name}-luks-bind.1*
b5339b
%{_mandir}/man1/%{name}-luks-list.1.*
b5339b
%{_mandir}/man1/%{name}-luks-edit.1.*
b5339b
%{_mandir}/man1/%{name}-luks-regen.1.*
b5339b
%{_mandir}/man1/%{name}-luks-report.1.*
b5339b
%{_mandir}/man1/%{name}-luks-pass.1.*
b5339b
%{_bindir}/%{name}-luks-unlock
b5339b
%{_bindir}/%{name}-luks-unbind
b5339b
%{_bindir}/%{name}-luks-bind
b5339b
%{_bindir}/%{name}-luks-common-functions
b5339b
%{_bindir}/%{name}-luks-list
b5339b
%{_bindir}/%{name}-luks-edit
b5339b
%{_bindir}/%{name}-luks-regen
b5339b
%{_bindir}/%{name}-luks-report
b5339b
%{_bindir}/%{name}-luks-pass
b5339b
b5339b
%files systemd
b5339b
%{_libexecdir}/%{name}-luks-askpass
b5339b
%{_unitdir}/%{name}-luks-askpass.path
b5339b
%{_unitdir}/%{name}-luks-askpass.service
b5339b
b5339b
%files dracut
b5339b
%{_prefix}/lib/dracut/modules.d/60%{name}
b5339b
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-sss/module-setup.sh
b5339b
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-tang/module-setup.sh
b5339b
%{_prefix}/lib/dracut/modules.d/60%{name}-pin-tpm2/module-setup.sh
b5339b
b5339b
%files udisks2
b5339b
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
b5339b
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
b5339b
b5339b
%changelog
260951
* Wed Nov 17 2021 Sergio Correia <scorreia@redhat.com> - 18-5
260951
- Account for unlocking failures in clevis-luks-askpass
260951
  Resolves: rhbz#2022421
260951
b5339b
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 18-4
b5339b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
b5339b
  Related: rhbz#1991688
b5339b
b5339b
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 18-3
b5339b
- Rebuilt for RHEL 9 BETA for openssl 3.0
b5339b
  Related: rhbz#1971065
b5339b
b5339b
* Fri May 07 2021 Sergio Correia <scorreia@redhat.com> - 18-2
b5339b
- Port to OpenSSL 3
b5339b
  Resolves: rhbz#1956760
b5339b
b5339b
* Tue May 04 2021 Sergio Correia <scorreia@redhat.com> - 18-1
b5339b
- Update to new clevis upstream release, v18
b5339b
  Resolves: rhbz#1956760
b5339b
b5339b
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 16-3
b5339b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
b5339b
b5339b
* Tue Mar 16 2021 Sergio Correia <scorreia@redhat.com> - 16-2
b5339b
- Fix for -t option in clevis luks bind - backport upstream commit ea0d0c20
b5339b
b5339b
* Tue Feb 09 2021 Sergio Correia <scorreia@redhat.com> - 16-1
b5339b
- Update to new clevis upstream release, v16.
b5339b
b5339b
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 15-4
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b5339b
b5339b
* Mon Nov 23 08:14:40 GMT 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 15-3
b5339b
- Upstream patch for tpm-tools 5.0 support
b5339b
b5339b
* Thu Oct 29 2020 Sergio Correia <scorreia@redhat.com> - 15-2
b5339b
- Add jq to dependencies
b5339b
b5339b
* Wed Oct 28 2020 Sergio Correia <scorreia@redhat.com> - 15-1
b5339b
- Update to new clevis upstream release, v15.
b5339b
b5339b
* Tue Sep 08 2020 Sergio Correia <scorreia@redhat.com> - 14-5
b5339b
- Suppress output in pre scriptlet when adjusting users/groups
b5339b
  Resolves: rhbz#1876729
b5339b
b5339b
* Tue Sep 08 2020 Sergio Correia <scorreia@redhat.com> - 14-4
b5339b
- Backport upstream PR#230 - clevis-luks-askpass now exits cleanly
b5339b
  when receives a SIGTERM
b5339b
  Resolves: rhbz#1876001
b5339b
b5339b
* Sat Sep 05 2020 Sergio Correia <scorreia@redhat.com> - 14-3
b5339b
- If clevis-luks-askpass is enabled, it may be using a wrong target,
b5339b
  since that changed in v14. Check and update it, if required.
b5339b
b5339b
* Mon Aug 31 2020 Sergio Correia <scorreia@redhat.com> - 14-2
b5339b
- Update sources file with new v14 release.
b5339b
b5339b
* Mon Aug 31 2020 Sergio Correia <scorreia@redhat.com> - 14-1
b5339b
- Update to new clevis upstream release, v14.
b5339b
b5339b
* Sun Aug 02 2020 Benjamin Gilbert <bgilbert@redhat.com> - 13-3
b5339b
- Downgrade cracklib-dicts to Recommends
b5339b
b5339b
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 13-2
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b5339b
b5339b
* Sun May 10 2020 Sergio Correia <scorreia@redhat.com> - 13-1
b5339b
- Update to new clevis upstream release, v13.
b5339b
b5339b
* Thu May 07 2020 Sergio Correia <scorreia@redhat.com> - 12-4
b5339b
- cracklib-dicts should be also listed as a build dependency, since
b5339b
  it's required for running some of the tests
b5339b
b5339b
* Mon Apr 06 2020 Sergio Correia <scorreia@redhat.com> - 12-3
b5339b
- Make cracklib-dicts a regular dependency
b5339b
b5339b
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12-2
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b5339b
b5339b
* Mon Jan 20 2020 Sergio Correia <scorreia@redhat.com> - 12-1
b5339b
- Update to new clevis upstream release, v12.
b5339b
b5339b
* Thu Dec 19 2019 Sergio Correia <scorreia@redhat.com> - 11-11
b5339b
- Backport upstream PR#70 - Handle case where we try to use a partially
b5339b
  used luksmeta slot
b5339b
  Resolves: rhbz#1672371
b5339b
b5339b
* Thu Dec 05 2019 Sergio Correia <scorreia@redhat.com> - 11-10
b5339b
- Disable LUKS2 tests for now, since they fail randomly in Koji
b5339b
  builders, killing the build
b5339b
b5339b
* Wed Dec 04 2019 Sergio Correia <scorreia@redhat.com> - 11-9
b5339b
- Backport of upstream patches and the following fixes:
b5339b
  - Rework the logic for reading the existing key
b5339b
  - fix for different output from 'luksAddKey' command w/cryptsetup v2.0.2 (
b5339b
  - pins/tang: check that key derivation key is available
b5339b
b5339b
* Wed Oct 30 2019 Peter Robinson <pbrobinson@fedoraproject.org> 11-8
b5339b
- Drop need network patch
b5339b
b5339b
* Fri Sep 06 2019 Javier Martinez Canillas <javierm@redhat.com> - 11-7
b5339b
- Add support for tpm2-tools 4.0
b5339b
b5339b
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11-6
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b5339b
b5339b
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11-5
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
b5339b
b5339b
* Thu Dec  6 2018 Peter Robinson <pbrobinson@fedoraproject.org> 11-4
b5339b
- Update patch for work around
b5339b
b5339b
* Thu Dec  6 2018 Peter Robinson <pbrobinson@fedoraproject.org> 11-3
b5339b
- Work around network requirement for early boot
b5339b
b5339b
* Fri Nov 09 2018 Javier Martinez Canillas <javierm@redhat.com> - 11-2
b5339b
- Delete remaining references to the removed http pin
b5339b
- Install cryptsetup and tpm2_pcrlist in the initramfs
b5339b
- Add device TCTI library to the initramfs
b5339b
  Resolves: rhbz#1644876
b5339b
b5339b
* Tue Aug 14 2018 Nathaniel McCallum <npmccallum@redhat.com> - 11-1
b5339b
- Update to v11
b5339b
b5339b
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10-2
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b5339b
b5339b
* Wed Mar 21 2018 Nathaniel McCallum <npmccallum@redhat.com> - 10-1
b5339b
- Update to v10
b5339b
b5339b
* Tue Feb 13 2018 Nathaniel McCallum <npmccallum@redhat.com> - 9-1
b5339b
- Update to v9
b5339b
b5339b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8-2
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b5339b
b5339b
* Mon Nov 13 2017 Nathaniel McCallum <npmccallum@redhat.com> - 8-1
b5339b
- Update to v8
b5339b
b5339b
* Wed Nov 08 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 7-2
b5339b
- Rebuild for cryptsetup-2.0.0
b5339b
b5339b
* Fri Oct 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 7-1
b5339b
- Update to v7
b5339b
b5339b
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-3
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b5339b
b5339b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6-2
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b5339b
b5339b
* Tue Jun 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 6-1
b5339b
- New upstream release
b5339b
- Specify unprivileged user/group during configuration
b5339b
- Move clevis user/group creation to base clevis package
b5339b
b5339b
* Mon Jun 26 2017 Nathaniel McCallum <npmccallum@redhat.com> - 5-1
b5339b
- New upstream release
b5339b
- Run clevis decryption from udisks2 under an unprivileged user
b5339b
b5339b
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 4-1
b5339b
- New upstream release
b5339b
b5339b
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 3-1
b5339b
- New upstream release
b5339b
b5339b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2-2
b5339b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b5339b
b5339b
* Fri Nov 18 2016 Nathaniel McCallum <npmccallum@redhat.com> - 2-1
b5339b
- New upstream release
b5339b
b5339b
* Mon Nov 14 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1-1
b5339b
- First release