Merge lp:~dannf/ubuntu/wily/grub2-signed/arm64-support into lp:ubuntu/wily/grub2-signed

Proposed by dann frazier
Status: Merged
Merge reported by: Adam Conrad
Merged at revision: not available
Proposed branch: lp:~dannf/ubuntu/wily/grub2-signed/arm64-support
Merge into: lp:ubuntu/wily/grub2-signed
Diff against target: 160 lines (+66/-15)
5 files modified
Makefile (+20/-5)
debian/changelog (+7/-0)
debian/control (+19/-1)
debian/rules (+7/-3)
download-grub2 (+13/-6)
To merge this branch: bzr merge lp:~dannf/ubuntu/wily/grub2-signed/arm64-support
Reviewer Review Type Date Requested Status
Adam Conrad (community) Approve
dann frazier Needs Resubmitting
Mathieu Trudel-Lapierre Approve
Review via email: mp+259667@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks appropriate; but will obviously explode unless grub2 already builds the new grub-efi-arm64 package, and so needs to wait to be merged/uploaded until after it.

It's up to you whether you want to fixup changelog now or wait until grub2 is ready as well; since it's a requirement to upload grub2-signed with grub2 anyway, we can do the changelog fixes just before merging.

review: Approve
Revision history for this message
dann frazier (dannf) wrote :

Sorry, can you elaborate on what you mean by "fixup changelog" - just going UNRELEASED->wily?

Also, I should note that this will also require a control file update to make the grub2 versioned build-deps match the version of grub2 that eventually gets uploaded w/ arm64 image support.

Revision history for this message
Adam Conrad (adconrad) wrote :

You should never use "dpkg --print-architecture" to determine the arch you're building FOR. What you're looking for (in both places) is dpkg-architecture -qDEB_HOST_ARCH

Other oddities:

1) Why do we need .install files when we didn't seem to before?
2) symlinking to arch-specific bits in clean doesn't seem clever, you'll get different source cruft depending on the arch you clean/upload on.

review: Needs Fixing
49. By dann frazier

Use 'dpkg-architecture -qDEB_HOST_ARCH' instead of dpkg --print-architecture

Correctly identifies the architecture of the host we are building for vs.
the host we happen to be building on.

50. By dann frazier

Stop doing postinst symlink generation during clean.

Just include all necessary symlinks to avoid different source package contents
when generated on different architectures.

51. By dann frazier

Override destdir during install instead of adding .install files

Revision history for this message
dann frazier (dannf) wrote :

> You should never use "dpkg --print-architecture" to determine the arch you're
> building FOR. What you're looking for (in both places) is dpkg-architecture
> -qDEB_HOST_ARCH

Fixed.

> Other oddities:
>
> 1) Why do we need .install files when we didn't seem to before?

It is just how I chose to handle the single-binary -> multi-binary conversion. But it does seem like a pain to have to add that file for every new architecture. I switched this to just overriding destdir during install.

> 2) symlinking to arch-specific bits in clean doesn't seem clever, you'll get
> different source cruft depending on the arch you clean/upload on.

Fixed.

review: Needs Resubmitting
52. By dann frazier

Use dpkg built-in make snippet instead of populating variables manually

53. By dann frazier

Merge lp:ubuntu/grub2-signed

54. By dann frazier

Merge lp:ubuntu/grub2-signed

55. By dann frazier

Rebuild against grub-efi-amd64 2.02~beta2-26ubuntu4.

Revision history for this message
Adam Conrad (adconrad) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2013-09-12 17:14:41 +0000
+++ Makefile 2015-07-22 17:23:13 +0000
@@ -1,7 +1,22 @@
1include /usr/share/dpkg/default.mk
2
3PLATFORM := UNKNOWN-PLATFORM
4EFI_NAME := UNKNOWN-EFI-NAME
5
6ifeq ($(DEB_HOST_ARCH),amd64)
7PLATFORM := x86_64-efi
8EFI_NAME := x64
9endif
10
11ifeq ($(DEB_HOST_ARCH),arm64)
12PLATFORM := arm64-efi
13EFI_NAME := aa64
14endif
15
1SIGNED := \16SIGNED := \
2 grubx64.efi.signed \17 grub$(EFI_NAME).efi.signed \
3 gcdx64.efi.signed \18 gcd$(EFI_NAME).efi.signed \
4 grubnetx64.efi.signed19 grubnet$(EFI_NAME).efi.signed
520
6all: $(SIGNED)21all: $(SIGNED)
722
@@ -9,9 +24,9 @@
9 ./download-grub224 ./download-grub2
1025
11install: $(SIGNED)26install: $(SIGNED)
12 install -d $(DESTDIR)/usr/lib/grub/x86_64-efi-signed27 install -d $(DESTDIR)/usr/lib/grub/$(PLATFORM)-signed
13 install -m0644 $(SIGNED) version \28 install -m0644 $(SIGNED) version \
14 $(DESTDIR)/usr/lib/grub/x86_64-efi-signed/29 $(DESTDIR)/usr/lib/grub/$(PLATFORM)-signed/
1530
16clean:31clean:
17 rm -f $(SIGNED) version32 rm -f $(SIGNED) version
1833
=== modified file 'debian/changelog'
--- debian/changelog 2015-07-06 18:24:53 +0000
+++ debian/changelog 2015-07-22 17:23:13 +0000
@@ -1,3 +1,10 @@
1grub2-signed (1.53) UNRELEASED; urgency=medium
2
3 * Add arm64 support. (LP: #1457178)
4 * Rebuild against grub-efi-amd64 2.02~beta2-26ubuntu4.
5
6 -- dann frazier <dannf@ubuntu.com> Wed, 22 Jul 2015 11:20:23 -0600
7
1grub2-signed (1.52) wily; urgency=medium8grub2-signed (1.52) wily; urgency=medium
29
3 * Rebuild against grub-efi-amd64 2.02~beta2-26ubuntu3.10 * Rebuild against grub-efi-amd64 2.02~beta2-26ubuntu3.
411
=== modified file 'debian/control'
--- debian/control 2015-07-06 18:24:53 +0000
+++ debian/control 2015-07-22 17:23:13 +0000
@@ -2,7 +2,7 @@
2Section: utils2Section: utils
3Priority: optional3Priority: optional
4Maintainer: Colin Watson <cjwatson@ubuntu.com>4Maintainer: Colin Watson <cjwatson@ubuntu.com>
5Build-Depends: debhelper (>= 9), lsb-release, python3, python3-apt, grub-efi-amd64-bin (>= 2.02~beta2-26ubuntu3)5Build-Depends: debhelper (>= 9), lsb-release, python3, python3-apt, grub-efi-amd64-bin (>= 2.02~beta2-26ubuntu4) [amd64], grub-efi-arm64-bin (>= 2.02~beta2-26ubuntu4) [arm64]
6Standards-Version: 3.9.56Standards-Version: 3.9.5
77
8Package: grub-efi-amd64-signed8Package: grub-efi-amd64-signed
@@ -22,3 +22,21 @@
22 .22 .
23 This package contains a version of GRUB built for use with the EFI-AMD6423 This package contains a version of GRUB built for use with the EFI-AMD64
24 architecture, signed with Canonical's UEFI signing key.24 architecture, signed with Canonical's UEFI signing key.
25
26Package: grub-efi-arm64-signed
27Architecture: arm64
28Depends: ${misc:Depends}, grub-efi-arm64 (= ${grub2:Version})
29Recommends: secureboot-db
30Built-Using: grub2 (= ${grub2:Version})
31Description: GRand Unified Bootloader, version 2 (EFI-ARM64 version, signed)
32 GRUB is a portable, powerful bootloader. This version of GRUB is based on a
33 cleaner design than its predecessors, and provides the following new features:
34 .
35 - Scripting in grub.cfg using BASH-like syntax.
36 - Support for modern partition maps such as GPT.
37 - Modular generation of grub.cfg via update-grub. Packages providing GRUB
38 add-ons can plug in their own script rules and trigger updates by invoking
39 update-grub.
40 .
41 This package contains a version of GRUB built for use with the EFI-ARM64
42 architecture, signed with Canonical's UEFI signing key.
2543
=== added symlink 'debian/grub-efi-amd64-signed.postinst'
=== target is u'postinst.common'
=== added symlink 'debian/grub-efi-arm64-signed.postinst'
=== target is u'postinst.common'
=== renamed file 'debian/grub-efi-amd64-signed.postinst' => 'debian/postinst.common'
=== modified file 'debian/rules'
--- debian/rules 2012-09-21 23:57:13 +0000
+++ debian/rules 2015-07-22 17:23:13 +0000
@@ -1,11 +1,12 @@
1#! /usr/bin/make -f1#! /usr/bin/make -f
22
3VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)3include /usr/share/dpkg/default.mk
44
5%:5%:
6 dh $@6 dh $@
77
8docdir := debian/grub-efi-amd64-signed/usr/share/doc/grub-efi-amd64-signed8destdir := debian/grub-efi-$(DEB_HOST_ARCH)-signed
9docdir := $(destdir)/usr/share/doc/grub-efi-$(DEB_HOST_ARCH)-signed
910
10override_dh_installchangelogs:11override_dh_installchangelogs:
11 dh_installchangelogs12 dh_installchangelogs
@@ -14,5 +15,8 @@
14 ln $(docdir)/changelog $(docdir)/changelog.Debian15 ln $(docdir)/changelog $(docdir)/changelog.Debian
1516
16override_dh_gencontrol:17override_dh_gencontrol:
17 dh_gencontrol -- -v$(VERSION)+$(shell cat version) \18 dh_gencontrol -- -v$(DEB_VERSION)+$(shell cat version) \
18 -Vgrub2:Version=$(shell cat version)19 -Vgrub2:Version=$(shell cat version)
20
21override_dh_auto_install:
22 dh_auto_install --destdir=$(destdir)
1923
=== modified file 'download-grub2'
--- download-grub2 2013-09-12 17:14:41 +0000
+++ download-grub2 2015-07-22 17:23:13 +0000
@@ -6,17 +6,24 @@
6from urllib.request import urlopen6from urllib.request import urlopen
77
8import apt8import apt
9import apt_pkg
910
11ARCH_TO_EFI_NAME = {
12 'amd64': 'x64',
13 'arm64': 'aa64',
14}
15arch = apt_pkg.config['Apt::Architecture']
16efi_name = ARCH_TO_EFI_NAME[arch]
10cache = apt.Cache()17cache = apt.Cache()
11grub_efi_amd64 = cache["grub-efi-amd64"].candidate18grub_efi = cache["grub-efi-%s" % (arch)].candidate
12pool_parsed = urlparse(grub_efi_amd64.uri)19pool_parsed = urlparse(grub_efi.uri)
13dists_dir = "/dists/%s/main/uefi/grub2-%s/current/" % (20dists_dir = "/dists/%s/main/uefi/grub2-%s/current/" % (
14 grub_efi_amd64.origins[0].archive, grub_efi_amd64.architecture)21 grub_efi.origins[0].archive, grub_efi.architecture)
1522
16for base in (23for base in (
17 "gcdx64.efi.signed",24 "gcd%s.efi.signed" % (efi_name),
18 "grubx64.efi.signed",25 "grub%s.efi.signed" % (efi_name),
19 "grubnetx64.efi.signed",26 "grubnet%s.efi.signed" % (efi_name),
20 "version",27 "version",
21 ):28 ):
22 dists_parsed = list(pool_parsed)29 dists_parsed = list(pool_parsed)

Subscribers

People subscribed via source and target branches

to all changes: