Merge ~xnox/grub:ubuntu into ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Dimitri John Ledkov
Proposed branch: ~xnox/grub:ubuntu
Merge into: ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu
Diff against target: 177 lines (+73/-10)
7 files modified
debian/changelog (+16/-0)
debian/grub-common.service (+4/-3)
debian/patches/0239-arm-linux-Fix-ARM-Linux-header-layout.patch (+29/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu-add-initrd-less-boot-fallback.patch (+6/-5)
debian/patches/ubuntu-add-initrd-less-boot-messages.patch (+15/-2)
debian/rules (+2/-0)
Reviewer Review Type Date Requested Status
Julian Andres Klode Pending
Ubuntu Core Development Team Pending
Review via email: mp+405806@code.launchpad.net

Commit message

Fixes

To post a comment you must log in.
~xnox/grub:ubuntu updated
dc57667... by Dimitri John Ledkov

releasing package grub2 version 2.04-1ubuntu46

Unmerged commits

dc57667... by Dimitri John Ledkov

releasing package grub2 version 2.04-1ubuntu46

cac893c... by Dimitri John Ledkov

grub-initrd-fallback.service, debian/grub-common.service: only start units when booted with grub. Use presence of /boot/grub/grub.cfg as proxy. LP: #1925507

f01c19a... by Dimitri John Ledkov

debian/rules: disable LTO. LP: #1922005

484afe3... by Dimitri John Ledkov

cherrypick upstream fix to make armhf efi boot work. LP: #1788940

f1a3e2b... by Dimitri John Ledkov

grub-initrd-fallback.service: add wantedby sleep.target, after
sleep.target. The service will now start after resume from
hybernation. LP: #1929860

0497a42... by Dimitri John Ledkov

debian/grub-common.service: change type to oneshot, add wantedby sleep.target, after sleep.target. The service will now start after resume from hybernation.

LP: #1929860

9389967... by Dimitri John Ledkov

releasing package grub2 version 2.04-1ubuntu45

22f99c4... by Dimitri John Ledkov

Drop redundant dh-systemd build-dependency.

3945b11... by Dimitri John Ledkov

Unapply all patches.

* Unapply all patches.
* Stop using git-dpm.
* Start using gbp pq import|export --no-patch-numbers, this brings grub2
  packaging closer to other non-debian distributions.
* It would be nice to separate patches into topic subdirs -
  i.e. reverts, upstream cherry picks, debian, ubuntu, rhel, security,
  etc.

9d35931... by Dimitri John Ledkov

Import uploads upto 2.04-1ubuntu44

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ab465cf..d69daca 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,19 @@
6+grub2 (2.04-1ubuntu46) impish; urgency=medium
7+
8+ * debian/grub-common.service: change type to oneshot, add wantedby
9+ sleep.target, after sleep.target. The service will now start after
10+ resume from hybernation. LP: #1929860
11+ * grub-initrd-fallback.service: add wantedby sleep.target, after
12+ sleep.target. The service will now start after resume from
13+ hybernation. LP: #1929860
14+ * cherrypick upstream fix to make armhf efi boot work. LP: #1788940
15+ * debian/rules: disable LTO. LP: #1922005
16+ * grub-initrd-fallback.service, debian/grub-common.service: only start
17+ units when booted with grub. Use presence of /boot/grub/grub.cfg as
18+ proxy. LP: #1925507
19+
20+ -- Dimitri John Ledkov <dimitri.ledkov@canonical.com> Fri, 16 Jul 2021 12:02:33 +0100
21+
22 grub2 (2.04-1ubuntu45) hirsute; urgency=medium
23
24 * Unapply all patches.
25diff --git a/debian/grub-common.service b/debian/grub-common.service
26index afe1aa0..fcf5474 100644
27--- a/debian/grub-common.service
28+++ b/debian/grub-common.service
29@@ -1,14 +1,15 @@
30 [Unit]
31 Description=Record successful boot for GRUB
32+After=sleep.target
33+ConditionPathExists=/boot/grub/grub.cfg
34
35 [Service]
36-Type=simple
37+Type=oneshot
38 Restart=no
39-RemainAfterExit=yes
40 ExecStartPre=/bin/sh -c '[ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir -p /boot/grub'
41 ExecStart=grub-editenv /boot/grub/grubenv unset recordfail
42 ExecStartPost=/bin/sh -c 'if grub-editenv /boot/grub/grubenv list | grep -q initrdless_boot_fallback_triggered=1; then echo "grub: GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback triggered."; fi'
43 StandardOutput=kmsg
44
45 [Install]
46-WantedBy=multi-user.target
47+WantedBy=multi-user.target sleep.target
48diff --git a/debian/patches/0239-arm-linux-Fix-ARM-Linux-header-layout.patch b/debian/patches/0239-arm-linux-Fix-ARM-Linux-header-layout.patch
49new file mode 100644
50index 0000000..5de0f28
51--- /dev/null
52+++ b/debian/patches/0239-arm-linux-Fix-ARM-Linux-header-layout.patch
53@@ -0,0 +1,29 @@
54+From: Ard Biesheuvel <ard.biesheuvel@arm.com>
55+Date: Sun, 25 Oct 2020 14:49:34 +0100
56+Subject: arm/linux: Fix ARM Linux header layout
57+
58+The hdr_offset member of the ARM Linux image header appears at
59+offset 0x3c, matching the PE/COFF spec's placement of the COFF
60+header offset in the MS-DOS header. We're currently off by four,
61+so fix that.
62+
63+Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
64+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
65+(cherry picked from commit a166484483a94f6a414c09a1e449d51fb1beaf05)
66+---
67+ include/grub/arm/linux.h | 2 +-
68+ 1 file changed, 1 insertion(+), 1 deletion(-)
69+
70+diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h
71+index 2e98a66..bcd5a7e 100644
72+--- a/include/grub/arm/linux.h
73++++ b/include/grub/arm/linux.h
74+@@ -30,7 +30,7 @@ struct linux_arm_kernel_header {
75+ grub_uint32_t magic;
76+ grub_uint32_t start; /* _start */
77+ grub_uint32_t end; /* _edata */
78+- grub_uint32_t reserved2[4];
79++ grub_uint32_t reserved2[3];
80+ grub_uint32_t hdr_offset;
81+ };
82+
83diff --git a/debian/patches/series b/debian/patches/series
84index 0f5fcee..c8e44f8 100644
85--- a/debian/patches/series
86+++ b/debian/patches/series
87@@ -236,3 +236,4 @@ cherry-fix-crash-on-http.patch
88 0236-gdb-Restrict-GDB-access-when-locked-down.patch
89 0237-loader-xnu-Don-t-allow-loading-extension-and-package.patch
90 0238-util-grub-install-Fix-NULL-pointer-dereferences.patch
91+0239-arm-linux-Fix-ARM-Linux-header-layout.patch
92diff --git a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
93index 82abad4..270a20f 100644
94--- a/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
95+++ b/debian/patches/ubuntu-add-initrd-less-boot-fallback.patch
96@@ -11,10 +11,10 @@ Patch-Name: ubuntu-add-initrd-less-boot-fallback.patch
97 ---
98 Makefile.am | 3 ++
99 configure.ac | 10 +++++++
100- grub-initrd-fallback.service | 13 +++++++++
101+ grub-initrd-fallback.service | 14 +++++++++
102 util/grub.d/00_header.in | 27 ++++++++++++++++++
103 util/grub.d/10_linux.in | 68 +++++++++++++++++++++++++++++++++-----------
104- 5 files changed, 105 insertions(+), 16 deletions(-)
105+ 5 files changed, 106 insertions(+), 16 deletions(-)
106 create mode 100644 grub-initrd-fallback.service
107
108 diff --git a/Makefile.am b/Makefile.am
109@@ -54,14 +54,15 @@ index 8832455..1819188 100644
110 #
111 diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service
112 new file mode 100644
113-index 0000000..fb0b76e
114+index 0000000..1a0a4e5
115 --- /dev/null
116 +++ b/grub-initrd-fallback.service
117-@@ -0,0 +1,13 @@
118+@@ -0,0 +1,14 @@
119 +[Unit]
120 +Description=GRUB failed boot detection
121 +After=local-fs.target
122 +After=grub-common.service
123++After=sleep.target
124 +
125 +[Service]
126 +Type=oneshot
127@@ -70,7 +71,7 @@ index 0000000..fb0b76e
128 +TimeoutSec=0
129 +
130 +[Install]
131-+WantedBy=multi-user.target rescue.target emergency.target
132++WantedBy=multi-user.target rescue.target emergency.target sleep.target
133 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
134 index b7135b6..2642f66 100644
135 --- a/util/grub.d/00_header.in
136diff --git a/debian/patches/ubuntu-add-initrd-less-boot-messages.patch b/debian/patches/ubuntu-add-initrd-less-boot-messages.patch
137index 23ce23d..c81740b 100644
138--- a/debian/patches/ubuntu-add-initrd-less-boot-messages.patch
139+++ b/debian/patches/ubuntu-add-initrd-less-boot-messages.patch
140@@ -8,9 +8,22 @@ reboot by default.
141
142 Patch-Name: ubuntu-add-initrd-less-boot-messages.patch
143 ---
144- util/grub.d/10_linux.in | 10 ++++++++++
145- 1 file changed, 10 insertions(+)
146+ grub-initrd-fallback.service | 1 +
147+ util/grub.d/10_linux.in | 10 ++++++++++
148+ 2 files changed, 11 insertions(+)
149
150+diff --git a/grub-initrd-fallback.service b/grub-initrd-fallback.service
151+index 1a0a4e5..59d1a62 100644
152+--- a/grub-initrd-fallback.service
153++++ b/grub-initrd-fallback.service
154+@@ -3,6 +3,7 @@ Description=GRUB failed boot detection
155+ After=local-fs.target
156+ After=grub-common.service
157+ After=sleep.target
158++ConditionPathExists=/boot/grub/grub.cfg
159+
160+ [Service]
161+ Type=oneshot
162 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
163 index 49e6272..47daf51 100644
164 --- a/util/grub.d/10_linux.in
165diff --git a/debian/rules b/debian/rules
166index e8eb8c6..b604284 100755
167--- a/debian/rules
168+++ b/debian/rules
169@@ -10,6 +10,8 @@ DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
170 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
171 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
172
173+export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
174+
175 HOST_CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
176 # -O3 (default on Ubuntu ppc64el) introduces various -Werror failures, and
177 # isn't worth it here.

Subscribers

People subscribed via source and target branches