The stage4 target, specifically the STAGE4_TARBALL target now depends on
the portage/ directory, the appliances/<appliance>/ directory and the
stage3 tarball. It will not be rebuild if these are up-to-date. Therefore
other targets that depend on stage4 (e.g. RAW_IMAGE) won't force stage4 to
be rebuilt if it is up to date.
If you want to force a stage4 rebuild, for example if the appliance pulls
from a live VCS, then the recommended way to do this is:
$ touch appliances/<appliance>
$ make APPLIANCE=<appliance> stage4
Instead of "image" so that if the raw image is built and up-to-date then it
need not be rebuilt to satisfy the other image targets. This excludes the
stage4 "image" which of course is necessary to build the $(RAW_IMAGE)
target.
The raw image making was kind of split up, with different targets to create
the image, partition, copy files, install grub, etc. This change makes it
all one target. After "make image" is done, or, e.g., "make images/base.img"
then the resulting file will be built and contain all the necessary files.
This make the $(RAW_IMAGE) target more uniform with the other image/
targets. It will also make the other image/ targets easier to satify.
The new (2015-02) stage3 tarballs use package.* directories instead of
files, causing the files to fail to be copied over. This change instead
copies them to the directories, creating them if they don't already exist.
This change converts the appliances from openrc to systemd. In addition,
systemd needs to at least be be installed on the build machine as we now
use systemd-nspawn instead of chroot/bind mounts do to the fact that
systemd-nspawn is much more robust and lese prone to errors. In addition:
* All stage4 tarballs and images are now stored in the images/ directory by
default.
* A package dir is now required and is set up in the packages/ directory by
default.
* The portage directory is not unpacked in the chroot every time anymore
and is instead bind-mounted from a directory by systemd-nspawn. This is
the portage/ directory by default.
* In addition there is a distfiles/ directory (by default) which is
bind-mounted in the chroot. It does what you'd probably expect.
* The Makefile learned new target, eclean, which will run eclean-dist and
eclean-pkg to clean out obsolete distfiles and binary packages.
* The REMOVE_PORTAGE_TREE option is removed as portage is no longer
installed.
* The unused/untested PRUNE_CRITICAL functionality has been removed. I
have no idea if it worked and if it didn't I didn't want to fix it.
* As appliances are always using systemd, UDEV is no longer optional.
* Timezones and hostnames are now handled by systemd (systemd-firstboot).
* Stage4 tarballs are now directly importable as systemd containers (and
probably docker too though I haven't tested that yet).
* A number of packages (for example dhcpd, acpid) have been removed from the
appliances when systemd provides equivalent functionality.
* We no longer override etc-update.conf. There's no reason.
* A number of Makefile targets, checkpoints, temp files, etc have been
removed as they are no longer needed.
The reason being that when you are distributing an image you are likely
distributing an general appliance, not a specific host so it makes sense
that the image name be the name of the appliance and not, e.g., ln33. This
can always be overriden on the command line or in a profile.
Instead of having everything in the root directory, split them in seperate
directories (appliances, scripts, & configs). This makes things a little
tidier.
Also added a now Makefile target, appliance-list, that prints a list of the
available appliances. The split directory change made this easier.
The current method no longer works because the text file now contains
non-stage3 files, etc. Eventually this needs to be cleaned up a little
better (using a helper script), but for now we add some extra greps.