From dc372bbdea0d04ee6861905595b87c06caf4c221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Mon, 10 Jul 2023 15:13:28 +0200 Subject: [PATCH] stages/rpm: set machine-id to 444 According to the systemd spec file, /etc/machine-id should have the 444 permissions. Thus, we need to chmod the file to 444 after it's created. See: - https://src.fedoraproject.org/rpms/systemd/blob/9c05b44a4b8922cdd4671298107e067302509afc/f/systemd.spec#_821 - https://bugzilla.redhat.com/show_bug.cgi?id=2221269 - https://issues.redhat.com/browse/COMPOSER-1992 --- stages/org.osbuild.rpm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/org.osbuild.rpm b/stages/org.osbuild.rpm index 188091a0..eb1c8083 100755 --- a/stages/org.osbuild.rpm +++ b/stages/org.osbuild.rpm @@ -378,7 +378,7 @@ def main(tree, inputs, options): print("deleting the fake machine id") machine_id_file = pathlib.Path(f"{tree}/etc/machine-id") machine_id_file.unlink() - machine_id_file.touch() + machine_id_file.touch(mode=0o444) if ostree_booted: os.unlink(ostree_booted)