| |
@@ -1,5 +1,11 @@
|
| |
# Generated by go2rpm 1.3
|
| |
+ %if 0%{?fedora}
|
| |
%bcond_without check
|
| |
+ %else
|
| |
+ # %gocheck isn't currently provided on CentOS/RHEL
|
| |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1982298
|
| |
+ %bcond_with check
|
| |
+ %endif
|
| |
|
| |
# https://github.com/coreos/ignition
|
| |
%global goipath github.com/coreos/ignition
|
| |
@@ -13,7 +19,7 @@
|
| |
%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
|
| |
@@ -211,6 +217,7 @@
|
| |
|
| |
############## validate-nonlinux subpackage ##############
|
| |
|
| |
+ %if 0%{?fedora}
|
| |
%package validate-nonlinux
|
| |
|
| |
Summary: Validation tool for Ignition configs for macOS and Windows
|
| |
@@ -224,13 +231,22 @@
|
| |
through cross-compilation. Do not install it. It is only used for
|
| |
building binaries to sign by Fedora release engineering and include on the
|
| |
Ignition project's Github releases page.
|
| |
+ %endif
|
| |
|
| |
%prep
|
| |
+ %if 0%{?fedora}
|
| |
%goprep -k
|
| |
+ %else
|
| |
+ %forgeautosetup -p1
|
| |
+ %endif
|
| |
%autopatch -p1
|
| |
|
| |
%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%{?centos}
|
| |
+ # Need uncompressed debug symbols for debuginfo extraction
|
| |
+ LDFLAGS+=' -X github.com/coreos/ignition/v2/internal/distro.writeAuthorizedKeysFragment=false -compressdwarf=false '
|
| |
+ %endif
|
| |
export GOFLAGS="-mod=vendor"
|
| |
|
| |
echo "Building ignition..."
|
| |
@@ -241,11 +257,13 @@
|
| |
|
| |
%global gocrossbuild go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x
|
| |
|
| |
+ %if 0%{?fedora}
|
| |
echo "Building macOS ignition-validate..."
|
| |
GOARCH=amd64 GOOS=darwin %gocrossbuild -o ./ignition-validate-x86_64-apple-darwin validate/main.go
|
| |
|
| |
echo "Building Windows ignition-validate..."
|
| |
GOARCH=amd64 GOOS=windows %gocrossbuild -o ./ignition-validate-x86_64-pc-windows-gnu.exe validate/main.go
|
| |
+ %endif
|
| |
|
| |
%install
|
| |
# dracut modules
|
| |
@@ -256,9 +274,11 @@
|
| |
install -d -p %{buildroot}%{_bindir}
|
| |
install -p -m 0755 ./ignition-validate %{buildroot}%{_bindir}
|
| |
|
| |
+ %if 0%{?fedora}
|
| |
install -d -p %{buildroot}%{_datadir}/ignition
|
| |
install -p -m 0644 ./ignition-validate-x86_64-apple-darwin %{buildroot}%{_datadir}/ignition
|
| |
install -p -m 0644 ./ignition-validate-x86_64-pc-windows-gnu.exe %{buildroot}%{_datadir}/ignition
|
| |
+ %endif
|
| |
|
| |
# The ignition binary is only for dracut, and is dangerous to run from
|
| |
# the command line. Install directly into the dracut module dir.
|
| |
@@ -280,13 +300,21 @@
|
| |
%license %{golicenses}
|
| |
%{_bindir}/ignition-validate
|
| |
|
| |
+ %if 0%{?fedora}
|
| |
%files validate-nonlinux
|
| |
%license %{golicenses}
|
| |
%dir %{_datadir}/ignition
|
| |
%{_datadir}/ignition/ignition-validate-x86_64-apple-darwin
|
| |
%{_datadir}/ignition/ignition-validate-x86_64-pc-windows-gnu.exe
|
| |
+ %endif
|
| |
|
| |
%changelog
|
| |
+ * Thu Aug 26 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 2.12.0-2
|
| |
+ - Disable file fragment writing logic for SSH authorized_keys on RHEL/CentOS
|
| |
+ - Disable compressdwarf flag to avoid build failures on RHEL/CentOS
|
| |
+ - Disable cross-building of Ignition-validate on RHEL/CentOS
|
| |
+ - Conditionalize Fedora-specific configuration
|
| |
+
|
| |
* Fri Aug 6 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 2.12.0-1
|
| |
- New release
|
| |
|
| |
BZ:https://bugzilla.redhat.com/show_bug.cgi?id=1985481