Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugmon] Remove unnecessary pernosco lib copy #551

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions recipes/linux/poetry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# supports-test

set -e
set -x
set -o pipefail

# shellcheck source=recipes/linux/common.sh
source "${0%/*}/common.sh"

#### Install Python Poetry

case "${1-install}" in
install)
sys-embed \
python3
apt-install-auto pipx

PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin retry pipx install poetry==1.8.3
;;
test)
poetry -h
;;
esac
1 change: 1 addition & 0 deletions services/bugmon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ENV LOGNAME worker
ENV HOSTNAME taskcluster-worker
ARG DEBIAN_FRONTEND=noninteractive

COPY recipes/linux/ /src/recipes/
COPY services/bugmon/setup.sh /src/recipes/setup-bugmon.sh

RUN /src/recipes/setup-bugmon.sh
Expand Down
6 changes: 0 additions & 6 deletions services/bugmon/launch-bugmon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export PATH=$PATH:/home/worker/.local/bin
export ARTIFACT_DEST="/bugmon-artifacts"
export TC_ARTIFACT_ROOT="project/fuzzing/bugmon"

retry-curl https://install.python-poetry.org | python3 - --version 1.7.0
git-clone https://github.com/MozillaSecurity/bugmon-tc.git ./bugmon-tc
cd bugmon-tc
poetry install
Expand All @@ -30,11 +29,6 @@ persist: false
persist-limit: 0
EOF

# Copy pernosco-shared to poetry python virtual env
BASE_PY_PATH="$(python3 -c 'import distutils.sysconfig;print(distutils.sysconfig.get_python_lib())')"
POETRY_PY_PATH="$(poetry run python3 -c 'import distutils.sysconfig;print(distutils.sysconfig.get_python_lib())')"
cp -r "$BASE_PY_PATH/pernoscoshared" "$POETRY_PY_PATH"

# Initialize the grizzly directory to avoid TC errors
mkdir -p /tmp/grizzly

Expand Down
3 changes: 2 additions & 1 deletion services/bugmon/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ source "${0%/*}/common.sh"
cd "${0%/*}"
./js32_deps.sh
./pernosco_submit.sh
./poetry.sh
sys-embed libc6-dbg:i386
./cleanup.sh

# Cleanup grizzly scripts
rm /home/worker/launch-grizzly*

#### Create aritfact directory
#### Create artifact directory
mkdir /bugmon-artifacts

#### Fix ownership
Expand Down
Loading