Switch -validate-nonlinux to noarch; move files to /usr/share/ignition
We shouldn't put non-Linux binaries in /usr/bin. They're opaque data as far as Linux is concerned, and we can build them on any arch. Switch the subpackage to noarch, move the binaries to /usr/share/ignition, and make them non-executable. Rename files to include architecture triples, and in the Windows case, the necessary .exe suffix. These names match the ones used for FCCT binaries. For macOS the name now matches the actual name used on the GitHub releases page; for Windows this is a change.
This commit is contained in:
parent
1e620a001f
commit
1b6d133ca1
@ -357,12 +357,12 @@ and applies the configuration.
|
|||||||
|
|
||||||
This package contains a tool for validating Ignition configurations.
|
This package contains a tool for validating Ignition configurations.
|
||||||
|
|
||||||
%ifarch x86_64
|
|
||||||
############## validate-nonlinux subpackage ##############
|
############## validate-nonlinux subpackage ##############
|
||||||
%package validate-nonlinux
|
%package validate-nonlinux
|
||||||
|
|
||||||
Summary: Validation tool for Ignition configs for macOS and Windows
|
Summary: Validation tool for Ignition configs for macOS and Windows
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
Conflicts: ignition < 0.31.0-3
|
Conflicts: ignition < 0.31.0-3
|
||||||
|
|
||||||
@ -371,7 +371,6 @@ This package contains macOS and Windows ignition-validate binaries built
|
|||||||
through cross-compilation. Do not install it. It is only used for
|
through cross-compilation. Do not install it. It is only used for
|
||||||
building binaries to sign by Fedora release engineering and include on the
|
building binaries to sign by Fedora release engineering and include on the
|
||||||
Ignition project's Github releases page.
|
Ignition project's Github releases page.
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
# setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
|
# setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
|
||||||
@ -403,18 +402,19 @@ echo "Building ignition..."
|
|||||||
echo "Building ignition-validate..."
|
echo "Building ignition-validate..."
|
||||||
%gobuild -o ./ignition-validate %{import_path}/validate
|
%gobuild -o ./ignition-validate %{import_path}/validate
|
||||||
|
|
||||||
%ifarch x86_64
|
|
||||||
echo "Building macOS ignition-validate"
|
echo "Building macOS ignition-validate"
|
||||||
|
export GOARCH=amd64
|
||||||
export GOOS=darwin
|
export GOOS=darwin
|
||||||
%gobuild -o ./ignition-validate-darwin %{import_path}/validate
|
%gobuild -o ./ignition-validate-x86_64-apple-darwin %{import_path}/validate
|
||||||
|
|
||||||
echo "Building Windows ignition-validate"
|
echo "Building Windows ignition-validate"
|
||||||
|
export GOARCH=amd64
|
||||||
export GOOS=windows
|
export GOOS=windows
|
||||||
%gobuild -o ./ignition-validate-windows %{import_path}/validate
|
%gobuild -o ./ignition-validate-x86_64-pc-windows-gnu.exe %{import_path}/validate
|
||||||
|
|
||||||
# Set this back, just in case
|
# Set this back, just in case
|
||||||
|
export GOARCH=
|
||||||
export GOOS=linux
|
export GOOS=linux
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# ignition-dracut
|
# ignition-dracut
|
||||||
@ -429,10 +429,9 @@ popd >/dev/null
|
|||||||
install -d -p %{buildroot}%{_bindir}
|
install -d -p %{buildroot}%{_bindir}
|
||||||
install -p -m 0755 ./ignition-validate %{buildroot}%{_bindir}
|
install -p -m 0755 ./ignition-validate %{buildroot}%{_bindir}
|
||||||
|
|
||||||
%ifarch x86_64
|
install -d -p %{buildroot}%{_datadir}/ignition
|
||||||
install -p -m 0755 ./ignition-validate-darwin %{buildroot}%{_bindir}
|
install -p -m 0644 ./ignition-validate-x86_64-apple-darwin %{buildroot}%{_datadir}/ignition
|
||||||
install -p -m 0755 ./ignition-validate-windows %{buildroot}%{_bindir}
|
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 ignition binary is only for dracut, and is dangerous to run from
|
||||||
# the command line. Install directly into the dracut module dir.
|
# the command line. Install directly into the dracut module dir.
|
||||||
@ -522,12 +521,11 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/%{name}-validate
|
%{_bindir}/%{name}-validate
|
||||||
|
|
||||||
%ifarch x86_64
|
|
||||||
%files validate-nonlinux
|
%files validate-nonlinux
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/%{name}-validate-darwin
|
%dir %{_datadir}/ignition
|
||||||
%{_bindir}/%{name}-validate-windows
|
%{_datadir}/ignition/ignition-validate-x86_64-apple-darwin
|
||||||
%endif
|
%{_datadir}/ignition/ignition-validate-x86_64-pc-windows-gnu.exe
|
||||||
|
|
||||||
%if 0%{?with_devel}
|
%if 0%{?with_devel}
|
||||||
%files devel -f devel.file-list
|
%files devel -f devel.file-list
|
||||||
@ -544,6 +542,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Feb 01 2020 Benjamin Gilbert <bgilbert@redhat.com> - 2.1.1-6.git40c0b57
|
* Sat Feb 01 2020 Benjamin Gilbert <bgilbert@redhat.com> - 2.1.1-6.git40c0b57
|
||||||
|
- Switch -validate-nonlinux to noarch; move files to /usr/share/ignition
|
||||||
- Improve -validate-nonlinux descriptive text
|
- Improve -validate-nonlinux descriptive text
|
||||||
|
|
||||||
* Fri Jan 31 2020 Jonathan Lebon <jonathan@jlebon.com> - 2.1.1-5.git40c0b57
|
* Fri Jan 31 2020 Jonathan Lebon <jonathan@jlebon.com> - 2.1.1-5.git40c0b57
|
||||||
|
Loading…
Reference in New Issue
Block a user