Blame SPECS/fido-device-onboard.spec

21981d
%global debug_package %{nil}
0cb062
%define dracutlibdir %{_prefix}/lib/dracut
0cb062
%bcond_without check
0cb062
%global forgeurl https://github.com/fedora-iot/fido-device-onboard-rs
0cb062
21981d
Version:        0.4.7
0cb062
0cb062
%forgemeta
0cb062
0cb062
Name:           fido-device-onboard
21981d
Release:        3%{?dist}
21981d
Summary:        A rust implementation of the FIDO Device Onboard Specification
21981d
21981d
# Apache-2.0
21981d
# Apache-2.0 OR BSL-1.0
21981d
# Apache-2.0 OR ISC OR MIT
21981d
# Apache-2.0 OR MIT
21981d
# (Apache-2.0 OR MIT) AND BSD-3-Clause
21981d
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
21981d
# BSD-2-Clause
21981d
# BSD-3-Clause
21981d
# CC0-1.0
21981d
# CC0-1.0 OR Apache-2.0
21981d
# ISC
21981d
# MIT
21981d
# MIT OR Apache-2.0
21981d
# MIT OR Apache-2.0 OR Zlib
21981d
# MPL-2.0
21981d
# Unlicense OR MIT
21981d
# Zlib OR Apache-2.0 OR MIT
21981d
21981d
License:        Apache-2.0 and BSD and MIT
0cb062
URL:            %{forgeurl}
21981d
21981d
Source0:        %{forgesource}
21981d
# this is a basic script to generate the vendor tarfile.
21981d
Source1:        make-vendored-tarfile.sh
0cb062
%if "%{?commit}" != ""
21981d
Source2:        %{name}-rs-%{commit}-vendor-patched.tar.xz
0cb062
%else
21981d
Source2:        %{name}-rs-%{version}-vendor-patched.tar.xz
0cb062
%endif
0cb062
0cb062
ExclusiveArch:  %{rust_arches}
21981d
# Needs, at least, tss bindings regen
0cb062
ExcludeArch:    s390x i686 %{power64}
0cb062
0cb062
%if 0%{?rhel} && !0%{?eln}
0cb062
BuildRequires:  rust-toolset
0cb062
%else
0cb062
BuildRequires:  rust-packaging
0cb062
%endif
21981d
BuildRequires:  clang-devel
21981d
BuildRequires:  cryptsetup-devel
21981d
BuildRequires:  golang
21981d
BuildRequires:  openssl-devel >= 3.0.1-12
21981d
BuildRequires:  systemd-rpm-macros
21981d
BuildRequires:  tpm2-tss-devel
0cb062
0cb062
%description
0cb062
%{summary}.
0cb062
0cb062
%prep
0cb062
%forgesetup
0cb062
%cargo_prep
21981d
21981d
# Vendored crates
21981d
tar xf %{SOURCE2}
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
0cb062
%build
21981d
%cargo_build \
21981d
-F 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
21981d
# Dracut manufacturing service
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
21981d
%{_docdir}/fdo/rendezvous-*.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
21981d
* Mon Feb 20 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-3
21981d
- Fix services start
21981d
21981d
* Wed Feb 15 2023 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-2
21981d
- Upstream fix for rhbz#2168089
21981d
21981d
* Wed Nov 30 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 0.4.7-1
21981d
- Update to 0.4.7
21981d
- Package updates and cleanup
21981d
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