gluon/patches/openwrt/0158-grub2-upgrade-to-2.02-beta3-3-years-newer-than-previous.patch
Linus Lüssing 0a150e97d4 openwrt: update tools to LEDE v17.01.6 to fix compile issues
This updates:

* m4
* bison
* e2fsprogs
* make_ext4fs
* mtd-utils
* findutils
* squashfs
* squashfs4
* grub2

to their version used in LEDE v17.01.6. This fixes various compile
errors appearing on Debian Sid.

A list of the patches picked from upstream:

m4:

$ git log --oneline f7e56763e1..HEAD tools/m4
6e78c5502c tools: m4: fix compilation with glibc 2.28
a91d8dd162 tools/m4: update 1.4.18
f19d47f848 tools: patch various gnu tools for macOS 10.13
720b99215d treewide: clean up download hashes

bison:

$ git log --oneline 877f2972d4..HEAD tools/bison
1e09cbf118 tools/bison: Update to 3.0.5
f19d47f848 tools: patch various gnu tools for macOS 10.13
720b99215d treewide: clean up download hashes
5062cff673 tools/bison: update to 3.0.4

e2fsprogs:

$ git log --oneline f7e56763e1..HEAD tools/e2fsprogs/
8f5c55f63e tools/e2fsprogs: update to 1.44.1
d35a7bf4b4 e2fsprogs: bump to 1.44.0
79ac69d9c9 tools/e2fsprogs: Update to 1.43.7
5d9114c9cb tools/e2fsprogs: Update to 1.43.6
7955fab22a tools/e2fsprogs: Update to 1.43.5
866e5b4956 tools/e2fsprogs: Update to 1.43.4
a964738a5c Revert "tools/e2fsprogs: fix building on a glibc 2.27 host"
58a95f0f8f tools/e2fsprogs: fix building on a glibc 2.27 host
720b99215d treewide: clean up download hashes
b8b807b1a9 tools/e2fsprogs: Update to 1.43.3
d635ef50c5 e2fsprogs: fix build problem with very old libmagic
819cf75c40 tools: e2fsprogs: bump to 1.43.1
2baf90a84e tools/e2fsprogs: remove outdated configure args
b7e946f33e tools/e2fsprogs: update to 1.42.13
52ea491bdf tools/e2fsprogs: add a darwin-compat patch

make-ext4fs:

$ git log --oneline 1170a3de76..HEAD tools/make-ext4fs/
c7c1cf5618 treewide: clean up and unify PKG_VERSION for git based downloads
720b99215d treewide: clean up download hashes
9edfe7dd13 source: Switch to xz for packages and tools where possible
95bad62f2a tools: make_ext4fs: switch to LEDE git mirror
98b960c218 tools: make_ext4fs: support creating empty filesystem images
9ec4ca525c tools: make-ext4fs: fix build regression on mac os x
49ad0c565a tools: fix make_ext4fs build with recent glibc
8af9119ff4 tools: make-ext4fs: explicitely request C collation for sorting
01fb448d56 tools/make-ext4fs: prefer static linking

$ git log --oneline 17ae95bb20..HEAD tools/mtd-utils
96dbf59e5a tools/mtd-utils: include sysmacros.h explicitly
018d80007e kernel: remove ubifs xz decompression support
c7c1cf5618 treewide: clean up and unify PKG_VERSION for git based downloads
720b99215d treewide: clean up download hashes
9edfe7dd13 source: Switch to xz for packages and tools where possible
e27c8bb156 update mtd-utils to 1.5.2

$ git log --oneline dd86bc73fb..HEAD tools/findutils
6449ed1553 tools: findutils: fix compilation with glibc 2.28
d2fd6412a6 tools/findutils: include sysmacros.h explicitly
720b99215d treewide: clean up download hashes
70a5c062f1 tools/findutils: Update to 4.6.0

$ git log --oneline f7e56763e1..HEAD tools/squashfs tools/squashfs4
1aedf2f149 tools/squashfs: use host cflags
8a48a53dcb tools/squashfs4: include sysmacros.h explicitly
8406e50df5 tools/squashfs: include sysmacros.h explicitly
720b99215d treewide: clean up download hashes
f97ad870e1 squashfs4: use upstream xz compression header format
d437c72c21 tools/squashfs4: refresh patches
34124de139 tools/squashfs: refresh patches
fd1c1b4918 tools/squashfs: add argument -fixed-time to set all timestamps

$ git log --oneline fcc6f801ca..HEAD package/boot/grub2/
2252731af4 grub2: rebase patches
6aae528cc3 grub2: Fix CVE-2015-8370
6e1e2e7b96 package/grub2: update to 2.02
10182cb2c6 grub2: update to 2.02~rc2
f0e8470aa9 grub2: update to 2.02~rc1
806d3cc2c3 packages: mark packages depending on a target as nonshared
65c8f2890c grub2: upgrade to 2.02-beta3 (3 years newer than previous)
77812cdfec grub2: disable 'check-macro-version' build rule in 'po' build
2b54fa4dff grub2: do not generate mkfonts at build time
b33845b2da grub2: add PKG_FIXUP:=autoreconf
720b99215d treewide: clean up download hashes
3c52cbfa53 Revert "grub2: add PKG_FIXUP:=autoreconf"
a0ea22ac43 grub2: add PKG_FIXUP:=autoreconf
f2752f4735 grub2: add missing SECTION variable and remove non breaking space
d140648622 grub2: move to Boot Loaders category
59e3a4714a grub2: switch back to installing to STAGING_DIR_HOST
9b01282515 grub2: disable stack-protector
25eddec9cb grub2: fix build against musl

$ git log --oneline 81a2f9d6f86
81a2f9d6f8 target/linux/x86/image: add explicit prefix to grub-mkimage command

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2019-04-20 06:04:16 +02:00

150 lines
5.6 KiB
Diff

From: Alexandru Ardelean <ardeleanalex@gmail.com>
Date: Mon, 21 Nov 2016 15:54:26 +0200
Subject: grub2: upgrade to 2.02-beta3 (3 years newer than previous)
'100-musl-compat.patch' does not seem to be required anymore.
'210-fix_serial_rtscts.patchi' is superseeded by:
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=bac5d1a64ab4191058a8fd4c05f6b3b339e249e7
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index a9bfaadcf09b6332a9dff9a283f9b2cc869c3096..2742118671b33a739349a428395dee352e1d988b 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=grub
-PKG_VERSION:=2.02~beta2
+PKG_VERSION:=2.02~beta3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://alpha.gnu.org/gnu/grub \
http://gnualpha.uib.no/grub/ \
http://mirrors.fe.up.pt/pub/gnu-alpha/grub/ \
http://www.nic.funet.fi/pub/gnu/alpha/gnu/grub/
-PKG_HASH:=f6c702b2a8ea58f27a2b02928bb77973cb5a827af08f63db38c471c0a01b418d
+PKG_HASH:=30ec3d555e52a702c3eef449872ef874eff28b320f40b55ffc47f70db8e5ada1
PKG_FIXUP:=autoreconf
HOST_BUILD_PARALLEL:=1
diff --git a/package/boot/grub2/patches/100-grub_setup_root.patch b/package/boot/grub2/patches/100-grub_setup_root.patch
index 9619c410b840d68c5fca35aa4c2d3ef5f26acedf..f053ba95e2287bbb0e8d51a2a09566672fcf927d 100644
--- a/package/boot/grub2/patches/100-grub_setup_root.patch
+++ b/package/boot/grub2/patches/100-grub_setup_root.patch
@@ -17,7 +17,7 @@
int force;
int fs_probe;
int allow_floppy;
-@@ -178,6 +181,13 @@ argp_parser (int key, char *arg, struct
+@@ -178,6 +181,13 @@ argp_parser (int key, char *arg, struct argp_state *state)
arguments->dev_map = xstrdup (arg);
break;
@@ -42,7 +42,7 @@
--- a/util/setup.c
+++ b/util/setup.c
-@@ -247,13 +247,12 @@ identify_partmap (grub_disk_t disk __att
+@@ -247,13 +247,12 @@ identify_partmap (grub_disk_t disk __attribute__ ((unused)),
void
SETUP (const char *dir,
const char *boot_file, const char *core_file,
@@ -69,7 +69,7 @@
char **root_devices = grub_guess_root_devices (dir);
char **cur;
int found = 0;
-@@ -317,6 +319,8 @@ SETUP (const char *dir,
+@@ -320,6 +322,8 @@ SETUP (const char *dir,
char *drive;
grub_device_t try_dev;
@@ -80,7 +80,7 @@
continue;
--- a/include/grub/util/install.h
+++ b/include/grub/util/install.h
-@@ -182,13 +182,13 @@ grub_install_get_image_target (const cha
+@@ -184,13 +184,13 @@ grub_install_get_image_target (const char *arg);
void
grub_util_bios_setup (const char *dir,
const char *boot_file, const char *core_file,
@@ -98,7 +98,7 @@
--- a/util/grub-install.c
+++ b/util/grub-install.c
-@@ -1660,7 +1660,7 @@ main (int argc, char *argv[])
+@@ -1673,7 +1673,7 @@ main (int argc, char *argv[])
/* Now perform the installation. */
if (install_bootsector)
grub_util_bios_setup (platdir, "boot.img", "core.img",
@@ -107,12 +107,12 @@
fs_probe, allow_floppy, add_rs_codes);
break;
}
-@@ -1686,7 +1686,7 @@ main (int argc, char *argv[])
+@@ -1699,7 +1699,7 @@ main (int argc, char *argv[])
/* Now perform the installation. */
if (install_bootsector)
grub_util_sparc_setup (platdir, "boot.img", "core.img",
-- install_device, force,
-+ NULL, install_device, force,
+- install_drive, force,
++ NULL, install_drive, force,
fs_probe, allow_floppy,
0 /* unused */ );
break;
diff --git a/package/boot/grub2/patches/100-musl-compat.patch b/package/boot/grub2/patches/100-musl-compat.patch
deleted file mode 100644
index e3b12be58a24840f4dde269f9a515dd30f7df627..0000000000000000000000000000000000000000
--- a/package/boot/grub2/patches/100-musl-compat.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/grub-core/osdep/unix/hostdisk.c
-+++ b/grub-core/osdep/unix/hostdisk.c
-@@ -48,11 +48,10 @@
- #ifdef __linux__
- # include <sys/ioctl.h> /* ioctl */
- # include <sys/mount.h>
--# if !defined(__GLIBC__) || \
-- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
-+# if defined(__UCLIBC__)
- /* Maybe libc doesn't have large file support. */
- # include <linux/unistd.h> /* _llseek */
--# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
-+# endif /* __UCLIBC__ */
- #endif /* __linux__ */
-
- grub_uint64_t
-@@ -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(__UCLIBC__)
- /* 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/package/boot/grub2/patches/210-fix_serial_rtscts.patch b/package/boot/grub2/patches/210-fix_serial_rtscts.patch
deleted file mode 100644
index d60471c1d181cf29de2361aab5163336313b667f..0000000000000000000000000000000000000000
--- a/package/boot/grub2/patches/210-fix_serial_rtscts.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/grub-core/term/serial.c
-+++ b/grub-core/term/serial.c
-@@ -241,9 +241,9 @@ grub_cmd_serial (grub_extcmd_context_t c
-
- if (state[OPTION_RTSCTS].set)
- {
-- if (grub_strcmp (state[OPTION_PARITY].arg, "on") == 0)
-+ if (grub_strcmp (state[OPTION_RTSCTS].arg, "on") == 0)
- config.rtscts = 1;
-- if (grub_strcmp (state[OPTION_PARITY].arg, "off") == 0)
-+ else if (grub_strcmp (state[OPTION_RTSCTS].arg, "off") == 0)
- config.rtscts = 0;
- else
- return grub_error (GRUB_ERR_BAD_ARGUMENT,