Blame SPECS/clevis.spec

41f3d3
%global _hardened_build 1
41f3d3
41f3d3
Name:           clevis
9fc9a3
Version:        7
8e132f
Release:        8%{?dist}
41f3d3
Summary:        Automated decryption framework
41f3d3
41f3d3
License:        GPLv3+
41f3d3
URL:            https://github.com/latchset/%{name}
41f3d3
Source0:        https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
9fc9a3
Patch0:         clevis-7-dracut.patch
9fc9a3
Patch1:         clevis-7-retry.patch
8e132f
Patch2:         clevis-7-nospam.patch
8e132f
Patch3:         clevis-7-tpm2.patch
8e132f
Patch4:         clevis-7-subshell.patch
41f3d3
41f3d3
BuildRequires:  libjose-devel >= 8
9fc9a3
BuildRequires:  libluksmeta-devel >= 8
9fc9a3
BuildRequires:  audit-libs-devel >= 2.8.1
41f3d3
BuildRequires:  libudisks2-devel
41f3d3
BuildRequires:  openssl-devel
41f3d3
8e132f
%ifarch i686 x86_64
8e132f
BuildRequires:  tpm2-tools >= 3.0.0
8e132f
%endif
41f3d3
BuildRequires:  desktop-file-utils
41f3d3
BuildRequires:  pkgconfig
9fc9a3
BuildRequires:  autoconf
9fc9a3
BuildRequires:  automake
41f3d3
BuildRequires:  systemd
41f3d3
BuildRequires:  dracut
41f3d3
BuildRequires:  tang >= 6
41f3d3
BuildRequires:  curl
41f3d3
8e132f
%ifarch i686 x86_64
8e132f
Requires:       tpm2-tools >= 3.0.0
8e132f
%endif
41f3d3
Requires:       coreutils
41f3d3
Requires:       jose >= 8
41f3d3
Requires:       curl
41f3d3
Requires(pre):  shadow-utils
41f3d3
41f3d3
%description
41f3d3
Clevis is a framework for automated decryption. It allows you to encrypt
41f3d3
data using sophisticated unlocking policies which enable decryption to
41f3d3
occur automatically.
41f3d3
41f3d3
The clevis package provides basic encryption/decryption policy support.
41f3d3
Users can use this directly; but most commonly, it will be used as a
41f3d3
building block for other packages. For example, see the clevis-luks
41f3d3
and clevis-dracut packages for automatic root volume unlocking of LUKSv1
41f3d3
volumes during early boot.
41f3d3
41f3d3
%package luks
41f3d3
Summary:        LUKSv1 integration for clevis
41f3d3
Requires:       %{name}%{?_isa} = %{version}-%{release}
41f3d3
Requires:       cryptsetup
9fc9a3
Requires:       luksmeta >= 8
41f3d3
41f3d3
%description luks
41f3d3
LUKSv1 integration for clevis. This package allows you to bind a LUKSv1
41f3d3
volume to a clevis unlocking policy. For automated unlocking, an unlocker
41f3d3
will also be required. See, for example, clevis-dracut and clevis-udisks2.
41f3d3
9fc9a3
%package systemd
9fc9a3
Summary:        systemd integration for clevis
9fc9a3
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
9fc9a3
Requires:       systemd%{?_isa} >=  219-45.20171030
9fc9a3
Requires:       nc
9fc9a3
9fc9a3
%description systemd
9fc9a3
Automatically unlocks LUKSv1 _netdev block devices from /etc/crypttab.
9fc9a3
41f3d3
%package dracut
41f3d3
Summary:        Dracut integration for clevis
9fc9a3
Requires:       %{name}-systemd%{?_isa} = %{version}-%{release}
41f3d3
Requires:       dracut-network
41f3d3
41f3d3
%description dracut
41f3d3
Automatically unlocks LUKSv1 block devices in early boot.
41f3d3
41f3d3
%package udisks2
41f3d3
Summary:        UDisks2/Storaged integration for clevis
41f3d3
Requires:       %{name}-luks%{?_isa} = %{version}-%{release}
41f3d3
41f3d3
%description udisks2
41f3d3
Automatically unlocks LUKSv1 block devices in desktop environments that
41f3d3
use UDisks2 or storaged (like GNOME).
41f3d3
41f3d3
%prep
9fc9a3
%autosetup -p1
41f3d3
41f3d3
%build
9fc9a3
autoreconf -if
41f3d3
%configure --enable-user=clevis --enable-group=clevis
41f3d3
%make_build V=1
41f3d3
41f3d3
%install
41f3d3
%make_install
9fc9a3
ln -sf %{name}-luks-bind.1.gz %{buildroot}/%{_mandir}/man1/%{name}-bind-luks.1.gz
41f3d3
41f3d3
%check
41f3d3
desktop-file-validate \
41f3d3
  %{buildroot}/%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
41f3d3
%make_build check
41f3d3
41f3d3
%pre
41f3d3
getent group %{name} >/dev/null || groupadd -r %{name}
41f3d3
getent passwd %{name} >/dev/null || \
41f3d3
    useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \
41f3d3
    -c "Clevis Decryption Framework unprivileged user" %{name}
41f3d3
exit 0
41f3d3
41f3d3
%files
41f3d3
%license COPYING
41f3d3
%{_bindir}/%{name}-decrypt-http
41f3d3
%{_bindir}/%{name}-decrypt-tang
41f3d3
%{_bindir}/%{name}-decrypt-sss
41f3d3
%{_bindir}/%{name}-decrypt
41f3d3
%{_bindir}/%{name}-encrypt-http
41f3d3
%{_bindir}/%{name}-encrypt-tang
41f3d3
%{_bindir}/%{name}-encrypt-sss
41f3d3
%{_bindir}/%{name}
41f3d3
%{_mandir}/man1/%{name}-encrypt-http.1*
41f3d3
%{_mandir}/man1/%{name}-encrypt-tang.1*
41f3d3
%{_mandir}/man1/%{name}-encrypt-sss.1*
41f3d3
%{_mandir}/man1/%{name}-decrypt.1*
41f3d3
%{_mandir}/man1/%{name}.1*
41f3d3
8e132f
%ifarch i686 x86_64
8e132f
%{_bindir}/%{name}-decrypt-tpm2
8e132f
%{_bindir}/%{name}-encrypt-tpm2
8e132f
%{_mandir}/man1/%{name}-encrypt-tpm2.1*
8e132f
%endif
8e132f
41f3d3
%files luks
9fc9a3
%{_mandir}/man1/%{name}-luks-unlockers.1*
9fc9a3
%{_mandir}/man1/%{name}-luks-unlock.1*
9fc9a3
%{_mandir}/man1/%{name}-luks-bind.1*
41f3d3
%{_mandir}/man1/%{name}-bind-luks.1*
9fc9a3
%{_bindir}/%{name}-luks-unlock
9fc9a3
%{_bindir}/%{name}-luks-bind
9fc9a3
%{_bindir}/%{name}-bind-luks
9fc9a3
9fc9a3
%files systemd
9fc9a3
%{_libexecdir}/%{name}-luks-askpass
9fc9a3
%{_unitdir}/%{name}-luks-askpass.path
9fc9a3
%{_unitdir}/%{name}-luks-askpass.service
41f3d3
41f3d3
%files dracut
41f3d3
%{_prefix}/lib/dracut/modules.d/60%{name}
41f3d3
41f3d3
%files udisks2
41f3d3
%{_sysconfdir}/xdg/autostart/%{name}-luks-udisks2.desktop
41f3d3
%attr(4755, root, root) %{_libexecdir}/%{name}-luks-udisks2
41f3d3
41f3d3
%changelog
8e132f
* Mon Jul 30 2018 Nathaniel McCallum <npmccallum@redhat.com> - 7-8
8e132f
- Fix quoting on older bash shells (from previous patch)
8e132f
- Resolves: rhbz#1599728
8e132f
8e132f
* Tue Jul 24 2018 Nathaniel McCallum <npmccallum@redhat.com> - 7-7
8e132f
- Backport subshell fix for clevis-luks-unlock
8e132f
- Resolves: rhbz#1599728
8e132f
8e132f
* Mon Jul 09 2018 Nathaniel McCallum <npmccallum@redhat.com> - 7-6
8e132f
- Backport TPM 2.0 support
8e132f
- Resolves: rhbz#1472435
8e132f
8e132f
* Mon Jul 09 2018 Nathaniel McCallum <npmccallum@redhat.com> - 7-5
8e132f
- Don't spam the log for uninitialized devices.
8e132f
- Resolves: rhbz#1538759
8e132f
9fc9a3
* Mon Nov 13 2017 Nathaniel McCallum <npmccallum@redhat.com> - 7-4
9fc9a3
- Retry unlocking under systemd. This prevents a race condition.
9fc9a3
- Resolves: rhbz#1475406
9fc9a3
9fc9a3
* Mon Nov 13 2017 Nathaniel McCallum <npmccallum@redhat.com> - 7-3
9fc9a3
- Add patch to fix path generation issues with dracut
9fc9a3
- Resolves: rhbz#1512638
9fc9a3
9fc9a3
* Fri Nov 03 2017 Nathaniel McCallum <npmccallum@redhat.com> - 7-2
9fc9a3
- Add man page symlink for the clevis-bind-luks => clevis-luks-bind
9fc9a3
- Related: rhbz#1475406
9fc9a3
9fc9a3
* Fri Oct 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 7-1
9fc9a3
- Update to v7
9fc9a3
- Resolves: rhbz#1467907
9fc9a3
- Resolves: rhbz#1467908
9fc9a3
- Resolves: rhbz#1475406
9fc9a3
- Resolves: rhbz#1500975
9fc9a3
- Resolves: rhbz#1478888
9fc9a3
41f3d3
* Tue Jun 27 2017 Nathaniel McCallum <npmccallum@redhat.com> - 6-1
41f3d3
- New upstream release
41f3d3
- Specify unprivileged user/group during configuration
41f3d3
- Move clevis user/group creation to base clevis package
41f3d3
41f3d3
* Mon Jun 26 2017 Nathaniel McCallum <npmccallum@redhat.com> - 5-1
41f3d3
- New upstream release
41f3d3
- Run clevis decryption from udisks2 under an unprivileged user
41f3d3
- Reenable udisks2 subpackage
41f3d3
41f3d3
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 4-1
41f3d3
- New upstream release
41f3d3
- Disable udisks2 subpackage
41f3d3
41f3d3
* Wed Jun 14 2017 Nathaniel McCallum <npmccallum@redhat.com> - 3-1
41f3d3
- New upstream release
41f3d3
41f3d3
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2-2
41f3d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
41f3d3
41f3d3
* Fri Nov 18 2016 Nathaniel McCallum <npmccallum@redhat.com> - 2-1
41f3d3
- New upstream release
41f3d3
41f3d3
* Mon Nov 14 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1-1
41f3d3
- First release