Blame SPECS/rust-coreos-installer.spec

804733
# Generated by rust2rpm 16
b38468
%define dracutlibdir %{_prefix}/lib/dracut
b38468
%bcond_without check
b38468
%global __cargo_skip_build 0
b38468
# The library is for internal code reuse and is not a public API
b38468
%global __cargo_is_lib 0
b38468
1736b3
%global dracutcommit ce0fe1ef3352827acc660a0c53156f68dc44bca7
804733
%global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7})
b38468
b38468
%global crate coreos-installer
b38468
b38468
Name:           rust-%{crate}
1736b3
Version:        0.11.0
1736b3
Release:        3%{?dist}
b38468
Summary:        Installer for Fedora CoreOS and RHEL CoreOS
b38468
b38468
# Upstream license specification: Apache-2.0
b38468
License:        ASL 2.0
804733
URL:            https://crates.io/crates/coreos-installer
804733
Source0:        https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
1736b3
# not used on Fedora
804733
Source1:        https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
804733
Source2:        https://github.com/coreos/coreos-installer-dracut/archive/%{dracutcommit}/coreos-installer-dracut-%{dracutshortcommit}.tar.gz
b38468
b38468
# The RHEL 8 rust-toolset macros don't let us enable features from the
b38468
# %%cargo_* macros.  Enable rdcore directly in Cargo.toml.
b38468
Patch0:         enable-rdcore.patch
b38468
# LTO causes runtime crashes on s390x
b38468
# https://github.com/coreos/coreos-installer/pull/360
b38468
# https://github.com/coreos/coreos-installer/issues/372
b38468
# https://bugzilla.redhat.com/show_bug.cgi?id=1863466
b38468
Patch1:         disable-lto.patch
b38468
b38468
ExclusiveArch:  %{rust_arches}
804733
%if 0%{?rhel} && !0%{?eln}
804733
BuildRequires:  rust-toolset
b38468
BuildRequires:  openssl-devel
b38468
BuildRequires:  xz-devel
804733
%else
804733
BuildRequires:  rust-packaging
b38468
%endif
804733
BuildRequires:  systemd-rpm-macros
804733
# For tests
804733
BuildRequires:  gnupg2
b38468
b38468
%global _description %{expand:
b38468
coreos-installer installs Fedora CoreOS or RHEL CoreOS to bare-metal
b38468
machines (or, occasionally, to virtual machines).
b38468
}
b38468
b38468
%description %{_description}
b38468
b38468
%package     -n %{crate}
b38468
Summary:        %{summary}
b38468
# ASL 2.0
b38468
# ASL 2.0 or Boost
b38468
# MIT
b38468
# MIT or ASL 2.0
b38468
# Unlicense or MIT
b38468
# zlib
b38468
License:        ASL 2.0 and MIT and zlib
b38468
804733
Requires:       gnupg
804733
Requires:       kpartx
804733
Requires:       systemd-udev
804733
Requires:       util-linux
804733
%ifarch s390x
804733
# This should be spelled "s390utils-core" but some of the binaries are
804733
# still moving over from s390utils-base
804733
Requires:       /usr/sbin/chreipl
804733
Requires:       /usr/sbin/dasdfmt
804733
Requires:       /usr/sbin/fdasd
804733
Requires:       /usr/sbin/lszdev
804733
Requires:       /usr/sbin/zipl
804733
%endif
804733
b38468
# Since `rust-coreos-installer` creates a `coreos-installer`
b38468
# subpackage with a newer version number, which supersedes the
b38468
# deprecated `coreos-installer` package (https://src.fedoraproject.org/rpms/coreos-installer),
b38468
# an explicit `Obsoletes:` for `coreos-installer` is not necessary.
b38468
804733
# Obsolete dracut modules as they are not provided in this package.
804733
Obsoletes:      coreos-installer-dracut < 0.0.1
804733
b38468
%description -n %{crate} %{_description}
b38468
b38468
%files       -n %{crate}
b38468
%license LICENSE
b38468
%doc README.md
b38468
%{_bindir}/coreos-installer
b38468
b38468
%prep
804733
%autosetup -n %{crate}-%{version} -p1 -a 2
804733
%if 0%{?rhel} && !0%{?eln}
804733
tar xvf %{SOURCE1}
804733
mkdir -p .cargo
804733
cat >.cargo/config << EOF
804733
[source.crates-io]
804733
replace-with = "vendored-sources"
804733
804733
[source.vendored-sources]
804733
directory = "vendor"
804733
EOF
804733
%else
804733
%cargo_prep
804733
%endif
804733
# Fix SIGSEGV in tests on s390x
804733
# https://bugzilla.redhat.com/show_bug.cgi?id=1883457
804733
sed -i 's/"-Ccodegen-units=1",//' .cargo/config
804733
804733
%if !0%{?rhel} || 0%{?eln}
804733
%generate_buildrequires
804733
%cargo_generate_buildrequires -f rdcore
804733
%endif
b38468
b38468
%build
804733
%if 0%{?rhel} && !0%{?eln}
b38468
%cargo_build
804733
%else
804733
%cargo_build -f rdcore
804733
%endif
b38468
b38468
%install
804733
%if 0%{?rhel} && !0%{?eln}
804733
%make_install
804733
# 51coreos-installer for coreos-installer-dracut
804733
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/51coreos-installer/module-setup.sh
804733
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer.target
804733
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/scripts/coreos-installer-service
804733
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/scripts/coreos-installer-growfs
804733
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer.service
804733
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer-growfs.service
1736b3
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer-luks-open.service
804733
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer-reboot.service
804733
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer-noreboot.service
1736b3
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer-poweroff.service
804733
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/51coreos-installer coreos-installer-dracut-%{dracutcommit}/dracut/systemd/coreos-installer-generator
804733
%else
804733
%cargo_install -f rdcore
b38468
# Install binaries, dracut modules, units, targets, generators for running via systemd
b38468
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore dracut/50rdcore/module-setup.sh
b38468
install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-service
b38468
install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-disable-device-auto-activation
b38468
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-disable-device-auto-activation.service
b38468
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer.service
b38468
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-reboot.service
b38468
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-noreboot.service
b38468
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-pre.target
b38468
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer.target
b38468
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-post.target
b38468
install -D -m 0755 -t %{buildroot}%{_systemdgeneratordir} systemd/coreos-installer-generator
b38468
mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{dracutlibdir}/modules.d/50rdcore/
804733
%endif
b38468
b38468
%package     -n %{crate}-bootinfra
b38468
Summary:     %{crate} boot-time infrastructure for use on Fedora/RHEL CoreOS
b38468
Requires:    %{crate}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
b38468
# ASL 2.0
b38468
# ASL 2.0 or Boost
b38468
# MIT
b38468
# MIT or ASL 2.0
b38468
# Unlicense or MIT
b38468
# zlib
b38468
License:     ASL 2.0 and MIT and zlib
b38468
b38468
# Package was renamed from coreos-installer-systemd when rdcore was added
b38468
Provides:    %{crate}-systemd = %{version}-%{release}
b38468
Obsoletes:   %{crate}-systemd <= 0.3.0-3
b38468
b38468
%description -n %{crate}-bootinfra
b38468
This subpackage contains boot-time infrastructure for Fedora CoreOS and
b38468
RHEL CoreOS.  It is not needed on other platforms.
b38468
b38468
%files       -n %{crate}-bootinfra
1736b3
%{dracutlibdir}/modules.d/50rdcore
b38468
%{_libexecdir}/*
b38468
%{_unitdir}/*
b38468
%{_systemdgeneratordir}/*
b38468
804733
%if 0%{?rhel} && !0%{?eln}
b38468
%package     -n %{crate}-dracut
804733
Summary:     Dracut module for running coreos-installer in the initrd
804733
Requires:    %{crate} = %{version}-%{release}
b38468
b38468
%description -n %{crate}-dracut
b38468
This subpackage contains files and configuration to run coreos-installer
b38468
from the initramfs.
b38468
b38468
%files       -n %{crate}-dracut
1736b3
%{dracutlibdir}/modules.d/51coreos-installer
804733
%endif
b38468
b38468
%if %{with check}
b38468
%check
804733
%if 0%{?rhel} && !0%{?eln}
b38468
%cargo_test
804733
%else
804733
%cargo_test -f rdcore
804733
%endif
b38468
%endif
b38468
b38468
%changelog
1736b3
* Thu Feb 10 2022 Antonio Murdaca <runcom@linux.com> - 0.11.0-3
1736b3
- update coi-dracut to support default poweroff behavior
1736b3
1736b3
* Wed Jan 26 2022 Antonio Murdaca <runcom@linux.com> - 0.11.0-2
1736b3
- Bump coreos-installer-dracut to support encrypted rootfs
1736b3
1736b3
* Wed Dec 15 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 0.11.0-1
1736b3
- New release
1736b3
- Fix inadvertent inclusion of coreos-installer-dracut in -bootinfra on RHEL
1736b3
- Have -dracut own 51coreos-installer directory on RHEL
1736b3
804733
* Tue Nov 30 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 0.10.1-6
804733
- Vendor rust dependencies on RHEL only
804733
- Add coreos-installer-dracut subpackage on RHEL only
804733
804733
* Fri Nov 26 2021 Antonio Murdaca <runcom@linux.com> - 0.10.1-5
804733
- fix https://bugzilla.redhat.com/show_bug.cgi?id=2027255
804733
b38468
* Thu Nov 18 2021 Antonio Murdaca <runcom@linux.com> - 0.10.1-4
b38468
- fix dracut module dependencies
b38468
b38468
* Wed Nov 17 2021 Antonio Murdaca <runcom@linux.com> - 0.10.1-3
b38468
- fix dracut module installation target
b38468
b38468
* Tue Oct 26 2021 Antonio Murdaca <runcom@linux.com> - 0.10.1-2
b38468
- rebuilt
b38468
b38468
* Mon Oct 25 2021 Antonio Murdaca <runcom@linux.com> - 0.10.1-1
b38468
- New release
b38468
b38468
* Thu Sep 16 11:20:52 CET 2021 Antonio Murdaca <amurdaca@redhat.com> - 0.10.0-1
b38468
- New bumped release
b38468
b38468
* Mon Dec 28 13:28:50 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.7.2-2
b38468
- Rebuild
b38468
b38468
* Thu Oct 22 2020 Sohan Kunkerkar <skunkerk@redhat.com> - 0.7.2-1
b38468
- New release
b38468
b38468
* Tue Oct 06 2020 Dusty Mabe <dusty@dustymabe.com> - 0.7.0-4
b38468
- Backport commit to start coreos-installer service after systemd-resolved
b38468
    - https://github.com/coreos/coreos-installer/pull/389
b38468
b38468
* Thu Oct 01 2020 Dusty Mabe <dusty@dustymabe.com> - 0.7.0-3
b38468
- Backport commit to add F33 and F34 keys. Drop F31 keys.
b38468
    - https://github.com/coreos/coreos-installer/pull/387
b38468
b38468
* Wed Sep 30 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.7.0-2
b38468
- Fix SIGSEGV in tests on s390x
b38468
b38468
* Mon Sep 21 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.7.0-1
b38468
- New release
b38468
b38468
* Tue Aug 25 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.6.0-1
b38468
- New release
b38468
b38468
* Sun Aug 16 15:01:11 GMT 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.5.0-2
b38468
- Rebuild
b38468
b38468
* Fri Jul 31 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.5.0-1
b38468
- New release
b38468
b38468
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-2
b38468
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b38468
b38468
* Fri Jul 24 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.4.0-1
b38468
- New release
b38468
- Rename -systemd subpackage to -bootinfra
b38468
- Add rdcore Dracut module to -bootinfra
b38468
b38468
* Fri Jul 24 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.3.0-2
b38468
- Rebuild
b38468
b38468
* Mon Jul 13 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.3.0-1
b38468
- New release
b38468
b38468
* Sat May 30 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.2.1-2
b38468
- Fixup license
b38468
b38468
* Fri May 29 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.2.1-1
b38468
- New release
b38468
- Make coreos-installer-{service,generator} world-readable
b38468
b38468
* Tue May 05 2020 Robert Fairley <rfairley@redhat.com> - 0.2.0-1
b38468
- Update to 0.2.0
b38468
b38468
* Sat Mar 21 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.1.3-1
b38468
- New release
b38468
b38468
* Fri Feb 21 2020 Josh Stone <jistone@redhat.com> - 0.1.2-4
b38468
- Bump to nix 0.17 and reqwest 0.10
b38468
b38468
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-3
b38468
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b38468
b38468
* Thu Jan 09 2020 Josh Stone <jistone@redhat.com> - 0.1.2-2
b38468
- Remove the nix downgrade.
b38468
b38468
* Wed Jan 08 2020 Dusty Mabe <dusty@dustymabe.com> - 0.1.2-1
b38468
- Bump to new upstream release 0.1.2
b38468
    - Release notes: https://github.com/coreos/coreos-installer/releases/tag/v0.1.2
b38468
- Update spec file to include systemd units from upstream
b38468
    - These were added upstream in https://github.com/coreos/coreos-installer/pull/119
b38468
b38468
* Fri Dec 20 17:57:28 UTC 2019 Robert Fairley <rfairley@redhat.com> - 0.1.1-1
b38468
- Initial package