Blame SPECS/fido-device-onboard.spec

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