summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-07-12 15:33:49 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-07-15 16:17:33 +0200
commit7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb (patch)
tree4425e2413d76af1504d5f8666648a9667f0e4eb6 /tools
parentmkosi: update fedora commit reference (diff)
downloadsystemd-7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb.tar.xz
systemd-7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb.zip
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.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/update-distro-hash.py5
1 files changed, 3 insertions, 2 deletions
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()