Initial commit on c10s
Resolves: RHEL-133122 Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
This commit is contained in:
parent
151b1c3f2a
commit
851eb56424
7 changed files with 189 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -0,0 +1,2 @@
|
||||||
|
/go-fdo-server-0.0.4-vendor.tar.bz2
|
||||||
|
/go-fdo-server-0.0.4.tar.gz
|
||||||
1
go-fdo-server-group.conf
Normal file
1
go-fdo-server-group.conf
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
g go-fdo-server -
|
||||||
1
go-fdo-server-manufacturer-user.conf
Normal file
1
go-fdo-server-manufacturer-user.conf
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
u go-fdo-server-manufacturer -:go-fdo-server "Go FDO manufacturer server" /run/go-fdo-server-manufacturer -
|
||||||
1
go-fdo-server-owner-user.conf
Normal file
1
go-fdo-server-owner-user.conf
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
u go-fdo-server-owner -:go-fdo-server "Go FDO owner server" /run/go-fdo-server-owner -
|
||||||
1
go-fdo-server-rendezvous-user.conf
Normal file
1
go-fdo-server-rendezvous-user.conf
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
u go-fdo-server-rendezvous -:go-fdo-server "Go FDO rendezvous server" /run/go-fdo-server-rendezvous -
|
||||||
181
go-fdo-server.spec
Normal file
181
go-fdo-server.spec
Normal file
|
|
@ -0,0 +1,181 @@
|
||||||
|
# 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 debug_package %{nil}
|
||||||
|
|
||||||
|
Version: 0.0.4
|
||||||
|
|
||||||
|
%gometa -L -f
|
||||||
|
|
||||||
|
Name: go-fdo-server
|
||||||
|
Release: %autorelease
|
||||||
|
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
|
||||||
|
# Per packaging guidelines, sysusers.d files must be included as sources
|
||||||
|
# and cannot be installed directly in the install section.
|
||||||
|
Source2: go-fdo-server-group.conf
|
||||||
|
Source3: go-fdo-server-manufacturer-user.conf
|
||||||
|
Source4: go-fdo-server-rendezvous-user.conf
|
||||||
|
Source5: go-fdo-server-owner-user.conf
|
||||||
|
|
||||||
|
BuildRequires: go-rpm-macros
|
||||||
|
# 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
|
||||||
|
|
||||||
|
%build
|
||||||
|
%global gomodulesmode GO111MODULE=on
|
||||||
|
export LDFLAGS="-X %{goipath}/internal/version.VERSION=%{version}"
|
||||||
|
%gobuild -o %{gobuilddir}/bin/go-fdo-server %{goipath}
|
||||||
|
|
||||||
|
%install
|
||||||
|
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 %{SOURCE2} %{buildroot}/%{_sysusersdir}/go-fdo-server.conf
|
||||||
|
install -m 0644 -vp -D %{SOURCE3} %{buildroot}/%{_sysusersdir}/go-fdo-server-manufacturer.conf
|
||||||
|
install -m 0644 -vp -D %{SOURCE4} %{buildroot}/%{_sysusersdir}/go-fdo-server-rendezvous.conf
|
||||||
|
install -m 0644 -vp -D %{SOURCE5} %{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
|
||||||
|
%if %{with check}
|
||||||
|
%gotest ./...
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license 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 %{SOURCE2}
|
||||||
|
|
||||||
|
%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 %{SOURCE3}
|
||||||
|
|
||||||
|
%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 %{SOURCE4}
|
||||||
|
|
||||||
|
%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 %{SOURCE5}
|
||||||
|
|
||||||
|
%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
|
||||||
2
sources
Normal file
2
sources
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
SHA512 (go-fdo-server-0.0.4-vendor.tar.bz2) = 8a74f3c34a21b63d0f28f2f6aa8ddfbfc0a51d6dad191484d5f6f442afd6b0899d4241a46598dd1879c14174c266ffedd02520858e8375149deb6bfca7953e98
|
||||||
|
SHA512 (go-fdo-server-0.0.4.tar.gz) = d417f33ee09be9c750f4f5212392c4ed656d5bb3b684865f1e6720b3d3600fa8790f41e18d21f35abf9922e98bcec44bf51ce956bfaf5d4db23ffc08675da143
|
||||||
Loading…
Reference in a new issue