diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 5fb192475..6d0c8765e 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -17,9 +17,13 @@ - python-setuptools # Provides setuptools-44 on recent OS's (last version compatible with python2) - virtualenv # Drags in 'python3-virtualenv' which in turn drags in 'python3-pip' -- for Ansible module 'pip' when used with 'virtualenv_command: /usr/bin/virtualenv' and 'virtualenv_python: python2.7' -- compare package 'python3-venv' used by roles {calibre-web, jupyterhub, lokole} state: present - #when: not (is_debian_9 or is_debian_10 or is_ubuntu_16 or is_ubuntu_17 or is_ubuntu_18 or is_ubuntu_19) + when: not (is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310) # 2020-03-31: Testing for {is_raspbian_9, is_raspbian_10} is not currently nec, as testing for {is_debian_9, is_debian_10} covers that already. +- name: Use scripts/install_python2.sh to install python2 and virtualenv + command: "{{ iiab_dir }}/scripts/install_python2.sh" + when: is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310 + - name: Use pip to pin setuptools to 44 in {{ kalite_venv }} # WAS: if Raspbian/Debian > 10 or Ubuntu > 19 pip: name: setuptools==44 diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh new file mode 100755 index 000000000..e057d1c6a --- /dev/null +++ b/scripts/install_python2.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# https://packages.debian.org/bullseye/libpython2.7-stdlib +ARCH=$(dpkg --print-architecture) + +apt -y install virtualenv +apt -y install mime-support #transitional package +#apt -y install libffi8 + +cd /tmp +case $ARCH in + "arm64") + wget http://ftp.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1n-0+deb11u4_arm64.deb + apt install ./libssl1.1_1.1.1n-0+deb11u4_arm64.deb + + wget http://ftp.debian.org/debian/pool/main/libf/libffi/libffi7_3.3-6_arm64.deb + apt install ./libffi7_3.3-6_arm64.deb + + wget http://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8_arm64.deb + apt install ./libpython2.7-minimal_2.7.18-8_arm64.deb + + wget http://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-stdlib_2.7.18-8_arm64.deb + apt install ./libpython2.7-stdlib_2.7.18-8_arm64.deb + + wget http://ftp.debian.org/debian/pool/main/p/python2.7/python2.7-minimal_2.7.18-8_arm64.deb + apt install ./python2.7-minimal_2.7.18-8_arm64.deb + + wget http://ftp.debian.org/debian/pool/main/p/python2.7/python2.7_2.7.18-8_arm64.deb + apt install ./python2.7_2.7.18-8_arm64.deb + ;; + + "amd64") + wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb + apt install ./libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb + + wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/libf/libffi7/libffi7_3.3-5ubuntu1_amd64.deb + apt install ./libffi7_3.3-5ubuntu1_amd64.deb + + wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu2_amd64.deb + apt install ./libpython2.7-minimal_2.7.18-13ubuntu2_amd64.deb + + wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/p/python2.7/libpython2.7-stdlib_2.7.18-13ubuntu2_amd64.deb + apt install ./libpython2.7-stdlib_2.7.18-13ubuntu2_amd64.deb + + wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/p/python2.7/python2.7-minimal_2.7.18-13ubuntu2_amd64.deb + apt install ./python2.7-minimal_2.7.18-13ubuntu2_amd64.deb + + wget http://mirrors.kernel.org/ubuntu/pool/universe/p/python2.7/python2.7_2.7.18-13ubuntu2_amd64.deb + apt install ./python2.7_2.7.18-13ubuntu2_amd64.deb + ;; + + "armhf") + wget http://archive.raspberrypi.org/debian/pool/main/o/openssl/libssl1.1_1.1.1n-0+deb11u4+rpt1_armhf.deb + apt install ./libssl1.1_1.1.1n-0+deb11u4+rpt1_armhf.deb + + wget http://raspbian.raspberrypi.org/raspbian/pool/main/libf/libffi/libffi7_3.3-6_armhf.deb + apt install ./libffi7_3.3-6_armhf.deb + + wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-13.2_armhf.deb + apt install ./libpython2.7-minimal_2.7.18-13.2_armhf.deb + + wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/python2.7/libpython2.7-stdlib_2.7.18-13.2_armhf.deb + apt install ./libpython2.7-stdlib_2.7.18-13.2_armhf.deb + + wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/python2.7/python2.7-minimal_2.7.18-13.2_armhf.deb + apt install ./python2.7-minimal_2.7.18-13.2_armhf.deb + + wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/python2.7/python2.7-minimal_2.7.18-13.2_armhf.deb + apt install ./python2.7_2.7.18-13.2_armhf.deb + ;; +esac +rm *.deb diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index ac2b73511..27fa281fb 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -84,6 +84,7 @@ case $OS_VER in "ubuntu-2204" | \ "ubuntu-2210" | \ "ubuntu-2304" | \ + "ubuntu-2310" | \ "linuxmint-21" | \ "raspbian-11" | \ "raspbian-12") diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 2e91080d9..4786cbe94 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -773,6 +773,7 @@ pbx_http_port: 83 is_debuntu: False # Covers all 4: Ubuntu, Linux Mint, Debian, Raspberry Pi OS (Raspbian) is_ubuntu: False # Covers: Ubuntu, Linux Mint +is_ubuntu_2310: False is_ubuntu_2304: False is_ubuntu_2210: False is_ubuntu_2204: False diff --git a/vars/ubuntu-2310.yml b/vars/ubuntu-2310.yml new file mode 100644 index 000000000..445ae061b --- /dev/null +++ b/vars/ubuntu-2310.yml @@ -0,0 +1,21 @@ +# Every is_ var is initially set to 'False' at the bottom of +# /opt/iiab/iiab/vars/default_vars.yml -- these 'True' lines override that: +is_debuntu: True +is_ubuntu: True # Opposite of is_debian for now +is_ubuntu_2310: True + +# proxy: squid +# proxy_user: proxy +# apache_service: apache2 +# apache_user: www-data +# smb_service: smbd +# nmb_service: nmbd +# systemctl_program: /bin/systemctl +# mysql_service: mariadb +# sshd_package: openssh-server +# sshd_service: ssh +# systemd_location: /lib/systemd/system +# php_version: "8.1" +# postgresql_version: 14 +# python_version: "3.10" +