Skip to contentSkip to conversation

systemd: Fix build when base_libdir is not /lib

PATCH Superseded Khem Raj 2 participants 14 messages Jan 4, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/13 systemd: Fix build when base_libdir is not /lib

we were carrying a wrong patch to fix rootlibdir to adapt systemd to OE's notion of base_libdir but thats not right and the units dont get initialised properly when we have base_libdir which is not /lib

This patch fixes the use of base_libdir where it should have been catering to notions of systemd/udev for putting unit files and init scripts in /lib and not in base_libdir

It also ignores the lib32-* packages so that systemd build works for multilib enabled systems.

Adapt to nativesdk renaming

---
 meta-systemd/classes/systemd.bbclass             |    7 +-
 meta-systemd/recipes-core/systemd/systemd_git.bb |   76 ++++++++++++----------
 2 files changed, 44 insertions(+), 39 deletions(-)
meta-systemd/classes/systemd.bbclass +4 -3
index f26c6d1..9582492 100644
@@ -70,7 +70,8 @@ def systemd_after_parse(d):
     bpn = d.getVar('BPN', 1)
     if bpn + "-native" != d.getVar('PN', 1) and \
             bpn + "-cross" != d.getVar('PN', 1) and \
-            bpn + "-nativesdk" != d.getVar('PN', 1):
+            not d.getVar('MLPREFIX', 1) and \
+            "nativesdk-" + bpn != d.getVar('PN', 1):
         systemd_check_vars()
         for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
             systemd_create_package(pkg_systemd)
@@ -158,8 +159,8 @@ python populate_packages_prepend () {
     def systemd_check_services():
         base_libdir = d.getVar('base_libdir', 1)
         searchpaths = '/etc/systemd/system/' + ' '
-        searchpaths += d.getVar('base_libdir', 1) + '/systemd/system/' + ' '
-        searchpaths += d.getVar('libdir', 1) + '/systemd/system/' + ' '
+        searchpaths += '/lib/systemd/system/' + ' '
+        searchpaths += '/usr/lib/systemd/system/' + ' '
         systemd_packages = d.getVar('SYSTEMD_PACKAGES', 1)
         has_exactly_one_service = len(systemd_packages.split()) == 1
         if has_exactly_one_service:
meta-systemd/recipes-core/systemd/systemd_git.bb +40 -36

119 lines not on this page · raw message

Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/13 meta-systemd: Add systemd unit file for atftp

---
 .../recipes-extended/atftp/atftp/atftpd.service    |   10 ++++++++++
 .../recipes-extended/atftp/atftp_git.bbappend      |   10 ++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 meta-systemd/meta-junos/recipes-extended/atftp/atftp/atftpd.service
 create mode 100644 meta-systemd/meta-junos/recipes-extended/atftp/atftp_git.bbappend
meta-systemd/meta-junos/recipes-extended/atftp/atftp/atftpd.service new file +10 -0
new file mode 100644
index 0000000..480bc70
@@ -0,0 +1,10 @@
+[Unit]
+Description=Advanced TFTP Server
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/atftpd --daemon --port 69
+
+[Install]
+WantedBy=multi-user.target
meta-systemd/meta-junos/recipes-extended/atftp/atftp_git.bbappend new file +10 -0
new file mode 100644
index 0000000..3706d9f
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+PRINC := "${@int(PRINC) + 1}"
+
+inherit systemd
+
+SRC_URI += "file://atftpd.service"
+
+SYSTEMD_PACKAGES = "atftpd-systemd"
+SYSTEMD_SERVICE_atftpd-systemd = "atftpd.service"
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH 3/13 at: Add systemd unit file

In reply to Khem Raj
---
 .../meta-oe/recipes-extended/at/at/atd.service     |    9 +++++++++
 .../meta-oe/recipes-extended/at/at_3.1.13.bbappend |   12 ++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 meta-systemd/meta-oe/recipes-extended/at/at/atd.service
 create mode 100644 meta-systemd/meta-oe/recipes-extended/at/at_3.1.13.bbappend
meta-systemd/meta-oe/recipes-extended/at/at/atd.service new file +9 -0
new file mode 100644
index 0000000..64a9015
@@ -0,0 +1,9 @@
+[Unit]
+Description=Job spooling tools
+After=syslog.target
+
+[Service]
+ExecStart=/usr/sbin/atd -f
+
+[Install]
+WantedBy=multi-user.target
meta-systemd/meta-oe/recipes-extended/at/at_3.1.13.bbappend new file +12 -0
new file mode 100644
index 0000000..d80cfff
@@ -0,0 +1,12 @@
+inherit systemd
+
+PRINC := "${@int(PRINC) + 1}"
+
+# look for files in the layer first
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://atd.service"
+
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE = "atd.service"
+
Signature · 1 line
1.7.9.5
author
#3 lore raw

PATCH 4/13 dhcp: Add systemd unit file for dhclient

In reply to Khem Raj
---
 .../dhcp/dhcp/dhclient.service                     |   13 +++++++++++++
 .../dhcp/dhcp_4.2.4-P2.bbappend                    |    7 +++++--
 2 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp/dhclient.service
meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp/dhclient.service new file +13 -0
new file mode 100644
index 0000000..76d64d5
@@ -0,0 +1,13 @@
+[Unit]
+Description=Dynamic Host Configuration Protocol (DHCP)
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/dhclient.pid
+EnvironmentFile=-/etc/default/dhcp-client
+ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q $INTERFACES -lf /var/lib/dhcp/dhclient.leases
+
+[Install]
+WantedBy=multi-user.target
+
meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp_4.2.4-P2.bbappend +5 -2
index a18fda8..fde2426 100644
@@ -5,9 +5,12 @@ inherit systemd
 
 PRINC := "${@int(PRINC) + 1}"
 
-SYSTEMD_PACKAGES = "dhcp-server-systemd dhcp-relay-systemd"
+SYSTEMD_PACKAGES = "dhcp-server-systemd dhcp-relay-systemd dhcp-client-systemd"
 SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service"
 SYSTEMD_SERVICE_dhcp-relay-systemd = "dhcrelay.service"
+SYSTEMD_SERVICE_dhcp-client-systemd = "dhclient.service"
 
 SRC_URI += "file://dhcpd.service \
-            file://dhcrelay.service"
+            file://dhclient.service \
+            file://dhcrelay.service \
+           "
Signature · 1 line
1.7.9.5
author
#4 lore raw

PATCH 6/13 rpcbind: Add systemd service unit file

In reply to Khem Raj
---
 .../rpcbind/rpcbind/rpcbind.service                |   13 +++++++++++++
 .../rpcbind/rpcbind_0.2.0.bbappend                 |   12 ++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 meta-systemd/meta-oe/recipes-extended/rpcbind/rpcbind/rpcbind.service
 create mode 100644 meta-systemd/meta-oe/recipes-extended/rpcbind/rpcbind_0.2.0.bbappend
meta-systemd/meta-oe/recipes-extended/rpcbind/rpcbind/rpcbind.service new file +13 -0
new file mode 100644
index 0000000..a028ace
@@ -0,0 +1,13 @@
+[Unit]
+Description=RPC Bind
+After=network.target
+Wants=rpcbind.target
+Before=rpcbind.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/rpcbind
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
meta-systemd/meta-oe/recipes-extended/rpcbind/rpcbind_0.2.0.bbappend new file +12 -0
new file mode 100644
index 0000000..0fa7f97
@@ -0,0 +1,12 @@
+inherit systemd
+
+PRINC := "${@int(PRINC) + 1}"
+
+# look for files in the layer first
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://rpcbind.service"
+
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE = "rpcbind.service"
+
Signature · 1 line
1.7.9.5
author
#5 lore raw

PATCH 7/13 dhclient.service: Rearrange the cmdline for dhclient

In reply to Khem Raj
---
 .../dhcp/dhcp/dhclient.service                     |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-systemd/oe-core/recipes-connectivity/dhcp/dhcp/dhclient.service +1 -1
index 76d64d5..c9620cf 100644
@@ -6,7 +6,7 @@ After=syslog.target network.target
 Type=forking
 PIDFile=/var/run/dhclient.pid
 EnvironmentFile=-/etc/default/dhcp-client
-ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q $INTERFACES -lf /var/lib/dhcp/dhclient.leases
+ExecStart=/sbin/dhclient -cf /etc/dhcp/dhclient.conf -q -lf /var/lib/dhcp/dhclient.leases $INTERFACES
 
 [Install]
 WantedBy=multi-user.target
Signature · 1 line
1.7.9.5
author
#6 lore raw

PATCH 8/13 jansson_2.3.1.bb: Fix multilib use BPN in SRC_URI instead of PN

In reply to Khem Raj
---
 meta-oe/recipes-extended/jansson/jansson_2.3.1.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/jansson/jansson_2.3.1.bb +1 -1
index 85aade4..8c7a11e 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.digip.org/jansson/"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=6946b728e700de875e60ebb453cc3a20"
 
-SRC_URI = "http://www.digip.org/jansson/releases/${PN}-${PV}.tar.gz"
+SRC_URI = "http://www.digip.org/jansson/releases/${BPN}-${PV}.tar.gz"
 
 SRC_URI[md5sum] = "28848fbc02d7657d930f97ce74f80d93"
 SRC_URI[sha256sum] = "5f2ebf63580c73cc115634861b5da1c919499dde37d2e73b16e28b0c8ddc3921"
Signature · 1 line
1.7.9.5
author
#7 lore raw

PATCH 9/13 net-snmp: Use ${PN} instead of hardcoding net-snmp

In reply to Khem Raj

This shows up when doing multilib builds where
PN != BPN and warnings about non existent systemd packages are popping up.

---
 meta-oe/recipes-extended/net-snmp/net-snmp.inc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-oe/recipes-extended/net-snmp/net-snmp.inc +3 -3
index c6f613d..eb355ab 100644
@@ -38,8 +38,8 @@ do_install_append() {
 		-i ${STAGING_BINDIR}/net-snmp-config
 }
 
-PACKAGES = "net-snmp-dbg net-snmp-doc net-snmp-dev net-snmp-staticdev net-snmp-static net-snmp-libs \
-            net-snmp-mibs net-snmp-server net-snmp-client net-snmp-server-snmpd net-snmp-server-snmptrapd"
+PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static ${PN}-libs \
+            ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd"
 
 ALLOW_EMPTY_${PN}-server = "1"
 FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}"
@@ -59,7 +59,7 @@ INITSCRIPT_PARAMS_${PN}-server = "defaults"
 
 LEAD_SONAME = "libnetsnmp.so"
 
-pkg_postrm_net-snmp-server() {
+pkg_postrm_${PN}-server() {
 	if test "x$D" != "x"; then
 		OPT="-r $D "
 	else
Signature · 1 line
1.7.9.5
author
#8 lore raw

PATCH 10/13 systemd.bbclass: Fixes for living along with multilib

In reply to Khem Raj

This essentially fixes two problems
1. We were ignoring systemd for multilibs now we dont
2. We were replacing '-systemd' string in PN which is a problem whenre -systemd appears more than once e.g. lib32-systemd-units-system it was removing both essentially we should only chop the end of PN if it ends with '-systemd'

---
 meta-systemd/classes/systemd.bbclass |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-systemd/classes/systemd.bbclass +5 -2
index 9582492..16ac1fb 100644
@@ -53,7 +53,9 @@ def systemd_after_parse(d):
                         "\n\n%s: %s in SYSTEMD_PACKAGES does not match <existing-package>-systemd or ${PN}" % \
                         (bb_filename, pkg_systemd)
             else:
-                pkg_systemd_base = pkg_systemd.replace('-systemd', '')
+                pkg_systemd_base = pkg_systemd
+                if pkg_systemd_base.endswith('-systemd'):
+                    pkg_systemd_base = pkg_systemd[:-8]
                 if pkg_systemd_base not in packages:
                     raise bb.build.FuncFailed, \
                         "\n\n%s: %s in SYSTEMD_PACKAGES does not match <existing-package>-systemd or ${PN}" % \
@@ -68,9 +70,10 @@ def systemd_after_parse(d):
 
 
     bpn = d.getVar('BPN', 1)
+    ml = d.getVar('MLPREFIX', 1) or ""
     if bpn + "-native" != d.getVar('PN', 1) and \
             bpn + "-cross" != d.getVar('PN', 1) and \
-            not d.getVar('MLPREFIX', 1) and \
+            ml + bpn == d.getVar('PN', 1) and \
             "nativesdk-" + bpn != d.getVar('PN', 1):
         systemd_check_vars()
         for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
Signature · 1 line
1.7.9.5
author
#9 lore raw

PATCH 11/13 arptables: Import recipe from OE-Classic and update to latest

In reply to Khem Raj

Make LICENSE more specific
Add LIC_FILES_CHKSUM

---
 .../arptables-compile-install.patch                |   61 ++++++++++++++++
 .../arptables-0.0.3-4/arptables-init-busybox.patch |   77 ++++++++++++++++++++
 .../recipes-support/arptables/arptables_0.0.3-4.bb |   23 ++++++
 3 files changed, 161 insertions(+)
 create mode 100644 meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch
 create mode 100644 meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch
 create mode 100644 meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb
meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch new file +61 -0
new file mode 100644
index 0000000..80e9804
@@ -0,0 +1,61 @@
+Index: arptables-v0.0.3-4/Makefile
+===================================================================
+--- arptables-v0.0.3-4.orig/Makefile	2010-03-08 18:49:28.000000000 +0300
++++ arptables-v0.0.3-4/Makefile	2010-03-22 15:52:56.000000000 +0300
+@@ -6,12 +6,11 @@
+ LIBDIR:=$(PREFIX)/lib
+ BINDIR:=$(PREFIX)/sbin
+ MANDIR:=$(PREFIX)/man
+-INITDIR:=/etc/rc.d/init.d
++INITDIR:=/etc/init.d
+ SYSCONFIGDIR:=/etc/sysconfig
+ DESTDIR:=
+ 
+-COPT_FLAGS:=-O2
+-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
++ARPCFLAGS:=-Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\"
+ 
+ ifndef ARPT_LIBDIR
+ ARPT_LIBDIR:=$(LIBDIR)/arptables
+@@ -22,16 +21,16 @@
+ all: arptables
+ 
+ arptables.o: arptables.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $<
+ 
+ arptables-standalone.o: arptables-standalone.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $<
+ 
+ libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $<
+ 
+ arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS)
+-	$(CC) $(CFLAGS) -o $@ $^
++	$(CC) $(LDFLAGS) $(CFLAGS) $(ARPCFLAGS) -o $@ $^
+ 
+ $(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8
+ 	mkdir -p $(@D)
+@@ -50,6 +49,7 @@
+ 	cat arptables-restore | sed 's/__EXEC_PATH__/$(tmp1)/g' > arptables-restore_
+ 	install -m 0755 -o root -g root arptables-restore_ $(DESTDIR)$(BINDIR)/arptables-restore
+ 	cat arptables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > arptables.sysv_
++	install -d $(DESTDIR)$(INITDIR)
+ 	if test -d $(DESTDIR)$(INITDIR); then install -m 0755 -o root -g root arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi
+ 	rm -f arptables-save_ arptables-restore_ arptables.sysv_
+ 
+Index: arptables-v0.0.3-4/extensions/Makefile
+===================================================================
+--- arptables-v0.0.3-4.orig/extensions/Makefile	2010-03-08 18:49:28.000000000 +0300
++++ arptables-v0.0.3-4/extensions/Makefile	2010-03-22 15:52:38.000000000 +0300
+@@ -4,4 +4,7 @@
+ EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o)
+ 
+ extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
+-	$(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $<
++	$(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
++
++extensions/arpt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
++	$(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch new file +77 -0

77 lines not on this page · raw message

meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb new file +23 -0
new file mode 100644
index 0000000..71e2600
@@ -0,0 +1,23 @@
+DESCRIPTION = "Administration tool for arp packet filtering"
+PRIORITY = "optional"
+LICENSE = "GPL-2.0"
+SECTION = "console/network"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+SRC_URI = " \
+	${SOURCEFORGE_MIRROR}/ebtables/arptables-v${PV}.tar.gz;name=arptables \
+	file://arptables-compile-install.patch \
+	file://arptables-init-busybox.patch \
+	"
+SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5"
+SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
+
+S = "${WORKDIR}/arptables-v${PV}"
+
+do_compile () {
+	oe_runmake
+}
+
+fakeroot do_install () {
+	oe_runmake 'BINDIR=${sbindir}' 'MANDIR=${mandir}/' 'DESTDIR=${D}' install
+}
Signature · 1 line
1.7.9.5
author
#10 lore raw

PATCH 12/13 ebtables: Forward port recipes from OE-Classic

In reply to Khem Raj

Update to latest version

---
 .../ebtables-2.0.10-4/01debian_defaultconfig.patch |   50 ++++++
 .../ebtables/ebtables-2.0.10-4/ebtables.init       |  186 ++++++++++++++++++++
 .../recipes-support/ebtables/ebtables_2.0.10-4.bb  |   49 ++++++
 3 files changed, 285 insertions(+)
 create mode 100644 meta-networking/recipes-support/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch
 create mode 100755 meta-networking/recipes-support/ebtables/ebtables-2.0.10-4/ebtables.init
 create mode 100644 meta-networking/recipes-support/ebtables/ebtables_2.0.10-4.bb
meta-networking/recipes-support/ebtables/ebtables-2.0.10-4/01debian_defaultconfig.patch new file +50 -0
new file mode 100644
index 0000000..c260403
@@ -0,0 +1,50 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## debian_defaultconfig.dpatch by  <[email protected]>
+##
+## DP: Debian enhancements to the ebtables "sysconfig" default settings.
+
+@DPATCH@
+
+--- ebtables-2.0.8.1.orig/ebtables-config
++++ ebtables-2.0.8.1/ebtables-config
+@@ -1,17 +1,3 @@
+-# Save (and possibly restore) in text format.
+-#   Value: yes|no,  default: yes
+-# Save the firewall rules in text format to __SYSCONFIG__/ebtables
+-# If EBTABLES_BINARY_FORMAT="no" then restoring the firewall rules
+-# is done using this text format.
+-EBTABLES_TEXT_FORMAT="yes"
+-
+-# Save (and restore) in binary format.
+-#   Value: yes|no,  default: yes
+-# Save (and restore) the firewall rules in binary format to (and from)
+-# __SYSCONFIG__/ebtables.<chain>. Enabling this option will make
+-# firewall initialisation a lot faster.
+-EBTABLES_BINARY_FORMAT="yes"
+-
+ # Unload modules on restart and stop
+ #   Value: yes|no,  default: yes
+ # This option has to be 'yes' to get to a sane state for a firewall
+@@ -19,6 +5,12 @@
+ # modules.
+ EBTABLES_MODULES_UNLOAD="yes"
+ 
++# Load firewall rules on system startup.
++#   Value: yes|no,  default: no
++# Restores the ebtables rulesets from the last saved state when the
++# system boots up.
++EBTABLES_LOAD_ON_START="no"
++
+ # Save current firewall rules on stop.
+ #   Value: yes|no,  default: no
+ # Saves all firewall rules if firewall gets stopped
+@@ -35,3 +27,9 @@
+ # Save rule counters when saving a kernel table to a file. If the
+ # rule counters were saved, they will be restored when restoring the table.
+ EBTABLES_SAVE_COUNTER="no"
++
++# Backup suffix for ruleset save files.
++#   Value: <string>,  default: "~"
++# Keep one backup level of saved rules.
++# Set this variable to the empty string to disable backups.
++EBTABLES_BACKUP_SUFFIX="~"
meta-networking/recipes-support/ebtables/ebtables-2.0.10-4/ebtables.init new file +186 -0

186 lines not on this page · raw message

meta-networking/recipes-support/ebtables/ebtables_2.0.10-4.bb new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#11 lore raw

Re: [meta-networking][PATCH 12/13] ebtables: Forward port recipes from OE-Classic

Quoted 6 lines · On Thursday 03 January 2013 19:59:33 Khem Raj wrote:

Update to latest version

---
 .../ebtables-2.0.10-4/01debian_defaultconfig.patch |   50 ++++++
 .../ebtables/ebtables-2.0.10-4/ebtables.init       |  186

Er, I'm confused - ebtables is already in meta-networking (meta- networking/recipes-filter/ebtables) ... ?

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#12 lore raw

Re: [meta-networking][PATCH 12/13] ebtables: Forward port recipes from OE-Classic

Quoted 10 lines · Paul Eggleton
Quoted 6 lines · On Thursday 03 January 2013 19:59:33 Khem Raj wrote:

Update to latest version

---
 .../ebtables-2.0.10-4/01debian_defaultconfig.patch |   50 ++++++
 .../ebtables/ebtables-2.0.10-4/ebtables.init       |  186

Er, I'm confused - ebtables is already in meta-networking (meta- networking/recipes-filter/ebtables) ... ?

hmm recipes-support and recipes-filter meant that my patch applied without letting me know :)
please discard this patch. I will resend 13/13 patch so that it applies to existing recipe
in recipes-filter

Quoted 8 lines

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre

author
#13 lore raw

PATCH 13/13 ebtables: Fix segfault by linking with no-as-needed

In reply to Khem Raj
---
 .../ebtables/ebtables-2.0.10-4/no-as-needed.patch  |   25 ++++++++++++++++++++
 .../recipes-support/ebtables/ebtables_2.0.10-4.bb  |    1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta-networking/recipes-support/ebtables/ebtables-2.0.10-4/no-as-needed.patch
meta-networking/recipes-support/ebtables/ebtables-2.0.10-4/no-as-needed.patch new file +25 -0
new file mode 100644
index 0000000..336119d
@@ -0,0 +1,25 @@
+link ebtables with --no-as-needed and adjust the link order to fix runtime crash
+
+Program terminated with signal 11, Segmentation fault.
+#0  0x00007ffaa837fb53 in ebt_initialize_entry () from /lib64/ebtables/libebtc.so
+(gdb) bt
+#0  0x00007ffaa837fb53 in ebt_initialize_entry () from /lib64/ebtables/libebtc.so
+#1  0x00007ffaa83824dc in do_command () from /lib64/ebtables/libebtc.so
+#2  0x000000000040065c in ?? ()
+#3  0x00007ffaa7fed755 in __libc_start_main () from /lib64/libc.so.6
+#4  0x0000000000400691 in ?? ()
+
+Signed-off-by: Khem Raj <[email protected]>
+Index: ebtables-v2.0.10-4/Makefile
+===================================================================
+--- ebtables-v2.0.10-4.orig/Makefile	2011-12-15 12:02:47.000000000 -0800
++++ ebtables-v2.0.10-4/Makefile	2012-12-17 22:09:45.065973753 -0800
+@@ -90,7 +90,7 @@
+ 	$(CC) -shared $(LDFLAGS) -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2)
+ 
+ ebtables: $(OBJECTS) ebtables-standalone.o libebtc.so
+-	$(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
++	$(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -Wl,--no-as-needed $(EXT_LIBSI) -lebtc \
+ 	-Wl,-rpath,$(LIBDIR)
+ 
+ ebtablesu: ebtablesu.c
meta-networking/recipes-support/ebtables/ebtables_2.0.10-4.bb +1 -0
index 9be2494..eb7fa0d 100644
@@ -10,6 +10,7 @@ TARGET_CC_ARCH += "${LDFLAGS}"
 SRC_URI = " \
 	${SOURCEFORGE_MIRROR}/ebtables/ebtables-v${PV}.tar.gz \
 	file://01debian_defaultconfig.patch \
+	file://no-as-needed.patch \
 	file://ebtables.init \
 	"
 SRC_URI[md5sum] = "506742a3d44b9925955425a659c1a8d0"
Signature · 1 line
1.7.9.5