dpb
July 13, 2017, 9:36pm
1
Hi, I have an MP I’m wanting to test:
https://github.com/snapcore/core-build/pull/15
How would I go about testing that in an image build that I can boot? Right now I’m following a process like this:
snap install ubuntu-image --edge --classic
snap known --remote model series=16 brand-id=canonical model=pc-amd64 > pc-amd64.model
ubuntu-image -d -c edge -o test.img pc-amd64.model
# Remove seed from test.img...
qemu-img convert -p -f raw -O qcow2 test.img test.qcow2
# Lauch the .qcow2 with qemu and test.
Thanks in advance!
Hey @dpb , thanks a lot for your contribution! I think you need to build the core snap first from your branch, then create an image using something like:
sudo /snap/bin/ubuntu-image --extra-snaps <your_core_snap_path> --image-size 3G -c edge -O . pc-amd64.model
and then boot it with something like:
kvm -snapshot -smp 2 -m 1500 -redir tcp:8022::22 -nographic -serial mon:stdio ./pc.img
In order to build the core snap you can use a chroot or a vm, sudo snapcraft for your branch should be enough, @ogra can probably give more details
Let me know if this works for you, thanks
dpb
July 14, 2017, 6:03pm
3
Thanks @fgimenez – how do I go about actually building the core snap? Are there public docs somwhere for that?
The core snap is built from https://github.com/snapcore/core , in order to put your changes in place AFAIK you should build the debs from https://github.com/raharper/core-build/tree/change-dsident-maybe-mode in a ppa and then add that ppa with high priority to https://github.com/snapcore/core/blob/master/Makefile#L3 , if it is called myppa
something like:
ENV := PROJECT=ubuntu-core SUBPROJECT=system-image EXTRA_PPAS='snappy-dev/image snappy-dev/edge myppa:1000' IMAGEFORMAT=plain SUITE=$(RELEASE) ARCH=$(DPKG_ARCH)
About documentation, I know we have https://github.com/snapcore/core/blob/master/README.md , not sure if there’s anything else, maybe @ogra can help.
Cheers,
ogra
July 17, 2017, 11:38am
5
I have just prepared a PR to improve this documentation a bit to make it a little clearer, here is the resulting README.md