diff --git a/.zuul.d/jobs.yaml b/.zuul.d/jobs.yaml index 7aee5600..5360b6a9 100644 --- a/.zuul.d/jobs.yaml +++ b/.zuul.d/jobs.yaml @@ -132,6 +132,10 @@ Run the default tests on a Xenial build host with Python 3 parent: dib-functests-default nodeset: ubuntu-xenial + vars: + dib_functests_extra: + # Only builds on xenial; should work on focal in future + - pip-and-virtualenv/source-install-opensuse - job: name: dib-functests-xenial-python3-image diff --git a/diskimage_builder/elements/install-bin/pre-install.d/01-install-bin b/diskimage_builder/elements/install-bin/pre-install.d/01-install-bin index 12cd6294..59b38a01 100755 --- a/diskimage_builder/elements/install-bin/pre-install.d/01-install-bin +++ b/diskimage_builder/elements/install-bin/pre-install.d/01-install-bin @@ -6,6 +6,4 @@ fi set -eu set -o pipefail -for f in $(find $(dirname $0)/../bin/ -type f -executable -print); do - install -m 0755 -o root -g root $f /usr/local/bin -done +install -m 0755 -o root -g root $(dirname $0)/../bin/* /usr/local/bin diff --git a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip index bec0f624..c98dd649 100755 --- a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip +++ b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip @@ -29,6 +29,10 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then _clear_old_files=1 ;; fedora) + if [[ ${DIB_RELEASE} -gt 30 ]]; then + echo "This element is not supported for this version of Fedora" + exit 1 + fi _do_py3=1 packages="python2-virtualenv python2-pip python2-setuptools" packages=" python3-virtualenv python3-pip python3-setuptools" @@ -60,14 +64,17 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then _clear_old_files=1 ;; 15*) - # XXX: python3? - packages="python-xml python" - packages+=" python3-virtualenv python3-pip python3-setuptools" + _do_py3=1 + _clear_old_files=1 + # python*-six gets dragged in, and then is a + # distutils package and won't uninstall. put it + # here so it gets cleaned. + packages="python2-virtualenv python2-pip python2-setuptools python2-six" + packages+=" python3-virtualenv python3-pip python3-setuptools python3-six" ;; tumbleweed) - ### _do_py3=1 - packages="python-xml python" - packages+=" python3-virtualenv python3-pip python3-setuptools" + echo "This element is not supported for this platform" + exit 1 ;; esac ;; @@ -157,7 +164,9 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then # # Thus we need to *reinstall* the RPM version now, so those # files come back and system tools continue to work - dnf reinstall -y python3-setuptools + if [[ $DISTRO_NAME != opensuse ]]; then + dnf reinstall -y python3-setuptools + fi fi # now install latest virtualenv. it vendors stuff it needs so diff --git a/releasenotes/notes/pip-and-virtualenv-platform-removal-52e0d6a22829a3b2.yaml b/releasenotes/notes/pip-and-virtualenv-platform-removal-52e0d6a22829a3b2.yaml new file mode 100644 index 00000000..a9f459d4 --- /dev/null +++ b/releasenotes/notes/pip-and-virtualenv-platform-removal-52e0d6a22829a3b2.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - The ``pip-and-virtualenv`` element does not support Fedora 31 (and + greater) or Tumbleweed distributions.