unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38148: Guix packages old/broken version of qutebrowser
@ 2019-11-09 10:05 Florian Bruhin
  2019-11-09 16:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Florian Bruhin @ 2019-11-09 10:05 UTC (permalink / raw)
  To: 38148

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

Hi,

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.

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/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: Guix packages old/broken version of qutebrowser
  2019-11-09 10:05 bug#38148: Guix packages old/broken version of qutebrowser Florian Bruhin
@ 2019-11-09 16:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2019-11-10  2:32   ` Bengt Richter
  2020-01-13 10:33 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 25+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2019-11-09 16:49 UTC (permalink / raw)
  To: Florian Bruhin; +Cc: 38148

[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: Guix packages old/broken version of qutebrowser
  2019-11-09 16:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2019-11-10  2:32   ` Bengt Richter
  0 siblings, 0 replies; 25+ messages in thread
From: Bengt Richter @ 2019-11-10  2:32 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Florian Bruhin, 38148

On +2019-11-09 17:49:49 +0100, Tobias Geerinckx-Rice via Bug reports for GNU Guix wrote:
> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2019-11-09 10:05 bug#38148: Guix packages old/broken version of qutebrowser Florian Bruhin
  2019-11-09 16:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2020-01-13 10:33 ` Mike Rosset
  2020-01-13 10:33   ` bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
                     ` (3 more replies)
  2020-01-14 11:04 ` bug#38148: [PATCH 1/5] gnu: python-pyqt: Substitute the full path of <qprinter.h> Mike Rosset
  2020-01-15 20:55 ` bug#38148: Guix packages old/broken version of qutebrowser Ricardo Wurmus
  3 siblings, 4 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-13 10:33 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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
+         ;; 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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0.
  2020-01-13 10:33 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
@ 2020-01-13 10:33   ` Mike Rosset
  2020-01-13 14:20     ` Pierre Neidhardt
  2020-01-13 10:45   ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 25+ messages in thread
From: Mike Rosset @ 2020-01-13 10:33 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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
+       ("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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-13 10:33 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
  2020-01-13 10:33   ` bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
@ 2020-01-13 10:45   ` Mike Rosset
  2020-01-13 14:16   ` Pierre Neidhardt
  2020-01-14  0:13   ` bug#38148: [PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
  3 siblings, 0 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-13 10:45 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-13 10:33 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
  2020-01-13 10:33   ` bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
  2020-01-13 10:45   ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
@ 2020-01-13 14:16   ` Pierre Neidhardt
  2020-01-14  0:42     ` Mike Rosset
  2020-01-14  0:13   ` bug#38148: [PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
  3 siblings, 1 reply; 25+ messages in thread
From: Pierre Neidhardt @ 2020-01-13 14:16 UTC (permalink / raw)
  To: Mike Rosset; +Cc: 38148

Thanks for the patches, comments below:

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

> * 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.

> +         ;; included. Here we substitute the full path to the header in the

Double-space after period.

> +         ;; 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.

> +(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.

> +    (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?

> +                    (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"
> +                       "--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".

> +         ;; to make this a namespace of it's own

Missing period.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0.
  2020-01-13 10:33   ` bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
@ 2020-01-13 14:20     ` Pierre Neidhardt
  2020-01-13 18:54       ` Mike Rosset
  0 siblings, 1 reply; 25+ messages in thread
From: Pierre Neidhardt @ 2020-01-13 14:20 UTC (permalink / raw)
  To: Mike Rosset; +Cc: 38148

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

> * 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."

> +       ("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.

>         #: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
https://ambrevar.xyz/

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0.
  2020-01-13 14:20     ` Pierre Neidhardt
@ 2020-01-13 18:54       ` Mike Rosset
  2020-01-13 19:02         ` Pierre Neidhardt
  0 siblings, 1 reply; 25+ messages in thread
From: Mike Rosset @ 2020-01-13 18:54 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 38148


Pierre Neidhardt writes:

>
> 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

--8<---------------cut here---------------start------------->8---
tar -tf $(guix build -S qutebrowser) | grep 'doc/qutebrowser.1$'
--8<---------------cut here---------------end--------------->8---


Mike

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0.
  2020-01-13 18:54       ` Mike Rosset
@ 2020-01-13 19:02         ` Pierre Neidhardt
  0 siblings, 0 replies; 25+ messages in thread
From: Pierre Neidhardt @ 2020-01-13 19:02 UTC (permalink / raw)
  To: Mike Rosset; +Cc: 38148

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

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

> 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
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment
  2020-01-13 10:33 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
                     ` (2 preceding siblings ...)
  2020-01-13 14:16   ` Pierre Neidhardt
@ 2020-01-14  0:13   ` Mike Rosset
  2020-01-14  0:13     ` bug#38148: [PATCH 4/4] gnu: qutebrowser: Improve comment sections Mike Rosset
  3 siblings, 1 reply; 25+ messages in thread
From: Mike Rosset @ 2020-01-14  0:13 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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(-)

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 4/4] gnu: qutebrowser: Improve comment sections.
  2020-01-14  0:13   ` bug#38148: [PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
@ 2020-01-14  0:13     ` Mike Rosset
  0 siblings, 0 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-14  0:13 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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(-)

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-13 14:16   ` Pierre Neidhardt
@ 2020-01-14  0:42     ` Mike Rosset
  2020-01-14  9:42       ` Pierre Neidhardt
  0 siblings, 1 reply; 25+ messages in thread
From: Mike Rosset @ 2020-01-14  0:42 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 38148


>> +         ;; 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?

> +    (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.
--8<---------------cut here---------------start------------->8---
(begin (use-modules (gnu packages python)) (version-major+minor python))
--8<---------------cut here---------------end--------------->8---

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-14  0:42     ` Mike Rosset
@ 2020-01-14  9:42       ` Pierre Neidhardt
  2020-01-14 10:25         ` Mike Rosset
  2020-01-14 11:09         ` Mike Rosset
  0 siblings, 2 replies; 25+ messages in thread
From: Pierre Neidhardt @ 2020-01-14  9:42 UTC (permalink / raw)
  To: Mike Rosset; +Cc: 38148

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

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.

>> 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
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-14  9:42       ` Pierre Neidhardt
@ 2020-01-14 10:25         ` Mike Rosset
  2020-01-14 11:09         ` Mike Rosset
  1 sibling, 0 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-14 10:25 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 38148


Pierre Neidhardt writes:

> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/5] gnu: python-pyqt: Substitute the full path of <qprinter.h>
  2019-11-09 10:05 bug#38148: Guix packages old/broken version of qutebrowser Florian Bruhin
  2019-11-09 16:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2020-01-13 10:33 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
@ 2020-01-14 11:04 ` Mike Rosset
  2020-01-14 11:06   ` bug#38148: [PATCH 2/5] gnu: Add python-pyqtwebengine Mike Rosset
  2020-01-15 20:55 ` bug#38148: Guix packages old/broken version of qutebrowser Ricardo Wurmus
  3 siblings, 1 reply; 25+ messages in thread
From: Mike Rosset @ 2020-01-14 11:04 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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(+)

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 2/5] gnu: Add python-pyqtwebengine.
  2020-01-14 11:04 ` bug#38148: [PATCH 1/5] gnu: python-pyqt: Substitute the full path of <qprinter.h> Mike Rosset
@ 2020-01-14 11:06   ` Mike Rosset
  2020-01-14 11:06     ` bug#38148: [PATCH 3/5] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
                       ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-14 11:06 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* gnu/packages/qt.scm (python-pyqtwebengine): New variable.
---
 gnu/packages/qt.scm | 86 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 3/5] gnu: qutebrowser: Update to 1.9.0.
  2020-01-14 11:06   ` bug#38148: [PATCH 2/5] gnu: Add python-pyqtwebengine Mike Rosset
@ 2020-01-14 11:06     ` Mike Rosset
  2020-01-14 11:06     ` bug#38148: [PATCH 4/5] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
  2020-01-14 11:06     ` bug#38148: [PATCH 5/5] gnu: qutebrowser: Improve comment sections Mike Rosset
  2 siblings, 0 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-14 11:06 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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
+       ("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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 4/5] gnu: python-pyqt: Improved qprinter.h substitutition comment
  2020-01-14 11:06   ` bug#38148: [PATCH 2/5] gnu: Add python-pyqtwebengine Mike Rosset
  2020-01-14 11:06     ` bug#38148: [PATCH 3/5] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
@ 2020-01-14 11:06     ` Mike Rosset
  2020-01-14 11:06     ` bug#38148: [PATCH 5/5] gnu: qutebrowser: Improve comment sections Mike Rosset
  2 siblings, 0 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-14 11:06 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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(-)

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 5/5] gnu: qutebrowser: Improve comment sections.
  2020-01-14 11:06   ` bug#38148: [PATCH 2/5] gnu: Add python-pyqtwebengine Mike Rosset
  2020-01-14 11:06     ` bug#38148: [PATCH 3/5] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
  2020-01-14 11:06     ` bug#38148: [PATCH 4/5] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
@ 2020-01-14 11:06     ` Mike Rosset
  2 siblings, 0 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-14 11:06 UTC (permalink / raw)
  To: 38148; +Cc: mike.rosset

* 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(-)

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

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-14  9:42       ` Pierre Neidhardt
  2020-01-14 10:25         ` Mike Rosset
@ 2020-01-14 11:09         ` Mike Rosset
  2020-01-15 15:31           ` Pierre Neidhardt
  1 sibling, 1 reply; 25+ messages in thread
From: Mike Rosset @ 2020-01-14 11:09 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 38148


Pierre Neidhardt writes:

> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-14 11:09         ` Mike Rosset
@ 2020-01-15 15:31           ` Pierre Neidhardt
  2020-01-15 17:26             ` Mike Rosset
  0 siblings, 1 reply; 25+ messages in thread
From: Pierre Neidhardt @ 2020-01-15 15:31 UTC (permalink / raw)
  To: Mike Rosset; +Cc: 38148

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

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
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
  2020-01-15 15:31           ` Pierre Neidhardt
@ 2020-01-15 17:26             ` Mike Rosset
  0 siblings, 0 replies; 25+ messages in thread
From: Mike Rosset @ 2020-01-15 17:26 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 38148


Pierre Neidhardt writes:

> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: Guix packages old/broken version of qutebrowser
  2019-11-09 10:05 bug#38148: Guix packages old/broken version of qutebrowser Florian Bruhin
                   ` (2 preceding siblings ...)
  2020-01-14 11:04 ` bug#38148: [PATCH 1/5] gnu: python-pyqt: Substitute the full path of <qprinter.h> Mike Rosset
@ 2020-01-15 20:55 ` Ricardo Wurmus
  2020-01-16 12:04   ` Florian Bruhin
  3 siblings, 1 reply; 25+ messages in thread
From: Ricardo Wurmus @ 2020-01-15 20:55 UTC (permalink / raw)
  To: me; +Cc: 38148-done


Hi Florian,

> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#38148: Guix packages old/broken version of qutebrowser
  2020-01-15 20:55 ` bug#38148: Guix packages old/broken version of qutebrowser Ricardo Wurmus
@ 2020-01-16 12:04   ` Florian Bruhin
  0 siblings, 0 replies; 25+ messages in thread
From: Florian Bruhin @ 2020-01-16 12:04 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 38148-done

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Hey Ricardo, hey everyone!

On Wed, Jan 15, 2020 at 09:55:40PM +0100, Ricardo Wurmus wrote:
> > 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/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-01-16 12:06 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-09 10:05 bug#38148: Guix packages old/broken version of qutebrowser Florian Bruhin
2019-11-09 16:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2019-11-10  2:32   ` Bengt Richter
2020-01-13 10:33 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
2020-01-13 10:33   ` bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
2020-01-13 14:20     ` Pierre Neidhardt
2020-01-13 18:54       ` Mike Rosset
2020-01-13 19:02         ` Pierre Neidhardt
2020-01-13 10:45   ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
2020-01-13 14:16   ` Pierre Neidhardt
2020-01-14  0:42     ` Mike Rosset
2020-01-14  9:42       ` Pierre Neidhardt
2020-01-14 10:25         ` Mike Rosset
2020-01-14 11:09         ` Mike Rosset
2020-01-15 15:31           ` Pierre Neidhardt
2020-01-15 17:26             ` Mike Rosset
2020-01-14  0:13   ` bug#38148: [PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
2020-01-14  0:13     ` bug#38148: [PATCH 4/4] gnu: qutebrowser: Improve comment sections Mike Rosset
2020-01-14 11:04 ` bug#38148: [PATCH 1/5] gnu: python-pyqt: Substitute the full path of <qprinter.h> Mike Rosset
2020-01-14 11:06   ` bug#38148: [PATCH 2/5] gnu: Add python-pyqtwebengine Mike Rosset
2020-01-14 11:06     ` bug#38148: [PATCH 3/5] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
2020-01-14 11:06     ` bug#38148: [PATCH 4/5] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
2020-01-14 11:06     ` bug#38148: [PATCH 5/5] gnu: qutebrowser: Improve comment sections Mike Rosset
2020-01-15 20:55 ` bug#38148: Guix packages old/broken version of qutebrowser Ricardo Wurmus
2020-01-16 12:04   ` Florian Bruhin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).