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

Merge pull request #89 from iiab/master

sync from iiab/iiab
This commit is contained in:
A Holt 2018-06-21 01:15:27 -04:00 committed by GitHub
commit 532e218d88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 85 additions and 194 deletions

View file

@ -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.

View file

@ -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)

View file

@ -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]

View file

@ -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:

View file

@ -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 }}"

View file

@ -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

View file

@ -1,133 +0,0 @@
<?php
# This file was automatically generated by the MediaWiki 1.29.1
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "{{ mediawiki_site_name }}";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "{{ mediawiki_url }}";
## The protocol and server name to use in fully-qualified URLs
#$wgServer = "http://{{ iiab_hostname }}.{{ iiab_domain }}";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL path to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "apache@{{ iiab_hostname }}.{{ iiab_domain }}";
$wgPasswordSender = "apache@{{ iiab_hostname }}.{{ iiab_domain }}";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "{{ mediawiki_db_name }}";
$wgDBuser = "{{ mediawiki_db_user }}";
$wgDBpassword = "{{ mediawiki_db_user_password }}";
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;
## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = false;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = false;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "en_US.utf8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = "7fe8694a015bc9faaa1be7151ea650485bf2df5a7bd86d0463da01ada946cd52";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "52eee9ee5a42b1d1";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Vector' );
# End of automatically generated settings.
# Add more configuration options below.

View file

@ -1,8 +1,9 @@
#!/bin/bash -e
echo -e '\nATTEMPTING TO INSTALL THE LATEST (RELEASED VERSION OF) ANSIBLE.'
echo -e 'Ensure you'"'"'re online before running this script!'
echo -e 'OR: consider scripts/ansible-2.4.x or scripts/ansible/2.5.x "slow food" instead.\n'
echo -e 'Ensure you'"'"'re online before running this! (/opt/iiab/iiab/scripts/ansible)'
echo -e 'INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation#do-everything-from-scratch'
echo -e 'ALTERNATIVES: Consider scripts/ansible-2.5.x "slow food" instead.\n'
GOOD_VER="2.5.4" # Ansible version for OLPC XO laptops (pip install).
# On other OS's we install/upgrade to THE latest (released version of) Ansible.
@ -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.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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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