rpms/grub/F-8 grub-fedora-8.patch,1.3,1.4 grub.spec,1.58,1.59

Peter Jones (pjones) fedora-extras-commits at redhat.com
Wed May 28 15:56:58 UTC 2008


Author: pjones

Update of /cvs/extras/rpms/grub/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12363

Modified Files:
	grub-fedora-8.patch grub.spec 
Log Message:
* Wed May 28 2008 Peter Jones <pjones at redhat.com> - 0.97-33.1
- Backport F-9's grub to F-8.


grub-fedora-8.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.3 -r 1.4 grub-fedora-8.patch
Index: grub-fedora-8.patch
===================================================================
RCS file: /cvs/extras/rpms/grub/F-8/grub-fedora-8.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- grub-fedora-8.patch	20 Sep 2007 20:14:20 -0000	1.3
+++ grub-fedora-8.patch	28 May 2008 15:56:14 -0000	1.4
@@ -1,3 +1,81 @@
+diff --git a/ChangeLog b/ChangeLog
+index 0f93033..9602fb9 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -772,6 +772,18 @@
+ 	DATA_LEN is less than or equal to MULTIBOOT_SEARCH.
+ 	Reported by Neelkanth Natu <neelnatu at yahoo.com>.
+ 
++2003-03-12  Leonid Lisovskiy  <lly at pisem.net>
++
++	* lib/device.c (get_drive_geometry): grub utility didn't work
++	due to uninitialized 'sector_size' struct geometry member.
++	* stage1/stage1.h (GRUB_NO_DRIVE): Constant moved from
++	stage2/shared.h and its value rolled back to 0xFF for backward
++	compatibility with original grub.
++	* stage1/stage1.S (boot_drive): Use GRUB_NO_DRIVE instead of
++	constant.
++	* stage2/bios.c (get_diskinfo): Workaround for BIOS'es that
++	has CD-ROM drive number = last harddisk + 1.
++
+ 2003-03-10  Yoshinori K. Okuji  <okuji at enbug.org>
+ 
+ 	From Andrew Walrond <andrew at walrond.org>:
+@@ -816,6 +828,42 @@
+ 	thus corrupts the stack.  This is why we specify the exactly 
+ 	necessary size of 0x42 bytes.
+ 
++2003-01-28  Leonid Lisovskiy  <lly at pisem.net>
++
++	ISO9660 support is added.
++
++	* stage2/fsys_iso9660.c: New file - a lot of code stolen from
++	GRUB/98 0.5.
++	* stage2/iso9660.h: Likewise.
++	* stage2/start_torito.S: New file - El Torito boot sector.
++	* stage2/Makefile.am (noinst_HEADERS): iso9660.h added.
++	(libgrub_a_SOURCES): fsys_iso9660.c added.
++	(pkgdata_DATA): iso9660_stage1_5 added.
++	(noinst_PROGRAMS): iso9660_stage1_5.exec added.
++	* configure.in (--disable-iso9660): New option.
++	* stage2/builtins.c (setup_func): Add item for ISO9660 into
++	STAGE1_5_MAP.
++	* stage2/disk_io.c (rawread): Ability to read devices with
++	sector size other than 512 added.
++	(fsys_table): Added entry for ISO9660.
++	(check_and_print_mount): Don't print error when probing
++	partition.
++	(real_open_partition): Cleanup globals after probing.
++	* stage2/filesys.h [FSYS_ISO9660]: Add entries for ISO9660
++	functions.
++	(NUM_FSYS): Added FSYS_ISO9660_NUM.
++	* stage2/shared.h (STAGE2_ID_ISO9660_STAGE1_5): New macro.
++	(GRUB_NO_DRIVE): New constant.
++	(struct geometry): New member 'sector_size'.
++	* stage2/bios.c (get_diskinfo): Request 1.xx version of
++	int13 extensions only since higher version request can
++	destroy El Torito emulation on some BIOS'es.
++	(get_cdinfo): New function - get El Torito emulation parameters.
++	* stage2/asm.S (biosdisk_int13_extensions): pass AX, instead
++	of AH for universality, save EBX,ECX,EDX registers content to
++	avoid data corruption in caller functions.
++	(get_diskinfo_int13_extensions): Removed.
++
+ 2003-01-25  Yoshinori K. Okuji  <okuji at enbug.org>
+ 
+ 	From Steven Dick <ssd.gnu at mmae.ucf.edu>:
+diff --git a/Makefile.am b/Makefile.am
+index 63a9a4f..a27da9c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,7 @@
+ # Do not change this order if you don't know what you are doing.
+ AUTOMAKE_OPTIONS = 1.7 gnu
+ SUBDIRS = netboot stage2 stage1 lib grub util docs
++if PLATFORM_EFI
++SUBDIRS += efi
++endif
+ EXTRA_DIST = BUGS MAINTENANCE
 diff --git a/Makefile.in b/Makefile.in
 index 6652366..6cff007 100644
 --- a/Makefile.in
@@ -1201,7 +1279,7 @@
  # _AM_PROG_TAR(FORMAT)
  # --------------------
 diff --git a/config.h.in b/config.h.in
-index 68d7c8c..46f6b70 100644
+index 68d7c8c..e2128e4 100644
 --- a/config.h.in
 +++ b/config.h.in
 @@ -1,4 +1,4 @@
@@ -1210,6 +1288,16 @@
  
  /* Define if an absolute indirect call/jump must NOT be prefixed with `*' */
  #undef ABSOLUTE_WITHOUT_ASTERISK
+@@ -96,6 +96,9 @@
+ /* Define to the version of this package. */
+ #undef PACKAGE_VERSION
+ 
++/* Define if you run on EFI platform. */
++#undef PLATFORM_EFI
++
+ /* Define if there is user specified preset menu string */
+ #undef PRESET_MENU_STRING
+ 
 diff --git a/configure b/configure
 deleted file mode 100755
 index 537ab89..0000000
@@ -9533,10 +9621,10 @@
 -AC_OUTPUT
 diff --git a/configure.in b/configure.in
 new file mode 100644
-index 0000000..0103c17
+index 0000000..62209dc
 --- /dev/null
 +++ b/configure.in
-@@ -0,0 +1,680 @@
+@@ -0,0 +1,757 @@
 +dnl Configure script for GRUB.
 +dnl Copyright 1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
 +
@@ -9568,6 +9656,61 @@
 +AC_SUBST(host_cpu)
 +AC_SUBST(host_vendor)
 +
++# Specify the platform (such as firmware).
++AC_ARG_WITH([platform],
++            AS_HELP_STRING([--with-platform=PLATFORM],
++                           [select the host platform [[guessed]]]))
++
++# Guess the platform if not specified.
++if test "x$with_platform" = x; then
++  case "$host_cpu"-"$host_vendor" in
++    i386-*) platform=pc ;;
++    x86_64-*) platform=pc ;;
++    *) AC_MSG_ERROR([unsupported machine type $host_cpu-$host_vendor]) ;;
++  esac
++else
++  platform="$with_platform"
++fi
++
++# Sanity check.
++case "$host_cpu"-"$platform" in
++  i386-pc) ;;
++  i386-efi) ;;
++  x86_64-pc) ;;
++  x86_64-efi) ;;
++  *) AC_MSG_ERROR([unsupported machine type "$host_cpu"-"$platform"]) ;;
++esac
++
++if test "x$platform" = xefi; then
++  case "$host_cpu" in
++    i386) EFI_ARCH=ia32 ;;
++    x86_64) EFI_ARCH=x86_64 ;;
++  *) AC_MSG_ERROR([unsupported machine type "$host_cpu"]) ;;
++  esac
++  AC_SUBST(EFI_ARCH)
++fi
++
++gnuefi_path=/usr/lib/gnuefi
++gnuefi_crt0=${gnuefi_path}/crt0-efi-${EFI_ARCH}.o
++if ! test -f $gnuefi_crt0 ; then
++  gnuefi_crt0=crt0-efi.o
++fi
++GNUEFI_CRT0=${gnuefi_crt0}
++AC_SUBST(GNUEFI_CRT0)
++gnuefi_lds=${gnuefi_path}/elf_${EFI_ARCH}_efi.lds
++if ! test -f $gnuefi_lds ; then
++  gnuefi_lds=${EFI_ARCH}/elf_efi.lds
++fi
++GNUEFI_LDS=${gnuefi_lds}
++AC_SUBST(GNUEFI_LDS)
++
++AC_SUBST(platform)
++AM_CONDITIONAL(PLATFORM_EFI, test "x$platform" = xefi)
++
++if test "x$platform" = xefi; then
++   AC_DEFINE(PLATFORM_EFI, 1, [Define if you run on EFI platform.])
++fi
++
 +#
 +# Options
 +#
@@ -9585,7 +9728,7 @@
 +  default_CFLAGS=yes
 +fi
 +
-+if test "x$host_cpu" = xx86_64; then
++if test "x$platform" = xpc -a "x$host_cpu" = xx86_64; then
 +  CFLAGS="-m32 $CFLAGS"
 +fi
 +
[...19925 lines suppressed...]
  void init_config (void);
  char *skip_to (int after_equal, char *cmdline);
  struct builtin *find_command (char *command);
@@ -21277,6 +39966,7 @@
  
  /* C library replacement functions with identical semantics. */
 -void grub_printf (const char *format,...);
++int grub_vsprintf (char *str, const char *fmt, va_list args);
 +void grub_printf (char *format,...);
  int grub_sprintf (char *buffer, const char *format, ...);
  int grub_tolower (int c);
@@ -21286,7 +39976,25 @@
  void *grub_memmove (void *to, const void *from, int len);
  void *grub_memset (void *start, int c, int len);
  int grub_strncat (char *s1, const char *s2, int n);
-@@ -934,7 +943,9 @@ int next_partition (unsigned long drive, unsigned long dest,
+@@ -881,7 +895,7 @@ int grub_strlen (const char *str);
+ char *grub_strcpy (char *dest, const char *src);
+ 
+ #ifndef GRUB_UTIL
+-typedef unsigned long grub_jmp_buf[6];
++typedef unsigned long grub_jmp_buf[8];
+ #else
+ /* In the grub shell, use the libc jmp_buf instead.  */
+ # include <setjmp.h>
+@@ -904,7 +918,7 @@ extern grub_jmp_buf restart_cmdline_env;
+ /* misc */
+ void init_page (void);
+ void print_error (void);
+-char *convert_to_ascii (char *buf, int c, ...);
++char *convert_to_ascii (char *buf, int c, unsigned int num);
+ int get_cmdline (char *prompt, char *cmdline, int maxlen,
+ 		 int echo_char, int history);
+ int substring (const char *s1, const char *s2);
+@@ -934,7 +948,9 @@ int next_partition (unsigned long drive, unsigned long dest,
  		    unsigned long *partition, int *type,
  		    unsigned long *start, unsigned long *len,
  		    unsigned long *offset, int *entry,
@@ -21297,6 +40005,20 @@
  
  /* Sets device to the one represented by the SAVED_* parameters. */
  int make_saved_active (void);
+@@ -991,6 +1007,13 @@ int check_password(char *entered, char* expected, password_t type);
+ 
+ void init_bios_info (void);
+ 
++#ifdef PLATFORM_EFI
++void grub_set_config_file (char *path_name);
++int grub_save_saved_default (int new_default);
++#endif
++int grub_load_linux (char *kernel, char *arg);
++int grub_load_initrd (char *initrd);
++int grub_chainloader (char *filename);
+ #endif /* ASM_FILE */
+ 
+ #endif /* ! GRUB_SHARED_HEADER */
 diff --git a/stage2/smp-imps.h b/stage2/smp-imps.h
 index c0fdce3..bae9b77 100644
 --- a/stage2/smp-imps.h
@@ -21310,7 +40032,7 @@
   *  Defines that use variables
   */
 diff --git a/stage2/stage2.c b/stage2/stage2.c
-index 4dbf6f5..f140e2d 100644
+index 4dbf6f5..f8bccf8 100644
 --- a/stage2/stage2.c
 +++ b/stage2/stage2.c
 @@ -233,6 +233,9 @@ run_menu (char *menu_entries, char *config_entries, int num_entries,
@@ -21361,6 +40083,26 @@
  	  else
  	    printf ("\
        Press \'b\' to boot, \'e\' to edit the selected command in the\n\
+@@ -514,7 +521,7 @@ restart:
+ 		  if (c == 'O')
+ 		    {
+ 		      grub_memmove (cur_entry + 2, cur_entry,
+-				    ((int) heap) - ((int) cur_entry));
++				    heap - cur_entry);
+ 
+ 		      cur_entry[0] = ' ';
+ 		      cur_entry[1] = 0;
+@@ -530,8 +537,8 @@ restart:
+ 					    0);
+ 
+ 		      grub_memmove (cur_entry, ptr,
+-				    ((int) heap) - ((int) ptr));
+-		      heap -= (((int) ptr) - ((int) cur_entry));
++				    heap - ptr);
++		      heap -= ptr - cur_entry;
+ 
+ 		      num_entries--;
+ 
 @@ -655,7 +662,7 @@ restart:
  		  else
  		    {
@@ -21370,6 +40112,15 @@
  
  		      new_heap = heap + NEW_HEAPSIZE + 1;
  
+@@ -681,7 +688,7 @@ restart:
+ 
+ 			  /* align rest of commands properly */
+ 			  grub_memmove (cur_entry + j, cur_entry + i,
+-					(int) heap - ((int) cur_entry + i));
++					(unsigned long) heap - ((unsigned long) cur_entry + i));
+ 
+ 			  /* copy command to correct area */
+ 			  grub_memmove (cur_entry, new_heap, j);
 @@ -697,6 +704,98 @@ restart:
  		  enter_cmdline (heap, 0);
  		  goto restart;
@@ -21451,7 +40202,7 @@
 +
 +		  /* align rest of commands properly */
 +		  memmove (start + j + needs_padding, start + i,
-+		       ((int) append_line) - ((int) start) - (amount));
++		       ((unsigned long) append_line) - ((unsigned long) start) - (amount));
 +
 +		  if (needs_padding)
 +		      *start = ' ';
@@ -21598,6 +40349,47 @@
 +#endif /* SUPPORT_GRAPHICS */
 +
  #endif /* ! GRUB_TERM_HEADER */
+diff --git a/stage2/tparm.c b/stage2/tparm.c
+index ff78d53..408b284 100644
+--- a/stage2/tparm.c
++++ b/stage2/tparm.c
+@@ -320,7 +320,7 @@ parse_format(const char *s, char *format, int *len)
+ #define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
+ 
+ static inline char *
+-tparam_internal(const char *string, int *dataptr)
++tparam_internal(const char *string, va_list args)
+ {
+ #define NUM_VARS 26
+     char *p_is_s[9];
+@@ -461,9 +461,9 @@ tparam_internal(const char *string, int *dataptr)
+ 	 * a char* and an int may not be the same size on the stack.
+ 	 */
+ 	if (p_is_s[i] != 0) {
+-	  p_is_s[i] = (char *)(*(dataptr++));
++	  p_is_s[i] = va_arg (args, char *);
+ 	} else {
+-	  param[i] = (int)(*(dataptr++));
++	  param[i] = va_arg (args, int);
+ 	}
+     }
+ 
+@@ -716,11 +716,11 @@ char *
+ grub_tparm(const char *string,...)
+ {
+     char *result;
+-    int *dataptr = (int *) &string;
++    va_list ap;
+ 
+-    dataptr++;
+-
+-    result = tparam_internal(string, dataptr);
++    va_start (ap, string);
++    result = tparam_internal(string, ap);
++    va_end(ap);
+ 
+     return result;
+ }
 diff --git a/test b/test
 new file mode 100644
 index 0000000..b182379
@@ -21606,10 +40398,12 @@
 @@ -0,0 +1 @@
 +fo of fo
 diff --git a/util/Makefile.am b/util/Makefile.am
-index 2e04711..48604d6 100644
+index 2e04711..a18ec35 100644
 --- a/util/Makefile.am
 +++ b/util/Makefile.am
-@@ -1,6 +1,5 @@
+@@ -1,6 +1,7 @@
++if !PLATFORM_EFI
++
  bin_PROGRAMS = mbchk
 -sbin_SCRIPTS = grub-install grub-md5-crypt grub-terminfo \
 -	grub-set-default
@@ -21617,6 +40411,16 @@
  noinst_SCRIPTS = grub-image mkbimage
  
  EXTRA_DIST = mkbimage
+@@ -10,3 +11,9 @@ AM_CFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/docs
+ 
+ mbchk_SOURCES = mbchk.c
+ mbchk_LDADD = ../lib/libcommon.a
++
++else
++
++sbin_SCRIPTS = grub-md5-crypt grub-terminfo
++
++endif
 diff --git a/util/Makefile.in b/util/Makefile.in
 index e700cf7..aa5a12e 100644
 --- a/util/Makefile.in


Index: grub.spec
===================================================================
RCS file: /cvs/extras/rpms/grub/F-8/grub.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- grub.spec	20 Sep 2007 20:14:20 -0000	1.58
+++ grub.spec	28 May 2008 15:56:14 -0000	1.59
@@ -1,13 +1,13 @@
 Name: grub
 Version: 0.97
-Release: 19
+Release: 33.1%{?dist}
 Summary: GRUB - the Grand Unified Boot Loader.
 Group: System Environment/Base
 License: GPLv2+
 
-ExclusiveArch: i386 x86_64
+ExclusiveArch: i386 x86_64 ia64
 BuildRequires: binutils >= 2.9.1.0.23, ncurses-devel, ncurses-static, texinfo
-BuildRequires: autoconf /usr/lib/crt1.o
+BuildRequires: autoconf /usr/lib/crt1.o automake
 PreReq: /sbin/install-info
 Requires: mktemp
 Requires: /usr/bin/cmp
@@ -26,9 +26,10 @@
 
 %prep
 %setup -q
-%patch -p1 -b .fedora-8
+%patch0 -p1 -b .fedora-8
 
 %build
+autoreconf
 autoconf
 GCCVERS=$(gcc --version | head -1 | cut -d\  -f3 | cut -d. -f1)
 CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused"
@@ -43,14 +44,14 @@
 make
 
 %install
-rm -fr $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
 %makeinstall sbindir=${RPM_BUILD_ROOT}/sbin
 mkdir -p ${RPM_BUILD_ROOT}/boot/grub
 
 rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir
 
 %clean
-rm -fr $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
 
 %post
 if [ "$1" = 1 ]; then
@@ -79,6 +80,54 @@
 %{_datadir}/grub
 
 %changelog
+* Wed May 28 2008 Peter Jones <pjones at redhat.com> - 0.97-33.1
+- Backport F-9's grub to F-8.
+
+* Mon Apr 07 2008 Peter Jones <pjones at redhat.com> - 0.97-33
+- Rewrite ia32 efi call wrapper to make the makefile simpler.
+
+* Tue Apr 01 2008 Peter Jones <pjones at redhat.com> - 0.97-32
+- Add graphics debug mode
+- Fix screen geometry variable passing
+- Fix broken efi call wrapper on x86_64 so UGA works there.
+
+* Thu Mar 20 2008 Peter Jones <pjones at redhat.com> - 0.97-31
+- Fix efifb setup.
+
+* Wed Mar 19 2008 Peter Jones <pjones at redhat.com> - 0.97-30
+- Fix the bootloader for ANOTHER random kernel ABI change on EFI+x86_64.
+
+* Tue Mar 18 2008 Peter Jones <pjones at redhat.com> - 0.97-29
+- Remove all the prot_mode_mem code from EFI loader on x86_64.
+
+* Thu Mar 06 2008 Peter Jones <pjones at redhat.com> - 0.97-28
+- Fix FAT/VFAT directory searching.
+- Don't artificially limit the kernel's location to lowmem.
+
+* Wed Mar 05 2008 Peter Jones <pjones at redhat.com> - 0.97-27
+- Fix permissions on grub.efi so cpio doesn't error when it's on vfat.
+
+* Tue Mar 04 2008 Peter Jones <pjones at redhat.com> - 0.97-26
+- Move grub.efi to a more useful location.
+
+* Wed Feb 27 2008 Peter Jones <pjones at redhat.com> - 0.97-25
+- Fix memory allocation bug in EFI on i386 and x86_64.
+
+* Wed Feb 27 2008 Peter Jones <pjones at redhat.com> - 0.97-24
+- Fix build of xfs code on amd64.
+
+* Wed Feb 27 2008 Peter Jones <pjones at redhat.com> - 0.97-23
+- Enable EFI on i386, update to newest git head.
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.97-22
+- Autorebuild for GCC 4.3
+
+* Fri Jan 25 2008 Jesse Keating <jkeating at redhat.com> - 0.97-21
+- Add a patch from esandeen to support booting from 256byte inodes.
+
+* Mon Nov 05 2007 Peter Jones <pjones at redhat.com> - 0.97-20
+- Add EFI support from Intel on x86_64
+
 * Thu Sep 20 2007 Peter Jones <pjones at redhat.com> - 0.97-19
 - Fix dmraid detection on Intel (isw) controllers in grub-install .
 




More information about the fedora-extras-commits mailing list