diff options
author | 宋文武 <iyzsong@member.fsf.org> | 2017-06-25 22:40:36 +0800 |
---|---|---|
committer | 宋文武 <iyzsong@member.fsf.org> | 2017-06-26 00:11:41 +0800 |
commit | 6876a6fe53a63b986a1e061e07c4c378a9da95c9 (patch) | |
tree | bc049ea9da96f90c47b620ed3f690dacd64c28c3 /gnu/packages/linux.scm | |
parent | a4b9392151cde04a0145df79ecad2eb4e5e7c517 (diff) | |
download | guix-6876a6fe53a63b986a1e061e07c4c378a9da95c9.tar.gz |
gnu: Add ebtables.
* gnu/packages/linux.scm (ebtables): New package.
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r-- | gnu/packages/linux.scm | 55 |
1 files changed, 55 insertions, 0 deletions
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") |