summaryrefslogtreecommitdiff
path: root/guix/gnu-maintenance.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/gnu-maintenance.scm')
-rw-r--r--guix/gnu-maintenance.scm26
1 files changed, 25 insertions, 1 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 90ca7a45e3..4d4bb452be 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