summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/grub/2.02_beta3-mkconfig-alpine.patch30
-rw-r--r--user/grub/APKBUILD9
-rw-r--r--user/grub/default-grub8
-rw-r--r--user/grub/the-arch-everyone-uses-and-nobody-loves.patch72
4 files changed, 86 insertions, 33 deletions
diff --git a/user/grub/2.02_beta3-mkconfig-alpine.patch b/user/grub/2.02_beta3-mkconfig-alpine.patch
deleted file mode 100644
index 606540fff..000000000
--- a/user/grub/2.02_beta3-mkconfig-alpine.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -21,8 +21,11 @@
- exec_prefix="@exec_prefix@"
- datarootdir="@datarootdir@"
-
-+. /etc/update-extlinux.conf
- . "$pkgdatadir/grub-mkconfig_lib"
-
-+GRUB_CMDLINE_LINUX_DEFAULT="modules=${modules} ${default_kernel_opts} ${GRUB_CMDLINE_LINUX_DEFAULT}"
-+
- export TEXTDOMAIN=@PACKAGE@
- export TEXTDOMAINDIR="@localedir@"
-
-@@ -75,6 +78,7 @@
- version="$2"
- type="$3"
- args="$4"
-+ tag="$(basename ${rel_dirname}/${basename} | cut -b9-)"
-
- if [ -z "$boot_device_id" ]; then
- boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
-@@ -133,6 +137,7 @@
- echo '$(echo "$message" | grub_quote)'
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
- EOF
-+ [ -f "/boot/initramfs-${tag}" ] && initrd="initramfs-${tag}"
- if test -n "${initrd}" ; then
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- message="$(gettext_printf "Loading initial ramdisk ...")"
diff --git a/user/grub/APKBUILD b/user/grub/APKBUILD
index efcfda2af..532b0aa48 100644
--- a/user/grub/APKBUILD
+++ b/user/grub/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=grub
pkgver=2.02
-pkgrel=4
+pkgrel=5
pkgdesc="Bootloader with support for Linux, Multiboot and more"
url="https://www.gnu.org/software/grub/"
arch="all !s390x"
@@ -31,7 +31,8 @@ source="https://ftp.gnu.org/gnu/grub/grub-$pkgver.tar.xz
fix-gcc-no-pie-specs.patch
grub2-accept-empty-module.patch
grub-xen-host_grub.cfg
- 2.02_beta3-mkconfig-alpine.patch
+ the-arch-everyone-uses-and-nobody-loves.patch
+ default-grub
"
prepare() {
@@ -113,6 +114,7 @@ package() {
done
rm -f "$pkgdir"/usr/lib/charset.alias
+ install -D -m644 "$srcdir"/default-grub "$pkgdir"/etc/default/grub
# remove grub-install warning of missing directory
mkdir -p "$pkgdir"/usr/share/locale
}
@@ -155,4 +157,5 @@ sha512sums="cc6eb0a42b5c8df2f671cc128ff725afb3ff1f8832a196022e433cf0d3b75decfca2
f2a7d9ab6c445f4e402e790db56378cecd6631b5c367451aa6ce5c01cd95b95c83c3dd24d6d4b857f8f42601eba82c855607513eb6ce5b2af6bd6c71f046e288 fix-gcc-no-pie-specs.patch
098a1742aef131c85d63b934a9815879b991f2e73030cb90ac4b5dcd07d249fa0dd0a281e52ada0e10f05d59223493bd416eb47543242bf0ba336a0ebc9b2a1a grub2-accept-empty-module.patch
4e7394e0fff6772c89683039ccf81099ebbfe4f498e6df408977a1488fd59389b6e19afdbf0860ec271e2b2aea0df7216243dcc8235d1ca3af0e7f4d0a9d60a4 grub-xen-host_grub.cfg
-5de7c1cc11640a3892447f0daa1e3fd1f67b0c474c8aec555e4e6315b5e6c00491ba02c88b420cec221da0640c6961d639f148746df14a0b2c15bda7989cd25c 2.02_beta3-mkconfig-alpine.patch"
+088455205f2f397d60e43eab19ed73994880ea1f442661f7975846cceaf2b112d92fd1341119d7dbfad3af2174dfd4d4721f31dead1ac35f4a3cb7c0d92f8a04 the-arch-everyone-uses-and-nobody-loves.patch
+048d061ac0aab0106f59a3d257739ff5de6c7dc08a4dc9b8b12e9bd2b1ec11f9bc6214013f3d1083b11c3ce41185fcbb5615beb2f290380abf392bb4c3f0d509 default-grub"
diff --git a/user/grub/default-grub b/user/grub/default-grub
new file mode 100644
index 000000000..18fc2317d
--- /dev/null
+++ b/user/grub/default-grub
@@ -0,0 +1,8 @@
+# Welcome to Adélie Linux.
+# This file contains configuration for the GRUB boot manager.
+# Changes to this file won't take effect unless you run `update-grub` as root.
+
+GRUB_DEFAULT="Adélie"
+GRUB_TIMEOUT=5
+GRUB_DISTRIBUTOR="Adélie"
+GRUB_CMDLINE_LINUX_DEFAULT="ro"
diff --git a/user/grub/the-arch-everyone-uses-and-nobody-loves.patch b/user/grub/the-arch-everyone-uses-and-nobody-loves.patch
new file mode 100644
index 000000000..2d09149f7
--- /dev/null
+++ b/user/grub/the-arch-everyone-uses-and-nobody-loves.patch
@@ -0,0 +1,72 @@
+From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001
+From: Michael Chang <mchang@suse.com>
+Date: Mon, 26 Mar 2018 16:52:34 +0800
+Subject: Fix packed-not-aligned error on GCC 8
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When building with GCC 8, there are several errors regarding packed-not-aligned.
+
+./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned]
+
+This patch fixes the build error by cleaning up the ambiguity of placing
+aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
+grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
+has to be packed, to ensure the structure is bit-to-bit mapped to the format
+laid on disk. I think we could blame to copy and paste error here for the
+mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
+the name suggests. :)
+
+Signed-off-by: Michael Chang <mchang@suse.com>
+Tested-by: Michael Chang <mchang@suse.com>
+Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ grub-core/fs/btrfs.c | 2 +-
+ include/grub/efiemu/runtime.h | 2 +-
+ include/grub/gpt_partition.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
+index 4849c1ceb..be195448d 100644
+--- a/grub-core/fs/btrfs.c
++++ b/grub-core/fs/btrfs.c
+@@ -175,7 +175,7 @@ struct grub_btrfs_time
+ {
+ grub_int64_t sec;
+ grub_uint32_t nanosec;
+-} __attribute__ ((aligned (4)));
++} GRUB_PACKED;
+
+ struct grub_btrfs_inode
+ {
+diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
+index 9b6b729f4..36d2dedf4 100644
+--- a/include/grub/efiemu/runtime.h
++++ b/include/grub/efiemu/runtime.h
+@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
+
+ struct efi_variable
+ {
+- grub_efi_guid_t guid;
++ grub_efi_packed_guid_t guid;
+ grub_uint32_t namelen;
+ grub_uint32_t size;
+ grub_efi_uint32_t attributes;
+diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
+index 1b32f6725..9668a68c3 100644
+--- a/include/grub/gpt_partition.h
++++ b/include/grub/gpt_partition.h
+@@ -28,7 +28,7 @@ struct grub_gpt_part_type
+ grub_uint16_t data2;
+ grub_uint16_t data3;
+ grub_uint8_t data4[8];
+-} __attribute__ ((aligned(8)));
++} GRUB_PACKED;
+ typedef struct grub_gpt_part_type grub_gpt_part_type_t;
+
+ #define GRUB_GPT_PARTITION_TYPE_EMPTY \
+--
+cgit v1.1-33-g03f6
+