From 7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 12 Jul 2024 15:33:49 +0200 Subject: mkosi: Introduce build image We want the exitrd image to be built with the latest systemd as well. As the exitrd image is built as part of mkosi.images, and all subimages are built before the main image, this implies the packages must be built as a subimage in mkosi.images/ as well. So we introduce the build image and move all logic related to building distribution packages there. This also has the nice side effect of slimming down the main image as the build dependencies are not installed into the main image anymore. It also makes sure the packages are built in a "clean" chroot without any of the other packages which we install in the main image available. --- tools/update-distro-hash.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/update-distro-hash.py b/tools/update-distro-hash.py index fd23078aec..6f2d37f72e 100755 --- a/tools/update-distro-hash.py +++ b/tools/update-distro-hash.py @@ -33,7 +33,8 @@ def read_config(distro: str): text = subprocess.check_output(cmd, text=True) data = json.loads(text) - return data['Images'][-1] + images = {image["Image"]: image for image in data["Images"]} + return images["build"] def commit_file(distro: str, file: Path, commit: str, changes: str): message = '\n'.join(( @@ -69,7 +70,7 @@ def update_distro(args, distro: str): print(f"+ {shlex.join(cmd)}") changes = subprocess.check_output(cmd, text=True).strip() - conf_dir = Path('mkosi.conf.d') + conf_dir = Path('mkosi.images/build/mkosi.conf.d') files = conf_dir.glob('*/*.conf') for file in files: s = file.read_text() -- cgit v1.2.3