GNU bug report logs - #66396
[PATCH] guix: Add case to Github url updater.

Previous Next

Package: guix-patches;

Reported by: Giacomo Leidi <goodoldpaul <at> autistici.org>

Date: Sat, 7 Oct 2023 19:47:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

To reply to this bug, email your comments to 66396 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66396; Package guix-patches. (Sat, 07 Oct 2023 19:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Giacomo Leidi <goodoldpaul <at> autistici.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 07 Oct 2023 19:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Giacomo Leidi <goodoldpaul <at> autistici.org>
To: guix-patches <at> gnu.org
Cc: Giacomo Leidi <goodoldpaul <at> autistici.org>
Subject: [PATCH] guix: Add case to Github url updater.
Date: Sat,  7 Oct 2023 21:45:11 +0200
* guix/import/github.scm (updated-github-url)[updated-url]: Add
additional heuristics to Github url updater.
---
 guix/import/github.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/guix/import/github.scm b/guix/import/github.scm
index 7409c9a202..c5556d78ee 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2019 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
 
 (define-module (guix import github)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
@@ -96,6 +98,11 @@ (define (updated-github-url old-package new-version)
                             url)
             (string-append prefix "/releases/download/" repo "-" new-version "/"
                            repo "-" new-version ext))
+           ((string-match (string-append "/releases/download/(v)?" version "/"
+                                         name ".*" ext "$")
+                          url)
+            (string-replace-substring url version new-version))
+
            (#t #f))) ; Some URLs are not recognised.
         #f))
 

base-commit: 00a28bc435606dc98925fbae1ebe314881f35c90
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#66396; Package guix-patches. (Mon, 23 Oct 2023 21:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 66396 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Giacomo Leidi <goodoldpaul <at> autistici.org>
Cc: 66396 <at> debbugs.gnu.org
Subject: Re: [bug#66396] [PATCH] guix: Add case to Github url updater.
Date: Mon, 23 Oct 2023 23:55:33 +0200
Hi,

Giacomo Leidi <goodoldpaul <at> autistici.org> skribis:

> * guix/import/github.scm (updated-github-url)[updated-url]: Add
> additional heuristics to Github url updater.

[...]

> +           ((string-match (string-append "/releases/download/(v)?" version "/"
> +                                         name ".*" ext "$")
> +                          url)
> +            (string-replace-substring url version new-version))

Is it not already covered by one of the other cases?  Do you have an
example URL matched by this new clause?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#66396; Package guix-patches. (Mon, 23 Oct 2023 22:06:01 GMT) Full text and rfc822 format available.

Message #11 received at 66396 <at> debbugs.gnu.org (full text, mbox):

From: paul <goodoldpaul <at> autistici.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 66396 <at> debbugs.gnu.org
Subject: Re: [bug#66396] [PATCH] guix: Add case to Github url updater.
Date: Tue, 24 Oct 2023 00:05:04 +0200
[Message part 1 (text/plain, inline)]
Hi Ludo’ ,

On 10/23/23 23:55, Ludovic Courtès wrote:
>> +           ((string-match (string-append "/releases/download/(v)?" version "/"
>> +                                         name ".*" ext "$")
>> +                          url)
>> +            (string-replace-substring url version new-version))
> Is it not already covered by one of the other cases?  Do you have an
> example URL matched by this new clause?
Yes, this patch fixes some failings I got from urls such as:

|https://github.com/derailed/k9s/releases/download/v||0.27.4||/k9s_Linux_amd64.tar.gz|

|https://github.com/metal3d/katenary/releases/download/||2.0.0-beta2||/katenary-linux-amd64|

|https://github.com/kubernetes/kompose/releases/download/v||1.30.0||/kompose-linux-amd64|


Thank you for your time,


giacomo
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#66396; Package guix-patches. (Sun, 03 Dec 2023 22:04:01 GMT) Full text and rfc822 format available.

Message #14 received at 66396 <at> debbugs.gnu.org (full text, mbox):

From: paul <goodoldpaul <at> autistici.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 66396 <at> debbugs.gnu.org
Subject: Re: [bug#66396] [PATCH] guix: Add case to Github url updater.
Date: Sun, 3 Dec 2023 23:03:02 +0100
Hi,

On 10/24/23 00:05, paul wrote:
>
> Hi Ludo’ ,
>
> On 10/23/23 23:55, Ludovic Courtès wrote:
>>> +           ((string-match (string-append "/releases/download/(v)?" version "/"
>>> +                                         name ".*" ext "$")
>>> +                          url)
>>> +            (string-replace-substring url version new-version))
>> Is it not already covered by one of the other cases?  Do you have an
>> example URL matched by this new clause?

Besides k9s, kompose and katenary I believe also  pigx_rnaseq and 
pigx-chipseq  and probably others need this.


Thank you for your time,


giacomo






Information forwarded to guix-patches <at> gnu.org:
bug#66396; Package guix-patches. (Wed, 07 Feb 2024 00:52:01 GMT) Full text and rfc822 format available.

Message #17 received at 66396 <at> debbugs.gnu.org (full text, mbox):

From: paul <goodoldpaul <at> autistici.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 66396 <at> debbugs.gnu.org
Subject: Re: [bug#66396] [PATCH] guix: Add case to Github url updater.
Date: Wed, 7 Feb 2024 01:50:54 +0100
[Message part 1 (text/plain, inline)]
Hi Ludo’ ,

I made a detailed analysis on the current status of the updater. I'm 
attaching the source code I used.

There are ~239 packages (probably with some false positive due to 
deprecated packages I believe) that have a github.com origin-uri that 
currently are marked as having no updater:

guix time-machine -C channels-lock.scm -- repl -- t.scm | grep github.com | awk '{ print $1 }' | wc -l

239

This patch allows the following packages (and probably more in 
downstream channels) to be refreshed:

gnu/packages/admin.scm:4242:13: 4.9 is already the latest version of nnn
gnu/packages/admin.scm:4416:13: launchmon would be upgraded from 1.0.2 
to 1.2.0
gnu/packages/audio.scm:5814:13: lsp-dsp-lib would be upgraded from 
0.5.14 to 1.0.20
gnu/packages/bioinformatics.scm:9847:13: seqan would be upgraded from 
3.0.3 to 3.3.0
gnu/packages/bioinformatics.scm:9847:13: seqan would be upgraded from 
3.0.3 to 3.3.0
gnu/packages/bioinformatics.scm:9563:13: preseq would be upgraded from 
2.0.3 to 3.2.0
gnu/packages/bioinformatics.scm:18604:13: arriba would be upgraded from 
1.0.1 to 2.4.0
gnu/packages/build-tools.scm:436:13: premake would be upgraded from 
5.0.0-alpha15 to 5.0.0.alpha4
gnu/packages/compression.scm:2292:13: upx would be upgraded from 4.1.0 
to 4.2.2
gnu/packages/datastructures.scm:294:13: 2.1.1 is already the latest 
version of sdsl-lite
gnu/packages/dlang.scm:219:2: ldc would be upgraded from 1.35.0 to 1.36.0
gnu/packages/dns.scm:475:13: dnscrypt-wrapper would be upgraded from 
0.2.2 to 0.4.2
gnu/packages/engineering.scm:4303:13: rizin would be upgraded from 0.6.2 
to 0.6.3
gnu/packages/fontutils.scm:1585:13: libuninameslist would be upgraded 
from 20200313 to 20230916
gnu/packages/fontutils.scm:1563:13: libspiro would be upgraded from 
20200505 to 20221101
gnu/packages/game-development.scm:268:12: 5.2.2 is already the latest 
version of deutex
gnu/packages/game-development.scm:952:13: love would be upgraded from 
11.4 to 11.5
gnu/packages/game-development.scm:3057:13: 1.5.2 is already the latest 
version of dhewm3
gnu/packages/games.scm:2427:15: retux would be upgraded from 1.6.1 to 1.6.2
gnu/packages/games.scm:6336:13: 1.02e is already the latest version of 
mrrescue
gnu/packages/games.scm:5832:13: 2.4 is already the latest version of 
starfighter
gnu/packages/games.scm:9239:13: edgar would be upgraded from 1.36 to 1.37
gnu/packages/geo.scm:144:13: gmt would be upgraded from 6.4.0 to 6.5.0
gnu/packages/java.scm:11861:13: java-gson would be upgraded from 2.8.6 
to 2.10.1
gnu/packages/java.scm:8135:13: antlr3 would be upgraded from 3.5.2 to 3.5.3
gnu/packages/java.scm:8076:13: java-stringtemplate would be upgraded 
from 4.0.8 to 4.3.3
gnu/packages/java.scm:8135:13: antlr3 would be upgraded from 3.5.2 to 3.5.3
gnu/packages/maths.scm:221:13: bitwise would be upgraded from 0.43 to 0.50
gnu/packages/music.scm:6018:13: lsp-plugins would be upgraded from 1.2.3 
to 1.2.14
gnu/packages/networking.scm:2801:13: 21.1 is already the latest version 
of nzbget
gnu/packages/notcurses.scm:39:13: 3.0.9 is already the latest version of 
notcurses
gnu/packages/password-utils.scm:1406:13: 1.9 is already the latest 
version of hashcat-utils
gnu/packages/password-utils.scm:1490:13: 1.4.0 is already the latest 
version of bruteforce-luks
gnu/packages/solidity.scm:37:13: solidity would be upgraded from 0.8.15 
to 0.8.24
gnu/packages/sync.scm:568:13: rclone would be upgraded from 1.52.3 to 1.65.2
gnu/packages/virtualization.scm:2202:13: 0.4.7 is already the latest 
version of umoci
gnu/packages/virtualization.scm:2152:13: runc would be upgraded from 
1.1.9 to 1.1.12
gnu/packages/web-browsers.scm:108:13: 9.0 is already the latest version 
of midori
gnu/packages/wm.scm:791:13: 3.4.5 is already the latest version of icewm


I see this as an, albeit small, valuable addition. What do you think?

Thank you for your time

giacomo
[Message part 2 (text/html, inline)]
[channels-lock.scm (text/x-scheme, attachment)]
[t.scm (text/x-scheme, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 17 Apr 2024 09:14:01 GMT) Full text and rfc822 format available.

Notification sent to Giacomo Leidi <goodoldpaul <at> autistici.org>:
bug acknowledged by developer. (Wed, 17 Apr 2024 09:14:02 GMT) Full text and rfc822 format available.

Message #22 received at 66396-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: paul <goodoldpaul <at> autistici.org>
Cc: 66396-done <at> debbugs.gnu.org
Subject: Re: [bug#66396] [PATCH] guix: Add case to Github url updater.
Date: Wed, 17 Apr 2024 11:12:47 +0200
Hi,

paul <goodoldpaul <at> autistici.org> skribis:

> I made a detailed analysis on the current status of the updater. I'm
> attaching the source code I used.
>
> There are ~239 packages (probably with some false positive due to
> deprecated packages I believe) that have a github.com origin-uri that
> currently are marked as having no updater:
>
> guix time-machine -C channels-lock.scm -- repl -- t.scm | grep github.com | awk '{ print $1 }' | wc -l
>
> 239
>
> This patch allows the following packages (and probably more in
> downstream channels) to be refreshed:

Got it.  Finally applied with a commit log that explains this.

Thanks!

Ludo’.




This bug report was last modified 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.