Ignition files are not necessary any more. Grub config file and
oem-releas file are now provided by the coreos-base/oem-common-files
package.
We install drop-in files for systemd units instead of providing our
own copies. This is where we set up PrivateTmp option and create
symlinks for /etc.
There's also manglefs.sh script, that will be executed by the
build_sysext utility. It drops unnecessary stuff like translations,
debugging symbols and development files.
Based on the afterburn ebuild with some tweaks. The dependency list was
generated using cargo-ebuild.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Previously the sys-apps/gentoo-functions package was pulled in into
the GCE image by the sys-libs/glibc package. After the sys-libs/glibc
package update, the dependency disappeared. This resulted in
gentoo-functions not being installed and the build to fail a check for
dangling symlinks:
broken link: b'/etc/init.d/functions.sh' -> b'../../lib/gentoo/functions.sh'
ERROR build_oem_aci: test_image_content: Failed symlink check
The `/etc/init.d/functions.sh` symlink is installed by
sys-apps/baselayout in postinst phase. The package also has a
dependency on sys-apps/gentoo-functions, but it is not pulled in into
the image, because baselayout is installed specially - without
dependencies.
It would probably be better to just drop the symlink, but it's here
for compatibility purposes. We also can't remove the symlink in the
manglefs script, as it gets executed after the filesystem checks.
The `localedef` tool expects `/usr/lib/locale` directory to
exist. This directory used to be created by the `sys-libs/glibc`
package (with the `keepdir` directive), but after the update of the
package, the locale generation stuff (and the `keepdir` directive )was
moved to the `sys-libs/locale-gen` package. This package is not
installed in the production images, so the `/usr/lib/locale` directory
was not created. In such a situation, calling localedef to generate
C.UTF-8 locale resulted in an error like:
cannot create temporary file: ${SOME_ROOTFS}/usr/lib/locale/locale-archive.ufpG15: No such file or directory
Create the directory before calling localedef to fix the problem.
It normally is enabled by default, but during bootstrap USE flags that
are not force-enabled are disabled. And we need to it avoid bindist
issues that pop up during stage 1 of the SDK build.
- take care of nscd.conf via tmpfiles, add files/nscd-conf.tmpfiles.
- comment out 'dostrip -x' to force the OS image binaries to be stripped
- remove everything glibc wants to put under /etc since we use
baselayout to provide that