diff --git a/srcpkgs/grub/patches/error-maybe-uninitialized.patch b/srcpkgs/grub/patches/error-maybe-uninitialized.patch new file mode 100644 index 00000000000..9d993ec63f9 --- /dev/null +++ b/srcpkgs/grub/patches/error-maybe-uninitialized.patch @@ -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"); diff --git a/srcpkgs/grub/patches/freetype2.patch b/srcpkgs/grub/patches/freetype2.patch deleted file mode 100644 index 807e5271534..00000000000 --- a/srcpkgs/grub/patches/freetype2.patch +++ /dev/null @@ -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 -+#include - - #undef __FTERRORS_H__ - #define FT_ERROR_START_LIST const char *ft_errmsgs[] = { diff --git a/srcpkgs/grub/patches/gettext_quiet.patch b/srcpkgs/grub/patches/gettext_quiet.patch deleted file mode 100644 index 83a894a6bf3..00000000000 --- a/srcpkgs/grub/patches/gettext_quiet.patch +++ /dev/null @@ -1,24 +0,0 @@ -Description: Silence error messages when translations are unavailable -Author: Colin Watson -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; - } - diff --git a/srcpkgs/grub/patches/glibc-2.16.patch b/srcpkgs/grub/patches/glibc-2.16.patch deleted file mode 100644 index ff213d59741..00000000000 --- a/srcpkgs/grub/patches/glibc-2.16.patch +++ /dev/null @@ -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@ diff --git a/srcpkgs/grub/patches/musl.patch b/srcpkgs/grub/patches/musl.patch new file mode 100644 index 00000000000..a0e73110537 --- /dev/null +++ b/srcpkgs/grub/patches/musl.patch @@ -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 + + #include ++#ifdef __GLIBC__ + #include ++#endif + #include + #include + #include +--- 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 /* ioctl */ + # include +-# 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 /* _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) diff --git a/srcpkgs/grub/patches/portability.patch b/srcpkgs/grub/patches/portability.patch deleted file mode 100644 index ec7c7db0cf2..00000000000 --- a/srcpkgs/grub/patches/portability.patch +++ /dev/null @@ -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 /* ioctl */ - # include --# 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 /* _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) diff --git a/srcpkgs/grub/patches/zfs.patch b/srcpkgs/grub/patches/zfs.patch deleted file mode 100644 index b078b9ac7a8..00000000000 --- a/srcpkgs/grub/patches/zfs.patch +++ /dev/null @@ -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. diff --git a/srcpkgs/grub/template b/srcpkgs/grub/template index 40fb9819f7e..d09a2a003eb 100644 --- a/srcpkgs/grub/template +++ b/srcpkgs/grub/template @@ -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 " 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