Enable ignition-edge in Fedora

Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
This commit is contained in:
Paul Whalen 2023-02-21 10:18:00 -05:00
parent df664a9084
commit b20c1a4257
3 changed files with 38 additions and 1 deletions

1
.gitignore vendored
View File

@ -59,3 +59,4 @@
/ignition-2.13.0.tar.gz
/ignition-2.14.0.tar.gz
/ignition-2.15.0.tar.gz
/ignition-edge-a3a8f0a.tar.gz

View File

@ -7,6 +7,9 @@
%bcond_with check
%endif
%global ignedgecommit a3a8f0abb2a1c7fc1c9e5d0e7a3e8830b2e2d766
%global ignedgeshortcommit %(c=%{ignedgecommit}; echo ${c:0:7})
# https://github.com/coreos/ignition
%global goipath github.com/coreos/ignition
%global gomodulesmode GO111MODULE=on
@ -19,13 +22,14 @@ Version: 2.15.0
%global dracutlibdir %{_prefix}/lib/dracut
Name: ignition
Release: 1%{?dist}
Release: 2%{?dist}
Summary: First boot installer and configuration tool
# Upstream license specification: Apache-2.0
License: ASL 2.0
URL: %{gourl}
Source0: %{gosource}
Source1: https://github.com/fedora-iot/ignition-edge/archive/%{ignedgecommit}/ignition-edge-%{ignedgeshortcommit}.tar.gz
BuildRequires: libblkid-devel
BuildRequires: systemd-rpm-macros
@ -197,6 +201,17 @@ It is only used for building release binaries to be signed by Fedora release
engineering and uploaded to the Ignition GitHub releases page.
%endif
############## ignition-edge subpackage ##############
%package edge
Summary: Enablement glue for Ignition on IoT/Edge systems
License: ASL 2.0
%description edge
This package contains dracut modules, services and binaries needed to enable
Ignition on IoT/Edge systems.
%prep
%if 0%{?fedora}
%goprep -k
@ -205,6 +220,8 @@ engineering and uploaded to the Ignition GitHub releases page.
%forgeautosetup -p1
%endif
tar xvf %{SOURCE1}
%build
export LDFLAGS="-X github.com/coreos/ignition/v2/internal/version.Raw=%{version} -X github.com/coreos/ignition/v2/internal/distro.selinuxRelabel=true "
%if 0%{?rhel} && 0%{?rhel} <= 8
@ -268,6 +285,8 @@ install -p -m 0644 ./ignition-validate-x86_64-unknown-linux-gnu-static %{buildro
# the command line. Install directly into the dracut module dir.
install -p -m 0755 ./ignition %{buildroot}/%{dracutlibdir}/modules.d/30ignition
%make_install -C ignition-edge-%{ignedgecommit}
%if %{with check}
%check
# Exclude the blackbox tests
@ -300,7 +319,23 @@ install -p -m 0755 ./ignition %{buildroot}/%{dracutlibdir}/modules.d/30ignition
%{_datadir}/ignition/ignition-validate-x86_64-unknown-linux-gnu-static
%endif
%files edge
%license %{golicenses}
%doc %{godocs}
%{dracutlibdir}/modules.d/35ignition-edge/*
%{dracutlibdir}/modules.d/10coreos-sysctl/*
%{dracutlibdir}/modules.d/99emergency-shell-setup/*
%{dracutlibdir}/modules.d/99journal-conf/*
%{_unitdir}/coreos-check-ssh-keys.service
%{_unitdir}/coreos-ignition-write-issues.service
%{_unitdir}/ignition-firstboot-complete.service
%{_libexecdir}/coreos-ignition-write-issues
%{_libexecdir}/coreos-check-ssh-keys
%changelog
* Wed Feb 22 2023 Paul Whalen <pwhalen@fedoraproject.org> - 2.15.0-2
- Enable ignition-edge in Fedora
* Tue Feb 21 2023 Benjamin Gilbert <bgilbert@redhat.com> - 2.15.0-1
- New release
- Drop Conflicts/Obsoletes for ancient Ignition releases

View File

@ -1 +1,2 @@
SHA512 (ignition-2.15.0.tar.gz) = f599fbd240d9de78a0765749fe9214700629150d7afbf35985683ab174eea6fd8f9de55a598edfa710de1412576d2dd057d116f8ad7e8c8459d4e7cc85d5a705
SHA512 (ignition-edge-a3a8f0a.tar.gz) = ef04cd411752f1b48fdb64ae8e45a2234b635a19ead82483cb33e246697e6ae639f6036030e7647913f5f589532f3d015bcc81848db50ebe8800242f6f23230a