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

Proposed by Dimitri John Ledkov
Status: Rejected
Rejected by: Dimitri John Ledkov
Proposed branch: ~xnox/grub:one-grub-v3
Merge into: ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu
Diff against target: 182 lines (+74/-12)
3 files modified
debian/changelog (+19/-0)
debian/control (+6/-6)
debian/rules (+49/-6)
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+398507@code.launchpad.net

Commit message

this is sick, and not in a nice way.

To post a comment you must log in.

Unmerged commits

a031a29... by Dimitri John Ledkov

one-grub v3

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 fca9ce3..29a57f8 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,22 @@
6+grub2 (2.04-1ubuntu42) UNRELEASED; urgency=medium
7+
8+ * Use raw-signing tarball. Previously raw-uefi which is less
9+ convenient. LP: #1915536
10+ * Make building of singed -bin & -dbg packages be conditional on the
11+ source package name. LP: #1915536
12+ * Relax dependencies to allow signed -bin & -dbg be built by
13+ src:grub2-unsigned (potentially of a higher version number) LP: #1915536
14+ * Add debian/rules generate-grub2-unsigned target to quickly build
15+ src:grub2-unsigned. LP: #1915536
16+
17+ -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 18 Feb 2021 00:50:30 +0000
18+
19+grub2 (2.04-1ubuntu41) hirsute; urgency=medium
20+
21+ * No-change rebuild to drop the udeb package.
22+
23+ -- Matthias Klose <doko@ubuntu.com> Mon, 22 Feb 2021 10:33:38 +0100
24+
25 grub2 (2.04-1ubuntu40) hirsute; urgency=medium
26
27 * Revert: rhboot-f34-tcp-add-window-scaling-support.patch,
28diff --git a/debian/control b/debian/control
29index 9aafb52..e336773 100644
30--- a/debian/control
31+++ b/debian/control
32@@ -313,7 +313,7 @@ Description: GRand Unified Bootloader, version 2 (EFI-IA32 signing template)
33
34 Package: grub-efi-amd64-bin
35 Architecture: i386 kopensolaris-i386 any-amd64
36-Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version})
37+Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (<= ${binary:Version})
38 Recommends: grub-efi-amd64-signed, efibootmgr [linux-any]
39 Replaces: grub2 (<< ${source:Version}), grub-common (<= 1.97~beta2-1), grub-efi-amd64 (<< 1.99-1)
40 Multi-Arch: foreign
41@@ -338,7 +338,7 @@ Description: GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
42 Package: grub-efi-amd64-dbg
43 Section: debug
44 Architecture: i386 kopensolaris-i386 any-amd64
45-Depends: ${misc:Depends}, grub-efi-amd64-bin (= ${binary:Version}), grub-common (= ${binary:Version})
46+Depends: ${misc:Depends}, grub-efi-amd64-bin (= ${binary:Version})
47 Multi-Arch: foreign
48 Description: GRand Unified Bootloader, version 2 (EFI-AMD64 debug files)
49 This package contains debugging files for grub-efi-amd64-bin. You only
50@@ -347,7 +347,7 @@ Description: GRand Unified Bootloader, version 2 (EFI-AMD64 debug files)
51 Package: grub-efi-amd64
52 Architecture: i386 kopensolaris-i386 any-amd64
53 Pre-Depends: ${misc:Pre-Depends}
54-Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-amd64-bin (= ${binary:Version}), ucf
55+Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-amd64-bin (>= ${binary:Version}), ucf
56 Replaces: grub, grub-legacy, grub2 (<< ${source:Version}), grub-common (<= 1.97~beta2-1), grub-pc, grub-efi-ia32, grub-coreboot, grub-ieee1275
57 Conflicts: grub, grub-legacy, grub-efi-ia32, grub-pc, grub-coreboot, grub-ieee1275, grub-xen, elilo
58 Multi-Arch: foreign
59@@ -474,7 +474,7 @@ Description: GRand Unified Bootloader, version 2 (ARM UEFI version)
60
61 Package: grub-efi-arm64-bin
62 Architecture: any-arm64
63-Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version})
64+Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (<= ${binary:Version})
65 Recommends: grub-efi-arm64-signed, efibootmgr [linux-any]
66 Multi-Arch: foreign
67 XB-Efi-Vendor: ${efi:Vendor}
68@@ -497,7 +497,7 @@ Description: GRand Unified Bootloader, version 2 (ARM64 UEFI modules)
69 Package: grub-efi-arm64-dbg
70 Section: debug
71 Architecture: any-arm64
72-Depends: ${misc:Depends}, grub-efi-arm64-bin (= ${binary:Version}), grub-common (= ${binary:Version})
73+Depends: ${misc:Depends}, grub-efi-arm64-bin (= ${binary:Version})
74 Multi-Arch: foreign
75 Description: GRand Unified Bootloader, version 2 (ARM64 UEFI debug files)
76 This package contains debugging files for grub-efi-arm64-bin. You only
77@@ -506,7 +506,7 @@ Description: GRand Unified Bootloader, version 2 (ARM64 UEFI debug files)
78 Package: grub-efi-arm64
79 Architecture: any-arm64
80 Pre-Depends: ${misc:Pre-Depends}
81-Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-arm64-bin (= ${binary:Version}), ucf
82+Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (= ${binary:Version}), grub-efi-arm64-bin (>= ${binary:Version}), ucf
83 Multi-Arch: foreign
84 Description: GRand Unified Bootloader, version 2 (ARM64 UEFI version)
85 GRUB is a portable, powerful bootloader. This version of GRUB is based on a
86diff --git a/debian/rules b/debian/rules
87index 6ccb2dc..db83e4d 100755
88--- a/debian/rules
89+++ b/debian/rules
90@@ -16,6 +16,8 @@ HOST_CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
91 HOST_CFLAGS := -Wall -Wno-error=unused-result $(shell dpkg-buildflags --get CFLAGS | perl -pe 's/-O3\b/-O2/')
92 HOST_LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
93
94+include /usr/share/dpkg/pkg-info.mk
95+
96 # to get new minilzo, with CVE fixes, patched to build with our compiler
97 BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), \n' -W liblzo2-dev)
98
99@@ -120,12 +122,45 @@ debian/stamps/build-grub-efi-amd64 install/grub-efi-amd64: export SB_EFI_NAME :=
100 debian/stamps/build-grub-efi-arm64 install/grub-efi-arm64: export SB_PLATFORM := arm64-efi
101 debian/stamps/build-grub-efi-arm64 install/grub-efi-arm64: export SB_EFI_NAME := aa64
102 SB_PACKAGE :=
103+ONLY_BUILD :=
104 ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
105+generate-grub2-unsigned:
106+ sed '1s/^grub2 /grub2-unsigned /' -i debian/changelog
107+ sed '1s/ grub2$$/ grub2-unsigned/' -i debian/control
108+ cp ../grub2_$(DEB_VERSION_UPSTREAM).orig.tar.xz ../grub2-unsigned_$(DEB_VERSION_UPSTREAM).orig.tar.xz
109+ debuild -d -S -nc -sa -us -uc
110+ sed '1s/^grub2-unsigned /grub2 /' -i debian/changelog
111+ sed '1s/ grub2-unsigned$$/ grub2/' -i debian/control
112+
113+# Submit this build of grub for raw-uefi signing?
114+ifeq ($(DEB_SOURCE),grub2)
115+SB_SUBMIT :=
116+else
117+SB_SUBMIT := yes
118+endif
119 ifeq ($(DEB_HOST_ARCH),amd64)
120 SB_PACKAGE := grub-efi-amd64
121+ifeq ($(SB_SUBMIT),)
122+# on amd64, src:grub2 does not build -bin & -dbg for efi-amd64
123+ONLY_BUILD := -Ngrub-efi-$(DEB_HOST_ARCH)-bin -Ngrub-efi-$(DEB_HOST_ARCH)-dbg
124+else
125+# on amd64, src:grub2-unsigned builds -bin & -dbg for efi-amd64
126+ONLY_BUILD := -pgrub-efi-$(DEB_HOST_ARCH)-bin -pgrub-efi-$(DEB_HOST_ARCH)-dbg
127 endif
128-ifeq ($(DEB_HOST_ARCH),arm64)
129+else ifeq ($(DEB_HOST_ARCH),arm64)
130 SB_PACKAGE := grub-efi-arm64
131+ifeq ($(SB_SUBMIT),)
132+# on arm64, src:grub2 does not build -bin & -dbg for efi-arm64
133+ONLY_BUILD := -Ngrub-efi-$(DEB_HOST_ARCH)-bin -Ngrub-efi-$(DEB_HOST_ARCH)-dbg
134+else
135+# on amd64, src:grub2-unsigned builds -bin & -dbg for efi-arm64
136+ONLY_BUILD := -pgrub-efi-$(DEB_HOST_ARCH)-bin -pgrub-efi-$(DEB_HOST_ARCH)-dbg
137+endif
138+else
139+ifneq ($(SB_SUBMIT),)
140+# on all other arches src:grub2-unsigned FTBFS
141+ONLY_BUILD := -pnone
142+endif
143 endif
144 endif
145
146@@ -577,23 +612,31 @@ LEGACY_DOC_BR := grub-doc (<< 0.97-32), grub-legacy-doc (<< 0.97-59)
147 endif
148
149 override_dh_gencontrol:
150- dh_gencontrol -- -Vlegacy-doc-br="$(LEGACY_DOC_BR)" -V"efi:Vendor=$(SB_EFI_VENDOR)" -VBuilt-Using="$(BUILT_USING)" $(substvars)
151+ dh_gencontrol $(ONLY_BUILD) -- -Vlegacy-doc-br="$(LEGACY_DOC_BR)" -V"efi:Vendor=$(SB_EFI_VENDOR)" -VBuilt-Using="$(BUILT_USING)" $(substvars)
152
153 TARNAME := grub2_$(deb_version)_$(DEB_HOST_ARCH).tar.gz
154
155 override_dh_builddeb:
156- dh_builddeb
157+ dh_builddeb $(ONLY_BUILD)
158 ifneq (,$(SB_PACKAGE))
159 echo $(deb_version) > obj/monolithic/$(SB_PACKAGE)/version
160 ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
161 if [ -d obj/monolithic/$(SB_PACKAGE)/$(deb_version) ]; then \
162 rm -rf obj/monolithic/$(SB_PACKAGE)/$(deb_version); \
163 fi
164- mkdir -v obj/monolithic/$(SB_PACKAGE)/$(deb_version)
165- ln -v obj/monolithic/$(SB_PACKAGE)/* obj/monolithic/$(SB_PACKAGE)/$(deb_version) || :
166+ mkdir -vp obj/monolithic/$(SB_PACKAGE)/$(deb_version)/control
167+ echo 'tarball' > obj/monolithic/$(SB_PACKAGE)/$(deb_version)/control/options
168+ mkdir -p obj/monolithic/$(SB_PACKAGE)/$(deb_version)/$(SB_PLATFORM)-signed
169+ # move version
170+ cp obj/monolithic/$(SB_PACKAGE)/version obj/monolithic/$(SB_PACKAGE)/$(deb_version)/$(SB_PLATFORM)-signed
171+ # move .efi apps where they are expected as signed
172+ mv obj/monolithic/$(SB_PACKAGE)/$(deb_version)/$(SB_PLATFORM)/monolithic/* obj/monolithic/$(SB_PACKAGE)/$(deb_version)/$(SB_PLATFORM)-signed
173+ # this way signed tarball more-or-less will look like how everything needs to be in /usr/lib/grub/
174 endif
175 tar -c -f ../$(TARNAME) -a -C obj/monolithic/$(SB_PACKAGE) -v $(deb_version)
176- dpkg-distaddfile $(TARNAME) raw-uefi -
177+ifneq (,$(SB_SUBMIT))
178+ dpkg-distaddfile $(TARNAME) raw-signing -
179+endif
180 endif
181
182 override_dh_auto_clean:

Subscribers

People subscribed via source and target branches