File fde-tools.spec of Package fde-tools
#
# spec file for package fde-tools
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
Name: fde-tools
Version: 0.6.3
Release: 0
Summary: Tools required for Full Disk Encryption
License: GPL-2.0-only
Group: System/Boot
URL: https://github.com/okirch/fdepoc
Source: %{name}-%{version}.tar.bz2
Source1: fde-tools.service
Patch: fde-tools-firstboot-alp-snapshot.patch
Patch1: fde-tools-set-stop-event-for-tpm_authorize.patch
BuildRequires: jeos-firstboot
BuildRequires: libfido2-devel
BuildRequires: openssl >= 0.9.8
BuildRequires: tpm2-0-tss-devel
BuildRequires: dracut
Requires: pcr-oracle >= 0.4.2
Requires: cryptsetup
# Requires: tpm2.0-tools
Requires: mokutil
ExclusiveArch: aarch64 s390x ppc64le x86_64 riscv64
%package -n fde-firstboot
Summary: Full Disk Encryption for images
Group: System/Boot
Requires: jeos-firstboot
Requires: fde-tools
%description
This package provides several components required to support Full Disk
Encryption.
%description -n fde-firstboot
This package contains the scripts necessary to plug Full Disk Encryption
into the JeOS Firstboot framework used for image based delivery of ALP.
%prep
%autosetup -p1
%build
%make_build
%install
%make_install
mkdir -p %{buildroot}%{_fillupdir}
mv %{buildroot}/etc/sysconfig/fde-tools %{buildroot}%{_fillupdir}/sysconfig.fde-tools
mkdir -p %{buildroot}%{_unitdir}
cp %{S:1} %{buildroot}%{_unitdir}/fde-tpm-enroll.service
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%pre
%service_add_pre fde-tpm-enroll.service
%post
%service_add_post fde-tpm-enroll.service
%fillup_and_insserv
%preun
%service_del_preun fde-tpm-enroll.service
%postun
%service_del_postun fde-tpm-enroll.service
%files
/sbin/fdectl
/bin/fde-token
%dir /etc/fde
%{_fillupdir}/sysconfig.*
%{_datadir}/fde
%{_unitdir}/fde-tpm-enroll.service
%files -n fde-firstboot
%{_datadir}/jeos-firstboot/modules/fde
%changelog