The builds were reproducible provided they were done on the same day.
However if they were done on different days they had different dates
in /etc/shadow and so changed. This meant that the images were
updated every day, and sometimes the reproducibility check would
fail if the day ticked over between the builds.
Tweak the tests so that they use default-mysql-server
on newer dists as it replaced the mysql-server package.
Also add explicit import of the buster signing key
as the Travis agent doesn't have it available.
Thanks to Filippo Giunchedi (@filippog) for the initial
work on this.
It's an essential package designed for exactly this.
It's pretty small, so not a huge cost to putting it back in.
The problem is pervasive enough, and it's unlikely that
users will know how to fix it, that it's worth us solving
it in the base image.
We were using a bashism in install_packages, but it was
a `/bin/sh` script. This meant there was a syntax error, but
it didn't kill the script so it would loop forever.
Add a test for the install_packages loop by installing something
that doesn't exist. This will trigger the loop, and should hit
the maximum loop count and error out. If it doesn't then the timeout
command will kill it and the test will fail. Using a timeout
isn't ideal, but better than looping forever.
Also clean up the test script a little bit and print a description
of each test before running it.
sysv-rc and util-linux are used in the postinst scripts
of some packages, and so those packages won't install
if they aren't available.
sysv-rc contains update-rc.d, so any package that installs
a service would fail to install. Those packages are common
to install in to containers.
util-linux contains the getopt command which some scripts
expect to find.