From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cL+DJOXMVV8taQAA0tVLHw (envelope-from ) for ; Mon, 07 Sep 2020 06:02:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cOBXIOXMVV/HbwAA1q6Kng (envelope-from ) for ; Mon, 07 Sep 2020 06:02:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 503BC940309 for ; Mon, 7 Sep 2020 06:02:12 +0000 (UTC) Received: from localhost ([::1]:53214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFAEE-00026j-4k for larch@yhetil.org; Mon, 07 Sep 2020 02:02:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFAE6-00026P-GB for bug-guix@gnu.org; Mon, 07 Sep 2020 02:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFAE6-0000Vr-7M for bug-guix@gnu.org; Mon, 07 Sep 2020 02:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kFAE6-00014H-3P for bug-guix@gnu.org; Mon, 07 Sep 2020 02:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43151: Calibre ebook-viewer requires QtWebEngine Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 07 Sep 2020 06:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43151 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Andreas Enge , Arun Isaac , Leo Famulari Received: via spool by 43151-submit@debbugs.gnu.org id=B43151.15994585084078 (code B ref 43151); Mon, 07 Sep 2020 06:02:02 +0000 Received: (at 43151) by debbugs.gnu.org; 7 Sep 2020 06:01:48 +0000 Received: from localhost ([127.0.0.1]:47667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFADr-00013h-Mt for submit@debbugs.gnu.org; Mon, 07 Sep 2020 02:01:48 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:47892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFADq-00013S-Cn for 43151@debbugs.gnu.org; Mon, 07 Sep 2020 02:01:46 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4BlHjJ1TQczKmgL; Mon, 7 Sep 2020 08:01:40 +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=1599458498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ShGj9UBsKICwlcgjvUWHPFeNWxPYwJlhGuylyLIRULI=; b=gs/WO/uVhPPYxnY5QSDTUEtCeisfAS79UJd4Pzcjxl0kilFNhlB53nYdq8IDYOwxMeAblw gp4VeBZyDszpW0sAET7Lgx5ioAfyYZy8V18xrdkmYOLgJQoaeTdvlTnzjhmL9kG+iCyQWl OkpT9oDJclChq4KQd/rWu3w8tmJp4JDK1Soeu6WaaDN+iy9ynLxHJz/pQ2p0ZLTSK5YX+E qv8WlMTELFUxIna+5R+u0Eeh9LuF2eWYQ/U7I0FYUy+AcATkCkXhX1T3Y/HYm5HlSVW933 nxjtu/DyhNwtrX4GCNgaCia7hlxickbPOxWdGuXDOu/d/sddYOFRqYhLlAMvJQ== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id BPYtqciC2n9X; Mon, 7 Sep 2020 08:01:36 +0200 (CEST) References: <20200901094817.GB4371@jurong> <20200903095847.GA3534@jurong> <8eae6c95-6f98-ffb7-45ad-72a0ca053ce6@brendan.scot> <20200906082519.GA1716@jurong> From: Brendan Tildesley Message-ID: <27419617-9220-0f24-6ce1-6a2faae939d9@brendan.scot> Date: Mon, 7 Sep 2020 16:01:31 +1000 MIME-Version: 1.0 In-Reply-To: <20200906082519.GA1716@jurong> Content-Type: multipart/mixed; boundary="------------AD393FBB1DED394F08E16FCB" Content-Language: en-US X-MBO-SPAM-Probability: X-Rspamd-Score: -4.67 / 15.00 / 15.00 X-Rspamd-Queue-Id: EEBF217CC X-Rspamd-UID: e2f7e0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43151@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=brendan.scot header.s=MBO0001 header.b=gs/WO/uV; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: 8edM8hVFNabC This is a multi-part message in MIME format. --------------AD393FBB1DED394F08E16FCB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 6/9/20 6:25 pm, Andreas Enge wrote: > (cc-ing this and only this bug, the other one seems to have diverged towards > css and typescript) > > On Fri, Sep 04, 2020 at 07:53:02PM +1000, Brendan Tildesley wrote: >>> I did not realise there was already an open ticket for updating calibre, >>> thanks for pointing it out. Indeed I do not think we need to wrap all >>> programs. I tried out the programs in ...calibre-4.18.0/bin, and only these >>> two fail with an error message: >>> ebook-edit >>> ebook-viewer >>> I did not try the different calibre-*; calibre itself starts. Then it can call >>> ebook-viewer, and I do not know the mechanism, so it might just call the >>> wrapped binary ebook-viewer, or it might need wrapping itself because of using >>> internal python mechanics. I would give it a try and not wrap it in the first >>> place. >>> >>> All "binaries" are already wrappend with PYTHONPATH, so there is probably some >>> mechanic to avoid double wrapping (which your patch may already address). >> Since it uses (replace 'wrap..., it won't run the old wrap phase any more. >> Also I don't think it matters much that the other variables also have the Qt >> variable wrapped, perhaps it is more correct anyway. Especially since the >> wrap script uses '=, which wrap-program interprets as overwriting the >> variable completely, so applying it twice won't make a difference anyway. > Well, I think we should not wrap more than absolutely necessary. And it would > even be easier to write (no need to look for all the binaries, just use these > two names). Would you like to create a patch maybe for the current calibre, > and handle the update following the other bug? > > Andreas > It's actually a bit more complicated because every other executable still requires PYTHONPATH wrapping anyway as python-build-system does it. I just tested creating such a wrap phase that only sets QTWEBENGINEPROCESS_PATH for ebook-viewer and ebook-edit. It works when they are opened directly, but when they are opened via the calibre interface, they fail to find qtwebengine. so it does seem that calibre it's self needs that variable set anyway. I've attached a patching fixing this one issue. For those I've emailed coming from the Issue I created for updating Calibre, since it looks like the update will be delayed until Mathjax 3 is packaged properly, would you mind just reviewing this fix to get it through for the current Calibre. I think Ricardo was having a go at packaging swc to transpile typescript which is needed for mathjax, but it looks like quite a challenge. --------------AD393FBB1DED394F08E16FCB Content-Type: text/x-patch; charset=UTF-8; name="0001-gnu-calibre-Wrap-QTWEBENGINEPROCESS_PATH.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gnu-calibre-Wrap-QTWEBENGINEPROCESS_PATH.patch" >From 33b497cd3b8d21a76307b36729efb67baa08ac26 Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Mon, 7 Sep 2020 01:05:37 +1000 Subject: [PATCH] gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH. * gnu/packages/ebook.scm (calibre): Wrap QTWEBENGINEPROCESS_PATH in addition to wrapping PYTHONPATH as python-build-system does. --- gnu/packages/ebook.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index aab4155d3d..38040c6f65 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -246,6 +246,29 @@ (assoc-ref inputs "js-mathjax") "/share/javascript/mathjax")) (invoke "python2" "setup.py" "rapydscript"))) + (replace 'wrap + ;; Here we wrap PYTHONPATH exactly as it would be in + ;; python-build-system, plus the addition of + ;; QTWEBENGINEPROCESS_PATH, fixing a bug where Calibre would not + ;; find Qtwebengine. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (python (assoc-ref inputs "python")) + (site-packages + (cons (string-append out "/lib/python" + (python-version python) + "/site-packages") + (search-path-as-string->list (getenv "PYTHONPATH")))) + (qtwebengineprocess + (string-append (assoc-ref inputs "qtwebengine") + "/lib/qt5/libexec/QtWebEngineProcess"))) + (for-each (lambda (program) + (wrap-program program + `("QTWEBENGINEPROCESS_PATH" = (,qtwebengineprocess)) + `("PYTHONPATH" prefix ,site-packages))) + (find-files bin "."))) + #t)) (add-after 'install 'install-man-pages (lambda* (#:key outputs #:allow-other-keys) (copy-recursively -- 2.28.0 --------------AD393FBB1DED394F08E16FCB--