Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #128 from hypriot/no-linux-headers
Browse files Browse the repository at this point in the history
Don't install linux-headers to save disk space
  • Loading branch information
DieterReuter committed Aug 18, 2016
2 parents 297e1c4 + d93e4c9 commit bc70b4e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
3 changes: 3 additions & 0 deletions builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions builder/chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 2 additions & 13 deletions builder/test-integration/spec/hypriotos-image/base/kernel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
describe file('/lib/modules/4.4.15-hypriotos+/kernel') do
it { should be_directory }
end

describe file('/usr/src/linux-headers-4.4.15-hypriotos+') do
describe file('/lib/modules/4.4.15-hypriotos-v7+/kernel') do
it { should be_directory }
end
16 changes: 5 additions & 11 deletions builder/test-integration/spec/hypriotos-image/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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' }
Expand Down Expand Up @@ -92,13 +86,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

Expand Down
2 changes: 1 addition & 1 deletion builder/test/image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit bc70b4e

Please sign in to comment.