grub: update to 2.02~beta2.

This commit is contained in:
Juan RP 2015-12-18 15:59:37 +01:00
parent a9bb3cbd30
commit 704f973305
8 changed files with 50 additions and 130 deletions

View File

@ -0,0 +1,11 @@
--- util/grub-gen-asciih.c.orig 2015-12-18 15:55:41.000754229 +0100
+++ util/grub-gen-asciih.c 2015-12-18 15:56:14.296668022 +0100
@@ -128,7 +128,7 @@ add_glyph (FT_UInt glyph_idx, FT_Face fa
static void
write_font_ascii_bitmap (FILE *file, FT_Face face)
{
- struct grub_glyph_info glyph;
+ struct grub_glyph_info glyph = {};
int char_code;
fprintf (file, "/* THIS CHUNK OF BYTES IS AUTOMATICALLY GENERATED */\n");

View File

@ -1,11 +0,0 @@
--- util/grub-mkfont.c 2015-10-08 21:41:33.590289273 +0200
+++ util/grub-mkfont.c 2015-10-08 21:44:21.461276176 +0200
@@ -39,7 +39,7 @@
#include FT_FREETYPE_H
#include FT_TRUETYPE_TAGS_H
#include FT_TRUETYPE_TABLES_H
-#include <freetype2/ftsynth.h>
+#include <freetype/ftsynth.h>
#undef __FTERRORS_H__
#define FT_ERROR_START_LIST const char *ft_errmsgs[] = {

View File

@ -1,24 +0,0 @@
Description: Silence error messages when translations are unavailable
Author: Colin Watson <cjwatson@ubuntu.com>
Bug: https://savannah.gnu.org/bugs/?35880
Last-Update: 2012-09-06
Index: grub-core/gettext/gettext.c
===================================================================
--- grub-core/gettext/gettext.c
+++ grub-core/gettext/gettext.c
@@ -412,6 +412,14 @@
grub_free (lang);
}
+
+ /* If no translations are available, fall back to untranslated text. */
+ if (err == GRUB_ERR_FILE_NOT_FOUND)
+ {
+ grub_errno = GRUB_ERR_NONE;
+ return 0;
+ }
+
return err;
}

View File

@ -1,10 +0,0 @@
--- grub-core/gnulib/stdio.in.h.orig 2012-07-05 11:43:24.596994420 +0200
+++ grub-core/gnulib/stdio.in.h 2012-07-05 11:43:28.683970680 +0200
@@ -141,7 +141,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@

View File

@ -0,0 +1,34 @@
--- grub-core/kern/emu/misc.c.orig 2015-12-18 15:48:01.279947005 +0100
+++ grub-core/kern/emu/misc.c 2015-12-18 15:48:54.974805473 +0100
@@ -20,7 +20,9 @@
#include <config.h>
#include <errno.h>
+#ifdef __GLIBC__
#include <error.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
--- grub-core/osdep/unix/hostdisk.c.orig 2015-12-18 15:50:27.584565696 +0100
+++ grub-core/osdep/unix/hostdisk.c 2015-12-18 15:51:43.424369339 +0100
@@ -48,8 +48,7 @@
#ifdef __linux__
# include <sys/ioctl.h> /* ioctl */
# include <sys/mount.h>
-# if !defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
+#if ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
/* Maybe libc doesn't have large file support. */
# include <linux/unistd.h> /* _llseek */
# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
@@ -79,8 +78,7 @@ grub_util_get_fd_size (grub_util_fd_t fd
return st.st_size;
}
-#if defined(__linux__) && (!defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+#if (defined(__linux__) && defined(__GLIBC__)) && (((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
/* Maybe libc doesn't have large file support. */
int
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)

View File

@ -1,26 +0,0 @@
Portability fixes:
- Do not assume that if !__GLIBC__ lseek() cannot handle 64-bit offsets.
--- grub-core/kern/emu/hostdisk.c.orig 2012-06-25 10:32:04.000000000 +0200
+++ grub-core/kern/emu/hostdisk.c 2014-12-28 09:06:09.224044788 +0100
@@ -44,8 +44,7 @@
#ifdef __linux__
# include <sys/ioctl.h> /* ioctl */
# include <sys/mount.h>
-# if !defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
+# if ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
/* Maybe libc doesn't have large file support. */
# include <linux/unistd.h> /* _llseek */
# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
@@ -761,8 +760,7 @@ linux_find_partition (char *dev, grub_di
}
#endif /* __linux__ */
-#if defined(__linux__) && (!defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+#if (defined(__linux__) && defined(__GLIBC__)) && (((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
/* Maybe libc doesn't have large file support. */
grub_err_t
grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)

View File

@ -1,55 +0,0 @@
--- grub-core/fs/zfs/zfs.c
+++ grub-core/fs/zfs/zfs.c
@@ -490,15 +490,11 @@ uberblock_verify (uberblock_phys_t * ub, grub_uint64_t offset,
if (grub_zfs_to_cpu64 (uber->ub_magic, GRUB_ZFS_LITTLE_ENDIAN)
== UBERBLOCK_MAGIC
- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_LITTLE_ENDIAN) > 0
- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_LITTLE_ENDIAN)
- <= SPA_VERSION)
- endian = GRUB_ZFS_LITTLE_ENDIAN;
+ && SPA_VERSION_IS_SUPPORTED(grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_LITTLE_ENDIAN)))
+ endian = GRUB_ZFS_LITTLE_ENDIAN;
if (grub_zfs_to_cpu64 (uber->ub_magic, GRUB_ZFS_BIG_ENDIAN) == UBERBLOCK_MAGIC
- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_BIG_ENDIAN) > 0
- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_BIG_ENDIAN)
- <= SPA_VERSION)
+ && SPA_VERSION_IS_SUPPORTED(grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_BIG_ENDIAN)))
endian = GRUB_ZFS_BIG_ENDIAN;
if (endian == GRUB_ZFS_UNKNOWN_ENDIAN)
@@ -845,13 +841,13 @@ check_pool_label (struct grub_zfs_data *data,
}
grub_dprintf ("zfs", "check 8 passed\n");
- if (version > SPA_VERSION)
+ if (!SPA_VERSION_IS_SUPPORTED(version))
{
grub_free (nvlist);
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
"too new version %llu > %llu",
(unsigned long long) version,
- (unsigned long long) SPA_VERSION);
+ (unsigned long long) SPA_VERSION_BEFORE_FEATURES);
}
grub_dprintf ("zfs", "check 9 passed\n");
--- include/grub/zfs/zfs.h
+++ include/grub/zfs/zfs.h
@@ -36,8 +36,13 @@ typedef enum grub_zfs_endian
/*
* On-disk version number.
*/
-#define SPA_VERSION 33ULL
-
+#define SPA_VERSION_INITIAL 1ULL
+#define SPA_VERSION_BEFORE_FEATURES 33ULL
+#define SPA_VERSION 5000ULL
+#define SPA_VERSION_FEATURES 5000ULL
+#define SPA_VERSION_IS_SUPPORTED(v) \
+ (((v) >= SPA_VERSION_INITIAL && (v) <= SPA_VERSION_BEFORE_FEATURES) || \
+ ((v) >= SPA_VERSION_FEATURES && (v) <= SPA_VERSION))
/*
* The following are configuration names used in the nvlist describing a pool's
* configuration.

View File

@ -1,7 +1,7 @@
# Template file for 'grub'
pkgname=grub
version=2.00
revision=25
version=2.02~beta2
revision=1
hostmakedepends="flex"
makedepends="libusb-compat-devel ncurses-devel freetype-devel
liblzma-devel device-mapper-devel font-unifont-bdf fuse-devel"
@ -11,8 +11,9 @@ short_desc="GRand Unified Bootloader 2"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-3"
homepage="http://www.gnu.org/software/grub/"
distfiles="$GNU_SITE/grub/grub-$version.tar.xz"
checksum=784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458
distfiles="http://alpha.gnu.org/gnu/grub/grub-${version}.tar.xz"
checksum=f6c702b2a8ea58f27a2b02928bb77973cb5a827af08f63db38c471c0a01b418d
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
nopie=yes