Debug symbols and development files get removed. /etc content is
temporarily pushed to /usr/share/flatcar/etc, which doesn't work.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Podman build uses pkg-config support in Go to link against some library.
This needs the correct sysroot version of PKG_CONFIG to be exported.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
and add keywords to profile. Podman 4.9.2 is the stable version
according to the website but it's keyworded ~ARCH in Gentoo. One of the
dependencies (containers-common) also needs to be keyworded or else
there are file collosions with the containers-storage package.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
There are two challenges with the sysext: it needs config files in /etc
and it needs udev rules for mounting during boot to work. The etc files
are placed in the standard flatcar etc overlay path but the overlay is
mounted from the initrd. So instead, we create a tmpfiles.d rule that
symlinks the best important files over. For the udev issue, we create a
drop-in in /etc that ensures udev runs after systemd-sysext.
We also can't rely on systemd presets to work, so instead parse the
preset file and statically create the service dependencies. For the
primary zfs.target we rely on an Upholds entry. Users can still disabled
unwanted services if they want.
We also removed unnecessary files:
- development files
- initramfs related scripts
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
The zfs-kmod ebuild needs KERNEL_DIR to point to the correct
/lib/modules directory.
The zfs ebuild installs two systemd unit masks to /usr/lib/systemd which
result in "dangling symlink" errors during the image build. These
systemd unit masks are only necessary for old Ubuntu systems that have
sysv-init-systemd compat wrappers.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
We explicitly install gawk but our profile explicitly forces the gawk
useflag for app-alternatives/awk. Some packages, like zfs, depend on
app-alternatives/awk and it also installs the awk -> gawk that the gawk
ebuild creates through pkg_postinst. So switch to app-alternatives/awk
to make the implementation cleaner.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
build/source, which is accidentally an empty directory, needs to be a
symlink so that Gentoo kmod ebuilds can build when setting
KERNEL_DIR=/lib/modules/.../build. They detect the proper layout with
the symlink.
The other issue is building the Nvidia driver with
SYSSRC=/lib/modules/.../build. This works on Ubuntu but fails on
Flatcar. Ubuntus build directory contains symlinks to includes from the
source tree so recreate the same layout.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
by skipping the check for an existing image directory if we're not
building an image. This makes './build_image sysext' work.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This function is meant to prebuild certain sysexts to be released along
with each release. These will not be built into the image, but instead
can be fetched by the user on demand.
The command to build sysexts would be:
./build_image prod sysext
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Nvidia CDI definitions are used by Kubernetes to represent the topology
of GPUs available to a node and allow workload placement on suitable
GPUs.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
nvidia-persistenced keeps a reference to the GPU open at all times,
which allows applications/containerd accessing gpus to start faster.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
From scratch because the guru one patches too match and is going to break too
much. This package is primarily supposed to provide nvidia-container-cli.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
The logic for checking if we need to probe depends on the device showing up
with the product type in lspci output, which doesn't hold for all sorts of
GPUs. The NVIDIA_PRODUCT_TYPE is used for fetching the drivers and is "tesla"
across datacenter GPUs.
Switch to matching on vendor id and device class. The values are the same
ones that the nvidia driver binds to.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>