mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #3535 from jvonau/python2_fix2
notes and dependencies [& test adding Python 2 to Debian 12]
This commit is contained in:
commit
c9ed0a0410
2 changed files with 41 additions and 63 deletions
|
@ -20,6 +20,15 @@
|
||||||
when: not (is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310)
|
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.
|
# 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: Install Ubuntu keyrings on Debian
|
||||||
|
# get_url:
|
||||||
|
# url:
|
||||||
|
# dest: /etc/apt/keyrings/
|
||||||
|
# mode: 0644
|
||||||
|
# timeout: "{{ download_timeout }}"
|
||||||
|
# when: is_debian_12
|
||||||
|
|
||||||
|
# use key retrieval from mongodb
|
||||||
- name: Use scripts/install_python2.sh to install python2 and virtualenv
|
- name: Use scripts/install_python2.sh to install python2 and virtualenv
|
||||||
command: "{{ iiab_dir }}/scripts/install_python2.sh"
|
command: "{{ iiab_dir }}/scripts/install_python2.sh"
|
||||||
when: is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310
|
when: is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310
|
||||||
|
|
|
@ -1,81 +1,50 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# https://packages.debian.org/search?keywords=libpython2.7-stdlib&searchon=names&suite=all§ion=all
|
||||||
# https://packages.debian.org/bullseye/libpython2.7-stdlib
|
# https://packages.debian.org/bullseye/libpython2.7-stdlib
|
||||||
|
# https://packages.ubuntu.com/search?keywords=libpython2.7-stdlib&searchon=names&suite=all§ion=all
|
||||||
|
# https://packages.ubuntu.com/jammy-updates/libpython2.7-stdlib
|
||||||
|
|
||||||
|
# payload to be installed:
|
||||||
|
# libpython2-stdlib
|
||||||
|
# libpython2.7-minimal
|
||||||
|
# libpython2.7-stdlib
|
||||||
|
# python2-minimal
|
||||||
|
# python2.7-minimal
|
||||||
|
# python2.7
|
||||||
|
# python2
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
ARCH=$(dpkg --print-architecture)
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
apt -y install virtualenv
|
apt -y install virtualenv
|
||||||
apt -y install mime-support #transitional package
|
# https://github.com/iiab/iiab/pull/3535#issuecomment-1503626474
|
||||||
|
#apt -y install media-types libffi8 libssl3
|
||||||
|
|
||||||
# libpython2.7-stdlib from ubuntu-22.04 used in amd64 is compiled against libssl3 and libffi8
|
# libpython2.7-stdlib from ubuntu-22.04 used in amd64|arm64|armhf is compiled against libssl3 and libffi8
|
||||||
# `apt info libpython2.7-stdlib`
|
# `apt info libpython2.7-stdlib`
|
||||||
cd /tmp
|
cd /tmp
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
#"amd64")
|
"amd64")
|
||||||
#wget http://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi8_3.4.2-4_amd64.deb
|
# works on U23.04 x86_64 VM
|
||||||
#apt install ./libffi8_3.4.2-4_amd64.deb
|
cat << EOF > /etc/apt/sources.list.d/python2.list
|
||||||
|
deb [trusted=yes] http://archive.ubuntu.com/ubuntu jammy main universe
|
||||||
|
deb [trusted=yes] http://archive.ubuntu.com/ubuntu jammy-updates main universe
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
|
||||||
#wget http://mirrors.edge.kernel.org/ubuntu/pool/universe/p/python2.7/libpython2.7-minimal_2.7.18-13ubuntu2_amd64.deb
|
"arm64")
|
||||||
#apt install ./libpython2.7-minimal_2.7.18-13ubuntu2_amd64.deb
|
# gave 404 errors on U23.04 x86_64 VM need to circle back to U23.04 arm64 and confirm
|
||||||
|
cat << EOF > /etc/apt/sources.list.d/python2.list
|
||||||
#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
|
|
||||||
#;;
|
|
||||||
|
|
||||||
#"arm64")
|
|
||||||
#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
|
|
||||||
#;;
|
|
||||||
|
|
||||||
# trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu
|
|
||||||
"arm64"|"amd64")
|
|
||||||
apt -y install libffi8
|
|
||||||
cat << EOF >> /etc/apt/sources.list.d/python2.list
|
|
||||||
deb [trusted=yes] http://ports.ubuntu.com/ jammy main universe
|
deb [trusted=yes] http://ports.ubuntu.com/ jammy main universe
|
||||||
deb [trusted=yes] http://ports.ubuntu.com/ jammy-updates main universe
|
deb [trusted=yes] http://ports.ubuntu.com/ jammy-updates main universe
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"armhf")
|
"armhf")
|
||||||
#wget http://raspbian.raspberrypi.org/raspbian/pool/main/libf/libffi/libffi7_3.3-6_armhf.deb
|
# armhf compile flags differ between RasPiOS and Ubuntu
|
||||||
#apt install ./libffi7_3.3-6_armhf.deb
|
if ! [ -f /etc/rpi-issue ]; then
|
||||||
|
# these might change
|
||||||
#wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-13.2_armhf.deb
|
cat << EOF > /etc/apt/sources.list.d/python2.list
|
||||||
#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_2.7.18-13.2_armhf.deb
|
|
||||||
#apt install ./python2.7_2.7.18-13.2_armhf.deb
|
|
||||||
#rm *.deb
|
|
||||||
|
|
||||||
if [ -f /etc/rpi-issue ]; then
|
|
||||||
cat << EOF >> /etc/apt/sources.list.d/python2.list
|
|
||||||
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main
|
|
||||||
deb http://archive.raspberrypi.org/debian/ bullseye main
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
cat << EOF >> /etc/apt/sources.list.d/python2.list
|
|
||||||
deb http://ports.ubuntu.com/ jammy main universe
|
deb http://ports.ubuntu.com/ jammy main universe
|
||||||
deb http://ports.ubuntu.com/ jammy-updates main universe
|
deb http://ports.ubuntu.com/ jammy-updates main universe
|
||||||
EOF
|
EOF
|
||||||
|
@ -85,5 +54,5 @@ esac
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
apt -y install python2
|
apt -y install python2
|
||||||
rm /etc/apt/sources.list.d/python2.list
|
rm /etc/apt/sources.list.d/python2.list || true
|
||||||
apt update
|
apt update
|
||||||
|
|
Loading…
Add table
Reference in a new issue