diff --git a/Makefile b/Makefile index 968a6b9..b7ea026 100644 --- a/Makefile +++ b/Makefile @@ -201,7 +201,7 @@ test.full: debian/Makefile rm -f test.full rm -f persistent.storage $(TEST_HARNESS) "make $(TEST_TARGET)" $(TEST_ARGS) \ - config_idlebust=1 config_timestamps=1 \ + config_idlebust=1 config_timestamps=1 config_nossh=1 \ $(TEST_EXTRA) \ tests/*.expect touch test.full diff --git a/tests/10install1.expect b/tests/10install1.expect index afec91a..df871da 100644 --- a/tests/10install1.expect +++ b/tests/10install1.expect @@ -10,6 +10,13 @@ if {[info exists config_idlebust]} { send "chmod a+x /zfs.d/79-idlebust.sh\r" } +# Something about TravisCI really doesnt like installing ssh. +# See the inchroot/31-fixup-ssh.sh file for more comments +if {[info exists config_nossh]} { + expect root@ramdisk {} timeout {bad 1 "shell prompt"} + send "chmod a-x /zfs.d/inchroot/31-fixup-ssh.sh\r" +} + expect root@ramdisk {} timeout {bad 1 "shell prompt"} send "/zfs.install --unattended" diff --git a/zfs-config/packages.d/_ALWAYS.customise.add/zfs.d/inchroot/31-fixup-ssh.sh b/zfs-config/packages.d/_ALWAYS.customise.add/zfs.d/inchroot/31-fixup-ssh.sh index 6bc2c95..ed992c8 100755 --- a/zfs-config/packages.d/_ALWAYS.customise.add/zfs.d/inchroot/31-fixup-ssh.sh +++ b/zfs-config/packages.d/_ALWAYS.customise.add/zfs.d/inchroot/31-fixup-ssh.sh @@ -6,5 +6,26 @@ # kind of bug with the installation of openssh-server when you are running # in a nested VM - specifically travisCI, but also tested with libvirt and # qemu and ubuntu 14.04 +# +# By separating it out, it can be turned off for testing in that environment apt install -y openssh-server + +# Additional details: +# +# Example log for a build exhibiting the error: +# https://travis-ci.com/symmetryinvestments/zfs-on-root-installer/builds/75470828 +# +# 00:54:54 Creating config file /etc/ssh/sshd_config with new version +# 00:54:58 Creating SSH2 RSA key; this may take some time ... +# 00:54:58 2048 SHA256:tAK/rUUwzWtXS13ICzr7aBDW6NADQ0U5ma0VRUdWHfQ root@ramdisk-566a832f (RSA) +# 00:54:58 Creating SSH2 ECDSA key; this may take some time ... +# 00:54:58 /etc/ssh/ssh_host_ecdsa_key.pub is not a public key file. +# 00:54:59 dpkg: error processing package openssh-server (--configure): +# 00:54:59 installed openssh-server package post-installation script subprocess returned error exit status 255 +# +# Earlier debugging builds that captured the contents of the ssh config files +# showed no syntax errors or other issues. +# +# The program that outputs the "not a public key file" message is simply +# reading in the generated .pub file.