From 59da9d87ca8ec232fbdd958fcada379f83c70e08 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Tue, 16 Aug 2016 14:04:03 +0200 Subject: [PATCH 1/5] Don't install packages linux-headers-*-hypriotos* Signed-off-by: Dieter Reuter --- builder/chroot-script.sh | 4 +--- .../spec/hypriotos-image/base/kernel_spec.rb | 11 ----------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/builder/chroot-script.sh b/builder/chroot-script.sh index 39ec75f..1475581 100644 --- a/builder/chroot-script.sh +++ b/builder/chroot-script.sh @@ -127,9 +127,7 @@ apt-get install -y \ "raspberrypi-bootloader=${KERNEL_BUILD}" \ "libraspberrypi0=${KERNEL_BUILD}" \ "libraspberrypi-dev=${KERNEL_BUILD}" \ - "libraspberrypi-bin=${KERNEL_BUILD}" \ - "linux-headers-${KERNEL_VERSION}-hypriotos-v7+" \ - "linux-headers-${KERNEL_VERSION}-hypriotos+" + "libraspberrypi-bin=${KERNEL_BUILD}" # add user pirate to group video (for using the Raspberry Pi camera) usermod -a -G video pirate 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 0d9fdcc..5c752ae 100644 --- a/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb @@ -53,21 +53,10 @@ it { should_not be_directory } end -# with installed kernel headers describe file('/lib/modules/4.4.15-hypriotos+/build') do it { should be_symlink } -# it { should be_linked_to '/usr/src/linux-headers-4.4.15-hypriotos+' } end describe file('/lib/modules/4.4.15-hypriotos-v7+/build') do it { should be_symlink } -# it { should be_linked_to '/usr/src/linux-headers-4.4.15-hypriotos-v7+' } -end - -describe file('/usr/src/linux-headers-4.4.15-hypriotos-v7+') do - it { should be_directory } -end - -describe file('/usr/src/linux-headers-4.4.15-hypriotos+') do - it { should be_directory } end From a825da6e6f4d20cd437b31101eb2579c240e4094 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Tue, 16 Aug 2016 21:53:33 +0200 Subject: [PATCH 2/5] Fix integration tests for /lib/modules/*hypriotos* Signed-off-by: Dieter Reuter --- .../spec/hypriotos-image/base/kernel_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 5c752ae..49a4fa7 100644 --- a/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb @@ -53,10 +53,10 @@ it { should_not be_directory } end -describe file('/lib/modules/4.4.15-hypriotos+/build') do - it { should be_symlink } +describe file('/lib/modules/4.4.15-hypriotos+/kernel') do + it { should be_directory } end -describe file('/lib/modules/4.4.15-hypriotos-v7+/build') do - it { should be_symlink } +describe file('/lib/modules/4.4.15-hypriotos-v7+/kernel') do + it { should be_directory } end From d4bac6158178f04a1c04a4dac548b0c7c1b2a0d2 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Tue, 16 Aug 2016 14:56:51 +0200 Subject: [PATCH 3/5] Print resulting sizes for boot/root files Signed-off-by: Dieter Reuter --- builder/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builder/build.sh b/builder/build.sh index 6fe2352..941ce1c 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -76,8 +76,11 @@ umount -l ${BUILD_PATH}/sys rm -rf ${BUILD_PATH}/{dev,sys,proc}/* tar -czf /image_with_kernel_boot.tar.gz -C ${BUILD_PATH}/boot . +du -sh ${BUILD_PATH}/boot rm -Rf ${BUILD_PATH}/boot tar -czf /image_with_kernel_root.tar.gz -C ${BUILD_PATH} . +du -sh ${BUILD_PATH} +ls -alh /image_with_kernel_*.tar.gz # download the ready-made raw image for the RPi if [ ! -f "${BUILD_RESULT_PATH}/${RAW_IMAGE}.zip" ]; then From 64efd8514bc4904667c17c95327971d0ebb2b514 Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Thu, 18 Aug 2016 18:55:19 +0200 Subject: [PATCH 4/5] Update tests for official Docker Engine 1.12.1-rc2 Signed-off-by: Dieter Reuter --- .../test-integration/spec/hypriotos-image/docker_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/test-integration/spec/hypriotos-image/docker_spec.rb b/builder/test-integration/spec/hypriotos-image/docker_spec.rb index 08aeb83..dc5337e 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 /1.12.1~rc1-0~jessie/ } + its(:stdout) { should match /1.12.1~rc2-0~jessie/ } its(:exit_status) { should eq 0 } end @@ -92,13 +92,13 @@ end describe command('docker -v') do - its(:stdout) { should match /Docker version 1.12.1-rc1, build/ } + its(:stdout) { should match /Docker version 1.12.1-rc2, build/ } its(:exit_status) { should eq 0 } end describe command('docker version') do - its(:stdout) { should match /Client:. Version: 1.12.1-rc1. API version: 1.24/m } - its(:stdout) { should match /Server:. Version: 1.12.1-rc1. API version: 1.24/m } + its(:stdout) { should match /Client:. Version: 1.12.1-rc2. API version: 1.24/m } + its(:stdout) { should match /Server:. Version: 1.12.1-rc2. API version: 1.24/m } its(:exit_status) { should eq 0 } end From d93e4c9100ecb6cf448ebf109f137136a4a8f10c Mon Sep 17 00:00:00 2001 From: Dieter Reuter Date: Thu, 18 Aug 2016 20:16:31 +0200 Subject: [PATCH 5/5] Fix tests for new systemd drop-in file Signed-off-by: Dieter Reuter --- .../test-integration/spec/hypriotos-image/docker_spec.rb | 8 +------- builder/test/image_spec.rb | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/builder/test-integration/spec/hypriotos-image/docker_spec.rb b/builder/test-integration/spec/hypriotos-image/docker_spec.rb index dc5337e..8028ae2 100644 --- a/builder/test-integration/spec/hypriotos-image/docker_spec.rb +++ b/builder/test-integration/spec/hypriotos-image/docker_spec.rb @@ -40,19 +40,13 @@ it { should be_owned_by 'root' } end -describe file('/lib/systemd/system/docker.service') do - it { should be_file } - it { should be_mode 644 } - it { should be_owned_by 'root' } -end - describe file('/lib/systemd/system/docker.socket') do it { should be_file } it { should be_mode 644 } it { should be_owned_by 'root' } end -describe file('/etc/systemd/system/docker.service') do +describe file('/etc/systemd/system/docker.service.d/overlay.conf') do it { should be_file } it { should be_mode 644 } it { should be_owned_by 'root' } diff --git a/builder/test/image_spec.rb b/builder/test/image_spec.rb index 53d6a44..dbe448b 100644 --- a/builder/test/image_spec.rb +++ b/builder/test/image_spec.rb @@ -44,7 +44,7 @@ end context "Docker service file" do - let(:stdout) { run_mounted("cat /etc/systemd/system/docker.service").stdout } + let(:stdout) { run_mounted("cat /etc/systemd/system/docker.service.d/overlay.conf").stdout } it "Daemon uses overlay storage driver" do expect(stdout).to contain("--storage-driver overlay")