|
|
72107c |
%define dracutlibdir %{_prefix}/lib/dracut
|
|
|
72107c |
%bcond_without check
|
|
|
72107c |
%global __cargo_skip_build 0
|
|
|
72107c |
%global __cargo_is_lib() false
|
|
|
72107c |
%global forgeurl https://github.com/fedora-iot/fido-device-onboard-rs
|
|
|
72107c |
|
|
|
aaa367 |
Version: 0.4.0
|
|
|
72107c |
|
|
|
72107c |
%forgemeta
|
|
|
72107c |
|
|
|
72107c |
Name: fido-device-onboard
|
|
|
5dd3d3 |
Release: 1%{?dist}
|
|
|
72107c |
Summary: An implementation of the FIDO Device Onboard Specification written in rust
|
|
|
72107c |
|
|
|
72107c |
License: BSD
|
|
|
72107c |
URL: %{forgeurl}
|
|
|
72107c |
Source: %{forgesource}
|
|
|
72107c |
%if "%{?commit}" != ""
|
|
|
72107c |
Source1: %{name}-rs-%{commit}-vendor-patched.tar.gz
|
|
|
72107c |
%else
|
|
|
72107c |
Source1: %{name}-rs-%{version}-vendor-patched.tar.gz
|
|
|
72107c |
%endif
|
|
|
5dd3d3 |
|
|
|
aaa367 |
Patch0: debug-profile.patch
|
|
|
72107c |
|
|
|
72107c |
ExclusiveArch: %{rust_arches}
|
|
|
72107c |
# RHBZ 1869980
|
|
|
72107c |
ExcludeArch: s390x i686 %{power64}
|
|
|
72107c |
|
|
|
72107c |
%if 0%{?rhel} && !0%{?eln}
|
|
|
72107c |
BuildRequires: rust-toolset
|
|
|
72107c |
%else
|
|
|
72107c |
BuildRequires: rust-packaging
|
|
|
72107c |
%endif
|
|
|
72107c |
BuildRequires: systemd-rpm-macros
|
|
|
72107c |
BuildRequires: openssl-devel
|
|
|
72107c |
BuildRequires: golang
|
|
|
aaa367 |
BuildRequires: tpm2-tss-devel
|
|
|
72107c |
|
|
|
72107c |
%description
|
|
|
72107c |
%{summary}.
|
|
|
72107c |
|
|
|
72107c |
%prep
|
|
|
72107c |
%forgesetup
|
|
|
72107c |
%patch0 -p1
|
|
|
72107c |
%cargo_prep
|
|
|
72107c |
%if 0%{?rhel} && !0%{?eln}
|
|
|
72107c |
tar xvf %{SOURCE1}
|
|
|
72107c |
mkdir -p .cargo
|
|
|
72107c |
cat >.cargo/config << EOF
|
|
|
72107c |
[source.crates-io]
|
|
|
72107c |
replace-with = "vendored-sources"
|
|
|
72107c |
|
|
|
72107c |
[source.vendored-sources]
|
|
|
72107c |
directory = "vendor"
|
|
|
72107c |
EOF
|
|
|
72107c |
%endif
|
|
|
72107c |
|
|
|
72107c |
%build
|
|
|
aaa367 |
%{__cargo} build --release --features openssl-kdf/deny_custom
|
|
|
72107c |
|
|
|
72107c |
%install
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-client-linuxapp
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-manufacturing-client
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-manufacturing-server
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-owner-onboarding-server
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-rendezvous-server
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{_bindir} target/release/fdo-owner-tool
|
|
|
aaa367 |
install -D -m 0755 -t %{buildroot}%{_bindir} target/release/fdo-admin-tool
|
|
|
72107c |
install -D -m 0644 -t %{buildroot}%{_unitdir} examples/systemd/*
|
|
|
72107c |
install -D -m 0644 -t %{buildroot}%{_docdir}/fdo examples/config/*
|
|
|
72107c |
# 52fdo
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/52fdo dracut/52fdo/module-setup.sh
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/52fdo dracut/52fdo/manufacturing-client-generator
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/52fdo dracut/52fdo/manufacturing-client-service
|
|
|
72107c |
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/52fdo dracut/52fdo/manufacturing-client.service
|
|
|
72107c |
|
|
|
72107c |
%package -n fdo-init
|
|
|
72107c |
Summary: dracut module for device initialization
|
|
|
aaa367 |
Requires: openssl-devel >= 3.0.1-12
|
|
|
72107c |
%description -n fdo-init
|
|
|
72107c |
%{summary}
|
|
|
72107c |
|
|
|
72107c |
%files -n fdo-init
|
|
|
72107c |
%license LICENSE
|
|
|
72107c |
%{dracutlibdir}/modules.d/52fdo/*
|
|
|
72107c |
%{_libexecdir}/fdo/fdo-manufacturing-client
|
|
|
72107c |
|
|
|
72107c |
%package -n fdo-owner-onboarding-server
|
|
|
72107c |
Summary: FDO Owner Onboarding Server implementation
|
|
|
aaa367 |
Requires: openssl-devel >= 3.0.1-12
|
|
|
72107c |
%description -n fdo-owner-onboarding-server
|
|
|
72107c |
%{summary}
|
|
|
72107c |
|
|
|
72107c |
%files -n fdo-owner-onboarding-server
|
|
|
72107c |
%license LICENSE
|
|
|
72107c |
%{_libexecdir}/fdo/fdo-owner-onboarding-server
|
|
|
72107c |
%{_docdir}/fdo/owner-onboarding-server.yml
|
|
|
72107c |
%{_unitdir}/fdo-owner-onboarding-server.service
|
|
|
72107c |
|
|
|
72107c |
%post -n fdo-owner-onboarding-server
|
|
|
72107c |
%systemd_post fdo-owner-onboarding-server.service
|
|
|
72107c |
|
|
|
72107c |
%preun -n fdo-owner-onboarding-server
|
|
|
72107c |
%systemd_preun fdo-owner-onboarding-server.service
|
|
|
72107c |
|
|
|
72107c |
%postun -n fdo-owner-onboarding-server
|
|
|
72107c |
%systemd_postun_with_restart fdo-owner-onboarding-server.service
|
|
|
72107c |
|
|
|
72107c |
%package -n fdo-rendezvous-server
|
|
|
72107c |
Summary: FDO Rendezvous Server implementation
|
|
|
72107c |
%description -n fdo-rendezvous-server
|
|
|
72107c |
%{summary}
|
|
|
72107c |
|
|
|
72107c |
%files -n fdo-rendezvous-server
|
|
|
72107c |
%license LICENSE
|
|
|
72107c |
%{_libexecdir}/fdo/fdo-rendezvous-server
|
|
|
72107c |
%{_docdir}/fdo/rendezvous-server.yml
|
|
|
72107c |
%{_unitdir}/fdo-rendezvous-server.service
|
|
|
72107c |
|
|
|
72107c |
%post -n fdo-rendezvous-server
|
|
|
72107c |
%systemd_post fdo-rendezvous-server.service
|
|
|
72107c |
|
|
|
72107c |
%preun -n fdo-rendezvous-server
|
|
|
72107c |
%systemd_preun fdo-rendezvous-server.service
|
|
|
72107c |
|
|
|
72107c |
%postun -n fdo-rendezvous-server
|
|
|
72107c |
%systemd_postun_with_restart fdo-rendezvous-server.service
|
|
|
72107c |
|
|
|
72107c |
%package -n fdo-manufacturing-server
|
|
|
72107c |
Summary: FDO Manufacturing Server implementation
|
|
|
aaa367 |
Requires: openssl-devel >= 3.0.1-12
|
|
|
72107c |
%description -n fdo-manufacturing-server
|
|
|
72107c |
%{summary}
|
|
|
72107c |
|
|
|
72107c |
%files -n fdo-manufacturing-server
|
|
|
72107c |
%license LICENSE
|
|
|
72107c |
%{_libexecdir}/fdo/fdo-manufacturing-server
|
|
|
72107c |
%{_docdir}/fdo/manufacturing-server.yml
|
|
|
72107c |
%{_unitdir}/fdo-manufacturing-server.service
|
|
|
72107c |
|
|
|
72107c |
%post -n fdo-manufacturing-server
|
|
|
72107c |
%systemd_post fdo-manufacturing-server.service
|
|
|
72107c |
|
|
|
72107c |
%preun -n fdo-manufacturing-server
|
|
|
72107c |
%systemd_preun fdo-manufacturing-server.service
|
|
|
72107c |
|
|
|
72107c |
%postun -n fdo-manufacturing-server
|
|
|
72107c |
%systemd_postun_with_restart fdo-manufacturing-server.service
|
|
|
72107c |
|
|
|
72107c |
%package -n fdo-client
|
|
|
72107c |
Summary: FDO Client implementation
|
|
|
aaa367 |
Requires: openssl-devel >= 3.0.1-12
|
|
|
72107c |
%description -n fdo-client
|
|
|
72107c |
%{summary}
|
|
|
72107c |
|
|
|
72107c |
%files -n fdo-client
|
|
|
72107c |
%license LICENSE
|
|
|
72107c |
%{_libexecdir}/fdo/fdo-client-linuxapp
|
|
|
72107c |
%{_unitdir}/fdo-client-linuxapp.service
|
|
|
72107c |
|
|
|
72107c |
%post -n fdo-client
|
|
|
72107c |
%systemd_post fdo-client-linuxapp.service
|
|
|
72107c |
|
|
|
72107c |
%preun -n fdo-client
|
|
|
72107c |
%systemd_preun fdo-client-linuxapp.service
|
|
|
72107c |
|
|
|
72107c |
%postun -n fdo-client
|
|
|
72107c |
%systemd_postun_with_restart fdo-client.linuxapp.service
|
|
|
72107c |
|
|
|
72107c |
%package -n fdo-owner-cli
|
|
|
72107c |
Summary: FDO Owner tools implementation
|
|
|
aaa367 |
Requires: openssl-devel >= 3.0.1-12
|
|
|
72107c |
%description -n fdo-owner-cli
|
|
|
72107c |
%{summary}
|
|
|
72107c |
|
|
|
72107c |
%files -n fdo-owner-cli
|
|
|
72107c |
%license LICENSE
|
|
|
72107c |
%{_bindir}/fdo-owner-tool
|
|
|
aaa367 |
|
|
|
aaa367 |
%package -n fdo-admin-cli
|
|
|
aaa367 |
Summary: FDO admin tools implementation
|
|
|
aaa367 |
%description -n fdo-admin-cli
|
|
|
aaa367 |
%{summary}
|
|
|
aaa367 |
|
|
|
aaa367 |
%files -n fdo-admin-cli
|
|
|
aaa367 |
%license LICENSE
|
|
|
aaa367 |
%{_bindir}/fdo-admin-tool
|
|
|
72107c |
|
|
|
72107c |
%changelog
|
|
|
aaa367 |
* Thu Feb 24 2022 Antonio Murdaca <runcom@linux.com> - 0.4.0-1
|
|
|
aaa367 |
- upgrade to 0.4.0
|
|
|
aaa367 |
|
|
|
5dd3d3 |
* Tue Feb 01 2022 Antonio Murdaca <runcom@linux.com> - 0.3.0-1
|
|
|
5dd3d3 |
- bump to 0.3.0
|
|
|
5dd3d3 |
|
|
|
72107c |
* Tue Jan 11 2022 Antonio Murdaca <runcom@linux.com> - 0.2.0-2
|
|
|
72107c |
- use patched vendor w/o win files and rename license
|
|
|
72107c |
|
|
|
72107c |
* Mon Dec 13 2021 Antonio Murdaca <runcom@linux.com> - 0.2.0-1
|
|
|
72107c |
- import fido-device-onboard
|