default-butane-spec.sh appended "local.ign" to the merge list outside of
the duplicate detection. An empty local.bu (as written by packaging
scripts) compiles to the same content as an empty "-examples" ignition
file, and butane rejects the duplicate entry: "make package" failed on
base/build/fcos-dev.ign since the coreos split.
local.ign is now passed as the last argument, so it keeps its place at
the end of the merge list and is skipped when its content duplicates a
previous file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KuHAbQsFqabSuCuzQ1PrRK
- coreos: everything specific to Fedora CoreOS (virtiofs discovery and
mount, qemu-guest-agent, SSH host key persistence, DNS configuration).
- base: everything else (install-tools, fastfetch, resolv.conf resync,
base images, users and groups).
common.mk now injects both as implicit dependencies: coreos has none,
base depends on coreos and every other project depends on coreos and base.
default-butane-spec.sh skips ignition files whose content duplicates a
previous one: butane rejects duplicate merge entries, which happens with
empty "-examples" ignition files (e.g. coreos-examples and nftables-examples).
The virtiofs tags are now discovered in /run/quadlets/coreos/virtiofs
(seedbox mounts updated accordingly) and the tmpfiles.d file is named
coreos.conf so that make install/uninstall picks it up.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The base cookbook provides foundational configuration for Fedora CoreOS systems. It includes:
The base cookbook provides the foundational configuration shared by all cookbooks, whatever the underlying operating system. It includes:
- **fastfetch**: A system information tool displayed on login, with color-coded output (red for root, blue for regular users).
- **Tools installation**: the **install-tools.service** oneshot runs every script found in `/etc/quadlets/base/install-tools.d/`.
- **tmpfiles configuration**: Sets up required directories such as `/var/lib/virtiofs/data`.
Versions are pinned in `/etc/quadlets/base/install-tools.env`.
- **QEMU guest agent**: Optional installation for better VM integration.
The service is skipped when this file is absent.
- **SSH key persistence**: Backs up and restores SSH host keys across reboots.
- **fastfetch**: a system information tool installed by **install-tools.service** and displayed on login, with color-coded output (red for root, blue for regular users).
- **resolv.conf resync**: Keeps `Network=host` containers in sync with the host's DNS.
- **resolv.conf resync**: keeps `Network=host` containers in sync with the host's DNS.
With `Network=host`, Podman snapshots `/etc/resolv.conf` at container creation and bind-mounts
With `Network=host`, Podman snapshots `/etc/resolv.conf` at container creation and bind-mounts
the copy, so a later DNS change (e.g. a DHCP renewal) never reaches running containers. A
the copy, so a later DNS change (e.g. a DHCP renewal) never reaches running containers. A
`systemd.path` unit watches `/etc/resolv.conf` and a oneshot service rewrites each host-network
`systemd.path` unit watches `/etc/resolv.conf` and a oneshot service rewrites each host-network
container's snapshot **in place** (same inode, no restart); bridged containers are left untouched.
container's snapshot **in place** (same inode, no restart); bridged containers are left untouched.
See [issue #1](https://github.com/nmasse-itix/podman-quadlet-cookbook/issues/1).
See [issue #1](https://github.com/nmasse-itix/podman-quadlet-cookbook/issues/1).
- **Container teardown drop-in** (example): a `container.d` drop-in that makes `systemctl stop` wait until the container has actually been removed.
- **Base images**: `fedora.image` and `centos-stream10.image` pull the base images used by other cookbooks to build their own images.
- **Users and groups**: creates the `itix-svc` service account (uid/gid 10000) and, in the Butane spec, the `itix` group (gid 1000) and removes the default `core` user.
This cookbook is used as an implicit dependency for other cookbooks that run on Fedora CoreOS.
This cookbook is an implicit dependency of every other cookbook, except [coreos](../coreos/).
It depends itself implicitly on the [coreos](../coreos/) cookbook, which holds everything specific to Fedora CoreOS.
## Usage
## Usage
@ -31,7 +35,7 @@ Install the base configuration.
sudo make clean install
sudo make clean install
```
```
You should see the **install-fastfetch.service** downloading and installing fastfetch.
You should see the **install-tools.service** downloading and installing fastfetch.
On next login, fastfetch will display system information.
On next login, fastfetch will display system information.
The coreos cookbook provides the configuration specific to Fedora CoreOS systems. It includes:
- **virtiofs data mount**: the **discover-virtiofs-tags.service** lists the virtiofs tags exposed by the hypervisor.
When a `data` tag is present, **var-lib-virtiofs-data.mount** mounts it on `/var/lib/virtiofs/data` with the `container_file_t` SELinux context, so containers can use it.
- **tmpfiles configuration**: creates the `/var/lib/virtiofs` directory.
- **QEMU guest agent**: when running on KVM, **rpm-ostree-install-qemu-guest-agent.service** layers `qemu-guest-agent` with `rpm-ostree`, applies it live and starts it.
- **SSH key persistence** (Butane spec only): backs up the SSH host keys in `/var/lib/private/sshd` and restores them on reinstall, so the host keeps its identity.
# List here the names of other projects (directories at the top-level) that this project depends on.
# List here the names of other projects (directories at the top-level) that this project depends on.
DEPENDENCIES?=
DEPENDENCIES?=
# Implicit dependencies, injected in every project's butane specs.
# "coreos" holds everything related to Fedora CoreOS and "base" everything else.
# "base" depends on "coreos", so the order matters and neither one depends on itself.
ifeq($(PROJECT_NAME),coreos)
IMPLICIT_DEPENDENCIES:=
elseifeq($(PROJECT_NAME),base)
IMPLICIT_DEPENDENCIES:= coreos
else
IMPLICIT_DEPENDENCIES:= coreos base
endif
# Set this variable to "yes" to skip the confirmation prompt when running "make clean".
# Set this variable to "yes" to skip the confirmation prompt when running "make clean".
I_KNOW_WHAT_I_AM_DOING?=
I_KNOW_WHAT_I_AM_DOING?=
# List of all ignition files corresponding to the dependencies
# List of all ignition files corresponding to the dependencies
# Here, we inject the "base" project as a dependency. It can therefore be assumed to always be embeddable in project's butane specs.
# Here, we inject the "coreos" and "base" projects as dependencies. They can therefore be assumed to always be embeddable in project's butane specs.
DEPENDENCIES_IGNITION_FILES:=$(shell for dep in $$(if["$(PROJECT_NAME)" !="base"];thenecho base;fi)$(DEPENDENCIES);doecho$(COOKBOOKS_DIR)/$$dep/build/$$dep.ign;done)
# Variation of the previous variable with the built-in examples.
# Variation of the previous variable with the built-in examples.
DEPENDENCIES_IGNITION_EXAMPLES_FILES:=$(shell for dep in $$(if["$(PROJECT_NAME)" !="base"];thenecho base;fi)$(DEPENDENCIES);doecho$(COOKBOOKS_DIR)/$$dep/build/$$dep.ign $(COOKBOOKS_DIR)/$$dep/build/$$dep-examples.ign;done)
# Generate the final Fedora CoreOS ignition files (dev & test) by merging the Butane spec with the local and project-specific ignition files, as well as those of the dependencies.
# Generate the final Fedora CoreOS ignition files (dev & test) by merging the Butane spec with the local and project-specific ignition files, as well as those of the dependencies.