From 327eeb20e125140cc2b5e0a59f3ee54e9e3fc77c Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Apr 29 2022 14:59:18 +0000 Subject: Drop the runners --- diff --git a/runners/org.osbuild.arch b/runners/org.osbuild.arch deleted file mode 120000 index 2a7391d..0000000 --- a/runners/org.osbuild.arch +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.linux \ No newline at end of file diff --git a/runners/org.osbuild.centos8 b/runners/org.osbuild.centos8 deleted file mode 120000 index fe28a86..0000000 --- a/runners/org.osbuild.centos8 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.rhel82 \ No newline at end of file diff --git a/runners/org.osbuild.centos9 b/runners/org.osbuild.centos9 deleted file mode 100755 index 963e2bc..0000000 --- a/runners/org.osbuild.centos9 +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/python3 - -import os -import subprocess -import sys - -import osbuild.api - - -def ldconfig(): - # ld.so.conf must exist, or `ldconfig` throws a warning - subprocess.run(["touch", "/etc/ld.so.conf"], check=True) - subprocess.run(["ldconfig"], check=True) - - -def sysusers(): - try: - subprocess.run(["systemd-sysusers"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True) - except subprocess.CalledProcessError as error: - sys.stderr.write(error.stdout) - sys.exit(1) - - -def tmpfiles(): - # Allow systemd-tmpfiles to return non-0. Some packages want to create - # directories owned by users that are not set up with systemd-sysusers. - subprocess.run(["systemd-tmpfiles", "--create"], check=False) - - -def nsswitch(): - # the default behavior is fine, but using nss-resolve does not - # necessarily work in a non-booted container, so make sure that - # is not configured. - try: - os.remove("/etc/nsswitch.conf") - except FileNotFoundError: - pass - - -if __name__ == "__main__": - with osbuild.api.exception_handler(): - ldconfig() - sysusers() - tmpfiles() - nsswitch() - - r = subprocess.run(sys.argv[1:], check=False) - sys.exit(r.returncode) diff --git a/runners/org.osbuild.fedora30 b/runners/org.osbuild.fedora30 deleted file mode 100755 index 963e2bc..0000000 --- a/runners/org.osbuild.fedora30 +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/python3 - -import os -import subprocess -import sys - -import osbuild.api - - -def ldconfig(): - # ld.so.conf must exist, or `ldconfig` throws a warning - subprocess.run(["touch", "/etc/ld.so.conf"], check=True) - subprocess.run(["ldconfig"], check=True) - - -def sysusers(): - try: - subprocess.run(["systemd-sysusers"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True) - except subprocess.CalledProcessError as error: - sys.stderr.write(error.stdout) - sys.exit(1) - - -def tmpfiles(): - # Allow systemd-tmpfiles to return non-0. Some packages want to create - # directories owned by users that are not set up with systemd-sysusers. - subprocess.run(["systemd-tmpfiles", "--create"], check=False) - - -def nsswitch(): - # the default behavior is fine, but using nss-resolve does not - # necessarily work in a non-booted container, so make sure that - # is not configured. - try: - os.remove("/etc/nsswitch.conf") - except FileNotFoundError: - pass - - -if __name__ == "__main__": - with osbuild.api.exception_handler(): - ldconfig() - sysusers() - tmpfiles() - nsswitch() - - r = subprocess.run(sys.argv[1:], check=False) - sys.exit(r.returncode) diff --git a/runners/org.osbuild.fedora31 b/runners/org.osbuild.fedora31 deleted file mode 120000 index d46777b..0000000 --- a/runners/org.osbuild.fedora31 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.fedora30 \ No newline at end of file diff --git a/runners/org.osbuild.fedora32 b/runners/org.osbuild.fedora32 deleted file mode 120000 index d46777b..0000000 --- a/runners/org.osbuild.fedora32 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.fedora30 \ No newline at end of file diff --git a/runners/org.osbuild.fedora33 b/runners/org.osbuild.fedora33 deleted file mode 120000 index d46777b..0000000 --- a/runners/org.osbuild.fedora33 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.fedora30 \ No newline at end of file diff --git a/runners/org.osbuild.fedora34 b/runners/org.osbuild.fedora34 deleted file mode 120000 index d46777b..0000000 --- a/runners/org.osbuild.fedora34 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.fedora30 \ No newline at end of file diff --git a/runners/org.osbuild.fedora35 b/runners/org.osbuild.fedora35 deleted file mode 120000 index d46777b..0000000 --- a/runners/org.osbuild.fedora35 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.fedora30 \ No newline at end of file diff --git a/runners/org.osbuild.fedora36 b/runners/org.osbuild.fedora36 deleted file mode 120000 index d46777b..0000000 --- a/runners/org.osbuild.fedora36 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.fedora30 \ No newline at end of file diff --git a/runners/org.osbuild.fedora37 b/runners/org.osbuild.fedora37 deleted file mode 120000 index d46777b..0000000 --- a/runners/org.osbuild.fedora37 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.fedora30 \ No newline at end of file diff --git a/runners/org.osbuild.linux b/runners/org.osbuild.linux deleted file mode 100755 index a023e68..0000000 --- a/runners/org.osbuild.linux +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/python3 - -import subprocess -import sys - - -if __name__ == "__main__": - r = subprocess.run(sys.argv[1:], check=False) - sys.exit(r.returncode) diff --git a/runners/org.osbuild.rhel7 b/runners/org.osbuild.rhel7 deleted file mode 100755 index 9399a6c..0000000 --- a/runners/org.osbuild.rhel7 +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/python3 - -import os -import subprocess -import sys - -import osbuild.api - - -def ldconfig(): - # ld.so.conf must exist, or `ldconfig` throws a warning - with open("/etc/ld.so.conf", "w", ) as f: - # qemu-img needs `libiscsi`, which is located in /usr/lib64/iscsi - f.write("/usr/lib64/iscsi\n") - f.flush() - subprocess.run(["ldconfig"], check=True) - - -def nsswitch(): - # the default behavior is fine, but using nss-resolve does not - # necessarily work in a non-booted container, so make sure that - # is not configured. - try: - os.remove("/etc/nsswitch.conf") - except FileNotFoundError: - pass - - -if __name__ == "__main__": - with osbuild.api.exception_handler(): - ldconfig() - nsswitch() - - r = subprocess.run(sys.argv[1:], check=False) - sys.exit(r.returncode) diff --git a/runners/org.osbuild.rhel81 b/runners/org.osbuild.rhel81 deleted file mode 100755 index 925326e..0000000 --- a/runners/org.osbuild.rhel81 +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/libexec/platform-python - -import os -import subprocess -import sys - -import osbuild.api - - -def ldconfig(): - # ld.so.conf must exist, or `ldconfig` throws a warning - subprocess.run(["touch", "/etc/ld.so.conf"], check=True) - subprocess.run(["ldconfig"], check=True) - - -def sysusers(): - try: - subprocess.run(["systemd-sysusers"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True) - except subprocess.CalledProcessError as error: - sys.stderr.write(error.stdout) - sys.exit(1) - - -def tmpfiles(): - # Allow systemd-tmpfiles to return non-0. Some packages want to create - # directories owned by users that are not set up with systemd-sysusers. - subprocess.run(["systemd-tmpfiles", "--create"], check=False) - - -def nsswitch(): - # the default behavior is fine, but using nss-resolve does not - # necessarily work in a non-booted container, so make sure that - # is not configured. - try: - os.remove("/etc/nsswitch.conf") - except FileNotFoundError: - pass - - -def os_release(): - """/usr/lib/os-release doesn't exist. The `redhat-release` package - generates `/etc/os-release directly. To work around this, do the same here. - - https://bugzilla.redhat.com/show_bug.cgi?id=1766754 - """ - - # remove the symlink that systemd-nspawn creates - os.remove("/etc/os-release") - with open("/etc/os-release", "w") as f: - f.write('NAME="Red Hat Enterprise Linux"\n') - f.write('VERSION="8.1 (Ootpa)"\n') - f.write('ID="rhel"\n') - f.write('ID_LIKE="fedora"\n') - f.write('VERSION_ID="8.1"\n') - f.write('PLATFORM_ID="platform:el8"\n') - f.write('PRETTY_NAME="Red Hat Enterprise Linux 8.1 (Ootpa)"\n') - f.write('ANSI_COLOR="0;31"\n') - f.write('CPE_NAME="cpe:/o:redhat:enterprise_linux:8.1:GA"\n') - f.write('HOME_URL="https://www.redhat.com/"\n') - f.write('BUG_REPORT_URL="https://bugzilla.redhat.com/"\n') - - -def python_alternatives(): - """/usr/bin/python3 is a symlink to /etc/alternatives/python3, which points - to /usr/bin/python3.6 by default. Recreate the link in /etc, so that - shebang lines in stages and assemblers work. - """ - os.makedirs("/etc/alternatives", exist_ok=True) - try: - os.symlink("/usr/bin/python3.6", "/etc/alternatives/python3") - except FileExistsError: - pass - -if __name__ == "__main__": - with osbuild.api.exception_handler(): - ldconfig() - sysusers() - tmpfiles() - nsswitch() - os_release() - python_alternatives() - - r = subprocess.run(sys.argv[1:], check=False) - sys.exit(r.returncode) diff --git a/runners/org.osbuild.rhel82 b/runners/org.osbuild.rhel82 deleted file mode 100755 index 3d8f5fd..0000000 --- a/runners/org.osbuild.rhel82 +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/libexec/platform-python - -import os -import platform -import subprocess -import sys - -import osbuild.api - - -def quirks(): - # Platform specific quirks - env = os.environ.copy() - - if platform.machine() == "aarch64": - # Work around a bug in qemu-img on aarch64 that can lead to qemu-img - # hangs when more then one coroutine is use (which is the default) - # See https://bugs.launchpad.net/qemu/+bug/1805256 - env["OSBUILD_QEMU_IMG_COROUTINES"] = "1" - - return env - - -def ldconfig(): - # ld.so.conf must exist, or `ldconfig` throws a warning - subprocess.run(["touch", "/etc/ld.so.conf"], check=True) - subprocess.run(["ldconfig"], check=True) - - -def sysusers(): - try: - subprocess.run(["systemd-sysusers"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True) - except subprocess.CalledProcessError as error: - sys.stderr.write(error.stdout) - sys.exit(1) - - -def tmpfiles(): - # Allow systemd-tmpfiles to return non-0. Some packages want to create - # directories owned by users that are not set up with systemd-sysusers. - subprocess.run(["systemd-tmpfiles", "--create"], check=False) - - -def nsswitch(): - # the default behavior is fine, but using nss-resolve does not - # necessarily work in a non-booted container, so make sure that - # is not configured. - try: - os.remove("/etc/nsswitch.conf") - except FileNotFoundError: - pass - - -def python_alternatives(): - """/usr/bin/python3 is a symlink to /etc/alternatives/python3, which points - to /usr/bin/python3.6 by default. Recreate the link in /etc, so that - shebang lines in stages and assemblers work. - """ - os.makedirs("/etc/alternatives", exist_ok=True) - try: - os.symlink("/usr/bin/python3.6", "/etc/alternatives/python3") - except FileExistsError: - pass - - -def main(): - with osbuild.api.exception_handler(): - ldconfig() - sysusers() - tmpfiles() - nsswitch() - python_alternatives() - - env = quirks() - - r = subprocess.run(sys.argv[1:], - env=env, - check=False) - sys.exit(r.returncode) - - -if __name__ == "__main__": - main() diff --git a/runners/org.osbuild.rhel83 b/runners/org.osbuild.rhel83 deleted file mode 120000 index fe28a86..0000000 --- a/runners/org.osbuild.rhel83 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.rhel82 \ No newline at end of file diff --git a/runners/org.osbuild.rhel84 b/runners/org.osbuild.rhel84 deleted file mode 120000 index fe28a86..0000000 --- a/runners/org.osbuild.rhel84 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.rhel82 \ No newline at end of file diff --git a/runners/org.osbuild.rhel85 b/runners/org.osbuild.rhel85 deleted file mode 120000 index fe28a86..0000000 --- a/runners/org.osbuild.rhel85 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.rhel82 \ No newline at end of file diff --git a/runners/org.osbuild.rhel86 b/runners/org.osbuild.rhel86 deleted file mode 120000 index fe28a86..0000000 --- a/runners/org.osbuild.rhel86 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.rhel82 \ No newline at end of file diff --git a/runners/org.osbuild.rhel87 b/runners/org.osbuild.rhel87 deleted file mode 120000 index fe28a86..0000000 --- a/runners/org.osbuild.rhel87 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.rhel82 \ No newline at end of file diff --git a/runners/org.osbuild.rhel90 b/runners/org.osbuild.rhel90 deleted file mode 120000 index ffc7052..0000000 --- a/runners/org.osbuild.rhel90 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.centos9 \ No newline at end of file diff --git a/runners/org.osbuild.rhel91 b/runners/org.osbuild.rhel91 deleted file mode 120000 index 70c2aaf..0000000 --- a/runners/org.osbuild.rhel91 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.rhel90 \ No newline at end of file diff --git a/runners/org.osbuild.ubuntu1804 b/runners/org.osbuild.ubuntu1804 deleted file mode 100755 index 963e2bc..0000000 --- a/runners/org.osbuild.ubuntu1804 +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/python3 - -import os -import subprocess -import sys - -import osbuild.api - - -def ldconfig(): - # ld.so.conf must exist, or `ldconfig` throws a warning - subprocess.run(["touch", "/etc/ld.so.conf"], check=True) - subprocess.run(["ldconfig"], check=True) - - -def sysusers(): - try: - subprocess.run(["systemd-sysusers"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True) - except subprocess.CalledProcessError as error: - sys.stderr.write(error.stdout) - sys.exit(1) - - -def tmpfiles(): - # Allow systemd-tmpfiles to return non-0. Some packages want to create - # directories owned by users that are not set up with systemd-sysusers. - subprocess.run(["systemd-tmpfiles", "--create"], check=False) - - -def nsswitch(): - # the default behavior is fine, but using nss-resolve does not - # necessarily work in a non-booted container, so make sure that - # is not configured. - try: - os.remove("/etc/nsswitch.conf") - except FileNotFoundError: - pass - - -if __name__ == "__main__": - with osbuild.api.exception_handler(): - ldconfig() - sysusers() - tmpfiles() - nsswitch() - - r = subprocess.run(sys.argv[1:], check=False) - sys.exit(r.returncode) diff --git a/runners/org.osbuild.ubuntu2004 b/runners/org.osbuild.ubuntu2004 deleted file mode 120000 index 317be18..0000000 --- a/runners/org.osbuild.ubuntu2004 +++ /dev/null @@ -1 +0,0 @@ -org.osbuild.ubuntu1804 \ No newline at end of file