From 8c8da55daab2c07124e90335ed649a3b6f4e84573ecefc1f179f0d2fe806afe0 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Fri, 16 Jul 2021 08:23:34 +0000 Subject: [PATCH] Accepting request 906622 from home:michael-chang:branches:Base:System - Fix error not a btrfs filesystem on s390x (bsc#1187645) * 80_suse_btrfs_snapshot - Fix error gfxterm isn't found with multiple terminals (bsc#1187565) * grub2-fix-error-terminal-gfxterm-isn-t-found.patch - Fix boot failure after kdump due to the content of grub.cfg is not completed with pending modificaton in xfs journal (bsc#1186975) * grub-install-force-journal-draining-to-ensure-data-i.patch - Patch refreshed * grub2-mkconfig-default-entry-correction.patch OBS-URL: https://build.opensuse.org/request/show/906622 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=387 --- 80_suse_btrfs_snapshot | 24 ++++++++------ ...ce-journal-draining-to-ensure-data-i.patch | 32 +++++++++++++++++++ ...x-error-terminal-gfxterm-isn-t-found.patch | 19 +++++------ grub2-mkconfig-default-entry-correction.patch | 10 +++--- grub2.changes | 21 ++++++++++++ 5 files changed, 83 insertions(+), 23 deletions(-) diff --git a/80_suse_btrfs_snapshot b/80_suse_btrfs_snapshot index 7589358..4260140 100644 --- a/80_suse_btrfs_snapshot +++ b/80_suse_btrfs_snapshot @@ -4,16 +4,22 @@ SNAPSHOTS="/.snapshots" if [ "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" = "xtrue" ] && [ "x${GRUB_FS}" = "xbtrfs" ] && [ -d "${SNAPSHOTS}" ]; then - SNAPSHOT_RID=`btrfs inspect-internal rootid ${SNAPSHOTS}` - ROOT_RID=`btrfs inspect-internal rootid /` - if [ -n "${SNAPSHOT_RID}" -a "${SNAPSHOT_RID}" != "${ROOT_RID}" ]; then - SNAPSHOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${SNAPSHOT_RID} /` - ROOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${ROOT_RID} /` - INODE=`stat -c '%i' ${SNAPSHOTS}` - if [ "x${INODE}" = "x256" -a "x${ROOT_SUBVOL}${SNAPSHOTS}" != "x${SNAPSHOT_SUBVOL}" ]; then - echo "btrfs-mount-subvol (\$root) ${SNAPSHOTS} ${SNAPSHOT_SUBVOL}" + machine=`uname -m` + case "x$machine" in + xs390 | xs390x) : ;; + *) + SNAPSHOT_RID=`btrfs inspect-internal rootid ${SNAPSHOTS}` + ROOT_RID=`btrfs inspect-internal rootid /` + if [ -n "${SNAPSHOT_RID}" -a "${SNAPSHOT_RID}" != "${ROOT_RID}" ]; then + SNAPSHOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${SNAPSHOT_RID} /` + ROOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${ROOT_RID} /` + INODE=`stat -c '%i' ${SNAPSHOTS}` + if [ "x${INODE}" = "x256" -a "x${ROOT_SUBVOL}${SNAPSHOTS}" != "x${SNAPSHOT_SUBVOL}" ]; then + echo "btrfs-mount-subvol (\$root) ${SNAPSHOTS} ${SNAPSHOT_SUBVOL}" + fi fi - fi + ;; + esac cat < --- Makefile.util.def | 1 + @@ -196,3 +200,31 @@ Index: grub-2.06/util/grub-install.c /* * Either there are no platform specific code, or it didn't raise * ponr. Raise it here, because usually this is already past point +Index: grub-2.06/util/grub-mkconfig.in +=================================================================== +--- grub-2.06.orig/util/grub-mkconfig.in ++++ grub-2.06/util/grub-mkconfig.in +@@ -328,6 +328,15 @@ for i in "${grub_mkconfig_dir}"/* ; do + esac + done + ++sync_fs_journal () { ++ if test "x$GRUB_DEVICE" = "x$GRUB_DEVICE_BOOT" && ++ test "x$GRUB_FS" = "xxfs" -o "x$GRUB_FS" = "xext2" && ++ test "x${grub_cfg}" != "x" -a "x`make_system_path_relative_to_its_root $grub_cfg`" = "x/boot/grub2/grub.cfg" && ++ test -x /usr/sbin/fsfreeze; then ++ /usr/sbin/fsfreeze --freeze / && /usr/sbin/fsfreeze --unfreeze / ++ fi ++} >&2 ++ + if test "x${grub_cfg}" != "x" ; then + if ! ${grub_script_check} ${grub_cfg}.new; then + # TRANSLATORS: %s is replaced by filename +@@ -341,6 +350,7 @@ and /etc/grub.d/* files or please file a + # none of the children aborted with error, install the new grub.cfg + cat ${grub_cfg}.new > ${grub_cfg} + rm -f ${grub_cfg}.new ++ sync_fs_journal || true + fi + fi + diff --git a/grub2-fix-error-terminal-gfxterm-isn-t-found.patch b/grub2-fix-error-terminal-gfxterm-isn-t-found.patch index e9e9bd8..bd44eef 100644 --- a/grub2-fix-error-terminal-gfxterm-isn-t-found.patch +++ b/grub2-fix-error-terminal-gfxterm-isn-t-found.patch @@ -10,24 +10,25 @@ If set GRUB_TERMINAL="gfxterm", the error message "terminal 'gfxterm' isn't found" will be logged to screen. This is caused by GRUB_TERMINAL_INPUT erroneously set to gfxterm. This patch fixes the issue by not setting it. + +v2: +Fix error gfxterm isn't found with multiple terminals (bsc#1187565) + --- util/grub-mkconfig.in | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) -Index: grub-2.02~beta2/util/grub-mkconfig.in +Index: grub-2.06/util/grub-mkconfig.in =================================================================== ---- grub-2.02~beta2.orig/util/grub-mkconfig.in -+++ grub-2.02~beta2/util/grub-mkconfig.in -@@ -150,7 +150,11 @@ fi +--- grub-2.06.orig/util/grub-mkconfig.in ++++ grub-2.06/util/grub-mkconfig.in +@@ -172,7 +172,8 @@ fi # XXX: should this be deprecated at some point? if [ "x${GRUB_TERMINAL}" != "x" ] ; then - GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}" -+# bnc#771393 - fix error: terminal 'gfxterm' isn't found. -+# by not specifying 'gfxterm' to GRUB_TERMINAL_INPUT -+ if [ "x${GRUB_TERMINAL}" != "xgfxterm" ]; then -+ GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}" -+ fi ++# bnc#771393, bsc#1187565 - fix error: terminal 'gfxterm' isn't found. ++ GRUB_TERMINAL_INPUT="`echo ${GRUB_TERMINAL} | sed -e '/\bgfxterm\b/{s/\bconsole\b//g;s/\bgfxterm\b/console/}'`" GRUB_TERMINAL_OUTPUT="${GRUB_TERMINAL}" fi diff --git a/grub2-mkconfig-default-entry-correction.patch b/grub2-mkconfig-default-entry-correction.patch index 65bd85f..59ef5fa 100644 --- a/grub2-mkconfig-default-entry-correction.patch +++ b/grub2-mkconfig-default-entry-correction.patch @@ -1,8 +1,8 @@ -Index: grub-2.06~rc1/util/grub-mkconfig.in +Index: grub-2.06/util/grub-mkconfig.in =================================================================== ---- grub-2.06~rc1.orig/util/grub-mkconfig.in -+++ grub-2.06~rc1/util/grub-mkconfig.in -@@ -347,6 +347,11 @@ and /etc/grub.d/* files or please file a +--- grub-2.06.orig/util/grub-mkconfig.in ++++ grub-2.06/util/grub-mkconfig.in +@@ -356,6 +356,11 @@ and /etc/grub.d/* files or please file a # none of the children aborted with error, install the new grub.cfg cat ${grub_cfg}.new > ${grub_cfg} rm -f ${grub_cfg}.new @@ -11,6 +11,6 @@ Index: grub-2.06~rc1/util/grub-mkconfig.in + if test -x /usr/sbin/grub2-check-default; then + /usr/sbin/grub2-check-default >&2 + fi + sync_fs_journal || true fi fi - diff --git a/grub2.changes b/grub2.changes index 7596c98..3b84671 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Mon Jun 28 10:14:26 UTC 2021 - Michael Chang + +- Fix error not a btrfs filesystem on s390x (bsc#1187645) + * 80_suse_btrfs_snapshot + +------------------------------------------------------------------- +Wed Jun 23 07:41:57 UTC 2021 - Michael Chang + +- Fix error gfxterm isn't found with multiple terminals (bsc#1187565) + * grub2-fix-error-terminal-gfxterm-isn-t-found.patch + +------------------------------------------------------------------- +Mon Jun 21 10:45:40 UTC 2021 - Michael Chang + +- Fix boot failure after kdump due to the content of grub.cfg is not + completed with pending modificaton in xfs journal (bsc#1186975) + * grub-install-force-journal-draining-to-ensure-data-i.patch +- Patch refreshed + * grub2-mkconfig-default-entry-correction.patch + ------------------------------------------------------------------- Thu Jun 3 11:17:49 UTC 2021 - Michael Chang