debian-forge/runners/org.osbuild.rhel82
Miguel Martín 99af178c6d runners: create fake machine id when needed
Create fake machine before executing the runner command to
avoid the "Failed to resolve specifiers in '/var/log/journal/%m'"
errors.
2023-11-28 11:50:31 +01:00

20 lines
525 B
Text
Executable file

#!/usr/libexec/platform-python
import subprocess
import sys
from osbuild import api
from osbuild.util import runners
if __name__ == "__main__":
with api.exception_handler():
runners.ldconfig()
runners.sysusers()
with runners.create_machine_id_if_needed():
runners.tmpfiles()
runners.nsswitch()
runners.python_alternatives()
env = runners.quirks()
r = subprocess.run(sys.argv[1:], env=env, check=False)
sys.exit(r.returncode)