From 6876a6fe53a63b986a1e061e07c4c378a9da95c9 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Sun, 25 Jun 2017 22:40:36 +0800 Subject: gnu: Add ebtables. * gnu/packages/linux.scm (ebtables): New package. --- gnu/packages/linux.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9ba35a0a1e..e826520c5c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1093,6 +1093,61 @@ package also includes ip6tables. ip6tables is used for configuring the IPv6 packet filter.") (license license:gpl2+))) +(define-public ebtables + (package + (name "ebtables") + (version "2.0.10-4") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://netfilter.org/ebtables/ebtables-v" + version ".tar.gz")) + (sha256 + (base32 + "0pa5ljlk970yfyhpf3iqwfpbc30j8mgn90fapw9cfz909x47nvyw")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no test suite + #:make-flags + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/sbin")) + (lib (string-append out "/lib")) + (man (string-append out "/share/man")) + (iptables (assoc-ref %build-inputs "iptables")) + (ethertypes (string-append iptables "/etc/ethertypes"))) + (list (string-append "LIBDIR=" lib) + (string-append "MANDIR=" man) + (string-append "BINDIR=" bin) + (string-append "ETHERTYPESFILE=" ethertypes) + ;; With the default CFLAGS, it falis with: + ;; communication.c:259:58: error: variable ‘ret’ set but not + ;; used [-Werror=unused-but-set-variable] + "CFLAGS=-Wall")) + #:phases + (modify-phases %standard-phases + (replace 'configure + ;; no configure script + (lambda _ + (substitute* "Makefile" + ;; Remove user and group options from install commands, + ;; otherwise it fails with: invalid user 'root'. + (("-o root -g root") "") + ;; Remove 'ethertypes' from the install target. + (("install: .*") + "install: $(MANDIR)/man8/ebtables.8 exec scripts\n")) + #t))))) + (inputs + `(("perl" ,perl) + ("iptables" ,iptables))) + (synopsis "Ethernet bridge frame table administration") + (home-page "http://ebtables.netfilter.org/") + (description + "ebtables is an application program used to set up and maintain the +tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is +analogous to the iptables application, but less complicated, due to the fact +that the Ethernet protocol is much simpler than the IP protocol.") + (license license:gpl2+))) + (define-public iproute (package (name "iproute2") -- cgit v1.2.3