From e4aeb99296702937346ef0fa93496261fec4b3cd Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 12 Jul 2021 08:54:05 +0100 Subject: [PATCH] trivial: Fix oss-fuzz by installing missing deps --- contrib/ci/oss-fuzz.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/contrib/ci/oss-fuzz.py b/contrib/ci/oss-fuzz.py index 290b8568a..b3322a17b 100755 --- a/contrib/ci/oss-fuzz.py +++ b/contrib/ci/oss-fuzz.py @@ -26,7 +26,7 @@ class Builder: "OUT", os.path.realpath(os.path.join(DEFAULT_BUILDDIR, "out")) ) self.srcdir = self._ensure_environ("SRC", os.path.realpath("..")) - self.ldflags = ["-lpthread", "-lresolv", "-ldl", "-lffi", "-lz"] + self.ldflags = ["-lpthread", "-lresolv", "-ldl", "-lffi", "-lz", "-llzma"] # defined in env self.cflags = ["-Wno-deprecated-declarations"] @@ -344,6 +344,18 @@ def _build(bld: Builder) -> None: if __name__ == "__main__": + + # install missing deps here rather than patching the Dockerfile in oss-fuzz + try: + subprocess.check_call( + ["apt-get", "install", "-y", "liblzma-dev"], stdout=open(os.devnull, "wb") + ) + except FileNotFoundError: + pass + except subprocess.CalledProcessError as e: + print(e.output) + sys.exit(1) + _builder = Builder() _build(_builder) sys.exit(0)