New grub suitable for Etch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I've done another grub upload that's target for Etch. It has two
important bugs fixed, at least for people using remote servers and
that's using the savedefault feature.
I would like to ask for a freeze exception for it. The changelog is:
grub (0.97-21) unstable; urgency=medium
[ Leandro Dorileo ]
* Changed update-grub to call grub-set-default 0, and a warning a message
telling the user that the default file was regeneraged. Closes: #406068.
* Added some missing savedefault_func return in stage2.c and how the read
default buf was being handled. Thanks Len Sorensen
<lennartsorensen@ruggedcom.com> by the suggestions. Closes: #403763.
-- Otavio Salvador <otavio@debian.org> Sun, 14 Jan 2007 23:20:48 -0200
And the diff between both is very small:
diff -u grub-0.97/debian/patches/savedefault.diff grub-0.97/debian/patches/savedefault.diff
- --- grub-0.97/debian/patches/savedefault.diff
+++ grub-0.97/debian/patches/savedefault.diff
@@ -1,6 +1,6 @@
- -diff -uNr grub-0.97-orig/stage2/builtins.c grub-0.97/stage2/builtins.c
- ---- grub-0.97-orig/stage2/builtins.c 2005-02-15 16:58:23.000000000 -0500
- -+++ grub-0.97/stage2/builtins.c 2006-11-06 15:27:26.000000000 -0500
+diff -uNr grub-0.97/stage2/builtins.c grub-0.97.modif/stage2/builtins.c
+--- grub-0.97/stage2/builtins.c 2005-02-15 16:58:23.000000000 -0500
++++ grub-0.97.modif/stage2/builtins.c 2007-01-09 00:17:59.000000000 -0500
@@ -82,6 +82,10 @@
inside other functions. */
static int configfile_func (char *arg, int flags);
@@ -19,9 +19,9 @@
-#if !defined(SUPPORT_DISKLESS) && !defined(GRUB_UTIL)
+#if !defined(SUPPORT_DISKLESS)
+ #if !defined(GRUB_UTIL)
- -+ savedefault_helper(arg, flags);
++ return savedefault_helper(arg, flags);
+ #else
- -+ savedefault_shell(arg, flags);
++ return savedefault_shell(arg, flags);
+ #endif
+#else /* !SUPPORT_DISKLESS */
+ errnum = ERR_UNRECOGNIZED;
@@ -116,7 +116,11 @@
unsigned long tmp_drive = saved_drive;
unsigned long tmp_partition = saved_partition;
char *default_file = (char *) DEFAULT_FILE_BUF;
- -@@ -3300,19 +3399,23 @@
+@@ -3297,22 +3396,26 @@
+
+ disk_read_hook = disk_read_savesect_func;
+ len = grub_read (buf, sizeof (buf));
++ buf[9]='\0';/* Make sure grub_strstr() below terminates */
disk_read_hook = 0;
grub_close ();
@@ -139,17 +143,16 @@
+ {
+ int f_len = grub_strlen(buf) - grub_strlen(tmp);
+ char *def;
- -+ int a;
- -+ for(a = 0; a < f_len; a++)
- -+ grub_memcpy(&def[a], &buf[a], sizeof(char));
++ buf[f_len] = '\0';
++ def = buf;
+ safe_parse_maxint (&def, &entryno);
+ }
/* Set up a string to be written. */
grub_memset (buf, '\n', sizeof (buf));
- -diff -uNr grub-0.97-orig/stage2/stage2.c grub-0.97/stage2/stage2.c
- ---- grub-0.97-orig/stage2/stage2.c 2005-03-19 12:51:57.000000000 -0500
- -+++ grub-0.97/stage2/stage2.c 2006-11-06 15:27:23.000000000 -0500
+diff -uNr grub-0.97/stage2/stage2.c grub-0.97.modif/stage2/stage2.c
+--- grub-0.97/stage2/stage2.c 2005-03-19 12:51:57.000000000 -0500
++++ grub-0.97.modif/stage2/stage2.c 2007-01-09 00:13:18.000000000 -0500
@@ -891,8 +891,16 @@
len = grub_read (buf, sizeof (buf));
if (len > 0)
diff -u grub-0.97/debian/update-grub grub-0.97/debian/update-grub
- --- grub-0.97/debian/update-grub
+++ grub-0.97/debian/update-grub
@@ -266,6 +266,10 @@
menu_file_basename=menu.lst
menu_file=$grub_dir/$menu_file_basename
+# Full path to the default file
+default_file_basename=default
+default_file=$grub_dir/$default_file_basename
+
# the device for the / filesystem
root_device=$(find_root_device)
@@ -389,6 +393,13 @@
EOF
## End Configuration Options
+echo -n "Searching for default file ... "
+if [ -f "$default_file" ] ; then
+ echo "found:" $default_file
+else
+ echo "Generating $default_file file and setting the default boot entry to 0"
+ grub-set-default 0
+fi
# Make sure we use the standard sorting order
LC_COLLATE=C
diff -u grub-0.97/debian/changelog grub-0.97/debian/changelog
- --- grub-0.97/debian/changelog
+++ grub-0.97/debian/changelog
@@ -1,3 +1,14 @@
+grub (0.97-21) unstable; urgency=medium
+
+ [ Leandro Dorileo ]
+ * Changed update-grub to call grub-set-default 0, and a warning a message
+ telling the user that the default file was regeneraged. Closes: #406068.
+ * Added some missing savedefault_func return in stage2.c and how the read
+ default buf was being handled. Thanks Len Sorensen
+ <lennartsorensen@ruggedcom.com> by the suggestions. Closes: #403763.
+
+ -- Otavio Salvador <otavio@debian.org> Sun, 14 Jan 2007 23:20:48 -0200
+
grub (0.97-20) unstable; urgency=low
* Add manpage for grub-set-default. Thanks for Patrick Schönfeld
- --
O T A V I O S A L V A D O R
- ---------------------------------------------
E-mail: otavio@debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
- ---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>
iD8DBQFFqtiCLqiZQEml+FURAgqZAJ9vu8XPcMaI7nIPIE8WgmMAcimPjgCgjc1M
xhOEEBl3t2o39OSxWU718xg=
=+T49
-----END PGP SIGNATURE-----
Reply to: