Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
Peter Jones | cce3028c2b | |
Peter Jones | 3dbbb01569 | |
Peter Jones | c7fcb5e117 | |
Peter Jones | ff3c414b3e | |
Peter Jones | 71f448dbec | |
Adam Williamson | b4d13870fe | |
Adam Williamson | 053492ccd5 | |
Adam Williamson | 0950b4c2e7 | |
Peter Jones | 312ac2e71e | |
Peter Jones | 4c0b3badd4 |
|
@ -1 +1 @@
|
|||
/grubby-8.1.tar.bz2
|
||||
/grubby-8.8.tar.bz2
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
From 4bb88f93e6c7cf432e354a164fce8743794a84a5 Mon Sep 17 00:00:00 2001
|
||||
From: Mads Kiilerich <mads@kiilerich.com>
|
||||
Date: Thu, 8 Dec 2011 11:49:35 -0800
|
||||
Subject: [PATCH 331/331] Update "echo 'Loading..." messages to the new kernel
|
||||
version
|
||||
|
||||
grub2-mkconfig will create lines like:
|
||||
echo 'Loading Linux 3.1.0-0.rc6.git0.0.fc16.x86_64 ...'
|
||||
- depending on the content of /etc/default/grub.
|
||||
|
||||
grubby would recognize these lines and replace them with lines with the right
|
||||
version number such as:
|
||||
echo 'Loading Fedora (3.1.0-0.rc6.git0.0.fc16.x86_64)'
|
||||
|
||||
these lines were however not recognized by grubby and would not be updated on
|
||||
next kernel update when this entry would be used as template.
|
||||
|
||||
With this patch grubby will no longer look for a specific title but patch any
|
||||
"echo 'Loading" line immediately before the kernel line.
|
||||
|
||||
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||
---
|
||||
grubby.c | 5 +++--
|
||||
test/grub2.1 | 4 ++--
|
||||
test/results/add/g2-1.1 | 4 ++--
|
||||
test/results/add/g2-1.2 | 4 ++--
|
||||
test/results/add/g2-1.3 | 4 ++--
|
||||
5 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/grubby.c b/grubby.c
|
||||
index 38ca9ac..7221372 100644
|
||||
--- a/grubby.c
|
||||
+++ b/grubby.c
|
||||
@@ -2960,9 +2960,10 @@ int addNewKernel(struct grubConfig * config, struct singleEntry * template,
|
||||
}
|
||||
} else if (tmplLine->type == LT_ECHO) {
|
||||
requote(tmplLine, config->cfi);
|
||||
+ static const char *prefix = "'Loading ";
|
||||
if (tmplLine->numElements > 1 &&
|
||||
- strstr(tmplLine->elements[1].item, "'Loading Linux ")) {
|
||||
- char *prefix = "'Loading ";
|
||||
+ strstr(tmplLine->elements[1].item, prefix) &&
|
||||
+ masterLine->next && masterLine->next->type == LT_KERNEL) {
|
||||
char *newTitle = malloc(strlen(prefix) +
|
||||
strlen(newKernelTitle) + 2);
|
||||
|
||||
diff --git a/test/grub2.1 b/test/grub2.1
|
||||
index 242983c..fcf053a 100644
|
||||
--- a/test/grub2.1
|
||||
+++ b/test/grub2.1
|
||||
@@ -36,14 +36,14 @@ set timeout=5
|
||||
### END /etc/grub.d/00_header ###
|
||||
|
||||
### BEGIN /etc/grub.d/10_linux ###
|
||||
-menuentry 'Linux, with Linux 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
+menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos1)'
|
||||
search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
|
||||
- echo 'Loading Linux 2.6.38.8-32.fc15.x86_64 ...'
|
||||
+ echo 'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
|
||||
linux /vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /initramfs-2.6.38.8-32.fc15.x86_64.img
|
||||
diff --git a/test/results/add/g2-1.1 b/test/results/add/g2-1.1
|
||||
index a08d01d..ea17971 100644
|
||||
--- a/test/results/add/g2-1.1
|
||||
+++ b/test/results/add/g2-1.1
|
||||
@@ -48,14 +48,14 @@ menuentry 'title' --class gnu-linux --class gnu --class os {
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /new-initrd
|
||||
}
|
||||
-menuentry 'Linux, with Linux 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
+menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos1)'
|
||||
search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
|
||||
- echo 'Loading Linux 2.6.38.8-32.fc15.x86_64 ...'
|
||||
+ echo 'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
|
||||
linux /vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /initramfs-2.6.38.8-32.fc15.x86_64.img
|
||||
diff --git a/test/results/add/g2-1.2 b/test/results/add/g2-1.2
|
||||
index 9797b78..b1e96c6 100644
|
||||
--- a/test/results/add/g2-1.2
|
||||
+++ b/test/results/add/g2-1.2
|
||||
@@ -48,14 +48,14 @@ menuentry 'title' --class gnu-linux --class gnu --class os {
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /new-initrd
|
||||
}
|
||||
-menuentry 'Linux, with Linux 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
+menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos1)'
|
||||
search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
|
||||
- echo 'Loading Linux 2.6.38.8-32.fc15.x86_64 ...'
|
||||
+ echo 'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
|
||||
linux /vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /initramfs-2.6.38.8-32.fc15.x86_64.img
|
||||
diff --git a/test/results/add/g2-1.3 b/test/results/add/g2-1.3
|
||||
index 89f01ee..8c3a2f6 100644
|
||||
--- a/test/results/add/g2-1.3
|
||||
+++ b/test/results/add/g2-1.3
|
||||
@@ -47,14 +47,14 @@ menuentry 'title' --class gnu-linux --class gnu --class os {
|
||||
linux /new-kernel.img root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
|
||||
echo 'Loading initial ramdisk ...'
|
||||
}
|
||||
-menuentry 'Linux, with Linux 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
+menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos1)'
|
||||
search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
|
||||
- echo 'Loading Linux 2.6.38.8-32.fc15.x86_64 ...'
|
||||
+ echo 'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
|
||||
linux /vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /initramfs-2.6.38.8-32.fc15.x86_64.img
|
||||
--
|
||||
1.7.7.4
|
||||
|
48
grubby.spec
48
grubby.spec
|
@ -1,6 +1,6 @@
|
|||
Name: grubby
|
||||
Version: 8.1
|
||||
Release: 1%{?dist}
|
||||
Version: 8.8
|
||||
Release: 2%{?dist}
|
||||
Summary: Command line tool for updating bootloader configs
|
||||
Group: System Environment/Base
|
||||
License: GPLv2+
|
||||
|
@ -9,6 +9,8 @@ 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
|
||||
# 'upstream' 4bb88f93e6c7cf432e354a164fce8743794a84a5
|
||||
# RH #732654
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: pkgconfig glib2-devel popt-devel
|
||||
BuildRequires: libblkid-devel
|
||||
|
@ -28,7 +30,6 @@ environment.
|
|||
%prep
|
||||
%setup -q
|
||||
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
@ -54,6 +55,47 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Dec 20 2011 Peter Jones <pjones@redhat.com> - 8.8-2
|
||||
- Fix extra %%patch
|
||||
|
||||
* Tue Dec 20 2011 Peter Jones <pjones@redhat.com> - 8.8-1
|
||||
- Fix test cases from 8.7 to work on a system without /boot mounted.
|
||||
|
||||
* Tue Dec 20 2011 Peter Jones <pjones@redhat.com> - 8.7-1
|
||||
- Add a --debug to try to help diagnose "No suitable template". (sandeen,pjones)
|
||||
|
||||
* Mon Dec 19 2011 Peter Jones <pjones@redhat.com> - 8.6-1
|
||||
- Fix a "make test" errors introduced in 8.4-1
|
||||
|
||||
* Sat Dec 17 2011 Peter Jones <pjones@redhat.com> - 8.5-1
|
||||
- Don't hardcode dracut path
|
||||
Resolves: #768645
|
||||
|
||||
* Thu Dec 08 2011 Adam Williamson <awilliam@redhat.com> - 8.4-1
|
||||
- Update to 8.4:
|
||||
+ fix Loading... line for updated kernels
|
||||
+ Add new '--default-title' feature
|
||||
+ Add new '--default-index' feature
|
||||
+ add feature for testing the output of a grubby command
|
||||
+ Fix detection when comparing stage1 to MBR
|
||||
+ do not link against glib-2.0
|
||||
+ Don't crash if grubConfig not found
|
||||
+ Adding extlinux support for new-kernel-pkg
|
||||
+ Look for Debian / Ubuntu grub config files (#703260)
|
||||
+ Make grubby recognize Ubuntu's spin of Grub2 (#703260)
|
||||
|
||||
* Thu Dec 08 2011 Adam Williamson <awilliam@redhat.com> - 8.3-2
|
||||
- fix the Loading... message when installing a new kernel
|
||||
Resolves: rhbz#732654
|
||||
|
||||
* Thu Sep 29 2011 Peter Jones <pjones@redhat.com> - 8.3-1
|
||||
- Fix new-kernel-pkg invocation of grubby for grub (patch from Mads Kiilerich)
|
||||
Resolves: rhbz#725185
|
||||
|
||||
* Wed Sep 14 2011 Peter Jones <pjones@redhat.com> - 8.2-1
|
||||
- Fixes for xen (from Michael Petullo)
|
||||
Resolves: rhbz#658387
|
||||
|
||||
* Fri Jul 22 2011 Peter Jones <pjones@redhat.com> - 8.1-1
|
||||
- Update to 8.1
|
||||
- Fix miss-spelled variable name in new-kernel-pkg
|
||||
|
|
Loading…
Reference in New Issue