Unverified Commit c2357563 authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra
Browse files

Import Debian changes 2.02+dfsg1-16parrot1



grub2 (2.02+dfsg1-16parrot1) testing; urgency=medium

  * Import new Debian release.

grub2 (2.02+dfsg1-16) unstable; urgency=medium

  * Fix -Wcast-align diagnostics on ARM.

grub2 (2.02+dfsg1-15) unstable; urgency=medium

  * Build-depend on libefiboot-dev and libefivar-dev, for EFI variable
    storage changes.
  * Drop now-unnecessary dependencies on efibootmgr.

grub2 (2.02+dfsg1-14) unstable; urgency=medium

  * Make signed packages depend on a matching version of grub-common, in an
    attempt to prevent incorrect testing migrations (closes: #924814).
  * Cherry-pick from upstream:
    - xfs: Accept filesystem with sparse inodes (closes: #924760).
  * Minimise writes to EFI variable storage (closes: #891434).
Signed-off-by: Lorenzo "Palinuro" Faletra's avatarLorenzo Palinuro Faletra <palinuro@parrotsec.org>
parent a9ea042d
# see git-dpm(1) from git-dpm package
0cc1bd74c82c94ad93049a7298987c8f155cd0d2
0cc1bd74c82c94ad93049a7298987c8f155cd0d2
3ddfe605a6a472100f529c3d7465bf4eb7fe954d
3ddfe605a6a472100f529c3d7465bf4eb7fe954d
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
grub2_2.02+dfsg1.orig.tar.xz
......
grub2 (2.02+dfsg1-16parrot1) testing; urgency=medium
* Import new Debian release.
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Sat, 13 Apr 2019 14:09:10 +0200
grub2 (2.02+dfsg1-16) unstable; urgency=medium
* Fix -Wcast-align diagnostics on ARM.
-- Colin Watson <cjwatson@debian.org> Sat, 23 Mar 2019 23:28:17 +0000
grub2 (2.02+dfsg1-15) unstable; urgency=medium
* Build-depend on libefiboot-dev and libefivar-dev, for EFI variable
storage changes.
* Drop now-unnecessary dependencies on efibootmgr.
-- Colin Watson <cjwatson@debian.org> Sat, 23 Mar 2019 09:56:35 +0000
grub2 (2.02+dfsg1-14) unstable; urgency=medium
* Make signed packages depend on a matching version of grub-common, in an
attempt to prevent incorrect testing migrations (closes: #924814).
* Cherry-pick from upstream:
- xfs: Accept filesystem with sparse inodes (closes: #924760).
* Minimise writes to EFI variable storage (closes: #891434).
-- Colin Watson <cjwatson@debian.org> Sat, 23 Mar 2019 09:47:10 +0000
grub2 (2.02+dfsg1-13parrot1) parrot; urgency=medium
* Import new Debian release.
......
......@@ -32,6 +32,8 @@ Build-Depends: debhelper (>= 10~),
libparted-dev [any-powerpc any-ppc64 any-ppc64el],
pkg-config,
bash-completion,
libefiboot-dev [any-i386 any-amd64 any-ia64 any-arm any-arm64],
libefivar-dev [any-i386 any-amd64 any-ia64 any-arm any-arm64],
Build-Conflicts: autoconf2.13, libzfs-dev, libnvpair-dev
Standards-Version: 3.9.6
Homepage: https://www.gnu.org/software/grub/
......@@ -244,7 +246,7 @@ Description: GRand Unified Bootloader, version 2 (Coreboot version)
Package: grub-efi-ia32-bin
Architecture: any-i386 any-amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version}), efibootmgr [linux-any]
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version})
Conflicts: grub-efi-ia32-signed,
Replaces: grub2 (<< ${source:Version}), grub-common (<= 1.97~beta2-1), grub-efi, grub-efi-ia32 (<< 1.99-1)
Multi-Arch: foreign
......@@ -305,7 +307,7 @@ Description: GRand Unified Bootloader, version 2 (EFI-IA32 signing template)
Package: grub-efi-amd64-bin
Architecture: i386 kopensolaris-i386 any-amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version}), efibootmgr [linux-any]
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version})
Conflicts: grub-efi-amd64-signed,
Replaces: grub2 (<< ${source:Version}), grub-common (<= 1.97~beta2-1), grub-efi-amd64 (<< 1.99-1)
Multi-Arch: foreign
......@@ -415,7 +417,7 @@ Description: GRand Unified Bootloader, version 2 (IA64 version)
Package: grub-efi-arm-bin
Architecture: any-arm
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version}), efibootmgr [linux-any]
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version})
Multi-Arch: foreign
XB-Efi-Vendor: ${efi:Vendor}
Description: GRand Unified Bootloader, version 2 (ARM UEFI modules)
......@@ -465,7 +467,7 @@ Description: GRand Unified Bootloader, version 2 (ARM UEFI version)
Package: grub-efi-arm64-bin
Architecture: any-arm64
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version}), efibootmgr [linux-any]
Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version})
Conflicts: grub-efi-arm64-signed,
Multi-Arch: foreign
XB-Efi-Vendor: ${efi:Vendor}
......
Description: Add failsafe options for acpi and nouveau on boot screen
Author: Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org>
Last-Update: 2019-03-20
--- grub2-2.02+dfsg1.orig/util/grub.d/10_linux.in
+++ grub2-2.02+dfsg1/util/grub.d/10_linux.in
@@ -17,6 +17,8 @@ set -e
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+
+
prefix="@prefix@"
exec_prefix="@exec_prefix@"
datarootdir="@datarootdir@"
@@ -120,6 +122,10 @@ linux_entry ()
title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")" ;;
init-*)
title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "${type#init-}")" ;;
+ nouveau-off)
+ title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "Nouveau/Nvidia Off")")" ;;
+ acpi-off)
+ title="$(gettext_printf "%s, with Linux %s (%s)" "${os}" "${version}" "$(gettext "ACPI Off")")" ;;
*)
title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
esac
@@ -334,6 +340,11 @@ while [ "x$list" != "x" ] ; do
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
linux_entry "${OS}" "${version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+
+ linux_entry "${OS}" "${version}" nouveau-off \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} nouveau.modeset=0"
+ linux_entry "${OS}" "${version}" acpi-off \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} acpi=off"
submenu_indentation="$grub_tab"
This diff is collapsed.
......@@ -131,4 +131,6 @@ grub-install-arm-default-target.patch
install_efi_fallback_arm.patch
freebsd-ebr-partition-offset.patch
util-check-errors.patch
add-failsafe-boot-options.patch
xfs-sparse-inodes.patch
vsnprintf-upper-case-hex.patch
efi-variable-storage-minimise-writes.patch
From 27f1a9c448678f5d354957e0ebad0a2c310f53d1 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Mon, 11 Mar 2019 11:15:12 +0000
Subject: Add %X to grub_vsnprintf_real and friends
This is needed for UEFI Boot* variables, which the standard says are
named using upper-case hexadecimal.
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Bug-Debian: https://bugs.debian.org/891434
Forwarded: https://lists.gnu.org/archive/html/grub-devel/2019-03/msg00121.html
Last-Update: 2019-03-23
Patch-Name: vsnprintf-upper-case-hex.patch
---
grub-core/kern/misc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index 3a14d679e..1e5bd2411 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -591,7 +591,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
static inline char *
grub_lltoa (char *str, int c, unsigned long long n)
{
- unsigned base = (c == 'x') ? 16 : 10;
+ unsigned base = (c == 'x' || c == 'X') ? 16 : 10;
char *p;
if ((long long) n < 0 && c == 'd')
@@ -606,7 +606,7 @@ grub_lltoa (char *str, int c, unsigned long long n)
do
{
unsigned d = (unsigned) (n & 0xf);
- *p++ = (d > 9) ? d + 'a' - 10 : d + '0';
+ *p++ = (d > 9) ? d + ((c == 'x') ? 'a' : 'A') - 10 : d + '0';
}
while (n >>= 4);
else
@@ -679,6 +679,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
{
case 'p':
case 'x':
+ case 'X':
case 'u':
case 'd':
case 'c':
@@ -765,6 +766,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
switch (c)
{
case 'x':
+ case 'X':
case 'u':
args->ptr[curn].type = UNSIGNED_INT + longfmt;
break;
@@ -903,6 +905,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0,
c = 'x';
/* Fall through. */
case 'x':
+ case 'X':
case 'u':
case 'd':
{
From ec64736811599e752ed4b4dff04a3029179e9f56 Mon Sep 17 00:00:00 2001
From: Daniel Kiper <daniel.kiper@oracle.com>
Date: Tue, 29 May 2018 16:16:02 +0200
Subject: xfs: Accept filesystem with sparse inodes
The sparse inode metadata format became a mkfs.xfs default in
xfsprogs-4.16.0, and such filesystems are now rejected by grub as
containing an incompatible feature.
In essence, this feature allows xfs to allocate inodes into fragmented
freespace. (Without this feature, if xfs could not allocate contiguous
space for 64 new inodes, inode creation would fail.)
In practice, the disk format change is restricted to the inode btree,
which as far as I can tell is not used by grub. If all you're doing
today is parsing a directory, reading an inode number, and converting
that inode number to a disk location, then ignoring this feature
should be fine, so I've added it to XFS_SB_FEAT_INCOMPAT_SUPPORTED
I did some brief testing of this patch by hacking up the regression
tests to completely fragment freespace on the test xfs filesystem, and
then write a large-ish number of inodes to consume any existing
contiguous 64-inode chunk. This way any files the grub tests add and
traverse would be in such a fragmented inode allocation. Tests passed,
but I'm not sure how to cleanly integrate that into the test harness.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Chris Murphy <lists@colorremedies.com>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=cda0a857dd7a27cd5d621747464bfe71e8727fff
Bug-Debian: https://bugs.debian.org/924760
Last-Update: 2019-03-20
Patch-Name: xfs-sparse-inodes.patch
---
grub-core/fs/xfs.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
index 9f66dd6e4..231f5b886 100644
--- a/grub-core/fs/xfs.c
+++ b/grub-core/fs/xfs.c
@@ -79,9 +79,18 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define XFS_SB_FEAT_INCOMPAT_SPINODES (1 << 1) /* sparse inode chunks */
#define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */
-/* We do not currently verify metadata UUID so it is safe to read such filesystem */
+/*
+ * Directory entries with ftype are explicitly handled by GRUB code.
+ *
+ * We do not currently read the inode btrees, so it is safe to read filesystems
+ * with the XFS_SB_FEAT_INCOMPAT_SPINODES feature.
+ *
+ * We do not currently verify metadata UUID, so it is safe to read filesystems
+ * with the XFS_SB_FEAT_INCOMPAT_META_UUID feature.
+ */
#define XFS_SB_FEAT_INCOMPAT_SUPPORTED \
(XFS_SB_FEAT_INCOMPAT_FTYPE | \
+ XFS_SB_FEAT_INCOMPAT_SPINODES | \
XFS_SB_FEAT_INCOMPAT_META_UUID)
struct grub_xfs_sblock
......@@ -11,6 +11,7 @@ Rules-Requires-Root: no
Package: @pkg_signed@
Architecture: @arch@
Depends: grub-common (= @version_binary@)
Recommends: shim-signed [amd64]
Built-Using: grub2 (= @version_binary@)
Description: GRand Unified Bootloader, version 2 (@arch@ UEFI signed by Debian)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment