gnu: Add graphios.
[jackhill/guix/guix.git] / gnu / packages / admin.scm
index c85204f..1066d39 100644 (file)
@@ -29,6 +29,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)
@@ -40,8 +41,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages compression)
-  #:use-module ((gnu packages openssl) #:prefix o:)
-  #:use-module (gnu packages gnutls)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages flex)
@@ -55,7 +55,8 @@
   #:use-module (gnu packages libftdi)
   #:use-module (gnu packages image)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages python))
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages man))
 
 (define-public dmd
   (package
@@ -151,14 +152,14 @@ re-executing them as necessary.")
 (define-public inetutils
   (package
     (name "inetutils")
-    (version "1.9.2")
+    (version "1.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/inetutils/inetutils-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "04wrm0v7l4890mmbaawd6wjwdv08bkglgqhpz0q4dkb0l50fl8q4"))))
+               "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
     (build-system gnu-build-system)
     (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
                  ;; which is currently missing.
@@ -317,7 +318,7 @@ allow automatic login and starting any app.")
     (description
      "This package provides the /etc/services, /etc/protocols, and /etc/rpc
 files, which contain information about the IANA-assigned port, protocol, and
-ONC RPC numbers")
+ONC RPC numbers.")
     (home-page "http://packages.debian.org/sid/netbase")
     (license license:gpl2)))
 
@@ -412,7 +413,11 @@ connection alive.")
                      (for-each patch-shebang
                                (find-files "bind-9.9.5-P1" ".*"))
                      (zero? (system* "tar" "cf" "bind.tar.gz"
-                                     "bind-9.9.5-P1"))))
+                                     "bind-9.9.5-P1"
+                                     ;; avoid non-determinism in the archive
+                                     "--mtime=@0"
+                                     "--owner=root:0"
+                                     "--group=root:0"))))
                  (alist-cons-after
                   'install 'post-install
                   (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -476,7 +481,8 @@ tools: server, client, and relay agent.")
                 "14wyjywrdi1ikaj6yc9c72m6m2r64z94lb0gm7k1a3q6q5cj3scs"))))
     (build-system gnu-build-system)
     (native-inputs `(("bison" ,bison) ("flex" ,flex)))
-    (arguments '(#:tests? #f))                    ; no 'check' target
+    (arguments '(#:configure-flags '("--with-pcap=linux")
+                 #:tests? #f))                    ; no 'check' target
     (home-page "http://www.tcpdump.org")
     (synopsis "Network packet capture library")
     (description
@@ -500,7 +506,7 @@ network statistics collection, security monitoring, network debugging, etc.")
                 "15hb7zkzd66nag102qbv100hcnf7frglbkylmr8adwr8f5jkkaql"))))
     (build-system gnu-build-system)
     (inputs `(("libpcap" ,libpcap)
-              ("openssl" ,o:openssl)))
+              ("openssl" ,openssl)))
     (native-inputs `(("perl" ,perl)))        ; for tests
     (home-page "http://www.tcpdump.org/")
     (synopsis "Network packet analyzer")
@@ -687,7 +693,7 @@ commands and their arguments.")
 (define-public wpa-supplicant-light
   (package
     (name "wpa-supplicant-light")
-    (version "2.3")
+    (version "2.4")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -696,7 +702,17 @@ commands and their arguments.")
                     ".tar.gz"))
               (sha256
                (base32
-                "0skvkl6c10ls4s48b2wmf47h9j1y40nlzxnzn8hyaw2j0prmpapa"))))
+                "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")))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases (alist-replace
@@ -783,7 +799,15 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
       CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
               (close-port port))
             #t)
-          ,phases))))))
+          (alist-cons-after
+           'install-man-pages 'install-dbus-conf
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (dir (string-append out "/etc/dbus-1/system.d")))
+               (mkdir-p dir)
+               (copy-file "dbus/dbus-wpa_supplicant.conf"
+                          (string-append dir "/wpa_supplicant.conf"))))
+           ,phases)))))))
 
 (define-public wakelan
   (package
@@ -856,7 +880,7 @@ module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
 (define-public acpica
   (package
     (name "acpica")
-    (version "20140724")
+    (version "20150410")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -864,7 +888,7 @@ module slots, and the list of I/O ports (e.g. serial, parallel, USB).")
                     version ".tar.gz"))
               (sha256
                (base32
-                "01vdgrh7dsxrrvg5yd8sxm63cw8210pnsi5qg9g15ac53gn243ac"))))
+                "0q1fjwkyw9x6gsva6fd0zbn7ly4fx0ha4853f416np9kf2irillw"))))
     (build-system gnu-build-system)
     (native-inputs `(("flex" ,flex)
                      ("bison" ,bison)))
@@ -934,7 +958,7 @@ system is under heavy load.")
                                            (assoc-ref %build-inputs "popt")))
        #:tests? #f))                    ;no 'check' target
     (home-page "http://detox.sourceforge.net")
-    (synopsis "Clean up filenames")
+    (synopsis "Clean up file names")
     (description
      "Detox is a program that renames files to make them easier to work with
 under Unix and related operating systems.  Spaces and various other unsafe
@@ -957,7 +981,7 @@ characters can be replaced as well, as can UTF-8 characters.")
     (inputs
      `(;; ("ntfs" ,ntfs)
        ("util-linux" ,util-linux)
-       ("openssl" ,o:openssl)
+       ("openssl" ,openssl)
        ("zlib" ,zlib)
        ("e2fsprogs" ,e2fsprogs)
        ("libjpeg" ,libjpeg)
@@ -1081,3 +1105,69 @@ Technology System (S.M.A.R.T.) built into most modern ATA and SCSI harddisks.
 In many cases, these utilities will provide advanced warning of disk
 degradation and failure.")
     (license license:gpl2+)))
+
+(define-public fdupes
+  (package
+    (name "fdupes")
+    (version "1.51")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/adrianlopezroche/fdupes/archive/fdupes-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "11j96vxl9vg3jsnxqxskrv3gad6dh7hz2zpyc8n31xzyxka1c7kn"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (alist-delete 'configure %standard-phases)
+       #:tests? #f ; no 'check' target
+       #:make-flags (list (string-append "PREFIX="
+                                         (assoc-ref %outputs "out")))))
+    (home-page "https://github.com/adrianlopezroche/fdupes")
+    (synopsis "Identify duplicate files")
+    (description
+     "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+)))