From 7f714e7c65d4de4497137c51fb0ae071353ca139 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 15 May 2023 16:51:08 -0400 Subject: [PATCH 1/3] Fix PR #3576, allowing regular Kiwix installs too! --- roles/kiwix/tasks/install.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/kiwix/tasks/install.yml b/roles/kiwix/tasks/install.yml index b28f3636e..0adaeef36 100644 --- a/roles/kiwix/tasks/install.yml +++ b/roles/kiwix/tasks/install.yml @@ -24,7 +24,17 @@ url: https://download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-armhf-3.4.0.tar.gz dest: "{{ downloads_dir }}" timeout: "{{ download_timeout }}" - register: kiwix_dl + #register: kiwix_dl # CLOBBERS kiwix_dl.dest WHEN THIS STANZA DOES NOT RUN :/ + when: kiwix_dl.dest == "/opt/iiab/downloads/kiwix-tools_linux-armhf-3.5.0.tar.gz" + +# Ansible does not allow changing individuals subfields in a dictionary, but +# this crude hack works, overwriting the entire kiwix_dl dictionary var with +# the single (needed) key/value pair. (Or "register: tmp_dl" could be set +# above, if its other [subfields, key/value pairs, etc] really mattered...) +- name: "2023-05-15: TEMPORARY PATCH REVERTING TO KIWIX-TOOLS 3.4.0 IF BUGGY 32-BIT (armhf) VERSION 3.5.0 IS DETECTED -- #3574" + set_fact: + kiwix_dl: + dest: /opt/iiab/downloads/kiwix-tools_linux-armhf-3.4.0.tar.gz when: kiwix_dl.dest == "/opt/iiab/downloads/kiwix-tools_linux-armhf-3.5.0.tar.gz" - name: Does {{ kiwix_path }}/bin already exist? (as a directory, symlink or file) From 58961b862c203d3152338b6e7e3e0849c0b55b38 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 15 May 2023 17:53:44 -0400 Subject: [PATCH 2/3] More consistent punctuation in local_vars files --- vars/default_vars.yml | 2 +- vars/local_vars_small.yml | 2 +- vars/local_vars_unittest.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 4786cbe94..fc2826b03 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -502,7 +502,7 @@ kiwix_apk_src: https://download.kiwix.org/release/kiwix-android/kiwix.apk postgresql_install: False postgresql_enabled: False -# Warning: Moodle is a serious LMS, that takes a while to install. +# Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False # FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, diff --git a/vars/local_vars_small.yml b/vars/local_vars_small.yml index de02105a9..35514ab81 100644 --- a/vars/local_vars_small.yml +++ b/vars/local_vars_small.yml @@ -295,7 +295,7 @@ kolibri_language: en # ar,bg-bg,bn-bd,de,el,en,es-es,es-419,fa,fr-fr,ff-cm,gu kiwix_install: True kiwix_enabled: True -# Warning: Moodle is a serious LMS, that takes a while to install. +# Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False # FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, diff --git a/vars/local_vars_unittest.yml b/vars/local_vars_unittest.yml index e5e086fd6..4cc01a9c6 100644 --- a/vars/local_vars_unittest.yml +++ b/vars/local_vars_unittest.yml @@ -295,7 +295,7 @@ kolibri_language: en # ar,bg-bg,bn-bd,de,el,en,es-es,es-419,fa,fr-fr,ff-cm,gu kiwix_install: False kiwix_enabled: False -# Warning: Moodle is a serious LMS, that takes a while to install. +# Warning: Moodle is a serious LMS, that takes a while to install moodle_install: False moodle_enabled: False # FYI 'nginx_high_php_limits: True' (explained above) is mandated with Moodle, From 8339e46c5d181964bae4a73694e4948f6e6d8ed5 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 16 May 2023 01:42:22 -0400 Subject: [PATCH 3/3] Set rpi_model from /proc/cpuinfo for QEMU --- scripts/local_facts.fact | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 27fa281fb..4debf731a 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -113,8 +113,9 @@ tmp=$(git rev-parse --verify HEAD) && IIAB_COMMIT=$tmp -grep -iq raspberry /proc/device-tree/model && - RPI_MODEL=$(grep -ai raspberry /proc/device-tree/model | tr -d '\0') +grep -iq raspberry /proc/cpuinfo && + RPI_MODEL=$(grep -i raspberry /proc/cpuinfo | sed 's/.*: //') + #RPI_MODEL=$(grep -ai raspberry /proc/device-tree/model | tr -d '\0') # /proc/device-tree/model e.g. 'Parallels ARM Virtual Machine' identical to... # /sys/firmware/devicetree/base/model (also true on RPi hardware!)