From patchwork Fri May 3 16:42:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Tildesley X-Patchwork-Id: 13879 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1D95616F96; Fri, 3 May 2019 17:48:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 67A7C16F91 for ; Fri, 3 May 2019 17:48:27 +0100 (BST) Received: from localhost ([127.0.0.1]:44511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMbMJ-0007fa-1T for patchwork@mira.cbaines.net; Fri, 03 May 2019 12:48:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMbIH-0004ia-4z for guix-patches@gnu.org; Fri, 03 May 2019 12:44:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMbI9-0003zZ-PY for guix-patches@gnu.org; Fri, 03 May 2019 12:44:12 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMbI4-0003vp-0d for guix-patches@gnu.org; Fri, 03 May 2019 12:44:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMbI3-0007Gd-SK for guix-patches@gnu.org; Fri, 03 May 2019 12:44:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35446] [PATCH v2 01/24] gnu: calibre: Update to 3.41.3. References: In-Reply-To: Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 May 2019 16:44:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35446 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35446@debbugs.gnu.org Received: via spool by 35446-submit@debbugs.gnu.org id=B35446.155690183727825 (code B ref 35446); Fri, 03 May 2019 16:44:03 +0000 Received: (at 35446) by debbugs.gnu.org; 3 May 2019 16:43:57 +0000 Received: from localhost ([127.0.0.1]:49474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMbHt-0007EL-7o for submit@debbugs.gnu.org; Fri, 03 May 2019 12:43:57 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:61576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMbHq-0007Dg-9v for 35446@debbugs.gnu.org; Fri, 03 May 2019 12:43:51 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 2CC0AA0C04 for <35446@debbugs.gnu.org>; Fri, 3 May 2019 18:43:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1556901824; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=4kG7xba2wy3IblXvTA+U2DfHkDulYPZjFuPHPtRrorM=; b=kAKaBdUacu+qM2HqPbSMrg0xGSZ4bxApZQX8KLOaqtk4Kr0UHWMtOpmBWYJbDiTpis6bYq wP4iqibzuGvhmrsYaaEayieWrFm/c4B34bSTFP1AZ0FYE8Ppon53tYxJKjGJhi6yD7V/bl 2hD1s+aulOL490l4PAT6x3h+PnXUOeRuAYYZXRGDM+NLum9dHb4v4SDP/xy+4xps2Pbsfy rJTrZQbPIhngy5bDvUyFkSePRylNdIiHxK7TyHVJ9N6B9uW2T0aDAaj7s/wix/3wDamdWf sm4UDEA9SHdtbBri597zjKyJabSVbdzMlfjLHiPLvaErxWaVyLJnrfE6id6w9A== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id Ol1Ksuf4Kw5e for <35446@debbugs.gnu.org>; Fri, 3 May 2019 18:43:32 +0200 (CEST) From: Brendan Tildesley Date: Sat, 4 May 2019 02:42:09 +1000 Message-Id: <20190503164232.1799-1-mail@brendan.scot> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ebook.scm (calibre): Update to 3.41.3. This breaks the build until my followup patches. * Remove feedparser patch. Calibre deleted its bundled feedparser, so it's no longer needed. Remove calibre-use-packaged-feedparser.patch. gnu/packages/patches/calibre-use-packaged-feedparser.patch: Delete file. gnu/local.mk: Remove reference to deleted feedparser patch.. * [inputs]: Replace python2-cssutils with the python2-css-parser fork. * [snippet]: Markdown is nolonger bundled, remove the unbundling code. --- gnu/local.mk | 1 - gnu/packages/ebook.scm | 12 ++--- .../calibre-use-packaged-feedparser.patch | 51 ------------------- 3 files changed, 4 insertions(+), 60 deletions(-) delete mode 100644 gnu/packages/patches/calibre-use-packaged-feedparser.patch diff --git a/gnu/local.mk b/gnu/local.mk index a0f40d13ae..d7d1a3fed6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -690,7 +690,6 @@ dist_patch_DATA = \ %D%/packages/patches/boost-fix-icu-build.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ - %D%/packages/patches/calibre-use-packaged-feedparser.patch \ %D%/packages/patches/casync-renameat2-declaration.patch \ %D%/packages/patches/catdoc-CVE-2017-11110.patch \ %D%/packages/patches/cdparanoia-fpic.patch \ diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 99e49bc172..a603519590 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -78,7 +78,7 @@ (define-public calibre (package (name "calibre") - (version "3.35.0") + (version "3.41.3") (source (origin (method url-fetch) @@ -87,20 +87,16 @@ version ".tar.xz")) (sha256 (base32 - "1gd15wjz4fhcra6d44xiy3hwbyk0miwb66a1pq5yldyy0hlb271z")) + "167hhv4wimkjnyfgqkyqmaiixhicbxacy6190gps98jyj4csi8ra")) ;; Remove non-free or doubtful code, see ;; https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00478.html (modules '((guix build utils))) (snippet '(begin - (delete-file-recursively "src/calibre/ebooks/markdown") (delete-file "src/odf/thumbnail.py") (delete-file-recursively "resources/fonts/liberation") - (substitute* (find-files "." "\\.py") - (("calibre\\.ebooks\\.markdown") "markdown")) #t)) - (patches (search-patches "calibre-use-packaged-feedparser.patch" - "calibre-no-updates-dialog.patch")))) + (patches (search-patches "calibre-no-updates-dialog.patch")))) (build-system python-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -129,7 +125,7 @@ ("python2-apsw" ,python2-apsw) ("python2-chardet" ,python2-chardet) ("python2-cssselect" ,python2-cssselect) - ("python2-cssutils" ,python2-cssutils) + ("python2-css-parser" ,python2-css-parser) ("python2-dateutil" ,python2-dateutil) ("python2-dbus" ,python2-dbus) ("python2-dnspython" ,python2-dnspython) diff --git a/gnu/packages/patches/calibre-use-packaged-feedparser.patch b/gnu/packages/patches/calibre-use-packaged-feedparser.patch deleted file mode 100644 index 8f4bbc8248..0000000000 --- a/gnu/packages/patches/calibre-use-packaged-feedparser.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Martin Pitt -Date: Mon, 14 Nov 2016 22:41:23 +0100 -Subject: Use packaged instead of bundled feedparser Python module - ---- - recipes/lenta_ru.recipe | 4 +++- - src/calibre/web/feeds/__init__.py | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -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'(&#\d+)([^0-9;])', r'\1;\2', raw_xml)