summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeve Jelbert2012-01-26 10:43:43 +0100
committerTreeve Jelbert2012-01-26 10:45:16 +0100
commit2d608d2d0ecda720d92dc551bef78b6af2bf5d8a (patch)
tree066baf6308c5be0674458053116458d838b0fdcf
parentb2e701d6219bcaa933227bf9167ad94b9f27585e (diff)
grub2 - fix bug #341 by applying the suggested patch
works for me with udev-179
-rwxr-xr-xdisk/grub2/DETAILS1
-rw-r--r--disk/grub2/HISTORY7
-rwxr-xr-xdisk/grub2/PRE_BUILD3
-rw-r--r--disk/grub2/fix-udev.patch21
4 files changed, 31 insertions, 1 deletions
diff --git a/disk/grub2/DETAILS b/disk/grub2/DETAILS
index 83c13e8e4d..039516800f 100755
--- a/disk/grub2/DETAILS
+++ b/disk/grub2/DETAILS
@@ -12,6 +12,7 @@
# SOURCE_IGNORE=volatile
#else
VERSION=1.99
+ PATCHLEVEL=1
SOURCE=grub-$VERSION.tar.gz
SOURCE2=grub-$VERSION.tar.gz.sig
SOURCE_URL[0]=${GNU_URL}/grub/$SOURCE
diff --git a/disk/grub2/HISTORY b/disk/grub2/HISTORY
index ab87621349..15140c00e9 100644
--- a/disk/grub2/HISTORY
+++ b/disk/grub2/HISTORY
@@ -1,3 +1,10 @@
+2012-01-26 Treeve Jelbert <treeve@sourcemage.org>
+ * DETAILS: PATCHLEVEL=1
+ * fix-udev.patch: added
+ * PRE_BUILD: apply patch
+ fixes bug #341, pathc found by Eric Sandalle
+ /boot/grub/grub.cfg generated correctly with udev-179
+
2012-01-20 Vlad Glagolev <stealth@sourcemage.org>
* DEPENDS: lzo support was removed in 2009
diff --git a/disk/grub2/PRE_BUILD b/disk/grub2/PRE_BUILD
index 457375e6e8..3cd048f132 100755
--- a/disk/grub2/PRE_BUILD
+++ b/disk/grub2/PRE_BUILD
@@ -4,4 +4,5 @@ if [[ "${GRUB2_SVN}" = 'y' ]]; then
./autogen.sh
else
rm -rf autom4te.cache
-fi
+fi &&
+patch -p0 <$SPELL_DIRECTORY/fix-udev.patch
diff --git a/disk/grub2/fix-udev.patch b/disk/grub2/fix-udev.patch
new file mode 100644
index 0000000000..fcfef34ef0
--- /dev/null
+++ b/disk/grub2/fix-udev.patch
@@ -0,0 +1,21 @@
+=== modified file 'grub-core/kern/emu/getroot.c'
+--- grub-core/kern/emu/getroot.c 2011-05-21 05:03:55 +0000
++++ grub-core/kern/emu/getroot.c 2011-05-30 23:56:40 +0000
+@@ -220,9 +220,17 @@ grub_find_root_device_from_mountinfo (co
+ /* Now scan visible mounts for the ones we're interested in. */
+ for (i = entry_len - 1; i >= 0; i--)
+ {
++ struct stat st;
++
+ if (!*entries[i].device)
+ continue;
+
++ if (stat (entries[i].device, &st) < 0)
++ /* The root filesystem device recorded in mountinfo does not
++ exist, perhaps due to a udev bug. Fall back to more primitive
++ methods. */
++ break;
++
+ ret = strdup (entries[i].device);
+ if (relroot)
+ *relroot = strdup (entries[i].enc_root);