Blame SPECS/fido-device-onboard.spec

34862c
%global debug_package %{nil}
72107c
%define dracutlibdir %{_prefix}/lib/dracut
72107c
%bcond_without check
72107c
%global forgeurl https://github.com/fedora-iot/fido-device-onboard-rs
72107c
34862c
Version:        0.4.7
72107c
72107c
%forgemeta
72107c
72107c
Name:           fido-device-onboard
34862c
Release:        3%{?dist}
34862c
Summary:        A rust implementation of the FIDO Device Onboard Specification
34862c
34862c
# Apache-2.0
34862c
# Apache-2.0 OR BSL-1.0
34862c
# Apache-2.0 OR ISC OR MIT
34862c
# Apache-2.0 OR MIT
34862c
# (Apache-2.0 OR MIT) AND BSD-3-Clause
34862c
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
34862c
# BSD-2-Clause
34862c
# BSD-3-Clause
34862c
# CC0-1.0
34862c
# CC0-1.0 OR Apache-2.0
34862c
# ISC
34862c
# MIT
34862c
# MIT OR Apache-2.0
34862c
# MIT OR Apache-2.0 OR Zlib
34862c
# MPL-2.0
34862c
# Unlicense OR MIT
34862c
# Zlib OR Apache-2.0 OR MIT
34862c
34862c
License:        Apache-2.0 and BSD and MIT
72107c
URL:            %{forgeurl}
34862c
34862c
Source0:        %{forgesource}
34862c
# this is a basic script to generate the vendor tarfile.
34862c
Source1:        make-vendored-tarfile.sh
72107c
%if "%{?commit}" != ""
34862c
Source2:        %{name}-rs-%{commit}-vendor-patched.tar.xz
72107c
%else
34862c
Source2:        %{name}-rs-%{version}-vendor-patched.tar.xz
72107c
%endif
5dd3d3
72107c
ExclusiveArch:  %{rust_arches}
34862c
# Needs, at least, tss bindings regen
72107c
ExcludeArch:    s390x i686 %{power64}
72107c
72107c
%if 0%{?rhel} && !0%{?eln}
72107c
BuildRequires:  rust-toolset
72107c
%else
72107c
BuildRequires:  rust-packaging
72107c
%endif
34862c
BuildRequires:  clang-devel
34862c
BuildRequires:  cryptsetup-devel
34862c
BuildRequires:  golang
34862c
BuildRequires:  openssl-devel >= 3.0.1-12
34862c
BuildRequires:  systemd-rpm-macros
34862c
BuildRequires:  tpm2-tss-devel
72107c
72107c
%description
72107c
%{summary}.
72107c
72107c
%prep
72107c
%forgesetup
72107c
%cargo_prep
34862c
34862c
# Vendored crates
34862c
tar xf %{SOURCE2}
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
72107c
%build
34862c
%cargo_build \
34862c
-F 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
259f98
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-serviceinfo-api-server
259f98
# duplicates as needed by AIO command
259f98
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-owner-tool
259f98
install -D -m 0755 -t %{buildroot}%{_libexecdir}/fdo target/release/fdo-admin-tool
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/*
259f98
mkdir -p %{buildroot}%{_sysconfdir}/fdo
34862c
# Dracut manufacturing service
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
259f98
Requires: openssl-libs >= 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
259f98
Requires: openssl-libs >= 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
259f98
%{_libexecdir}/fdo/fdo-serviceinfo-api-server
259f98
%{_docdir}/fdo/serviceinfo-api-server.yml
259f98
%{_unitdir}/fdo-serviceinfo-api-server.service
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
259f98
%systemd_post fdo-serviceinfo-api-server.service
72107c
72107c
%preun -n fdo-owner-onboarding-server
72107c
%systemd_preun fdo-owner-onboarding-server.service
259f98
%systemd_post fdo-serviceinfo-api-server.service
72107c
72107c
%postun -n fdo-owner-onboarding-server
72107c
%systemd_postun_with_restart fdo-owner-onboarding-server.service
259f98
%systemd_postun_with_restart fdo-serviceinfo-api-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
34862c
%{_docdir}/fdo/rendezvous-*.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
259f98
Requires: openssl-libs >= 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
259f98
Requires: openssl-libs >= 3.0.1-12
259f98
Requires: clevis
259f98
Requires: clevis-luks
259f98
Requires: cryptsetup
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
259f98
%systemd_postun_with_restart fdo-client-linuxapp.service
72107c
72107c
%package -n fdo-owner-cli
72107c
Summary: FDO Owner tools implementation
72107c
%description -n fdo-owner-cli
72107c
%{summary}
72107c
72107c
%files -n fdo-owner-cli
72107c
%license LICENSE
72107c
%{_bindir}/fdo-owner-tool
259f98
%{_libexecdir}/fdo/fdo-owner-tool
aaa367
aaa367
%package -n fdo-admin-cli
aaa367
Summary: FDO admin tools implementation
259f98
Requires: fdo-manufacturing-server
259f98
Requires: fdo-init
259f98
Requires: fdo-client
259f98
Requires: fdo-rendezvous-server
259f98
Requires: fdo-owner-onboarding-server
259f98
Requires: fdo-owner-cli
aaa367
%description -n fdo-admin-cli
aaa367
%{summary}
aaa367
aaa367
%files -n fdo-admin-cli
aaa367
%license LICENSE
aaa367
%{_bindir}/fdo-admin-tool
259f98
%{_libexecdir}/fdo/fdo-admin-tool
259f98
%{_unitdir}/fdo-aio.service
259f98
%dir %{_sysconfdir}/fdo
259f98
259f98
%post -n fdo-admin-cli
259f98
%systemd_post fdo-aio.service
259f98
259f98
%preun -n fdo-admin-cli
259f98
%systemd_preun fdo-aio.service
259f98
259f98
%postun -n fdo-admin-cli
259f98
%systemd_postun_with_restart fdo-aio.service
72107c
72107c
%changelog
34862c
* Mon Feb 20 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-3
34862c
- Fix services start
34862c
34862c
* Wed Feb 15 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-2
34862c
- Upstream fix for rhbz#2168089
34862c
34862c
* Wed Nov 30 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-1
34862c
- Update to 0.4.7
34862c
- Package updates and cleanup
34862c
259f98
* Tue Mar 29 2022 Antonio Murdaca <runcom@linux.com> - 0.4.5-1
259f98
- bump to 0.4.5
259f98
259f98
* Mon Feb 28 2022 Antonio Murdaca <runcom@linux.com> - 0.4.0-2
259f98
- fix runtime requirements to use openssl-libs and not -devel
259f98
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