Merge lp:~sergiusens/goget-ubuntu-touch/installYaml into lp:goget-ubuntu-touch
| Status: | Merged |
|---|---|
| Approved by: | Sergio Schvezov on 2015-06-17 |
| Approved revision: | 191 |
| Merged at revision: | 184 |
| Proposed branch: | lp:~sergiusens/goget-ubuntu-touch/installYaml |
| Merge into: | lp:goget-ubuntu-touch |
| Prerequisite: | lp:~sergiusens/goget-ubuntu-touch/beBetter |
| Diff against target: |
111 lines (+59/-2) 3 files modified
dependencies.tsv (+1/-1) diskimage/common.go (+1/-0) ubuntu-device-flash/core.go (+57/-1) |
| To merge this branch: | bzr merge lp:~sergiusens/goget-ubuntu-touch/installYaml |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Sergio Schvezov | Approve on 2015-06-17 | ||
| John Lenton | Approve on 2015-06-16 | ||
| Michael Vogt | 2015-06-12 | Approve on 2015-06-12 | |
| Snappy Developers | continuous-integration | 2015-06-12 | Pending |
|
Review via email:
|
|||
This proposal supersedes a proposal from 2015-04-14.
Commit Message
Stamp a yaml with install/setup information
Description of the Change
* Record sideloads to ensure "snappy update" doesn't try to upgrade a system that uses custom
assets.
Creates a stamp file on the writable partition when --device-part= is specified. This is clearly trivial to defeat, but will allow snappy to refuse to update a system with such a stamp file.
There is a potential gotcha with this approach (albeit unlikely for anyone to hit it): if u-d-f is used to first download the set of s-i tar files and then u-d-f is called again with --device-part= pointing to the valid, official device part just downloaded, the stamp will still be created.
| James Hunt (jamesodhunt) wrote : | # |
The snappy part of this work is on MP: https:/
| Sergio Schvezov (sergiusens) wrote : | # |
As I said on irc, this looks great; I would change:
- writeLocation to a factory reset safe location
- maybe instead of storing sideLoaded and do if sideLoaded you can just if coreCmd.
- remove the changelog change, I will draft a proper one when this is released into the archive.
| James Hunt (jamesodhunt) wrote : | # |
Thanks for the comments. Branch updated.
| Sergio Schvezov (sergiusens) wrote : | # |
This looks really good, I liked the yaml idea you proposed on irc; and discussed it a bit with mvo and he was in favor of it too.
Just make it /boot/provision
Regarding the layout, I'd just keep these:
meta:
timestamp: 1429185020
initial-
system-
provisioning-tool:
name: ubuntu-device-flash
path: /usr/bin/
version: 0.20snappy3-
installation-
size: 3
size-unit: GB
output: /tmp/bbb.img
channel: ubuntu-
device-part: /some/path/file.tgz
developer-mode: true
Since platform and architecture are already in the oem snap, so it would be duplicate information (oem snaps will become mandatory).
Can't wait to see this make it in!
Oh, there's one minor inline comment.
| James Hunt (jamesodhunt) wrote : | # |
This branch + lp:~jamesodhunt/snappy/install.yaml are what I have so far.
Any thoughts on how we set Version sensibly in writeInstallYaml()? We have the same problem in snappy.
| James Hunt (jamesodhunt) wrote : | # |
The other slight wart is the "GB" in writeInstallYaml().
| James Hunt (jamesodhunt) wrote : | # |
lp:~jamesodhunt/snappy/install.yaml is now essentially complete.
| Sergio Schvezov (sergiusens) wrote : | # |
looks good, we just need to adjust some knobs here and there.
| James Hunt (jamesodhunt) wrote : | # |
Thanks for reviewing. Branch updated.
| James Hunt (jamesodhunt) wrote : | # |
It tested fine, but it looks like a snappy change earlier today has broken 'udf ... --oem file.snap':
_______
$ sudo ubuntu-device-flash --verbose core --size 3 --channel devel-proposed --developer-mode --output=amd64.img --device-part device-
Determining oem configuration
2015-04-21 16:46:57 ERROR snappy logger.go:199 ./generic-
./generic-
_______
| James Hunt (jamesodhunt) wrote : | # |
This branch could be the offending one?
https:/
| James Hunt (jamesodhunt) wrote : | # |
Or is it that udf just needs this branch merging?
https:/
| Sergio Schvezov (sergiusens) wrote : | # |
> Or is it that udf just needs this branch merging?
>
> https:/
> touch/oemFlag/
yes, that is blocked in the pipeline from an MP by steve
| Sergio Schvezov (sergiusens) wrote : | # |
> > Or is it that udf just needs this branch merging?
> >
> > https:/
> > touch/oemFlag/
>
> yes, that is blocked in the pipeline from an MP by steve
Rebased and landed
| James Hunt (jamesodhunt) wrote : | # |
Re-tested:
= amd64 =
$ sudo ubuntu-device-flash --verbose core --size 3 --channel edge --output=amd64.img --device-part device-
0_all.snap 15.04
Determining oem configuration
Fetching information from server...
Downloading and setting up...
Using a custom device tarball
Searching for hardware.yaml in device part
Download finished for /home/james/
Partitioning...
Download finished for /home/james/
Download finished for /home/james/
Mapping...
Formatting...
Mapping...
Mounting...
Provisioning...
Installing ./generic-
Unmounting...
Unmapping...
New image complete
Summary:
Output: amd64.img
Architecture: amd64
Channel: edge
Version: 26
Launch by running: kvm -m 768 amd64.img
$ sudo kpartx -avs amd64.img
$ sudo mount /dev/mapper/loop0p2 /mnt
$ cat /mnt/install.yaml
meta:
timestamp: 2015-04-
initial-version: "26"
system-
tool:
name: ubuntu-device-flash
path: /usr/bin/
version: ""
options:
size: 3
size-unit: GB
output: amd64.img
channel: edge
device-part: device-
oem: ./generic-
= armhf =
$ sudo ubuntu-device-flash --verbose core --size 3 --channel edge --output=armhf.img --device-part device-
Determining oem configuration
Fetching information from server...
WARNING: this option should only be used to build azure images
Downloading and setting up...
Using a custom device tarball
Searching for hardware.yaml in device part
Download finished for /home/james/
Download finished for /home/james/
Download finished for /home/james/
Partitioning...
Mapping...
Formatting...
Mapping...
Mounting...
Provisioning...
Installing ./beagleblack.
Replicating system-a into system-b
Unmounting...
Unmapping...
New image complete
Summary:
Output: armhf.img
Architecture: armhf
Channel: edge
Version: 22
$ sudo kpartx -avs armhf.img
$ sudo mount /dev/mapper/loop0p2 /mnt
$ cat /mnt/install.yaml
meta:
timestamp: 2015-04-
initial-version: "22"
system-
tool:
name: ubuntu-device-flash
path: /usr/bin/
version: ""
options:
size: 3
size-unit: GB
output: armhf.img
channel: edge
device-part: device-
| James Hunt (jamesodhunt) wrote : | # |
Grr, of course although this "works" for grub, it won't work on a running system where it will have to live in /boot/grub/.
| Sergio Schvezov (sergiusens) wrote : | # |
> Grr, of course although this "works" for grub, it won't work on a running
> system where it will have to live in /boot/grub/.
Right, but actually wrong, this is what I mentioned wrt can't find it on a running system, it's actually under /boot/efi/
| James Hunt (jamesodhunt) wrote : | # |
Branch updated.
| Sergio Schvezov (sergiusens) wrote : | # |
For this to land an updated lp:snappy needs to make it to wily
| Snappy Tarmac (snappydevtarmac) wrote : | # |
The attempt to merge lp:~sergiusens/goget-ubuntu-touch/installYaml into lp:goget-ubuntu-touch failed. Below is the output from the failed tests.
Checking formatting
Formatting wrong in following files
ubuntu-
# we always run in a fresh dir in tarmac
export GOPATH=$(mktemp -d)
trap 'rm -rf "$GOPATH"' EXIT
# this is a hack, but not sure tarmac is golang friendly
mkdir -p $GOPATH/
cp -a . $GOPATH/
cd $GOPATH/
./run-checks
| Snappy Tarmac (snappydevtarmac) wrote : | # |
The attempt to merge lp:~sergiusens/goget-ubuntu-touch/installYaml into lp:goget-ubuntu-touch failed. Below is the output from the failed tests.
Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.
update github.
github.
update github.
github.
update github.
github.
update gopkg.in/yaml.v2 failed; trying to fetch newer version
github.
update launchpad.
gopkg.in/yaml.v2 now at 49c95bdc2184325
update launchpad.
launchpad.
launchpad.
Building
# we always run in a fresh dir in tarmac
export GOPATH=$(mktemp -d)
trap 'rm -rf "$GOPATH"' EXIT
# this is a hack, but not sure tarmac is golang friendly
mkdir -p $GOPATH/
cp -a . $GOPATH/
cd $GOPATH/
./run-checks
ubuntu-
/usr/lib/
/home/
- 191. By Sergio Schvezov on 2015-06-17
-
godeps godeps godeps...

FAILED: Continuous integration, rev:160 /code.launchpad .net/~jamesodhu nt/goget- ubuntu- touch/record- sideload/ +merge/ 256190/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http:// jenkins. qa.ubuntu. com/job/ goget-ubuntu- touch-ci/ 171/ jenkins. qa.ubuntu. com/job/ goget-ubuntu- touch-vivid- amd64-ci/ 84/console jenkins. qa.ubuntu. com/job/ goget-ubuntu- touch-vivid- armhf-ci/ 84/console jenkins. qa.ubuntu. com/job/ goget-ubuntu- touch-vivid- i386-ci/ 84/console
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/goget- ubuntu- touch-ci/ 171/rebuild
http://