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

Merge pull request #153 from iiab/master

sync from iiab/iiab
This commit is contained in:
A Holt 2018-09-19 10:01:14 -04:00 committed by GitHub
commit a522d3f5fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 47 additions and 35 deletions

View file

@ -1,5 +1,5 @@
# Use these to tag a release at a point in time, for /etc/iiab/iiab.env # Use these to tag a release at a point in time, for /etc/iiab/iiab.env
iiab_base_ver: 6.6 iiab_base_ver: 6.7
iiab_revision: 0 iiab_revision: 0
# These entries should never be changed in this file. # These entries should never be changed in this file.

View file

@ -116,27 +116,36 @@ Known Issues
* |ss| As of August 2018, Calibre-Web doesn't yet include Calibre's e-book * |ss| As of August 2018, Calibre-Web doesn't yet include Calibre's e-book
conversion functionality (e.g. Calibre 3.27.1 [released 2018-07-06] allows conversion functionality (e.g. Calibre 3.27.1 [released 2018-07-06] allows
teachers to convert between PDF, EPUB, HTML, TXT etc — to permit reading on a teachers to convert between PDF, EPUB, TXT etc — to permit reading on a
wider array client devices and client software). |se| |nbsp| This new Calibre-Web wider array client devices and client software). |se| |nbsp| Fixed by
feature (which depends on Calibre's ebook-converter program) needs to be manually `janeczku/calibre-web#609 <https://github.com/janeczku/calibre-web/issues/609>`_
configured in IIAB 6.6 as of 2018-09-12: `janeczku/calibre-web#624 <https://github.com/janeczku/calibre-web/issues/624>`_ in early September 2018.
Specifically, to enable e-book conversion, log in as Admin/changeme (etc) then * |ss| This new Calibre-Web feature (which depends on Calibre's ebook-converter
click http://box/books -> Admin -> Basic Configuration -> External binaries. Then program) needs to be manually configured as of 2018-09-12:
change these 2 settings: `janeczku/calibre-web#624 <https://github.com/janeczku/calibre-web/issues/624>`_
|se| |nbsp| Fixed by `#1127 <https://github.com/iiab/iiab/pull/1127>`_ on 2018-09-12.
To manually enable the converting of e-books (automated above, should no
longer be necessary!) log in to http://box/books as Admin/changeme (etc) then
click Admin -> Basic Configuration -> External binaries. Then change these
2 settings:
* Change radio button "No converter" to "Use calibre's ebook converter" * Change radio button "No converter" to "Use calibre's ebook converter"
* In textfield "Path to convertertool" type in: ``/usr/bin/ebook-convert`` * In textfield "Path to convertertool" type in: ``/usr/bin/ebook-convert``
Then:
* Submit * Submit
* Verify that "ebook-convert" appears on Calibre-Web's "About" page at http://box/books/stats * Verify that "ebook-convert" appears on Calibre-Web's "About" page at http://box/books/stats
* Test it by clicking any e-book -> Edit metadata -> Convert book format * Test it by clicking any e-book -> Edit metadata -> Convert book format
* http://192.168.0.x:8083 does not work, as a result of `iptables <https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L93>`_, * |ss| http://192.168.0.x:8083 does not work, as a result of `iptables <https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L93>`_,
even when ``services_externally_visible: true``. This is fixable, but perhaps even when ``services_externally_visible: true``. This is fixable, but perhaps
it's not a priority, as URL's like {http://192.168.0.x/books, it's not a priority, as URL's like {http://192.168.0.x/books,
http://10.8.0.x/books, http://127.0.0.1/books and http://box/books} all work. http://10.8.0.x/books, http://127.0.0.1/books and http://box/books} all work. |se| |nbsp| Marked as "wontfix" on 2018-09-12: `#1050 <https://github.com/iiab/iiab/issues/1050>`_
* Calibre-Web does not currently use version numbers, so glitches might * Calibre-Web does not currently use version numbers, so glitches may
occasionally arise, when upstream developers change its master branch without occasionally arise, when upstream developers change its master branch without
warning. warning.

Binary file not shown.

View file

@ -1,4 +1,4 @@
- name: Create calibre-web folders to store data and configuration files - name: Create Calibre-Web folders to store data and configuration files
file: file:
path: "{{ item }}" path: "{{ item }}"
owner: "{{ calibreweb_user }}" owner: "{{ calibreweb_user }}"
@ -11,7 +11,7 @@
- "{{ calibreweb_config }}" - "{{ calibreweb_config }}"
## TODO: Calibre-web future release might get into pypi https://github.com/janeczku/calibre-web/issues/456 ## TODO: Calibre-web future release might get into pypi https://github.com/janeczku/calibre-web/issues/456
- name: Download calibre-web github repository - name: Download Calibre-Web github repository
git: git:
repo: https://github.com/janeczku/calibre-web.git repo: https://github.com/janeczku/calibre-web.git
dest: "{{ calibreweb_venv_path }}" dest: "{{ calibreweb_venv_path }}"
@ -30,7 +30,7 @@
# ignore_errors: True # ignore_errors: True
## ##
# Implementing this with Ansible command module for now. # Implementing this with Ansible command module for now.
- name: Download calibre-web dependencies into virtual environment - name: Download Calibre-Web dependencies into virtual environment
pip: pip:
requirements: "{{ calibreweb_venv_path }}/requirements.txt" requirements: "{{ calibreweb_venv_path }}/requirements.txt"
virtualenv: "{{ calibreweb_venv_path }}" virtualenv: "{{ calibreweb_venv_path }}"
@ -43,7 +43,7 @@
src: "{{ calibreweb_venv_path }}/lib/python2.7/site-packages" src: "{{ calibreweb_venv_path }}/lib/python2.7/site-packages"
dest: "{{ calibreweb_venv_path }}/vendor" dest: "{{ calibreweb_venv_path }}/vendor"
- name: Create calibre-web systemd service unit file and calibre-web.conf for Apache - name: Create Calibre-Web systemd service unit file and calibre-web.conf for Apache
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
@ -84,7 +84,7 @@
when: not metadatadb.stat.exists when: not metadatadb.stat.exists
#when: calibreweb_provision #when: calibreweb_provision
- name: Enable and restart calibre-web service - name: Enable and restart 'calibre-web' service
systemd: systemd:
name: calibre-web name: calibre-web
daemon_reload: yes daemon_reload: yes
@ -101,7 +101,7 @@
# command: apachectl -k graceful # command: apachectl -k graceful
# when: calibreweb_enabled # when: calibreweb_enabled
- name: Disable calibre-web service - name: Disable 'calibre-web' service
systemd: systemd:
name: calibre-web name: calibre-web
daemon_reload: yes daemon_reload: yes
@ -109,7 +109,7 @@
state: stopped state: stopped
when: not calibreweb_enabled when: not calibreweb_enabled
- name: Disable http://box/calibre-web with Apache - name: Disable http://box{{ calibreweb_url }} with Apache
command: a2dissite calibre-web.conf command: a2dissite calibre-web.conf
when: not calibreweb_enabled when: not calibreweb_enabled

View file

@ -1,9 +1,9 @@
# Which kiwix-tools to download from http://download.iiab.io/packages/ # 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/ # As obtained from http://download.kiwix.org/release/kiwix-tools/ or http://download.kiwix.org/nightly/
kiwix_version_armhf: "kiwix-tools_linux-armhf-0.6.1" kiwix_version_armhf: "kiwix-tools_linux-armhf-0.6.1-1"
kiwix_version_linux64: "kiwix-tools_linux-x86_64-0.6.1" kiwix_version_linux64: "kiwix-tools_linux-x86_64-0.6.1-1"
kiwix_version_i686: "kiwix-tools_linux-i586-0.6.1" kiwix_version_i686: "kiwix-tools_linux-i586-0.6.1-1"
# kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2" # kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2"
# v0.9 for i686 published May 2014 ("use it to test legacy ZIM content") # 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: # v0.10 for i686 published Oct 2016 ("experimental") REPLACED IN EARLY 2018, thx to Matthieu Gautier:

View file

@ -83,7 +83,7 @@
- rewrite - rewrite
when: is_debuntu when: is_debuntu
# 4. CREATE/ENABLE/DISABLE KIWIX SERVICE & ITS CRON JOB # 4. CREATE/ENABLE/RESTART (OR DISABLE) KIWIX SERVICE & ITS CRON JOB
- name: Create 'kiwix-serve' service and related files - name: Create 'kiwix-serve' service and related files
template: template:
@ -101,10 +101,11 @@
# - { src: 'iiab-make-apache-config.py', dest: '/usr/bin/iiab-make-apache-config.py', mode: '0755'} # - { src: 'iiab-make-apache-config.py', dest: '/usr/bin/iiab-make-apache-config.py', mode: '0755'}
- { src: 'kiwix.conf.j2', dest: '/etc/{{ apache_config_dir }}/kiwix.conf', mode: '0644'} - { src: 'kiwix.conf.j2', dest: '/etc/{{ apache_config_dir }}/kiwix.conf', mode: '0644'}
- name: Enable Kiwix Proxy in Apache - is disabled by turning off kiwix service - name: Enable Kiwix Proxy in Apache - is disabled by turning off kiwix service (debuntu)
file: path=/etc/apache2/sites-enabled/kiwix.conf file:
src=/etc/apache2/sites-available/kiwix.conf src: /etc/apache2/sites-available/kiwix.conf
state=link path: /etc/apache2/sites-enabled/kiwix.conf
state: link
when: is_debuntu when: is_debuntu
- name: Enable 'kiwix-serve' service - name: Enable 'kiwix-serve' service
@ -141,8 +142,10 @@
dest: /etc/crontab dest: /etc/crontab
when: kiwix_enabled and is_redhat when: kiwix_enabled and is_redhat
- name: Restart apache, so it picks up kiwix.conf - name: Restart Apache, so it picks up kiwix.conf
service: name={{ apache_service }} state=restarted service:
name: "{{ apache_service }}"
state: restarted
# 5. FINALIZE # 5. FINALIZE

View file

@ -1,19 +1,19 @@
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)" - name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)"
set_fact: set_fact:
kiwix_src_dir: "{{ kiwix_version_armhf }}" kiwix_src_dir: "{{ kiwix_version_armhf }}"
kiwix_src_file: "{{ kiwix_src_file_armhf }}" kiwix_src_file: "{{ kiwix_src_file_armhf }}"
when: ansible_machine == "armv7l" or ansible_machine == "armv6l" when: ansible_machine == "armv7l" or ansible_machine == "armv6l"
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)" - name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)"
set_fact: set_fact:
kiwix_src_dir: "{{ kiwix_version_linux64 }}" kiwix_src_dir: "{{ kiwix_version_linux64 }}"
kiwix_src_file: "{{ kiwix_src_file_linux64 }}" kiwix_src_file: "{{ kiwix_src_file_linux64 }}"
when: ansible_machine == "x86_64" when: ansible_machine == "x86_64"
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)" - name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)"
set_fact: set_fact:
kiwix_src_dir: "{{ kiwix_version_i686 }}" kiwix_src_dir: "{{ kiwix_version_i686 }}"
kiwix_src_file: "{{ kiwix_src_file_i686 }}" kiwix_src_file: "{{ kiwix_src_file_i686 }}"
when: ansible_machine == "i686" when: ansible_machine == "i686"
# COMMENT OUT LINE ABOVE TO TEST i686 CODE PATH ON X86_64 (WORKS NOV 2017) # COMMENT OUT LINE ABOVE TO TEST i686 CODE PATH ON X86_64 (WORKS NOV 2017)

View file

@ -176,7 +176,7 @@ def add_libr_xml(kiwix_library_xml, zim_path, zimname, zimidx):
outp = subprocess.check_output(args) outp = subprocess.check_output(args)
except: #skip things that don't work except: #skip things that don't work
print 'skipping ' + filename print 'skipping ' + zimname
pass pass
def init(): def init():