On CoreOS we use systemd to manage docker containers. Having docker
automatically start containers on reboot makes everything confused. Stop
doing this.
This makes double sure that the symlink is never removed by INSTALL_MASK
or PKG_INSTALL_MASK. This symlink is so strictly required by random
tools we cannot allow it to ever go missing by mistake.
A case of binary packages masking breakage, didn't notice this broke
because I didn't happen to trigger a build of gmerge during my testing.
This package.provided file contained the hackily installed toolchain
which is now handled via a normal emerge instead.
The INSTALL_MASK is altered all over the place, clean it up by moving
all of it to profiles. Add /usr/share/{i18n,locales} to exclude those
installed by glibc since it doesn't have a nls use flag to disable them.
Change the install location based on symlink-usr instead of the target
and use absolute symlinks. We need to move towards never installing to
/{bin,sbin,lib...} and the use of absolute links avoids needlessly
breaking if the symlink-usr flag and the current state of /bin don't
agree (i.e. between flipping the flag and migrating the current files).
As much as I like not seeing the i8042 error in the kernel log on
platforms without it I foresee someone being really ticked off with me
for making this a module when dracut fails without loading the PS/2 and
keyboard modules making the rescue shell kinda hard to use unless a
serial console is also available.
Yeah, well, fair enough future me. You win.
The kernel is much more particular about how it handles the cpio format
than GNU's cpio tool. Two things:
- Don't use the -depth option to find, cpio documentation recommends
using it (the directory comes after the contents so set the
permissions on the dir last in case it is overly restrictive) but the
kernel thinks the other direction and doesn't put things into a
directory that does not (yet) exist.
- Don't add anything under /lib which is a symlink in the original
file. Adding /lib as a directory later replaces the earlier /lib
symlink. Again the user space tool thinks in the other direction and
will happily dereference the symlink while extracting, preserving it.
CPIO CPIO CPIO!
Lots of changes here, some things of note:
- Switch from built-in to modules for much of the kernel.
- Enable more features, mostly in power management and networking.
- Remove no_firmware.patch, this was added back when we had two
different kernels which would conflict if both installed firmware.
- Stop disabling OUTOFTREE_BUILD now that we don't patch the source.
So far this is just compile tested so it is marked ~amd64 for now.
STRIP_MASK wasn't updated to the new vmlinux location earlier.
RESTRICT=binchecks disables checks that only make sense for user space
binaries. This silences a bogus scanelf error.
If OUTOFTREE_BUILD=1 (currently disabled but that will change) the
kernel will use the existing checkout as the source tree rather than
cloning another tree. If someone built anything in that tree and .config
exists the build will fail complaining that the source isn't clean.
Instead of failing just disable OUTOFTREE and emit a warning.
OUTOFTREE combined with INCREMENTAL makes successive kernel builds
pretty much no-ops (just re-linking modules and bzImage).
Build only bzImage instead of the default 'all' which also will re-link
all of the modules which is pointless and just causes the initramfs and
rootfs to become out of sync.
Since we need to both bundle modules into the initramfs as well as
bundle the initramfs into the kernel image we need to update a pre-built
image with the user space tools as part of the kernel build process.
This seemed the best scheme, the alternatives were:
- Unpack bootengine.cpio to a temporary directory, build and install
kernel modules into that temporary directory, pass that directory
plus a config file listing what device nodes to the kernel build.
- Build kernel modules and generate a fresh bootengine.cpio using the
update-bootengine tool. This would require calling sudo (and breaking
out of the sandbox in the process) in the middle of the ebuild.
The use flag kernel_sources conflicts with the special meaning of the
use flag prefix kernel_ which is reserved for defining the host kernel,
for example kernel_linux. Also a couple other ebuilds in Gentoo have a
source use flag so let's just follow that pattern instead.
We do not currently support or care about things like arm, device trees,
smatch, and other things that massively complicate this eclass. Remove
them so making further changes is simple. Features can always be added
back later.
This makes it possible to have multiple kernel ebuilds in the tree at
once since the defconfig can be versioned along side the ebuilds instead
of being global.
Not sure how this managed to work in the past, perhaps the test for
using Google's common.mk used to always fail but now works properly?
In any case, we don't use clang any more.
Move all obviously safe features into the coreos profiles to further
reduce the magic in make.conf, leave the more fast-and-loose options in
make.conf to keep them kinda "special".
git is too ubiquitous of a transport to ignore. People use it to pull in
scripts, containers with docker, syncronize configurations, etc. It is a
must have. Merge it.
Now that dev images install packages into root instead of /usr/local we
can move to configuring portage in those images in a more standard way.
We also don't support turning a prod image directly into a dev image so
this sort of stuff doesn't belong in the base system anyway.
As of 207 the systemd binary is only located at
/usr/lib/systemd/systemd, not /usr/bin/systemd. Fix the broken init link
accordingly, also add version to systemd dependency for good measure.
Bootstrapping now pulls in udev which is provided by systemd, systemd
pulls in hwids which must have the udev use flag enabled. Also add
gentoo-systemd-integration which will be used with the next version of
systemd.
Switch to upstream's base profile, moving coreos specific stuff into
coreos/base and elsewhere as needed. No significant changes but a lot of
use flag nose in this since things like the list of available python
targets changes.
The only CoreOS specific things in this profile appear to have been
a few use flags for the SDK. Switch to the upstream amd64 profile after
moving these flags around in the appropriate target profiles.
The one function change here is that the delta_generator use flag is now
properly disabled outside of the SDK as it was in chromeos.
Move all of the coreos stuff to coreos/base and a couple other places
while switching to the upstream version of default/linux. This needs
further cleanup but it sufficient for the transition.
Merge the remaining bits of default/linux/amd64/10.0 into the coreos
tree. default/linux/amd64/10.0 is now an alias for coreos/amd64/sdk for
compatibility with existing configs.
This will replace coreos specific stuff that is scattered around
'default/linux', 'arch/amd64', 'base', and 'targets' so those can be
replaced by the upstream Gentoo versions.