update for RHEL9
Resolves: rhbz#1989897 Signed-off-by: Antonio Murdaca <runcom@linux.com>
This commit is contained in:
parent
0827fadd64
commit
3f198d1210
5
.gitignore
vendored
5
.gitignore
vendored
@ -7,3 +7,8 @@
|
||||
/coreos-installer-0.6.0.crate
|
||||
/coreos-installer-0.7.0.crate
|
||||
/coreos-installer-0.7.2.crate
|
||||
/coreos-installer-0.9.1-vendor.tar.gz
|
||||
/coreos-installer-0.9.1.crate
|
||||
/coreos-installer-0.10.0.crate
|
||||
/coreos-installer-0.10.0-vendor.tar.gz
|
||||
/coreos-installer-dracut-bbefcb8.tar.gz
|
||||
|
12
disable-lto.patch
Normal file
12
disable-lto.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- coreos-installer-0.10.0/Cargo.toml 2021-09-02 10:50:54.538578470 +0200
|
||||
+++ coreos-installer-0.10.0/Cargo.toml 2021-09-02 10:51:20.779926148 +0200
|
||||
@@ -35,9 +35,6 @@
|
||||
[profile.dev.package.miniz_oxide]
|
||||
opt-level = 3
|
||||
|
||||
-[profile.release]
|
||||
-lto = true
|
||||
-
|
||||
[lib]
|
||||
name = "libcoreinst"
|
||||
path = "src/lib.rs"
|
10
enable-rdcore.patch
Normal file
10
enable-rdcore.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- coreos-installer-0.10.0/Cargo.toml 2021-09-02 10:48:49.577922841 +0200
|
||||
+++ coreos-installer-0.10.0/Cargo.toml 2021-09-02 10:49:23.366370513 +0200
|
||||
@@ -129,6 +129,7 @@
|
||||
version = "^1.0"
|
||||
|
||||
[features]
|
||||
+default = ["rdcore"]
|
||||
rdcore = []
|
||||
[target."cfg(target_arch = \"s390x\")".dependencies.mbrman]
|
||||
version = ">= 0.3, < 0.5"
|
@ -1,26 +1,59 @@
|
||||
# Generated by rust2rpm 13
|
||||
# Ganerated by rust2rpm 13
|
||||
%define dracutlibdir %{_libdir}/dracut
|
||||
%bcond_without check
|
||||
%global __cargo_skip_build 0
|
||||
# The library is for internal code reuse and is not a public API
|
||||
%global __cargo_is_lib 0
|
||||
|
||||
%global coidracutcommit bbefcb88b9ea092be68baf191849a349b09a1f3b
|
||||
%global coidracutshortcommit %(c=%{coidracutcommit}; echo ${c:0:7})
|
||||
|
||||
%global crate coreos-installer
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.7.2
|
||||
Release: 2%{?dist}
|
||||
Version: 0.10.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Installer for Fedora CoreOS and RHEL CoreOS
|
||||
|
||||
# Upstream license specification: Apache-2.0
|
||||
License: ASL 2.0
|
||||
URL: https://crates.io/crates/coreos-installer
|
||||
Source: %{crates_source}
|
||||
URL: https://github.com/coreos/coreos-installer
|
||||
Source: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
|
||||
Source1: https://github.com/coreos/coreos-installer/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
||||
Source2: https://github.com/runcom/coreos-installer-dracut/archive/%{coidracutcommit}/coreos-installer-dracut-%{coidracutshortcommit}.tar.gz
|
||||
|
||||
|
||||
# The RHEL 8 rust-toolset macros don't let us enable features from the
|
||||
# %%cargo_* macros. Enable rdcore directly in Cargo.toml.
|
||||
Patch0: enable-rdcore.patch
|
||||
# LTO causes runtime crashes on s390x
|
||||
# https://github.com/coreos/coreos-installer/pull/360
|
||||
# https://github.com/coreos/coreos-installer/issues/372
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1863466
|
||||
Patch1: disable-lto.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: rust-toolset
|
||||
BuildRequires: systemd
|
||||
|
||||
BuildRequires: rust-packaging
|
||||
BuildRequires: systemd-rpm-macros
|
||||
Requires: gnupg
|
||||
Requires: kpartx
|
||||
Requires: systemd-udev
|
||||
Requires: util-linux
|
||||
%ifarch s390x
|
||||
# This should eventually be spelled "s390utils-core" but the binaries
|
||||
# haven't been broken out of s390utils-base yet
|
||||
Requires: /usr/sbin/chreipl
|
||||
Requires: /usr/sbin/dasdfmt
|
||||
Requires: /usr/sbin/fdasd
|
||||
Requires: /usr/sbin/lszdev
|
||||
Requires: /usr/sbin/zipl
|
||||
%endif
|
||||
|
||||
#BuildRequires: rust-packaging
|
||||
#BuildRequires: systemd-rpm-macros
|
||||
|
||||
%global _description %{expand:
|
||||
coreos-installer installs Fedora CoreOS or RHEL CoreOS to bare-metal
|
||||
@ -44,9 +77,6 @@ License: ASL 2.0 and MIT and zlib
|
||||
# deprecated `coreos-installer` package (https://src.fedoraproject.org/rpms/coreos-installer),
|
||||
# an explicit `Obsoletes:` for `coreos-installer` is not necessary.
|
||||
|
||||
# Obsolete dracut modules as they are not provided in this package.
|
||||
Obsoletes: coreos-installer-dracut < 0.0.1
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
|
||||
%files -n %{crate}
|
||||
@ -55,22 +85,19 @@ Obsoletes: coreos-installer-dracut < 0.0.1
|
||||
%{_bindir}/coreos-installer
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
%cargo_prep
|
||||
# Fix SIGSEGV in tests on s390x
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1883457
|
||||
sed -i 's/"-Ccodegen-units=1",//' .cargo/config
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires -f rdcore
|
||||
%autosetup -n %{crate}-%{version} -p1
|
||||
%setup -n %{crate}-%{version} -D -T -a 2
|
||||
%cargo_prep -V 1
|
||||
# https://github.com/rust-lang-nursery/error-chain/pull/289
|
||||
find -name '*.rs' -executable -exec chmod a-x {} \;
|
||||
|
||||
%build
|
||||
%cargo_build -f rdcore
|
||||
%cargo_build
|
||||
|
||||
%install
|
||||
%cargo_install -f rdcore
|
||||
%cargo_install
|
||||
# Install binaries, dracut modules, units, targets, generators for running via systemd
|
||||
install -D -m 0755 -t %{buildroot}%{_prefix}/lib/dracut/modules.d/50rdcore dracut/50rdcore/module-setup.sh
|
||||
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore dracut/50rdcore/module-setup.sh
|
||||
install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-service
|
||||
install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-disable-device-auto-activation
|
||||
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-disable-device-auto-activation.service
|
||||
@ -81,7 +108,16 @@ install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-pre.targe
|
||||
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer.target
|
||||
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-post.target
|
||||
install -D -m 0755 -t %{buildroot}%{_systemdgeneratordir} systemd/coreos-installer-generator
|
||||
mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{_prefix}/lib/dracut/modules.d/50rdcore/
|
||||
mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{dracutlibdir}/modules.d/50rdcore/
|
||||
# 51coreos-installer for coreos-installer-dracut
|
||||
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/51coreos-installer/module-setup.sh
|
||||
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/scripts/coreos-installer-service
|
||||
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/scripts/coreos-installer-growfs
|
||||
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/systemd/coreos-installer.service
|
||||
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/systemd/coreos-installer-growfs.service
|
||||
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/systemd/coreos-installer-reboot.service
|
||||
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/systemd/coreos-installer-noreboot.service
|
||||
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{coidracutcommit}/dracut/systemd/coreos-installer-generator
|
||||
|
||||
%package -n %{crate}-bootinfra
|
||||
Summary: %{crate} boot-time infrastructure for use on Fedora/RHEL CoreOS
|
||||
@ -103,17 +139,31 @@ This subpackage contains boot-time infrastructure for Fedora CoreOS and
|
||||
RHEL CoreOS. It is not needed on other platforms.
|
||||
|
||||
%files -n %{crate}-bootinfra
|
||||
%{_prefix}/lib/dracut/modules.d/*
|
||||
%{dracutlibdir}/modules.d/50rdcore/*
|
||||
%{_libexecdir}/*
|
||||
%{_unitdir}/*
|
||||
%{_systemdgeneratordir}/*
|
||||
|
||||
%package -n %{crate}-dracut
|
||||
Summary: %{crate} provides coreos-installer as a dracut module.
|
||||
Requires: %{crate} = %{version}-%{release}
|
||||
|
||||
%description -n %{crate}-dracut
|
||||
This subpackage contains files and configuration to run coreos-installer
|
||||
from the initramfs.
|
||||
|
||||
%files -n %{crate}-dracut
|
||||
%{dracutlibdir}/modules.d/51coreos-installer/*
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test -f rdcore
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Sep 16 11:20:52 CET 2021 Antonio Murdaca <amurdaca@redhat.com> - 0.10.0-1
|
||||
- New bumped release
|
||||
|
||||
* Mon Dec 28 13:28:50 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.7.2-2
|
||||
- Rebuild
|
||||
|
||||
|
4
sources
4
sources
@ -1 +1,3 @@
|
||||
SHA512 (coreos-installer-0.7.2.crate) = c02ca70f1f4633893cf99507b2ec1e8c7df5d1d44fa7a5137dd5bf0598562e29b924c59b6768ed21db26dba625fae797e2697b4fca036defc41bcf2825abb5c8
|
||||
SHA512 (coreos-installer-0.10.0-vendor.tar.gz) = 4ee449fa870b9942f68c9653012a465943019e5baa823e05c2b973fec3415e0009a32c08c181ceb6355ed5769b9df82cdf22f922639f5a73829764ce3d96c820
|
||||
SHA512 (coreos-installer-0.10.0.crate) = 90fbc9727a737e7acb9464854f448e6a39c5fe02f68f8a2388200293d6a10268775bcde2f904195386363fdf1b9d24d34f72aa6b55b8667f1db60ae7e0f25d71
|
||||
SHA512 (coreos-installer-dracut-bbefcb8.tar.gz) = 79336d4cf779e4acfa012381de9ca7438345c9019b0a27fddbaf8df16333709d93a0fa4be6ff5e62d83cc2004bf5e5d9b189e49ef8c8eb9f04f1a713b62530f8
|
||||
|
Loading…
Reference in New Issue
Block a user