[PATCH] gnu: tint2: Update to 17.0.2.

DoneSubmitted by Wamm K. D.
Details
5 participants
  • 宋文武
  • Wamm K. D
  • Ludovic Courtès
  • Maxime Devos
  • Tobias Geerinckx-Rice
Owner
unassigned
Severity
normal
W
W
Wamm K. D wrote on 9 Mar 20:34 +0100
(address . guix-patches@gnu.org)(name . Wamm K. D)(address . jaft.r@outlook.com)
DM5PR04MB377206E5B815F5882E53C0E9990A9@DM5PR04MB3772.namprd04.prod.outlook.com
---
Noticed that the version currently is ~4 years old from the latest…
gnu/packages/xdisorg.scm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 6dc40f0910..f5d981413c 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -54,6 +54,7 @@
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1791,15 +1792,15 @@ (define-public rofi-calc
 (define-public tint2
   (package
     (name "tint2")
-    (version "0.14.6")
+    (version "17.0.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://gitlab.com/o9000/" name
-                                  "/repository/archive.tar.gz?ref=" version))
+              (uri (string-append "https://gitlab.com/o9000/" name "/-/archive/"
+                                  version "/" name "-" version ".tar.gz"))
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1kwzwxy4myagybm3rc7dgynfgp75742n348qibn1p2an9ggyivda"))))
+                "0k72kjr4rmprbrhs5ik1g7vwdi2lbzvkf5zw28gz6ckd2xz18zzq"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f                      ;no test target
@@ -1811,7 +1812,7 @@ (define-public tint2
                (("/etc") "${CMAKE_INSTALL_PREFIX}/etc"))
              #t)))))
     (inputs
-     (list gtk+-2
+     (list gtk+
            imlib2
            librsvg
            libxcomposite
-- 
2.34.0
M
M
Maxime Devos wrote on 9 Mar 21:28 +0100
219033314aee9604dc4ce0d140e114e1497bc83d.camel@telenet.be
Wamm K. D schreef op wo 09-03-2022 om 13:34 [-0600]:
Toggle quote (3 lines)
>       '(#:tests? #f                      ;no test target


There seem to be some tests in the 'test' directory.

Toggle quote (2 lines)
> #t)))))

Trailing #t aren't necessary anymore.

Greetings,
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYikN8RccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7j+7AQDf+2jwajM1j5gnOXauPCNlMo2i
LJa/PEgXI+e20ite+AD8DfF5ohWSHM6FLjNfm/kLb63X7gQKeijpyum9Xk7JewY=
=3+/F
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 9 Mar 21:30 +0100
c951a42207af6fdc2043783a5a77bed9e85407a5.camel@telenet.be
Wamm K. D schreef op wo 09-03-2022 om 13:34 [-0600]:
Toggle quote (3 lines)
> +              (uri (string-append "https://gitlab.com/o9000/"name "/-/archive/"
> +                                  version "/" name "-" version ".tar.gz"))

Is this uri stable?

Also, there seems to be a 'v' missing before version. Does
"guix download
succeed?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYikOVBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7t2TAPkB7auJB167MuthjOFroGB6lrj1
fDVnl9AQqC4GfjlV0wD/YHz6L9Xkz9BnAB+Jty0puviYzbzZ7x04OXKYWiXVbA8=
=j4Ol
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 9 Mar 21:31 +0100
477090b4f0de9e41bfaa18a621fbd9575d50e954.camel@telenet.be
Wamm K. D schreef op wo 09-03-2022 om 13:34 [-0600]:
Toggle quote (3 lines)
> @@ -1811,7 +1812,7 @@ (define-public tint2
>                 (("/etc") "${CMAKE_INSTALL_PREFIX}/etc"))

Is this still necessary?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYikOhhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pYsAP9DijfzKrWu68WfVJfnNx6T41Xo
xnJn3x99t4YjBt2VOAD/UzlEAglAhDLN/IWMIp5CzEPjAE0HLbMS5SdE59mBWwQ=
=5HFV
-----END PGP SIGNATURE-----


J
DM5PR04MB3772B411BBFE6999387EEAD0990A9@DM5PR04MB3772.namprd04.prod.outlook.com
Toggle quote (14 lines)
> On Wednesday, March 9, 2022, 02:30:14 PM CST, Maxime Devos <maximedevos@telenet.be> wrote:
>
>
>
>
>
> Wamm K. D schreef op wo 09-03-2022 om 13:34 [-0600]:
>
> > +              (uri (string-append "https://gitlab.com/o9000/" name "/-/archive/"
> > +                                  version "/" name "-" version ".tar.gz"))
>
>
> Is this uri stable?

I think it's a standard GitLab URL? It's what was given when choosing to download the .tar.gz file from GitLab; I went with it to avoid a lot of changes to the original package definition but, given it's just Git, we could just use a git-download instead. Let me know if that's preferred.

Toggle quote (5 lines)
> Also, there seems to be a 'v' missing before version.  Does
> "guix download
> https://gitlab.com/o9000/tint2/-/archive/17.0.2/tint2-17.0.2.tar.gz"
> succeed?

It does (I'm running version 17.0.2 on my machine, right now); the tint2 project tags versions with both no "v" and with a "v" so either would work. Both "https://gitlab.com/o9000/tint2/-/archive/17.0.2/tint2-17.0.2.tar.gz"and "https://gitlab.com/o9000/tint2/-/archive/v17.0.2/tint2-v17.0.2.tar.gz" should be valid (https://gitlab.com/o9000/tint2/-/tags).
T
T
Tobias Geerinckx-Rice wrote on 9 Mar 22:57 +0100
45349612-98FB-4846-96C1-38A229245BED@tobias.gr
What Maxime means is that some forges (like GitHub) generate these archives on the fly, instead of the author uploading a 'stable' file. You can usually tell them apart by the URL, but I forget GitLab's conventions.

These archives might be cached for a while but if they are regenerated the hash could change even if the unpacked data didn't. This has happened in the past and breaks e.g. guix time-machine even if 'fixed' on master.

Hence we prefer git-fetch when available, or tarballs that look human-generated.

Kind regards,

T G-R

Sent on the go. Excuse or enjoy my brevity.
J
DM5PR04MB3772C5E0A06B2150B148C144990A9@DM5PR04MB3772.namprd04.prod.outlook.com
Toggle quote (16 lines)
> On Wednesday, March 9, 2022, 03:57:51 PM CST, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
>
>
>
>
>
> What Maxime means is that some forges (like GitHub) generate these archives on the fly, instead of the author uploading a 'stable' file.  You can usually tell them apart by the URL, but I forget GitLab's conventions.
>
> These archives might be cached for a while but if they are regenerated the hash could change even if the unpacked data didn't.  This has happened in the past and breaks e.g. guix time-machine even if 'fixed' on master.
>
> Hence we prefer git-fetch when available, or tarballs that look human-generated.
>
> Kind regards,
>
> T G-R

Ahhh; I see. Thanks a ton for the explanation, Tobias. I'll get this switched over to git-fetch, Maxime, while I look over your other feedback.
L
L
Ludovic Courtès wrote on 18 Mar 23:12 +0100
control message for bug #54311
(address . control@debbugs.gnu.org)
877d8qq599.fsf@gnu.org
tags 54311 + moreinfo
quit
W
W
Wamm K. D wrote on 3 Apr 05:01 +0200
[PATCH v2] gnu: tint2: Update to 17.0.2.
(address . 54311@debbugs.gnu.org)
DM5PR04MB37727B6BF7C68A4B17C8BF5099E29@DM5PR04MB3772.namprd04.prod.outlook.com
---
Here we go, Maxime; I've switched the ~fetch~ method to =git=.

I think you're absolutely right about the =fix-installation-prefix= phase not
being necessary as "etc" isn't even in the =CMakeLists.txt= file, anymore; I had
no issues building with the phase removed, as well.

Removing not–running-tests, however, did result in a "make: *** No rule to make
target 'test'. Stop." error, however, so I'm guessing that, while the files in
that directory are used for testing, they are not incorporated as part of the
build process and there still is no target so I've left that in.

Hopefully this addresses everything and thanks a ton for looking over this!

gnu/packages/xdisorg.scm | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)

Toggle diff (50 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index d2caee85ec..a7738aac47 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -54,6 +54,7 @@
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1790,27 +1791,20 @@ (define-public rofi-calc
 (define-public tint2
   (package
     (name "tint2")
-    (version "0.14.6")
+    (version "17.0.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://gitlab.com/o9000/" name
-                                  "/repository/archive.tar.gz?ref=" version))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://gitlab.com/o9000/" name "/"))
+                    (commit version)))
               (sha256
                (base32
-                "1kwzwxy4myagybm3rc7dgynfgp75742n348qibn1p2an9ggyivda"))))
+                "123apmgs6x2zfv1q57dyl4mwqf0vsw5ndh5jsg6p3fvhr66l1aja"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:tests? #f                      ;no test target
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-installation-prefix
-           (lambda _
-             (substitute* "CMakeLists.txt"
-               (("/etc") "${CMAKE_INSTALL_PREFIX}/etc"))
-             #t)))))
+     '(#:tests? #f))                      ;no test target
     (inputs
-     (list gtk+-2
+     (list gtk+
            imlib2
            librsvg
            libxcomposite
-- 
2.34.0
J
(name . 54311@debbugs.gnu.org)(address . 54311@debbugs.gnu.org)(name . maximedevos@telenet.be)(address . maximedevos@telenet.be)
BY5PR07MB7029CEF208C115DE4F3353E899C99@BY5PR07MB7029.namprd07.prod.outlook.com
Let me know if there's any other changes needed but just a reminder that this should be ready, I think.
M
M
Maxime Devos wrote on 11 May 11:51 +0200
ebbd6f9954ea39103d07c810a55fe30c3aac1149.camel@telenet.be
Wamm K. D schreef op za 02-04-2022 om 22:01 [-0500]:
Toggle quote (12 lines)
> ---
> Here we go, Maxime; I've switched the ~fetch~ method to =git=.
>
> I think you're absolutely right about the =fix-installation-prefix= phase not
> being necessary as "etc" isn't even in the =CMakeLists.txt= file, anymore; I had
> no issues building with the phase removed, as well.
>
> Removing not–running-tests, however, did result in a "make: *** No rule to make
> target 'test'.  Stop." error, however, so I'm guessing that, while the files in
> that directory are used for testing, they are not incorporated as part of the
> build process and there still is no target so I've left that in.

There's 'regression.py' which has a 'main' and 'run_unit_tests'. Maybe
'regression.py' can be run in the 'check' phase?

Toggle quote (3 lines)
>
> Hopefully this addresses everything and thanks a ton for looking over this!

Looks ok (except for 'regression.py' not being run), but for
completeneess you might want to run it in a a pure environment (./pre-
inst-env guix shell --pure tint2) and look for problems like missing
icons or configuration not working or ‘warning: configuration scheme
things / file chooser’ things.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnuHDRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sJOAQDRbuR7z90VqvBOoVxNWtjfSVzh
a7AWx0es37oaruHwgQD/YVUh3hBjvIBbOJY8XXT6ROalvGVydCi3ViynBltKqAg=
=zlK4
-----END PGP SIGNATURE-----


J
BN8PR07MB7027303C2A544407B3CCD61899D09@BN8PR07MB7027.namprd07.prod.outlook.com
Toggle quote (9 lines)
> On Wednesday, May 11, 2022, 04:51:19 AM CDT, Maxime Devos <maximedevos@telenet.be> wrote:
>
>
>
>
>
> There's 'regression.py' which has a 'main' and 'run_unit_tests'.  Maybe
> 'regression.py' can be run in the 'check' phase?

Fair; would you know how to manually call it in that phase? I'm afraid I don't have any experience outside of the check phase automatically calling the designated tests files.
M
M
Maxime Devos wrote on 19 May 15:13 +0200
fae7e5184ca048370d06a420a6bb6fcfa2179b4e.camel@telenet.be
Jaft schreef op do 19-05-2022 om 04:54 [+0000]:
Toggle quote (10 lines)
> >
> >
> > There's 'regression.py' which has a 'main' and 'run_unit_tests'. 
> > Maybe
> > 'regression.py' can be run in the 'check' phase?
>
> Fair; would you know how to manually call it in that phase? I'm
> afraid I don't have any experience outside of the check phase
> automatically calling the designated tests files.

(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "regression.py"))) ; or maybe (invoke "python3" "regression.py")
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYoZClRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tGEAQCsznix//QleqV6T44HQ5x9yaD7
DcXsn9tBaMOLt0tpFQD+OHkOIwpcGXAO9Fs37gEf6a6sc6tS+764yFBIyv+tvwQ=
=7Wbq
-----END PGP SIGNATURE-----


J
BY5PR07MB70297500D0AA0810D5A53EFF99D09@BY5PR07MB7029.namprd07.prod.outlook.com
Toggle quote (10 lines)
> On Thursday, May 19, 2022, 08:14:11 AM CDT, Maxime Devos <maximedevos@telenet.be> wrote:
>
>
>
>
>
> (lambda* (#:key tests? #:allow-other-keys)
>   (when tests?
>     (invoke "regression.py"))) ; or maybe (invoke "python3" "regression.py")

Awesome; thanks a ton, Maxime. I'll try this out.
J
BY5PR07MB7029BDEF79CA4E213D54F9A099D59@BY5PR07MB7029.namprd07.prod.outlook.com
Alright; finally got a chance to try this.

Running the file ends up failing due to line 384; it tries to call a =top= command (~top -bn5 | grep 'Cpu(s)' | grep -o '[0-9\.]* id' | cut -d ' ' -f 1~) but it's not working since "Cpu(s)" isn't anywhere in the ~top -bn5~ output. The =regression.py= file was written for Python 2 so maybe the command was written for an older version of =top=? But I dunno.
宋文武 wrote 4 days ago
Re: bug#54311: [PATCH] gnu: tint2: Update to 17.0.2.
(name . Jaft)(address . jaft.r@outlook.com)
87bkt021mi.fsf_-_@envs.net
Jaft <jaft.r@outlook.com> writes:

Toggle quote (9 lines)
> Alright; finally got a chance to try this.
>
> Running the file ends up failing due to line 384; it tries to call a
> =top= command (~top -bn5 | grep 'Cpu(s)' | grep -o '[0-9\.]* id' | cut
> -d ' ' -f 1~) but it's not working since "Cpu(s)" isn't anywhere in
> the ~top -bn5~ output. The =regression.py= file was written for Python
> 2 so maybe the command was written for an older version of =top=? But
> I dunno.

Thanks for investigating, pushed now!
Closed
?