Merge ~gary-wzl77/snappy-hwe-snaps/+git/pc-amd64-gadget-cpc:resolve_grub_conflict into ~snappy-hwe-team/snappy-hwe-snaps/+git/pc-amd64-gadget-cpc:master

Proposed by Gary.Wang on 2017-10-31
Status: Merged
Approved by: Alfonso Sanchez-Beato on 2017-11-17
Approved revision: 3c07dc48c0508d4ebb2f61d7b384f0ebc4ad3a2f
Merged at revision: 7ed2971e80456af91fca871f417ffb6c81a26ce3
Proposed branch: ~gary-wzl77/snappy-hwe-snaps/+git/pc-amd64-gadget-cpc:resolve_grub_conflict
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/pc-amd64-gadget-cpc:master
Diff against target: 52 lines (+15/-9)
2 files modified
Makefile (+4/-4)
snapcraft.yaml (+11/-5)
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato continuous-integration Approve on 2017-11-17
System Enablement Bot continuous-integration 2017-10-31 Needs Fixing on 2017-10-31
Review via email: mp+333018@code.launchpad.net

Commit message

Merge https://github.com/sil2100/pc-amd64-gadget

We need these minor changes from sil2100 to avoid grub required packages conflicts on some distros. I hit the package conflicts problem when I was trying to verify the classic image creation on zesty. See here: http://paste.ubuntu.com/25856488/

Description of the change

Merge https://github.com/sil2100/pc-amd64-gadget

We need these minor changes from sil2100 to avoid grub required packages conflicts on some distros. I hit the package conflicts problem when I was trying to verify the classic image creation on zesty. See here: http://paste.ubuntu.com/25856488/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 3816068..050210c 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -53,16 +53,16 @@ GRUB_MODULES = \
6 video
7
8 all:
9- dd if=/usr/lib/grub/i386-pc/boot.img of=pc-boot.img bs=440 count=1
10+ dd if=$(SNAPCRAFT_STAGE)/usr/lib/grub/i386-pc/boot.img of=pc-boot.img bs=440 count=1
11 /bin/echo -n -e '\x90\x90' | dd of=pc-boot.img seek=102 bs=1 conv=notrunc
12- grub-mkimage -O i386-pc -o pc-core.img -p '(,gpt2)/EFI/ubuntu' $(GRUB_MODULES)
13+ grub-mkimage -d $(SNAPCRAFT_STAGE)/usr/lib/grub/i386-pc/ -O i386-pc -o pc-core.img -p '(,gpt2)/EFI/ubuntu' $(GRUB_MODULES)
14 # The first sector of the core image requires an absolute pointer to the
15 # second sector of the image. Since this is always hard-coded, it means our
16 # BIOS boot partition must be defined with an absolute offset. The
17 # particular value here is 2049, or 0x01 0x08 0x00 0x00 in little-endian.
18 /bin/echo -n -e '\x01\x08\x00\x00' | dd of=pc-core.img seek=500 bs=1 conv=notrunc
19- cp /usr/lib/shim/shimx64.efi.signed shim.efi.signed
20- cp /usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed grubx64.efi
21+ cp $(SNAPCRAFT_STAGE)/usr/lib/shim/shimx64.efi.signed shim.efi.signed
22+ cp $(SNAPCRAFT_STAGE)/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed grubx64.efi
23
24
25 install:
26diff --git a/snapcraft.yaml b/snapcraft.yaml
27index 75d3b3a..bea8d36 100644
28--- a/snapcraft.yaml
29+++ b/snapcraft.yaml
30@@ -9,11 +9,17 @@ confinement: strict
31 icon: icon.png
32
33 parts:
34- grub:
35- source: .
36- plugin: make
37- build-packages:
38+ grub-prepare:
39+ plugin: nil
40+ stage-packages:
41 - grub-efi-amd64-signed
42 - grub-pc-bin
43 - shim-signed
44-
45+ prime: [ -* ]
46+ grub:
47+ source: .
48+ build-packages:
49+ - grub-common
50+ plugin: make
51+ after: [grub-prepare]
52+

Subscribers

People subscribed via source and target branches

to all changes: