From fa1bf93c896ddbd4d571153f07d3e72cceb363b5 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Mon, 7 Oct 2019 10:38:51 -0400 Subject: [PATCH] Revert "grub2: Exit gracefully if the configuration has BLS enabled" This reverts commit 985a14100295c99d0c6d712bfbee0ec52a3a1601. Reverting for now due to some users experiencing no boot entries after upgrading. See for background: https://github.com/ostreedev/ostree/pull/1929 https://discussion.fedoraproject.org/t/boot-entries-gone-after-upgrade/8026 --- Seems silly to revert this by an additional patch, instead of dropping the patch that enabled it in the first place. Though I think this approach has a higher chance of the revert not being accidentally dropped when doing the next rebase. --- ...t-gracefully-if-the-configuration-ha.patch | 38 +++++++++++++++++++ ostree.spec | 7 +++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-grub2-Exit-gracefully-if-the-configuration-ha.patch diff --git a/0001-Revert-grub2-Exit-gracefully-if-the-configuration-ha.patch b/0001-Revert-grub2-Exit-gracefully-if-the-configuration-ha.patch new file mode 100644 index 0000000..9139447 --- /dev/null +++ b/0001-Revert-grub2-Exit-gracefully-if-the-configuration-ha.patch @@ -0,0 +1,38 @@ +From a6476156735990ddf6e4d8cb9a12be4c0295eeca Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Mon, 7 Oct 2019 10:34:21 -0400 +Subject: [PATCH] Revert "grub2: Exit gracefully if the configuration has BLS + enabled" + +This reverts commit 985a14100295c99d0c6d712bfbee0ec52a3a1601. + +Reverting for now due to some users experiencing no boot entries after +upgrading. See for background: + +https://github.com/ostreedev/ostree/pull/1929 +https://discussion.fedoraproject.org/t/boot-entries-gone-after-upgrade/8026 +--- + src/boot/grub2/grub2-15_ostree | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/boot/grub2/grub2-15_ostree b/src/boot/grub2/grub2-15_ostree +index 160ac2ca..0b9bf930 100644 +--- a/src/boot/grub2/grub2-15_ostree ++++ b/src/boot/grub2/grub2-15_ostree +@@ -26,13 +26,6 @@ if ! test -d /ostree/repo; then + exit 0 + fi + +-# Gracefully exit if the grub2 configuration has BLS enabled, +-# since there is no need to create menu entries in that case. +-. /etc/default/grub +-if test ${GRUB_ENABLE_BLSCFG} = "true"; then +- exit 0 +-fi +- + # Make sure we're in the right environment + if ! test -n "${GRUB_DEVICE}"; then + echo "This script must be run as a child of grub2-mkconfig" 1>&2 +-- +2.21.0 + diff --git a/ostree.spec b/ostree.spec index 19fa170..4ad9c7f 100644 --- a/ostree.spec +++ b/ostree.spec @@ -8,12 +8,13 @@ Summary: Tool for managing bootable, immutable filesystem trees Name: ostree Version: 2019.4 -Release: 2%{?dist} +Release: 3%{?dist} Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz License: LGPLv2+ URL: https://ostree.readthedocs.io/en/latest/ Patch0: 0001-grub2-Exit-gracefully-if-the-configuration-has-BLS-e.patch +Patch1: 0001-Revert-grub2-Exit-gracefully-if-the-configuration-ha.patch BuildRequires: git # We always run autogen.sh @@ -164,6 +165,10 @@ find %{buildroot} -name '*.la' -delete %endif %changelog +* Thu Sep 26 2019 Jonathan Lebon - 2019.4-2 +- Revert ostree-grub2 patch to fix duplicate entries + https://github.com/ostreedev/ostree/pull/1929#issuecomment-539022174 + * Thu Sep 26 2019 Jonathan Lebon - 2019.4-2 - Backport patch to fix duplicate GRUB2 entries when using BLS https://bugzilla.redhat.com/show_bug.cgi?id=1751272#c27