summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorIsaac David <isacdaavid@isacdaavid.info>2017-11-22 13:22:03 -0600
committerIsaac David <isacdaavid@isacdaavid.info>2017-11-22 13:27:40 -0600
commit96ec82f37f72dd9fe214eaa7ecce880ba0cc7a4a (patch)
tree09c9c879b2e879daaf402676329d5bc477b2dd44 /libre
parent617585771f60af6b6a0ca4486e8d9fa374929733 (diff)
downloadabslibre-96ec82f37f72dd9fe214eaa7ecce880ba0cc7a4a.tar.gz
abslibre-96ec82f37f72dd9fe214eaa7ecce880ba0cc7a4a.tar.bz2
abslibre-96ec82f37f72dd9fe214eaa7ecce880ba0cc7a4a.zip
calibre: update to version 3.12.0-2.parabola1
Diffstat (limited to 'libre')
-rw-r--r--libre/calibre/0001-Remove-code-that-contacts-calibre-servers-to-check-u.patch78
-rw-r--r--libre/calibre/0002-Remove-new_version_notification.patch79
-rw-r--r--libre/calibre/0003-Disable-plugin-dialog.patch13
-rw-r--r--libre/calibre/0004-Disable-update-check-by-default.patch15
-rw-r--r--libre/calibre/0005-Use-packaged-instead-of-bundled-feedparser-Python-module.patch42
-rw-r--r--libre/calibre/PKGBUILD74
-rw-r--r--libre/calibre/libre.patch701
7 files changed, 39 insertions, 963 deletions
diff --git a/libre/calibre/0001-Remove-code-that-contacts-calibre-servers-to-check-u.patch b/libre/calibre/0001-Remove-code-that-contacts-calibre-servers-to-check-u.patch
deleted file mode 100644
index 40f303dda..000000000
--- a/libre/calibre/0001-Remove-code-that-contacts-calibre-servers-to-check-u.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff --git a/src/calibre/gui2/update.py b/src/calibre/gui2/update.py
-index 9ce55d0..f9521d7 100644
---- a/src/calibre/gui2/update.py
-+++ b/src/calibre/gui2/update.py
-@@ -1,19 +1,17 @@
- __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
- from threading import Thread, Event
-
- from PyQt5.Qt import (QObject, pyqtSignal, Qt, QUrl, QDialog, QGridLayout,
-- QLabel, QCheckBox, QDialogButtonBox, QIcon)
-+ QLabel, QDialogButtonBox, QIcon)
-
--from calibre.constants import (__appname__, __version__, iswindows, isosx,
-+from calibre.constants import (__appname__, iswindows, isosx,
- isportable, is64bit, numeric_version)
- from calibre import prints, as_unicode
--from calibre.utils.config import prefs
--from calibre.utils.https import get_https_resource_securely
--from calibre.gui2 import config, dynamic, open_url
-+from calibre.gui2 import dynamic, open_url
- from calibre.gui2.dialogs.plugin_updater import get_plugin_updates_available
-
- URL = 'https://code.calibre-ebook.com/latest'
-@@ -30,35 +28,7 @@ def get_download_url():
-
-
- def get_newest_version():
-- try:
-- icon_theme_name = json.loads(I('icon-theme.json', data=True))['name']
-- except Exception:
-- icon_theme_name = ''
-- headers={
-- 'CALIBRE-VERSION':__version__,
-- 'CALIBRE-OS': ('win' if iswindows else 'osx' if isosx else 'oth'),
-- 'CALIBRE-INSTALL-UUID': prefs['installation_uuid'],
-- 'CALIBRE-ICON-THEME': icon_theme_name,
-- }
-- try:
-- version = get_https_resource_securely(URL, headers=headers)
-- except ssl.SSLError as err:
-- if getattr(err, 'reason', None) != 'CERTIFICATE_VERIFY_FAILED':
-- raise
-- # certificate verification failed, since the version check contains no
-- # critical information, ignore and proceed
-- # We have to do this as if the calibre CA certificate ever
-- # needs to be revoked, then we wont be able to do version checks
-- version = get_https_resource_securely(URL, headers=headers, cacerts=None)
-- try:
-- version = version.decode('utf-8').strip()
-- except UnicodeDecodeError:
-- version = u''
-- ans = NO_CALIBRE_UPDATE
-- m = re.match(ur'(\d+)\.(\d+).(\d+)$', version)
-- if m is not None:
-- ans = tuple(map(int, (m.group(1), m.group(2), m.group(3))))
-- return ans
-+ return NO_CALIBRE_UPDATE
-
-
- class Signal(QObject):
-@@ -81,12 +51,6 @@ class CheckForUpdates(Thread):
- calibre_update_version = NO_CALIBRE_UPDATE
- plugins_update_found = 0
- try:
-- version = get_newest_version()
-- if version[:2] > numeric_version[:2]:
-- calibre_update_version = version
-- except Exception as e:
-- prints('Failed to check for calibre update:', as_unicode(e))
-- try:
- update_plugins = get_plugin_updates_available(raise_error=True)
- if update_plugins is not None:
- plugins_update_found = len(update_plugins)
diff --git a/libre/calibre/0002-Remove-new_version_notification.patch b/libre/calibre/0002-Remove-new_version_notification.patch
deleted file mode 100644
index 1199843ed..000000000
--- a/libre/calibre/0002-Remove-new_version_notification.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py
-index 45cc47a..14a5a2e 100644
---- a/src/calibre/gui2/__init__.py
-+++ b/src/calibre/gui2/__init__.py
-@@ -169,8 +169,6 @@ def _config(): # {{{
- 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 --git a/src/calibre/gui2/preferences/behavior.py b/src/calibre/gui2/preferences/behavior.py
-index 6db4cb1..51b7ed0 100644
---- a/src/calibre/gui2/preferences/behavior.py
-+++ b/src/calibre/gui2/preferences/behavior.py
-@@ -40,7 +40,6 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
-
- r('network_timeout', prefs)
-
-- r('new_version_notification', config)
- r('upload_news_to_device', config)
- r('delete_news_from_library_on_upload', config)
-
-diff --git a/src/calibre/gui2/preferences/behavior.ui b/src/calibre/gui2/preferences/behavior.ui
-index 41cc831..de56b69 100644
---- a/src/calibre/gui2/preferences/behavior.ui
-+++ b/src/calibre/gui2/preferences/behavior.ui
-@@ -14,13 +14,6 @@
- <string>Form</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
-- <item row="1" column="0">
-- <widget class="QCheckBox" name="opt_new_version_notification">
-- <property name="text">
-- <string>Show notification when &amp;new version is available</string>
-- </property>
-- </widget>
-- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="opt_bools_are_tristate">
- <property name="toolTip">
-diff --git a/src/calibre/gui2/update.py b/src/calibre/gui2/update.py
-index 9ce55d0..b08307b 100644
---- a/src/calibre/gui2/update.py
-+++ b/src/calibre/gui2/update.py
-@@ -125,11 +125,6 @@ class UpdateNotification(QDialog):
- self.setWindowIcon(QIcon(I('lt.png')))
- self.l.addWidget(self.logo, 0, 0)
- self.l.addWidget(self.label, 0, 1)
-- self.cb = QCheckBox(
-- _('Show this notification for future updates'), self)
-- self.l.addWidget(self.cb, 1, 0, 1, -1)
-- self.cb.setChecked(config.get('new_version_notification'))
-- self.cb.stateChanged.connect(self.show_future)
- self.bb = QDialogButtonBox(self)
- b = self.bb.addButton(_('&Get update'), self.bb.AcceptRole)
- b.setDefault(True)
-@@ -151,9 +146,6 @@ class UpdateNotification(QDialog):
- initial_filter=FILTER_UPDATE_AVAILABLE)
- d.exec_()
-
-- def show_future(self, *args):
-- config.set('new_version_notification', bool(self.cb.isChecked()))
--
- def accept(self):
- open_url(QUrl(get_download_url()))
-
-@@ -201,8 +193,7 @@ class UpdateMixin(object):
- self.status_bar.update_label.setVisible(True)
-
- if has_calibre_update:
-- if (force or (config.get('new_version_notification') and
-- dynamic.get('update to version %s'%calibre_version, True))):
-+ if force:
- if not no_show_popup:
- self._update_notification__ = UpdateNotification(calibre_version,
- number_of_plugin_updates, parent=self)
diff --git a/libre/calibre/0003-Disable-plugin-dialog.patch b/libre/calibre/0003-Disable-plugin-dialog.patch
deleted file mode 100644
index 4779f4a83..000000000
--- a/libre/calibre/0003-Disable-plugin-dialog.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/calibre/gui2/actions/preferences.py b/src/calibre/gui2/actions/preferences.py
-index 4d561c0..b9a9b1f 100644
---- a/src/calibre/gui2/actions/preferences.py
-+++ b/src/calibre/gui2/actions/preferences.py
-@@ -29,8 +29,6 @@ class PreferencesAction(InterfaceAction):
- pm.addAction(QIcon(I('config.png')), _('Preferences'), self.do_config)
- cm('welcome wizard', _('Run welcome &wizard'),
- icon='wizard.png', triggered=self.gui.run_wizard)
-- cm('plugin updater', _('Get plugins to enhance calibre'),
-- icon='plugins/plugin_updater.png', triggered=self.get_plugins)
- if not DEBUG:
- pm.addSeparator()
- cm('restart', _('Restart in debug mode'), icon='debug.png',
diff --git a/libre/calibre/0004-Disable-update-check-by-default.patch b/libre/calibre/0004-Disable-update-check-by-default.patch
deleted file mode 100644
index 14678bc12..000000000
--- a/libre/calibre/0004-Disable-update-check-by-default.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py
-index cf8ce58..255741f 100644
---- a/src/calibre/gui2/main.py
-+++ b/src/calibre/gui2/main.py
-@@ -49,8 +49,8 @@ path_to_ebook to the database.
- help=_('Start minimized to system tray.'))
- parser.add_option('-v', '--verbose', default=0, action='count',
- help=_('Ignored, do not use. Present only for legacy reasons'))
-- parser.add_option('--no-update-check', default=False, action='store_true',
-- help=_('Do not check for updates'))
-+ parser.add_option('--update-check', dest='no_update_check', default=True, action='store_false',
-+ help=_('Check for updates'))
- parser.add_option('--ignore-plugins', default=False, action='store_true',
- help=_('Ignore custom plugins, useful if you installed a plugin'
- ' that is preventing calibre from starting'))
diff --git a/libre/calibre/0005-Use-packaged-instead-of-bundled-feedparser-Python-module.patch b/libre/calibre/0005-Use-packaged-instead-of-bundled-feedparser-Python-module.patch
deleted file mode 100644
index 2e0d06e32..000000000
--- a/libre/calibre/0005-Use-packaged-instead-of-bundled-feedparser-Python-module.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/recipes/lenta_ru.recipe b/recipes/lenta_ru.recipe
-index aa4dac4..4b6710c 100644
---- a/recipes/lenta_ru.recipe
-+++ b/recipes/lenta_ru.recipe
-@@ -4,11 +4,13 @@
- Lenta.ru
- '''
-
--from calibre.web.feeds.feedparser import parse
- from calibre.ebooks.BeautifulSoup import Tag
- from calibre.web.feeds.news import BasicNewsRecipe
-+from feedparser import parse
-+from functools import partial
- import re
-
-+parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11')
-
- class LentaRURecipe(BasicNewsRecipe):
- title = u'Lenta.ru: \u041d\u043e\u0432\u043e\u0441\u0442\u0438'
-diff --git a/src/calibre/web/feeds/__init__.py b/src/calibre/web/feeds/__init__.py
-index 8c9d748..f262604 100644
---- a/src/calibre/web/feeds/__init__.py
-+++ b/src/calibre/web/feeds/__init__.py
-@@ -11,7 +11,10 @@ from calibre.utils.logging import default_log
- from calibre import entity_to_unicode, strftime, force_unicode
- from calibre.utils.date import dt_factory, utcnow, local_tz
- from calibre.utils.cleantext import clean_ascii_chars, clean_xml_chars
-+from feedparser import parse
-+from functools import partial
-
-+parse = partial(parse, agent='Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11')
-
- class Article(object):
-
-@@ -334,7 +337,6 @@ def feed_from_xml(raw_xml, title=None, oldest_article=7,
- max_articles_per_feed=100,
- get_article_url=lambda item: item.get('link', None),
- log=default_log):
-- from calibre.web.feeds.feedparser import parse
- # Handle unclosed escaped entities. They trip up feedparser and HBR for one
- # generates them
- raw_xml = re.sub(r'(&amp;#\d+)([^0-9;])', r'\1;\2', raw_xml)
diff --git a/libre/calibre/PKGBUILD b/libre/calibre/PKGBUILD
index 2b1042545..e56791a53 100644
--- a/libre/calibre/PKGBUILD
+++ b/libre/calibre/PKGBUILD
@@ -6,52 +6,61 @@
# Contributor (Arch): Larry Hajali <larryhaja@gmail.com>
# Contributor (Arch): Eli Schwartz <eschwartz93@gmail.com>
# Contributor: David P.<megver83@parabola.nu>
-# Maintainer: Jesús E.<heckyel@parabola.nu>
+# Contributor: Jesús E.<heckyel@parabola.nu>
+# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
pkgname=calibre
-_commit='2a4cfe3fdc292d794b3e65fb8461811b98e631a1'
-pkgver=3.11.1
-pkgrel=1.parabola1
+_commit='72011a66bf4f380a8d36c6fd9c3f6069e767539b'
+pkgver=3.12.0
+pkgrel=2.parabola1
_mathjax_ver=2.6.1
pkgdesc="Ebook management application, without nonfree decompression engine for RAR archives"
arch=('x86_64' 'i686' 'armv7h')
url="https://calibre-ebook.com/"
license=('GPL3')
-depends=('chmlib' 'icu' 'libmtp' 'libusbx' 'libwmf' 'mtdev'
- 'optipng' 'podofo' 'python2-apsw' 'python2-cssselect'
- 'python2-cssutils' 'python2-dateutil' 'python2-dbus' 'python2-dnspython'
- 'python2-dukpy' 'python2-html5-parser' 'python2-mechanize' 'python2-msgpack'
- 'python2-netifaces' 'python2-pillow' 'python2-psutil' 'python2-pygments'
- 'python2-pyqt5' 'python2-regex' 'qt5-svg' 'qt5-webkit')
-makedepends=('qt5-x11extras' 'xdg-utils' 'rapydscript-ng' 'python2-sphinx')
-optdepends=('ipython2: to use calibre-debug -g'
- 'poppler: required for converting pdf to html')
+depends=('python2-six' 'python2-dateutil' 'python2-cssutils' 'python2-dukpy'
+ 'python2-mechanize' 'podofo' 'libwmf'
+ 'chmlib' 'python2-lxml' 'libusbx' 'python2-html5-parser'
+ 'python2-pillow' 'shared-mime-info' 'python2-dnspython' 'python2-msgpack'
+ 'python2-pyqt5' 'python2-psutil' 'libmtp' 'python2-dbus'
+ 'python2-netifaces' 'python2-cssselect' 'python2-apsw' 'qt5-webkit'
+ 'qt5-svg' 'python2-regex' 'python2-pygments' 'mtdev'
+ 'desktop-file-utils' 'gtk-update-icon-cache' 'optipng' 'udisks2')
+# we don't want it to break whenever Arch pushes a new icu soname, nor
+# is it desirable to have it block every minor-version upgrade when
+# it's actually linked against no minor version in particular
+depends+=('icu>=60' 'icu<61')
+makedepends=('qt5-x11extras' 'xdg-utils')
+optdepends=('ipython2: to use calibre-debug'
+ # TODO: I don't know the mapping from poppler versions to sonames
+ 'poppler=0.61.1: required for converting pdf to html')
replaces=($pkgname-libre)
conflicts=($pkgname-libre)
-source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/Megver83/calibre/repository/archive.tar.gz?ref=$pkgver"
- "$pkgname-$pkgver.tar.gz.sig::https://gitlab.com/Megver83/calibre/raw/signatures/$pkgname-$pkgver-${_commit}.tar.gz.sig"
+source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/libreforks/calibre/repository/archive.tar.gz?ref=$pkgver"
+ "$pkgname-$pkgver.tar.gz.sig::https://gitlab.com/libreforks/calibre/raw/signatures/$pkgname-$pkgver-${_commit}.tar.gz.sig"
"$pkgname-translations.zip::https://github.com/kovidgoyal/${pkgname}-translations/archive/master.zip"
"MathJax-${_mathjax_ver}.tar.gz::https://github.com/kovidgoyal/MathJax/archive/${_mathjax_ver}.tar.gz")
-sha256sums=('b53c76b86eb1e739731f3625b99b57af9769eb1639f63faa6963065073e41a30'
+sha256sums=('ee9a4993b290846dbcc242e5116a41111935dbb41355f102569d6871b4386562'
'SKIP'
- '39ea2c430f50d1e02ce322798f22f668e4995605dd41b6e36c5fe2b9bceb1c7d'
+ '6e3f10901910f87f79840aa1222b0dba088ed5393e05c80489cab6db5686c30b'
'c746945d87a4e93ee801a44b6209986bfc901cb2f6c505628a2ed5793422fbb8')
validpgpkeys=('6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P.
'916FFBC76D2E641BA416BA53364F4E1483446AC5' # Jesús E.
)
prepare() {
- # move directories
+ # Parabola: rename from gitlab archive
mv "$pkgname-$pkgver-${_commit}" "$pkgname-$pkgver"
- cd "$pkgname-$pkgver"
+ cd "${pkgname}-${pkgver}"
- # Link translations to build dir
+ # Parabola: link translations to build dir
ln -sfT ../calibre-translations-master translations
+ # Remove unneeded files
+ rm -rf resources/${pkgname}-portable.*
+
# Desktop integration (e.g. enforce arch defaults)
- # Use uppercase naming scheme, don't create uninstaller.
- # xdg *cannot* be kludged into installing mime files properly.
sed -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \
-e "/cc(\['xdg-desktop-menu', 'forceupdate'\])/d" \
-e "/cc(\['xdg-mime', 'install', MIME\])/d" \
@@ -61,18 +70,14 @@ prepare() {
}
build() {
- cd "$pkgname-$pkgver"
-
- # Don't use the bootstrapper, since it tries to checkout/pull the
- # translations repo and generally touch the internet. Instead call each
- # *needed* subcommmand.
- # LANG='en_US.UTF-8' python2 setup.py bootstrap
+ cd "${pkgname}-${pkgver}"
LANG='en_US.UTF-8' python2 setup.py build
+ LANG='en_US.UTF-8' python2 setup.py gui
+ # Parabola
LANG='en_US.UTF-8' python2 setup.py iso639
LANG='en_US.UTF-8' python2 setup.py iso3166
LANG='en_US.UTF-8' python2 setup.py translations
- LANG='en_US.UTF-8' python2 setup.py gui
LANG='en_US.UTF-8' python2 setup.py resources
LANG='en_US.UTF-8' python2 setup.py man_pages
LANG='en_US.UTF-8' python2 setup.py recent_uas || true
@@ -80,20 +85,19 @@ build() {
}
package() {
- cd "$pkgname-$pkgver"
+ cd "${pkgname}-${pkgver}"
- # If these directories don't exist, zsh completion, icons, and desktop files won't install.
install -d "${pkgdir}/usr/share/zsh/site-functions" \
- "${pkgdir}"/usr/share/{applications,desktop-directories,icons/hicolor}
+ "${pkgdir}"/usr/share/{applications,desktop-directories,icons/hicolor}
+
+ install -Dm644 resources/calibre-mimetypes.xml \
+ "${pkgdir}/usr/share/mime/packages/calibre-mimetypes.xml"
XDG_DATA_DIRS="${pkgdir}/usr/share" LANG='en_US.UTF-8' \
python2 setup.py install --staging-root="${pkgdir}/usr" --prefix=/usr
cp -a man-pages/ "${pkgdir}/usr/share/man"
- install -Dm644 resources/calibre-mimetypes.xml \
- "${pkgdir}/usr/share/mime/packages/calibre-mimetypes.xml"
-
# Compiling bytecode FS#33392
python2 -m compileall "${pkgdir}/usr/lib/calibre/"
python2 -O -m compileall "${pkgdir}/usr/lib/calibre/"
diff --git a/libre/calibre/libre.patch b/libre/calibre/libre.patch
deleted file mode 100644
index 7de696940..000000000
--- a/libre/calibre/libre.patch
+++ /dev/null
@@ -1,701 +0,0 @@
-diff --git a/resources/images.qrc b/resources/images.qrc
-index 4d00c27..0e6eea1 100644
---- a/resources/images.qrc
-+++ b/resources/images.qrc
-@@ -115,7 +115,6 @@
- <file>images/mimetypes/azw2.png</file>
- <file>images/mimetypes/azw3.png</file>
- <file>images/mimetypes/bmp.png</file>
--<file>images/mimetypes/cbr.png</file>
- <file>images/mimetypes/cbz.png</file>
- <file>images/mimetypes/computer.png</file>
- <file>images/mimetypes/dir.png</file>
-@@ -134,7 +133,6 @@
- <file>images/mimetypes/opml.png</file>
- <file>images/mimetypes/pdf.png</file>
- <file>images/mimetypes/png.png</file>
--<file>images/mimetypes/rar.png</file>
- <file>images/mimetypes/rtf.png</file>
- <file>images/mimetypes/snb.png</file>
- <file>images/mimetypes/svg.png</file>
-@@ -220,4 +218,4 @@
- <file>images/window-close.png</file>
- <file>images/wizard.png</file>
- </qresource>
--</RCC>
-\ No newline at end of file
-+</RCC>
-diff --git a/resources/mime.types b/resources/mime.types
-index b8acaaa..9ea4742 100644
---- a/resources/mime.types
-+++ b/resources/mime.types
-@@ -138,7 +138,6 @@ application/prs.cww cww
- application/prs.nprend
- application/prs.plucker
- application/qsig
--application/rar rar
- application/rdf+xml rdf
- application/reginfo+xml rif
- application/relax-ng-compact-syntax rnc
-@@ -849,7 +848,6 @@ application/x-pkcs7-certreqresp p7r
- application/x-pkcs7-crl crl
- application/x-python-code pyc pyo
- application/x-quicktimeplayer qtl
--application/x-rar-compressed rar
- application/x-redhat-package-manager rpm
- application/x-sh sh
- application/x-shar shar
-@@ -1372,7 +1370,6 @@ application/x-mobipocket-subscription pobi
- application/x-kindle-application azw2
- application/x-mobi8-ebook azw3
- application/x-cbz cbz
--application/x-cbr cbr
- application/x-cb7 cb7
- application/x-cbc cbc
- application/x-koboreader-ebook kobo
-diff --git a/session.vim b/session.vim
-index d5ecb06..b3e40d0 100644
---- a/session.vim
-+++ b/session.vim
-@@ -11,7 +11,6 @@ let g:syntastic_cpp_include_dirs = [
- \'/usr/include/freetype2',
- \'/usr/include/fontconfig',
- \'src/qtcurve/common', 'src/qtcurve',
-- \'src/unrar',
- \'src/qt-harfbuzz/src',
- \'/usr/include/ImageMagick',
- \]
-diff --git a/setup/extensions.json b/setup/extensions.json
-index 6b97ea6..d9a9f68 100644
---- a/setup/extensions.json
-+++ b/setup/extensions.json
-@@ -199,16 +199,5 @@
- "sources": "calibre/devices/mtp/unix/devices.c calibre/devices/mtp/unix/libmtp.c",
- "headers": "calibre/devices/mtp/unix/devices.h calibre/devices/mtp/unix/upstream/music-players.h calibre/devices/mtp/unix/upstream/device-flags.h",
- "libraries": "mtp"
-- },
-- {
-- "name": "unrar",
-- "sources": "unrar/rar.cpp unrar/strlist.cpp unrar/strfn.cpp unrar/pathfn.cpp unrar/savepos.cpp unrar/smallfn.cpp unrar/global.cpp unrar/file.cpp unrar/filefn.cpp unrar/filcreat.cpp unrar/archive.cpp unrar/arcread.cpp unrar/unicode.cpp unrar/system.cpp unrar/isnt.cpp unrar/crypt.cpp unrar/crc.cpp unrar/rawread.cpp unrar/encname.cpp unrar/resource.cpp unrar/match.cpp unrar/timefn.cpp unrar/rdwrfn.cpp unrar/consio.cpp unrar/options.cpp unrar/ulinks.cpp unrar/errhnd.cpp unrar/rarvm.cpp unrar/secpassword.cpp unrar/rijndael.cpp unrar/getbits.cpp unrar/sha1.cpp unrar/extinfo.cpp unrar/extract.cpp unrar/volume.cpp unrar/list.cpp unrar/find.cpp unrar/unpack.cpp unrar/cmddata.cpp unrar/filestr.cpp unrar/scantree.cpp calibre/utils/unrar.cpp",
-- "inc_dirs": "unrar",
-- "defines": "SILENT RARDLL UNRAR _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE",
-- "windows_defines": "SILENT RARDLL UNRAR",
-- "haiku_defines": "LITTLE_ENDIAN SILENT RARDLL UNRAR _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE _BSD_SOURCE",
-- "haiku_libraries": "bsd",
-- "optimize_level": 2,
-- "windows_libraries": "User32 Advapi32 kernel32 Shell32"
- }
- ]
-diff --git a/setup/resources.py b/setup/resources.py
-index 7fb34bd..3e5ef3b 100644
---- a/setup/resources.py
-+++ b/setup/resources.py
-@@ -341,7 +341,7 @@ class Resources(Command): # {{{
- log = Log()
- # log.outputs = []
- for inf in supported_input_formats():
-- if inf in ('zip', 'rar', 'oebzip'):
-+ if inf in ('zip', 'oebzip'):
- continue
- for ouf in available_output_formats():
- of = ouf if ouf == 'oeb' else 'dummy.'+ouf
-diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py
-index dbebce1..379bab0 100644
---- a/src/calibre/__init__.py
-+++ b/src/calibre/__init__.py
-@@ -292,10 +292,7 @@ def extract(path, dir):
- # 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 @@ def extract(path, dir):
- 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 --git a/src/calibre/constants.py b/src/calibre/constants.py
-index 628fb93..4381b5b 100644
---- a/src/calibre/constants.py
-+++ b/src/calibre/constants.py
-@@ -158,9 +158,10 @@ class Plugins(collections.Mapping):
- 'zlib2',
- 'html',
- 'freetype',
-- 'unrar',
- 'imageops',
- 'qt_hack',
-+ '_regex',
-+ 'msgpack',
- 'hunspell',
- '_patiencediff_c',
- 'bzzdec',
-diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py
-index 5efd33b..9d2027d 100644
---- a/src/calibre/customize/builtins.py
-+++ b/src/calibre/customize/builtins.py
-@@ -132,7 +132,7 @@ plugins += [HTML2ZIP, PML2PMLZ, TXT2TXTZ, ArchiveExtract,]
- class ComicMetadataReader(MetadataReaderPlugin):
-
- name = 'Read comic metadata'
-- file_types = set(['cbr', 'cbz'])
-+ file_types = set(['cbz'])
- description = _('Extract cover from comic files')
-
- def customization_help(self, gui=False):
-@@ -143,19 +143,14 @@ class ComicMetadataReader(MetadataReaderPlugin):
- pos = stream.tell()
- id_ = stream.read(3)
- stream.seek(pos)
-- if id_ == b'Rar':
-- ftype = 'cbr'
-- elif id_.startswith(b'PK'):
-+ if id_.startswith(b'PK'):
- ftype = 'cbz'
-- if ftype == 'cbr':
-- from calibre.utils.unrar import extract_cover_image
-- else:
- from calibre.libunzip import extract_cover_image
- from calibre.ebooks.metadata import MetaInformation
- ret = extract_cover_image(stream)
- mi = MetaInformation(None, None)
- stream.seek(0)
-- if ftype in {'cbr', 'cbz'}:
-+ if ftype in {'cbz'}:
- series_index = self.site_customization
- if series_index not in {'volume', 'issue'}:
- series_index = 'volume'
-@@ -354,17 +349,6 @@ class PMLMetadataReader(MetadataReaderPlugin):
- return get_metadata(stream)
-
-
--class RARMetadataReader(MetadataReaderPlugin):
--
-- name = 'Read RAR metadata'
-- file_types = set(['rar'])
-- description = _('Read metadata from e-books in RAR archives')
--
-- def get_metadata(self, stream, ftype):
-- from calibre.ebooks.metadata.rar import get_metadata
-- return get_metadata(stream)
--
--
- class RBMetadataReader(MetadataReaderPlugin):
-
- name = 'Read RB metadata'
-diff --git a/src/calibre/customize/ui.py b/src/calibre/customize/ui.py
-index eaa97e7..ed37232 100644
---- a/src/calibre/customize/ui.py
-+++ b/src/calibre/customize/ui.py
-@@ -526,7 +526,7 @@ def available_input_formats():
- if not is_disabled(plugin):
- for format in plugin.file_types:
- formats.add(format)
-- formats.add('zip'), formats.add('rar')
-+ formats.add('zip')
- return formats
-
-
-diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py
-index 8670797..75ce15a 100644
---- a/src/calibre/devices/kobo/driver.py
-+++ b/src/calibre/devices/kobo/driver.py
-@@ -78,7 +78,7 @@ class KOBO(USBMS):
- book_class = Book
-
- # Ordered list of supported formats
-- FORMATS = ['kepub', 'epub', 'pdf', 'txt', 'cbz', 'cbr']
-+ FORMATS = ['kepub', 'epub', 'pdf', 'txt', 'cbz']
- CAN_SET_METADATA = ['collections']
-
- VENDOR_ID = [0x2237]
-diff --git a/src/calibre/devices/mtp/filesystem_cache.py b/src/calibre/devices/mtp/filesystem_cache.py
-index ffc5280..79be51e 100644
---- a/src/calibre/devices/mtp/filesystem_cache.py
-+++ b/src/calibre/devices/mtp/filesystem_cache.py
-@@ -18,7 +18,7 @@ from calibre.utils.date import local_tz, as_utc
- from calibre.utils.icu import sort_key, lower
- from calibre.ebooks import BOOK_EXTENSIONS
-
--bexts = frozenset(BOOK_EXTENSIONS) - {'mbp', 'tan', 'rar', 'zip', 'xml'}
-+bexts = frozenset(BOOK_EXTENSIONS) - {'mbp', 'tan', 'zip', 'xml'}
-
-
- class FileOrFolder(object):
-diff --git a/src/calibre/ebooks/__init__.py b/src/calibre/ebooks/__init__.py
-index 699be34..5604e5d 100644
---- a/src/calibre/ebooks/__init__.py
-+++ b/src/calibre/ebooks/__init__.py
-@@ -30,9 +30,9 @@ class ParserError(ValueError):
- 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', 'djv', 'djvu', 'lrx', 'cbr', 'cbz', 'cbc', 'oebzip',
-+ 'epub', 'fb2', '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 --git a/src/calibre/ebooks/conversion/plugins/comic_input.py b/src/calibre/ebooks/conversion/plugins/comic_input.py
-index f64acc5..2020bae 100644
---- a/src/calibre/ebooks/conversion/plugins/comic_input.py
-+++ b/src/calibre/ebooks/conversion/plugins/comic_input.py
-@@ -18,8 +18,8 @@ class ComicInput(InputFormatPlugin):
-
- name = 'Comic Input'
- author = 'Kovid Goyal'
-- description = 'Optimize comic files (.cbz, .cbr, .cbc) for viewing on portable devices'
-- file_types = set(['cbz', 'cbr', 'cbc'])
-+ description = 'Optimize comic files (.cbz, .cbc) for viewing on portable devices'
-+ file_types = set(['cbz', 'cbc'])
- is_image_collection = True
- core_usage = -1
-
-diff --git a/src/calibre/ebooks/conversion/plumber.py b/src/calibre/ebooks/conversion/plumber.py
-index 5cad968..c56e67b 100644
---- a/src/calibre/ebooks/conversion/plumber.py
-+++ b/src/calibre/ebooks/conversion/plumber.py
-@@ -43,7 +43,7 @@ various stages of conversion. The stages are:
-
- def supported_input_formats():
- fmts = available_input_formats()
-- for x in ('zip', 'rar', 'oebzip'):
-+ for x in ('zip', 'oebzip'):
- fmts.add(x)
- return fmts
-
-@@ -64,7 +64,7 @@ class CompositeProgressReporter(object):
- self.global_reporter(global_frac, msg)
-
-
--ARCHIVE_FMTS = ('zip', 'rar', 'oebzip')
-+ARCHIVE_FMTS = ('zip', 'oebzip')
-
-
- class Plumber(object):
-diff --git a/src/calibre/ebooks/metadata/archive.py b/src/calibre/ebooks/metadata/archive.py
-index f5c0b7b..5a1d03b 100644
---- a/src/calibre/ebooks/metadata/archive.py
-+++ b/src/calibre/ebooks/metadata/archive.py
-@@ -29,8 +29,6 @@ def archive_type(stream):
- ans = None
- if id_ == stringFileHeader:
- ans = 'zip'
-- elif id_.startswith('Rar'):
-- ans = 'rar'
- try:
- stream.seek(pos)
- except:
-@@ -42,25 +40,16 @@ class ArchiveExtract(FileTypePlugin):
- name = 'Archive Extract'
- author = 'Kovid Goyal'
- 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'])
-+ '(ZIP). Also try to autodetect if they are actually '
-+ 'CBZ files.')
-+ file_types = set(['zip'])
- supported_platforms = ['windows', 'osx', 'linux']
- on_import = True
-
- def run(self, archive):
- from calibre.utils.zipfile import ZipFile
-- is_rar = archive.lower().endswith('.rar')
-- if is_rar:
-- from calibre.utils.unrar import extract_member, names
-- else:
-- zf = ZipFile(archive, 'r')
--
-- if is_rar:
-- with open(archive, 'rb') as rf:
-- fnames = list(names(rf))
-- else:
-- fnames = zf.namelist()
-+ zf = ZipFile(archive, 'r')
-+ fnames = zf.namelist()
-
- def fname_ok(fname):
- bn = os.path.basename(fname).lower()
-@@ -76,7 +65,7 @@ class ArchiveExtract(FileTypePlugin):
-
- fnames = list(filter(fname_ok, fnames))
- if is_comic(fnames):
-- ext = '.cbr' if is_rar else '.cbz'
-+ ext = '.cbz'
- of = self.temporary_file('_archive_extract'+ext)
- with open(archive, 'rb') as f:
- of.write(f.read())
-@@ -93,12 +82,7 @@ class ArchiveExtract(FileTypePlugin):
-
- of = self.temporary_file('_archive_extract.'+ext)
- with closing(of):
-- if is_rar:
-- with open(archive, 'rb') as f:
-- data = extract_member(f, match=None, name=fname)[1]
-- of.write(data)
-- else:
-- of.write(zf.read(fname))
-+ of.write(zf.read(fname))
- return of.name
-
-
-@@ -161,10 +145,6 @@ def get_comic_metadata(stream, stream_type, series_index='volume'):
- from calibre.utils.zipfile import ZipFile
- zf = ZipFile(stream)
- comment = zf.comment
-- elif stream_type == 'cbr':
-- from calibre.utils.unrar import RARFile
-- f = RARFile(stream, get_comment=True)
-- comment = f.comment
-
- if comment:
- import json
-diff --git a/src/calibre/ebooks/oeb/iterator/book.py b/src/calibre/ebooks/oeb/iterator/book.py
-index 08208c9..ff37b80 100644
---- a/src/calibre/ebooks/oeb/iterator/book.py
-+++ b/src/calibre/ebooks/oeb/iterator/book.py
-@@ -152,7 +152,7 @@ class EbookIterator(BookmarksMixin):
- self.spine = []
- Spiny = partial(SpineItem, read_anchor_map=read_anchor_map, read_links=read_links,
- run_char_count=run_char_count, from_epub=self.book_format == 'EPUB')
-- is_comic = input_fmt.lower() in {'cbc', 'cbz', 'cbr', 'cb7'}
-+ is_comic = input_fmt.lower() in {'cbc', 'cbz', 'cb7'}
- for i in ordered:
- spath = i.path
- mt = None
-diff --git a/src/calibre/gui2/actions/add.py b/src/calibre/gui2/actions/add.py
-index 2a00538..102df5b 100644
---- a/src/calibre/gui2/actions/add.py
-+++ b/src/calibre/gui2/actions/add.py
-@@ -36,8 +36,8 @@ def get_filters():
- (_('HTML books'), ['htm', 'html', 'xhtm', 'xhtml']),
- (_('LIT books'), ['lit']),
- (_('Text books'), ['txt', 'text', 'rtf', 'md', 'markdown', 'textile', 'txtz']),
-- (_('Comics'), ['cbz', 'cbr', 'cbc']),
-- (_('Archives'), ['zip', 'rar']),
-+ (_('Comics'), ['cbz', 'cbc']),
-+ (_('Archives'), ['zip']),
- (_('Wordprocessor files'), ['odt', 'doc', 'docx']),
- ]
-
-@@ -64,7 +64,7 @@ class AddAction(InterfaceAction):
- '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 @@ class AddAction(InterfaceAction):
- def add_archive(self, single):
- paths = choose_files(
- self.gui, 'recursive-archive-add', _('Choose archive file'),
-- filters=[(_('Archives'), ('zip', 'rar'))], all_files=False, select_only_single_file=False)
-+ filters=[(_('Archives'), ('zip'))], all_files=False, select_only_single_file=False)
- if paths:
- self.do_add_recursive(paths, single, list_of_archives=True)
-
-diff --git a/src/calibre/gui2/add.py b/src/calibre/gui2/add.py
-index 2aee3ce..a125939 100644
---- a/src/calibre/gui2/add.py
-+++ b/src/calibre/gui2/add.py
-@@ -162,9 +162,6 @@ class Adder(QObject):
- prints('Corrupt ZIP file, trying to use local headers')
- from calibre.utils.localunzip import extractall
- extractall(source, tdir)
-- elif source.lower().endswith('.rar'):
-- from calibre.utils.unrar import extract
-- extract(source, tdir)
- return tdir
-
- try:
-diff --git a/src/calibre/linux.py b/src/calibre/linux.py
-index 0829417..78605e9 100644
---- a/src/calibre/linux.py
-+++ b/src/calibre/linux.py
-@@ -317,7 +317,7 @@ class ZshCompleter(object): # {{{
- ):
- for fmt in fmts:
- is_input = group_title == input_group
-- if is_input and fmt in {'rar', 'zip', 'oebzip'}:
-+ if is_input and fmt in {'zip', 'oebzip'}:
- continue
- p = (get_parser(input_fmt=fmt) if is_input
- else get_parser(output_fmt=fmt))
-diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
-index 9d80091..5a06bb4 100644
---- a/src/calibre/test_build.py
-+++ b/src/calibre/test_build.py
-@@ -194,10 +194,6 @@ class BuildTest(unittest.TestCase):
- from calibre.gui2.win_file_dialogs import test
- test()
-
-- def test_unrar(self):
-- from calibre.utils.unrar import test_basic
-- test_basic()
--
- @unittest.skipUnless(iswindows, 'WPD is windows only')
- def test_wpd(self):
- wpd = plugins['wpd'][0]
-diff --git a/src/calibre/utils/search_query_parser.py b/src/calibre/utils/search_query_parser.py
-index 015b8f2..deded6d 100644
---- a/src/calibre/utils/search_query_parser.py
-+++ b/src/calibre/utils/search_query_parser.py
-@@ -453,16 +453,16 @@ class Tester(SearchQueryParser):
- u'Tor Books',
- u'lrf'],
- 8: [u'Stalky and Co.', u'Rudyard Kipling', u'manybooks.net', u'lrf'],
-- 9: [u'A Game of Thrones', u'George R. R. Martin', None, u'lrf,rar'],
-- 10: [u'A Clash of Kings', u'George R. R. Martin', None, u'lrf,rar'],
-- 11: [u'A Storm of Swords', u'George R. R. Martin', None, u'lrf,rar'],
-+ 9: [u'A Game of Thrones', u'George R. R. Martin', None, u'lrf'],
-+ 10: [u'A Clash of Kings', u'George R. R. Martin', None, u'lrf'],
-+ 11: [u'A Storm of Swords', u'George R. R. Martin', None, u'lrf'],
- 12: [u'Biggles - Pioneer Air Fighter', u'W. E. Johns', None, u'lrf,rtf'],
- 13: [u'Biggles of the Camel Squadron',
- u'W. E. Johns',
- u'London:Thames, (1977)',
- u'lrf,rtf'],
-- 14: [u'A Feast for Crows', u'George R. R. Martin', None, u'lrf,rar'],
-- 15: [u'Cryptonomicon', u'Neal Stephenson', None, u'lrf,rar'],
-+ 14: [u'A Feast for Crows', u'George R. R. Martin', None, u'lrf'],
-+ 15: [u'Cryptonomicon', u'Neal Stephenson', None, u'lrf'],
- 16: [u'Quicksilver', u'Neal Stephenson', None, u'lrf,zip'],
- 17: [u'The Comedies of William Shakespeare',
- u'William Shakespeare',
-@@ -477,15 +477,15 @@ class Tester(SearchQueryParser):
- None,
- u'lrf'],
- 20: [u'An Ideal Husband', u'Oscar Wilde', u'manybooks.net', u'lrf'],
-- 21: [u'Flight of the Nighthawks', u'Raymond E. Feist', None, u'lrf,rar'],
-- 22: [u'Into a Dark Realm', u'Raymond E. Feist', None, u'lrf,rar'],
-- 23: [u'The Sundering', u'Walter Jon Williams', None, u'lrf,rar'],
-- 24: [u'The Praxis', u'Walter Jon Williams', None, u'lrf,rar'],
-- 25: [u'Conventions of War', u'Walter Jon Williams', None, u'lrf,rar'],
-- 26: [u'Banewreaker', u'Jacqueline Carey', None, u'lrf,rar'],
-- 27: [u'Godslayer', u'Jacqueline Carey', None, u'lrf,rar'],
-- 28: [u"Kushiel's Scion", u'Jacqueline Carey', None, u'lrf,rar'],
-- 29: [u'Underworld', u'Don DeLillo', None, u'lrf,rar'],
-+ 21: [u'Flight of the Nighthawks', u'Raymond E. Feist', None, u'lrf'],
-+ 22: [u'Into a Dark Realm', u'Raymond E. Feist', None, u'lrf'],
-+ 23: [u'The Sundering', u'Walter Jon Williams', None, u'lrf'],
-+ 24: [u'The Praxis', u'Walter Jon Williams', None, u'lrf'],
-+ 25: [u'Conventions of War', u'Walter Jon Williams', None, u'lrf'],
-+ 26: [u'Banewreaker', u'Jacqueline Carey', None, u'lrf'],
-+ 27: [u'Godslayer', u'Jacqueline Carey', None, u'lrf'],
-+ 28: [u"Kushiel's Scion", u'Jacqueline Carey', None, u'lrf'],
-+ 29: [u'Underworld', u'Don DeLillo', None, u'lrf'],
- 30: [u'Genghis Khan and The Making of the Modern World',
- u'Jack Weatherford Orc',
- u'Three Rivers Press',
-@@ -496,9 +496,9 @@ class Tester(SearchQueryParser):
- u'lrf,zip'],
- 32: [u'The Killer Angels', u'Michael Shaara', None, u'html,lrf'],
- 33: [u'Band Of Brothers', u'Stephen E Ambrose', None, u'lrf,txt'],
-- 34: [u'The Gates of Rome', u'Conn Iggulden', None, u'lrf,rar'],
-+ 34: [u'The Gates of Rome', u'Conn Iggulden', None, u'lrf'],
- 35: [u'The Death of Kings', u'Conn Iggulden', u'Bantam Dell', u'lit,lrf'],
-- 36: [u'The Field of Swords', u'Conn Iggulden', None, u'lrf,rar'],
-+ 36: [u'The Field of Swords', u'Conn Iggulden', None, u'lrf'],
- 37: [u'Masterman Ready', u'Marryat, Captain Frederick', None, u'lrf'],
- 38: [u'With the Lightnings',
- u'David Drake',
-@@ -511,16 +511,16 @@ class Tester(SearchQueryParser):
- 40: [u'The Far Side of The Stars',
- u'David Drake',
- u'Baen Publishing Enterprises',
-- u'lrf,rar'],
-+ u'lrf'],
- 41: [u'The Way to Glory',
- u'David Drake',
- u'Baen Publishing Enterprises',
-- u'lrf,rar'],
-- 42: [u'Some Golden Harbor', u'David Drake', u'Baen Books', u'lrf,rar'],
-+ u'lrf'],
-+ 42: [u'Some Golden Harbor', u'David Drake', u'Baen Books', u'lrf'],
- 43: [u'Harry Potter And The Half-Blood Prince',
- u'J. K. Rowling',
- None,
-- u'lrf,rar'],
-+ u'lrf'],
- 44: [u'Harry Potter and the Order of the Phoenix',
- u'J. K. Rowling',
- None,
-@@ -529,12 +529,12 @@ class Tester(SearchQueryParser):
- 46: [u'The Stars at War II',
- u'Steve White',
- u'Baen Publishing Enterprises',
-- u'lrf,rar'],
-- 47: [u'Exodus', u'Steve White,Shirley Meier', u'Baen Books', u'lrf,rar'],
-+ u'lrf'],
-+ 47: [u'Exodus', u'Steve White,Shirley Meier', u'Baen Books', u'lrf'],
- 48: [u'Harry Potter and the Goblet of Fire',
- u'J. K. Rowling',
- None,
-- u'lrf,rar'],
-+ u'lrf'],
- 49: [u'Harry Potter and the Prisoner of Azkaban',
- u'J. K. Rowling',
- None,
-@@ -547,20 +547,20 @@ class Tester(SearchQueryParser):
- u'J.K. Rowling',
- None,
- u'lit,lrf,pdf'],
-- 52: [u"His Majesty's Dragon", u'Naomi Novik', None, u'lrf,rar'],
-+ 52: [u"His Majesty's Dragon", u'Naomi Novik', None, u'lrf'],
- 53: [u'Throne of Jade', u'Naomi Novik', u'Del Rey', u'lit,lrf'],
-- 54: [u'Black Powder War', u'Naomi Novik', u'Del Rey', u'lrf,rar'],
-+ 54: [u'Black Powder War', u'Naomi Novik', u'Del Rey', u'lrf'],
- 55: [u'War and Peace', u'Leo Tolstoy', u'gutenberg.org', u'lrf,txt'],
- 56: [u'Anna Karenina', u'Leo Tolstoy', u'gutenberg.org', u'lrf,txt'],
- 57: [u'A Shorter History of Rome',
- u'Eugene Lawrence,Sir William Smith',
- u'gutenberg.org',
- u'lrf,zip'],
-- 58: [u'The Name of the Rose', u'Umberto Eco', None, u'lrf,rar'],
-+ 58: [u'The Name of the Rose', u'Umberto Eco', None, u'lrf'],
- 71: [u"Wind Rider's Oath", u'David Weber', u'Baen', u'lrf'],
- 74: [u'Rally Cry', u'William R Forstchen', None, u'htm,lrf'],
-- 86: [u'Empire of Ivory', u'Naomi Novik', None, u'lrf,rar'],
-- 87: [u"Renegade's Magic", u'Robin Hobb', None, u'lrf,rar'],
-+ 86: [u'Empire of Ivory', u'Naomi Novik', None, u'lrf'],
-+ 87: [u"Renegade's Magic", u'Robin Hobb', None, u'lrf'],
- 89: [u'Master and commander',
- u"Patrick O'Brian",
- u'Fontana,\n1971',
-@@ -568,7 +568,7 @@ class Tester(SearchQueryParser):
- 91: [u'A Companion to Wolves',
- u'Sarah Monette,Elizabeth Beär',
- None,
-- u'lrf,rar'],
-+ u'lrf'],
- 92: [u'The Lions of al-Rassan', u'Guy Gavriel Kay', u'Eos', u'lit,lrf'],
- 93: [u'Gardens of the Moon', u'Steven Erikson', u'Tor Fantasy', u'lit,lrf'],
- 95: [u'The Master and Margarita',
-@@ -592,7 +592,7 @@ class Tester(SearchQueryParser):
- 144: [u'Atonement',
- u'Ian McEwan',
- u'New York : Nan A. Talese/Doubleday, 2002.',
-- u'lrf,rar'],
-+ u'lrf'],
- 146: [u'1632', u'Eric Flint', u'Baen Books', u'lit,lrf'],
- 147: [u'1633', u'David Weber,Eric Flint,Dru Blair', u'Baen', u'lit,lrf'],
- 148: [u'1634: The Baltic War',
-@@ -645,7 +645,7 @@ class Tester(SearchQueryParser):
- 253: [u"Hunter's Run",
- u'George R. R. Martin,Gardner Dozois,Daniel Abraham',
- u'Eos',
-- u'lrf,rar'],
-+ u'lrf'],
- 257: [u'Knife of Dreams', u'Robert Jordan', None, u'lit,lrf'],
- 258: [u'Saturday',
- u'Ian McEwan',
-@@ -665,7 +665,7 @@ class Tester(SearchQueryParser):
- u'New York : Random House, 2005.',
- u'lit,lrf'],
- 269: [u'Reap the Whirlwind', u'David Mack', u'Star Trek', u'lit,lrf'],
-- 272: [u'Mistborn', u'Brandon Sanderson', u'Tor Fantasy', u'lrf,rar'],
-+ 272: [u'Mistborn', u'Brandon Sanderson', u'Tor Fantasy', u'lrf'],
- 273: [u'The Thousandfold Thought',
- u'R. Scott Bakker',
- u'Overlook TP',
-@@ -673,17 +673,17 @@ class Tester(SearchQueryParser):
- 276: [u'Elantris',
- u'Brandon Sanderson',
- u'New York : Tor, 2005.',
-- u'lrf,rar'],
-+ u'lrf'],
- 291: [u'Sundiver',
- u'David Brin',
- u'New York : Bantam Books, 1995.',
- u'lit,lrf'],
-- 299: [u'Imperium', u'Robert Harris', u'Arrow', u'lrf,rar'],
-+ 299: [u'Imperium', u'Robert Harris', u'Arrow', u'lrf'],
- 300: [u'Startide Rising', u'David Brin', u'Bantam', u'htm,lrf'],
- 301: [u'The Uplift War', u'David Brin', u'Spectra', u'lit,lrf'],
-- 304: [u'Brightness Reef', u'David Brin', u'Orbit', u'lrf,rar'],
-+ 304: [u'Brightness Reef', u'David Brin', u'Orbit', u'lrf'],
- 305: [u"Infinity's Shore", u'David Brin', u'Spectra', u'txt'],
-- 306: [u"Heaven's Reach", u'David Brin', u'Spectra', u'lrf,rar'],
-+ 306: [u"Heaven's Reach", u'David Brin', u'Spectra', u'lrf'],
- 325: [u"Foundation's Triumph", u'David Brin', u'Easton Press', u'lit,lrf'],
- 327: [u'I am Charlotte Simmons', u'Tom Wolfe', u'Vintage', u'htm,lrf'],
- 335: [u'The Currents of Space', u'Isaac Asimov', None, u'lit,lrf'],
-@@ -713,15 +713,15 @@ class Tester(SearchQueryParser):
- u'Aspect',
- u'lit,lrf'],
- 356: [u'The Naked God', u'Peter F. Hamilton', u'Aspect', u'lit,lrf'],
-- 421: [u'A Shadow in Summer', u'Daniel Abraham', u'Tor Fantasy', u'lrf,rar'],
-+ 421: [u'A Shadow in Summer', u'Daniel Abraham', u'Tor Fantasy', u'lrf'],
- 427: [u'Lonesome Dove', u'Larry M\\cMurtry', None, u'lit,lrf'],
- 440: [u'Ghost', u'John Ringo', u'Baen', u'lit,lrf'],
- 441: [u'Kildar', u'John Ringo', u'Baen', u'lit,lrf'],
-- 443: [u'Hidden Empire ', u'Kevin J. Anderson', u'Aspect', u'lrf,rar'],
-+ 443: [u'Hidden Empire ', u'Kevin J. Anderson', u'Aspect', u'lrf'],
- 444: [u'The Gun Seller',
- u'Hugh Laurie',
- u'Washington Square Press',
-- u'lrf,rar']
-+ u'lrf']
- }
-
- tests = {
-diff --git a/src/calibre/web/feeds/feedparser.py b/src/calibre/web/feeds/feedparser.py
-index 16085cf..420efaa 100755
---- a/src/calibre/web/feeds/feedparser.py
-+++ b/src/calibre/web/feeds/feedparser.py
-@@ -2081,7 +2081,7 @@ class _MicroformatsParser:
- 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'])
-
- def __init__(self, data, baseuri, encoding):
- self.document = BeautifulSoup.BeautifulSoup(data)
-diff --git a/translations/calibre/main.pot b/translations/calibre/main.pot
-index 50735db..b1be5c1 100644
---- a/translations/calibre/main.pot
-+++ b/translations/calibre/main.pot
-@@ -5190,7 +5190,7 @@ msgid "Set book ID"
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/archive.py:44
--msgid "Extract common e-book formats from archive files (ZIP/RAR). Also try to autodetect if they are actually CBZ/CBR files."
-+msgid "Extract common e-book formats from archive files (ZIP). Also try to autodetect if they are actually CBZ files."
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/ebooks/metadata/book/base.py:658
-@@ -7051,7 +7051,7 @@ msgid "Add books from directories, including sub-directories (Multiple books per
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/gui2/actions/add.py:67
--msgid "Add multiple books from archive (ZIP/RAR)"
-+msgid "Add multiple books from archive (ZIP)"
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/gui2/actions/add.py:69
-@@ -13609,7 +13609,7 @@ msgid "You can also customise the plugin locations using <b>Preferences -> Inter
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf.py:36
--msgid "Set defaults for conversion of comics (CBR/CBZ files)"
-+msgid "Set defaults for conversion of comics (CBZ files)"
- msgstr ""
-
- #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/comicconf.py:51