summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/calibre/PKGBUILD35
-rw-r--r--libre/calibre/libre.patch404
2 files changed, 243 insertions, 196 deletions
diff --git a/libre/calibre/PKGBUILD b/libre/calibre/PKGBUILD
index c9e0f8c2f..96e96370c 100644
--- a/libre/calibre/PKGBUILD
+++ b/libre/calibre/PKGBUILD
@@ -1,4 +1,3 @@
-# $Id$
# Maintainer (Arch): Jelle van der Waa <jelle@vdwaa.nl>
# Maintainer (Arch): Eli Schwartz <eschwartz@archlinux.org>
# Contributor (Arch): Daniel Wallace <danielwallace at gtmanfred dot com>
@@ -10,14 +9,15 @@
# Contributor: David P.<megver83@parabola.nu>
# Contributor: Jesús E.<heckyel@parabola.nu>
# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
+# Contributor: David Palma <dbpalma9@gmail.com>
# parabola changes and rationale:
# - removed decrompession engine for rar archives
pkgname=calibre
-pkgver=3.28.0
+pkgver=3.33.1
pkgrel=2
-pkgrel+=.parabola2
+pkgrel+=.par1
pkgdesc="Ebook management application"
pkgdesc+=", without nonfree decompression engine for RAR archives"
arch=('x86_64')
@@ -25,7 +25,7 @@ arch+=('i686' 'armv7h')
url="https://calibre-ebook.com/"
license=('GPL3')
depends=('python2-six' 'python2-dateutil' 'python2-cssutils' 'python2-dukpy'
- 'python2-mechanize' 'podofo' 'libwmf'
+ 'python2-mechanize' 'podofo' 'libwmf' 'jxrlib'
'chmlib' 'python2-lxml' 'libusbx' 'python2-html5-parser'
'python2-pillow' 'shared-mime-info' 'python2-dnspython' 'python2-msgpack'
'python2-pyqt5' 'python2-psutil' 'icu' 'libmtp' 'python2-dbus'
@@ -33,22 +33,22 @@ depends=('python2-six' 'python2-dateutil' 'python2-cssutils' 'python2-dukpy'
'qt5-svg' 'python2-regex' 'python2-pygments' 'mtdev'
'desktop-file-utils' 'gtk-update-icon-cache' 'optipng' 'udisks2')
makedepends=('qt5-x11extras' 'sip' 'xdg-utils')
+checkdepends=('xorg-server-xvfb')
optdepends=('ipython2: to use calibre-debug'
- 'poppler: required for converting pdf to html'
-)
+ 'poppler: required for converting pdf to html')
source=("https://download.calibre-ebook.com/${pkgver}/calibre-${pkgver}.tar.xz"
"https://calibre-ebook.com/signatures/${pkgname}-${pkgver}.tar.xz.sig"
'libre.patch')
-sha256sums=('241050cb89e5a70d3195cfd91ccf406919ac0bfb437e34b538c954c306d87b2c'
+sha256sums=('92bc940ac01e888058a5baa171dda8c75e9993dd419b58df3a11e3e55e3875ac'
'SKIP'
- 'f418669d2e32e917e3292350150015ed6dd13f8c2dd82ac5f1c5d20c112dd2e8')
+ '2f0d351ea3345fad6952ca15af1bbec5d88ed5b048303f4de960d5a8833868b6')
validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New longer key) <kovid@kovidgoyal.net>
prepare() {
cd "${pkgname}-${pkgver}"
# Remove unneeded files
- rm -rf resources/calibre-portable.*
+ rm -rf resources/${pkgname}-portable.*
# fix freedom issues
rm -v imgsrc/mimetypes/rar.svg
@@ -73,6 +73,15 @@ build() {
LANG='en_US.UTF-8' python2 setup.py gui
}
+check() {
+ cd "${pkgname}-${pkgver}"
+
+ # without xvfb-run this fails with much "Control socket failed to recv(), resetting"
+ # ERROR: test_websocket_perf (calibre.srv.tests.web_sockets.WebSocketTest)
+
+ LANG='en_US.UTF-8' xvfb-run python2 setup.py test
+}
+
package() {
cd "${pkgname}-${pkgver}"
@@ -88,6 +97,10 @@ package() {
cp -a man-pages/ "${pkgdir}/usr/share/man"
# Compiling bytecode FS#33392
- python2 -m compileall "${pkgdir}/usr/lib/calibre/"
- python2 -O -m compileall "${pkgdir}/usr/lib/calibre/"
+ # This is kind of ugly but removes traces of the build root.
+ while read -rd '' _file; do
+ _destdir="$(dirname "${_file#${pkgdir}}")"
+ python2 -m compileall -d "${_destdir}" "${_file}"
+ python2 -O -m compileall -d "${_destdir}" "${_file}"
+ done < <(find "${pkgdir}"/usr/lib/ -name '*.py' -print0)
}
diff --git a/libre/calibre/libre.patch b/libre/calibre/libre.patch
index 77fb69722..006d60214 100644
--- a/libre/calibre/libre.patch
+++ b/libre/calibre/libre.patch
@@ -1,19 +1,6 @@
---- calibre-3.28.0.orig/COPYRIGHT 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/COPYRIGHT 2018-08-08 17:04:07.751015011 -0500
-@@ -16,11 +16,6 @@
- Copyright: Various
- License: BSD
-
--Files: src/unrar/*
--Copyright: Various
--License: Non-free
-- Code can be distributed freely.
--
- Files: src/html5lib/*
- Copyright: Copyright (c) 2006-2013 James Graham and other contributors
- License: Expat
---- calibre-3.28.0.orig/manual/conversion.rst 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/manual/conversion.rst 2018-08-08 17:08:36.492073334 -0500
+diff -r -u calibre-3.33.1.orig/manual/conversion.rst calibre-3.33.1/manual/conversion.rst
+--- calibre-3.33.1.orig/manual/conversion.rst 2018-11-02 18:00:30.919968752 +0000
++++ calibre-3.33.1/manual/conversion.rst 2018-11-02 17:55:09.626637724 +0000
@@ -747,7 +747,7 @@
Comic book collections
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -23,8 +10,9 @@
.cbc file must contain a simple text file called comics.txt, encoded in UTF-8. The comics.txt file must contain
a list of the comics files inside the .cbc file, in the form filename:title, as shown below::
---- calibre-3.28.0.orig/manual/faq.rst 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/manual/faq.rst 2018-08-08 17:21:55.402248998 -0500
+diff -r -u calibre-3.33.1.orig/manual/faq.rst calibre-3.33.1/manual/faq.rst
+--- calibre-3.33.1.orig/manual/faq.rst 2018-11-02 18:00:30.919968752 +0000
++++ calibre-3.33.1/manual/faq.rst 2018-11-02 17:55:09.946637723 +0000
@@ -18,7 +18,7 @@
calibre supports the conversion of many input formats to many output formats.
It can convert every input format in the following list, to every output format.
@@ -34,8 +22,9 @@
*Output Formats:* AZW3, EPUB, DOCX, FB2, HTMLZ, OEB, LIT, LRF, MOBI, PDB, PMLZ, RB, PDF, RTF, SNB, TCR, TXT, TXTZ, ZIP
---- calibre-3.28.0.orig/manual/gui.rst 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/manual/gui.rst 2018-08-08 17:24:37.468179812 -0500
+diff -r -u calibre-3.33.1.orig/manual/gui.rst calibre-3.33.1/manual/gui.rst
+--- calibre-3.33.1.orig/manual/gui.rst 2018-11-02 18:00:30.919968752 +0000
++++ calibre-3.33.1/manual/gui.rst 2018-11-02 17:55:10.363304387 +0000
@@ -51,7 +51,7 @@
3. **Add books from directories, including sub-directories (Multiple books per directory, assumes every e-book file is a different book)**: Allows you to choose a directory. The directory and all its sub-directories are scanned recursively and any e-books found are added to the library. calibre assumes that each directory contains many books. All e-book files with the same name in a directory are assumed to be the same book in different formats. E-books with different names are added as different books.
@@ -45,8 +34,9 @@
5. **Add empty book (Book Entry with no formats)**: Allows you to create a blank book record. This can be used to then manually fill out the information about a book that you may not have yet in your collection.
---- calibre-3.28.0.orig/resources/mime.types 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/resources/mime.types 2018-08-08 17:28:00.022261290 -0500
+diff -r -u calibre-3.33.1.orig/resources/mime.types calibre-3.33.1/resources/mime.types
+--- calibre-3.33.1.orig/resources/mime.types 2018-11-02 18:00:29.396635432 +0000
++++ calibre-3.33.1/resources/mime.types 2018-11-02 17:55:10.713304381 +0000
@@ -138,7 +138,6 @@
application/prs.nprend
application/prs.plucker
@@ -71,19 +61,10 @@
application/x-cb7 cb7
application/x-cbc cbc
application/x-koboreader-ebook kobo
---- calibre-3.28.0.orig/session.vim 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/session.vim 2018-08-08 17:29:03.712685501 -0500
-@@ -10,7 +10,6 @@
- \'/usr/include/qt',
- \'/usr/include/freetype2',
- \'/usr/include/fontconfig',
-- \'src/unrar',
- \]
- let g:syntastic_c_include_dirs = g:syntastic_cpp_include_dirs
- let g:syntastic_python_flake8_exec = 'flake8-python2'
---- calibre-3.28.0.orig/setup/resources.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/setup/resources.py 2018-08-08 17:30:33.135267704 -0500
-@@ -341,7 +341,7 @@
+diff -r -u calibre-3.33.1.orig/setup/resources.py calibre-3.33.1/setup/resources.py
+--- calibre-3.33.1.orig/setup/resources.py 2018-11-02 18:00:30.683302087 +0000
++++ calibre-3.33.1/setup/resources.py 2018-11-02 17:55:11.076637713 +0000
+@@ -348,7 +348,7 @@
log = Log()
# log.outputs = []
for inf in supported_input_formats():
@@ -92,38 +73,15 @@
continue
for ouf in available_output_formats():
of = ouf if ouf == 'oeb' else 'dummy.'+ouf
---- calibre-3.28.0.orig/src/calibre/__init__.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/__init__.py 2018-08-08 17:32:28.929978667 -0500
-@@ -292,10 +292,7 @@
- # First use the file header to identify its type
- with open(path, 'rb') as f:
- id_ = f.read(3)
-- if id_ == b'Rar':
-- from calibre.utils.unrar import extract as rarextract
-- extractor = rarextract
-- elif id_.startswith(b'PK'):
-+ if id_.startswith(b'PK'):
- from calibre.libunzip import extract as zipextract
- extractor = zipextract
- if extractor is None:
-@@ -304,9 +301,6 @@
- if ext in ['zip', 'cbz', 'epub', 'oebzip']:
- from calibre.libunzip import extract as zipextract
- extractor = zipextract
-- elif ext in ['cbr', 'rar']:
-- from calibre.utils.unrar import extract as rarextract
-- extractor = rarextract
- if extractor is None:
- raise Exception('Unknown archive type')
- extractor(path, dir)
---- calibre-3.28.0.orig/src/calibre/customize/builtins.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/customize/builtins.py 2018-08-08 17:40:15.368673625 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/customize/builtins.py calibre-3.33.1/src/calibre/customize/builtins.py
+--- calibre-3.33.1.orig/src/calibre/customize/builtins.py 2018-11-02 18:00:30.683302087 +0000
++++ calibre-3.33.1/src/calibre/customize/builtins.py 2018-11-02 17:55:08.869971064 +0000
@@ -132,7 +132,7 @@
class ComicMetadataReader(MetadataReaderPlugin):
name = 'Read comic metadata'
-- file_types = set(['cbr', 'cbz'])
-+ file_types = set(['cbz'])
+- file_types = {'cbr', 'cbz'}
++ file_types = {'cbz'}
description = _('Extract cover from comic files')
def customization_help(self, gui=False):
@@ -157,7 +115,7 @@
-class RARMetadataReader(MetadataReaderPlugin):
-
- name = 'Read RAR metadata'
-- file_types = set(['rar'])
+- file_types = {'rar'}
- description = _('Read metadata from e-books in RAR archives')
-
- def get_metadata(self, stream, ftype):
@@ -168,9 +126,10 @@
class RBMetadataReader(MetadataReaderPlugin):
name = 'Read RB metadata'
---- calibre-3.28.0.orig/src/calibre/customize/ui.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/customize/ui.py 2018-08-08 17:41:34.028414098 -0500
-@@ -537,7 +537,7 @@
+diff -r -u calibre-3.33.1.orig/src/calibre/customize/ui.py calibre-3.33.1/src/calibre/customize/ui.py
+--- calibre-3.33.1.orig/src/calibre/customize/ui.py 2018-11-02 18:00:30.673302088 +0000
++++ calibre-3.33.1/src/calibre/customize/ui.py 2018-11-02 17:55:08.489971068 +0000
+@@ -538,7 +538,7 @@
if not is_disabled(plugin):
for format in plugin.file_types:
formats.add(format)
@@ -179,9 +138,10 @@
return formats
---- calibre-3.28.0.orig/src/calibre/devices/kobo/driver.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/devices/kobo/driver.py 2018-08-08 17:43:35.452867917 -0500
-@@ -85,7 +85,7 @@
+diff -r -u calibre-3.33.1.orig/src/calibre/devices/kobo/driver.py calibre-3.33.1/src/calibre/devices/kobo/driver.py
+--- calibre-3.33.1.orig/src/calibre/devices/kobo/driver.py 2018-11-02 18:00:30.656635421 +0000
++++ calibre-3.33.1/src/calibre/devices/kobo/driver.py 2018-11-02 17:55:11.443304372 +0000
+@@ -86,7 +86,7 @@
book_class = Book
# Ordered list of supported formats
@@ -190,8 +150,9 @@
CAN_SET_METADATA = ['collections']
VENDOR_ID = [0x2237]
---- calibre-3.28.0.orig/src/calibre/devices/misc.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/devices/misc.py 2018-08-08 17:45:28.051058218 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/devices/misc.py calibre-3.33.1/src/calibre/devices/misc.py
+--- calibre-3.33.1.orig/src/calibre/devices/misc.py 2018-11-02 18:00:30.656635421 +0000
++++ calibre-3.33.1/src/calibre/devices/misc.py 2018-11-02 17:55:11.786637709 +0000
@@ -448,7 +448,7 @@
EBOOK_DIR_MAIN = 'Documents'
SCAN_FROM_ROOT = True
@@ -201,8 +162,9 @@
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['RK28_SDK_DEMO', 'EINK_EBOOK_READE']
SUPPORTS_SUB_DIRS = True
---- calibre-3.28.0.orig/src/calibre/devices/mtp/filesystem_cache.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/devices/mtp/filesystem_cache.py 2018-08-08 17:46:49.257349041 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/devices/mtp/filesystem_cache.py calibre-3.33.1/src/calibre/devices/mtp/filesystem_cache.py
+--- calibre-3.33.1.orig/src/calibre/devices/mtp/filesystem_cache.py 2018-11-02 18:00:30.653302088 +0000
++++ calibre-3.33.1/src/calibre/devices/mtp/filesystem_cache.py 2018-11-02 17:55:12.123304377 +0000
@@ -18,7 +18,7 @@
from calibre.utils.icu import sort_key, lower
from calibre.ebooks import BOOK_EXTENSIONS
@@ -212,22 +174,9 @@
class FileOrFolder(object):
---- calibre-3.28.0.orig/src/calibre/ebooks/__init__.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/ebooks/__init__.py 2018-08-08 17:49:03.961196312 -0500
-@@ -30,9 +30,9 @@
- pass
-
-
--BOOK_EXTENSIONS = ['lrf', 'rar', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
-+BOOK_EXTENSIONS = ['lrf', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
- 'html', 'htmlz', 'xhtml', 'pdf', 'pdb', 'updb', 'pdr', 'prc', 'mobi', 'azw', 'doc',
-- 'epub', 'fb2', 'fbz', 'djv', 'djvu', 'lrx', 'cbr', 'cbz', 'cbc', 'oebzip',
-+ 'epub', 'fb2', 'fbz', 'djv', 'djvu', 'lrx', 'cbz', 'cbc', 'oebzip',
- 'rb', 'imp', 'odt', 'chm', 'tpz', 'azw1', 'pml', 'pmlz', 'mbp', 'tan', 'snb',
- 'xps', 'oxps', 'azw4', 'book', 'zbf', 'pobi', 'docx', 'docm', 'md',
- 'textile', 'markdown', 'ibook', 'ibooks', 'iba', 'azw3', 'ps', 'kepub', 'kfx']
---- calibre-3.28.0.orig/src/calibre/ebooks/comic/__init__.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/ebooks/comic/__init__.py 2018-08-08 17:50:32.240497402 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/ebooks/comic/__init__.py calibre-3.33.1/src/calibre/ebooks/comic/__init__.py
+--- calibre-3.33.1.orig/src/calibre/ebooks/comic/__init__.py 2018-11-02 18:00:30.639968755 +0000
++++ calibre-3.33.1/src/calibre/ebooks/comic/__init__.py 2018-11-02 17:55:12.803304368 +0000
@@ -4,7 +4,7 @@
__docformat__ = 'restructuredtext en'
@@ -237,21 +186,23 @@
'''
import sys
---- calibre-3.28.0.orig/src/calibre/ebooks/conversion/plugins/comic_input.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/ebooks/conversion/plugins/comic_input.py 2018-08-08 17:52:07.292822461 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/ebooks/conversion/plugins/comic_input.py calibre-3.33.1/src/calibre/ebooks/conversion/plugins/comic_input.py
+--- calibre-3.33.1.orig/src/calibre/ebooks/conversion/plugins/comic_input.py 2018-11-02 18:00:30.639968755 +0000
++++ calibre-3.33.1/src/calibre/ebooks/conversion/plugins/comic_input.py 2018-11-02 17:55:08.153304401 +0000
@@ -18,8 +18,8 @@
name = 'Comic Input'
author = 'Kovid Goyal'
- description = 'Optimize comic files (.cbz, .cbr, .cbc) for viewing on portable devices'
-- file_types = set(['cbz', 'cbr', 'cbc'])
+- file_types = {'cbz', 'cbr', 'cbc'}
+ description = 'Optimize comic files (.cbz, .cbc) for viewing on portable devices'
-+ file_types = set(['cbz', 'cbc'])
++ file_types = {'cbz', 'cbc'}
is_image_collection = True
commit_name = 'comic_input'
core_usage = -1
---- calibre-3.28.0.orig/src/calibre/ebooks/conversion/plumber.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/ebooks/conversion/plumber.py 2018-08-08 17:54:43.382359585 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/ebooks/conversion/plumber.py calibre-3.33.1/src/calibre/ebooks/conversion/plumber.py
+--- calibre-3.33.1.orig/src/calibre/ebooks/conversion/plumber.py 2018-11-02 18:00:30.636635421 +0000
++++ calibre-3.33.1/src/calibre/ebooks/conversion/plumber.py 2018-11-02 17:55:13.106637701 +0000
@@ -43,7 +43,7 @@
def supported_input_formats():
@@ -270,8 +221,24 @@
class Plumber(object):
---- calibre-3.28.0.orig/src/calibre/ebooks/metadata/archive.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/ebooks/metadata/archive.py 2018-08-08 17:58:43.264736057 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/ebooks/__init__.py calibre-3.33.1/src/calibre/ebooks/__init__.py
+--- calibre-3.33.1.orig/src/calibre/ebooks/__init__.py 2018-11-02 18:00:30.639968755 +0000
++++ calibre-3.33.1/src/calibre/ebooks/__init__.py 2018-11-02 17:55:12.459971039 +0000
+@@ -30,9 +30,9 @@
+ pass
+
+
+-BOOK_EXTENSIONS = ['lrf', 'rar', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
++BOOK_EXTENSIONS = ['lrf', 'zip', 'rtf', 'lit', 'txt', 'txtz', 'text', 'htm', 'xhtm',
+ 'html', 'htmlz', 'xhtml', 'pdf', 'pdb', 'updb', 'pdr', 'prc', 'mobi', 'azw', 'doc',
+- 'epub', 'fb2', 'fbz', 'djv', 'djvu', 'lrx', 'cbr', 'cbz', 'cbc', 'oebzip',
++ 'epub', 'fb2', 'fbz', 'djv', 'djvu', 'lrx', 'cbz', 'cbc', 'oebzip',
+ 'rb', 'imp', 'odt', 'chm', 'tpz', 'azw1', 'pml', 'pmlz', 'mbp', 'tan', 'snb',
+ 'xps', 'oxps', 'azw4', 'book', 'zbf', 'pobi', 'docx', 'docm', 'md',
+ 'textile', 'markdown', 'ibook', 'ibooks', 'iba', 'azw3', 'ps', 'kepub', 'kfx']
+diff -r -u calibre-3.33.1.orig/src/calibre/ebooks/metadata/archive.py calibre-3.33.1/src/calibre/ebooks/metadata/archive.py
+--- calibre-3.33.1.orig/src/calibre/ebooks/metadata/archive.py 2018-11-02 18:00:30.619968755 +0000
++++ calibre-3.33.1/src/calibre/ebooks/metadata/archive.py 2018-11-02 17:55:07.596637739 +0000
@@ -29,8 +29,6 @@
ans = None
if id_ == stringFileHeader:
@@ -287,7 +254,7 @@
description = _('Extract common e-book formats from archive files '
- '(ZIP/RAR). Also try to autodetect if they are actually '
- 'CBZ/CBR files.')
-- file_types = set(['zip', 'rar'])
+- file_types = {'zip', 'rar'}
+ '(ZIP). Also try to autodetect if they are actually '
+ 'CBZ files.')
+ file_types = set(['zip'])
@@ -343,8 +310,9 @@
if comment:
import json
---- calibre-3.28.0.orig/src/calibre/ebooks/oeb/iterator/book.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/ebooks/oeb/iterator/book.py 2018-08-08 18:00:54.085427361 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/ebooks/oeb/iterator/book.py calibre-3.33.1/src/calibre/ebooks/oeb/iterator/book.py
+--- calibre-3.33.1.orig/src/calibre/ebooks/oeb/iterator/book.py 2018-11-02 18:00:30.593302088 +0000
++++ calibre-3.33.1/src/calibre/ebooks/oeb/iterator/book.py 2018-11-02 17:55:13.416637692 +0000
@@ -157,7 +157,7 @@
self.spine = []
Spiny = partial(SpineItem, read_anchor_map=read_anchor_map, read_links=read_links,
@@ -354,8 +322,9 @@
for i in ordered:
spath = i.path
mt = None
---- calibre-3.28.0.orig/src/calibre/ebooks/pdf/from_comic.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/ebooks/pdf/from_comic.py 2018-08-08 18:02:19.338200024 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/ebooks/pdf/from_comic.py calibre-3.33.1/src/calibre/ebooks/pdf/from_comic.py
+--- calibre-3.33.1.orig/src/calibre/ebooks/pdf/from_comic.py 2018-11-02 18:00:30.576635422 +0000
++++ calibre-3.33.1/src/calibre/ebooks/pdf/from_comic.py 2018-11-02 17:55:13.706637692 +0000
@@ -3,7 +3,7 @@
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
@@ -365,19 +334,9 @@
import sys
from functools import partial
---- calibre-3.28.0.orig/src/calibre/gui2/__init__.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/__init__.py 2018-08-08 18:06:17.667314109 -0500
-@@ -189,8 +189,6 @@
- help=_('Confirm before deleting'))
- c.add_opt('main_window_geometry', default=None,
- help=_('Main window geometry'))
-- c.add_opt('new_version_notification', default=True,
-- help=_('Notify when a new version is available'))
- c.add_opt('use_roman_numerals_for_series_number', default=True,
- help=_('Use Roman numerals for series number'))
- c.add_opt('sort_tags_by', default='name',
---- calibre-3.28.0.orig/src/calibre/gui2/actions/add.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/actions/add.py 2018-08-08 18:12:40.156510208 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/actions/add.py calibre-3.33.1/src/calibre/gui2/actions/add.py
+--- calibre-3.33.1.orig/src/calibre/gui2/actions/add.py 2018-11-02 18:00:30.496635423 +0000
++++ calibre-3.33.1/src/calibre/gui2/actions/add.py 2018-11-02 17:55:07.003304405 +0000
@@ -36,8 +36,8 @@
(_('HTML books'), ['htm', 'html', 'xhtm', 'xhtml']),
(_('LIT books'), ['lit']),
@@ -389,16 +348,21 @@
(_('Wordprocessor files'), ['odt', 'doc', 'docx']),
]
-@@ -64,7 +64,7 @@
+@@ -64,10 +64,10 @@
'sub-directories (Multiple books per directory, assumes every '
'e-book file is a different book)')).triggered.connect(
self.add_recursive_multiple)
- arm = self.add_archive_menu = self.add_menu.addMenu(_('Add multiple books from archive (ZIP/RAR)'))
+ arm = self.add_archive_menu = self.add_menu.addMenu(_('Add multiple books from archive (ZIP)'))
- self.create_menu_action(arm, 'recursive-single-archive', _(
- 'One book per directory in the archive')).triggered.connect(partial(self.add_archive, True))
- self.create_menu_action(arm, 'recursive-multiple-archive', _(
-@@ -199,7 +199,7 @@
+ connect_lambda(self.create_menu_action(
+- arm, 'recursive-single-archive', _('One book per directory in the archive')).triggered,
+- self, lambda self: self.add_archive(True))
++ arm, 'recursive-single-archive', _('One book per directory in the archive')).triggered,
++ self, lambda self: self.add_archive(True))
+ connect_lambda(self.create_menu_action(
+ arm, 'recursive-multiple-archive', _('Multiple books per directory in the archive')).triggered,
+ self, lambda self: self.add_archive(False))
+@@ -201,7 +201,7 @@
def add_archive(self, single):
paths = choose_files(
self.gui, 'recursive-archive-add', _('Choose archive file'),
@@ -407,8 +371,9 @@
if paths:
self.do_add_recursive(paths, single, list_of_archives=True)
---- calibre-3.28.0.orig/src/calibre/gui2/actions/preferences.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/actions/preferences.py 2018-08-08 18:18:23.010850001 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/actions/preferences.py calibre-3.33.1/src/calibre/gui2/actions/preferences.py
+--- calibre-3.33.1.orig/src/calibre/gui2/actions/preferences.py 2018-11-02 18:00:30.493302089 +0000
++++ calibre-3.33.1/src/calibre/gui2/actions/preferences.py 2018-11-02 17:55:14.219971026 +0000
@@ -29,8 +29,6 @@
pm.addAction(QIcon(I('config.png')), _('Preferences'), self.do_config)
cm('welcome wizard', _('Run Welcome &wizard'),
@@ -418,8 +383,9 @@
if not DEBUG:
pm.addSeparator()
cm('restart', _('Restart in debug mode'), icon='debug.png',
---- calibre-3.28.0.orig/src/calibre/gui2/add.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/add.py 2018-08-08 18:20:08.403118707 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/add.py calibre-3.33.1/src/calibre/gui2/add.py
+--- calibre-3.33.1.orig/src/calibre/gui2/add.py 2018-11-02 18:00:30.493302089 +0000
++++ calibre-3.33.1/src/calibre/gui2/add.py 2018-11-02 17:55:14.443304356 +0000
@@ -167,9 +167,6 @@
prints('Corrupt ZIP file, trying to use local headers')
from calibre.utils.localunzip import extractall
@@ -430,8 +396,9 @@
return tdir
try:
---- calibre-3.28.0.orig/src/calibre/gui2/dialogs/comicconf.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/dialogs/comicconf.py 2018-08-08 18:21:23.623016298 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/dialogs/comicconf.py calibre-3.33.1/src/calibre/gui2/dialogs/comicconf.py
+--- calibre-3.33.1.orig/src/calibre/gui2/dialogs/comicconf.py 2018-11-02 18:00:30.473302090 +0000
++++ calibre-3.33.1/src/calibre/gui2/dialogs/comicconf.py 2018-11-02 17:55:14.649971023 +0000
@@ -33,7 +33,7 @@
class ComicConf(QDialog, Ui_Dialog):
@@ -441,8 +408,21 @@
QDialog.__init__(self, window)
Ui_Dialog.__init__(self)
self.setupUi(self)
---- calibre-3.28.0.orig/src/calibre/gui2/preferences/behavior.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/preferences/behavior.py 2018-08-08 18:23:06.608312344 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/__init__.py calibre-3.33.1/src/calibre/gui2/__init__.py
+--- calibre-3.33.1.orig/src/calibre/gui2/__init__.py 2018-11-02 18:00:30.496635423 +0000
++++ calibre-3.33.1/src/calibre/gui2/__init__.py 2018-11-02 17:55:13.969971028 +0000
+@@ -191,8 +191,6 @@
+ help=_('Confirm before deleting'))
+ c.add_opt('main_window_geometry', default=None,
+ help=_('Main window geometry'))
+- c.add_opt('new_version_notification', default=True,
+- help=_('Notify when a new version is available'))
+ c.add_opt('use_roman_numerals_for_series_number', default=True,
+ help=_('Use Roman numerals for series number'))
+ c.add_opt('sort_tags_by', default='name',
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/preferences/behavior.py calibre-3.33.1/src/calibre/gui2/preferences/behavior.py
+--- calibre-3.33.1.orig/src/calibre/gui2/preferences/behavior.py 2018-11-02 18:00:30.456635423 +0000
++++ calibre-3.33.1/src/calibre/gui2/preferences/behavior.py 2018-11-02 17:55:06.426637746 +0000
@@ -40,7 +40,6 @@
r('network_timeout', prefs)
@@ -455,13 +435,14 @@
input_map = prefs['input_format_order']
all_formats = set()
self.opt_input_order.clear()
-- for fmt in all_input_formats().union(set(['ZIP', 'RAR'])):
-+ for fmt in all_input_formats().union(set(['ZIP'])):
+- for fmt in all_input_formats().union({'ZIP', 'RAR'}):
++ for fmt in all_input_formats().union({'ZIP'}):
all_formats.add(fmt.upper())
for format in input_map + list(all_formats.difference(input_map)):
item = QListWidgetItem(format, self.opt_input_order)
---- calibre-3.28.0.orig/src/calibre/gui2/preferences/behavior.ui 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/preferences/behavior.ui 2018-08-08 18:25:38.618035818 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/preferences/behavior.ui calibre-3.33.1/src/calibre/gui2/preferences/behavior.ui
+--- calibre-3.33.1.orig/src/calibre/gui2/preferences/behavior.ui 2018-11-02 18:00:30.456635423 +0000
++++ calibre-3.33.1/src/calibre/gui2/preferences/behavior.ui 2018-11-02 17:55:14.843304353 +0000
@@ -16,13 +16,6 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@@ -476,15 +457,10 @@
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="opt_upload_news_to_device">
<property name="text">
---- calibre-3.28.0.orig/src/calibre/gui2/update.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/gui2/update.py 2018-08-08 18:32:36.418952354 -0500
-@@ -1,20 +1,18 @@
- __license__ = 'GPL v3'
- __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
-
--import re, binascii, cPickle, ssl, json
-+import binascii, cPickle
- from future_builtins import map
+diff -r -u calibre-3.33.1.orig/src/calibre/gui2/update.py calibre-3.33.1/src/calibre/gui2/update.py
+--- calibre-3.33.1.orig/src/calibre/gui2/update.py 2018-11-02 18:00:30.433302090 +0000
++++ calibre-3.33.1/src/calibre/gui2/update.py 2018-11-02 18:20:59.376626554 +0000
+@@ -6,15 +6,13 @@
from threading import Thread, Event
from PyQt5.Qt import (QObject, pyqtSignal, Qt, QUrl, QDialog, QGridLayout,
@@ -532,7 +508,7 @@
- except UnicodeDecodeError:
- version = u''
- ans = NO_CALIBRE_UPDATE
-- m = re.match(ur'(\d+)\.(\d+).(\d+)$', version)
+- m = re.match(unicode(r'(\d+)\.(\d+).(\d+)$'), version)
- if m is not None:
- ans = tuple(map(int, (m.group(1), m.group(2), m.group(3))))
- return ans
@@ -584,9 +560,35 @@
if not no_show_popup:
self._update_notification__ = UpdateNotification(calibre_version,
number_of_plugin_updates, parent=self)
---- calibre-3.28.0.orig/src/calibre/linux.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/linux.py 2018-08-08 18:34:23.357401169 -0500
-@@ -317,7 +317,7 @@
+diff -r -u calibre-3.33.1.orig/src/calibre/__init__.py calibre-3.33.1/src/calibre/__init__.py
+--- calibre-3.33.1.orig/src/calibre/__init__.py 2018-11-02 18:00:30.683302087 +0000
++++ calibre-3.33.1/src/calibre/__init__.py 2018-11-02 17:55:09.219971061 +0000
+@@ -298,10 +298,7 @@
+ # First use the file header to identify its type
+ with open(path, 'rb') as f:
+ id_ = f.read(3)
+- if id_ == b'Rar':
+- from calibre.utils.unrar import extract as rarextract
+- extractor = rarextract
+- elif id_.startswith(b'PK'):
++ if id_.startswith(b'PK'):
+ from calibre.libunzip import extract as zipextract
+ extractor = zipextract
+ if extractor is None:
+@@ -310,9 +307,6 @@
+ if ext in ['zip', 'cbz', 'epub', 'oebzip']:
+ from calibre.libunzip import extract as zipextract
+ extractor = zipextract
+- elif ext in ['cbr', 'rar']:
+- from calibre.utils.unrar import extract as rarextract
+- extractor = rarextract
+ if extractor is None:
+ raise Exception('Unknown archive type')
+ extractor(path, dir)
+diff -r -u calibre-3.33.1.orig/src/calibre/linux.py calibre-3.33.1/src/calibre/linux.py
+--- calibre-3.33.1.orig/src/calibre/linux.py 2018-11-02 18:00:30.409968757 +0000
++++ calibre-3.33.1/src/calibre/linux.py 2018-11-02 17:55:15.033304353 +0000
+@@ -318,7 +318,7 @@
):
for fmt in fmts:
is_input = group_title == input_group
@@ -595,9 +597,22 @@
continue
p = (get_parser(input_fmt=fmt) if is_input
else get_parser(output_fmt=fmt))
---- calibre-3.28.0.orig/src/calibre/test_build.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/test_build.py 2018-08-08 18:37:07.679895579 -0500
-@@ -216,10 +216,6 @@
+diff -r -u calibre-3.33.1.orig/src/calibre/srv/render_book.py calibre-3.33.1/src/calibre/srv/render_book.py
+--- calibre-3.33.1.orig/src/calibre/srv/render_book.py 2018-11-02 18:00:30.406635424 +0000
++++ calibre-3.33.1/src/calibre/srv/render_book.py 2018-11-02 17:54:41.786637925 +0000
+@@ -195,7 +195,7 @@
+ 'spine':spine,
+ 'link_uid': uuid4(),
+ 'book_hash': book_hash,
+- 'is_comic': input_fmt.lower() in {'cbc', 'cbz', 'cbr', 'cb7'},
++ 'is_comic': input_fmt.lower() in {'cbc', 'cbz', 'cb7'},
+ 'raster_cover_name': raster_cover_name,
+ 'title_page_name': titlepage_name,
+ 'has_maths': False,
+diff -r -u calibre-3.33.1.orig/src/calibre/test_build.py calibre-3.33.1/src/calibre/test_build.py
+--- calibre-3.33.1.orig/src/calibre/test_build.py 2018-11-02 18:00:30.406635424 +0000
++++ calibre-3.33.1/src/calibre/test_build.py 2018-11-02 17:55:15.236637685 +0000
+@@ -218,10 +218,6 @@
from calibre.gui2.win_file_dialogs import test
test()
@@ -608,8 +623,28 @@
@unittest.skipUnless(iswindows, 'WPD is windows only')
def test_wpd(self):
wpd = plugins['wpd'][0]
---- calibre-3.28.0.orig/src/calibre/utils/search_query_parser_test.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/utils/search_query_parser_test.py 2018-08-08 18:39:38.979651481 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/utils/file_type_icons.py calibre-3.33.1/src/calibre/utils/file_type_icons.py
+--- calibre-3.33.1.orig/src/calibre/utils/file_type_icons.py 2018-11-02 18:00:30.403302090 +0000
++++ calibre-3.33.1/src/calibre/utils/file_type_icons.py 2018-11-02 17:54:45.416637897 +0000
+@@ -16,7 +16,6 @@
+ 'png' : 'png',
+ 'bmp' : 'bmp',
+ 'cbz' : 'cbz',
+- 'cbr' : 'cbr',
+ 'svg' : 'svg',
+ 'html' : 'html',
+ 'htmlz' : 'html',
+@@ -28,7 +27,6 @@
+ 'lrx' : 'lrx',
+ 'pdf' : 'pdf',
+ 'pdr' : 'zero',
+- 'rar' : 'rar',
+ 'zip' : 'zip',
+ 'txt' : 'txt',
+ 'text' : 'txt',
+diff -r -u calibre-3.33.1.orig/src/calibre/utils/search_query_parser_test.py calibre-3.33.1/src/calibre/utils/search_query_parser_test.py
+--- calibre-3.33.1.orig/src/calibre/utils/search_query_parser_test.py 2018-11-02 18:00:30.396635424 +0000
++++ calibre-3.33.1/src/calibre/utils/search_query_parser_test.py 2018-11-02 17:55:15.446637679 +0000
@@ -30,16 +30,16 @@
u'Tor Books',
u'lrf'],
@@ -809,43 +844,42 @@
}
tests = {
---- calibre-3.28.0.orig/src/calibre/web/feeds/feedparser.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/web/feeds/feedparser.py 2018-08-08 18:41:41.890704066 -0500
+diff -r -u calibre-3.33.1.orig/src/calibre/web/feeds/feedparser.py calibre-3.33.1/src/calibre/web/feeds/feedparser.py
+--- calibre-3.33.1.orig/src/calibre/web/feeds/feedparser.py 2018-11-02 18:00:30.393302091 +0000
++++ calibre-3.33.1/src/calibre/web/feeds/feedparser.py 2018-11-02 17:55:04.466637761 +0000
@@ -2081,7 +2081,7 @@
EMAIL = 5
- known_xfn_relationships = set(['contact', 'acquaintance', 'friend', 'met', 'co-worker', 'coworker', 'colleague', 'co-resident', 'coresident', 'neighbor', 'child', 'parent', 'sibling', 'brother', 'sister', 'spouse', 'wife', 'husband', 'kin', 'relative', 'muse', 'crush', 'date', 'sweetheart', 'me'])
-- known_binary_extensions = set(['zip','rar','exe','gz','tar','tgz','tbz2','bz2','z','7z','dmg','img','sit','sitx','hqx','deb','rpm','bz2','jar','rar','iso','bin','msi','mp2','mp3','ogg','ogm','mp4','m4v','m4a','avi','wma','wmv'])
-+ known_binary_extensions = set(['zip','exe','gz','tar','tgz','tbz2','bz2','z','7z','dmg','img','sit','sitx','hqx','deb','rpm','bz2','jar','iso','bin','msi','mp2','mp3','ogg','ogm','mp4','m4v','m4a','avi','wma','wmv'])
+ known_xfn_relationships = {'contact', 'acquaintance', 'friend', 'met', 'co-worker', 'coworker', 'colleague', 'co-resident', 'coresident', 'neighbor', 'child', 'parent', 'sibling', 'brother', 'sister', 'spouse', 'wife', 'husband', 'kin', 'relative', 'muse', 'crush', 'date', 'sweetheart', 'me'}
+- known_binary_extensions = {'zip','rar','exe','gz','tar','tgz','tbz2','bz2','z','7z','dmg','img','sit','sitx','hqx','deb','rpm','bz2','jar','rar','iso','bin','msi','mp2','mp3','ogg','ogm','mp4','m4v','m4a','avi','wma','wmv'}
++ known_binary_extensions = {'zip','exe','gz','tar','tgz','tbz2','bz2','z','7z','dmg','img','sit','sitx','hqx','deb','rpm','bz2','jar','iso','bin','msi','mp2','mp3','ogg','ogm','mp4','m4v','m4a','avi','wma','wmv'}
def __init__(self, data, baseuri, encoding):
self.document = BeautifulSoup.BeautifulSoup(data)
---- calibre-3.28.0.orig/src/calibre/utils/file_type_icons.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/utils/file_type_icons.py 2018-08-08 19:26:26.611410160 -0500
-@@ -16,7 +16,6 @@
- 'png' : 'png',
- 'bmp' : 'bmp',
- 'cbz' : 'cbz',
-- 'cbr' : 'cbr',
- 'svg' : 'svg',
- 'html' : 'html',
- 'htmlz' : 'html',
-@@ -28,7 +27,6 @@
- 'lrx' : 'lrx',
- 'pdf' : 'pdf',
- 'pdr' : 'zero',
-- 'rar' : 'rar',
- 'zip' : 'zip',
- 'txt' : 'txt',
- 'text' : 'txt',
---- calibre-3.28.0.orig/src/calibre/srv/render_book.py 2018-07-19 23:19:03.000000000 -0500
-+++ calibre-3.28.0/src/calibre/srv/render_book.py 2018-08-08 19:26:14.741952309 -0500
-@@ -193,7 +193,7 @@
- 'spine':spine,
- 'link_uid': uuid4(),
- 'book_hash': book_hash,
-- 'is_comic': input_fmt.lower() in {'cbc', 'cbz', 'cbr', 'cb7'},
-+ 'is_comic': input_fmt.lower() in {'cbc', 'cbz', 'cb7'},
- 'raster_cover_name': raster_cover_name,
- 'title_page_name': titlepage_name,
- 'has_maths': False,
+--- calibre-3.33.1.orig/src/calibre/srv/tests/loop.py 2018-10-19 00:00:54.000000000 -0500
++++ calibre-3.33.1/src/calibre/srv/tests/loop.py 2018-11-08 12:25:51.575170672 -0500
+@@ -108,24 +108,6 @@
+ with TestServer(lambda data:(data.path[0] + data.read()), listen_on='1.1.1.1', fallback_to_detected_interface=True, specialize=specialize) as server:
+ self.assertNotEqual('1.1.1.1', server.address[0])
+
+- @skipIf(is_ci, 'Continuous Integration servers do not support BonJour')
+- def test_bonjour(self):
+- 'Test advertising via BonJour'
+- from calibre.srv.bonjour import BonJour
+- from calibre.utils.Zeroconf import Zeroconf
+- b = BonJour()
+- with TestServer(lambda data:(data.path[0] + data.read()), plugins=(b,), shutdown_timeout=5) as server:
+- self.assertTrue(b.started.wait(5), 'BonJour not started')
+- self.ae(b.advertised_port, server.address[1])
+- service = b.services[0]
+- self.ae(service.type, b'_calibre._tcp.local.')
+- r = Zeroconf()
+- info = r.getServiceInfo(service.type, service.name)
+- self.assertIsNotNone(info)
+- self.ae(info.text, b'\npath=/opds')
+-
+- self.assertTrue(b.stopped.wait(5), 'BonJour not stopped')
+-
+ def test_ring_buffer(self):
+ 'Test the ring buffer used for reads'
+ class FakeSocket(object):