summaryrefslogtreecommitdiff
path: root/guix/gnu-maintenance.scm
AgeCommit message (Collapse)Author
2023-09-11gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs.Maxim Cournoyer
This reinstate commit a5b5df7f7fbbb98487b2e7a59941efee6492bc7f with a fix to the inner expand-uri procedure.
2023-09-11Revert "gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs."Maxim Cournoyer
This reverts commit a5b5df7f7fbbb98487b2e7a59941efee6492bc7f. Pushed too early.
2023-09-11gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs.Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/58697>. * guix/gnu-maintenance.scm (import-html-updatable-release): Update doc. <expand-uri>: New nested procedure. Apply it to the origin URI. Reported-by: kiasoc5 <kiasoc5@disroot.org>
2023-09-06gnu-maintenance: Do not error when there are no candidates.Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/65773>. * guix/gnu-maintenance.scm (rewrite-url): Do not error when there are no candidates. This may well be possible, depending on the site.
2023-09-05gnu-maintenance: Do not crash on refresh when origin URI is a list.Maxim Cournoyer
Updating the simh package would fail with: ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure string-prefix?: Wrong type argument in position 2 (expecting string): ("http://simh.trailing-edge.com/sources/simhv312-4.zip" "http://simh.trailing-edge.com/sources/archive/simhv312-4.zip") This is because it expects a scalar value, but lists are allowed for URIs. * guix/gnu-maintenance.scm (import-html-updatable-release): Check that URI is a string before checking if it has the mirror:// prefix.
2023-08-26gnu-maintenance: Consider Qt source tarballs as "release files".Maxim Cournoyer
* guix/gnu-maintenance.scm (release-file?): Use positive logic in doc. Add a special case for Qt source archives. * tests/gnu-maintenance.scm ("release-file?"): Update test.
2023-08-26gnu-maintenance: Allow mirror URLs to fallback to the generic HTML updater.Maxim Cournoyer
* guix/gnu-maintenance.scm (http-url?): Extract from html-updatable-package?, modify to return the HTTP URL, and support the mirror:// scheme. (%disallowed-hosting-sites): New variable, extracted from html-updatable-package. (html-updatable-package?): Rewrite a mirror:// URL to an HTTP or HTTPS one. * guix/download.scm (%mirrors): Update comment.
2023-08-26gnu-maintenance: Add support to rewrite version in URL path.Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/64015>. Fixes <https://issues.guix.gnu.org/65304>. Previously, the generic HTML updater would only look for the list of files found at the parent of its current source URL, ignoring that the URL may embed the version elsewhere in its path. This could cause 'guix refresh' to report no updates available, while in fact there were, such as for 'libuv'. * guix/gnu-maintenance.scm (strip-trailing-slash): New procedure. (%version-rx): New variable. (rewrite-url): New procedure. (import-html-release): New rewrite-url? argument. When true, use the above procedure. (import-html-updatable-release): Call import-html-release with #:rewrite-url set to #t. * tests/gnu-maintenance.scm ("rewrite-url, to-version specified") ("rewrite-url, without to-version"): New tests.
2023-08-26gnu-maintenance: Extract 'canonicalize-url' from 'import-html-release'.Maxim Cournoyer
* guix/gnu-maintenance.scm (canonicalize-url): New procedure, extracted from... (import-html-release): ... here. Use it. Rename inner PACKAGE variable to NAME, to explicit it is a string and not a package object.
2023-08-26gnu-maintenance: Document nested procedures in 'import-html-release'.Maxim Cournoyer
* guix/gnu-maintenance.scm (import-html-release): Add docstring to the 'file->signature/guess' and 'url->release' nested procedures.
2023-08-26gnu-maintenance: Accept package object in 'import-html-release' procedure.Maxim Cournoyer
This is in preparation for a new URL rewriting feature, which will need to have the current version information available. * guix/gnu-maintenance.scm (import-html-release): Update doc. Adjust default value of the DIRECTORY argument. Bind PACKAGE in lexical scope so that its value there is unchanged. (import-savannah-release, import-kernel.org-release) (import-html-updatable-release): Adjust accordingly.
2023-08-26gnu-maintenance: Fix indentation.Maxim Cournoyer
* guix/gnu-maintenance.scm: Re-indent file.
2023-08-26gnu-maintenance: Extract url->links procedure.Maxim Cournoyer
* guix/gnu-maintenance.scm (url->links): New procedure. (import-html-release): Use it.
2023-08-26gnu-maintenance: Fix docstring.Maxim Cournoyer
* guix/gnu-maintenance.scm (import-kernel.org-release): Fix docstring.
2023-08-26gnu-maintenance: Make base-url argument of import-html-release required.Maxim Cournoyer
It doesn't make sense to have it default to something like "https://kernel.org/pub"; it should always be provided explicitly. * guix/gnu-maintenance.scm (import-html-release) <#:base-url>: Turn keyword argument into a positional argument. Update doc. * guix/gnu-maintenance.scm (import-savannah-release): Adjust call accordingly. (import-kernel.org-release): Likewise. (import-html-updatable-release): Likewise.
2023-08-22gnu-maintenance: Improve check for disabled host names.Maxim Cournoyer
Found while investigating <https://issues.guix.gnu.org/65304>. * guix/gnu-maintenance.scm (html-updatable-package?): Tighten predicate. Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-03-13guix: Strip #:use-module lists.Ludovic Courtès
This was obtained by setting up this environment: guix shell -D guix --with-input=guile@3.0.9=guile-next \ --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2 -- make -j5 then adding 'unused-module' to (@@ (guix build compiler) %warnings), building, and checking all the "unused module" warnings and removing those that were definitely unused.
2023-01-08gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors.Ludovic Courtès
Previously, in a networking-less environment such as 'guix shell -C -D guix', 'guix refresh --list-updaters' would crash due to a 'gettaddrinfo-error' exception in these predicates. * guix/gnu-maintenance.scm (%gnu-updater)[pred]: Wrap in 'false-if-networking-error'. (%gnu-ftp-updater)[pred]: Likewise.
2023-01-08gnu-maintenance: Factorize 'false-if-networking-failure'.Ludovic Courtès
* guix/import/utils.scm (call-with-networking-exception-handler): New procedure. (false-if-networking-error): New macro. * guix/gnu-maintenance.scm (import-html-updatable-release): Use it instead of inline code.
2022-12-26gnu-maintenance: Allow updating to a specific version.Hartmut Goebel
* guix/gnu-maintenance.scm (latest-ftp-release): Rename to … (import-ftp-release) … this, add #:version argument. If version is given, try to find the respective version. (latest-html-release): Rename to … (import-html-release) … this, add #:version argument. If version is given, try to find the respective version. (latest-gnu-release): Rename to … (import-gnu-release) … this, add #:version argument. Refactor to first select archives for respective package, the find the requested or latest version, then create the upstream-source. (latest-release): Rename to … (import-release) … this, add #:version argument, pass on to … (import-ftp-release) … this. (import-release*): Rename to … (import-release*) … this, add #:version argument, pass on to … (latest-release) … this. (latest-savannah-release): Rename to … (import-savannah-release) … this, add keword-argument version, pass on to … (import-html-release) … this. (latest-xorg-release): Rename to … (import-xorg-release) … this, add keword-argument version, pass on to … (import-ftp-release) … this. (latest-kernel.org-release): Rename to … (import-kernel.org-release) … this, add #:version argument, pass on to … (import-html-release) … this. (latest-html-updatable-release): Rename to … (import-html-updatable-release) … this, add #:version argument, pass on to … (import-html-release) … this. * guix/import/gnu.scm(gnu->guix-package): Adjust function call.
2022-12-26import: sourceforge: Issue error-message if version is given.Hartmut Goebel
Due to the complicated directory structure at sourceforce, enabling the sourceforge importer to update to a specific version is very complicated to implement. Since only 2.0% of the packages in guix are covered by this updater I dedided to not implement this. * guix/gnu-maintenance.scm (latest-sourceforge-release): Add #:version argument. Issue error-message if version is given.
2022-12-26upstream-updater: Rename record field.Hartmut Goebel
The next commits will make the functions, which are currently importing the latest version of a package, change into importing the latest or a given version of the package (for those updaters supporting specifying a version). Thus the name ‘latest‘ is no longer appropriate. * guix/upstream.scm (upstream-updater) Rename field [latest] to [import]. (lookup-updater, package-latest-release) Adjust fieldname accordingly. * guix/gnu-maintenance.scm (%gnu-updater, %gnu-ftp-updater, %savannah-updater, %sourceforge-updater, %xorg-updater, %kernel.org-updater, %generic-html-updater), guix/import/cpan.scm (%cpan-updater), guix/import/cran.scm (%cran-updater, %bioconductor-updater), guix/import/crate.scm (%crate-updater), guix/import/egg.scm (%egg-updater), guix/import/elpa.scm (%elpa-updater), guix/import/gem.scm (%gem-updater), guix/import/git.scm (%generic-git-updater), guix/import/github.scm (%github-updater), guix/import/gnome.scm (%gnome-updater), guix/import/hackage.scm (%hackage-updater), guix/import/hexpm.scm (%hexpm-updater), guix/import/kde.scm (%kde-updater), guix/import/launchpad.scm (%launchpad-updater), guix/import/minetest.scm (%minetest-updater), guix/import/opam.scm (%opam-updater), guix/import/pypi.scm (%pypi-updater), guix/import/stackage.scm (%stackage-updater), tests/import-github.scm (found-sexp) tests/transformations.scm ("options->transformation, with-latest"): Adjust fieldname accordingly.
2022-12-08gnu-maintenance: 'generic-html' updater ignores invalid host names.Ludovic Courtès
Previously "guix refresh xkbset" for example would crash with a getaddrinfo-error because the domain name is invalid. Now it reports failure to update. Reported by Tyler Wolf <tyler@twolf.io> in <https://issues.guix.gnu.org/59598>. * guix/gnu-maintenance.scm (latest-html-updatable-release): Return #f upon 'getaddrinfo-error' as well.
2022-11-13guix: Replace defective freemirror.org.Tobias Geerinckx-Rice
This ‘mirror’ is particularly problematic because it's the only one checked by ‘guix refresh’. * guix/gnu-maintenance.scm (%savannah-base): Substitute freedif.org. * guix/download.scm (%mirrors): Likewise. Reported by sash-kan on #guix.
2022-11-11gnu-maintenance: 'release-file?' excludes "valgrind-3.20.0.RC1.tar.bz2".Ludovic Courtès
* guix/gnu-maintenance.scm (%alpha-tarball-rx): Add "." before "(alpha|beta|...)". * tests/gnu-maintenance.scm ("release-file?"): Add test for Valgrind.
2022-11-11gnu-maintenance: 'gnu' updater prefers tarball with same compression.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/59168>. Previously 'guix build make --with-latest=make' would pick ".tar.lz", rather than "tar.gz", because "tar.lz" happened to come first in the <upstream-source> 'urls' field. * guix/gnu-maintenance.scm (latest-gnu-release)[archive-type] [better-tarball?]: New variables. Sort TARBALLS according to BETTER-TARBALL?.
2022-10-03gnu-maintenance: Remove retired 'gforge.inria.fr' site.Maxim Cournoyer
* guix/gnu-maintenance.scm (html-updatable-package?): Remove "gforge.inria.fr".
2022-09-26gnu-maintenance: Remove unused procedures.Maxime Devos
* guix/gnu-maintenance.scm (url-prefix-rewrite, adjusted-upstream-source): Remove. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26gnu-maintenance: Simplify latest-kernel.org-release.Maxime Devos
As latest-html-release now produces mirror:// URIs where possible, the additional post-processing is not necessary anymore. As a test, revert the dtc package back to 1.6.0 and try updating 'gash', the mirror:// URI remains. * gnu-maintenance.scm (latest-kernel.org-release): Do not call adjusted-upstream-source on the result. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26gnu-maintenance: Simplify latest-savannah-release.Maxime Devos
As latest-html-release now produces mirror:// URIs where possible, the additional post-processing is not necessary anymore. As a test, try updating 'gash', the mirror:// URI remains. * gnu-maintenance.scm (latest-savannah-release): Do not call adjusted-upstream-source on the result. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26gnu-maintenance: Produce mirror:// URIs in latest-html-release.Maxime Devos
Partially fixes <https://issues.guix.gnu.org/57477>. I'm not aware of a package using both latest-html-release and mirrors, so it has not been completely tested. However, updating "yt-dlp" appears to work (except for git-fetch not being supported yet). The expression for the signature-urls field had to be tweaked to not call uri-mirror-rewrite on #false. * guix/gnu-maintenance.scm (latest-html-release)[url->research]{urls,signature-urls}: Call uri-mirror-rewrite on the URLs. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26gnu-maintenance: Produce mirror:// URIs in latest-ftp-release.Maxime Devos
Partially fixes <https://issues.guix.gnu.org/57477>. As a test, try updating gnupg. Before the patch, a ftp:// URL was produced, now the mirror:// is preserved. * guix/gnu-maintenance.scm (latest-ftp-release)[file->source]{urls,signature-urls}: Call uri-mirror-rewrite on the URLs. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26lint: Extract logic of 'check-mirror-url'.Maxime Devos
It will be useful for fixing <https://issues.guix.gnu.org/57477>. * guix/lint.scm (check-mirror-url): Extract mirror://-constructing code to ... * guix/gnu-maintenance.scm (uri-mirror-rewrite): ... here, tweaking the API and implementation in anticipation of future users. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-09-17gnu-maintenance: Support // URLs in latest-html-release.Maxime Devos
This makes "./pre-inst-env guix refresh -u" download the release tarball from the right place -- previously, it downloaded from https://www.libreoffice.org//download.documentfoundation.org/libreoffice/src/7.4.0/libreoffice-7.4.0.3.tar.xz?idx=1 whereas it should download from https://download.documentfoundation.org/libreoffice/src/7.4.0/libreoffice-7.4.0.3.tar.xz?idx=1 instead. * guix/gnu-maintenance.scm (latest-html-release)[url-release]: Adjust computation in the case of an absolute URI-reference without a scheme. * tests/gnu-maintenance.scm ("latest-html-release, scheme-less URIs"): Test it. Signed-off-by: Christopher Baines <mail@cbaines.net>
2021-06-03gnu-maintenance: 'generic-html' computes the right source URL.Ludovic Courtès
Fixes a regression introduced in 84f8bae0f85de081bbc55aa54ad6a50981a06a43, whereby the URL computed for the new ffmpeg (for instance) would be: https://ffmpeg.org/ffmpeg-4.4.tar.xz instead of: https://ffmpeg.org/releases/ffmpeg-4.4.tar.xz Reported by Maxim Cournoyer. * guix/gnu-maintenance.scm (latest-html-release)[url->release]: Adjust computation in the case of a URI-reference with a relative path.
2021-05-28gnu-maintenance: 'generic-html' correctly handles relative release URLs.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-html-release)[url->release]: Fix source URL construction in cases where URL is a possibly relative path.
2021-05-28gnu-maintenance: 'release-file?' accepts 'v' prefix as in "PKG-v1.2.tgz".Ludovic Courtès
* guix/gnu-maintenance.scm (%tarball-rx, %package-name-rx): Accept 'v' and 'V' prefixes. Accept ".tgz" extension. * tests/gnu-maintenance.scm ("release-file?"): Add test.
2021-04-08gnu-maintenance: 'sourceforge' updater reuses the same connection.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-sourceforge-release): Call 'open-socket-for-uri' upfront. Pass #:port and #:keep-alive? to 'http-head'. Wrap body in 'dynamic-wind' and call 'close-port' upon exit.
2021-04-06gnu-maintenance: Add 'sourceforge' updater.Ludovic Courtès
This updater currently covers 2.4% of the packages. * guix/gnu-maintenance.scm (latest-sourceforge-release): New procedure. (%sourceforge-updater): New variable. * doc/guix.texi (Invoking guix refresh): Document it.
2021-04-05gnu-maintenance: Recognize more source tarball naming schemes.Ludovic Courtès
* guix/gnu-maintenance.scm (%package-name-rx): Add ".src" and ".orig" suffixes. * tests/gnu-maintenance.scm ("release-file?"): Add mpg321 and bvi examples. ("tarball->version"): New test.
2021-04-05gnu-maintenance: Remove unused procedure.Ludovic Courtès
* guix/gnu-maintenance.scm (savannah-package?): Remove.
2021-04-05gnu-maintenance: 'generic-html' updates packages with the right property.Ludovic Courtès
* guix/gnu-maintenance.scm (html-updatable-package?): Return true for packages with a 'release-monitoring-url' property. This allows us to cater for packages with source fetched over, say, FTP, but with an HTML page to monitor.
2021-03-29gnu-maintenance: Recognize "-source" tarball suffix.Ludovic Courtès
Fixes <https://bugs.gnu.org/47398>. Reported by Léo Le Bouter <lle-bout@zaclys.net>. * guix/gnu-maintenance.scm (%tarball-rx): Add "-[Ss]ource" suffix. * tests/gnu-maintenance.scm ("release-file?"): Add exiv2 example.
2021-03-21gnu-maintenance: Exclude GNU Radio from the 'gnu-ftp' updater predicate.Ludovic Courtès
'gnu-ftp' would only list old GNU Radio releases since new releases are no longer uploaded to ftp.gnu.org. With this change, 'generic-html' is picked up instead. * guix/gnu-maintenance.scm (pure-gnu-package?): Return #f for GNU Radio.
2021-03-20gnu-maintenance: Accept underscores as package/version separators.Ludovic Courtès
Fixes <https://bugs.gnu.org/47256>. Reported by Léo Le Bouter <lle-bout@zaclys.net>. * guix/gnu-maintenance.scm (%tarball-rx, %package-name-rx): Accept underscore as the package/version separator in tarball names. * tests/gnu-maintenance.scm ("release-file?"): Add "mediainfo" test.
2021-03-19gnu-maintenance: Better handle empty #:directory for 'latest-html-release'.Ludovic Courtès
In particular, this makes sure we don't add a trailing slash when the user specified a 'release-monitoring-url' property for the 'generic-html' updater. * guix/gnu-maintenance.scm (latest-html-release): When DIRECTORY is empty, do not append it.
2021-03-17gnu-maintenance: Add a timeout on FTP connection establishment.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-ftp-release): Pass #:timeout to 'ftp-open'.
2021-03-17gnu-maintenance: Remove unused parameters of 'latest-ftp-release'.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-ftp-release): Remove #:ftp-open, #:ftp-close, and #:keep-file?.
2021-03-17gnu-maintenance: Add 'generic-html' updater.Ludovic Courtès
This brings total updater coverage, as reported by 'guix refresh --list-updaters', from 78% to 88.3%. Among many other things, it covers freedesktop.org packages. * guix/gnu-maintenance.scm (html-updatable-package?) (latest-html-updatable-release): New procedures. (%generic-html-updater): New variable. * doc/guix.texi (Invoking guix refresh): Document it.
2021-03-17gnu-maintenance: 'latest-html-release' better computes version number.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-html-release): Use 'tarball->version' rather than 'package-name->name+version' to extract the version number. This fixes problems with packages like 'netsurf' and 'libdom' that have "-src" in their tarball name, where "src" would be taken as the new version number.