;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
+;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages gcc)
#:use-module (gnu packages flex)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages gperf)
#:use-module (gnu packages libusb)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages slang)
#:use-module (gnu packages algebra)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages rrdtool)
#:use-module (gnu packages elf)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages docbook)
+ #:use-module (gnu packages asciidoc)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#f)))
(define-public linux-libre
- (let* ((version "3.18.1")
+ (let* ((version "3.18.7")
(build-phase
'(lambda* (#:key system inputs #:allow-other-keys #:rest args)
;; Apply the neat patch.
(uri (linux-libre-urls version))
(sha256
(base32
- "0yj6sz9cvsbhrc9jksr4wgg63crzmqh65903l7bq9k0gz1f3x1s8"))))
+ "113r2dzmiwlchp5b3hyjyx91jysx5j4hhxjw45gaky5nj9pax2rh"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl)
("bc" ,bc)
(define-public util-linux
(package
(name "util-linux")
- (version "2.21")
+ (version "2.25.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/linux/utils/"
- name "/v" version "/"
- name "-" version ".2" ".tar.xz"))
+ name "/v" (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
(sha256
(base32
- "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
- (patches (list (search-patch "util-linux-perl.patch")))
+ "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0"))
+ (patches (list (search-patch "util-linux-tests.patch")))
(modules '((guix build utils)))
(snippet
- ;; We take the 'logger' program from GNU Inetutils, so remove
- ;; it from here.
- '(substitute* "misc-utils/Makefile.in"
- (("PROGRAMS =(.*) logger(.*)" _ before after)
- (string-append "PROGRAMS =" before " " after))
- (("MANS =(.*) logger\\.1(.*)" _ before after)
- (string-append "MANS =" before " " after))))))
+ ;; We take the 'logger' program from GNU Inetutils and 'kill'
+ ;; from GNU Coreutils.
+ '(substitute* "configure"
+ (("build_logger=yes") "build_logger=no")
+ (("build_kill=yes") "build_kill=no")))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-use-tty-group"
"--enable-ddate")
- #:phases (alist-cons-after
- 'install 'patch-chkdupexe
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* (string-append out "/bin/chkdupexe")
- ;; Allow 'patch-shebang' to do its work.
- (("@PERL@") "/bin/perl"))))
+ #:phases (alist-cons-before
+ 'check 'pre-check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (net (assoc-ref inputs "net-base")))
+ ;; Change the test to refer to the right file.
+ (substitute* "tests/ts/misc/mcookie"
+ (("/etc/services")
+ (string-append net "/etc/services")))
+ #t))
%standard-phases)))
(inputs `(("zlib" ,guix:zlib)
("ncurses" ,ncurses)))
(native-inputs
- `(("perl" ,perl)))
+ `(("perl" ,perl)
+ ("net-base" ,net-base))) ;for tests
(home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
(synopsis "Collection of utilities for the Linux kernel")
(description
(build-system gnu-build-system)
(inputs `(("ncurses" ,ncurses)))
(arguments
- '(#:phases (alist-replace
+ '(#:modules ((guix build utils)
+ (guix build gnu-build-system)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:phases (alist-replace
'configure
(lambda* (#:key outputs #:allow-other-keys)
;; No `configure', just a single Makefile.
(system* "make" "install"
(string-append "DESTDIR=" out)))
+ ;; Remove commands and man pages redundant with
+ ;; Coreutils.
+ (let ((dup (append-map (cut find-files out <>)
+ '("^kill" "^uptime"))))
+ (for-each delete-file dup)
+ #t)
+
;; Sanity check.
(zero?
(system* (string-append out "/bin/ps")
(define-public e2fsprogs
(package
(name "e2fsprogs")
- (version "1.42.7")
+ (version "1.42.11")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
version ".tar.gz"))
(sha256
(base32
- "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
+ "0xhbj7494g3y2w2miyrzdz6nciaffxajrs6wqm73yp4jnrqagn2b"))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "MCONFIG.in"
+ (("INSTALL_SYMLINK = /bin/sh")
+ "INSTALL_SYMLINK = sh")))))
(build-system gnu-build-system)
(inputs `(("util-linux" ,util-linux)))
(native-inputs `(("pkg-config" ,pkg-config)
- ("texinfo" ,texinfo))) ; for the libext2fs Info manual
+ ("texinfo" ,texinfo))) ;for the libext2fs Info manual
(arguments
- '(;; The 'blkid' command and library are already provided by util-linux,
- ;; which is the preferred source for them (see, e.g.,
+ '(;; util-linux is not the preferred source for some of the libraries and
+ ;; commands, so disable them (see, e.g.,
;; <http://git.buildroot.net/buildroot/commit/?id=e1ffc2f791b336339909c90559b7db40b455f172>.)
- #:configure-flags '("--disable-blkid")
+ #:configure-flags '("--disable-libblkid"
+ "--disable-libuuid" "--disable-uuidd"
+ "--disable-fsck"
+
+ ;; Install libext2fs et al.
+ "--enable-elf-shlibs")
+
+ #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
+ (assoc-ref %outputs "out")
+ "/lib"))
#:phases (alist-cons-before
'configure 'patch-shells
(substitute* (find-files "." "^Makefile.in$")
(("#!/bin/sh")
(string-append "#!" (which "sh")))))
- %standard-phases)
+ (alist-cons-after
+ 'install 'install-libs
+ (lambda _
+ (zero? (system* "make" "install-libs")))
+ %standard-phases))
;; FIXME: Tests work by comparing the stdout/stderr of programs, that
;; they fail because we get an extra line that says "Can't check if
lgpl2.0 ; libext2fs
x11)))) ; libuuid
+(define e2fsprogs/static
+ (static-package
+ (package (inherit e2fsprogs)
+ (arguments
+ ;; Do not build shared libraries.
+ (substitute-keyword-arguments (package-arguments e2fsprogs)
+ ((#:configure-flags _)
+ '(list "--disable-blkid"))
+ ((#:make-flags _)
+ '(list)))))))
+
(define-public e2fsck/static
(package
(name "e2fsck-static")
(remove-store-references file)
(chmod file #o555))
(scandir source (cut string-prefix? "fsck." <>))))))))
- (inputs `(("e2fsprogs" ,(static-package e2fsprogs))))
+ (inputs `(("e2fsprogs" ,e2fsprogs/static)))
(synopsis "Statically-linked fsck.* commands from e2fsprogs")
(description
"This package provides statically-linked command of fsck.ext[234] taken
(home-page (package-home-page e2fsprogs))
(license (package-license e2fsprogs))))
+(define-public zerofree
+ (package
+ (name "zerofree")
+ (version "1.0.3")
+ (home-page "http://intgat.tigress.co.uk/rmy/uml/")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append home-page name "-" version
+ ".tgz"))
+ (sha256
+ (base32
+ "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "zerofree"
+ (string-append bin "/zerofree"))
+ (chmod (string-append bin "/zerofree")
+ #o555)
+ #t))
+ (alist-delete 'configure %standard-phases))
+ #:tests? #f)) ;no tests
+ (inputs `(("libext2fs" ,e2fsprogs)))
+ (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
+ (description
+ "The zerofree command scans the free blocks in an ext2 file system and
+fills any non-zero blocks with zeroes. This is a useful way to make disk
+images more compressible.")
+ (license gpl2)))
+
(define-public strace
(package
(name "strace")
trace of all the system calls made by a another process/program.")
(license bsd-3)))
+(define-public ltrace
+ (package
+ (name "ltrace")
+ (version "0.7.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.ltrace.org/ltrace_" version
+ ".orig.tar.bz2"))
+ (sha256
+ (base32
+ "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf"))))
+ (build-system gnu-build-system)
+ (inputs `(("libelf" ,libelf)))
+ (arguments
+ ;; Compilation uses -Werror by default, but it fails.
+ '(#:configure-flags '("--disable-werror")))
+ (home-page "http://www.ltrace.org/")
+ (synopsis "Library call tracer for Linux")
+ (description
+ "ltrace intercepts and records dynamic library calls which are called by
+an executed process and the signals received by that process. It can also
+intercept and print the system calls executed by the program.")
+ (license gpl2+)))
+
(define-public alsa-lib
(package
(name "alsa-lib")
(list (search-patch "net-tools-bitrot.patch")))))
(build-system gnu-build-system)
(arguments
- '(#:phases (alist-cons-after
+ '(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:phases (alist-cons-after
'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys)
(define (apply-patch file)
(format #t "applying Debian patch set '~a'...~%"
patch.gz)
(system (string-append "gunzip < " patch.gz " > the-patch"))
- (pk 'here)
(and (apply-patch "the-patch")
(for-each apply-patch
(find-files "debian/patches"
;; definition.
(substitute* '("config.make" "config.h")
(("^.*HAVE_AFDECnet.*$") ""))))
- %standard-phases))
+ (alist-cons-after
+ 'install 'remove-redundant-commands
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Remove commands and man pages redundant with
+ ;; Inetutils.
+ (let* ((out (assoc-ref outputs "out"))
+ (dup (append-map (cut find-files out <>)
+ '("^hostname"
+ "^(yp|nis|dns)?domainname"))))
+ (for-each delete-file dup)
+ #t))
+ %standard-phases)))
;; Binaries that depend on libnet-tools.a don't declare that
;; dependency, making it parallel-unsafe.
(define-public libnl
(package
(name "libnl")
- (version "3.2.13")
+ (version "3.2.25")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.gz"))
(sha256
(base32
- "1ydw42lsd572qwrfgws97n76hyvjdpanwrxm03lysnhfxkna1ssd"))))
+ "1icfrv8yihcb74as1gcgmp0wfpdq632q2zvbvqqvjms9cy87bswb"))))
(build-system gnu-build-system)
(native-inputs `(("flex" ,flex) ("bison" ,bison)))
(home-page "http://www.infradead.org/~tgr/libnl/")
;; 'nl-addr-add.c'), so the result is GPLv2-only.
(license gpl2)))
+(define-public iw
+ (package
+ (name "iw")
+ (version "3.17")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://www.kernel.org/pub/software/network/iw/iw-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "14zsapqhivk0ws5z21y1ys2c2czi05mzk7bl2yb7qxcfrnsjx9j8"))))
+ (build-system gnu-build-system)
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("libnl" ,libnl)))
+ (arguments
+ `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ "CC=gcc")
+ #:phases (alist-delete 'configure %standard-phases)))
+ (home-page "http://wireless.kernel.org/en/users/Documentation/iw")
+ (synopsis "Tool for configuring wireless devices")
+ (description
+ "iw is a new nl80211 based CLI configuration utility for wireless
+devices. It replaces 'iwconfig', which is deprecated.")
+ (license isc)))
+
(define-public powertop
(package
(name "powertop")
from the module-init-tools project.")
(license gpl2+))) ; library under lgpl2.1+
-(define-public udev
- ;; The last pre-systemd version.
- (package
- (name "udev")
- (version "182")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "mirror://kernel.org/linux/utils/kernel/hotplug/udev-"
- version ".tar.xz"))
- (sha256
- (base32
- "1awp7p07gi083w0dwqhhbbas68a7fx2sbm1yf1ip2jwf7cpqkf5d"))
- (patches (list (search-patch "udev-gir-libtool.patch")))))
- (build-system gnu-build-system)
- (arguments
- `(#:configure-flags (list (string-append
- "--with-pci-ids-path="
- (assoc-ref %build-inputs "pciutils")
- "/share/pci.ids.gz")
-
- "--with-firmware-path=/no/firmware"
-
- ;; Work around undefined reference to
- ;; 'mq_getattr' in sc-daemon.c.
- "LDFLAGS=-lrt")))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("gperf" ,gperf)
- ("glib" ,glib "bin") ; glib-genmarshal, etc.
- ("perl" ,perl) ; for the tests
- ("python" ,python-2))) ; ditto
- (inputs
- `(("kmod" ,kmod)
- ("pciutils" ,pciutils)
- ("usbutils" ,usbutils)
- ("util-linux" ,util-linux)
- ("glib" ,glib)
- ("gobject-introspection" ,gobject-introspection)))
- (home-page "http://www.freedesktop.org/software/systemd/libudev/")
- (synopsis "Userspace device management")
- (description "Udev is a daemon which dynamically creates and removes
-device nodes from /dev/, handles hotplug events and loads drivers at boot
-time.")
- (license gpl2+))) ; libudev is under lgpl2.1+
-
(define-public eudev
;; The post-systemd fork, maintained by Gentoo.
- (package (inherit udev)
+ (package
(name "eudev")
- (version "1.10")
+ (version "2.1.1")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.gz"))
(sha256
(base32
- "1l907bvz6dcykvaq8d4iklvfpb9fyrnh1a29g3c28gkx2hlyn7j0"))
+ "0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"))
(patches (list (search-patch "eudev-rules-directory.patch")))
(modules '((guix build utils)))
(snippet
'(substitute* "configure"
(("linux/btrfs\\.h")
"")))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gperf" ,gperf)
+ ("glib" ,glib "bin") ; glib-genmarshal, etc.
+ ("perl" ,perl) ; for the tests
+ ("python" ,python-2))) ; ditto
+ (inputs
+ `(("kmod" ,kmod)
+ ("pciutils" ,pciutils)
+ ("usbutils" ,usbutils)
+ ("util-linux" ,util-linux)
+ ("glib" ,glib)
+ ("gobject-introspection" ,gobject-introspection)))
(arguments
- (substitute-keyword-arguments (package-arguments udev)
- ((#:configure-flags flags)
- `(cons "--enable-libkmod" ,flags))))
- (home-page "http://www.gentoo.org/proj/en/eudev/")))
+ `(#:configure-flags (list "--enable-libkmod"
+
+ (string-append
+ "--with-pci-ids-path="
+ (assoc-ref %build-inputs "pciutils")
+ "/share/pci.ids.gz")
+
+ "--with-firmware-path=/no/firmware"
+
+ ;; Work around undefined reference to
+ ;; 'mq_getattr' in sc-daemon.c.
+ "LDFLAGS=-lrt")
+ #:phases
+ (alist-cons-before
+ 'build 'pre-build
+ ;; The program 'g-ir-scanner' (part of the package
+ ;; 'gobject-introspection'), to generate .gir files, makes some
+ ;; library pre-processing. During that phase it looks for the C
+ ;; compiler as either 'cc' or as defined by the environment variable
+ ;; 'CC' (with code in 'giscanner/dumper.py').
+ (lambda* _
+ (setenv "CC" "gcc"))
+ %standard-phases)))
+ (home-page "http://www.gentoo.org/proj/en/eudev/")
+ (synopsis "Userspace device management")
+ (description "Udev is a daemon which dynamically creates and removes
+device nodes from /dev/, handles hotplug events and loads drivers at boot
+time.")
+ (license gpl2+)))
(define-public lvm2
(package
`(("pkg-config" ,pkg-config)
("procps" ,procps))) ;tests use 'pgrep'
(inputs
- `(("udev" ,udev)))
+ `(("udev" ,eudev)))
(arguments
'(#:phases (alist-cons-after
'configure 'set-makefile-shell
%standard-phases)
#:tests? #f))
(synopsis "Tools for manipulating Linux Wireless Extensions")
- (description "Wireless Tools are used to manipulate the Linux Wireless
-Extensions. The Wireless Extension is an interface allowing you to set
-Wireless LAN specific parameters and get the specific stats.")
+ (description "Wireless Tools are used to manipulate the now-deprecated
+Linux Wireless Extensions; consider using 'iw' instead. The Wireless
+Extension was an interface allowing you to set Wireless LAN specific
+parameters and get the specific stats. It is deprecated in favor the nl80211
+interface.")
(home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
(license gpl2+)))
It works with most newer systems.")
(license gpl2+)))
+(define-public i2c-tools
+ (package
+ (name "i2c-tools")
+ (version "3.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "000pvg995qy1b15ks59gd0klri55hb33kqpg5czy84hw1pbdgm0l"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no 'check' target
+ #:make-flags (list (string-append "prefix=" %output)
+ "CC=gcc")
+ ;; no configure script
+ #:phases (alist-delete 'configure %standard-phases)))
+ (home-page "http://www.lm-sensors.org/wiki/I2CTools")
+ (synopsis "I2C tools for Linux")
+ (description
+ "The i2c-tools package contains a heterogeneous set of I2C tools for
+Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers,
+EEPROM decoding scripts, EEPROM programming tools, and a python module for
+SMBus access.")
+ (license gpl2+)))
+
(define-public xsensors
(package
(name "xsensors")
%standard-phases)
#:make-flags (list (string-append "DESTDIR="
(assoc-ref %outputs "out"))
- "WERROR=0")
+ "WERROR=0"
+
+ ;; By default, 'config/Makefile' uses lib64 on
+ ;; x86_64. Work around that.
+ "lib=lib")
#:tests? #f)) ;no tests
(native-inputs
`(("pkg-config" ,pkg-config)
("perl" ,perl)
("python" ,python-2)))
(inputs
- `(;; ("slang" ,slang)
+ `(("slang" ,slang) ;for the interactive TUI
;; ("newt" ,newt)
+ ("python" ,python-2) ;'perf' links against libpython
("elfutils" ,elfutils)
- ;; FIXME: Documentation.
- ;; ("libxslt" ,libxslt)
- ;; ("docbook-xml" ,docbook-xml)
- ;; ("docbook-xsl" ,docbook-xsl)
- ;; ("xmlto" ,xmlto)
- ;; ("asciidoc" ,asciidoc)
- ))
+ ;; Documentation.
+ ("libxml2" ,libxml2) ;for $XML_CATALOG_FILES
+ ("libxslt" ,libxslt)
+ ("docbook-xml" ,docbook-xml)
+ ("docbook-xsl" ,docbook-xsl)
+ ("xmlto" ,xmlto)
+ ("asciidoc" ,asciidoc)))
(home-page "https://perf.wiki.kernel.org/")
(synopsis "Linux profiling with performance counters")
(description
similar in functionality to chroot, although pflask provides better isolation
thanks to the use of namespaces.")
(license bsd-2)))
+
+(define-public hdparm
+ (package
+ (name "hdparm")
+ (version "9.45")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/" name "/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0sc6yf3k6sd7n6a2ig2my9fjlqpak3znlyw7jw4cz5d9asm1rc13"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (let ((out (assoc-ref %outputs "out")))
+ (list (string-append "binprefix=" out)
+ (string-append "manprefix=" out)
+ "CC=gcc"))
+ #:phases (alist-delete 'configure %standard-phases)
+ #:tests? #f)) ; no test suite
+ (home-page "http://sourceforge.net/projects/hdparm/")
+ (synopsis "tune hard disk parameters for high performance")
+ (description
+ "Get/set device parameters for Linux SATA/IDE drives. It's primary use
+is for enabling irq-unmasking and IDE multiplemode.")
+ (license (bsd-style "file://LICENSE.TXT"))))
+
+(define-public acpid
+ (package
+ (name "acpid")
+ (version "2.0.23")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/acpid2/acpid-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1vl7c6vc724v4jwki17czgj6lnrknnj1a6llm8gkl32i2gnam5j3"))))
+ (build-system gnu-build-system)
+ (home-page "http://sourceforge.net/projects/acpid2/")
+ (synopsis "Daemon for delivering ACPI events to user-space programs")
+ (description
+ "acpid is designed to notify user-space programs of Advanced
+Configuration and Power Interface (ACPI) events. acpid should be started
+during the system boot, and will run as a background process. When an ACPI
+event is received from the kernel, acpid will examine the list of rules
+specified in /etc/acpi/events and execute the rules that match the event.")
+ (license gpl2+)))