From 841a30d8fb44add7d19539f107da52fda077878e Mon Sep 17 00:00:00 2001 From: Daniel Gomez Date: Mon, 14 Feb 2022 13:31:39 +0100 Subject: bitbake: contrib: Fix hash server Dockerfile dependencies When building the Hash Equivalence server Dockerfile, some dependencies are missing in order to run the hash server properly: Traceback errors: Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc ModuleNotFoundError: No module named 'bb' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in from . import git File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in import bb.progress File "/opt/bbhashserv/lib/bb/progress.py", line 14, in import bb.build File "/opt/bbhashserv/lib/bb/build.py", line 27, in from bb import data, event, utils File "/opt/bbhashserv/lib/bb/data.py", line 36, in from bb import data_smart File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in import bb, bb.codeparser File "/opt/bbhashserv/lib/bb/codeparser.py", line 26, in import codegen ModuleNotFoundError: No module named 'codegen' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in from . import git File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in import bb.progress File "/opt/bbhashserv/lib/bb/progress.py", line 14, in import bb.build File "/opt/bbhashserv/lib/bb/build.py", line 27, in from bb import data, event, utils File "/opt/bbhashserv/lib/bb/data.py", line 36, in from bb import data_smart File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in import bb, bb.codeparser File "/opt/bbhashserv/lib/bb/codeparser.py", line 32, in from bb.pysh import pyshyacc, pyshlex File "/opt/bbhashserv/lib/bb/pysh/pyshyacc.py", line 13, in import bb.pysh.pyshlex as pyshlex File "/opt/bbhashserv/lib/bb/pysh/pyshlex.py", line 17, in from ply import lex ModuleNotFoundError: No module named 'ply' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1935, in from . import wget File "/opt/bbhashserv/lib/bb/fetch2/wget.py", line 30, in from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4' (Bitbake rev: 0bd637acfcba5a44230c291889d2a5ff571cb8c6) Signed-off-by: Daniel Gomez Signed-off-by: Richard Purdie --- bitbake/contrib/hashserv/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bitbake/contrib/hashserv/Dockerfile b/bitbake/contrib/hashserv/Dockerfile index d6fc728f37..74b4a3be1d 100644 --- a/bitbake/contrib/hashserv/Dockerfile +++ b/bitbake/contrib/hashserv/Dockerfile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT # # Copyright (c) 2021 Joshua Watt -# +# # Dockerfile to build a bitbake hash equivalence server container # # From the root of the bitbake repository, run: @@ -15,5 +15,9 @@ RUN apk add --no-cache python3 COPY bin/bitbake-hashserv /opt/bbhashserv/bin/ COPY lib/hashserv /opt/bbhashserv/lib/hashserv/ +COPY lib/bb /opt/bbhashserv/lib/bb/ +COPY lib/codegen.py /opt/bbhashserv/lib/codegen.py +COPY lib/ply /opt/bbhashserv/lib/ply/ +COPY lib/bs4 /opt/bbhashserv/lib/bs4/ ENTRYPOINT ["/opt/bbhashserv/bin/bitbake-hashserv"] -- cgit v1.2.3-54-g00ecf