* [PATCH] gitlab: force allow use of pip in Cirrus jobs
@ 2024-02-22 11:40 Daniel P. Berrangé
2024-02-22 12:39 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2024-02-22 11:40 UTC (permalink / raw)
To: qemu-devel
Cc: Philippe Mathieu-Daudé, Thomas Huth, Alex Bennée,
Wainer dos Santos Moschetta, Beraldo Leal,
Daniel P. Berrangé
Python is transitioning to a world where you're not allowed to use 'pip
install' outside of a virutal env by default. The rationale is to stop
use of pip clashing with distro provided python packages, which creates
a major headache on distro upgrades.
All our CI environments, however, are 100% disposable so the upgrade
headaches don't exist. Thus we can undo the python defaults to allow
pip to work.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
.gitlab-ci.d/cirrus/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
FYI lcitool recently added logic that purges the EXTERNALLY-MANAGED
marker in all the dockerfiles. QEMU will pick that up on the next
refresh, so Linux containers won't have trouble in future.
The macos/FreeBSD build env isn't fully managed by lcitool though,
so we need this manual addition to purge the marker that prevents
use of 'pip'.
This fixes the CI regression that just started hitting on Cirrus
CI macOS images, likely from homebrew python updates.
diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml
index 29d55c4aa3..43dd52dd19 100644
--- a/.gitlab-ci.d/cirrus/build.yml
+++ b/.gitlab-ci.d/cirrus/build.yml
@@ -21,7 +21,7 @@ build_task:
install_script:
- @UPDATE_COMMAND@
- @INSTALL_COMMAND@ @PKGS@
- - if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
+ - if test -n "@PYPI_PKGS@" ; then PYLIB=$(@PYTHON@ -c 'import sysconfig; print(sysconfig.get_path("stdlib"))'); rm -f $PYLIB/EXTERNALLY-MANAGED; @PIP3@ install @PYPI_PKGS@ ; fi
clone_script:
- git clone --depth 100 "$CI_REPOSITORY_URL" .
- git fetch origin "$CI_COMMIT_REF_NAME"
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab: force allow use of pip in Cirrus jobs
2024-02-22 11:40 [PATCH] gitlab: force allow use of pip in Cirrus jobs Daniel P. Berrangé
@ 2024-02-22 12:39 ` Philippe Mathieu-Daudé
2024-02-22 12:45 ` Thomas Huth
2024-02-23 9:45 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-22 12:39 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Thomas Huth, Alex Bennée, Wainer dos Santos Moschetta,
Beraldo Leal
On 22/2/24 12:40, Daniel P. Berrangé wrote:
> Python is transitioning to a world where you're not allowed to use 'pip
> install' outside of a virutal env by default. The rationale is to stop
> use of pip clashing with distro provided python packages, which creates
> a major headache on distro upgrades.
>
> All our CI environments, however, are 100% disposable so the upgrade
> headaches don't exist. Thus we can undo the python defaults to allow
> pip to work.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> .gitlab-ci.d/cirrus/build.yml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab: force allow use of pip in Cirrus jobs
2024-02-22 11:40 [PATCH] gitlab: force allow use of pip in Cirrus jobs Daniel P. Berrangé
2024-02-22 12:39 ` Philippe Mathieu-Daudé
@ 2024-02-22 12:45 ` Thomas Huth
2024-02-23 9:45 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2024-02-22 12:45 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel
Cc: Philippe Mathieu-Daudé, Alex Bennée,
Wainer dos Santos Moschetta, Beraldo Leal
On 22/02/2024 12.40, Daniel P. Berrangé wrote:
> Python is transitioning to a world where you're not allowed to use 'pip
> install' outside of a virutal env by default. The rationale is to stop
> use of pip clashing with distro provided python packages, which creates
> a major headache on distro upgrades.
>
> All our CI environments, however, are 100% disposable so the upgrade
> headaches don't exist. Thus we can undo the python defaults to allow
> pip to work.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> .gitlab-ci.d/cirrus/build.yml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> FYI lcitool recently added logic that purges the EXTERNALLY-MANAGED
> marker in all the dockerfiles. QEMU will pick that up on the next
> refresh, so Linux containers won't have trouble in future.
>
> The macos/FreeBSD build env isn't fully managed by lcitool though,
> so we need this manual addition to purge the marker that prevents
> use of 'pip'.
>
> This fixes the CI regression that just started hitting on Cirrus
> CI macOS images, likely from homebrew python updates.
>
> diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml
> index 29d55c4aa3..43dd52dd19 100644
> --- a/.gitlab-ci.d/cirrus/build.yml
> +++ b/.gitlab-ci.d/cirrus/build.yml
> @@ -21,7 +21,7 @@ build_task:
> install_script:
> - @UPDATE_COMMAND@
> - @INSTALL_COMMAND@ @PKGS@
> - - if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
> + - if test -n "@PYPI_PKGS@" ; then PYLIB=$(@PYTHON@ -c 'import sysconfig; print(sysconfig.get_path("stdlib"))'); rm -f $PYLIB/EXTERNALLY-MANAGED; @PIP3@ install @PYPI_PKGS@ ; fi
> clone_script:
> - git clone --depth 100 "$CI_REPOSITORY_URL" .
> - git fetch origin "$CI_COMMIT_REF_NAME"
Thanks, that works for me:
https://gitlab.com/thuth/qemu/-/jobs/6233183719
Tested-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitlab: force allow use of pip in Cirrus jobs
2024-02-22 11:40 [PATCH] gitlab: force allow use of pip in Cirrus jobs Daniel P. Berrangé
2024-02-22 12:39 ` Philippe Mathieu-Daudé
2024-02-22 12:45 ` Thomas Huth
@ 2024-02-23 9:45 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2024-02-23 9:45 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, Philippe Mathieu-Daudé, Thomas Huth,
Alex Bennée, Wainer dos Santos Moschetta, Beraldo Leal
On Thu, 22 Feb 2024 at 11:41, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> Python is transitioning to a world where you're not allowed to use 'pip
> install' outside of a virutal env by default. The rationale is to stop
> use of pip clashing with distro provided python packages, which creates
> a major headache on distro upgrades.
>
> All our CI environments, however, are 100% disposable so the upgrade
> headaches don't exist. Thus we can undo the python defaults to allow
> pip to work.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> .gitlab-ci.d/cirrus/build.yml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> FYI lcitool recently added logic that purges the EXTERNALLY-MANAGED
> marker in all the dockerfiles. QEMU will pick that up on the next
> refresh, so Linux containers won't have trouble in future.
>
> The macos/FreeBSD build env isn't fully managed by lcitool though,
> so we need this manual addition to purge the marker that prevents
> use of 'pip'.
>
> This fixes the CI regression that just started hitting on Cirrus
> CI macOS images, likely from homebrew python updates.
I've applied this directly to get the CI back to green; thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-23 9:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22 11:40 [PATCH] gitlab: force allow use of pip in Cirrus jobs Daniel P. Berrangé
2024-02-22 12:39 ` Philippe Mathieu-Daudé
2024-02-22 12:45 ` Thomas Huth
2024-02-23 9:45 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).