Skip to contentSkip to conversation

ebtables: new package

PATCH New Baruch Siach 2 participants 4 messages Jul 7, 2011 – Jul 11, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ebtables: new package

---
 package/Config.in            |    1 +
 package/ebtables/Config.in   |    6 ++++++
 package/ebtables/ebtables.mk |   24 ++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 package/ebtables/Config.in
 create mode 100644 package/ebtables/ebtables.mk
package/Config.in +1 -0
index 40f523d..853194f 100644
@@ -387,6 +387,7 @@ endif
 source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
+source "package/ebtables/Config.in"
 source "package/ethtool/Config.in"
 source "package/hostapd/Config.in"
 source "package/ifplugd/Config.in"
package/ebtables/Config.in new file +6 -0
new file mode 100644
index 0000000..73af12a
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_EBTABLES
+	bool "ebtables"
+	help
+	  Ethernet bridge frame table administration
+
+	  http://ebtables.sourceforge.net
package/ebtables/ebtables.mk new file +24 -0
new file mode 100644
index 0000000..553bbb7
@@ -0,0 +1,24 @@
+#############################################################
+#
+# ebtables
+#
+#############################################################
+EBTABLES_VERSION = 2.0.9-2
+EBTABLES_SOURCE = ebtables-v$(EBTABLES_VERSION).tar.gz
+EBTABLES_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ebtables
+
+define EBTABLES_BUILD_CMDS
+	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) LIBDIR=/lib/ebtables -C $(@D)
+endef
+
+define EBTABLES_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/lib/ebtables
+	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so \
+		$(TARGET_DIR)/lib/ebtables
+	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/*.so \
+		$(TARGET_DIR)/lib/ebtables
+	$(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \
+		$(TARGET_DIR)/sbin/ebtables
+endef
+
+$(eval $(call GENTARGETS,package,ebtables))
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 ebtables: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Baruch> Signed-off-by: Baruch Siach <[email protected]>

Thanks, a few comments:

Baruch> +++ b/package/ebtables/ebtables.mk
Baruch> @@ -0,0 +1,24 @@
Baruch> +############################################################# Baruch> +#
Baruch> +# ebtables
Baruch> +#
Baruch> +############################################################# Baruch> +EBTABLES_VERSION = 2.0.9-2

2.0.10-1 is (now) out.

Baruch> +EBTABLES_SOURCE = ebtables-v$(EBTABLES_VERSION).tar.gz
Baruch> +EBTABLES_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ebtables
Baruch> +
Baruch> +define EBTABLES_BUILD_CMDS
Baruch> + $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) LIBDIR=/lib/ebtables -C $(@D)

You have to add quotes ("") around TARGET_CC / TARGET_LD as E.G. TARGET_CC is two words when ccache is enabled. You should also set CFLAGS / LDFLAGS, or even better use TARGET_CONFIGURE_OPTS.

Baruch> +endef
Baruch> +
Baruch> +define EBTABLES_INSTALL_TARGET_CMDS
Baruch> + mkdir -p $(TARGET_DIR)/lib/ebtables
Baruch> + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so \
Baruch> + $(TARGET_DIR)/lib/ebtables
Baruch> + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/*.so \
Baruch> + $(TARGET_DIR)/lib/ebtables
Baruch> + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \
Baruch> + $(TARGET_DIR)/sbin/ebtables

Doesn't the makefile have an install target? You need to provide the destination file name (not just the dir) when you use install -D.

Uninstall handling would be good as well.

Care to fix and resend?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 ebtables: new package

Hi Peter,

Quoted 13 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Baruch> +endef
Baruch> +
Baruch> +define EBTABLES_INSTALL_TARGET_CMDS
Baruch> + mkdir -p $(TARGET_DIR)/lib/ebtables
Baruch> + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so \
Baruch> + $(TARGET_DIR)/lib/ebtables
Baruch> + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/*.so \
Baruch> + $(TARGET_DIR)/lib/ebtables
Baruch> + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \
Baruch> + $(TARGET_DIR)/sbin/ebtables

Quoted 1 line

Doesn't the makefile have an install target?

It does, but the 'exec' target (a dependency of 'install') uses install with -o root, which fails when building as non-root. Is there a standard way to make the install target under fakeroot?

Quoted 1 line

Care to fix and resend?

I'll update and resend.

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH 1/1 ebtables: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Hi,

Quoted 1 line
Quoted 1 line

Doesn't the makefile have an install target?

Baruch> It does, but the 'exec' target (a dependency of 'install') uses Baruch> install with -o root, which fails when building as non-root. Is Baruch> there a standard way to make the install target under fakeroot?

Ok, in that case you can either do:
- Manual install like you're doing now
- Patch the Makefile to fix it

The manual install option is OK with me.

Quoted 1 line
Quoted 1 line

Care to fix and resend?

Baruch> I'll update and resend.

Great, thanks.

Signature · 1 line
Bye, Peter Korsgaard