commit d8ae8730789f7106cd61e97afe07c95afaaac19a Author: MSVSphere Packaging Team Date: Thu Mar 28 18:29:23 2024 +0300 import rust-bootupd-0.2.18-1.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14c8d70 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/bootupd-0.2.18-vendor.tar.zstd +SOURCES/bootupd-0.2.18.crate diff --git a/.rust-bootupd.metadata b/.rust-bootupd.metadata new file mode 100644 index 0000000..b59788b --- /dev/null +++ b/.rust-bootupd.metadata @@ -0,0 +1,2 @@ +cca30f4f8451b627534258f7c23fa360cec45b4a SOURCES/bootupd-0.2.18-vendor.tar.zstd +3746d3d9ce696228515b3bc400811c55ec8ae515 SOURCES/bootupd-0.2.18.crate diff --git a/SOURCES/0001-grub2-source-in-a-console.cfg-file-if-exists.patch b/SOURCES/0001-grub2-source-in-a-console.cfg-file-if-exists.patch new file mode 100644 index 0000000..3d6681b --- /dev/null +++ b/SOURCES/0001-grub2-source-in-a-console.cfg-file-if-exists.patch @@ -0,0 +1,31 @@ +From 38b971647d126f9c51545553d2a55cc77ff01d08 Mon Sep 17 00:00:00 2001 +From: Dusty Mabe +Date: Mon, 19 Feb 2024 14:33:17 -0500 +Subject: [PATCH] grub2: source in a console.cfg file if exists + +This will allow users or distro builders place console settings +here that will get picked up on boot. This was discussed as part +of https://github.com/coreos/fedora-coreos-tracker/issues/1671 +--- + src/grub2/grub-static-pre.cfg | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/grub2/grub-static-pre.cfg b/src/grub2/grub-static-pre.cfg +index 7784834..9717cfb 100644 +--- a/src/grub2/grub-static-pre.cfg ++++ b/src/grub2/grub-static-pre.cfg +@@ -38,6 +38,11 @@ elif [ -s $prefix/grubenv ]; then + load_env + fi + ++if [ -f $prefix/console.cfg ]; then ++ # Source in any GRUB console settings if provided by the user/platform ++ source $prefix/console.cfg ++fi ++ + if [ x"${feature_menuentry_id}" = xy ]; then + menuentry_id_option="--id" + else +-- +2.43.0 + diff --git a/SPECS/rust-bootupd.spec b/SPECS/rust-bootupd.spec new file mode 100644 index 0000000..69f0028 --- /dev/null +++ b/SPECS/rust-bootupd.spec @@ -0,0 +1,149 @@ +%bcond_without check +%global __cargo_skip_build 0 + +%global crate bootupd + +Name: rust-%{crate} +Version: 0.2.18 +Release: 1%{?dist} +Summary: Bootloader updater + +License: ASL 2.0 +URL: https://crates.io/crates/bootupd +Source0: https://github.com/coreos/bootupd/releases/download/v%{version}/bootupd-%{version}.crate +Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.zstd + +Patch0: 0001-grub2-source-in-a-console.cfg-file-if-exists.patch + +BuildRequires: make +BuildRequires: openssl-devel +%if 0%{?rhel} && !0%{?eln} +BuildRequires: rust-toolset +%else +BuildRequires: rust-packaging +%endif +BuildRequires: systemd + +%global _description %{expand: +Bootloader updater} +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: ASL 2.0 +%{?systemd_requires} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%doc README.md +%{_bindir}/bootupctl +%{_libexecdir}/bootupd +%{_unitdir}/* +%{_prefix}/lib/bootupd/grub2-static/ + +%prep +%autosetup -n %{crate}-%{version} -p1 +tar -xv -f %{SOURCE1} +mkdir -p .cargo +cat >.cargo/config << EOF +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" +EOF + +%build +%cargo_build + +%install +%make_install INSTALL="install -p -c" +make install-grub-static DESTDIR=%{?buildroot} INSTALL="%{__install} -p" + +%post -n %{crate} +%systemd_post bootupd.service bootupd.socket + +%preun -n %{crate} +%systemd_preun bootupd.service bootupd.socket + +%postun -n %{crate} +%systemd_postun bootupd.service bootupd.socket + +%changelog +* Thu Feb 22 2024 Joseph Marrero - 0.2.18-1 +- https://github.com/coreos/bootupd/releases/tag/v0.2.18 + backport patch to support GRUB console.cfg + Resolves: RHEL-26439 + +* Tue Dec 19 2023 Joseph Marrero - 0.2.17-1 +- https://github.com/coreos/bootupd/releases/tag/v0.2.17 + Resolves: RHEL-14388 + +* Fri Dec 15 2023 Huijing Hei - 0.2.16-4 +- Sync spec with upstream + Related: https://issues.redhat.com/browse/RHEL-14388 + +* Wed Dec 13 2023 Colin Walters - 0.2.16-3 +- Build on all architectures + Related: https://issues.redhat.com/browse/RHEL-14388 + +* Wed Dec 13 2023 Colin Walters - 0.2.16-2 +- Update to 0.2.16 + Related: https://issues.redhat.com/browse/RHEL-14388 + +* Tue Nov 28 2023 Colin Walters - 0.2.15-2 +- https://github.com/coreos/bootupd/releases/tag/v0.2.15 + Related: https://issues.redhat.com/browse/RHEL-14388 + +* Fri Oct 20 2023 Colin Walters - 0.2.12-2 +- https://github.com/coreos/bootupd/releases/tag/v0.2.12 + +* Tue Sep 19 2023 Colin Walters - 0.2.11-2 +- https://github.com/coreos/bootupd/releases/tag/v0.2.11 + Resolves: https://issues.redhat.com/browse/RHEL-5273 + +* Mon Aug 01 2022 Colin Walters - 0.2.7-2 +- https://github.com/coreos/bootupd/releases/tag/v0.2.7 + +* Thu Sep 16 2021 Luca BRUNO - 0.2.6-1 +- New upstream version + https://github.com/coreos/bootupd/releases/tag/v0.2.6 + +* Fri Jul 23 2021 Fedora Release Engineering - 0.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 0.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 6 14:48:03 UTC 2021 Colin Walters - 0.2.5-2 +- https://github.com/coreos/bootupd/releases/tag/v0.2.5 + +* Tue Dec 15 14:48:20 UTC 2020 Colin Walters - 0.2.4-2 +- https://github.com/coreos/bootupd/releases/tag/v0.2.4 + +* Tue Nov 17 14:33:06 UTC 2020 Colin Walters - 0.2.3-2 +- https://github.com/coreos/rpm-ostree/bootupd/tag/v0.2.3 + +* Wed Nov 11 18:07:38 UTC 2020 Colin Walters - 0.2.2-2 +- Update to 0.2.2 + +* Mon Nov 2 23:03:03 UTC 2020 Colin Walters - 0.2.0-3 +- Switch to vendored sources since RHEL requires it + +* Mon Oct 26 15:06:37 UTC 2020 Colin Walters - 0.2.0-2 +- https://github.com/coreos/bootupd/releases/tag/v0.2.0 + +* Tue Oct 13 2020 Colin Walters - 0.1.3-2 +- https://github.com/coreos/bootupd/releases/tag/v0.1.3 + +* Tue Sep 22 2020 Colin Walters - 0.1.2-2 +- New upstream + +* Mon Sep 21 2020 Colin Walters - 0.1.1-2 +- Also build on aarch64 + +* Fri Sep 11 2020 Colin Walters - 0.1.0-3 +- Initial package +