all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6.
@ 2023-02-19 10:16 Nicolas Goaziou
  2023-02-24 12:16 ` [bug#61620] [PATCH v2] " Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2023-02-19 10:16 UTC (permalink / raw)
  To: 61620

* gnu/packages/linux.scm (tlpui): Update to 1.5.0-6.
[arguments]<#:phases>: Rename USE-TLP-INPUT into SET-ABSOLUTE-LOCATIONS to
be more accurate.  Also add a new phase to skip failing tests.
[inputs]: Add LSBUTILS and PCIUTILS.
---
 gnu/packages/linux.scm | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 33faf8920d..e6980388d7 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -11,7 +11,7 @@
 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2016, 2018-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2016, 2018-2023 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2016, 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -7517,7 +7517,7 @@ (define (sbin-directory input-name)
 (define-public tlpui
   (package
     (name "tlpui")
-    (version "1.5.0-1")
+    (version "1.5.0-6")
     (source
      (origin
        (method git-fetch)
@@ -7526,7 +7526,7 @@ (define-public tlpui
              (commit (string-append "tlpui-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "16a6x733szsggn23ns7bj3gpvb80675plh96v4llrz0s8p3h47pg"))))
+        (base32 "0zxiciafq1xmb047jlyhipkkj4vaiw4jzbx71f6xgx559dy96paq"))))
     (build-system python-build-system)
     (arguments
      (list
@@ -7537,16 +7537,21 @@ (define-public tlpui
             (lambda _
               (substitute* "setup.py"
                 (("/usr/") ""))))
-          (add-after 'unpack 'use-tlp-input
-            ;; Hard-code tlp-stat filename to avoid propagating "tlp".
+          (add-after 'unpack 'set-absolute-locations
             (lambda* (#:key inputs #:allow-other-keys)
               (let ((tlp-stat (search-input-file inputs "/bin/tlp-stat")))
                 (with-directory-excursion "tlpui"
                   (substitute* '("file.py" "settingshelper.py" "statui.py")
-                    (("which\\(\"tlp-stat\"\\)")
-                     (string-append "'" tlp-stat "'"))
                     (("\"tlp-stat\"")
-                     (string-append "'" tlp-stat "'")))))))
+                     (string-append "'" tlp-stat "'"))
+                    (("/usr/share/tlp/defaults.conf")
+                     (search-input-file inputs "/share/tlp/defaults.conf")))
+                  ;; Settings check if various tlp executables, lspci and
+                  ;; usbutils are available.  Skip this phase since we know
+                  ;; for sure they are (and it avoids patching each location).
+                  (substitute* "settingshelper.py"
+                    (("(command_exists = ).*" _ lead)
+                     (string-append lead "True\n")))))))
           (add-before 'check 'fix-home-directory
             (lambda _
               ;; Tests fail with "Permission denied:
@@ -7557,6 +7562,13 @@ (define-public tlpui
           ;; Connection refused" and "Error: cannot read user
           ;; configuration from /etc/tlp.conf or /etc/default/tlp".
           (delete 'sanity-check)
+          ;; Skip two failing tests (out of 10) about configuration file
+          ;; issues.
+          (add-before 'check 'skip-failing-tests
+            (lambda _
+              (substitute* "test/test_tlp_settings.py"
+                ((".*?windowxsize = 900.*") "")
+                ((".*?windowysize = 600.*") ""))))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
@@ -7569,7 +7581,7 @@ (define-public tlpui
     (native-inputs
      (list `(,glib "bin") gobject-introspection python-discover))
     (inputs
-     (list gtk+ python-pygobject tlp))
+     (list gtk+ pciutils python-pygobject tlp usbutils))
     (home-page "https://github.com/d4nj1/TLPUI")
     (synopsis "User interface for TLP written in Python")
     (description

base-commit: 2fb42567ebd37cb63c431100021e1a895a2ff4b6
-- 
2.39.1





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

* [bug#61620] [PATCH v2] gnu: tlpui: Update to 1.5.0-6.
  2023-02-19 10:16 [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6 Nicolas Goaziou
@ 2023-02-24 12:16 ` Nicolas Goaziou
  2023-03-04 17:42   ` [bug#61620] [PATCH] " Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2023-02-24 12:16 UTC (permalink / raw)
  To: 61620

* gnu/packages/linux.scm (tlpui): Update to 1.5.0-6.
[arguments]<#:phases>: Rename USE-TLP-INPUT into SET-ABSOLUTE-LOCATIONS to
be more accurate.  Also add a new phase to skip failing tests.
[inputs]: Add LSBUTILS and PCIUTILS.
---
 gnu/packages/linux.scm | 42 ++++++++++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 691e0d2edc..65c5171463 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -11,7 +11,7 @@
 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2016, 2018-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2016, 2018-2023 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2016, 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -7517,7 +7517,7 @@ (define (sbin-directory input-name)
 (define-public tlpui
   (package
     (name "tlpui")
-    (version "1.5.0-1")
+    (version "1.5.0-6")
     (source
      (origin
        (method git-fetch)
@@ -7526,7 +7526,7 @@ (define-public tlpui
              (commit (string-append "tlpui-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "16a6x733szsggn23ns7bj3gpvb80675plh96v4llrz0s8p3h47pg"))))
+        (base32 "0zxiciafq1xmb047jlyhipkkj4vaiw4jzbx71f6xgx559dy96paq"))))
     (build-system python-build-system)
     (arguments
      (list
@@ -7537,16 +7537,31 @@ (define-public tlpui
             (lambda _
               (substitute* "setup.py"
                 (("/usr/") ""))))
-          (add-after 'unpack 'use-tlp-input
-            ;; Hard-code tlp-stat filename to avoid propagating "tlp".
+          (add-after 'unpack 'set-absolute-locations
             (lambda* (#:key inputs #:allow-other-keys)
-              (let ((tlp-stat (search-input-file inputs "/bin/tlp-stat")))
+              (let ((defaults.conf
+                      (search-input-file inputs "/share/tlp/defaults.conf"))
+                    (lspci (search-input-file inputs "/sbin/lspci"))
+                    (lsusb (search-input-file inputs "/bin/lsusb"))
+                    (tlp-stat (search-input-file inputs "/bin/tlp-stat")))
                 (with-directory-excursion "tlpui"
                   (substitute* '("file.py" "settingshelper.py" "statui.py")
-                    (("which\\(\"tlp-stat\"\\)")
-                     (string-append "'" tlp-stat "'"))
                     (("\"tlp-stat\"")
-                     (string-append "'" tlp-stat "'")))))))
+                     (string-append "'" tlp-stat "'"))
+                    (("/usr/share/tlp/defaults.conf")
+                     (string-append "'" defaults.conf "'")))
+                  (substitute* "ui_config_objects/gtkusblist.py"
+                    (("\"lsusb\"")
+                     (string-append "'" lsusb "'")))
+                  (substitute* "ui_config_objects/gtkpcilist.py"
+                    (("\"lspci\"")
+                     (string-append "'" lspci "'")))
+                  ;; Settings check if various tlp executables, lspci and
+                  ;; usbutils are available.  Skip this phase since we know
+                  ;; for sure they are (and it avoids patching each location).
+                  (substitute* "settingshelper.py"
+                    (("(command_exists = ).*" _ lead)
+                     (string-append lead "True\n")))))))
           (add-before 'check 'fix-home-directory
             (lambda _
               ;; Tests fail with "Permission denied:
@@ -7557,6 +7572,13 @@ (define-public tlpui
           ;; Connection refused" and "Error: cannot read user
           ;; configuration from /etc/tlp.conf or /etc/default/tlp".
           (delete 'sanity-check)
+          ;; Skip two failing tests (out of 10) about configuration file
+          ;; issues.
+          (add-before 'check 'skip-failing-tests
+            (lambda _
+              (substitute* "test/test_tlp_settings.py"
+                ((".*?windowxsize = 900.*") "")
+                ((".*?windowysize = 600.*") ""))))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               (when tests?
@@ -7569,7 +7591,7 @@ (define-public tlpui
     (native-inputs
      (list `(,glib "bin") gobject-introspection python-discover))
     (inputs
-     (list gtk+ python-pygobject tlp))
+     (list gtk+ pciutils python-pygobject tlp usbutils))
     (home-page "https://github.com/d4nj1/TLPUI")
     (synopsis "User interface for TLP written in Python")
     (description

base-commit: e36ac715518387686bd8165e1724ce54984ee0ee
-- 
2.39.1





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

* [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6.
  2023-02-24 12:16 ` [bug#61620] [PATCH v2] " Nicolas Goaziou
@ 2023-03-04 17:42   ` Ludovic Courtès
  2023-03-04 18:33     ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2023-03-04 17:42 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 61620

Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:

> * gnu/packages/linux.scm (tlpui): Update to 1.5.0-6.
> [arguments]<#:phases>: Rename USE-TLP-INPUT into SET-ABSOLUTE-LOCATIONS to
> be more accurate.  Also add a new phase to skip failing tests.
> [inputs]: Add LSBUTILS and PCIUTILS.

This triggers 3 build failures according to
<https://qa.guix.gnu.org/issue/61620>.  Could you take a look?

Thanks,
Ludo’.




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

* [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6.
  2023-03-04 17:42   ` [bug#61620] [PATCH] " Ludovic Courtès
@ 2023-03-04 18:33     ` Nicolas Goaziou
  2023-03-08 10:07       ` Simon Tournier
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2023-03-04 18:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 61620

Hello,

Ludovic Courtès <ludo@gnu.org> writes:

> This triggers 3 build failures according to
> <https://qa.guix.gnu.org/issue/61620>.  Could you take a look?

I don't understand where those failures are coming from. The tlpui
package has no dependents packages. Besides, following the "3" link
leads to a page that I cannot parse either.

Could someone explain where to look at?

Regards,
-- 
Nicolas Goaziou




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

* [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6.
  2023-03-04 18:33     ` Nicolas Goaziou
@ 2023-03-08 10:07       ` Simon Tournier
  2023-03-08 15:06         ` Christopher Baines
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Tournier @ 2023-03-08 10:07 UTC (permalink / raw)
  To: Nicolas Goaziou, Ludovic Courtès, Christopher Baines; +Cc: 61620

Hi Chris,

On Sat, 04 Mar 2023 at 19:33, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> This triggers 3 build failures according to
>> <https://qa.guix.gnu.org/issue/61620>.  Could you take a look?
>
> I don't understand where those failures are coming from. The tlpui
> package has no dependents packages. Besides, following the "3" link
> leads to a page that I cannot parse either.
>
> Could someone explain where to look at?

Clicking on the “3” from <https://qa.guix.gnu.org/issue/61620> leads to
<https://data.qa.guix.gnu.org/compare/package-derivations?base_commit=3809aa01a1287dbe5be90e7aa4407bf27a6467ed&target_commit=e2112b0d1e90a5a1f4f82bce8f8a29ab5fd86408&system=x86_64-linux&target=none&build_change=broken>
which displays nothing:

    Showing 0 new derivations across 0 packages

Moreover, clicking on
<https://data.qa.guix.gnu.org/compare/package-derivations?base_commit=3809aa01a1287dbe5be90e7aa4407bf27a6467ed&target_commit=e2112b0d1e90a5a1f4f82bce8f8a29ab5fd86408&system=x86_64-linux&target=none>
lists many that does not seem related to ’tlpui’.

This story looks like #61616.

<http://issues.guix.gnu.org/msgid/782ad1100907d6b1487103ab37faedf52abc9019.camel@gmail.com>

Since in both cases it seems an issue with Open MPI and it had been
fixed by 9ae4846c502b75867b83180bb65d422ff838e4e6, are these 3 failures
relevant?

Cheers,
simon




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

* [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6.
  2023-03-08 10:07       ` Simon Tournier
@ 2023-03-08 15:06         ` Christopher Baines
  2023-03-08 18:12           ` bug#61620: " Nicolas Goaziou
  2023-03-10 11:51           ` [bug#61620] " Simon Tournier
  0 siblings, 2 replies; 8+ messages in thread
From: Christopher Baines @ 2023-03-08 15:06 UTC (permalink / raw)
  To: Simon Tournier; +Cc: Ludovic Courtès, 61620

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


Simon Tournier <zimon.toutoune@gmail.com> writes:

> Clicking on the “3” from <https://qa.guix.gnu.org/issue/61620> leads to
> <https://data.qa.guix.gnu.org/compare/package-derivations?base_commit=3809aa01a1287dbe5be90e7aa4407bf27a6467ed&target_commit=e2112b0d1e90a5a1f4f82bce8f8a29ab5fd86408&system=x86_64-linux&target=none&build_change=broken>
> which displays nothing:
>
>     Showing 0 new derivations across 0 packages
>
> Moreover, clicking on
> <https://data.qa.guix.gnu.org/compare/package-derivations?base_commit=3809aa01a1287dbe5be90e7aa4407bf27a6467ed&target_commit=e2112b0d1e90a5a1f4f82bce8f8a29ab5fd86408&system=x86_64-linux&target=none>
> lists many that does not seem related to ’tlpui’.
>
> This story looks like #61616.
>
> <http://issues.guix.gnu.org/msgid/782ad1100907d6b1487103ab37faedf52abc9019.camel@gmail.com>
>
> Since in both cases it seems an issue with Open MPI and it had been
> fixed by 9ae4846c502b75867b83180bb65d422ff838e4e6, are these 3 failures
> relevant?

They are indeed not relevant to the changes here. They are detected as
changing because the derivations do change, but that's because they
change every time you try and compute them, rather than changing as a
result from the patches here.

I think a way to avoid this would be to have the error happen earlier,
so rather than waiting until you try and build the derivation, try to
detect that the builder script can't be read when it's being created. I
can't see an easy way to do that, but I've filed an issue about it:
https://issues.guix.gnu.org/62051

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

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

* bug#61620: [PATCH] gnu: tlpui: Update to 1.5.0-6.
  2023-03-08 15:06         ` Christopher Baines
@ 2023-03-08 18:12           ` Nicolas Goaziou
  2023-03-10 11:51           ` [bug#61620] " Simon Tournier
  1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2023-03-08 18:12 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 61620-done

Hello,

Christopher Baines <mail@cbaines.net> writes:

> They are indeed not relevant to the changes here. They are detected as
> changing because the derivations do change, but that's because they
> change every time you try and compute them, rather than changing as a
> result from the patches here.
>
> I think a way to avoid this would be to have the error happen earlier,
> so rather than waiting until you try and build the derivation, try to
> detect that the builder script can't be read when it's being created. I
> can't see an easy way to do that, but I've filed an issue about it:
> https://issues.guix.gnu.org/62051

Meanwhile, this looks like a green flag for the current package, so
I applied the patch.

Thanks for the feedback.

Regards,
-- 
Nicolas Goaziou




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

* [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6.
  2023-03-08 15:06         ` Christopher Baines
  2023-03-08 18:12           ` bug#61620: " Nicolas Goaziou
@ 2023-03-10 11:51           ` Simon Tournier
  1 sibling, 0 replies; 8+ messages in thread
From: Simon Tournier @ 2023-03-10 11:51 UTC (permalink / raw)
  To: Christopher Baines; +Cc: Ludovic Courtès, 61620

Hi Chris,,

On mer., 08 mars 2023 at 15:06, Christopher Baines <mail@cbaines.net> wrote:

> I think a way to avoid this would be to have the error happen earlier,
> so rather than waiting until you try and build the derivation, try to
> detect that the builder script can't be read when it's being created. I
> can't see an easy way to do that, but I've filed an issue about it:
> https://issues.guix.gnu.org/62051

Thanks for explaining.  Hum, indeed #62051 does not seem easy. :-)

Cheers,
simon




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

end of thread, other threads:[~2023-03-10 12:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-19 10:16 [bug#61620] [PATCH] gnu: tlpui: Update to 1.5.0-6 Nicolas Goaziou
2023-02-24 12:16 ` [bug#61620] [PATCH v2] " Nicolas Goaziou
2023-03-04 17:42   ` [bug#61620] [PATCH] " Ludovic Courtès
2023-03-04 18:33     ` Nicolas Goaziou
2023-03-08 10:07       ` Simon Tournier
2023-03-08 15:06         ` Christopher Baines
2023-03-08 18:12           ` bug#61620: " Nicolas Goaziou
2023-03-10 11:51           ` [bug#61620] " Simon Tournier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.