import: gnu: Update to the (guix upstream) API.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
index e1bb74c..455f7ee 100644 (file)
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
+;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages man))
 
 (define-public dmd
-  (package
-    (name "dmd")
-    (version "0.2")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
-                                 version ".tar.gz"))
-             (sha256
-              (base32
-               "10fl4k96f17gqx2fv8iw9c61ld26gsk4bbrlfqckdmiimz1k175z"))))
-    (build-system gnu-build-system)
-    (arguments
-     '(#:configure-flags '("--localstatedir=/var")))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs `(("guile" ,guile-2.0)))
-    (synopsis "Daemon managing daemons")
-    (description
-     "GNU DMD is a daemon-managing daemon, meaning that it manages the
+  (let ((base-version "0.2")
+        (patch-level  "01"))
+    (package
+      (name "dmd")
+      (version (string-append base-version "." patch-level))
+      (source (origin
+                (method url-fetch)
+                (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
+                                    base-version ".tar.gz"))
+                (sha256
+                 (base32
+                  "10fl4k96f17gqx2fv8iw9c61ld26gsk4bbrlfqckdmiimz1k175z"))
+                (patches
+                 (list (origin
+                         ;; This patch augments 'make-fork+exec-constructor' and
+                         ;; is used by a bunch of services.
+                         (method url-fetch)
+                         (uri (string-append
+                               "http://git.savannah.gnu.org/cgit/dmd.git/patch/"
+                               "?id=d1d0ff30b3ed2b86b0a3c9bc048d2a855f8e31e6"))
+                         (sha256
+                          (base32
+                           "1lqymypixfiyb72d6bn24m06ry2q1ljnnv0qrc89pbb4z9azaa4d"))
+                         (file-name "dmd-user-group.patch"))))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:configure-flags '("--localstatedir=/var")))
+      (native-inputs `(("pkg-config" ,pkg-config)))
+      (inputs `(("guile" ,guile-2.0)))
+      (synopsis "Daemon managing daemons")
+      (description
+       "GNU DMD is a daemon-managing daemon, meaning that it manages the
 execution of system services, replacing similar functionality found in
 typical init systems.  It provides dependency-handling through a convenient
 interface and is based on GNU Guile.")
-    (license license:gpl3+)
-    (home-page "http://www.gnu.org/software/dmd/")))
+      (license license:gpl3+)
+      (home-page "http://www.gnu.org/software/dmd/"))))
 
 (define-public dfc
   (package
@@ -175,17 +191,15 @@ client and server, a telnet client and server, and an rsh client and server.")
 (define-public shadow
   (package
     (name "shadow")
-    (version "4.1.5.1")
+    (version "4.2.1")
     (source (origin
-             ;; Shadow has no real upstream, and not even tarballs.
-             ;; See <https://lists.gnu.org/archive/html/guix-devel/2014-03/msg00233.html>.
-             (method git-fetch)
-             (uri (git-reference
-                   (url "git://git.debian.org/git/pkg-shadow/shadow")
-                   (commit (string-append "upstream/" version))))
-             (sha256
-              (base32
-               "1xx85d83kmacmjzqbamgydcjkwsqd5fi1s2wgwx6myq5wa39qx0n"))))
+              (method url-fetch)
+              (uri (string-append
+                    "http://pkg-shadow.alioth.debian.org/releases/"
+                    name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0h9x1zdbq0pqmygmc1x459jraiqw4gqz8849v268crk78z8r621v"))))
     (build-system gnu-build-system)
     (arguments
      '(;; Assume System V `setpgrp (void)', which is the default on GNU
@@ -206,7 +220,7 @@ client and server, a telnet client and server, and an rsh client and server.")
                     ;; Remove `groups', which is already provided by Coreutils.
                     (let* ((out (assoc-ref outputs "out"))
                            (bin (string-append out "/bin"))
-                           (man (string-append out "/share/man/man1")))
+                           (man (string-append out "/share/man")))
                       (delete-file (string-append bin "/groups"))
                       (for-each delete-file (find-files man "^groups\\."))
                       #t))
@@ -414,6 +428,7 @@ connection alive.")
                      (zero? (system* "tar" "cf" "bind.tar.gz"
                                      "bind-9.9.5-P1"
                                      ;; avoid non-determinism in the archive
+                                     "--sort=name"
                                      "--mtime=@0"
                                      "--owner=root:0"
                                      "--group=root:0"))))
@@ -689,10 +704,10 @@ commands and their arguments.")
     ;; See <http://www.sudo.ws/sudo/license.html>.
     (license license:x11)))
 
-(define-public wpa-supplicant-light
+(define-public wpa-supplicant-minimal
   (package
-    (name "wpa-supplicant-light")
-    (version "2.4")
+    (name "wpa-supplicant-minimal")
+    (version "2.5")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -701,17 +716,7 @@ commands and their arguments.")
                     ".tar.gz"))
               (sha256
                (base32
-                "08li21q1wjn5chrv289w666il9ah1w419y3dkq2rl4wnq0rci385"))
-              (patches
-               (map search-patch '("wpa-supplicant-CVE-2015-1863.patch"
-                                   "wpa-supplicant-2015-2-fix.patch"
-                                   "wpa-supplicant-2015-3-fix.patch"
-                                   "wpa-supplicant-2015-4-fix-pt1.patch"
-                                   "wpa-supplicant-2015-4-fix-pt2.patch"
-                                   "wpa-supplicant-2015-4-fix-pt3.patch"
-                                   "wpa-supplicant-2015-4-fix-pt4.patch"
-                                   "wpa-supplicant-2015-4-fix-pt5.patch"
-                                   "wpa-supplicant-2015-5-fix.patch")))))
+                "05mkp5bx1c3z7h5biddsv0p49gkrq9ksany3anp4wdiv92p5prfc"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-replace
@@ -781,12 +786,12 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
     (license license:bsd-3)))
 
 (define-public wpa-supplicant
-  (package (inherit wpa-supplicant-light)
+  (package (inherit wpa-supplicant-minimal)
     (name "wpa-supplicant")
     (inputs `(("dbus" ,dbus)
-              ,@(package-inputs wpa-supplicant-light)))
+              ,@(package-inputs wpa-supplicant-minimal)))
     (arguments
-     (substitute-keyword-arguments (package-arguments wpa-supplicant-light)
+     (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
        ((#:phases phases)
         `(alist-cons-after
           'configure 'configure-for-dbus
@@ -1130,3 +1135,83 @@ degradation and failure.")
      "fdupes is a program for identifying duplicate files residing within
 specified directories.")
     (license license:expat)))
+
+(define-public graphios
+  (package
+   (name "graphios")
+   (version "2.0.3")
+   (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+            "https://pypi.python.org/packages/source/g/graphios/graphios-"
+            version ".tar.gz"))
+      (sha256
+       (base32
+        "1h87hvc315wg6lklbf4l7csd3n5pgljwrfli1p3nasdi0izgn66i"))))
+   (build-system python-build-system)
+   (arguments
+    ;; Be warned: Building with Python 3 succeeds, but the build process
+    ;; throws a syntax error that is ignored.
+    `(#:python ,python-2
+      #:phases
+      (modify-phases %standard-phases
+        (add-before 'build 'fix-setup.py
+          (lambda* (#:key outputs #:allow-other-keys)
+            ;; Fix hardcoded, unprefixed file names.
+            (let ((out (assoc-ref outputs "out")))
+              (substitute* '("setup.py")
+                (("/etc") (string-append out "/etc"))
+                (("/usr") out)
+                (("distro_ver = .*") "distro_ver = ''"))
+              #t))))))
+   (inputs
+    `(("python-setuptools" ,python2-setuptools)))
+   (home-page "https://github.com/shawn-sterling/graphios")
+   (synopsis "Emit Nagios metrics to Graphite, Statsd, and Librato")
+   (description
+    "Graphios is a script to emit nagios perfdata to various upstream metrics
+processing and time-series systems.  It's currently compatible with Graphite,
+Statsd, Librato and InfluxDB.  Graphios can emit Nagios metrics to any number
+of supported upstream metrics systems simultaneously.")
+   (license license:gpl2+)))
+
+(define-public ansible
+  (package
+    (name "ansible")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://pypi.python.org/packages/source/a/ansible/ansible-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "007fzgsqaahb0y4gjdxxmir9kcni7wph2z14jhqgpz88idrz8pn2"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)
+       ("python2-pycrypto" ,python2-pycrypto)
+       ("python2-httplib2" ,python2-httplib2)
+       ("python2-passlib" ,python2-passlib)
+       ("python2-nose" ,python2-nose)
+       ("python2-mock" ,python2-mock)
+       ("python2-jinja2" ,python2-jinja2)
+       ("python2-pyyaml" ,python2-pyyaml)
+       ("python2-paramiko" ,python2-paramiko)))
+    (inputs
+     `(("python2-pycrypto" ,python2-pycrypto)
+       ("python2-jinja2" ,python2-jinja2)
+       ("python2-pyyaml" ,python2-pyyaml)
+       ("python2-paramiko" ,python2-paramiko)))
+    (arguments
+     `(#:python ,python-2)) ; incompatible with Python 3
+    (home-page "http://ansible.com/")
+    (synopsis "Radically simple IT automation")
+    (description "Ansible is a radically simple IT automation system.  It
+handles configuration-management, application deployment, cloud provisioning,
+ad-hoc task-execution, and multinode orchestration - including trivializing
+things like zero downtime rolling updates with load balancers.")
+    (license license:gpl3+)))