From 934488ccd38437f23a5c2c36d4633d2cfc0740cc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 15 Jun 2013 23:33:56 +0200 Subject: gnu: linux-libre-headers: Allow cross-compilation. * gnu/packages/linux.scm (linux-libre-headers): Use (guix build gnu-cross-build) and %standard-cross-phases when cross-compiling. --- gnu/packages/linux.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/packages/linux.scm') diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 0708b5cb81..9cd5de82c0 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -78,12 +78,18 @@ (arguments `(#:modules ((guix build gnu-build-system) (guix build utils) - (srfi srfi-1)) + (srfi srfi-1) + ,@(if (%current-target-system) + '((guix build gnu-cross-build)) + '())) #:phases (alist-replace 'build ,(build-phase (%current-system)) (alist-replace 'install ,install-phase - (alist-delete 'configure %standard-phases))) + (alist-delete 'configure + ,(if (%current-target-system) + '%standard-cross-phases + '%standard-phases)))) #:tests? #f)) (synopsis "GNU Linux-Libre kernel headers") (description "Headers of the Linux-Libre kernel.") -- cgit v1.2.3 From 10afdf506166e028dfb48d56d1f3bff3155b90f8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 17 Jun 2013 22:33:35 +0200 Subject: gnu: Add iptables. * gnu/packages/linux.scm (iptables): New variable. --- gnu/packages/linux.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/linux.scm') diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9cd5de82c0..770dd6c5a7 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -455,3 +455,28 @@ trace of all the system calls made by a another process/program.") "The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux-based operating system.") (license lgpl2.1+))) + +(define-public iptables + (package + (name "iptables") + (version "1.4.16.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.netfilter.org/projects/iptables/files/iptables-" + version ".tar.bz2")) + (sha256 + (base32 + "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24")))) + (build-system gnu-build-system) + (arguments '(#:tests? #f)) ; no test suite + (home-page "http://www.netfilter.org/projects/iptables/index.html") + (synopsis "Program to configure the Linux IP packet filtering rules") + (description + "iptables is the userspace command line program used to configure the +Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards +system administrators. Since Network Address Translation is also configured +from the packet filter ruleset, iptables is used for this, too. The iptables +package also includes ip6tables. ip6tables is used for configuring the IPv6 +packet filter.") + (license gpl2+))) -- cgit v1.2.3 From 90a0048f5e1ac161fb7a32b361fe35564caabaf9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 17 Jun 2013 23:53:42 +0200 Subject: gnu: Add Linux iproute2. * gnu/packages/bdb.scm (bdb): Add `--enable-compat185'. * gnu/packages/linux.scm (iproute): New variable. --- gnu/packages/bdb.scm | 6 ++++- gnu/packages/linux.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) (limited to 'gnu/packages/linux.scm') diff --git a/gnu/packages/bdb.scm b/gnu/packages/bdb.scm index 9a626b17d7..75a2b72b44 100644 --- a/gnu/packages/bdb.scm +++ b/gnu/packages/bdb.scm @@ -45,7 +45,11 @@ (system* "./dist/configure" (string-append "--prefix=" out) (string-append "CONFIG_SHELL=" (which "bash")) - (string-append "SHELL=" (which "bash")))))) + (string-append "SHELL=" (which "bash")) + + ;; The compatibility mode is needed by some packages, + ;; notably iproute2. + "--enable-compat185")))) %standard-phases))) (synopsis "db, the Berkeley database") (description diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 770dd6c5a7..0bc9fbcb5e 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -23,8 +23,10 @@ #:use-module ((gnu packages compression) #:renamer (symbol-prefix-proc 'guix:)) #:use-module (gnu packages flex) + #:use-module (gnu packages bison) #:use-module (gnu packages libusb) #:use-module (gnu packages ncurses) + #:use-module (gnu packages bdb) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (guix packages) @@ -480,3 +482,63 @@ from the packet filter ruleset, iptables is used for this, too. The iptables package also includes ip6tables. ip6tables is used for configuring the IPv6 packet filter.") (license gpl2+))) + +(define-public iproute + (package + (name "iproute2") + (version "3.8.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://kernel.org/linux/utils/net/iproute2/iproute2-" + version ".tar.xz")) + (sha256 + (base32 + "0kqy30wz2krbg4y7750hjq5218hgy2vj9pm5qzkn1bqskxs4b4ap")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test suite + #:make-flags (let ((out (assoc-ref %outputs "out"))) + (list "DESTDIR=" + (string-append "LIBDIR=" out "/lib") + (string-append "SBINDIR=" out "/sbin") + (string-append "CONFDIR=" out "/etc") + (string-append "DOCDIR=" out "/share/doc/" + ,name "-" ,version) + (string-append "MANDIR=" out "/share/man"))) + #:phases (alist-cons-before + 'install 'pre-install + (lambda _ + ;; Don't attempt to create /var/lib/arpd. + (substitute* "Makefile" + (("^.*ARPDDIR.*$") ""))) + %standard-phases))) + (inputs + `(("iptables" ,iptables) + ("db4" ,bdb) + ("pkg-config" ,pkg-config) + ("flex" ,flex) + ("bison" ,bison))) + (home-page + "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2") + (synopsis + "A collection of utilities for controlling TCP/IP networking and traffic control in Linux") + (description + "Iproute2 is a collection of utilities for controlling TCP/IP +networking and traffic with the Linux kernel. + +Most network configuration manuals still refer to ifconfig and route as the +primary network configuration tools, but ifconfig is known to behave +inadequately in modern network environments. They should be deprecated, but +most distros still include them. Most network configuration systems make use +of ifconfig and thus provide a limited feature set. The /etc/net project aims +to support most modern network technologies, as it doesn't use ifconfig and +allows a system administrator to make use of all iproute2 features, including +traffic control. + +iproute2 is usually shipped in a package called iproute or iproute2 and +consists of several tools, of which the most important are ip and tc. ip +controls IPv4 and IPv6 configuration and tc stands for traffic control. Both +tools print detailed usage messages and are accompanied by a set of +manpages.") + (license gpl2+))) -- cgit v1.2.3