guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25977: [PATCH 1/3] guix: Add updater for netfilter.org.


From: Marius Bakke
Subject: bug#25977: [PATCH 1/3] guix: Add updater for netfilter.org.
Date: Sun, 5 Mar 2017 16:56:51 +0100

* guix/gnu-maintenance.scm (latest-netfilter.org-release,
%netfilter.org-updater): New variables.
* doc/guix.texi (Invoking guix refresh): Mention it.
---
 doc/guix.texi            |  2 ++
 guix/gnu-maintenance.scm | 17 +++++++++++++++++
 guix/scripts/refresh.scm |  4 +++-
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7c7729859..3507ee38f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5525,6 +5525,8 @@ the updater for GNOME packages;
 the updater for KDE packages;
 @item xorg
 the updater for X.org packages;
address@hidden netfilter.org
+the updater for packages hosted on netfilter.org;
 @item kernel.org
 the updater for packages hosted on kernel.org;
 @item elpa
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 07e690964..e405dac88 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -61,6 +61,7 @@
             %gnome-updater
             %kde-updater
             %xorg-updater
+            %netfilter.org-updater
             %kernel.org-updater))
 
 ;;; Commentary:
@@ -540,6 +541,15 @@ source URLs starts with PREFIX."
       #:directory
       (string-append "/pub/xorg/" (dirname (uri-path uri)))))))
 
+(define (latest-netfilter.org-release package)
+  "Return the latest release of PACKAGE, the name of a netfilter.org package."
+  (let ((uri (string->uri (origin-uri (package-source package)))))
+    (false-if-ftp-error
+     (latest-ftp-release
+      (package-name package)
+      #:server "ftp.netfilter.org"
+      #:directory (string-append "/pub" (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)))))
@@ -584,6 +594,13 @@ source URLs starts with PREFIX."
    (pred (url-prefix-predicate "mirror://xorg/"))
    (latest latest-xorg-release)))
 
+(define %netfilter.org-updater
+  (upstream-updater
+   (name 'netfilter.org)
+   (description "Updater for packages hosted on netfilter.org")
+   (pred (url-prefix-predicate "mirror://netfilter.org/"))
+   (latest latest-netfilter.org-release)))
+
 (define %kernel.org-updater
   (upstream-updater
    (name 'kernel.org)
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 4d3c695aa..4c5ec6c77 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -36,6 +36,7 @@
                           %gnome-updater
                           %kde-updater
                           %xorg-updater
+                          %netfilter.org-updater
                           %kernel.org-updater))
   #:use-module (guix import elpa)
   #:use-module (guix import cran)
@@ -211,7 +212,8 @@ unavailable optional dependencies such as Guile-JSON."
                  ((guix import pypi) => %pypi-updater)
                  ((guix import gem) => %gem-updater)
                  ((guix import github) => %github-updater)
-                 ((guix import crate) => %crate-updater)))
+                 ((guix import crate) => %crate-updater)
+                 %netfilter.org-updater))
 
 (define (lookup-updater-by-name name)
   "Return the updater called NAME."
-- 
2.12.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]