Blame SPECS/coreos-installer.spec

7dd7e2
# Generated by rust2rpm 13
7dd7e2
%define dracutlibdir %{_prefix}/lib/dracut
7dd7e2
%bcond_without check
7dd7e2
%global __cargo_skip_build 0
7dd7e2
# The library is for internal code reuse and is not a public API
7dd7e2
%global __cargo_is_lib 0
7dd7e2
7dd7e2
%global crate coreos-installer
7dd7e2
7dd7e2
Name:           %{crate}
7dd7e2
Version:        0.9.1
7dd7e2
Release:        17%{?dist}
7dd7e2
Summary:        Installer for Fedora CoreOS and RHEL CoreOS
7dd7e2
7dd7e2
# Upstream license specification: Apache-2.0
7dd7e2
License:        ASL 2.0
7dd7e2
URL:            https://github.com/fedora-iot/coreos-installer
7dd7e2
Source:         https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
7dd7e2
Source1:        https://github.com/coreos/coreos-installer/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
7dd7e2
7dd7e2
# The RHEL 8 rust-toolset macros don't let us enable features from the
7dd7e2
# %%cargo_* macros.  Enable rdcore directly in Cargo.toml.
7dd7e2
Patch0:         enable-rdcore.patch
7dd7e2
# LTO causes runtime crashes on s390x
7dd7e2
# https://github.com/coreos/coreos-installer/pull/360
7dd7e2
# https://github.com/coreos/coreos-installer/issues/372
7dd7e2
# https://bugzilla.redhat.com/show_bug.cgi?id=1863466
7dd7e2
Patch1:         disable-lto-0.6.0.patch
7dd7e2
# Add coreos.force_persist_ip karg forwarding
7dd7e2
# https://github.com/coreos/coreos-installer/pull/554
7dd7e2
Patch2:         force_persist_ip-0.9.1.patch
7dd7e2
# Support s390x DASDs in VMs via virtio
7dd7e2
# https://github.com/coreos/coreos-installer/pull/552
7dd7e2
Patch3:         s390x-support-virtio-dasd-0.9.1.patch
7dd7e2
Patch4:         coidracut.patch
7dd7e2
Patch5:         coidracut2.patch
7dd7e2
Patch6:         coidracut3.patch
7dd7e2
Patch7:         coidracut4.patch
7dd7e2
Patch8:         coidracut5.patch
7dd7e2
7dd7e2
ExclusiveArch:  %{rust_arches}
7dd7e2
BuildRequires:  openssl-devel
7dd7e2
BuildRequires:  rust-toolset
7dd7e2
BuildRequires:  systemd
7dd7e2
7dd7e2
Requires:       gnupg
7dd7e2
Requires:       kpartx
7dd7e2
Requires:       systemd-udev
7dd7e2
Requires:       util-linux
7dd7e2
%ifarch s390x
7dd7e2
# This should eventually be spelled "s390utils-core" but the binaries
7dd7e2
# haven't been broken out of s390utils-base yet
7dd7e2
Requires:       /usr/sbin/chreipl
7dd7e2
Requires:       /usr/sbin/dasdfmt
7dd7e2
Requires:       /usr/sbin/fdasd
7dd7e2
Requires:       /usr/sbin/lszdev
7dd7e2
Requires:       /usr/sbin/zipl
7dd7e2
%endif
7dd7e2
7dd7e2
# Since `rust-coreos-installer` creates a `coreos-installer`
7dd7e2
# subpackage with a newer version number, which supersedes the
7dd7e2
# deprecated `coreos-installer` package (https://src.fedoraproject.org/rpms/coreos-installer),
7dd7e2
# an explicit `Obsoletes:` for `coreos-installer` is not necessary.
7dd7e2
7dd7e2
# Obsolete dracut modules as they are not provided in this package.
7dd7e2
Obsoletes:      coreos-installer-dracut < 0.0.1
7dd7e2
7dd7e2
%global _description %{expand:
7dd7e2
coreos-installer installs Fedora CoreOS or RHEL CoreOS to bare-metal
7dd7e2
machines (or, occasionally, to virtual machines).
7dd7e2
}
7dd7e2
%description %{_description}
7dd7e2
7dd7e2
%files
7dd7e2
%license LICENSE
7dd7e2
%doc README.md
7dd7e2
%{_bindir}/coreos-installer
7dd7e2
7dd7e2
%prep
7dd7e2
%autosetup -n %{crate}-%{version} -p1
7dd7e2
%cargo_prep -V 1
7dd7e2
# https://github.com/rust-lang-nursery/error-chain/pull/289
7dd7e2
find -name '*.rs' -executable -exec chmod a-x {} \;
7dd7e2
7dd7e2
%build
7dd7e2
%cargo_build
7dd7e2
7dd7e2
%install
7dd7e2
%cargo_install
7dd7e2
# Install binaries, dracut modules, units, targets, generators for running via systemd
7dd7e2
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore dracut/50rdcore/module-setup.sh
7dd7e2
install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-service
7dd7e2
install -D -m 0755 -t %{buildroot}%{_libexecdir} scripts/coreos-installer-disable-device-auto-activation
7dd7e2
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-disable-device-auto-activation.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-reboot.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-noreboot.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-pre.target
7dd7e2
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer.target
7dd7e2
install -D -m 0644 -t %{buildroot}%{_unitdir} systemd/coreos-installer-post.target
7dd7e2
install -D -m 0755 -t %{buildroot}%{_systemdgeneratordir} systemd/coreos-installer-generator
7dd7e2
mv %{buildroot}%{_bindir}/rdcore %{buildroot}%{dracutlibdir}/modules.d/50rdcore/
7dd7e2
cp -a %{buildroot}%{_bindir}/coreos-installer %{buildroot}%{dracutlibdir}/modules.d/50rdcore/
7dd7e2
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore scripts/coreos-installer-service
7dd7e2
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore scripts/growfs
7dd7e2
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore scripts/coreos-installer-disable-device-auto-activation
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer-disable-device-auto-activation.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/growfs.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer-reboot.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer-noreboot.service
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer-pre.target
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer.target
7dd7e2
install -D -m 0644 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer-post.target
7dd7e2
install -D -m 0755 -t %{buildroot}%{dracutlibdir}/modules.d/50rdcore systemd/coreos-installer-generator
7dd7e2
7dd7e2
%package     -n %{crate}-bootinfra
7dd7e2
Summary:     %{crate} boot-time infrastructure for use on Fedora/RHEL CoreOS
7dd7e2
Requires:   %{crate} = %{version}-%{release}
7dd7e2
7dd7e2
# Package was renamed from coreos-installer-systemd when rdcore was added
7dd7e2
Provides:    %{crate}-systemd = %{version}-%{release}
7dd7e2
Obsoletes:   %{crate}-systemd <= 0.3.0-2
7dd7e2
7dd7e2
%description -n %{crate}-bootinfra
7dd7e2
This subpackage contains boot-time infrastructure for Fedora CoreOS and
7dd7e2
RHEL CoreOS.  It is not needed on other platforms.
7dd7e2
7dd7e2
%files       -n %{crate}-bootinfra
7dd7e2
%{dracutlibdir}/modules.d/*
7dd7e2
%{_libexecdir}/*
7dd7e2
%{_unitdir}/*
7dd7e2
%{_systemdgeneratordir}/*
7dd7e2
7dd7e2
%if %{with check}
7dd7e2
%check
7dd7e2
%cargo_test
7dd7e2
%endif
7dd7e2
7dd7e2
%changelog
7dd7e2
* Thu Jun 10 2021 Benjamin Gilbert <bgilbert@redhat.com> - 0.9.1-3
7dd7e2
- Support s390x DASDs in VMs via virtio
7dd7e2
7dd7e2
* Tue Jun 08 2021 Dusty Mabe <dustymabe@redhat.com> - 0.9.1-2
7dd7e2
- Add coreos.force_persist_ip karg forwarding
7dd7e2
7dd7e2
* Wed Apr 21 2021 Benjamin Gilbert <bgilbert@redhat.com> - 0.9.0-3
7dd7e2
- Improve error message for busy disk referenced via symlink
7dd7e2
- Fix failure on corrupt GPT
7dd7e2
7dd7e2
* Fri Apr 9 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 0.9.0-2
7dd7e2
- Use macro for dracut library path
7dd7e2
7dd7e2
* Thu Apr 8 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 0.9.0-1
7dd7e2
- New release
7dd7e2
7dd7e2
* Fri Jan 15 2021 Benjamin Gilbert <bgilbert@redhat.com> - 0.8.0-3
7dd7e2
- Fix rdcore rootmap on RAID devices
7dd7e2
7dd7e2
* Tue Jan 12 2021 Benjamin Gilbert <bgilbert@redhat.com> - 0.8.0-2
7dd7e2
- Disable LTO again to avoid crashes on s390x
7dd7e2
7dd7e2
* Tue Jan 12 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 0.8.0-1
7dd7e2
- New release
7dd7e2
7dd7e2
* Mon Jan 04 2021 Benjamin Gilbert <bgilbert@redhat.com> - 0.7.2-2
7dd7e2
- Add Requires for programs invoked by coreos-installer
7dd7e2
- Require Rust >= 1.45, re-enable LTO
7dd7e2
7dd7e2
* Thu Oct 22 2020 Sohan Kunkerkar <skunkerk@redhat.com> - 0.7.2-1
7dd7e2
- New release
7dd7e2
7dd7e2
* Mon Sep 21 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.6.0-3
7dd7e2
- Fix MBR handling when partition saving is enabled
7dd7e2
- Fix base package Obsoletes being interpreted as part of package description
7dd7e2
7dd7e2
* Wed Sep 02 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.6.0-2
7dd7e2
- Disable LTO on s390x to avoid runtime crashes
7dd7e2
- Drop legacy installer
7dd7e2
7dd7e2
* Tue Aug 25 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.6.0-1
7dd7e2
- New release
7dd7e2
7dd7e2
* Fri Jul 31 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.5.0-1
7dd7e2
- New release
7dd7e2
7dd7e2
* Sat Jul 25 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.4.0-1
7dd7e2
- New release
7dd7e2
- Rename -systemd subpackage to -bootinfra
7dd7e2
- Add rdcore Dracut module to -bootinfra
7dd7e2
7dd7e2
* Wed Jul 22 2020 Benjamin Gilbert <bgilbert@redhat.com> - 0.3.0-1
7dd7e2
- New release
7dd7e2
- Make coreos-installer-{service,generator} world-readable
7dd7e2
7dd7e2
* Wed Jun 17 2020 Dusty Mabe <dusty@dustymabe.com> - 0.2.0-4.rhaos4.6
7dd7e2
- Include rhaos4.6 in the rpm release field
7dd7e2
7dd7e2
* Thu May 28 2020 Colin Walters <walters@verbum.org> - 0.2.0-3
7dd7e2
- Backport osmet RHCOS+LUKS patches
7dd7e2
7dd7e2
* Thu May 07 2020 Dusty Mabe <dusty@dustymabe.com> - 0.2.0-2
7dd7e2
- Fix bug in dracut hook in legacy installer; see
7dd7e2
  https://github.com/coreos/coreos-installer/pull/234
7dd7e2
7dd7e2
* Mon Apr 27 2020 Colin Walters <walters@verbum.org> - 0.1.3-4
7dd7e2
- Merge in legacy installer; see
7dd7e2
  https://github.com/coreos/coreos-installer/pull/220
7dd7e2
7dd7e2
* Mon Mar 23 2020 Colin Walters <walters@verbum.org> - 0.1.3-2
7dd7e2
- https://github.com/coreos/coreos-installer/releases/tag/v0.1.3
7dd7e2
7dd7e2
* Wed Mar 04 2020 Colin Walters <walters@verbum.org> - 0.1.2-11
7dd7e2
- Backport no-signatures-available patch
7dd7e2
7dd7e2
* Wed Feb 26 2020 Colin Walters <walters@verbum.org> - 0.1.2-10
7dd7e2
- Forked from Fedora
7dd7e2
- I forgot about the weird `rust-` package name prefixing when
7dd7e2
  asking RCM to make the dist-git repo, and rather than redo
7dd7e2
  that I decided to just go with it.
7dd7e2
- Stop depending on systemd-rpm-macros since it's not in RHEL8 apparently
7dd7e2
- Drop other things only applicable to Fedora Rust packaging like
7dd7e2
  dynamic buildrequires