[PATCH] guix: Add case to Github url updater.

  • Done
  • quality assurance status badge
Details
2 participants
  • Giacomo Leidi
  • Ludovic Courtès
Owner
unassigned
Submitted by
Giacomo Leidi
Severity
normal
G
G
Giacomo Leidi wrote on 7 Oct 2023 21:45
(address . guix-patches@gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
1ed23c30a7592facd1db4c28c0f3cfb908157d9e.1696707911.git.goodoldpaul@autistici.org
* 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(+)

Toggle diff (36 lines)
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@flashner.co.il>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@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
L
L
Ludovic Courtès wrote on 23 Oct 2023 23:55
(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)(address . 66396@debbugs.gnu.org)
87y1ftc8bu.fsf@gnu.org
Hi,

Giacomo Leidi <goodoldpaul@autistici.org> skribis:

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

[...]

Toggle quote (5 lines)
> + ((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’.
P
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 66396@debbugs.gnu.org)
b201ae55-5311-b1a5-05aa-f9291f8253ce@autistici.org
Hi Ludo’ ,

On 10/23/23 23:55, Ludovic Courtès wrote:
Toggle quote (6 lines)
>> + ((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?
Attachment: file
P
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 66396@debbugs.gnu.org)
208e097c-e299-b14d-2437-310355245de8@autistici.org
Hi,

On 10/24/23 00:05, paul wrote:
Toggle quote (11 lines)
>
> 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
P
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 66396@debbugs.gnu.org)
aa17779e-d3a5-2f10-4a7b-a1087c501dd8@autistici.org
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
Attachment: file
(list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "5729b2b3521aa9d4a88c8ac680bd37ffe3b3acc6") (introduction (make-channel-introduction "afb9f2752315f131e4ddd44eba02eed403365085" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
(use-modules (gnu packages) (guix build utils) (guix import github) (guix packages) (guix upstream) (guix utils) (ice-9 format) (srfi srfi-1) (srfi srfi-9) (srfi srfi-26) (srfi srfi-37) (srfi srfi-71)) (define packages (filter (lambda (p) (origin? (package-source p))) (fold-packages cons '()))) (define uncovered (fold (lambda (updater uncovered) (let ((matches (filter (upstream-updater-predicate updater) packages))) (lset-difference eq? uncovered matches))) packages (force %updaters))) (for-each (lambda (u) (format #t "~a\t~a~%" (package-name u) (origin-uri (package-source u)))) uncovered)
L
L
Ludovic Courtès wrote on 17 Apr 11:12 +0200
(name . paul)(address . goodoldpaul@autistici.org)(address . 66396-done@debbugs.gnu.org)
871q74jqsw.fsf@gnu.org
Hi,

paul <goodoldpaul@autistici.org> skribis:

Toggle quote (14 lines)
> 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’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 66396
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch