More work on grub's "saved_entry" system.
Resolves: rhbz#768106 Resolves: rhbz#736188
This commit is contained in:
parent
e0c126c7f0
commit
c8c92c6872
@ -1,186 +0,0 @@
|
||||
From 99f59c44b14b81bfa66e419798ed957ba1de5582 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 30 Jul 2013 14:04:10 -0400
|
||||
Subject: [PATCH] Only run the grub2 test suite on architectures where it's
|
||||
meaningful.
|
||||
|
||||
We don't have grub2-editenv on other architectures, so don't run it
|
||||
there.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
test.sh | 158 ++++++++++++++++++++++++++++++++++++----------------------------
|
||||
1 file changed, 89 insertions(+), 69 deletions(-)
|
||||
|
||||
diff --git a/test.sh b/test.sh
|
||||
index 3d5869f..6bf6cd3 100755
|
||||
--- a/test.sh
|
||||
+++ b/test.sh
|
||||
@@ -432,75 +432,95 @@ grubTest grub.11 add/g11.1 --add-kernel=/boot/new-kernel.img --title='title' \
|
||||
--initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \
|
||||
--args='console=tty0 console=ttyS1,9600n81 single'
|
||||
|
||||
-testing="GRUB2 add kernel"
|
||||
-grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img --title='title' \
|
||||
- --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default
|
||||
-grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img --title='title' \
|
||||
- --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default --efi
|
||||
-grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img --title='title' \
|
||||
- --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default --efi
|
||||
-grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img --title='title' \
|
||||
- --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
- --copy-default --make-default
|
||||
-grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img --title='title' \
|
||||
- --boot-filesystem=/boot/ --copy-default --make-default
|
||||
-grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
|
||||
- --boot-filesystem=/boot/
|
||||
-grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img --title='title' \
|
||||
- --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default
|
||||
-
|
||||
-testing="GRUB2 add initrd"
|
||||
-grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
|
||||
- --initrd=/boot/new-initrd --boot-filesystem=/boot/
|
||||
-
|
||||
-testing="GRUB2 display default index"
|
||||
-grub2DisplayTest grub2.1 defaultindex/0 --default-index
|
||||
-grub2DisplayTest grub2.2 defaultindex/0 --default-index
|
||||
-
|
||||
-testing="GRUB2 display default title"
|
||||
-grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title
|
||||
-grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title
|
||||
-
|
||||
-testing="GRUB2 display debug failure"
|
||||
-grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad --boot-filesystem=/boot --default-kernel --debug
|
||||
-testing="GRUB2 display debug success"
|
||||
-grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot --default-kernel --debug
|
||||
-
|
||||
-testing="GRUB2 remove kernel via index"
|
||||
-grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1
|
||||
-
|
||||
-testing="GRUB2 remove kernel via title"
|
||||
-grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2"
|
||||
-
|
||||
-testing="GRUB2 (submenu) remove kernel via index"
|
||||
-grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2
|
||||
-
|
||||
-testing="GRUB2 (submenu) remove kernel via title"
|
||||
-grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2"
|
||||
-
|
||||
-testing="GRUB2 default index directive"
|
||||
-grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0
|
||||
-grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1
|
||||
-grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9
|
||||
-
|
||||
-testing="GRUB2 add kernel with default=saved_entry"
|
||||
-grub2Test grub2.7 add/g2-1.8 --env grubenv.1 --add-kernel=/boot/new-kernel.img \
|
||||
- --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
- --copy-default
|
||||
-commandTest "saved_default output" "grub2-editenv test/grub2-support_files/env_temp list" "saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64"
|
||||
-
|
||||
-testing="GRUB2 set default with default=saved_entry"
|
||||
-grub2Test grub2.8 add/g2-1.8 --env grubenv.1 --set-default-index=0
|
||||
-commandTest "saved_default output" "grub2-editenv test/grub2-support_files/env_temp list" "saved_entry=title"
|
||||
-
|
||||
-testing="GRUB2 --default-index with default=saved_entry"
|
||||
-grub2DisplayTest grub2.8 defaultindex/1 --env grubenv.1 --default-index
|
||||
-
|
||||
-testing="GRUB2 --default-index with default=saved_entry"
|
||||
-grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.2 --default-index
|
||||
-
|
||||
-testing="GRUB2 --default-title with default=saved_entry"
|
||||
-grub2DisplayTest grub2.8 defaulttitle/g2.1 --env grubenv.1 --default-title
|
||||
+local testgrub2=n
|
||||
+ARCH=$(uname -m | sed s,i[3456789]86,ia32,)
|
||||
+case $ARCH in
|
||||
+ ppc|ppc64|ia32|x86_64) testgrub2=y ;;
|
||||
+esac
|
||||
+
|
||||
+if [ "$testgrub2" == "y" ]; then
|
||||
+ testing="GRUB2 add kernel"
|
||||
+ grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \
|
||||
+ --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
+ --copy-default
|
||||
+ grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \
|
||||
+ --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
+ --copy-default --efi
|
||||
+ grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img \
|
||||
+ --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
+ --copy-default --efi
|
||||
+ grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img \
|
||||
+ --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
+ --copy-default --make-default
|
||||
+ grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img \
|
||||
+ --title='title' --boot-filesystem=/boot/ --copy-default --make-default
|
||||
+ grub2Test grub2.1 remove/g2-1.4 \
|
||||
+ --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
|
||||
+ --boot-filesystem=/boot/
|
||||
+ grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \
|
||||
+ --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
+ --copy-default
|
||||
+
|
||||
+ testing="GRUB2 add initrd"
|
||||
+ grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
|
||||
+ --initrd=/boot/new-initrd --boot-filesystem=/boot/
|
||||
+
|
||||
+ testing="GRUB2 display default index"
|
||||
+ grub2DisplayTest grub2.1 defaultindex/0 --default-index
|
||||
+ grub2DisplayTest grub2.2 defaultindex/0 --default-index
|
||||
+
|
||||
+ testing="GRUB2 display default title"
|
||||
+ grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title
|
||||
+ grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title
|
||||
+
|
||||
+ testing="GRUB2 display debug failure"
|
||||
+ grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad \
|
||||
+ --boot-filesystem=/boot --default-kernel --debug
|
||||
+ testing="GRUB2 display debug success"
|
||||
+ grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot \
|
||||
+ --default-kernel --debug
|
||||
+
|
||||
+ testing="GRUB2 remove kernel via index"
|
||||
+ grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1
|
||||
+
|
||||
+ testing="GRUB2 remove kernel via title"
|
||||
+ grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2"
|
||||
+
|
||||
+ testing="GRUB2 (submenu) remove kernel via index"
|
||||
+ grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2
|
||||
+
|
||||
+ testing="GRUB2 (submenu) remove kernel via title"
|
||||
+ grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2"
|
||||
+
|
||||
+ testing="GRUB2 default index directive"
|
||||
+ grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0
|
||||
+ grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1
|
||||
+ grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9
|
||||
+
|
||||
+ testing="GRUB2 add kernel with default=saved_entry"
|
||||
+ grub2Test grub2.7 add/g2-1.8 --env grubenv.1 \
|
||||
+ --add-kernel=/boot/new-kernel.img \
|
||||
+ --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
+ --copy-default
|
||||
+ commandTest "saved_default output" \
|
||||
+ "grub2-editenv test/grub2-support_files/env_temp list" \
|
||||
+ "saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64"
|
||||
+
|
||||
+ testing="GRUB2 set default with default=saved_entry"
|
||||
+ grub2Test grub2.8 add/g2-1.8 --env grubenv.1 --set-default-index=0
|
||||
+ commandTest "saved_default output" \
|
||||
+ "grub2-editenv test/grub2-support_files/env_temp list" \
|
||||
+ "saved_entry=title"
|
||||
+
|
||||
+ testing="GRUB2 --default-index with default=saved_entry"
|
||||
+ grub2DisplayTest grub2.8 defaultindex/1 --env grubenv.1 --default-index
|
||||
+
|
||||
+ testing="GRUB2 --default-index with default=saved_entry"
|
||||
+ grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.2 --default-index
|
||||
+
|
||||
+ testing="GRUB2 --default-title with default=saved_entry"
|
||||
+ grub2DisplayTest grub2.8 defaulttitle/g2.1 --env grubenv.1 --default-title
|
||||
+fi
|
||||
|
||||
testing="YABOOT add kernel"
|
||||
yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel \
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,24 +0,0 @@
|
||||
From 661b4c80512dc41353b0f3639c512d719cbf9d86 Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Gilmore <dennis@ausil.us>
|
||||
Date: Thu, 6 Jun 2013 04:19:38 -0500
|
||||
Subject: [PATCH] update extlinux.conf on arm arches if it exists
|
||||
|
||||
---
|
||||
new-kernel-pkg | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/new-kernel-pkg b/new-kernel-pkg
|
||||
index f248e7e..3206155 100755
|
||||
--- a/new-kernel-pkg
|
||||
+++ b/new-kernel-pkg
|
||||
@@ -82,6 +82,7 @@ elif [ $ARCH = 's390' -o $ARCH = 's390x' ]; then
|
||||
elif [[ ${ARCH} =~ armv[5|7].*l ]] ; then
|
||||
liloConfig=""
|
||||
bootPrefix=/boot
|
||||
+ extlinuxConfig=$(readlink -f /etc/extlinux.conf 2>/dev/null)
|
||||
ubootDir=${UBOOT_DIR:-"/boot"}
|
||||
ubootScript=$ubootDir/${UBOOT_SCR:-"boot.scr"}
|
||||
ubootKList=${UBOOT_KLIST:-"klist.txt"}
|
||||
--
|
||||
1.8.2.1
|
||||
|
12
grubby.spec
12
grubby.spec
@ -1,5 +1,5 @@
|
||||
Name: grubby
|
||||
Version: 8.27
|
||||
Version: 8.28
|
||||
Release: 1%{?dist}
|
||||
Summary: Command line tool for updating bootloader configs
|
||||
Group: System Environment/Base
|
||||
@ -9,15 +9,14 @@ URL: http://git.fedorahosted.org/git/grubby.git
|
||||
# git clone git://git.fedorahosted.org/git/grubby.git
|
||||
# git archive --format=tar --prefix=grubby-%{version}/ HEAD |bzip2 > grubby-%{version}.tar.bz2
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Patch0: 0001-update-extlinux.conf-on-arm-arches-if-it-exists.patch
|
||||
Patch1: 0001-Only-run-the-grub2-test-suite-on-architectures-where.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: pkgconfig glib2-devel popt-devel
|
||||
BuildRequires: libblkid-devel git
|
||||
# for make test / getopt:
|
||||
BuildRequires: util-linux-ng
|
||||
%ifarch aarch64 i686 x86_64 ppc ppc64
|
||||
BuildRequires: grub2
|
||||
BuildRequires: /usr/bin/grub2-editenv
|
||||
%endif
|
||||
%ifarch s390 s390x
|
||||
Requires: s390utils-base
|
||||
@ -76,6 +75,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Aug 02 2013 Peter Jones <pjones@redhat.com> - 8.28-1
|
||||
- More work on grub's "saved_entry" system.
|
||||
Resolves: rhbz#768106
|
||||
Resolves: rhbz#736188
|
||||
|
||||
* Tue Jul 30 2013 Peter Jones <pjones@redhat.com> - 8.27-1
|
||||
- Make grubby understand grub's "saved_entry" system
|
||||
Resolves: rhbz#768106
|
||||
|
Loading…
Reference in New Issue
Block a user