From 29d0f0bf902ed8d7ceedfa44f83cace5a780330c Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 09:29:22 -0500 Subject: [PATCH 01/15] notes and dependencies --- scripts/install_python2.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 12afe891d..8e3aaf70b 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -5,7 +5,7 @@ ARCH=$(dpkg --print-architecture) apt -y install virtualenv apt -y install mime-support #transitional package -# 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` cd /tmp case $ARCH in @@ -45,7 +45,7 @@ case $ARCH in # trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu "arm64"|"amd64") - apt -y install libffi8 + apt -y install libffi8 libssl3 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-updates main universe @@ -69,12 +69,15 @@ EOF #apt install ./python2.7_2.7.18-13.2_armhf.deb #rm *.deb +# armhf compile flags differ between RasPiOS and Ubuntu +# libssl1.1 would be available via bullseye if/when needed 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 + apt -y install libffi8 libssl3 cat << EOF >> /etc/apt/sources.list.d/python2.list deb http://ports.ubuntu.com/ jammy main universe deb http://ports.ubuntu.com/ jammy-updates main universe From 57833472a9eee5a3037d077204a9e97a9d853c2e Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 10:09:05 -0500 Subject: [PATCH 02/15] media-types --- scripts/install_python2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 8e3aaf70b..8b6ee9536 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -3,7 +3,7 @@ ARCH=$(dpkg --print-architecture) apt -y install virtualenv -apt -y install mime-support #transitional package +apt -y install media-types # libpython2.7-stdlib from ubuntu-22.04 used in amd64|arm64|armhf is compiled against libssl3 and libffi8 # `apt info libpython2.7-stdlib` From 32d40f038d32fe4864920de20538666a5d086d4a Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 10:57:39 -0500 Subject: [PATCH 03/15] more notes --- scripts/install_python2.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 8b6ee9536..ae672bf43 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -1,8 +1,12 @@ #!/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.ubuntu.com/search?keywords=libpython2.7-stdlib&searchon=names&suite=all§ion=all +# https://packages.ubuntu.com/jammy-updates/libpython2.7-stdlib ARCH=$(dpkg --print-architecture) apt -y install virtualenv +# https://github.com/iiab/iiab/pull/3535#issuecomment-1503626474 apt -y install media-types # libpython2.7-stdlib from ubuntu-22.04 used in amd64|arm64|armhf is compiled against libssl3 and libffi8 From 5253c31d93f04977b23cf167b5ef474ea740ad5d Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 13:36:40 -0500 Subject: [PATCH 04/15] bookworm armhf --- scripts/install_python2.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index ae672bf43..a04b876d0 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -74,13 +74,7 @@ EOF #rm *.deb # armhf compile flags differ between RasPiOS and Ubuntu -# libssl1.1 would be available via bullseye if/when needed - 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 + if ! [ -f /etc/rpi-issue ]; then apt -y install libffi8 libssl3 cat << EOF >> /etc/apt/sources.list.d/python2.list deb http://ports.ubuntu.com/ jammy main universe @@ -92,5 +86,5 @@ esac apt update apt -y install python2 -rm /etc/apt/sources.list.d/python2.list +rm /etc/apt/sources.list.d/python2.list || true apt update From 6e08ff35ebbd763d4ffde111babec8fa7a49c5de Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 22:21:01 -0500 Subject: [PATCH 05/15] switch back to explicit dependencies --- scripts/install_python2.sh | 74 ++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index a04b876d0..61475e24c 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -7,54 +7,50 @@ ARCH=$(dpkg --print-architecture) apt -y install virtualenv # https://github.com/iiab/iiab/pull/3535#issuecomment-1503626474 -apt -y install media-types +apt -y install media-types libffi8 libssl3 # libpython2.7-stdlib from ubuntu-22.04 used in amd64|arm64|armhf is compiled against libssl3 and libffi8 # `apt info libpython2.7-stdlib` cd /tmp case $ARCH in - #"amd64") - #wget http://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi8_3.4.2-4_amd64.deb - #apt install ./libffi8_3.4.2-4_amd64.deb + "arm64") + 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://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://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://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://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://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://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 + rm *.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 - #;; + "amd64") + 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 - #"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://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://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://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://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 - #;; + 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 + rm *.deb + ;; # trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu - "arm64"|"amd64") - apt -y install libffi8 libssl3 - 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-updates main universe -EOF - ;; +# "arm64"|"amd64") +# apt -y install +# 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-updates main universe +#EOF +# ;; "armhf") #wget http://raspbian.raspberrypi.org/raspbian/pool/main/libf/libffi/libffi7_3.3-6_armhf.deb @@ -75,16 +71,14 @@ EOF # armhf compile flags differ between RasPiOS and Ubuntu if ! [ -f /etc/rpi-issue ]; then - apt -y install libffi8 libssl3 cat << EOF >> /etc/apt/sources.list.d/python2.list deb http://ports.ubuntu.com/ jammy main universe deb http://ports.ubuntu.com/ jammy-updates main universe EOF fi + apt update + apt -y install python2 + rm /etc/apt/sources.list.d/python2.list || true + apt update ;; esac - -apt update -apt -y install python2 -rm /etc/apt/sources.list.d/python2.list || true -apt update From f95db00faf64e3e7ff11a8af2e573e404449807a Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 22:34:00 -0500 Subject: [PATCH 06/15] switch order for easier diff --- scripts/install_python2.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 61475e24c..3d8595b3b 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -13,21 +13,6 @@ apt -y install media-types libffi8 libssl3 # `apt info libpython2.7-stdlib` cd /tmp case $ARCH in - "arm64") - 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 - rm *.deb - ;; - "amd64") 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 @@ -43,6 +28,21 @@ case $ARCH in rm *.deb ;; + "arm64") + 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 + rm *.deb + ;; + # trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu # "arm64"|"amd64") # apt -y install From e6c4170f7c817eb481dce2e53d1924b294729fb5 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 23:13:25 -0500 Subject: [PATCH 07/15] pending feedback keyring --- scripts/install_python2.sh | 56 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 3d8595b3b..72c08c5ef 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -13,44 +13,44 @@ apt -y install media-types libffi8 libssl3 # `apt info libpython2.7-stdlib` cd /tmp case $ARCH in - "amd64") - 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 + #"amd64") + #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/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.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 - rm *.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 + #rm *.deb ;; - "arm64") - 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 + #"arm64") + #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/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-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 - rm *.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 + #rm *.deb + #;; # trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu -# "arm64"|"amd64") -# apt -y install -# 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-updates main universe -#EOF -# ;; + "arm64"|"amd64") + apt -y install ubuntu-keyring + 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-updates main universe +EOF + ;; "armhf") #wget http://raspbian.raspberrypi.org/raspbian/pool/main/libf/libffi/libffi7_3.3-6_armhf.deb From 3aaeca991e0903457b0f33d117ad274bb9207999 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 23:18:53 -0500 Subject: [PATCH 08/15] using repos --- scripts/install_python2.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 72c08c5ef..3da8acb84 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -76,9 +76,10 @@ deb http://ports.ubuntu.com/ jammy main universe deb http://ports.ubuntu.com/ jammy-updates main universe EOF fi - apt update - apt -y install python2 - rm /etc/apt/sources.list.d/python2.list || true - apt update ;; esac + +apt update +apt -y install python2 +rm /etc/apt/sources.list.d/python2.list || true +apt update From 3e10fa7bf9e4e5fb49cea41ece852dbf7c89cc1c Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 11 Apr 2023 23:20:42 -0500 Subject: [PATCH 09/15] forgot a # --- scripts/install_python2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 3da8acb84..083904e03 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -26,7 +26,7 @@ case $ARCH in #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 #rm *.deb - ;; + #;; #"arm64") #wget http://ftp.debian.org/debian/pool/main/p/python2.7/libpython2.7-minimal_2.7.18-8_arm64.deb From df3590fb47d7db3568425c4c8590ef512793a6a9 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 12 Apr 2023 01:08:39 -0500 Subject: [PATCH 10/15] thoughts going forward --- roles/kalite/tasks/install.yml | 9 +++++++++ scripts/install_python2.sh | 16 +++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 6d0c8765e..674b18f03 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -20,6 +20,15 @@ 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: 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 command: "{{ iiab_dir }}/scripts/install_python2.sh" when: is_debian_12 or is_ubuntu_2304 or is_ubuntu_2310 diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 083904e03..3caa3f52e 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -45,10 +45,19 @@ case $ARCH in # trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu "arm64"|"amd64") - apt -y install ubuntu-keyring + #apt -y install ubuntu-keyring 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-updates main universe +# gave 404 errors on U23.04 x86_64 VM +#deb [trusted=yes] http://ports.ubuntu.com/ jammy main universe +#deb [trusted=yes] http://ports.ubuntu.com/ jammy-updates main universe + +# works on U23.04 x86_64 VM need to circle back to U23.04 arm64 and confirm +deb [trusted=yes] http://archive.ubuntu.com/ubuntu jammy main universe +deb [trusted=yes] http://archive.ubuntu.com/ubuntu jammy-updates main universe + +# keys for Debian future work maybe +#deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy main universe +#deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy-updates main universe EOF ;; @@ -72,6 +81,7 @@ EOF # armhf compile flags differ between RasPiOS and Ubuntu if ! [ -f /etc/rpi-issue ]; then cat << EOF >> /etc/apt/sources.list.d/python2.list +# these might change deb http://ports.ubuntu.com/ jammy main universe deb http://ports.ubuntu.com/ jammy-updates main universe EOF From ba2d00fd5af000ecad53c93a72895871cc01a3e2 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 12 Apr 2023 01:29:23 -0500 Subject: [PATCH 11/15] split the arm64/amd64 repos --- scripts/install_python2.sh | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index 3caa3f52e..f7d119742 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -13,7 +13,7 @@ apt -y install media-types libffi8 libssl3 # `apt info libpython2.7-stdlib` cd /tmp case $ARCH in - #"amd64") + "amd64") #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 @@ -26,9 +26,14 @@ case $ARCH in #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 #rm *.deb - #;; + # works on U23.04 x86_64 VM + 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 + ;; - #"arm64") + "arm64") #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 @@ -41,25 +46,21 @@ case $ARCH in #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 #rm *.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 +deb [trusted=yes] http://ports.ubuntu.com/ jammy main universe +deb [trusted=yes] http://ports.ubuntu.com/ jammy-updates main universe +EOF + ;; # trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu - "arm64"|"amd64") - #apt -y install ubuntu-keyring - cat << EOF >> /etc/apt/sources.list.d/python2.list -# gave 404 errors on U23.04 x86_64 VM -#deb [trusted=yes] http://ports.ubuntu.com/ jammy main universe -#deb [trusted=yes] http://ports.ubuntu.com/ jammy-updates main universe - -# works on U23.04 x86_64 VM need to circle back to U23.04 arm64 and confirm -deb [trusted=yes] http://archive.ubuntu.com/ubuntu jammy main universe -deb [trusted=yes] http://archive.ubuntu.com/ubuntu jammy-updates main universe - +# "arm64"|"amd64") +# cat << EOF >> /etc/apt/sources.list.d/python2.list # keys for Debian future work maybe #deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy main universe #deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy-updates main universe -EOF - ;; +#EOF +# ;; "armhf") #wget http://raspbian.raspberrypi.org/raspbian/pool/main/libf/libffi/libffi7_3.3-6_armhf.deb From 1738f7c54040784e0cf33a69565fb273be9a51c0 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 12 Apr 2023 01:38:04 -0500 Subject: [PATCH 12/15] always overwrite --- scripts/install_python2.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index f7d119742..f7f494b43 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -27,7 +27,7 @@ case $ARCH in #apt install ./python2.7_2.7.18-13ubuntu2_amd64.deb #rm *.deb # works on U23.04 x86_64 VM - cat << EOF >> /etc/apt/sources.list.d/python2.list + 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 @@ -47,7 +47,7 @@ EOF #apt install ./python2.7_2.7.18-8_arm64.deb #rm *.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 + 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-updates main universe EOF @@ -55,7 +55,7 @@ EOF # trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu # "arm64"|"amd64") -# cat << EOF >> /etc/apt/sources.list.d/python2.list +# cat << EOF > /etc/apt/sources.list.d/python2.list # keys for Debian future work maybe #deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy main universe #deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy-updates main universe @@ -81,7 +81,7 @@ EOF # armhf compile flags differ between RasPiOS and Ubuntu if ! [ -f /etc/rpi-issue ]; then - cat << EOF >> /etc/apt/sources.list.d/python2.list + cat << EOF > /etc/apt/sources.list.d/python2.list # these might change deb http://ports.ubuntu.com/ jammy main universe deb http://ports.ubuntu.com/ jammy-updates main universe From ca4cd1a2606cdb07c5d314ce3efc7b8c439b33e2 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 12 Apr 2023 01:58:41 -0500 Subject: [PATCH 13/15] apt export --- scripts/install_python2.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index f7f494b43..a18a3d316 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -3,6 +3,7 @@ # 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 +export DEBIAN_FRONTEND=noninteractive ARCH=$(dpkg --print-architecture) apt -y install virtualenv From 191ba3912995239964a9a49322075587ae38bd24 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 12 Apr 2023 02:28:05 -0500 Subject: [PATCH 14/15] seems to be always installed --- scripts/install_python2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index a18a3d316..cf51e4cd3 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -8,7 +8,7 @@ ARCH=$(dpkg --print-architecture) apt -y install virtualenv # https://github.com/iiab/iiab/pull/3535#issuecomment-1503626474 -apt -y install media-types libffi8 libssl3 +#apt -y install media-types libffi8 libssl3 # libpython2.7-stdlib from ubuntu-22.04 used in amd64|arm64|armhf is compiled against libssl3 and libffi8 # `apt info libpython2.7-stdlib` From fbb614b1c66c1b92c8714be6a1c6b7164fd8761e Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 12 Apr 2023 08:45:56 -0500 Subject: [PATCH 15/15] cleanup --- scripts/install_python2.sh | 63 ++++++++------------------------------ 1 file changed, 12 insertions(+), 51 deletions(-) diff --git a/scripts/install_python2.sh b/scripts/install_python2.sh index cf51e4cd3..d61b125d7 100755 --- a/scripts/install_python2.sh +++ b/scripts/install_python2.sh @@ -3,6 +3,16 @@ # 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) @@ -15,18 +25,6 @@ apt -y install virtualenv cd /tmp case $ARCH in "amd64") - #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 - #rm *.deb # works on U23.04 x86_64 VM cat << EOF > /etc/apt/sources.list.d/python2.list deb [trusted=yes] http://archive.ubuntu.com/ubuntu jammy main universe @@ -35,18 +33,6 @@ EOF ;; "arm64") - #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 - #rm *.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 deb [trusted=yes] http://ports.ubuntu.com/ jammy main universe @@ -54,36 +40,11 @@ deb [trusted=yes] http://ports.ubuntu.com/ jammy-updates main universe EOF ;; -# trusted is used for Debian and RasPiOS as the keys would be missing for Ubuntu -# "arm64"|"amd64") -# cat << EOF > /etc/apt/sources.list.d/python2.list -# keys for Debian future work maybe -#deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy main universe -#deb [signed-by=/usr/share/keyrings/ubuntu-keyring-2018-archive.gpg] http://ports.ubuntu.com/ jammy-updates main universe -#EOF -# ;; - "armhf") - #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_2.7.18-13.2_armhf.deb - #apt install ./python2.7_2.7.18-13.2_armhf.deb - #rm *.deb - -# armhf compile flags differ between RasPiOS and Ubuntu + # armhf compile flags differ between RasPiOS and Ubuntu if ! [ -f /etc/rpi-issue ]; then + # these might change cat << EOF > /etc/apt/sources.list.d/python2.list -# these might change deb http://ports.ubuntu.com/ jammy main universe deb http://ports.ubuntu.com/ jammy-updates main universe EOF