Blame SPECS/clevis.spec

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