[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/08: gnu-maintenance: Add kernel.org updater.
From: |
Ludovic Courtès |
Subject: |
05/08: gnu-maintenance: Add kernel.org updater. |
Date: |
Wed, 30 Nov 2016 16:35:27 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 2fd370e8167be9a0af9e5358757d58d1acaf02e0
Author: Ludovic Courtès <address@hidden>
Date: Wed Nov 30 16:29:15 2016 +0100
gnu-maintenance: Add kernel.org updater.
* guix/gnu-maintenance.scm (latest-kernel.org-release): New procedure.
(%kernel.org-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add it.
---
doc/guix.texi | 2 ++
guix/gnu-maintenance.scm | 26 +++++++++++++++++++++++++-
guix/scripts/refresh.scm | 4 +++-
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 53d29e4..37bdb69 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5342,6 +5342,8 @@ the updater for GNOME packages;
the updater for KDE packages;
@item xorg
the updater for X.org packages;
address@hidden kernel.org
+the updater for packages hosted on kernel.org;
@item elpa
the updater for @uref{http://elpa.gnu.org/, ELPA} packages;
@item cran
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 90ca7a4..4d4bb45 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -60,7 +60,8 @@
%gnu-updater
%gnome-updater
%kde-updater
- %xorg-updater))
+ %xorg-updater
+ %kernel.org-updater))
;;; Commentary:
;;;
@@ -532,6 +533,22 @@ source URLs starts with PREFIX."
#:directory
(string-append "/pub/xorg/" (dirname (uri-path uri)))))))
+(define (latest-kernel.org-release package)
+ "Return the latest release of PACKAGE, the name of a kernel.org package."
+ (let ((uri (string->uri (origin-uri (package-source package)))))
+ (false-if-ftp-error
+ (latest-ftp-release
+ (package-name package)
+ #:server "ftp.free.fr" ;a mirror reachable over FTP
+ #:directory (string-append "/mirrors/ftp.kernel.org"
+ (dirname (uri-path uri)))
+
+ ;; kernel.org provides "foo-x.y.tar.sign" files, which are signatures of
+ ;; the uncompressed tarball.
+ #:file->signature (lambda (tarball)
+ (string-append (file-sans-extension tarball)
+ ".sign"))))))
+
(define %gnu-updater
(upstream-updater
(name 'gnu)
@@ -560,4 +577,11 @@ source URLs starts with PREFIX."
(pred (url-prefix-predicate "mirror://xorg/"))
(latest latest-xorg-release)))
+(define %kernel.org-updater
+ (upstream-updater
+ (name 'kernel.org)
+ (description "Updater for packages hosted on kernel.org")
+ (pred (url-prefix-predicate "mirror://kernel.org/"))
+ (latest latest-kernel.org-release)))
+
;;; gnu-maintenance.scm ends here
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 91a31a2..12a344e 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -35,7 +35,8 @@
#:select (%gnu-updater
%gnome-updater
%kde-updater
- %xorg-updater))
+ %xorg-updater
+ %kernel.org-updater))
#:use-module (guix import elpa)
#:use-module (guix import cran)
#:use-module (guix import hackage)
@@ -200,6 +201,7 @@ unavailable optional dependencies such as Guile-JSON."
%gnome-updater
%kde-updater
%xorg-updater
+ %kernel.org-updater
%elpa-updater
%cran-updater
%bioconductor-updater
- branch master updated (dcd9d16 -> 72f0c5e), Ludovic Courtès, 2016/11/30
- 06/08: refresh: '--list-updaters' shows updater coverage., Ludovic Courtès, 2016/11/30
- 08/08: gnu: iw: Update to 4.9., Ludovic Courtès, 2016/11/30
- 07/08: gnu: pciutils: Update to 3.5.2., Ludovic Courtès, 2016/11/30
- 01/08: tests: Create a copy-on-write image instead of copying eagerly., Ludovic Courtès, 2016/11/30
- 04/08: upstream: Properly verify signatures of uncompressed tarballs., Ludovic Courtès, 2016/11/30
- 05/08: gnu-maintenance: Add kernel.org updater.,
Ludovic Courtès <=
- 02/08: gnu-maintenance: Factorize URL prefix predicates., Ludovic Courtès, 2016/11/30
- 03/08: refresh: Honor the selected updaters when '-u' isn't given., Ludovic Courtès, 2016/11/30