runtime. Use the new `--qemu-gui` option to start qemu in its graphical interface.
- Removed `--netdev`. Can be replaced by manually installing systemd-networkd, putting a network file in the
image and enabling systemd-networkd.
-- If `mkosi.extra/` exists, it is now always used instead of only when no explicit extra trees are defined.
+- If `mkosi.extra/` or `mkosi.skeleton/` exist, they are now always used instead of only when no explicit
+ extra/skeleton trees are defined.
+- mkosi doesn't install any default packages anymore aside from the base filesystem layout package. In
+ practice, this means systemd and other basic tools have to be installed explicitly from now on.
- Removed `--qcow2` option in favor of supporting only raw disk images as the disk image output format.
- Removed `--bmap` option as it can be trivially added manually by utilizing a finalize script.
- The `never` value for `--with-network` was spun of into its own custom option `--cache-only`.
f.write(f"Include = {d}/*\n")
packages = state.config.packages.copy()
- add_packages(state.config, packages, "base")
+ add_packages(state.config, packages, "filesystem")
if state.config.bootable and not state.config.initrds:
add_packages(state.config, packages, "dracut")
env = {}
packages = state.config.packages.copy()
- add_packages(state.config, packages, "systemd", "rpm")
+ add_packages(state.config, packages, "filesystem")
if state.config.bootable:
add_packages(state.config, packages, "kernel")
if not state.config.initrds:
if state.config.ssh:
add_packages(state.config, packages, "openssh-server")
- if "epel" in state.config.repositories:
- add_packages(state.config, packages, "epel-release")
-
- # Make sure we only install the minimal language files by default on CentOS Stream 8 which still
- # defaults to all langpacks.
- if release <= 8:
- add_packages(state.config, packages, "glibc-minimal-langpack")
-
invoke_dnf(state, "install", packages, env)
syslog = state.root.joinpath("etc/systemd/system/syslog.service")
if not any(package.startswith("linux-image") for package in packages):
add_packages(state.config, packages, f"linux-image-{DEBIAN_KERNEL_ARCHITECTURES[state.config.architecture]}")
- @classmethod
- def _fixup_resolved(cls, state: MkosiState, packages: list[str]) -> None:
- if "systemd" in packages and "systemd-resolved" not in packages:
- # The default resolv.conf points to 127.0.0.1, and resolved is disabled, fix it in
- # the base image.
- state.root.joinpath("etc/resolv.conf").unlink(missing_ok=True)
- state.root.joinpath("etc/resolv.conf").symlink_to("../run/systemd/resolve/resolv.conf")
-
@classmethod
def filesystem(cls) -> str:
return "ext4"
# conflicts. dbus and libpam-systemd are optional dependencies for systemd in debian so we include them
# explicitly.
packages = state.config.packages.copy()
- add_packages(state.config, packages, "systemd", "systemd-sysv", "dbus", "libpam-systemd")
+ add_packages(state.config, packages, "base-files")
if state.config.bootable:
if not state.config.initrds:
if state.config.bootable:
add_apt_package_if_exists(state, packages, "systemd-boot")
- # systemd-resolved was split into a separate package
- add_apt_package_if_exists(state, packages, "systemd-resolved")
-
invoke_apt(state, "get", "install", ["--assume-yes", "--no-install-recommends", *packages])
# Now clean up and add the real repositories, so that the image is ready
# Don't ship dpkg config files in extensions, they belong with dpkg in the base image.
dpkg_nodoc_conf.unlink() # type: ignore
- cls._fixup_resolved(state, packages)
-
# Debian/Ubuntu use a different path to store the locale so let's make sure that path is a symlink to
# etc/locale.conf.
state.root.joinpath("etc/default/locale").unlink(missing_ok=True)
setup_dnf(state, repos)
packages = state.config.packages.copy()
- add_packages(state.config, packages, "systemd", "util-linux", "rpm")
+ add_packages(state.config, packages, "filesystem")
if state.config.bootable:
add_packages(state.config, packages, "kernel-core", "kernel-modules")
setup_dnf(state, repos)
packages = state.config.packages.copy()
- add_packages(state.config, packages, "basesystem-minimal", "dnf")
+ add_packages(state.config, packages, "filesystem")
if state.config.bootable and not state.config.initrds:
add_packages(state.config, packages, "dracut")
# Mageia ships /etc/50-mageia.conf that omits systemd from the initramfs and disables hostonly.
packages = state.config.packages.copy()
# well we may use basesystem here, but that pulls lot of stuff
- add_packages(state.config, packages, "basesystem-minimal", "systemd", "dnf")
+ add_packages(state.config, packages, "filesystem")
if state.config.bootable:
add_packages(state.config, packages, "systemd-boot", "systemd-cryptsetup", conditional="systemd")
add_packages(state.config, packages, "kernel-release-server", "timezone")
packages = state.config.packages.copy()
if state.config.base_image is None:
- add_packages(state.config, packages, "systemd", "glibc-locale-base", "zypper")
-
- if state.config.release.startswith("42."):
- add_packages(state.config, packages, "patterns-openSUSE-minimal_base")
- else:
- add_packages(state.config, packages, "patterns-base-minimal_base")
+ add_packages(state.config, packages, "filesystem")
if state.config.bootable:
add_packages(state.config, packages, "kernel-default")
security = f"deb http://ports.ubuntu.com/ {state.config.release}-security {' '.join(repos)}"
state.root.joinpath(f"etc/apt/sources.list.d/{state.config.release}-security.list").write_text(f"{security}\n")
-
- @classmethod
- def _fixup_resolved(cls, state: MkosiState, packages: Sequence[str]) -> None:
- pass