Guix packages old/broken version of qutebrowser

DoneSubmitted by Florian Bruhin.
Details
6 participants
  • Bengt Richter
  • Pierre Neidhardt
  • Florian Bruhin
  • Tobias Geerinckx-Rice
  • Mike Rosset
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
F
F
Florian Bruhin wrote on 9 Nov 2019 11:05
(address . bug-guix@gnu.org)
20191109100530.zdfrewfmengq7pud@hooch.localdomain
Hi,

I'm the upstream author of qutebrowser - it looks like Guix currently packages

That version is very outdated (July 2017, there have been 28 new releases since
then). It has various known security issues, but currently it just crashes
outright, because such an old version isn't compatible with Qt 5.11 which is
packaged in Guix.

That results in me getting crash reports around once per week - at this point,
it'd probably be better to not package qutebrowser at all, seeing that nobody
seems to maintain that package for a long time now.

Florian

--
https://www.qutebrowser.org| me@the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
I love long mails! | https://email.is-not-s.ms/
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE4E5WAAJAG47w528KkW6wyP1VoHIFAl3Gj2cACgkQkW6wyP1V
oHJMNBAAqPiw7LjQnuRQPqR2xWvTDsc97kmFEeCWP9PhL++VpaqcSWOXhM5ngskm
Ybw8envr+1jS6/PuVB/E3ecKxX41TEDmSU1RJ6Y5/78GTTDU7qFjPNDVFiFvN/Mv
09MzkxDk0F3dYPwCni8axt4y+1Q8XlO4i6tWSHRSJ/sheO8ztT6xBkv9mau8jw8y
nkjqwVWRkroqi1Vr32hTNc1PH8Oejg9sSPah+IvaPW6vpXv7+YPXb2OlPrBrJL+x
XFn5nL+4SkltFIvMi5xDGQfoyOqLAqnW31lfB4rs24dcDhQZyCpHDWWaE0WenOCZ
M/BVCjFPy4n92uwAWEHgMsmozqK6HwnGY1E/+J/t9+WKlHjuRI3NtqPadXg7cPI9
2R95Wc3PdLinqCS9/8ynotq+5jkp3g4I+CQLtZbTxGjHYSEpw27seHvWGVQWTM9m
05MDgfiGQUm5w7y5JezmhVpOgQWAUJ21fmeA22LrDt9a9HfMB5TY87NsJWP/M8CW
1IG7cJlILob6N3kXlTNIAU45jEUXONUNTY2pDT/MKEE43XdP5kiA75SIQ+9BF3fM
iTY+UnOuGTT1sRgIJKZFpbuArUy33VI1UEg4e+Rpz/x7F+/bPTgJTXOtWQhKsqcB
sMHukSfb8p/P9wJU6Glldaqon0mY6MCUYRA6xdchvMaPq6YprKE=
=DiqZ
-----END PGP SIGNATURE-----


T
T
Tobias Geerinckx-Rice wrote on 9 Nov 2019 17:49
(name . Florian Bruhin)(address . me@the-compiler.org)(address . 38148@debbugs.gnu.org)
87ftix9eqa.fsf@nckx
Florian,

[I'm not a regular qutebrowser user, nor maintainer — I don't
think we have one.]

Florian Bruhin 写道:
Toggle quote (19 lines)
> I'm the upstream author of qutebrowser - it looks like Guix
> currently packages
> qutebrowser 0.11.0:
> https://guix.gnu.org/packages/qutebrowser-0.11.0/
>
> That version is very outdated (July 2017, there have been 28 new
> releases since
> then). It has various known security issues, but currently it
> just crashes
> outright, because such an old version isn't compatible with Qt
> 5.11 which is
> packaged in Guix.
>
> That results in me getting crash reports around once per week -
> at this point,
> it'd probably be better to not package qutebrowser at all,
> seeing that nobody
> seems to maintain that package for a long time now.

Thank you for letting us know. My apologies for the noise from
these useless crash reports.

Is there a supported way to replace the default bug report URL
with our own?

If not, I could patch qutebrowser to pop up a dialogue with our
bug tracker (e-mail) address instead. The crash report itself
would likely be lost.

I've tried qutebrowser 1.8.1 with QtWebKit and it runs, but then
freezes (@ 0% CPU) after some minutes. I had to SIGKILL it.
However, so does 0.11.0.

I'll try to get it to run, and hopefully the state of
qutebrowser's dependencies in Guix will improve as well.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl3G7i0ACgkQ2Imw8BjF
STwmCg//areiHAe++JpbOXDi5CjWsuZHFDd+HNqCyWZLMRXVGg3CO113YZIaFQcU
5FXvBDjlzPcT9chOIt1GsBkTWRdrDPRkYX4WNBFcJcZrfKLLsfHzFWHucCNKZbFB
lkSE1sVClH9LpimJghEQ8+HkSSwhOe0CNmfjj1Dj4tVKiVXDv1k+zaDgoX4NN8FP
eAHjLUmuhci7PL4Dd5mk6hA8jIt/P8w/FUXQzhaXs5t7wxdlwY4vmTQzhA6UkBQU
BkrpUWwzl5xZt3H6OGYXLfpto2ajDKLuXfdvCJTyfhlpbB2+7837UEAiaNhVWGnZ
cCJvM4Ibl7M+QJdYJBUQlNQlirwlCyzO8xdX5TJvtI6CsQRNe3V2qet0ynAWjMAS
ykU/2aGYvZuTQ7TfXrdl485uMcAfAzgWvy87cLjzcMryv1Ca078/Ohp01IX3mz3j
juL/2lwJ0yhRv5HtSQ4bV7jffnpR/64ZzRNp1dZyrge7RkGmUGIHiZUwrnVD2I08
b/PLMoCSkvnMbhAL7tT1yR9foxTVADeQsxbfBl6Hp9bUFzzPMvMQZYrXoH3LGelO
ltz2iXIy3XpPyE8s9wGdOeoFKt8xDkEdfr32MMw0w9ZW3NYwdRHDrRGc8c7FsTJl
HjdmT4fJB26au7FaFJUsucfpGR3GZVr0uYOBg1+kYoB3yul+by0=
=wosX
-----END PGP SIGNATURE-----

B
B
Bengt Richter wrote on 10 Nov 2019 03:32
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
20191110023236.GA900@PhantoNv4ArchGx.localdomain
On +2019-11-09 17:49:49 +0100, Tobias Geerinckx-Rice via Bug reports for GNU Guix wrote:
Toggle quote (42 lines)
> Florian,
>
> [I'm not a regular qutebrowser user, nor maintainer — I don't think we have
> one.]
>
> Florian Bruhin 写道:
> > I'm the upstream author of qutebrowser - it looks like Guix currently
> > packages
> > qutebrowser 0.11.0: https://guix.gnu.org/packages/qutebrowser-0.11.0/
> >
> > That version is very outdated (July 2017, there have been 28 new
> > releases since
> > then). It has various known security issues, but currently it just
> > crashes
> > outright, because such an old version isn't compatible with Qt 5.11
> > which is
> > packaged in Guix.
> >
> > That results in me getting crash reports around once per week - at this
> > point,
> > it'd probably be better to not package qutebrowser at all, seeing that
> > nobody
> > seems to maintain that package for a long time now.
>
> Thank you for letting us know. My apologies for the noise from these
> useless crash reports.
>
> Is there a supported way to replace the default bug report URL with our own?
>
> If not, I could patch qutebrowser to pop up a dialogue with our bug tracker
> (e-mail) address instead. The crash report itself would likely be lost.
>
> I've tried qutebrowser 1.8.1 with QtWebKit and it runs, but then freezes (@
> 0% CPU) after some minutes. I had to SIGKILL it. However, so does 0.11.0.
>
> I'll try to get it to run, and hopefully the state of qutebrowser's
> dependencies in Guix will improve as well.
>
> Kind regards,
>
> T G-R

On reading the above, I wonder if we can invent a useful measure of
"runs" vs "works" vs "crashes" that could automatically be visible
in "guix show whatever-package".

I mean, there is a huge difference in confidence (at least on my part :)
between knowing that two developers have successfuly built and run a package
for the first time after refurbishing some orphan package vs knowing that
a thousand users have been using a tool many times daily for months without problems.

Could packages be instrumented with a simple invocation-with-normal/abnormal-exit
counter intialized on install, that could be voluntarily submitted to
some guix email addrress for automatic reliability-score update that
guix show whatever-package then accesses and presents?

Some finer-grain reporting would problably be desirable for packages that
install many executables.

A service could be enabled to send reports periodically for a list of packages
in use by a particular user, at the user's opt-in option of course.

I guess you'd have to have some guard against robo-shill-bots pumping
successful-use scores, but WDYT of the general idea?

Maybe also a count of historical CVE's against any inputs to the package build?
Well, the imagination rambles, but maybe something simple to start with could
test the usefulness?
--
Regards,
Bengt Richter
M
M
Mike Rosset wrote on 13 Jan 2020 11:33
[PATCH 1/2] gnu: Add python-pyqtwebengine.
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200113103304.9093-1-mike.rosset@gmail.com
* gnu/packages/qt.scm (python-pyqtwebengine): New variable.
---
gnu/packages/qt.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)

Toggle diff (124 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 514577678e..fcb297e99c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -38,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system python)
   #:use-module (guix packages)
   #:use-module (guix deprecation)
   #:use-module (guix utils)
@@ -1947,6 +1948,17 @@ module provides support functions to the automatically generated code.")
                   ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
+         ;; When building python-pyqtwebengine <qprinter.h> can not be
+         ;; included. Here we substitute the full path to the header in the
+         ;; store.
+         (add-before 'configure 'substitute-source
+           (lambda* (#:key inputs  #:allow-other-keys)
+             (let* ((qtbase (assoc-ref inputs "qtbase"))
+                    (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
+               (substitute* "sip/QtPrintSupport/qprinter.sip"
+                 (("<qprinter.h>")
+                  qtprinter.h))
+               #t)))
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -1986,6 +1998,91 @@ framework.  The bindings are implemented as a set of Python modules and
 contain over 620 classes.")
     (license license:gpl3)))
 
+(define-public python-pyqtwebengine
+  (package
+    (name "python-pyqtwebengine")
+    (version "5.12.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/"
+            version "/PyQtWebEngine_gpl-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python" ,python)
+       ("python-sip" ,python-sip)
+       ;; qtbase is required for qmake
+       ("qtbase" ,qtbase)))
+    (inputs
+     `(("python" ,python-wrapper)
+       ("python-sip" ,python-sip)
+       ("python-pyqt" ,python-pyqt)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebengine" ,qtwebengine)
+       ("python-pyqt" ,python-pyqt)
+       ("qtwebengine" ,qtwebengine)))
+    (arguments
+     `(#:modules ((srfi srfi-1)
+                  ,@%gnu-build-system-modules)
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (sipdir (string-append out "/share/sip"))
+                    (pyqt-sipdir (string-append
+                                  (assoc-ref inputs "python-pyqt") "/share/sip"))
+                    (python (assoc-ref inputs "python"))
+                    (python-version
+                     (last (string-split python #\-)))
+                    (python-major+minor
+                     (string-join
+                      (take (string-split python-version #\.) 2)
+                      "."))
+                    (lib (string-append out "/lib/python"
+                                        python-major+minor
+                                        "/site-packages/PyQt5"))
+                    (stubs (string-append lib "/PyQt5")))
+
+               (system* "mkdir" "-p" sipdir)
+               (invoke "python" "configure.py"
+                       "-w"
+                       "--no-dist-info"
+                       "--destdir" lib
+                       "--no-qsci-api"
+                       "--stubsdir" stubs
+                       "--sipdir" sipdir
+                       "--pyqt-sipdir" pyqt-sipdir))))
+         ;; Because this has a different prefix then python-pyqt then we need
+         ;; to make this a namespace of it's own
+         (add-after 'install 'make-namespace
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((__init__.py (string-append
+                                  (assoc-ref outputs "out")
+                                  "/lib/python3.7/site-packages/PyQt5/__init__.py")))
+               (with-output-to-file __init__.py
+                 (lambda _ (display "
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
+")))
+               #t)))
+         )))
+    (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
+    (synopsis "Python bindings for QtWebEngine")
+    (description
+     "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
+WebEngine libraries.  The bindings sit on top of PyQt5 and are implemented as a
+set of three modules.  Prior to v5.12 these bindings were part of PyQt
+itself.")
+    (license license:gpl3)))
+
 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
 ;; packages that could be used together.
-- 
2.24.1
M
M
Mike Rosset wrote on 13 Jan 2020 11:33
[PATCH 2/2] gnu: qutebrowser: Update to 1.9.0.
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200113103304.9093-2-mike.rosset@gmail.com
* gnu/packages/web-browsers.scm (qutebrowser): Update to 1.9.0.

qutebrowser no longer uses qtwebkit by default. It now defaults to qtwebengine.
---
gnu/packages/web-browsers.scm | 40 ++++++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 12 deletions(-)

Toggle diff (90 lines)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 137dccab81..035fdc1dd9 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -276,7 +276,7 @@ access.")
 (define-public qutebrowser
   (package
     (name "qutebrowser")
-    (version "1.8.3")
+    (version "1.9.0")
     (source
      (origin
        (method url-fetch)
@@ -285,11 +285,10 @@ access.")
                            "qutebrowser-" version ".tar.gz"))
        (sha256
         (base32
-         "055zmzk3q0m3hx1742nfy2mdawfllrkvijnbzp1hiv01dj1bxaf8"))))
+         "1y0yq1qfr6g1s7kf3w2crd0b025dv2dfknhlz3v0001ns3rgwj17"))))
     (build-system python-build-system)
     (native-inputs
-     `(("asciidoc" ,asciidoc)
-       ("python-attrs" ,python-attrs))) ; for tests
+     `(("python-attrs" ,python-attrs))) ; for tests
     (inputs
      `(("python-colorama" ,python-colorama)
        ("python-cssutils" ,python-cssutils)
@@ -298,23 +297,30 @@ access.")
        ("python-pygments" ,python-pygments)
        ("python-pypeg2" ,python-pypeg2)
        ("python-pyyaml" ,python-pyyaml)
+       ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
+       ;; that it's __init__.py is used first.
+       ("python-pyqtwebengine" ,python-pyqtwebengine)
        ("python-pyqt" ,python-pyqt)
-       ("qtwebkit" ,qtwebkit)))
+       ;; qtwebengine is not a direct input because it's already provided by
+       ;; python-pyqtwebengine.  It's included so we can wrap
+       ;; QTWEBENGINEPROCESS_PATH
+       ("qtwebengine" ,qtwebengine)))
     (arguments
-     `(;; FIXME: Tests have been added to Qutebrowser. But they currently fail on
-       ;; trying to locate QtWebEngine, and run it on a specific display.
-       ;; There does not seem to be a trivial way to suppress this test.
-       ;; Either fix this, or wait for a liberated QtWebEngine to make into GNU Guix.
-       ;; Change this according to <https://bugs.gnu.org/35866>.
+     `( ;; FIXME: With the existance of qtwebengine, tests can now run.  But
+       ;; they are still disabled because test phase hangs. It's not readily
+       ;; apparent as to why
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-before 'check 'set-env-offscreen
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t))
          (add-after 'install 'install-more
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (app (string-append out "/share/applications"))
                     (hicolor (string-append out "/share/icons/hicolor")))
-               (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")
                (install-file "doc/qutebrowser.1"
                              (string-append out "/share/man/man1"))
                (for-each
@@ -331,11 +337,21 @@ access.")
                  (("Exec=qutebrowser")
                   (string-append "Exec=" out "/bin/qutebrowser")))
                (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
+               #t)))
+         (add-after 'wrap 'wrap-qt-process-path
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin/qutebrowser"))
+                    (qt-process-path (string-append
+                                      (assoc-ref inputs "qtwebengine")
+                                      "/lib/qt5/libexec/QtWebEngineProcess")))
+               (wrap-program bin
+                 `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
                #t))))))
     (home-page "https://qutebrowser.org/")
     (synopsis "Minimal, keyboard-focused, vim-like web browser")
     (description "qutebrowser is a keyboard-focused browser with a minimal
-GUI.  It is based on PyQt5 and QtWebKit.")
+GUI.  It is based on PyQt5 and QtWebEngine.")
     (license license:gpl3+)))
 
 (define-public vimb
-- 
2.24.1
M
M
Mike Rosset wrote on 13 Jan 2020 11:45
Re: [PATCH 1/2] gnu: Add python-pyqtwebengine.
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
87o8v7eith.fsf@gmail.com
Hello Florian

With the addition of QtWebengine into Guix. I've created some patches to
upgrade qutebrowser to 1.9.0 and to use QtWebengine by default.

And Guix is now using Qt 5.12.6 which is not to bad.

I hope this leads to less error reports for you. Once this gets merged
in.

Regards,

Mike
P
P
Pierre Neidhardt wrote on 13 Jan 2020 15:16
Re: bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 38148@debbugs.gnu.org)
87o8v7qw5t.fsf@ambrevar.xyz
Thanks for the patches, comments below:

Mike Rosset <mike.rosset@gmail.com> writes:

Toggle quote (23 lines)
> * gnu/packages/qt.scm (python-pyqtwebengine): New variable.
> ---
> gnu/packages/qt.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 97 insertions(+)
>
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index 514577678e..fcb297e99c 100644
> --- a/gnu/packages/qt.scm
> +++ b/gnu/packages/qt.scm
> @@ -38,6 +38,7 @@
> #:use-module (guix build-system cmake)
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system trivial)
> + #:use-module (guix build-system python)
> #:use-module (guix packages)
> #:use-module (guix deprecation)
> #:use-module (guix utils)
> @@ -1947,6 +1948,17 @@ module provides support functions to the automatically generated code.")
> ,@%gnu-build-system-modules)
> #:phases
> (modify-phases %standard-phases
> + ;; When building python-pyqtwebengine <qprinter.h> can not be

Comma after python-pyqtwebengine helps with readability.

Toggle quote (2 lines)
> + ;; included. Here we substitute the full path to the header in the

Double-space after period.

Toggle quote (16 lines)
> + ;; store.
> + (add-before 'configure 'substitute-source
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let* ((qtbase (assoc-ref inputs "qtbase"))
> + (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
> + (substitute* "sip/QtPrintSupport/qprinter.sip"
> + (("<qprinter.h>")
> + qtprinter.h))
> + #t)))
> (replace 'configure
> (lambda* (#:key inputs outputs #:allow-other-keys)
> (let* ((out (assoc-ref outputs "out"))
> @@ -1986,6 +1998,91 @@ framework. The bindings are implemented as a set of Python modules and
> contain over 620 classes.")
> (license license:gpl3)))

Please apply the above pyqt change to a separate commit.

Toggle quote (31 lines)
> +(define-public python-pyqtwebengine
> + (package
> + (name "python-pyqtwebengine")
> + (version "5.12.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/"
> + version "/PyQtWebEngine_gpl-" version ".tar.gz"))
> + (sha256
> + (base32
> + "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"))))
> + (build-system gnu-build-system)
> + (native-inputs
> + `(("python" ,python)
> + ("python-sip" ,python-sip)
> + ;; qtbase is required for qmake
> + ("qtbase" ,qtbase)))
> + (inputs
> + `(("python" ,python-wrapper)
> + ("python-sip" ,python-sip)
> + ("python-pyqt" ,python-pyqt)
> + ("qtbase" ,qtbase)
> + ("qtsvg" ,qtsvg)
> + ("qtdeclarative" ,qtdeclarative)
> + ("qtwebchannel" ,qtwebchannel)
> + ("qtwebengine" ,qtwebengine)
> + ("python-pyqt" ,python-pyqt)
> + ("qtwebengine" ,qtwebengine)))

qbwebengine duplicate.

Toggle quote (19 lines)
> + (arguments
> + `(#:modules ((srfi srfi-1)
> + ,@%gnu-build-system-modules)
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (sipdir (string-append out "/share/sip"))
> + (pyqt-sipdir (string-append
> + (assoc-ref inputs "python-pyqt") "/share/sip"))
> + (python (assoc-ref inputs "python"))
> + (python-version
> + (last (string-split python #\-)))
> + (python-major+minor
> + (string-join
> + (take (string-split python-version #\.) 2)
> + "."))

Use version-major+minor from (guix utils) instead?

Toggle quote (7 lines)
> + (lib (string-append out "/lib/python"
> + python-major+minor
> + "/site-packages/PyQt5"))
> + (stubs (string-append lib "/PyQt5")))
> +
> + (system* "mkdir" "-p" sipdir)

(mkdir-p sipdir)

Toggle quote (10 lines)
> + (invoke "python" "configure.py"
> + "-w"
> + "--no-dist-info"
> + "--destdir" lib
> + "--no-qsci-api"
> + "--stubsdir" stubs
> + "--sipdir" sipdir
> + "--pyqt-sipdir" pyqt-sipdir))))
> + ;; Because this has a different prefix then python-pyqt then we need

"then python-pyqt" -> "than python-pyqt".

Toggle quote (2 lines)
> + ;; to make this a namespace of it's own

Missing period.

--
Pierre Neidhardt
P
P
Pierre Neidhardt wrote on 13 Jan 2020 15:20
Re: bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0.
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 38148@debbugs.gnu.org)
87lfqbqvyz.fsf@ambrevar.xyz
Mike Rosset <mike.rosset@gmail.com> writes:

Toggle quote (47 lines)
> * gnu/packages/web-browsers.scm (qutebrowser): Update to 1.9.0.
>
> qutebrowser no longer uses qtwebkit by default. It now defaults to qtwebengine.
> ---
> gnu/packages/web-browsers.scm | 40 ++++++++++++++++++++++++-----------
> 1 file changed, 28 insertions(+), 12 deletions(-)
>
> diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
> index 137dccab81..035fdc1dd9 100644
> --- a/gnu/packages/web-browsers.scm
> +++ b/gnu/packages/web-browsers.scm
> @@ -276,7 +276,7 @@ access.")
> (define-public qutebrowser
> (package
> (name "qutebrowser")
> - (version "1.8.3")
> + (version "1.9.0")
> (source
> (origin
> (method url-fetch)
> @@ -285,11 +285,10 @@ access.")
> "qutebrowser-" version ".tar.gz"))
> (sha256
> (base32
> - "055zmzk3q0m3hx1742nfy2mdawfllrkvijnbzp1hiv01dj1bxaf8"))))
> + "1y0yq1qfr6g1s7kf3w2crd0b025dv2dfknhlz3v0001ns3rgwj17"))))
> (build-system python-build-system)
> (native-inputs
> - `(("asciidoc" ,asciidoc)
> - ("python-attrs" ,python-attrs))) ; for tests
> + `(("python-attrs" ,python-attrs))) ; for tests
> (inputs
> `(("python-colorama" ,python-colorama)
> ("python-cssutils" ,python-cssutils)
> @@ -298,23 +297,30 @@ access.")
> ("python-pygments" ,python-pygments)
> ("python-pypeg2" ,python-pypeg2)
> ("python-pyyaml" ,python-pyyaml)
> + ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
> + ;; that it's __init__.py is used first.
> + ("python-pyqtwebengine" ,python-pyqtwebengine)
> ("python-pyqt" ,python-pyqt)
> - ("qtwebkit" ,qtwebkit)))
> + ;; qtwebengine is not a direct input because it's already provided by
> + ;; python-pyqtwebengine. It's included so we can wrap
> + ;; QTWEBENGINEPROCESS_PATH

The phrasing is a bit confusing. I'd say

"While qtwebengine is already provided by python-pyqtwebengine, it's
included here so we can wrap QTWEBENGINEPROCESS_PATH."

Toggle quote (11 lines)
> + ("qtwebengine" ,qtwebengine)))
> (arguments
> - `(;; FIXME: Tests have been added to Qutebrowser. But they currently fail on
> - ;; trying to locate QtWebEngine, and run it on a specific display.
> - ;; There does not seem to be a trivial way to suppress this test.
> - ;; Either fix this, or wait for a liberated QtWebEngine to make into GNU Guix.
> - ;; Change this according to <https://bugs.gnu.org/35866>.
> + `( ;; FIXME: With the existance of qtwebengine, tests can now run. But
> + ;; they are still disabled because test phase hangs. It's not readily
> + ;; apparent as to why

Missing period.

Toggle quote (14 lines)
> #:tests? #f
> #:phases
> (modify-phases %standard-phases
> + (add-before 'check 'set-env-offscreen
> + (lambda _
> + (setenv "QT_QPA_PLATFORM" "offscreen")
> + #t))
> (add-after 'install 'install-more
> (lambda* (#:key outputs #:allow-other-keys)
> (let* ((out (assoc-ref outputs "out"))
> (app (string-append out "/share/applications"))
> (hicolor (string-append out "/share/icons/hicolor")))
> - (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")

Why are you removing this?

Other than those few nits, looks good to me!

Cheers!

--
Pierre Neidhardt
M
M
Mike Rosset wrote on 13 Jan 2020 19:54
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 38148@debbugs.gnu.org)
877e1vxk3y.fsf@gmail.com
Pierre Neidhardt writes:

Toggle quote (6 lines)
>
> Why are you removing this?
>
> Other than those few nits, looks good to me!
>

Thanks for looking at this Pierre. I will makes these changes you have
suggested ASAP.


I removed the man page generation because it is already distributed with
the tarball and it caused a fatal error during this phase with 1.9.0. I
figured generating the man page was redundant, and we could remove an
unneeded native input. WDYT?

see

Toggle snippet (4 lines)
tar -tf $(guix build -S qutebrowser) | grep 'doc/qutebrowser.1$'


Mike
P
P
Pierre Neidhardt wrote on 13 Jan 2020 20:02
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 38148@debbugs.gnu.org)
87imlfp4c0.fsf@ambrevar.xyz
Mike Rosset <mike.rosset@gmail.com> writes:

Toggle quote (5 lines)
> I removed the man page generation because it is already distributed with
> the tarball and it caused a fatal error during this phase with 1.9.0. I
> figured generating the man page was redundant, and we could remove an
> unneeded native input. WDYT?

Sure. Please add a comment explaining this in the commit message.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl4cvs8ACgkQm9z0l6S7
zH8ecgf+KuxBmdwNu0e/D4nGN2Cvo/Stq0hOP7Z42UV+EcMHmMIOmSoJHYsYTGmZ
U9WxdtmfCY3xtbBqZ2F0GrAr2sJfzsBmPSKka/8Lpaek467Lu8r0EfR7O0t5QGVT
X31sqmZV4h6pAjAxGFySb76j/H1XViEhwat3bU4NGh3EINhV6phBPP0WYAlqQcAQ
IuZak91qZFP/7IAy0EXec9Htt3gAk5iNMULrlriRjKuzS2LRi9qZlEiWcVXKjxQ3
S08si7tc9XVNzRgyRDYArHIyJijGWQM/9potDog337OaxcpD/S9K6zDtzOxFOPiM
U0ZbtluVqXBM5esedOul6C3X801ckQ==
=rmmw
-----END PGP SIGNATURE-----

M
M
Mike Rosset wrote on 14 Jan 2020 01:13
[PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200114001321.26486-1-mike.rosset@gmail.com
* gnu/packages/qt.scm (python-pyqt)[comments]: And python-pyqtwebengine now
uses mkdir-p instead of a system call.
---
gnu/packages/qt.scm | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index fcb297e99c..611c38a443 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1948,8 +1948,8 @@ module provides support functions to the automatically generated code.")
                   ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
-         ;; When building python-pyqtwebengine <qprinter.h> can not be
-         ;; included. Here we substitute the full path to the header in the
+         ;; When building python-pyqtwebengine, <qprinter.h> can not be
+         ;; included.  Here we substitute the full path to the header in the
          ;; store.
          (add-before 'configure 'substitute-source
            (lambda* (#:key inputs  #:allow-other-keys)
@@ -2025,7 +2025,6 @@ contain over 620 classes.")
        ("qtsvg" ,qtsvg)
        ("qtdeclarative" ,qtdeclarative)
        ("qtwebchannel" ,qtwebchannel)
-       ("qtwebengine" ,qtwebengine)
        ("python-pyqt" ,python-pyqt)
        ("qtwebengine" ,qtwebengine)))
     (arguments
@@ -2044,14 +2043,13 @@ contain over 620 classes.")
                      (last (string-split python #\-)))
                     (python-major+minor
                      (string-join
-                      (take (string-split python-version #\.) 2)
-                      "."))
+                      (take (string-split python-version #\.) 2) "."))
                     (lib (string-append out "/lib/python"
                                         python-major+minor
                                         "/site-packages/PyQt5"))
                     (stubs (string-append lib "/PyQt5")))
 
-               (system* "mkdir" "-p" sipdir)
+               (mkdir-p sipdir)
                (invoke "python" "configure.py"
                        "-w"
                        "--no-dist-info"
@@ -2072,8 +2070,7 @@ contain over 620 classes.")
 from pkgutil import extend_path
 __path__ = extend_path(__path__, __name__)
 ")))
-               #t)))
-         )))
+               #t))))))
     (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
     (synopsis "Python bindings for QtWebEngine")
     (description
-- 
2.24.1
M
M
Mike Rosset wrote on 14 Jan 2020 01:13
[PATCH 4/4] gnu: qutebrowser: Improve comment sections.
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200114001321.26486-2-mike.rosset@gmail.com
* gnu/packages/web-browsers.scm (qutebrowser)[comments]: Improve the comment
describing why qtwebengine is used as an input. Added punctuation to FIXME
for test phase.
---
gnu/packages/web-browsers.scm | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 035fdc1dd9..a44add3c0a 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -301,14 +301,13 @@ access.")
        ;; that it's __init__.py is used first.
        ("python-pyqtwebengine" ,python-pyqtwebengine)
        ("python-pyqt" ,python-pyqt)
-       ;; qtwebengine is not a direct input because it's already provided by
-       ;; python-pyqtwebengine.  It's included so we can wrap
-       ;; QTWEBENGINEPROCESS_PATH
+       ;; While qtwebengine is provided by python-pyqtwebengine.  It's
+       ;; included here so we can wrap QTWEBENGINEPROCESS_PATH
        ("qtwebengine" ,qtwebengine)))
     (arguments
-     `( ;; FIXME: With the existance of qtwebengine, tests can now run.  But
-       ;; they are still disabled because test phase hangs. It's not readily
-       ;; apparent as to why
+     `(;; FIXME: With the existance of qtwebengine, tests can now run.  But
+       ;; they are still disabled because test phase hangs.  It's not readily
+       ;; apparent as to why.
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
-- 
2.24.1
M
M
Mike Rosset wrote on 14 Jan 2020 01:42
Re: bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 38148@debbugs.gnu.org)
87tv4yc1hb.fsf@gmail.com
Toggle quote (18 lines)
>> + ;; store.
>> + (add-before 'configure 'substitute-source
>> + (lambda* (#:key inputs #:allow-other-keys)
>> + (let* ((qtbase (assoc-ref inputs "qtbase"))
>> + (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
>> + (substitute* "sip/QtPrintSupport/qprinter.sip"
>> + (("<qprinter.h>")
>> + qtprinter.h))
>> + #t)))
>> (replace 'configure
>> (lambda* (#:key inputs outputs #:allow-other-keys)
>> (let* ((out (assoc-ref outputs "out"))
>> @@ -1986,6 +1998,91 @@ framework. The bindings are implemented as a set of Python modules and
>> contain over 620 classes.")
>> (license license:gpl3)))
>
> Please apply the above pyqt change to a separate commit.

I missed this comment with my new series. If this really needs to be
done, I'll have to redo all of the commits and resend the series. Can
this be avoided if possible?

Toggle quote (22 lines)
> + (arguments
>> + `(#:modules ((srfi srfi-1)
>> + ,@%gnu-build-system-modules)
>> + #:phases
>> + (modify-phases %standard-phases
>> + (replace 'configure
>> + (lambda* (#:key inputs outputs #:allow-other-keys)
>> + (let* ((out (assoc-ref outputs "out"))
>> + (sipdir (string-append out "/share/sip"))
>> + (pyqt-sipdir (string-append
>> + (assoc-ref inputs "python-pyqt") "/share/sip"))
>> + (python (assoc-ref inputs "python"))
>> + (python-version
>> + (last (string-split python #\-)))
>> + (python-major+minor
>> + (string-join
>> + (take (string-split python-version #\.) 2)
>> + "."))
>
> Use version-major+minor from (guix utils) instead?


This is not an easy fix, I actually snarfed this from python-pyqt. In
fact most of the python packages in this file use this
method. Unfortunately version-major+minor cannot take an input, it needs
to take a guix package record.

This creates some scoping issues, in order to get the version for
python. you would need to do something like

semi pseudo code.
Toggle snippet (3 lines)
(begin (use-modules (gnu packages python)) (version-major+minor python))

This approach in theory works only when the input is python. But take
the scenario were the input changes to a specific python version. Then
our above code will still work but no longer produce the correct path.

How python-build-system handles this. Is the same way as this let. In
fact it looks like they wer copied verbatim.

Unfortunately these python packages don't use python setuptools. So
gnu-build-system is used instead. Even if we could use
python-build-system. This would just make the code more ascetically
pleasing. The underlying code would still be the same.

The string parsing is not pretty, but it at least functional. If the
input version changes the so probably will the path.

Mike
P
P
Pierre Neidhardt wrote on 14 Jan 2020 10:42
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 38148@debbugs.gnu.org)
871rs2z84h.fsf@ambrevar.xyz
Mike Rosset <mike.rosset@gmail.com> writes:

Toggle quote (6 lines)
>> Please apply the above pyqt change to a separate commit.
>
> I missed this comment with my new series. If this really needs to be
> done, I'll have to redo all of the commits and resend the series. Can
> this be avoided if possible?

Yes, this is really necessary, commits must be atomic or else the log
gets easily tangled.

This is not hard to do though:

- rebase-edit the offending commit ("r m" with magit), this will leave
git in a detached state.

- Soft-reset HEAD~.

- Commit the first changes to a new commit.

- Commit the rest.

Let me know if you need more help.

Toggle quote (5 lines)
>> Use version-major+minor from (guix utils) instead?
>
>
> This is not an easy fix, I actually snarfed this from python-pyqt.

No problem, it's OK to leave it.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl4djR4ACgkQm9z0l6S7
zH9rKgf+MiXGEZHe59RkdQgssy4zcdt98wcQL7iJSK/6O5jxdL9KHHn8QgEloRif
L4etpmU7jsK/9+pjZg9RAaYcERuHuY1qEo8H5qxqpmsuHwGuoLNjpFKY7vKCt2Ne
erRiK5bPw5jImexXJOQj5kn0tUz9KwPvcRwQ7rIc5c3SQqSXFA0IUcLVi8lSpoK+
e1VgMRMLxtUs5P/P2++r+/cja73qt+e4293CFttvwy3pKHWKLjgnlEBEZU+cd9Ae
iqKSGZUnyijAP6vw0MaAuzlKU9jHBLPbQRt3bS3pmjp0zS1As5QWerfHvE3FF8wV
ghsS4jUlUwYQepsLYqfGTdn1GKwlxg==
=T5p8
-----END PGP SIGNATURE-----

M
M
Mike Rosset wrote on 14 Jan 2020 11:25
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 38148@debbugs.gnu.org)
87sgkibai3.fsf@gmail.com
Pierre Neidhardt writes:

Toggle quote (25 lines)
> Mike Rosset <mike.rosset@gmail.com> writes:
>
>>> Please apply the above pyqt change to a separate commit.
>>
>> I missed this comment with my new series. If this really needs to be
>> done, I'll have to redo all of the commits and resend the series. Can
>> this be avoided if possible?
>
> Yes, this is really necessary, commits must be atomic or else the log
> gets easily tangled.
>
> This is not hard to do though:
>
> - rebase-edit the offending commit ("r m" with magit), this will leave
> git in a detached state.
>
> - Soft-reset HEAD~.
>
> - Commit the first changes to a new commit.
>
> - Commit the rest.
>
> Let me know if you need more help.
>

Forgive me. After I had replied here, I realized your suggestion was
the right way to go about this. I was tired and lazy when I responded.

I will fix the commits. I'm not sure how this will effect the series
worse case I'll just send the final series. We can treat this as a
squash in away.

Mike
M
M
Mike Rosset wrote on 14 Jan 2020 12:04
[PATCH 1/5] gnu: python-pyqt: Substitute the full path of <qprinter.h>
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200114110459.13912-1-mike.rosset@gmail.com
* gnu/packages/qt.scm (python-pyqt)[phases]: When building
python-pyqtwebengine qprinter.h can not be found. This substitutes the full
path of qprinter.h in the qprinter sip specification file.
---
gnu/packages/qt.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (24 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 514577678e..9f289aa6df 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1947,6 +1947,17 @@ module provides support functions to the automatically generated code.")
                   ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
+         ;; When building python-pyqtwebengine <qprinter.h> can not be
+         ;; included. Here we substitute the full path to the header in the
+         ;; store.
+         (add-before 'configure 'substitute-source
+           (lambda* (#:key inputs  #:allow-other-keys)
+             (let* ((qtbase (assoc-ref inputs "qtbase"))
+                    (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
+               (substitute* "sip/QtPrintSupport/qprinter.sip"
+                 (("<qprinter.h>")
+                  qtprinter.h))
+               #t)))
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-- 
2.24.1
M
M
Mike Rosset wrote on 14 Jan 2020 12:06
[PATCH 2/5] gnu: Add python-pyqtwebengine.
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200114110639.14059-1-mike.rosset@gmail.com
* gnu/packages/qt.scm (python-pyqtwebengine): New variable.
---
gnu/packages/qt.scm | 86 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)

Toggle diff (106 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 9f289aa6df..fcb297e99c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -38,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system python)
   #:use-module (guix packages)
   #:use-module (guix deprecation)
   #:use-module (guix utils)
@@ -1997,6 +1998,91 @@ framework.  The bindings are implemented as a set of Python modules and
 contain over 620 classes.")
     (license license:gpl3)))
 
+(define-public python-pyqtwebengine
+  (package
+    (name "python-pyqtwebengine")
+    (version "5.12.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/"
+            version "/PyQtWebEngine_gpl-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python" ,python)
+       ("python-sip" ,python-sip)
+       ;; qtbase is required for qmake
+       ("qtbase" ,qtbase)))
+    (inputs
+     `(("python" ,python-wrapper)
+       ("python-sip" ,python-sip)
+       ("python-pyqt" ,python-pyqt)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebengine" ,qtwebengine)
+       ("python-pyqt" ,python-pyqt)
+       ("qtwebengine" ,qtwebengine)))
+    (arguments
+     `(#:modules ((srfi srfi-1)
+                  ,@%gnu-build-system-modules)
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (sipdir (string-append out "/share/sip"))
+                    (pyqt-sipdir (string-append
+                                  (assoc-ref inputs "python-pyqt") "/share/sip"))
+                    (python (assoc-ref inputs "python"))
+                    (python-version
+                     (last (string-split python #\-)))
+                    (python-major+minor
+                     (string-join
+                      (take (string-split python-version #\.) 2)
+                      "."))
+                    (lib (string-append out "/lib/python"
+                                        python-major+minor
+                                        "/site-packages/PyQt5"))
+                    (stubs (string-append lib "/PyQt5")))
+
+               (system* "mkdir" "-p" sipdir)
+               (invoke "python" "configure.py"
+                       "-w"
+                       "--no-dist-info"
+                       "--destdir" lib
+                       "--no-qsci-api"
+                       "--stubsdir" stubs
+                       "--sipdir" sipdir
+                       "--pyqt-sipdir" pyqt-sipdir))))
+         ;; Because this has a different prefix then python-pyqt then we need
+         ;; to make this a namespace of it's own
+         (add-after 'install 'make-namespace
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((__init__.py (string-append
+                                  (assoc-ref outputs "out")
+                                  "/lib/python3.7/site-packages/PyQt5/__init__.py")))
+               (with-output-to-file __init__.py
+                 (lambda _ (display "
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
+")))
+               #t)))
+         )))
+    (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
+    (synopsis "Python bindings for QtWebEngine")
+    (description
+     "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
+WebEngine libraries.  The bindings sit on top of PyQt5 and are implemented as a
+set of three modules.  Prior to v5.12 these bindings were part of PyQt
+itself.")
+    (license license:gpl3)))
+
 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
 ;; packages that could be used together.
-- 
2.24.1
M
M
Mike Rosset wrote on 14 Jan 2020 12:06
[PATCH 3/5] gnu: qutebrowser: Update to 1.9.0.
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200114110639.14059-2-mike.rosset@gmail.com
* gnu/packages/web-browsers.scm (qutebrowser): Update to 1.9.0.

qutebrowser no longer uses qtwebkit by default. It now defaults to qtwebengine.
---
gnu/packages/web-browsers.scm | 40 ++++++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 12 deletions(-)

Toggle diff (90 lines)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 137dccab81..035fdc1dd9 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -276,7 +276,7 @@ access.")
 (define-public qutebrowser
   (package
     (name "qutebrowser")
-    (version "1.8.3")
+    (version "1.9.0")
     (source
      (origin
        (method url-fetch)
@@ -285,11 +285,10 @@ access.")
                            "qutebrowser-" version ".tar.gz"))
        (sha256
         (base32
-         "055zmzk3q0m3hx1742nfy2mdawfllrkvijnbzp1hiv01dj1bxaf8"))))
+         "1y0yq1qfr6g1s7kf3w2crd0b025dv2dfknhlz3v0001ns3rgwj17"))))
     (build-system python-build-system)
     (native-inputs
-     `(("asciidoc" ,asciidoc)
-       ("python-attrs" ,python-attrs))) ; for tests
+     `(("python-attrs" ,python-attrs))) ; for tests
     (inputs
      `(("python-colorama" ,python-colorama)
        ("python-cssutils" ,python-cssutils)
@@ -298,23 +297,30 @@ access.")
        ("python-pygments" ,python-pygments)
        ("python-pypeg2" ,python-pypeg2)
        ("python-pyyaml" ,python-pyyaml)
+       ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
+       ;; that it's __init__.py is used first.
+       ("python-pyqtwebengine" ,python-pyqtwebengine)
        ("python-pyqt" ,python-pyqt)
-       ("qtwebkit" ,qtwebkit)))
+       ;; qtwebengine is not a direct input because it's already provided by
+       ;; python-pyqtwebengine.  It's included so we can wrap
+       ;; QTWEBENGINEPROCESS_PATH
+       ("qtwebengine" ,qtwebengine)))
     (arguments
-     `(;; FIXME: Tests have been added to Qutebrowser. But they currently fail on
-       ;; trying to locate QtWebEngine, and run it on a specific display.
-       ;; There does not seem to be a trivial way to suppress this test.
-       ;; Either fix this, or wait for a liberated QtWebEngine to make into GNU Guix.
-       ;; Change this according to <https://bugs.gnu.org/35866>.
+     `( ;; FIXME: With the existance of qtwebengine, tests can now run.  But
+       ;; they are still disabled because test phase hangs. It's not readily
+       ;; apparent as to why
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-before 'check 'set-env-offscreen
+           (lambda _
+             (setenv "QT_QPA_PLATFORM" "offscreen")
+             #t))
          (add-after 'install 'install-more
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (app (string-append out "/share/applications"))
                     (hicolor (string-append out "/share/icons/hicolor")))
-               (invoke "a2x" "-f" "manpage" "doc/qutebrowser.1.asciidoc")
                (install-file "doc/qutebrowser.1"
                              (string-append out "/share/man/man1"))
                (for-each
@@ -331,11 +337,21 @@ access.")
                  (("Exec=qutebrowser")
                   (string-append "Exec=" out "/bin/qutebrowser")))
                (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)
+               #t)))
+         (add-after 'wrap 'wrap-qt-process-path
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin/qutebrowser"))
+                    (qt-process-path (string-append
+                                      (assoc-ref inputs "qtwebengine")
+                                      "/lib/qt5/libexec/QtWebEngineProcess")))
+               (wrap-program bin
+                 `("QTWEBENGINEPROCESS_PATH" ":" prefix (,qt-process-path)))
                #t))))))
     (home-page "https://qutebrowser.org/")
     (synopsis "Minimal, keyboard-focused, vim-like web browser")
     (description "qutebrowser is a keyboard-focused browser with a minimal
-GUI.  It is based on PyQt5 and QtWebKit.")
+GUI.  It is based on PyQt5 and QtWebEngine.")
     (license license:gpl3+)))
 
 (define-public vimb
-- 
2.24.1
M
M
Mike Rosset wrote on 14 Jan 2020 12:06
[PATCH 4/5] gnu: python-pyqt: Improved qprinter.h substitutition comment
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200114110639.14059-3-mike.rosset@gmail.com
* gnu/packages/qt.scm (python-pyqt)[comments]: And python-pyqtwebengine now
uses mkdir-p instead of a system call.
---
gnu/packages/qt.scm | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index fcb297e99c..611c38a443 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1948,8 +1948,8 @@ module provides support functions to the automatically generated code.")
                   ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
-         ;; When building python-pyqtwebengine <qprinter.h> can not be
-         ;; included. Here we substitute the full path to the header in the
+         ;; When building python-pyqtwebengine, <qprinter.h> can not be
+         ;; included.  Here we substitute the full path to the header in the
          ;; store.
          (add-before 'configure 'substitute-source
            (lambda* (#:key inputs  #:allow-other-keys)
@@ -2025,7 +2025,6 @@ contain over 620 classes.")
        ("qtsvg" ,qtsvg)
        ("qtdeclarative" ,qtdeclarative)
        ("qtwebchannel" ,qtwebchannel)
-       ("qtwebengine" ,qtwebengine)
        ("python-pyqt" ,python-pyqt)
        ("qtwebengine" ,qtwebengine)))
     (arguments
@@ -2044,14 +2043,13 @@ contain over 620 classes.")
                      (last (string-split python #\-)))
                     (python-major+minor
                      (string-join
-                      (take (string-split python-version #\.) 2)
-                      "."))
+                      (take (string-split python-version #\.) 2) "."))
                     (lib (string-append out "/lib/python"
                                         python-major+minor
                                         "/site-packages/PyQt5"))
                     (stubs (string-append lib "/PyQt5")))
 
-               (system* "mkdir" "-p" sipdir)
+               (mkdir-p sipdir)
                (invoke "python" "configure.py"
                        "-w"
                        "--no-dist-info"
@@ -2072,8 +2070,7 @@ contain over 620 classes.")
 from pkgutil import extend_path
 __path__ = extend_path(__path__, __name__)
 ")))
-               #t)))
-         )))
+               #t))))))
     (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
     (synopsis "Python bindings for QtWebEngine")
     (description
-- 
2.24.1
M
M
Mike Rosset wrote on 14 Jan 2020 12:06
[PATCH 5/5] gnu: qutebrowser: Improve comment sections.
(address . 38148@debbugs.gnu.org)(address . mike.rosset@gmail.com)
20200114110639.14059-4-mike.rosset@gmail.com
* gnu/packages/web-browsers.scm (qutebrowser)[comments]: Improve the comment
describing why qtwebengine is used as an input. Added punctuation to FIXME
for test phase.
---
gnu/packages/web-browsers.scm | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 035fdc1dd9..a44add3c0a 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -301,14 +301,13 @@ access.")
        ;; that it's __init__.py is used first.
        ("python-pyqtwebengine" ,python-pyqtwebengine)
        ("python-pyqt" ,python-pyqt)
-       ;; qtwebengine is not a direct input because it's already provided by
-       ;; python-pyqtwebengine.  It's included so we can wrap
-       ;; QTWEBENGINEPROCESS_PATH
+       ;; While qtwebengine is provided by python-pyqtwebengine.  It's
+       ;; included here so we can wrap QTWEBENGINEPROCESS_PATH
        ("qtwebengine" ,qtwebengine)))
     (arguments
-     `( ;; FIXME: With the existance of qtwebengine, tests can now run.  But
-       ;; they are still disabled because test phase hangs. It's not readily
-       ;; apparent as to why
+     `(;; FIXME: With the existance of qtwebengine, tests can now run.  But
+       ;; they are still disabled because test phase hangs.  It's not readily
+       ;; apparent as to why.
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
-- 
2.24.1
M
M
Mike Rosset wrote on 14 Jan 2020 12:09
Re: bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 38148@debbugs.gnu.org)
874kwyfg6d.fsf@gmail.com
Pierre Neidhardt writes:

Toggle quote (25 lines)
> Mike Rosset <mike.rosset@gmail.com> writes:
>
>>> Please apply the above pyqt change to a separate commit.
>>
>> I missed this comment with my new series. If this really needs to be
>> done, I'll have to redo all of the commits and resend the series. Can
>> this be avoided if possible?
>
> Yes, this is really necessary, commits must be atomic or else the log
> gets easily tangled.
>
> This is not hard to do though:
>
> - rebase-edit the offending commit ("r m" with magit), this will leave
> git in a detached state.
>
> - Soft-reset HEAD~.
>
> - Commit the first changes to a new commit.
>
> - Commit the rest.
>
> Let me know if you need more help.
>

I've reworked the commit as suggested. I resent the series. Nothing else
has changed in the series other then I split the first commit into two.
And I problem broke git am or the bug thread. sorry in advance :(

Mike
P
P
Pierre Neidhardt wrote on 15 Jan 2020 16:31
(name . Mike Rosset)(address . mike.rosset@gmail.com)(address . 38148@debbugs.gnu.org)
8736cgivmx.fsf@ambrevar.xyz
Thank you, I've merged!
qtwebengine is finally in, hooray!

Thank you to you all, and big thanks to Mike for driving this effort!

I committed a few changes to your commits:

- I squashed the comment fixing commits.
- Edited some more typos.
- Removed "bug#38148: [PATCH n/p]" from the commit headline.

Cheers!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl4fMFYACgkQm9z0l6S7
zH+mQAf+LARBOD617cWFYAgPEbZvNV/vzoLaMMILXccFZ3pZfF7cHhSgEIG5Zzn9
LdTpAJMKMr6j+YZ0Vv8zoENPtUSO5WrciE3Altff8VL3fX6vgWaVRADnI2DxN1Ua
zUHcaEKo3WDR9enuTd7HJSXEam2vgTtbf8HIh6S1OZkbJ703zrzZfAPVmOX2HXtd
WIa8AEWja+MY3ZSl0yg1T7E6W19dubuaTT5sgnndJhqo3FUVOFp9kaaEN4a6sULj
je4gQWOv0uqwProuF9AaHBTAXTceqe/rBhOJO57X2StmAI1fYSUoJ4BM1wIkoMk0
6+3/o1Ppt74ApAdDaKH4mDEqzJr+ZA==
=Zud5
-----END PGP SIGNATURE-----

M
M
Mike Rosset wrote on 15 Jan 2020 18:26
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 38148@debbugs.gnu.org)
87wo9siqc4.fsf@gmail.com
Pierre Neidhardt writes:

Toggle quote (13 lines)
> Thank you, I've merged!
> qtwebengine is finally in, hooray!
>
> Thank you to you all, and big thanks to Mike for driving this effort!
>
> I committed a few changes to your commits:
>
> - I squashed the comment fixing commits.
> - Edited some more typos.
> - Removed "bug#38148: [PATCH n/p]" from the commit headline.
>
> Cheers!

Thanks for the fix ups and merge Pierre, It's appreciated.

Mike
R
R
Ricardo Wurmus wrote on 15 Jan 2020 21:55
Re: bug#38148: Guix packages old/broken version of qutebrowser
(address . me@the-compiler.org)(address . 38148-done@debbugs.gnu.org)
87tv4wxwvn.fsf@elephly.net
Hi Florian,

Toggle quote (6 lines)
> I'm the upstream author of qutebrowser - it looks like Guix currently packages
> qutebrowser 0.11.0: https://guix.gnu.org/packages/qutebrowser-0.11.0/
>
> That version is very outdated (July 2017, there have been 28 new releases since
> then).

The qutebrowser package has been updated to 1.8.3 on Dec 24 with commit
d7c58c3e5449d9fb96a15928cc65f12f111d0569.

--
Ricardo
Closed
F
F
Florian Bruhin wrote on 16 Jan 2020 13:04
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 38148-done@debbugs.gnu.org)
20200116120456.kvltqiyqptaly3k5@hooch.localdomain
Hey Ricardo, hey everyone!

On Wed, Jan 15, 2020 at 09:55:40PM +0100, Ricardo Wurmus wrote:
Toggle quote (9 lines)
> > I'm the upstream author of qutebrowser - it looks like Guix currently packages
> > qutebrowser 0.11.0: https://guix.gnu.org/packages/qutebrowser-0.11.0/
> >
> > That version is very outdated (July 2017, there have been 28 new releases since
> > then).
>
> The qutebrowser package has been updated to 1.8.3 on Dec 24 with commit
> d7c58c3e5449d9fb96a15928cc65f12f111d0569.

Thanks a lot to everyone involved for the update! :)

Sorry for not replying earlier to your questions/ideas about customizing crash
reporting. There's no way to customize the crash reporting at the moment. In
general, I'm fine with dealing with reports upstream - it's quite rare for
issues to be distribution specific, and often there are issues I'm aware of,
but where a crash report gives me the missing bit to fix it.

I guess this was a bit of a special case, but I'm glad to see it's been fixed!

Florian

--
me@the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org
https://bruhin.software/| https://github.com/sponsors/The-Compiler/
GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
I love long mails! | https://email.is-not-s.ms/
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE4E5WAAJAG47w528KkW6wyP1VoHIFAl4gUWUACgkQkW6wyP1V
oHKEgA/9EX6eISDPc7WZibipjPPbMPeUGk3EZLzxIjxDMXjLtdfIaxqMI4tqm8CO
fJBd0xrnAz2VJ/thy0ZMwUyTQgx7WGwVO33VZqc3Dbi7cwJTxJAPesY+IMcq9boX
3hvP7/MuS62Bgu8Isx/n0CVrosP7yYeaLV2uG8Q+S/tuH7Wnl7qV2X5XdMGHMl2e
eVKcy2j6A3SjI2taNSIn9uf20qe2vCxywUvtdy9xs1mvhx3SMxsI2UwC6AJMVfAr
7c54F8GsbsrZjVBs/xqUug5oi/dSVcISHPHCyEjWXdPKWWlar1WJHt17qn/bpYVf
DSW1zrxRSosJHLw+BQuT96HWVUOjYIZM0iYmUY0z2HY7XofflTA2/o8A8ISVueIl
zitumeSrzStZYG65Cl2WHyhzm8o4mVGCrMIqOmLB4pYTZvSpaAHZZ9VLHgpMU+ax
IRya3g+fjeDVU5fs9zt3aKQGTnDCOdQ9ZOtreENHfwCpOygKfdv+COuYPi2ozfmz
uWSUUrcm6SIOpCpCtvAW6ffqDRaC2RMVL+BBmfDZdGWPko5l2tNxf5SiNAvnoq3C
ZxoykD0Ex6vihJcJvWIzP6CUiL8F1gCqXr3mFIuav7oU+/DeaLm+7LF+8RGbcKuk
Dqze2voEwKtIXIK0IPyvUX+zjm964qqet9bd3ErB+Bbi8YF5+aU=
=uN2l
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 38148@debbugs.gnu.org