1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Brute Force 'apt install ansible-core' on 32-bit legacy i386

This commit is contained in:
root 2023-08-10 22:54:02 -04:00
parent ef8126fffb
commit ba596cb5a3

View file

@ -200,6 +200,11 @@ echo -e "\napt update; apt install python3-venv"
$APT_PATH/apt update $APT_PATH/apt update
$APT_PATH/apt -y install python3-venv $APT_PATH/apt -y install python3-venv
if [[ $(dpkg --print-architecture) == i386 ]]; then
# 2023-08-10: Quick+Dirty (BRUTE FORCE) on legacy 32-bit i386 avoids #3547
# rust/wheels/cryptography compiling mess! DEBIAN 12+ OR SIMILAR REQUIRED!
$APT_PATH/apt -y install ansible-core # Bookworm ~= ansible-core 2.14.3
else
# 2023-03-22: OS's like Ubuntu 23.04 and Debian 12 (e.g. with Python 3.11+) ask # 2023-03-22: OS's like Ubuntu 23.04 and Debian 12 (e.g. with Python 3.11+) ask
# that virtual environments (venv) be used to safely isolate pip installs: # that virtual environments (venv) be used to safely isolate pip installs:
# https://peps.python.org/pep-0668 # https://peps.python.org/pep-0668
@ -213,15 +218,14 @@ python3 -m venv /usr/local/ansible
# #
# 2023-03-24 #3547 similar to #3459 re: cryptography, piwheels, rust. # 2023-03-24 #3547 similar to #3459 re: cryptography, piwheels, rust.
# Release problems chart: https://www.piwheels.org/project/cryptography/ # Release problems chart: https://www.piwheels.org/project/cryptography/
if ! dpkg --print-architecture | grep -q 64; then # 32-bit in general! # if ! dpkg --print-architecture | grep -q 64; then # 32-bit in general!
if [[ $(dpkg --print-architecture) == armhf ]]; then # 32-bit ARM if [[ $(dpkg --print-architecture) == armhf ]]; then # 32-bit ARM
/usr/local/ansible/bin/python3 -m pip install cryptography==40.0.1 /usr/local/ansible/bin/python3 -m pip install cryptography==40.0.1
else # else
# 2023-08-10: 'apt install rustc pkg-config libssl-dev' was not enough! # # 2023-08-10: 'apt install rustc pkg-config libssl-dev' was not enough!
# So we use apt to install cryptography 38.0.4 for Debian 12.1 -- where # # So we use apt to install cryptography 38.0.4 for Debian 12.1 -- where
# `dpkg --print-architecture` was i386 and `uname -m` was i686: # # `dpkg --print-architecture` was i386 and `uname -m` was i686:
$APT_PATH/apt -y install python3-cryptography # $APT_PATH/apt -y install python3-cryptography
fi
fi fi
# 2023-05-22: 2.14.6 was better than 2.15.0 for FreePBX (#3588, ansible/ansible#80863) # 2023-05-22: 2.14.6 was better than 2.15.0 for FreePBX (#3588, ansible/ansible#80863)
@ -231,6 +235,7 @@ cd /usr/local/ansible/bin
for bin in ansible*; do for bin in ansible*; do
ln -sf /usr/local/ansible/bin/"$bin" /usr/local/bin/"$bin" ln -sf /usr/local/ansible/bin/"$bin" /usr/local/bin/"$bin"
done done
fi
# (Re)running collection installs appears safe, with --force-with-deps to force # (Re)running collection installs appears safe, with --force-with-deps to force
# upgrade of collection and dependencies it pulls in. Note Ansible may support # upgrade of collection and dependencies it pulls in. Note Ansible may support