Commit Graph

59 Commits

Author SHA1 Message Date
Olaf Meeuwissen 651ed7d1d5 Work around a documented bug in Devuan jessie's debootstrap
See http://bugs.devuan.org//cgi/bugreport.cgi?bug=115
2017-08-26 22:29:11 +09:00
Olaf Meeuwissen 5bec9fec32 Fix oversight in 11e0bd83 2017-08-26 21:40:59 +09:00
Olaf Meeuwissen 11e0bd83d4 Build based on symbolic suite name
This allows for tagging on that as well.  The alias is gotten from the
/etc/devuan_version file.  Only stable is tagged as "latest" so people
get something that ought to work by default.
2017-08-26 21:18:09 +09:00
Olaf Meeuwissen 813cb4e823 Put root file system value in a variable
It is passed to bootstrap.sh to allow for defining it in a *single*
location.
2017-08-26 20:58:10 +09:00
Olaf Meeuwissen 852c04930d Pass suite as a command-line argument for builds and derived images
This sets the stage for building multiple suites.  Note that migration
from Debian is not expected to work for multiple Devuan suites.
2017-08-19 18:02:33 +09:00
Olaf Meeuwissen 6a1214b6fc Parameterize build on Devuan suite name 2017-08-19 17:53:59 +09:00
Olaf Meeuwissen 28f6fb574c Fixup oversight in 08aba0ed 2017-08-19 15:52:01 +09:00
Olaf Meeuwissen e3741f20dd Use a more capable tar implementation
The GitLab CI build environment provides a BusyBox version.
2017-08-19 15:26:25 +09:00
Olaf Meeuwissen 01d9130021 Use here documents in a consistent manner 2017-08-19 15:09:08 +09:00
Olaf Meeuwissen 492d0851bb Add a default CMD to the base image 2017-08-19 15:08:04 +09:00
Olaf Meeuwissen 08aba0edee Fix derived image name to point to project's registry 2017-08-19 14:47:11 +09:00
Olaf Meeuwissen c3b30f9c13 Refactored CI setup and image naming 2017-08-19 14:27:34 +09:00
Olaf Meeuwissen a644fe7a94 Silence error during purge of unneeded packages 2017-08-19 14:27:34 +09:00
Olaf Meeuwissen d92fe56e7b Remove unneeded files from the image
Keeping out the `/dev/` tree is done when tarring things up so that
the `bootstrap.sh` script will have access to devices at run-time.
This approach also protects against removing devices that have been
mounted into the chroot, if any (e.g. devpts).
2017-08-19 14:27:34 +09:00
Olaf Meeuwissen e4bd65c005 Set a generic yet descriptive hostname
The default is to inherit the hostname from the build environment.
2017-08-19 14:27:34 +09:00
Olaf Meeuwissen 489dd2ab2d Provide a bit of feedback running customization scripts 2017-08-18 22:55:46 +09:00
Olaf Meeuwissen bbf24ada3b Replace /etc/resolv.conf content with something generic 2017-08-18 22:55:46 +09:00
Olaf Meeuwissen ad5af964fc Don't run init scripts from installation scripts 2017-08-18 22:55:46 +09:00
Olaf Meeuwissen 6dabc61089 Remove automatically installed packages whenever possible
This marks all packages installed by `debootstrap` as automatic and
sets up policy for pruning purposes before purging unneeded ones.
The devuan-keyring is explicitly kept.
2017-08-18 22:55:16 +09:00
Olaf Meeuwissen 18399c5561 Speed up package installation (especially on spinning disks) 2017-08-18 12:23:36 +09:00
Olaf Meeuwissen b636a469a2 Keep package index files small
This is mostly for those cases where Dockerfile RUN instructions do
not run `remove-apt-lists`, either by accident or on purpose.
2017-08-18 12:20:31 +09:00
Olaf Meeuwissen fa237f67eb Don't bother downloading translated package descriptions
This might speed up `apt-get update` depending on environment settings
and availability of translations.
2017-08-18 12:17:18 +09:00
Olaf Meeuwissen a4b4617915 Keep git repository out of the Docker context
See also 0c7e997c.
2017-08-18 11:50:27 +09:00
Olaf Meeuwissen 7612f621a3 Install build-essentials non-interactively 2017-08-18 11:47:47 +09:00
Olaf Meeuwissen d3530e7ea9 Fix permissions to match installed state 2017-08-18 10:54:25 +09:00
Olaf Meeuwissen 6d91ffcfb4 Silence warning if no /etc/apt/sources.list.d/* files exist 2017-08-17 20:32:23 +09:00
Olaf Meeuwissen ebe82f281e Remove package index files in all Dockerfiles consistently 2017-08-17 17:19:10 +09:00
Olaf Meeuwissen 5814d5ec82 Fix ownership issues of custom scripts 2017-08-17 17:13:35 +09:00
Olaf Meeuwissen 6595d68dd1 Fix overly zealous removal of APT state and cache files
Removal of the package index files, aka lists, is something that needs
to be done explicitly.  Doing so at `APT::Update::Post-Invoke` defeats
the purpose of running `apt-get update` in the first place.
2017-08-17 17:11:06 +09:00
Olaf Meeuwissen 280e7f4f56 Remove shell option not supported by CI build environment 2017-08-17 13:08:51 +09:00
Olaf Meeuwissen efe79ec5dd Drop non-portable shell option 2017-08-17 13:02:51 +09:00
Olaf Meeuwissen 74790bb4fc Add a verbatim copy of the full license text 2017-08-17 12:34:58 +09:00
Olaf Meeuwissen 0c7e997c1e Keep Docker contexts small 2017-08-17 12:30:38 +09:00
Olaf Meeuwissen 58d348885b Migrate build steps to shell scripts
This should make it a bit easier to test in a development setup.  It
may also simplify the scripting a little.
2017-08-17 12:30:11 +09:00
Olaf Meeuwissen 322f6c275e Decouple rootfs value from docker command-line invocation 2017-08-17 11:58:20 +09:00
Olaf Meeuwissen f6a4a08b69 Make bootstrap script more strict
It now exits on the first error and requires variables to be set.
2017-08-17 11:52:29 +09:00
Olaf Meeuwissen 910f6976dc Tweak debootstrap options
This forces signature checking of Release files and prevents symlinks
for `/{bin,sbin,lib}` to `/usr`.
2017-08-17 11:49:13 +09:00
Olaf Meeuwissen 0fa8b8505b Keep "flab" out of the image
This integrates a custom script into the APT configuration.  That same
script is also run during the bootstrap.  A second custom script takes
care of the integration and removes itself when done.

Complements 13f84159.
2017-08-17 11:36:04 +09:00
Olaf Meeuwissen 5aa1da98dd Use the correct variable to refer to the image version 2017-08-17 07:32:48 +09:00
Olaf Meeuwissen c61d8f3184 Push the base image required by the buildd derivative 2017-08-17 00:08:20 +09:00
Olaf Meeuwissen 8903f5de2f Fix base image name to refer to the right registry 2017-08-16 22:16:17 +09:00
Olaf Meeuwissen 4a04a4721a Add missing argument 2017-08-12 22:28:19 +09:00
Olaf Meeuwissen 644284f5cb Fix another typo :-( 2017-08-12 22:18:32 +09:00
Olaf Meeuwissen 18c95e1075 Fix typo 2017-08-12 22:07:47 +09:00
Olaf Meeuwissen 373ae74696 Add support for buildd derived images 2017-08-12 21:31:48 +09:00
Olaf Meeuwissen 13f84159bd Trim some very trivial "flab" 2017-08-11 00:24:11 +09:00
Olaf Meeuwissen 95525806d2 Sync documentation with current state of affairs
[ci skip]
2017-08-09 21:52:26 +09:00
Olaf Meeuwissen 6c44a604b1 Fix build failure
The CI_REGISTRY_IMAGE variable should not be eval'd.  In addition, it
seems safer to run the pipe in a subshell to avoid issues with the &&
chaining.
2017-08-09 21:38:32 +09:00
Olaf Meeuwissen e5dad3d29c Add a build phase to roll a "pristine" Devuan base image
This runs `debootstrap` in the devuan/migrated image.
2017-08-09 21:25:43 +09:00
Olaf Meeuwissen 052b61e1ed Add a script to debootstrap Devuan 2017-08-09 21:25:20 +09:00