From 915b3a4c272859dab233c7fd2c29d5786403a686 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 8 Nov 2018 14:14:11 -0500 Subject: [PATCH 1/5] Update main.yml --- roles/kiwix/defaults/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/kiwix/defaults/main.yml b/roles/kiwix/defaults/main.yml index 9c60cc995..9a3cbc6d7 100644 --- a/roles/kiwix/defaults/main.yml +++ b/roles/kiwix/defaults/main.yml @@ -1,9 +1,9 @@ # Which kiwix-tools to download from http://download.iiab.io/packages/ # As obtained from http://download.kiwix.org/release/kiwix-tools/ or http://download.kiwix.org/nightly/ -kiwix_version_armhf: "kiwix-tools_linux-armhf-0.7.0" -kiwix_version_linux64: "kiwix-tools_linux-x86_64-0.7.0" -kiwix_version_i686: "kiwix-tools_linux-i586-0.7.0" +kiwix_version_armhf: "kiwix-tools_linux-armhf-0.7.0-1" +kiwix_version_linux64: "kiwix-tools_linux-x86_64-0.7.0-1" +kiwix_version_i686: "kiwix-tools_linux-i586-0.7.0-1" # kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2" # v0.9 for i686 published May 2014 ("use it to test legacy ZIM content") # v0.10 for i686 published Oct 2016 ("experimental") REPLACED IN EARLY 2018, thx to Matthieu Gautier: From 88c952bdda0d0b379925904ffe20d059870ab1a4 Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Thu, 8 Nov 2018 17:30:38 -0500 Subject: [PATCH 2/5] make remove use id instead of array index --- roles/kiwix/templates/iiab-make-kiwix-lib.py | 37 ++++++++++---------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/roles/kiwix/templates/iiab-make-kiwix-lib.py b/roles/kiwix/templates/iiab-make-kiwix-lib.py index 29b2a4a68..a0c5ab713 100644 --- a/roles/kiwix/templates/iiab-make-kiwix-lib.py +++ b/roles/kiwix/templates/iiab-make-kiwix-lib.py @@ -31,7 +31,7 @@ from iiab_env import get_iiab_env # Config Files # iiab_ini_file should be in {{ iiab_env_file }} (/etc/iiab/iiab.env) ? iiab_ini_file = "{{ iiab_ini_file }}" # nominally /etc/iiab/iiab.ini -# iiab_ini_file = "/etc/iiab/iiab.ini" # comment out after testing +iiab_ini_file = "/etc/iiab/iiab.ini" # comment out after testing IIAB_INI = get_iiab_env('IIAB_INI') # future if IIAB_INI: @@ -51,7 +51,7 @@ old_zim_map = {"bad.zim" : "unparseable name"} # Working variables # zim_files - list of zims and possible index from file system -# path_to_array_map - list of zims in current library.xml with array index number (for delete) +# path_to_id_map - list of zims in current library.xml with id (for delete) zim_versions = {} # map of zim's generic name to version installed, e.g. wikipedia_es_all to wikipedia_es_all_2017-01 def main(): @@ -78,23 +78,21 @@ def main(): except OSError: pass zims_installed = {} - path_to_array_map = {} + path_to_id_map = {} else: - zims_installed, path_to_array_map = read_library_xml(kiwix_library_xml) + zims_installed, path_to_id_map = read_library_xml(kiwix_library_xml) zim_files = get_zim_list(zim_path) # Remove zims not in file system from library.xml remove_list_str = "" - for item in path_to_array_map: - if item not in zim_files: - remove_list_str += str(path_to_array_map[item]) + " " - if remove_list_str: - rem_libr_xml(remove_list_str) + for item in path_to_id_map: + if item not in zim_files: + rem_libr_xml(path_to_id_map[item]) # Add zims from file system that are not in library.xml for item in zim_files: - if item not in path_to_array_map: + if item not in path_to_id_map: add_libr_xml(kiwix_library_xml, zim_path, item, zim_files[item]) # Write Version Map @@ -139,13 +137,13 @@ def read_library_xml(lib_xml_file, kiwix_exclude_attr=[""]): # duplicated from i kiwix_exclude_attr.append("id") # don't include id kiwix_exclude_attr.append("favicon") # don't include large favicon zims_installed = {} - path_to_array_map = {} + path_to_id_map = {} try: tree = ET.parse(lib_xml_file) root = tree.getroot() xml_item_no = 0 for child in root: - xml_item_no += 1 # hopefully this is the array number + #xml_item_no += 1 # hopefully this is the array number attributes = {} if 'id' not in child.attrib: # is this necessary? implies there are records with no book id which would break index for removal print "xml record missing Book Id" @@ -154,17 +152,20 @@ def read_library_xml(lib_xml_file, kiwix_exclude_attr=[""]): # duplicated from i if attr not in kiwix_exclude_attr: attributes[attr] = child.attrib[attr] # copy if not id or in exclusion list zims_installed[id] = attributes - path_to_array_map[child.attrib['path']] = xml_item_no + path_to_id_map[child.attrib['path']] = id except IOError: zims_installed = {} - return zims_installed, path_to_array_map + return zims_installed, path_to_id_map -def rem_libr_xml(list_str): - command = kiwix_manage + " " + kiwix_library_xml + " remove " + list_str +def rem_libr_xml(id): + command = kiwix_manage + " " + kiwix_library_xml + " remove " + id print command args = shlex.split(command) - - outp = subprocess.check_output(args) + try: + outp = subprocess.check_output(args) + except subprocess.CalledProcessError as e: + if e.returncode != 2: # skip bogus file open error in kiwix-manage + print outp def add_libr_xml(kiwix_library_xml, zim_path, zimname, zimidx): command = kiwix_manage + " " + kiwix_library_xml + " add " + zim_path + "/" + zimname From daca23d3d8cb2ffa6008ce9fb3a87dae973c2973 Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Fri, 9 Nov 2018 17:10:36 -0500 Subject: [PATCH 3/5] comment out after testing --- roles/kiwix/templates/iiab-make-kiwix-lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kiwix/templates/iiab-make-kiwix-lib.py b/roles/kiwix/templates/iiab-make-kiwix-lib.py index a0c5ab713..2abe278b8 100644 --- a/roles/kiwix/templates/iiab-make-kiwix-lib.py +++ b/roles/kiwix/templates/iiab-make-kiwix-lib.py @@ -31,7 +31,7 @@ from iiab_env import get_iiab_env # Config Files # iiab_ini_file should be in {{ iiab_env_file }} (/etc/iiab/iiab.env) ? iiab_ini_file = "{{ iiab_ini_file }}" # nominally /etc/iiab/iiab.ini -iiab_ini_file = "/etc/iiab/iiab.ini" # comment out after testing +#iiab_ini_file = "/etc/iiab/iiab.ini" # comment out after testing IIAB_INI = get_iiab_env('IIAB_INI') # future if IIAB_INI: From 382fa66570f57be84c47bb7fdde7166d213f4bcd Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Mon, 12 Nov 2018 09:30:25 -0500 Subject: [PATCH 4/5] Update right side of Lokole email address Previously, the email address appeared as `username@iiab-box.lokole.ca`. With this change, the email address appears as `username@box.lan` See https://github.com/iiab/iiab/issues/1293 --- roles/lokole/templates/webapp_secrets.sh.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/lokole/templates/webapp_secrets.sh.j2 b/roles/lokole/templates/webapp_secrets.sh.j2 index 44dcfbae6..5bab658f5 100644 --- a/roles/lokole/templates/webapp_secrets.sh.j2 +++ b/roles/lokole/templates/webapp_secrets.sh.j2 @@ -1,4 +1,5 @@ export OPWEN_STATE_DIRECTORY='{{lokole_run_directory}}' export OPWEN_SESSION_KEY='{{ lookup('password', '/dev/null chars=ascii_letters,digits,_ length=32') }}' export OPWEN_PASSWORD_SALT='{{ lookup('password', '/dev/null chars=ascii_letters,digits,_ length=16') }}' -export OPWEN_CLIENT_NAME='iiab-{{ iiab_hostname }}' +export OPWEN_CLIENT_NAME='{{ iiab_hostname }}' +export OPWEN_ROOT_DOMAIN='{{ iiab_domain }}' From f2019a4a9f0c57ea1c9a09e7a4cfb712a87de66d Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 15 Nov 2018 12:43:39 -0500 Subject: [PATCH 5/5] Update main.yml --- roles/elgg/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/elgg/defaults/main.yml b/roles/elgg/defaults/main.yml index 2607f3ad7..732dcfe0d 100644 --- a/roles/elgg/defaults/main.yml +++ b/roles/elgg/defaults/main.yml @@ -1,5 +1,5 @@ elgg_xx: elgg -elgg_version: "2.3.8" +elgg_version: "2.3.9" # elgg_mysql_password: defined in default_vars elgg_url: /elgg