forked from pool/grub2
Accepting request 574507 from Base:System
OBS-URL: https://build.opensuse.org/request/show/574507 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=176
This commit is contained in:
commit
4672323d45
@ -1,10 +1,22 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
SNAPSHOTS="/.snapshots"
|
||||
if [ "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" = "xtrue" ] &&
|
||||
[ "x${GRUB_FS}" = "xbtrfs" ] ; then
|
||||
[ "x${GRUB_FS}" = "xbtrfs" ] &&
|
||||
[ -f "${SNAPSHOTS}/grub-snapshot.cfg" ]; 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}"
|
||||
fi
|
||||
fi
|
||||
cat <<EOF
|
||||
if [ -f "/.snapshots/grub-snapshot.cfg" ]; then
|
||||
source "/.snapshots/grub-snapshot.cfg"
|
||||
if [ -f "${SNAPSHOTS}/grub-snapshot.cfg" ]; then
|
||||
source "${SNAPSHOTS}/grub-snapshot.cfg"
|
||||
fi
|
||||
EOF
|
||||
fi
|
||||
|
@ -39,7 +39,9 @@ SAVED_ENTRY=`${GRUB_EDITENV} list | sed -ne "/^saved_entry=/{s@\"\(.*\)\"@\1@;t
|
||||
|
||||
debug_print "SAVED_ENTRY=$SAVED_ENTRY"
|
||||
|
||||
[ -z "$SAVED_ENTRY" ] && exit 0
|
||||
if [ -z "$SAVED_ENTRY" ] || expr match "$SAVED_ENTRY" "^[0-9]\+$" >/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
MENU_ENTRIES=`awk '
|
||||
BEGIN {
|
||||
@ -103,13 +105,13 @@ NEW_SAVED_ENTRY=`echo $SAVED_ENTRY | sed -ne "s/$NAME [0-9a-zA-Z_.-]\\+/$NAME $V
|
||||
|
||||
debug_print "NEW_SAVED_ENTRY=$NEW_SAVED_ENTRY"
|
||||
|
||||
if [ "$NEW_SAVED_ENTRY" = "$SAVED_ENTRY" ]; then
|
||||
if [ -z "$NEW_SAVED_ENTRY" -o "$NEW_SAVED_ENTRY" = "$SAVED_ENTRY" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
IFS=$'\n'
|
||||
for i in $MENU_ENTRIES; do
|
||||
if [ $NEW_SAVED_ENTRY = $i ]; then
|
||||
if [ "$NEW_SAVED_ENTRY" = "$i" ]; then
|
||||
run_command ${GRUB_SET_DEFAULT} "$NEW_SAVED_ENTRY"
|
||||
exit 0
|
||||
fi
|
||||
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 7 09:58:26 UTC 2018 - mchang@suse.com
|
||||
|
||||
- Fix disappeared snapshot menu entry (bsc#1078481)
|
||||
* 80_suse_btrfs_snapshot
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 6 09:44:26 UTC 2018 - mchang@suse.com
|
||||
|
||||
- Fix unquoted string error and add some more checks (bsc#1079330)
|
||||
* grub2-check-default.sh
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 5 08:52:20 UTC 2018 - olaf@aepfle.de
|
||||
|
||||
- The %prep section applies patches, the %build section builds.
|
||||
Remove mixup of patching and building from %prep for quilt setup
|
||||
Related to bsc#1065703
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 23 04:41:22 UTC 2018 - mchang@suse.com
|
||||
|
||||
|
@ -544,6 +544,8 @@ swap partition while in resuming
|
||||
%patch420 -p1
|
||||
%patch421 -p1
|
||||
%patch430 -p1
|
||||
|
||||
%build
|
||||
# patches above may update the timestamp of grub.texi
|
||||
# and via build-aux/mdate-sh they end up in grub2.info, breaking build-compare
|
||||
[ -z "$SOURCE_DATE_EPOCH" ] ||\
|
||||
@ -574,7 +576,6 @@ mkdir build-xen
|
||||
mkdir build-emu
|
||||
%endif
|
||||
|
||||
%build
|
||||
export PYTHON=%{_bindir}/python3
|
||||
# autogen calls autoreconf -vi
|
||||
./autogen.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user