# Generated by go2rpm 1.18.0 %bcond check 1 # https://github.com/fido-device-onboard/go-fdo-server %global goipath github.com/fido-device-onboard/go-fdo-server %global commit 7817b645d7b2fb112d359fe51034732b5804f5ba %global debug_package %{nil} %gometa -L -f Name: go-fdo-server Version: 0 Release: %autorelease -p Summary: A Go implementation of the FIDO Device Onboard Specification # Generated by go-vendor-tools License: Apache-2.0 AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: go-fdo-server-group.conf Source4: go-fdo-server-manufacturer-user.conf Source5: go-fdo-server-rendezvous-user.conf Source6: go-fdo-server-owner-user.conf BuildRequires: go-vendor-tools # Systemd units BuildRequires: systemd-rpm-macros # Sysusers %{?sysusers_requires_compat} %description This package provides a server-side implementation of the FIDO Device Onboard (FDO) specification, written in Go. FDO is an open standard for the late binding of device credentials, allowing for automated and secure on-boarding of devices when they are first powered on in their final location. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} #%%autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/go-fdo-server %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp -s %{gobuilddir}/bin/* %{buildroot}%{_bindir} # Configuration dir install -m 0755 -vd %{buildroot}%{_sysconfdir}/%{name} # Sysusers install -m 0644 -vp -D %{SOURCE3} %{buildroot}/%{_sysusersdir}/go-fdo-server.conf install -m 0644 -vp -D %{SOURCE4} %{buildroot}/%{_sysusersdir}/go-fdo-server-manufacturer.conf install -m 0644 -vp -D %{SOURCE5} %{buildroot}/%{_sysusersdir}/go-fdo-server-rendezvous.conf install -m 0644 -vp -D %{SOURCE6} %{buildroot}/%{_sysusersdir}/go-fdo-server-owner.conf # Sysconfig files install -m 0755 -vd %{buildroot}%{_sysconfdir}/sysconfig install -m 0644 -vp -D configs/sysconfig/* %{buildroot}%{_sysconfdir}/sysconfig/ # Systemd units install -m 0755 -vd %{buildroot}%{_unitdir} install -m 0644 -vp -D init/systemd/* %{buildroot}%{_unitdir} # Helpers install -m 0755 -vd %{buildroot}%{_datadir}/%{name} install -m 0755 -vp -D scripts/* %{buildroot}%{_datadir}/%{name} %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc DOCKERFILE_USAGE.md FSIM_USAGE.md README.md SECURITY.md %{_bindir}/go-fdo-server %config(noreplace) %attr(770, root, go-fdo-server) %{_sysconfdir}/%{name} %{_sysusersdir}/%{name}.conf %dir %{_datadir}/%{name} %{_datadir}/%{name}/fdo-utils.sh %{_datadir}/%{name}/cert-utils.sh %{_datadir}/%{name}/generate-manufacturer-certs.sh %{_datadir}/%{name}/generate-device-ca-certs.sh %{_datadir}/%{name}/generate-owner-certs.sh %pre %sysusers_create_compat %{SOURCE3} %package manufacturer Requires: go-fdo-server Requires: group(go-fdo-server) Requires: openssl Summary: A Go implementation of the FDO manufacturer server BuildArch: noarch %description manufacturer This package provides the manufacturer server component of the FDO stack. The manufacturer server is responsible for creating ownership vouchers and preparing devices for the on-boarding process during the manufacturing phase. %files manufacturer # Systemd unit %{_unitdir}/go-fdo-server-manufacturer.service %config(noreplace) %{_sysconfdir}/sysconfig/go-fdo-server-manufacturer # Sysuser %{_sysusersdir}/go-fdo-server-manufacturer.conf %pre manufacturer %sysusers_create_compat %{SOURCE4} %post manufacturer %systemd_post go-fdo-server-manufacturer.service %preun manufacturer %systemd_preun go-fdo-server-manufacturer.service %postun manufacturer %systemd_postun_with_restart go-fdo-server-manufacturer.service %package rendezvous Requires: go-fdo-server Requires: group(go-fdo-server) Summary: A Go implementation of the FDO rendezvous server BuildArch: noarch %description rendezvous This package provides the rendezvous server component of the FDO stack. The rendezvous server acts as a trusted intermediary, redirecting devices to their designated owner's on-boarding service based on their ownership voucher. %files rendezvous # Systemd unit %{_unitdir}/go-fdo-server-rendezvous.service %config(noreplace) %{_sysconfdir}/sysconfig/go-fdo-server-rendezvous # Sysuser %{_sysusersdir}/go-fdo-server-rendezvous.conf %pre rendezvous %sysusers_create_compat %{SOURCE5} %post rendezvous %systemd_post go-fdo-server-rendezvous.service %preun rendezvous %systemd_preun go-fdo-server-rendezvous.service %postun rendezvous %systemd_postun_with_restart go-fdo-server-rendezvous.service %package owner Requires: go-fdo-server Requires: group(go-fdo-server) Summary: A Go implementation of the FDO owner server BuildArch: noarch %description owner This package provides the owner server component of the FDO stack. The owner server is the final destination for a device during on-boarding. It verifies the device's authenticity, establishes ownership, and provisions it with the necessary credentials and configuration for operation. %files owner # Systemd unit %{_unitdir}/go-fdo-server-owner.service %config(noreplace) %{_sysconfdir}/sysconfig/go-fdo-server-owner # Sysuser %{_sysusersdir}/go-fdo-server-owner.conf %pre owner %sysusers_create_compat %{SOURCE6} %post owner %systemd_post go-fdo-server-owner.service %preun owner %systemd_preun go-fdo-server-owner.service %postun owner %systemd_postun_with_restart go-fdo-server-owner.service %changelog %autochangelog