From 9a569e64db1d9683beb10aa03e512f1dbdeadff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Pr=C3=BC=C3=9Fmann?= Date: Fri, 10 Mar 2017 12:19:10 +0100 Subject: [PATCH] Finalize update of Odroid C1 build (#30) * Removed apparmor and lxc packages for now. * Added device-init, fake-hwclock * Updated integration tests. * Removed non-maintenance message --- README.md | 2 -- builder/chroot-script.sh | 21 +++++++++---------- builder/files/boot/device-init.yaml | 9 ++++++++ .../hypriotos-docker/docker-swarm_spec.rb | 4 ++-- .../spec/hypriotos-image/base/kernel_spec.rb | 2 +- .../hypriotos-image/base/packages_spec.rb | 5 ++++- .../spec/hypriotos-image/docker_spec.rb | 6 +++--- .../spec/hypriotos-image/hypriot-list_spec.rb | 5 ++--- versions.config | 2 +- 9 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 builder/files/boot/device-init.yaml diff --git a/README.md b/README.md index 23dffe4..2f13d88 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ [![Join the chat at https://gitter.im/hypriot/talk](https://badges.gitter.im/hypriot/talk.svg)](https://gitter.im/hypriot/talk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/hypriot/image-builder-odroid-c1.svg)](https://travis-ci.org/hypriot/image-builder-odroid-c1) -**PLEASE NOTE: This repo is currently not maintained.** - This repo builds the SD card image with HypriotOS for the ODROID C1 board. To build this SD card image we have to * take the files for the root filesystem from [`os-rootfs`](https://github.com/hypriot/os-rootfs) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 259e794..ce9a651 100755 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -13,7 +13,7 @@ echo "deb http://deb.odroid.in/c1/ xenial main" > /etc/apt/sources.list.d/odroid # set up Hypriot Schatzkiste repository wget -q https://packagecloud.io/gpg.key -O - | apt-key add - -echo 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ wheezy main' > /etc/apt/sources.list.d/hypriot.list +echo 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main' > /etc/apt/sources.list.d/hypriot.list # Set up docker repository apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2C52609D @@ -22,26 +22,25 @@ echo 'deb [arch=armhf] https://apt.dockerproject.org/repo debian-jessie main' > # update all apt repository lists export DEBIAN_FRONTEND=noninteractive apt-get update +apt-get upgrade -y # ---install Docker tools--- apt-get install -y \ - lxc \ - aufs-tools \ + fake-hwclock \ + device-init="${DEVICE_INIT_VERSION}" \ cgroupfs-mount \ cgroup-bin \ - apparmor \ libltdl7 \ - "docker-engine=${DOCKER_ENGINE_VERSION}" \ - "docker-compose=${DOCKER_COMPOSE_VERSION}" \ - "docker-machine=${DOCKER_MACHINE_VERSION}" \ - --no-install-recommends + docker-engine="${DOCKER_ENGINE_VERSION}" \ + docker-compose="${DOCKER_COMPOSE_VERSION}" \ + docker-machine="${DOCKER_MACHINE_VERSION}" # install ODROID kernel touch /boot/uImage apt-get install -y \ - "u-boot-tools" \ - "initramfs-tools" \ - "linux-image-c1=${KERNEL_VERSION}" + u-boot-tools \ + initramfs-tools \ + linux-image-c1="${KERNEL_VERSION}" # cleanup APT cache and lists apt-get clean diff --git a/builder/files/boot/device-init.yaml b/builder/files/boot/device-init.yaml new file mode 100644 index 0000000..8a1dc97 --- /dev/null +++ b/builder/files/boot/device-init.yaml @@ -0,0 +1,9 @@ +# hostname for your HypriotOS device +hostname: black-pearl + +# optional wireless network settings +wifi: + interfaces: +# wlan0: +# ssid: "MyNetwork" +# password: "secret_password" diff --git a/builder/test-integration/spec/hypriotos-docker/docker-swarm_spec.rb b/builder/test-integration/spec/hypriotos-docker/docker-swarm_spec.rb index 029fc7d..f1d8db1 100644 --- a/builder/test-integration/spec/hypriotos-docker/docker-swarm_spec.rb +++ b/builder/test-integration/spec/hypriotos-docker/docker-swarm_spec.rb @@ -5,11 +5,11 @@ end describe command('docker run --rm -t hypriot/rpi-swarm --version') do - its(:stdout) { should match /swarm version 1.1.0 \(HEAD\)/ } + its(:stdout) { should match /swarm version 1.2.3 \(HEAD\)/ } its(:exit_status) { should eq 0 } end describe command('docker images hypriot/rpi-swarm') do - its(:stdout) { should match /hypriot\/rpi-swarm .*latest .*5eab982fa301 / } + its(:stdout) { should match /hypriot\/rpi-swarm .*latest .*3af9594249f2 / } its(:exit_status) { should eq 0 } end diff --git a/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb b/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb index 5daa4d1..fe60d9e 100644 --- a/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' describe command('uname -r') do - its(:stdout) { should match /3.10.80-142/ } + its(:stdout) { should match /3.10.104-185/ } its(:exit_status) { should eq 0 } end diff --git a/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb b/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb index 384c0a8..6b8c803 100644 --- a/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/packages_spec.rb @@ -56,7 +56,10 @@ end # additional application packages -describe package('docker-hypriot') do +describe package('device-init') do + it { should be_installed } +end +describe package('docker-engine') do it { should be_installed } end describe package('docker-compose') do diff --git a/builder/test-integration/spec/hypriotos-image/docker_spec.rb b/builder/test-integration/spec/hypriotos-image/docker_spec.rb index e3bfb55..c605e08 100644 --- a/builder/test-integration/spec/hypriotos-image/docker_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/docker_spec.rb @@ -6,7 +6,7 @@ describe command('dpkg -l docker-engine') do its(:stdout) { should match /ii docker-engine/ } - its(:stdout) { should match /17.03.0~ce-0~raspbian-jessie/ } + its(:stdout) { should match /17.03.0~ce-0~debian-jessie/ } its(:exit_status) { should eq 0 } end @@ -65,7 +65,7 @@ it { should be_owned_by 'root' } end -describe file('/var/lib/docker/overlay2') do +describe file('/var/lib/docker/aufs') do it { should be_directory } it { should be_mode 700 } it { should be_owned_by 'root' } @@ -90,7 +90,7 @@ end describe command('docker info') do - its(:stdout) { should match /Storage Driver: overlay/ } + its(:stdout) { should match /Storage Driver: aufs/ } its(:exit_status) { should eq 0 } end diff --git a/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb b/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb index b8af0a7..d78b3d3 100644 --- a/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/hypriot-list_spec.rb @@ -8,13 +8,12 @@ it { should be_file } it { should be_mode 644 } it { should be_owned_by 'root' } - it { should contain 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ wheezy main' } + it { should contain 'deb https://packagecloud.io/Hypriot/Schatzkiste/debian/ jessie main' } end describe file('/etc/apt/sources.list.d/odroid.list') do it { should be_file } it { should be_mode 644 } it { should be_owned_by 'root' } - it { should contain 'deb http://deb.odroid.in/c1/ trusty main' } - it { should contain 'deb http://deb.odroid.in/ trusty main' } + it { should contain 'deb http://deb.odroid.in/c1/ xenial main' } end diff --git a/versions.config b/versions.config index 8dab0fe..928e4ae 100644 --- a/versions.config +++ b/versions.config @@ -12,4 +12,4 @@ export KERNEL_VERSION="185-1" export DOCKER_ENGINE_VERSION="17.03.0~ce-0~debian-jessie" export DOCKER_COMPOSE_VERSION="1.9.0-23" export DOCKER_MACHINE_VERSION="0.9.0-39" -export DEVICE_INIT_VERSION="0.1.8" +export DEVICE_INIT_VERSION="0.1.9"