]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Touch /usr/lib/clock-epoch during the build
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 9 Aug 2023 06:43:35 +0000 (08:43 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 9 Aug 2023 10:08:56 +0000 (11:08 +0100)
We'll handle the reproducible builds part of this together with all
the other changes for reproducible builds.

Fixes #1218

mkosi/__init__.py

index 9fccca9a94cd9b7f22217025018c08ff0a7c9f49..4f2c56b40876adb5db4ac57fce7cb65e92309fdf 100644 (file)
@@ -1063,6 +1063,11 @@ def configure_initrd(state: MkosiState) -> None:
         (state.root / "etc/initrd-release").symlink_to("/etc/os-release")
 
 
+def configure_clock(state: MkosiState) -> None:
+    with umask(~0o644):
+        (state.root / "usr/lib/clock-epoch").touch()
+
+
 def run_depmod(state: MkosiState) -> None:
     if state.config.bootable == ConfigFeature.disabled:
         return
@@ -1382,6 +1387,7 @@ def build_image(args: MkosiArgs, config: MkosiConfig) -> None:
             configure_autologin(state)
             configure_initrd(state)
             configure_ssh(state)
+            configure_clock(state)
 
             install_boot_loader(state)
             run_sysusers(state)