Blame SPECS/clevis.spec

77fb27
%global _hardened_build 1
77fb27
77fb27
Name:           clevis
77fb27
Version:        11
77fb27
Release:        2%{?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
77fb27
Patch0: Delete-remaining-references-to-the-removed-http-pin.patch
77fb27
Patch1: Install-cryptsetup-and-tpm2_pcrlist-in-the-initramfs.patch
77fb27
Patch2: Add-device-TCTI-library-to-the-initramfs.patch
77fb27
Patch3: Check-key-derivation-key-is-available.patch
77fb27
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
77fb27
77fb27
Requires:       tpm2-tools >= 3.0.0
77fb27
Requires:       coreutils
77fb27
Requires:       jose >= 8
77fb27
Requires:       curl
77fb27
Requires(pre):  shadow-utils
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
77fb27
and clevis-dracut packages for automatic root volume unlocking of LUKSv1
77fb27
volumes during early boot.
77fb27
77fb27
%package luks
77fb27
Summary:        LUKSv1 integration for clevis
77fb27
Requires:       %{name}%{?_isa} = %{version}-%{release}
77fb27
Requires:       cryptsetup
77fb27
Requires:       luksmeta >= 8
77fb27
77fb27
%description luks
77fb27
LUKSv1 integration for clevis. This package allows you to bind a LUKSv1
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
Requires:       nc
77fb27
77fb27
%description systemd
77fb27
Automatically unlocks LUKSv1 _netdev block devices from /etc/crypttab.
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
77fb27
Automatically unlocks LUKSv1 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
77fb27
Automatically unlocks LUKSv1 block devices in desktop environments that
77fb27
use UDisks2 or storaged (like GNOME).
77fb27
77fb27
%prep
77fb27
%autosetup -p1
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
77fb27
getent group %{name} >/dev/null || groupadd -r %{name}
77fb27
getent passwd %{name} >/dev/null || \
77fb27
    useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
77fb27
    -c "Clevis Decryption Framework unprivileged user" %{name}
77fb27
exit 0
77fb27
77fb27
%files
77fb27
%license COPYING
77fb27
%{_datadir}/bash-completion/
77fb27
%{_bindir}/%{name}-decrypt-tang
77fb27
%{_bindir}/%{name}-decrypt-tpm2
77fb27
%{_bindir}/%{name}-decrypt-sss
77fb27
%{_bindir}/%{name}-decrypt
77fb27
%{_bindir}/%{name}-encrypt-tang
77fb27
%{_bindir}/%{name}-encrypt-tpm2
77fb27
%{_bindir}/%{name}-encrypt-sss
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*
77fb27
%{_bindir}/%{name}-luks-unlock
77fb27
%{_bindir}/%{name}-luks-unbind
77fb27
%{_bindir}/%{name}-luks-bind
77fb27
77fb27
%files systemd
77fb27
%{_libexecdir}/%{name}-luks-askpass
77fb27
%{_unitdir}/%{name}-luks-askpass.path
77fb27
%{_unitdir}/%{name}-luks-askpass.service
77fb27
77fb27
%files dracut
77fb27
%{_prefix}/lib/dracut/modules.d/60%{name}
77fb27
77fb27
%files udisks2
77fb27
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
77fb27
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
77fb27
77fb27
%changelog
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