calibre: 5.24.0 -> 5.29.0

Also refresh the Debian patches. The last ones were from
calibre-{0.8.29,2.9.0}, and now they're up-to-date to version 5.29.0
(also downloading it directly from Debian bug tracker instead of copying
them).

As a side effect, plugins are supported again. I am assuming that if
Debian doesn't try to disable this anymore, they should be safer to use
now, or Debian decided that the risk is on the user. Either way, should
also be fine for us.
This commit is contained in:
Thiago Kenji Okada 2021-10-18 15:08:51 -03:00
parent ab8489cc40
commit 1ff0380e8b
3 changed files with 10 additions and 38 deletions

View File

@ -1,6 +1,7 @@
{ lib
, mkDerivation
, fetchurl
, fetchpatch
, poppler_utils
, pkg-config
, libpng
@ -26,18 +27,21 @@
mkDerivation rec {
pname = "calibre";
version = "5.24.0";
version = "5.29.0";
src = fetchurl {
url = "https://download.calibre-ebook.com/${version}/${pname}-${version}.tar.xz";
hash = "sha256:18dr577nv7ijw3ar6mrk2xrc54mlrqkaj5jrc6s5sirl0710fdfg";
sha256 = "sha256-9ymHEpTHDUM3NAGoeSETzKRLKgJLRY4eEli6N5lbZug=";
};
# https://sources.debian.org/patches/calibre/5.29.0+dfsg-1
patches = [
# Plugin installation (very insecure) disabled (from Debian)
./disable_plugins.patch
# Automatic version update disabled by default (from Debian)
./no_updates_dialog.patch
# allow for plugin update check, but no calibre version check
(fetchpatch {
name = "0001_only_plugin_update.patch";
url = "https://sources.debian.org/data/main/c/calibre/5.29.0%2Bdfsg-1/debian/patches/0001-only-plugin-update.patch";
sha256 = "sha256-aGT8rJ/eQKAkmyHBWdY0ouZuWvDwtLVJU5xY6d3hY3k=";
})
]
++ lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;

View File

@ -1,17 +0,0 @@
Description: Disable plugin dialog. It uses a totally non-authenticated and non-trusted way of installing arbitrary code.
Author: Martin Pitt <mpitt@debian.org>
Bug-Debian: http://bugs.debian.org/640026
Index: calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py
===================================================================
--- calibre-0.8.29+dfsg.orig/src/calibre/gui2/actions/preferences.py 2011-12-16 05:49:14.000000000 +0100
+++ calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py 2011-12-20 19:29:04.798468930 +0100
@@ -28,8 +28,6 @@
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',

View File

@ -1,15 +0,0 @@
diff -burN calibre-2.9.0.orig/src/calibre/gui2/main.py calibre-2.9.0/src/calibre/gui2/main.py
--- calibre-2.9.0.orig/src/calibre/gui2/main.py 2014-11-09 20:09:54.081231882 +0800
+++ calibre-2.9.0/src/calibre/gui2/main.py 2014-11-09 20:15:48.193033844 +0800
@@ -37,8 +37,9 @@
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'))