From 1ee6982c89d5505cc3e13923cfe0261a8541d3af Mon Sep 17 00:00:00 2001 From: Dostoievski Batista Date: Tue, 23 Jul 2024 14:44:50 -0300 Subject: [PATCH] Simplifying patch-builder use in builder container To make easier for the user to utilize the patch-builder tool we made 3 different changes: - stx-builder.Dockerfile: Add python modules to be installed when building the image. - buildrc: Add /stx/patch to $PATCH env variable, making "patch-builder" script more easy execute. - userenv: Update information in the "welcome" message for builder container. Test plan: PASS: Rebuild all containers, using: "./stx-init-env --rebuild" PASS: Test usual build process, using: "downloader" "build-pkgs" "build-image" PASS: Test patch builder, using: "patch-builder --recipe " Story: 2010676 Task: 50438 Change-Id: Ic458f58d376a64d3654c6f19e5d11d0e99f8d6f9 Signed-off-by: Dostoievski Batista --- stx/dockerfiles/stx-builder.Dockerfile | 5 ++++- stx/toCOPY/builder/buildrc | 3 ++- stx/toCOPY/builder/userenv | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/stx/dockerfiles/stx-builder.Dockerfile b/stx/dockerfiles/stx-builder.Dockerfile index f054878e..ca5bbde8 100644 --- a/stx/dockerfiles/stx-builder.Dockerfile +++ b/stx/dockerfiles/stx-builder.Dockerfile @@ -81,7 +81,10 @@ RUN pip3 --no-cache-dir install \ pulp_deb_client \ pulp_file_client \ progressbar \ - git+https://github.com/masselstine/aptly-api-client.git + git+https://github.com/masselstine/aptly-api-client.git \ + click \ + lxml \ + pycryptodomex # Misc files RUN sed -i '/^proxy_dns*/d' /etc/proxychains.conf && \ diff --git a/stx/toCOPY/builder/buildrc b/stx/toCOPY/builder/buildrc index a6555549..7eb1a72c 100644 --- a/stx/toCOPY/builder/buildrc +++ b/stx/toCOPY/builder/buildrc @@ -33,8 +33,9 @@ export STX_CONFIG_DIR=$MY_REPO_ROOT_DIR/stx-tools export PREFIX_BINARYLIST_DIR=debian-mirror-tools/config/debian/ export STX_BINARYLIST_DIR=$STX_CONFIG_DIR/$PREFIX_BINARYLIST_DIR export STX_GIT_SRC_DIR=$MY_REPO/stx/git +export PATCH_BUILDER_PATH=$MY_REPO/build-tools/stx/patch -export PATH=$PATH:$MY_BUILD_TOOLS_DIR/stx:/opt/LAT/lat +export PATH=$PATH:$MY_BUILD_TOOLS_DIR/stx:/opt/LAT/lat:$PATCH_BUILDER_PATH export PYTHONPATH=$PYTHONPATH:$MY_BUILD_TOOLS_DIR/stx export STX_MIRROR=/import/mirrors/starlingx diff --git a/stx/toCOPY/builder/userenv b/stx/toCOPY/builder/userenv index 2d42913c..61eb9956 100644 --- a/stx/toCOPY/builder/userenv +++ b/stx/toCOPY/builder/userenv @@ -50,6 +50,8 @@ To clean and re-build all packages: To make image (std and rt kernels are included): build-image +To build patches: + patch-builder --recipe EOF fi cd ${MY_WORKSPACE}