diff --git a/roles/0-init/defaults/main.yml b/roles/0-init/defaults/main.yml index 667d3518b..6adb8394a 100644 --- a/roles/0-init/defaults/main.yml +++ b/roles/0-init/defaults/main.yml @@ -1,5 +1,5 @@ # Use these to tag a release at a point in time, for /etc/iiab/iiab.env -iiab_base_ver: 6.5 +iiab_base_ver: 6.6 iiab_revision: 0 # These entries should never be changed in this file. diff --git a/roles/calibre/tasks/debs.yml b/roles/calibre/tasks/debs.yml index b00a69d7f..74ce6539f 100644 --- a/roles/calibre/tasks/debs.yml +++ b/roles/calibre/tasks/debs.yml @@ -18,9 +18,13 @@ # If you want the latest Calibre, run the appropriate below script, standalone. # HOWEVER: it's strongly suggested you wait for apt (blessed by your OS!) -- name: Upgrade to Calibre testing .deb's - target Raspbian (rpi) - #command: scripts/calibre-install-latest-rpi.sh #fails with Calibre 3.24 & 3.25, and beyond? - command: scripts/calibre-install-latest.sh #Debian approach works for now (3.24 & 3.25) +- name: Install packages that Raspbian .deb's had installed for Calibre 3.23 (rpi) + #command: scripts/calibre-install-latest-rpi.sh # FAILS with Calibre 3.24+ ("calibre : Depends: python-pyqt5 (>= 5.10.1+dfsg-2) but 5.10.1+dfsg-1+rpi1 is to be installed") since June 2018. + command: scripts/calibre-install-packages.sh # BORROWED package list from /var/log/apt/history.log (that resulted from 2018-05-22 install of Calibre 3.23 using calibre-install-latest-rpi.sh). + when: is_rpi and internet_available + +- name: Upgrade to latest Calibre using Debian's own .deb's from testing (rpi) + command: scripts/calibre-install-latest.sh # NECESSARY since Calibre 3.24 (BEWARE installing libc6 will prevent boot in RPi Zero W, i.e. if calibre-install-packages.sh isn't run above!) when: is_rpi and internet_available - name: Upgrade to Calibre testing .deb's - target Ubuntu 16.04 (not rpi and not ubuntu_18) diff --git a/roles/calibre/templates/calibre-serve.service.j2 b/roles/calibre/templates/calibre-serve.service.j2 index 524845b6e..97e10d6d3 100644 --- a/roles/calibre/templates/calibre-serve.service.j2 +++ b/roles/calibre/templates/calibre-serve.service.j2 @@ -5,6 +5,7 @@ After=syslog.target network.target local-fs.target [Service] Type=forking PIDFile=/var/run/calibre.pid +TimeoutStartSec=400 ExecStart=/usr/bin/calibre-server --daemonize --log=/var/log/calibre.log --pidfile=/var/run/calibre.pid --port={{ calibre_port }} {{ calibre_dbpath }} [Install] diff --git a/roles/kiwix/defaults/main.yml b/roles/kiwix/defaults/main.yml index 172cdb5ce..4e3fe36ae 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-2018-05-24" -kiwix_version_linux64: "kiwix-tools_linux-x86_64-2018-05-24" -kiwix_version_i686: "kiwix-tools_linux-i586-2018-05-24" +kiwix_version_armhf: "kiwix-tools_linux-armhf-0.6.0" +kiwix_version_linux64: "kiwix-tools_linux-i586-0.6.0" +kiwix_version_i686: "kiwix-tools_linux-x86_64-0.6.0" # 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: diff --git a/roles/mediawiki/defaults/main.yml b/roles/mediawiki/defaults/main.yml index 708549e45..e75396acb 100644 --- a/roles/mediawiki/defaults/main.yml +++ b/roles/mediawiki/defaults/main.yml @@ -1,4 +1,4 @@ -mediawiki_major_version: "1.30" +mediawiki_major_version: "1.31" mediawiki_minor_version: "0" mediawiki_version: "{{ mediawiki_major_version }}.{{ mediawiki_minor_version }}" diff --git a/roles/mediawiki/tasks/install.yml b/roles/mediawiki/tasks/install.yml index 4b8768a42..cd89c0c71 100644 --- a/roles/mediawiki/tasks/install.yml +++ b/roles/mediawiki/tasks/install.yml @@ -53,7 +53,6 @@ --installdbpass={{ mediawiki_db_user_password }} --dbuser={{ mediawiki_db_user }} --dbpass={{ mediawiki_db_user_password }} - --server="{{ iiab_hostname }}.{{ iiab_domain }}" --scriptpath=/mediawiki --lang=en --pass={{ mediawiki_admin_user_password }} @@ -63,14 +62,6 @@ chdir: "{{ mediawiki_abs_path }}" creates: "{{ mediawiki_abs_path }}/LocalSettings.php" -- name: Copy mediawiki config file to change a few calculated settings - template: - src: LocalSettings.php.j2 - dest: "{{ mediawiki_abs_path }}/LocalSettings.php" - owner: root - group: "{{ apache_user }}" - mode: 0640 - - name: Copy mediawiki httpd conf file template: src: mediawiki.conf.j2 diff --git a/roles/mediawiki/templates/LocalSettings.php.j2 b/roles/mediawiki/templates/LocalSettings.php.j2 deleted file mode 100644 index 29546f93c..000000000 --- a/roles/mediawiki/templates/LocalSettings.php.j2 +++ /dev/null @@ -1,133 +0,0 @@ -> /etc/apt/sources.list.d/iiab-ansible.list #echo "deb http://ppa.launchpad.net/ansible/ansible-2.4/ubuntu xenial main" \ @@ -53,20 +55,21 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant else #CURR_VER=`ansible --version | head -n 1 | cut -f 2 -d " "` CURR_VER=`ansible --version | head -1 | awk '{print $2}'` # to match iiab-install - echo "Current ansible version installed is $CURR_VER" + echo "Currently installed Ansible version is: $CURR_VER" + echo -e "INTERNET-IN-A-BOX GENERALLY REQUIRES ANSIBLE VERSION: $GOOD_VER or higher\n" if [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then - echo "Please use your system's package manager to update ansible" + echo "Please use your system's package manager (or pip if nec) to update Ansible." exit 0 elif [ -f /etc/olpc-release ]; then - echo "Please use pip package manager to update ansible" + echo "Please use pip package manager to update Ansible." exit 0 #fi #if [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; then #echo "Ansible repo(s) found within /etc/apt/sources.list*" - echo -e '\nMANUAL INTERVENTION URGED: ANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" IF YOU WANT THE LATEST RELEASED VERSION OF ANSIBLE -- then re-run this script.\n' + echo -e 'MANUAL INTERVENTION URGED:\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE -- AND REMOVE ALL SIMILAR LINES TO ENSURE ANSIBLE UPDATES CLEANLY -- then re-run this script.\n' else - echo "Upstream ansible source repo not found, please uninstall ansible and re-run this script" + echo -e 'Upstream ansible source repo not found:\nPLEASE UNINSTALL ANSIBLE (run "apt purge ansible" or "pip uninstall ansible", depending how Ansible was originally installed) THEN RE-RUN THIS SCRIPT.' exit 1 fi fi @@ -75,7 +78,7 @@ if [ ! -f /etc/centos-release ] && [ ! -f /etc/fedora-release ] && [ ! -f /etc/o # Align IIAB with Ansible community's latest official release echo "Using apt to check for updates, then install/upgrade ansible" apt update - apt -y install ansible + apt -y --allow-downgrades install ansible # TEMPORARILY USE ANSIBLE 2.4.4 (REMOVE IT WITH "pip uninstall ansible") #pip install ansible==2.4.4 diff --git a/scripts/ansible-2.4.x b/scripts/ansible-2.4.x-deprecated similarity index 100% rename from scripts/ansible-2.4.x rename to scripts/ansible-2.4.x-deprecated diff --git a/scripts/ansible-2.5.x b/scripts/ansible-2.5.x index 53b076388..7f5c2f429 100755 --- a/scripts/ansible-2.5.x +++ b/scripts/ansible-2.5.x @@ -1,8 +1,9 @@ #!/bin/bash -e echo -e '\nATTEMPTING TO INSTALL THE LATEST ANSIBLE 2.5.x' -echo -e 'Ensure you'"'"'re online before running this script!' -echo -e 'OR: consider scripts/ansible to keep up-to-date with Ansible'"'"'s evolution.\n' +echo -e 'Ensure you'"'"'re online before running this! (/opt/iiab/iiab/scripts/ansible-2.5.x)' +echo -e 'INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation#do-everything-from-scratch' +echo -e 'ALTERNATIVE: Consider scripts/ansible to keep up-to-date as Ansible evolves.\n' GOOD_VER="2.5.4" # Ansible version for OLPC XO laptops (pip install). # On other OS's we attempt to install/upgrade/pin to the latest Ansible 2.5.x @@ -39,7 +40,8 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then apt update - apt -y install dirmngr python-pip python-setuptools python-wheel patch + #apt -y install dirmngr python-pip python-setuptools python-wheel patch + apt -y install dirmngr #echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \ # >> /etc/apt/sources.list.d/iiab-ansible.list echo "deb http://ppa.launchpad.net/ansible/ansible-2.5/ubuntu xenial main" \ @@ -53,20 +55,21 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant else #CURR_VER=`ansible --version | head -n 1 | cut -f 2 -d " "` CURR_VER=`ansible --version | head -1 | awk '{print $2}'` # to match iiab-install - echo "Current ansible version installed is $CURR_VER" + echo "Currently installed Ansible version is: $CURR_VER" + echo -e "INTERNET-IN-A-BOX GENERALLY REQUIRES ANSIBLE VERSION: $GOOD_VER or higher\n" if [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then - echo "Please use your system's package manager to update ansible" + echo "Please use your system's package manager (or pip if nec) to update Ansible." exit 0 elif [ -f /etc/olpc-release ]; then - echo "Please use pip package manager to update ansible" + echo "Please use pip package manager to update Ansible." exit 0 #fi #if [[ `grep -qi ansible /etc/apt/sources.list` ]] || [ -f /etc/apt/sources.list.d/ansible*.list ]; then elif (grep -qi ansible /etc/apt/sources.list) || (ls /etc/apt/sources.list.d/*ansible*.list >/dev/null 2>&1) ; then #echo "Ansible repo(s) found within /etc/apt/sources.list*" - echo -e '\nMANUAL INTERVENTION URGED: ANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible-2.5/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE 2.5.x -- AND REMOVE ALL SIMILAR LINES TO ENSURE ANSIBLE UPDATES CLEANLY -- then re-run this script.\n' + echo -e 'MANUAL INTERVENTION URGED:\nANSIBLE REPO(S) FOUND WITHIN /etc/apt/sources.list AND/OR /etc/apt/sources.list.d/*ansible*.list -- MUST CONTAIN LINE "deb http://ppa.launchpad.net/ansible/ansible-2.5/ubuntu xenial main" IF YOU WANT THE LATEST ANSIBLE 2.5.x -- AND REMOVE ALL SIMILAR LINES TO ENSURE ANSIBLE UPDATES CLEANLY -- then re-run this script.\n' else - echo "Upstream ansible source repo not found, please uninstall ansible and re-run this script" + echo -e 'Upstream ansible source repo not found:\nPLEASE UNINSTALL ANSIBLE (run "apt purge ansible" or "pip uninstall ansible", depending how Ansible was originally installed) THEN RE-RUN THIS SCRIPT.' exit 1 fi fi diff --git a/scripts/calibre-install-latest-rpi.sh b/scripts/calibre-install-latest-rpi.sh index ada054c88..092cbb00c 100755 --- a/scripts/calibre-install-latest-rpi.sh +++ b/scripts/calibre-install-latest-rpi.sh @@ -3,25 +3,7 @@ # Thanks to Jerry Vonau (https://github.com/jvonau) who made this critical # breakthrough possible! # -# Worked up to Calibre 3.23 from May 2018. -# Calibre 3.24 and 3.25 fail to "apt install" in June 2018: -# -# The following packages have unmet dependencies: -# calibre : Depends: python-pyqt5 (>= 5.10.1+dfsg-2) but 5.10.1+dfsg-1+rpi1 is to be installed -# E: Unable to correct problems, you have held broken packages. -# -# Debian approach (calibre-install-latest.sh) is the workaround for now: -# -# https://github.com/iiab/iiab/pull/833 -# -# Calibre 3.25 is the latest available from testing as of 2018-06-10: -# -# http://raspbian.raspberrypi.org/raspbian/pool/main/c/calibre/ -# http://archive.raspbian.org/raspbian/pool/main/c/calibre/ -# https://packages.debian.org/search?keywords=calibre -# http://deb.debian.org/debian/pool/main/c/calibre/ -# -# Might break future updates; you have been warned. +# SEE COMMENTS AT THE TOP OF scripts/calibre-install-packages.sh export DEBIAN_FRONTEND=noninteractive # Prepares to update to latest from testing diff --git a/scripts/calibre-install-latest.sh b/scripts/calibre-install-latest.sh index 7de7a163f..75142a5c2 100755 --- a/scripts/calibre-install-latest.sh +++ b/scripts/calibre-install-latest.sh @@ -3,14 +3,7 @@ # Thanks to Jerry Vonau (https://github.com/jvonau) who made this critical # breakthrough possible! # -# Calibre 3.25 is the latest available from testing as of 2018-06-10: -# -# https://packages.debian.org/search?keywords=calibre -# http://deb.debian.org/debian/pool/main/c/calibre/ -# http://raspbian.raspberrypi.org/raspbian/pool/main/c/calibre/ -# http://archive.raspbian.org/raspbian/pool/main/c/calibre/ -# -# Might break future updates; you have been warned. +# SEE COMMENTS AT THE TOP OF scripts/calibre-install-packages.sh export DEBIAN_FRONTEND=noninteractive # Drags in stock desktop dependencies without too much from testing below diff --git a/scripts/calibre-install-packages.sh b/scripts/calibre-install-packages.sh new file mode 100755 index 000000000..c11186671 --- /dev/null +++ b/scripts/calibre-install-packages.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Thanks to Jerry Vonau (https://github.com/jvonau) who made this critical +# breakthrough possible! +# +# Caveat: calibre-install-latest-rpi.sh worked up to Calibre 3.23 in May 2018, +# but fails to "apt install" Calibre 3.24+ in June 2018: +# +# The following packages have unmet dependencies: +# calibre : Depends: python-pyqt5 (>= 5.10.1+dfsg-2) but 5.10.1+dfsg-1+rpi1 is to be installed +# E: Unable to correct problems, you have held broken packages. + +# So the new recipe (2018-06-18) for RPi is: +# +# 1. "apt install calibre calibre-bin" (2.75.1, part of Raspbian OS) +# +# 2. calibre-install-packages.sh installs those packages that +# calibre-install-latest-rpi.sh used to install for Calibre 3.23: +# +# https://github.com/iiab/iiab/pull/839 +# +# 3. calibre-install-latest.sh installs Debian's own calibre & calibre-bin etc: +# +# https://github.com/iiab/iiab/pull/833 # WORKED ON RPI 3 AND RPI 3 B+ +# https://github.com/iiab/iiab/issues/835 # FAILED ON RPI ZERO W, DUE TO INSTALLING libc6 (IF ABOVE STEP 2 NOT RUN!) + +# FYI Calibre 3.25 (and early signs of 3.26) are the latest available from +# testing as of 2018-06-18: +# +# http://raspbian.raspberrypi.org/raspbian/pool/main/c/calibre/ +# http://archive.raspbian.org/raspbian/pool/main/c/calibre/ +# https://packages.debian.org/search?keywords=calibre +# http://deb.debian.org/debian/pool/main/c/calibre/ +# +# Might break future updates; you have been warned. + +export DEBIAN_FRONTEND=noninteractive +# Prepares to update to latest from testing +echo "deb http://raspbian.raspberrypi.org/raspbian/ testing main" > /etc/apt/sources.list.d/rpi-testing.list +apt update +# Packages below cribbed from Calibre 3.23 installation as recorded in /var/log/apt/history.log* +apt -y install libegl1 libegl-mesa0 libqt5sensors5 libbrotli1 libwoff1 libpodofo0.9.5 libjs-coffeescript python-regex libhyphen0 libqt5webchannel5 python-msgpack python-html5-parser libqt5positioning5 libpcre2-16-0 libglvnd0 libdrm-common python-sip libqt5svg5 libnih-dbus1 qt5-gtk-platformtheme libc6-dbg libqt5help5 libc6-dev libqt5dbus5 libqt5sql5-sqlite libc6 libqt5widgets5 locales libegl1-mesa python-pyqt5.qtsvg python-lxml fontconfig-config libqt5xml5 libgbm1 libqt5printsupport5 libqt5qml5 libc-l10n libqt5gui5 libc-bin libnih1 libqt5webkit5 python-pyqt5.qtwebkit libdrm2 libqt5core5a libfontconfig1 libqt5opengl5 libc-dev-bin python-pyqt5 libqt5network5 libqt5designer5 libqt5quick5 libqt5sql5 +# BUT DO NOT DO "apt -y install calibre calibre-bin" UNTIL calibre-install-latest.sh +# Removes last line, safer than: rm /etc/apt/sources.list.d/rpi-testing.list +sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list +# Clears the cache of testing +apt update