Hello community,

here is the log from the commit of package grub for openSUSE:Factory checked in 
at 2018-03-22 12:05:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/grub (Old)
 and      /work/SRC/openSUSE:Factory/.grub.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "grub"

Thu Mar 22 12:05:09 2018 rev:60 rq:589305 version:0.97

Changes:
--------
--- /work/SRC/openSUSE:Factory/grub/grub.changes        2017-06-04 
02:00:00.330705507 +0200
+++ /work/SRC/openSUSE:Factory/.grub.new/grub.changes   2018-03-22 
12:10:43.721605232 +0100
@@ -1,0 +2,13 @@
+Tue Mar 20 16:54:21 UTC 2018 - [email protected]
+
+- build in the %build section again (network support is long gone)
+- optimise for size again
+- allow compilation on SLE11
+
+-------------------------------------------------------------------
+Fri Feb 16 14:23:37 UTC 2018 - [email protected]
+
+- rip illumos-zfs-grub-fix-for-dell-bios from Illumos / OpenZFS
+  to make grub work on more broken dell BIOSes (bsc#1045024)
+
+-------------------------------------------------------------------

New:
----
  illumos-zfs-grub-fix-for-dell-bios

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ grub.spec ++++++
--- /var/tmp/diff_new_pack.Z0cJwy/_old  2018-03-22 12:10:46.137518640 +0100
+++ /var/tmp/diff_new_pack.Z0cJwy/_new  2018-03-22 12:10:46.145518354 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package grub
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,12 +21,18 @@
 %ifarch x86_64
 BuildRequires:  gcc-32bit
 BuildRequires:  glibc-devel-32bit
+%if 0%sles_version
+%else
 BuildRequires:  glibc-devel-static-32bit
+%endif
 BuildRequires:  libncurses5-32bit
 BuildRequires:  ncurses-devel-32bit
 %else
 BuildRequires:  glibc-devel
+%if 0%sles_version
+%else
 BuildRequires:  glibc-devel-static
+%endif
 BuildRequires:  libncurses5
 BuildRequires:  ncurses-devel
 %endif
@@ -78,6 +84,7 @@
 Patch46:        grub-bigraid-failsafe
 Patch47:        grub-configure-check-libncurses
 Patch48:        grub-password-sha2-crypt
+Patch49:        illumos-zfs-grub-fix-for-dell-bios
 Url:            http://www.gnu.org/software/grub/grub.en.html
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Summary:        Grand Unified Boot Loader
@@ -140,6 +147,7 @@
 %patch46 -p1
 %patch47 -p1
 %patch48 -p1
+%patch49 -p5
 
 %build
 perl -pi -e 's,/usr/share/grub/i386-pc,/usr/lib/grub,' docs/grub.texi
@@ -147,12 +155,11 @@
 autoreconf --force --install
 EXTRACFLAGS=' -fno-reorder-functions -fno-stack-protector -fno-strict-aliasing 
-minline-all-stringops -fno-asynchronous-unwind-tables -fno-unwind-tables 
-static'
 # RPM_OPT_FLAGS considered harmful
-CFLAGS="-m32 -O0 -g -DNDEBUG -W -Wall -Wpointer-arith $EXTRACFLAGS" 
./configure \
+CFLAGS="-m32 -Os -g -DNDEBUG -W -Wall -Wpointer-arith $EXTRACFLAGS" 
./configure \
   --prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir} --datadir=/usr/lib \
   --disable-auto-linux-mem-opt --disable-ffs --disable-ufs2
 export CFLAGS
-# The -ldl is required due that -static in EXTRACFLAGS
-make GRUB_LIBS="-lncurses -ltinfo -ldl"
+make %_smp_mflags
 
 %install
 make -k DESTDIR=$RPM_BUILD_ROOT install 

++++++ grub-configure-check-libncurses ++++++
--- /var/tmp/diff_new_pack.Z0cJwy/_old  2018-03-22 12:10:46.425508318 +0100
+++ /var/tmp/diff_new_pack.Z0cJwy/_new  2018-03-22 12:10:46.425508318 +0100
@@ -2,18 +2,12 @@
 ===================================================================
 --- grub-0.97.orig/configure.ac
 +++ grub-0.97/configure.ac
-@@ -207,10 +207,12 @@ AC_CHECK_LIB(util, opendisk, [GRUB_LIBS=
+@@ -207,7 +207,7 @@ AC_CHECK_LIB(util, opendisk, [GRUB_LIBS=
  
  # Unless the user specify --without-curses, check for curses.
  if test "x$with_curses" != "xno"; then
 -  AC_CHECK_LIB(ncurses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lncurses"
-+  AC_CHECK_LIB(tinfo, setupterm, HAVE_TINFO="-ltinfo")
-+  AC_CHECK_LIB(ncurses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lncurses $HAVE_TINFO"
++  AC_CHECK_LIB(ncurses, wgetch, [GRUB_LIBS="$GRUB_LIBS `ncurses5-config 
--libs`"
    AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])],
      [AC_CHECK_LIB(curses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lcurses"
--       AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])])
-+       AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])],
-+    ["$HAVE_TINFO"])
- fi
- 
- AC_SUBST(GRUB_LIBS)
+        AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])])

++++++ illumos-zfs-grub-fix-for-dell-bios ++++++
commit 2f7f7a62d7a3e8a2e75eb88b95bc65871b6b90cb
Author: Alex Wilson <[email protected]>
Date:   Fri Jul 15 16:08:57 2016 -0700

    5520 GRUB Error 21 booting from USB stick on Dell BIOS
    Reviewed by: Robert Mustacchi <[email protected]>
    Reviewed by: Patrick Mooney <[email protected]>
    Approved by: Dan McDonald <[email protected]>

diff --git a/usr/src/grub/grub-0.97/stage2/bios.c 
b/usr/src/grub/grub-0.97/stage2/bios.c
index 3203ee722d..02e92fa454 100644
--- a/usr/src/grub/grub-0.97/stage2/bios.c
+++ b/usr/src/grub/grub-0.97/stage2/bios.c
@@ -211,6 +211,7 @@ int
 get_diskinfo (int drive, struct geometry *geometry)
 {
   int err;
+  int gotchs = 0;
 
   /* Clear the flags.  */
   geometry->flags = 0;
@@ -229,6 +230,20 @@ get_diskinfo (int drive, struct geometry *geometry)
          if (get_cdinfo (drive, geometry))
            return 0;
        }
+
+      /* Don't pass GEOMETRY directly, but pass each element instead,
+        so that we can change the structure easily.  */
+      err = get_diskinfo_standard (drive,
+                                  &geometry->cylinders,
+                                  &geometry->heads,
+                                  &geometry->sectors);
+      if (err == 0)
+       gotchs = 1;
+      /* get_diskinfo_standard returns 0x60 if the BIOS call actually
+        succeeded but returned 0 sectors -- in this case don't
+        return yet but continue to check the LBA geom */
+      else if (err != 0x60)
+       return err;
       
       if (version)
        {
@@ -280,6 +295,30 @@ get_diskinfo (int drive, struct geometry *geometry)
              /* I'm not sure if GRUB should check the bit 1 of DRP.FLAGS,
                 so I omit the check for now. - okuji  */
              /* if (drp.flags & (1 << 1)) */
+
+             /* If we didn't get valid CHS info from the standard call,
+                then we should fill it out here */
+             if (! gotchs)
+               {
+                 geometry->cylinders = drp.cylinders;
+
+                 if (drp.sectors > 0 && drp.heads > 0)
+                   {
+                     geometry->heads = drp.heads;
+                     geometry->sectors = drp.sectors;
+                   }
+                 else
+                   {
+                     /* Return fake geometry. This disk reports that it
+                        supports LBA, so all the other routines will use LBA
+                        to talk to it and not look at this geometry. However,
+                        some of the partition-finding routines still need
+                        non-zero values in these fields. */
+                     geometry->heads = 16;
+                     geometry->sectors = 63;
+                   }
+                 gotchs = 1;
+               }
               
              /* FIXME: when the 2TB limit becomes critical, we must
                 change the type of TOTAL_SECTORS to unsigned long
@@ -292,14 +331,10 @@ get_diskinfo (int drive, struct geometry *geometry)
            }
        }
 
-      /* Don't pass GEOMETRY directly, but pass each element instead,
-        so that we can change the structure easily.  */
-      err = get_diskinfo_standard (drive,
-                                  &geometry->cylinders,
-                                  &geometry->heads,
-                                  &geometry->sectors);
-      if (err)
-       return err;
+      /* In case we got the 0x60 return code from _standard on a disk that
+        didn't support LBA (or was somehow invalid), return that error now */
+      if (! gotchs)
+       return 0x60;
 
       if (! total_sectors)
        {

Reply via email to