aboutsummaryrefslogtreecommitdiff
path: root/guix/gnu-maintenance.scm
Commit message (Collapse)AuthorAge
* gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs.Maxim Cournoyer2023-09-11
| | | | | This reinstate commit a5b5df7f7fbbb98487b2e7a59941efee6492bc7f with a fix to the inner expand-uri procedure.
* Revert "gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs."Maxim Cournoyer2023-09-11
| | | | | This reverts commit a5b5df7f7fbbb98487b2e7a59941efee6492bc7f. Pushed too early.
* gnu-maintenance: Support URI list of mixed mirrors, HTTP URLs.Maxim Cournoyer2023-09-11
| | | | | | | | | 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>
* gnu-maintenance: Do not error when there are no candidates.Maxim Cournoyer2023-09-06
| | | | | | | 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.
* gnu-maintenance: Do not crash on refresh when origin URI is a list.Maxim Cournoyer2023-09-05
| | | | | | | | | | | | | | 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.
* gnu-maintenance: Consider Qt source tarballs as "release files".Maxim Cournoyer2023-08-26
| | | | | | * 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.
* gnu-maintenance: Allow mirror URLs to fallback to the generic HTML updater.Maxim Cournoyer2023-08-26
| | | | | | | | | * 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.
* gnu-maintenance: Add support to rewrite version in URL path.Maxim Cournoyer2023-08-26
| | | | | | | | | | | | | | | | | | | | 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.
* gnu-maintenance: Extract 'canonicalize-url' from 'import-html-release'.Maxim Cournoyer2023-08-26
| | | | | | | * 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.
* gnu-maintenance: Document nested procedures in 'import-html-release'.Maxim Cournoyer2023-08-26
| | | | | * guix/gnu-maintenance.scm (import-html-release): Add docstring to the 'file->signature/guess' and 'url->release' nested procedures.
* gnu-maintenance: Accept package object in 'import-html-release' procedure.Maxim Cournoyer2023-08-26
| | | | | | | | | | | 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.
* gnu-maintenance: Fix indentation.Maxim Cournoyer2023-08-26
| | | | * guix/gnu-maintenance.scm: Re-indent file.
* gnu-maintenance: Extract url->links procedure.Maxim Cournoyer2023-08-26
| | | | | * guix/gnu-maintenance.scm (url->links): New procedure. (import-html-release): Use it.
* gnu-maintenance: Fix docstring.Maxim Cournoyer2023-08-26
| | | | * guix/gnu-maintenance.scm (import-kernel.org-release): Fix docstring.
* gnu-maintenance: Make base-url argument of import-html-release required.Maxim Cournoyer2023-08-26
| | | | | | | | | | | 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.
* gnu-maintenance: Improve check for disabled host names.Maxim Cournoyer2023-08-22
| | | | | | | | 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>
* guix: Strip #:use-module lists.Ludovic Courtès2023-03-13
| | | | | | | | | | | | 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.
* gnu-maintenance: 'gnu' and 'gnu-ftp' predicates catch networking errors.Ludovic Courtès2023-01-08
| | | | | | | | | | 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.
* gnu-maintenance: Factorize 'false-if-networking-failure'.Ludovic Courtès2023-01-08
| | | | | | | | * 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.
* gnu-maintenance: Allow updating to a specific version.Hartmut Goebel2022-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* import: sourceforge: Issue error-message if version is given.Hartmut Goebel2022-12-26
| | | | | | | | | | | 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.
* upstream-updater: Rename record field.Hartmut Goebel2022-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gnu-maintenance: 'generic-html' updater ignores invalid host names.Ludovic Courtès2022-12-08
| | | | | | | | | | | | 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.
* guix: Replace defective freemirror.org.Tobias Geerinckx-Rice2022-11-13
| | | | | | | | | | 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.
* gnu-maintenance: 'release-file?' excludes "valgrind-3.20.0.RC1.tar.bz2".Ludovic Courtès2022-11-11
| | | | | | * guix/gnu-maintenance.scm (%alpha-tarball-rx): Add "." before "(alpha|beta|...)". * tests/gnu-maintenance.scm ("release-file?"): Add test for Valgrind.
* gnu-maintenance: 'gnu' updater prefers tarball with same compression.Ludovic Courtès2022-11-11
| | | | | | | | | | | | 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?.
* gnu-maintenance: Remove retired 'gforge.inria.fr' site.Maxim Cournoyer2022-10-03
| | | | * guix/gnu-maintenance.scm (html-updatable-package?): Remove "gforge.inria.fr".
* gnu-maintenance: Remove unused procedures.Maxime Devos2022-09-26
| | | | | | | * guix/gnu-maintenance.scm (url-prefix-rewrite, adjusted-upstream-source): Remove. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu-maintenance: Simplify latest-kernel.org-release.Maxime Devos2022-09-26
| | | | | | | | | | | | | 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>
* gnu-maintenance: Simplify latest-savannah-release.Maxime Devos2022-09-26
| | | | | | | | | | | | 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>
* gnu-maintenance: Produce mirror:// URIs in latest-html-release.Maxime Devos2022-09-26
| | | | | | | | | | | | | | 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>
* gnu-maintenance: Produce mirror:// URIs in latest-ftp-release.Maxime Devos2022-09-26
| | | | | | | | | | | | 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>
* lint: Extract logic of 'check-mirror-url'.Maxime Devos2022-09-26
| | | | | | | | | | 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>
* gnu-maintenance: Support // URLs in latest-html-release.Maxime Devos2022-09-17
| | | | | | | | | | | | | | | | | | | | 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>
* gnu-maintenance: 'generic-html' computes the right source URL.Ludovic Courtès2021-06-03
| | | | | | | | | | | | | | | | | 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.
* gnu-maintenance: 'generic-html' correctly handles relative release URLs.Ludovic Courtès2021-05-28
| | | | | * guix/gnu-maintenance.scm (latest-html-release)[url->release]: Fix source URL construction in cases where URL is a possibly relative path.
* gnu-maintenance: 'release-file?' accepts 'v' prefix as in "PKG-v1.2.tgz".Ludovic Courtès2021-05-28
| | | | | | * 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.
* gnu-maintenance: 'sourceforge' updater reuses the same connection.Ludovic Courtès2021-04-08
| | | | | | | * 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.
* gnu-maintenance: Add 'sourceforge' updater.Ludovic Courtès2021-04-06
| | | | | | | | 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.
* gnu-maintenance: Recognize more source tarball naming schemes.Ludovic Courtès2021-04-05
| | | | | | | | * 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.
* gnu-maintenance: Remove unused procedure.Ludovic Courtès2021-04-05
| | | | * guix/gnu-maintenance.scm (savannah-package?): Remove.
* gnu-maintenance: 'generic-html' updates packages with the right property.Ludovic Courtès2021-04-05
| | | | | | | * 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.
* gnu-maintenance: Recognize "-source" tarball suffix.Ludovic Courtès2021-03-29
| | | | | | | | 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.
* gnu-maintenance: Exclude GNU Radio from the 'gnu-ftp' updater predicate.Ludovic Courtès2021-03-21
| | | | | | | | '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.
* gnu-maintenance: Accept underscores as package/version separators.Ludovic Courtès2021-03-20
| | | | | | | | | 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.
* gnu-maintenance: Better handle empty #:directory for 'latest-html-release'.Ludovic Courtès2021-03-19
| | | | | | | | | 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.
* gnu-maintenance: Add a timeout on FTP connection establishment.Ludovic Courtès2021-03-17
| | | | | * guix/gnu-maintenance.scm (latest-ftp-release): Pass #:timeout to 'ftp-open'.
* gnu-maintenance: Remove unused parameters of 'latest-ftp-release'.Ludovic Courtès2021-03-17
| | | | | * guix/gnu-maintenance.scm (latest-ftp-release): Remove #:ftp-open, #:ftp-close, and #:keep-file?.
* gnu-maintenance: Add 'generic-html' updater.Ludovic Courtès2021-03-17
| | | | | | | | | | | 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.
* gnu-maintenance: 'latest-html-release' better computes version number.Ludovic Courtès2021-03-17
| | | | | | | | * 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.