mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] arptables: Add new packege
@ 2012-05-28 12:42 Bart vdr. Meulen
  2012-05-31 14:51 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Bart vdr. Meulen @ 2012-05-28 12:42 UTC (permalink / raw)
  To: ptxdist

From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>

Add arptables, an administration tool for arp packet filtering

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
---
 rules/arptables.in   |   33 ++++++++++++++++++
 rules/arptables.make |   90 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)
 create mode 100644 rules/arptables.in
 create mode 100644 rules/arptables.make

diff --git a/rules/arptables.in b/rules/arptables.in
new file mode 100644
index 0000000..565d831
--- /dev/null
+++ b/rules/arptables.in
@@ -0,0 +1,33 @@
+## SECTION=networking
+
+menuconfig ARPTABLES
+	tristate
+	prompt "arptables"
+	select KERNEL_HEADER
+	help
+	  Arptables is used to set up, maintain, and inspect the tables of
+	  ARP rules in the Linux kernel. It is analogous to iptables,
+	  but operates at the ARP layer rather than the IP layer.
+
+if ARPTABLES
+
+config ARPTABLES_INSTALL_ARPTABLES
+	bool "install arptables"
+	help
+	  install the arptables command
+
+config ARPTABLES_INSTALL_ARPTABLES_RESTORE
+	bool "install arptables-restore"
+	help
+	  The arptables-restore command is used to restore
+	  the arptables rule-set that was saved with the
+	  arptables-save command.
+
+config ARPTABLES_INSTALL_ARPTABLES_SAVE
+	bool "install arptables-save"
+	help
+	  The arptables-save command is a tool to save
+	  the current rule-set into a file that
+	  arptables-restore can use.
+
+endif
diff --git a/rules/arptables.make b/rules/arptables.make
new file mode 100644
index 0000000..97b06ed
--- /dev/null
+++ b/rules/arptables.make
@@ -0,0 +1,90 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Bart vdr. Meulen <bartvdrmeulen@gmail.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_ARPTABLES) += arptables
+
+#
+# Paths and names
+#
+ARPTABLES_VERSION	:= 0.0.3-4
+ARPTABLES_MD5		:= 1d4ab05761f063b0751645d8f2b8f8e5
+ARPTABLES		:= arptables-v$(ARPTABLES_VERSION)
+ARPTABLES_SUFFIX	:= tar.gz
+ARPTABLES_URL		:= $(PTXCONF_SETUP_SFMIRROR)/ebtables/arptables/arptables-v0.0.3/$(ARPTABLES).$(ARPTABLES_SUFFIX)
+ARPTABLES_SOURCE	:= $(SRCDIR)/$(ARPTABLES).$(ARPTABLES_SUFFIX)
+ARPTABLES_DIR		:= $(BUILDDIR)/$(ARPTABLES)
+ARPTABLES_LICENSE	:= GPLv2
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(ARPTABLES_SOURCE):
+	@$(call targetinfo)
+	@$(call get, ARPTABLES)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ARPTABLES_CONF_TOOL	:= NO
+ARPTABLES_MAKE_OPT := \
+	$(CROSS_ENV_CFLAGS) \
+	$(CROSS_ENV_CPPFLAGS) \
+	$(CROSS_ENV_LDFLAGS) \
+	$(CROSS_ENV_CC) \
+	KERNEL_DIR=$(KERNEL_HEADERS_DIR)
+ARPTABLES_INSTALL_OPT := \
+	PREFIX=/usr install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/arptables.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, arptables)
+	@$(call install_fixup, arptables,PRIORITY,optional)
+	@$(call install_fixup, arptables,SECTION,base)
+	@$(call install_fixup, arptables,AUTHOR,"Bart vdr. Meulen <bartvdrmeulen@gmail.com>")
+	@$(call install_fixup, arptables,DESCRIPTION,missing)
+
+ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES
+	@$(call install_copy, arptables, 0, 0, 0755, -, \
+		/usr/sbin/arptables)
+endif
+
+ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_SAVE
+	@$(call install_copy, arptables, 0, 0, 0755, -, \
+		/usr/sbin/arptables-save)
+endif
+
+ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_RESTORE
+	@$(call install_copy, arptables, 0, 0, 0755, -, \
+		/usr/sbin/arptables-restore)
+endif
+
+	@$(call install_finish, arptables)
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+#$(STATEDIR)/arptables.clean:
+#	@$(call targetinfo)
+#	@$(call clean_pkg, ARPTABLES)
+
+# vim: syntax=make
-- 
1.7.9.5


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] arptables: Add new packege
  2012-05-28 12:42 [ptxdist] [PATCH] arptables: Add new packege Bart vdr. Meulen
@ 2012-05-31 14:51 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2012-05-31 14:51 UTC (permalink / raw)
  To: ptxdist

On Mon, May 28, 2012 at 02:42:45PM +0200, Bart vdr. Meulen wrote:
> From: "Bart vdr. Meulen" <bartvdrmeulen@gmail.com>
> 
> Add arptables, an administration tool for arp packet filtering
> 
> Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> ---
>  rules/arptables.in   |   33 ++++++++++++++++++
>  rules/arptables.make |   90 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 123 insertions(+)
>  create mode 100644 rules/arptables.in
>  create mode 100644 rules/arptables.make
> 
> diff --git a/rules/arptables.in b/rules/arptables.in
> new file mode 100644
> index 0000000..565d831
> --- /dev/null
> +++ b/rules/arptables.in
> @@ -0,0 +1,33 @@
> +## SECTION=networking
> +
> +menuconfig ARPTABLES
> +	tristate
> +	prompt "arptables"
> +	select KERNEL_HEADER
> +	help
> +	  Arptables is used to set up, maintain, and inspect the tables of
> +	  ARP rules in the Linux kernel. It is analogous to iptables,
> +	  but operates at the ARP layer rather than the IP layer.
> +
> +if ARPTABLES
> +
> +config ARPTABLES_INSTALL_ARPTABLES
> +	bool "install arptables"
> +	help
> +	  install the arptables command
> +
> +config ARPTABLES_INSTALL_ARPTABLES_RESTORE
> +	bool "install arptables-restore"
> +	help
> +	  The arptables-restore command is used to restore
> +	  the arptables rule-set that was saved with the
> +	  arptables-save command.
> +
> +config ARPTABLES_INSTALL_ARPTABLES_SAVE
> +	bool "install arptables-save"
> +	help
> +	  The arptables-save command is a tool to save
> +	  the current rule-set into a file that
> +	  arptables-restore can use.

Hmmm, one option for both I think. One without the other doesn't realy make
sense, right?
How big are these tools? For small tools without extra dependencies I'd say
jut install it without an extra option.


> +
> +endif
> diff --git a/rules/arptables.make b/rules/arptables.make
> new file mode 100644
> index 0000000..97b06ed
> --- /dev/null
> +++ b/rules/arptables.make
> @@ -0,0 +1,90 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2011 by Bart vdr. Meulen <bartvdrmeulen@gmail.com>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_ARPTABLES) += arptables
> +
> +#
> +# Paths and names
> +#
> +ARPTABLES_VERSION	:= 0.0.3-4
> +ARPTABLES_MD5		:= 1d4ab05761f063b0751645d8f2b8f8e5
> +ARPTABLES		:= arptables-v$(ARPTABLES_VERSION)
> +ARPTABLES_SUFFIX	:= tar.gz
> +ARPTABLES_URL		:= $(PTXCONF_SETUP_SFMIRROR)/ebtables/arptables/arptables-v0.0.3/$(ARPTABLES).$(ARPTABLES_SUFFIX)
> +ARPTABLES_SOURCE	:= $(SRCDIR)/$(ARPTABLES).$(ARPTABLES_SUFFIX)
> +ARPTABLES_DIR		:= $(BUILDDIR)/$(ARPTABLES)
> +ARPTABLES_LICENSE	:= GPLv2
> +
> +# ----------------------------------------------------------------------------
> +# Get
> +# ----------------------------------------------------------------------------
> +
> +$(ARPTABLES_SOURCE):
> +	@$(call targetinfo)
> +	@$(call get, ARPTABLES)

remove

> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +ARPTABLES_CONF_TOOL	:= NO
> +ARPTABLES_MAKE_OPT := \
> +	$(CROSS_ENV_CFLAGS) \
> +	$(CROSS_ENV_CPPFLAGS) \
> +	$(CROSS_ENV_LDFLAGS) \
> +	$(CROSS_ENV_CC) \
> +	KERNEL_DIR=$(KERNEL_HEADERS_DIR)
> +ARPTABLES_INSTALL_OPT := \
> +	PREFIX=/usr install
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/arptables.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, arptables)
> +	@$(call install_fixup, arptables,PRIORITY,optional)
> +	@$(call install_fixup, arptables,SECTION,base)
> +	@$(call install_fixup, arptables,AUTHOR,"Bart vdr. Meulen <bartvdrmeulen@gmail.com>")
> +	@$(call install_fixup, arptables,DESCRIPTION,missing)
> +
> +ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES
> +	@$(call install_copy, arptables, 0, 0, 0755, -, \
> +		/usr/sbin/arptables)
> +endif
> +
> +ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_SAVE
> +	@$(call install_copy, arptables, 0, 0, 0755, -, \
> +		/usr/sbin/arptables-save)
> +endif
> +
> +ifdef PTXCONF_ARPTABLES_INSTALL_ARPTABLES_RESTORE
> +	@$(call install_copy, arptables, 0, 0, 0755, -, \
> +		/usr/sbin/arptables-restore)
> +endif
> +
> +	@$(call install_finish, arptables)
> +
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +#$(STATEDIR)/arptables.clean:
> +#	@$(call targetinfo)
> +#	@$(call clean_pkg, ARPTABLES)

remove

Michael

> +
> +# vim: syntax=make
> -- 
> 1.7.9.5
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-31 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-28 12:42 [ptxdist] [PATCH] arptables: Add new packege Bart vdr. Meulen
2012-05-31 14:51 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox