added my Recipes
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
From a2021f0bc0f029dfa05dcca5db3d2ec77904d41a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 30 Mar 2017 12:33:51 -0700
|
||||
Subject: [PATCH] Use ARPCFLAGS for package specific compiler flags
|
||||
|
||||
This leaves room for setting CFLAGS in environment
|
||||
which OE uses to pass tweaks
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Makefile | 10 ++++------
|
||||
extensions/Makefile | 4 ++++
|
||||
2 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 62ebdf2..cd06813 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,9 +12,7 @@ DESTDIR:=
|
||||
|
||||
MANS = arptables-legacy.8 arptables-save.8 arptables-restore.8
|
||||
|
||||
-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
|
||||
endif
|
||||
@@ -24,13 +22,13 @@ include extensions/Makefile
|
||||
all: arptables-legacy libarptc/libarptc.a
|
||||
|
||||
arptables.o: arptables.c
|
||||
- $(CC) $(CFLAGS) -c -o $@ $<
|
||||
+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
arptables-standalone.o: arptables-standalone.c
|
||||
- $(CC) $(CFLAGS) -c -o $@ $<
|
||||
+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
|
||||
- $(CC) $(CFLAGS) -c -o $@ $<
|
||||
+ $(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
libarptc/libarptc.a: libarptc/libarptc.o
|
||||
$(AR) rcs $@ $<
|
||||
diff --git a/extensions/Makefile b/extensions/Makefile
|
||||
index 0189cc9..e8af782 100644
|
||||
--- a/extensions/Makefile
|
||||
+++ b/extensions/Makefile
|
||||
@@ -5,3 +5,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 $@ $<
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
arptables: fix the redefinition of 'arpt_get_target'
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
This function is already defined as a static inline function in
|
||||
include/linux/netfilter_arp/arp_tables.h, once GCC uses -O0, the
|
||||
inline will not work, and the redefinition error will happen
|
||||
|
||||
Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
|
||||
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
|
||||
|
||||
diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c
|
||||
index 35736db..addd3f9 100644
|
||||
--- a/libarptc/libarptc_incl.c
|
||||
+++ b/libarptc/libarptc_incl.c
|
||||
@@ -11,14 +11,6 @@
|
||||
/* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See
|
||||
COPYING for details). */
|
||||
|
||||
-#ifndef __OPTIMIZE__
|
||||
-STRUCT_ENTRY_TARGET *
|
||||
-GET_TARGET(STRUCT_ENTRY *e)
|
||||
-{
|
||||
- return (void *)e + e->target_offset;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static int sockfd = -1;
|
||||
static void *arptc_fn = NULL;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Arp filtering arptables
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/sh -c "mkdir -p /etc/sysconfig; if [ ! -f /etc/sysconfig/arptables ]; then /usr/sbin/arptables-save > /etc/sysconfig/arptables; fi"
|
||||
ExecStart=/bin/sh -c "/usr/sbin/arptables-restore < /etc/sysconfig/arptables"
|
||||
ExecStartPost=/bin/sh -c "touch /var/lock/subsys/arptables"
|
||||
RemainAfterExit=yes
|
||||
ExecStop=/bin/sh -c "/usr/sbin/arptables-restore < /dev/null"
|
||||
ExecStopPost=/bin/sh -c "rm -f /var/lock/subsys/arptables"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,37 @@
|
||||
SUMMARY = "Administration tool for arp packet filtering"
|
||||
SECTION = "net"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
|
||||
SRCREV = "efae8949e31f8b2eb6290f377a28384cecaf105a"
|
||||
PV = "0.0.5+git${SRCPV}"
|
||||
|
||||
SRC_URI = " \
|
||||
git://git.netfilter.org/arptables;branch=master \
|
||||
file://0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch \
|
||||
file://arptables-arpt-get-target-fix.patch \
|
||||
file://arptables.service \
|
||||
"
|
||||
SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5"
|
||||
SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
SYSTEMD_SERVICE:${PN} = "arptables.service"
|
||||
|
||||
inherit systemd
|
||||
|
||||
EXTRA_OEMAKE = "'BINDIR=${sbindir}' 'MANDIR=${mandir}'"
|
||||
|
||||
do_install() {
|
||||
oe_runmake install DESTDIR=${D}
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 644 ${WORKDIR}/arptables.service ${D}${systemd_unitdir}/system
|
||||
fi
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} += "perl"
|
||||
|
||||
# the install target is not multi-job safe, but it doesn't do much
|
||||
# so we just install serially
|
||||
#
|
||||
PARALLEL_MAKEINST = "-j1"
|
||||
Reference in New Issue
Block a user