From 1e04b269ca75067e28ae3e6ecb60ac2d11ab5b3b Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Wed, 27 Jan 2021 10:38:02 +1300 Subject: Stop using pip-and-virtualenv diskimage element ALthough diskimage-builder will solve the issue eventually, but we still prefer to put the package installation under trove's own control. Story: 2008559 Task: 41697 Change-Id: Ie704db8233c4b797eeefa140c4a11427280dffd9 --- integration/scripts/files/elements/guest-agent/element-deps | 1 - .../install.d/guest-agent-source-install/31-guest-agent-install | 2 +- integration/scripts/files/elements/guest-agent/package-installs.yaml | 4 ++++ integration/scripts/functions_qemu | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/integration/scripts/files/elements/guest-agent/element-deps b/integration/scripts/files/elements/guest-agent/element-deps index 6dcd66dc..f16aabad 100644 --- a/integration/scripts/files/elements/guest-agent/element-deps +++ b/integration/scripts/files/elements/guest-agent/element-deps @@ -3,4 +3,3 @@ package-installs pkg-map source-repositories svc-map -pip-and-virtualenv diff --git a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install index 1eb66ffd..0cd63059 100755 --- a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install +++ b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install @@ -19,7 +19,7 @@ done install -D -g root -o ${GUEST_USERNAME} -m 0644 ${SCRIPTDIR}/guest-agent.logrotate /etc/logrotate.d/guest-agent # Create a virtual environment (with dependencies installed) for guest agent service -${DIB_PYTHON} -m virtualenv ${GUEST_VENV} +/usr/bin/python3 -m venv ${GUEST_VENV} ${GUEST_VENV}/bin/pip install pip --upgrade ${GUEST_VENV}/bin/pip install -U -c /opt/upper-constraints.txt /opt/guest-agent chown -R ${GUEST_USERNAME}:root ${GUEST_VENV} diff --git a/integration/scripts/files/elements/guest-agent/package-installs.yaml b/integration/scripts/files/elements/guest-agent/package-installs.yaml index 1cf7179f..6f2e7892 100644 --- a/integration/scripts/files/elements/guest-agent/package-installs.yaml +++ b/integration/scripts/files/elements/guest-agent/package-installs.yaml @@ -32,7 +32,11 @@ openssh-client: openssh-server: pollinate: psmisc: +python3-dev: +python3-pip: +python3-setuptools: python3-sqlalchemy: +python3-venv: rsync: rsyslog: ubuntu-cloudimage-keyring: diff --git a/integration/scripts/functions_qemu b/integration/scripts/functions_qemu index aa88f559..eef67356 100644 --- a/integration/scripts/functions_qemu +++ b/integration/scripts/functions_qemu @@ -62,7 +62,6 @@ function build_guest_image() { export DIB_CLOUD_INIT_DATASOURCES=${DIB_CLOUD_INIT_DATASOURCES:-"ConfigDrive"} elementes="$elementes cloud-init-datasources" - elementes="$elementes pip-and-virtualenv" elementes="$elementes pip-cache" elementes="$elementes guest-agent" elementes="$elementes ${guest_os}-docker" -- cgit v1.2.1