added my Recipes
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
SUMMARY = "OpenFlow communications protocol"
|
||||
DESCRIPTION = "\
|
||||
Open standard that enables researchers to run experimental protocols in \
|
||||
contained networks. OpenFlow is a communications interface between \
|
||||
control and forwarding planes of a software-defined networking architecture.\
|
||||
"
|
||||
HOMEPAGE = "http://www.openflow.org"
|
||||
|
||||
SECTION = "net"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=e870c934e2c3d6ccf085fd7cf0a1e2e2"
|
||||
|
||||
SRC_URI = "git://gitosis.stanford.edu/openflow.git;protocol=git;branch=master"
|
||||
|
||||
CVE_CHECK_IGNORE = "\
|
||||
CVE-2015-1611 \
|
||||
CVE-2015-1612 \
|
||||
"
|
||||
|
||||
DEPENDS = "virtual/libc"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl, openssl openssl-native, libssl"
|
||||
|
||||
EXTRA_OECONF += " \
|
||||
KARCH=${TARGET_ARCH} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'openssl', 'SSL_LIBS="-lssl -lcrypto"', '', d)} \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools-brokensep pkgconfig
|
||||
|
||||
do_configure:prepend() {
|
||||
./boot.sh
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
# Remove /var/run as it is created on startup
|
||||
rm -rf ${D}${localstatedir}/run
|
||||
|
||||
# /var/log/openflow needs to be created in runtime. Use rmdir to catch if
|
||||
# upstream stops creating /var/log/openflow, or adds something else in
|
||||
# /var/log.
|
||||
rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log
|
||||
rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
|
||||
|
||||
# Create /var/log/openflow in runtime.
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
|
||||
install -d ${D}${nonarch_libdir}/tmpfiles.d
|
||||
echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
|
||||
fi
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
|
||||
fi
|
||||
}
|
||||
|
||||
FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
|
||||
|
||||
# This CVE is not for this product but cve-check assumes it is
|
||||
# because two CPE collides when checking the NVD database
|
||||
CVE_CHECK_IGNORE = "CVE-2018-1078"
|
||||
@@ -0,0 +1,64 @@
|
||||
From 7b62e5884353b247f542844d1e4687d0e9211999 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 20 Jul 2017 04:27:32 -0700
|
||||
Subject: [PATCH 1/2] Check and use strlcpy from libc before defining own
|
||||
|
||||
This is required especially on musl where
|
||||
function prototype conflicts and causes build
|
||||
failures.
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
lib/util.c | 2 ++
|
||||
lib/util.h | 1 +
|
||||
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 13064f6..596c43f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -57,7 +57,7 @@ OFP_CHECK_HWTABLES
|
||||
OFP_CHECK_HWLIBS
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
-AC_CHECK_FUNCS([strsignal])
|
||||
+AC_CHECK_FUNCS([strlcpy strsignal])
|
||||
|
||||
AC_ARG_VAR(KARCH, [Kernel Architecture String])
|
||||
AC_SUBST(KARCH)
|
||||
diff --git a/lib/util.c b/lib/util.c
|
||||
index 21cc28d..1f341b1 100644
|
||||
--- a/lib/util.c
|
||||
+++ b/lib/util.c
|
||||
@@ -138,6 +138,7 @@ xasprintf(const char *format, ...)
|
||||
return s;
|
||||
}
|
||||
|
||||
+#ifndef HAVE_STRLCPY
|
||||
void
|
||||
strlcpy(char *dst, const char *src, size_t size)
|
||||
{
|
||||
@@ -148,6 +149,7 @@ strlcpy(char *dst, const char *src, size_t size)
|
||||
dst[n_copy] = '\0';
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
void
|
||||
ofp_fatal(int err_no, const char *format, ...)
|
||||
diff --git a/lib/util.h b/lib/util.h
|
||||
index fde681f..9e45ea9 100644
|
||||
--- a/lib/util.h
|
||||
+++ b/lib/util.h
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "compiler.h"
|
||||
+#include "config.h"
|
||||
|
||||
#ifndef va_copy
|
||||
#ifdef __va_copy
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0fe6770b617af7e400abc6f8652c1417d4c3575e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 8 Sep 2018 22:49:15 -0700
|
||||
Subject: [PATCH] generate not static get_dh* functions
|
||||
|
||||
Fixes build with OpenSSL 1.1.x
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
lib/automake.mk | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/automake.mk b/lib/automake.mk
|
||||
index bfbeb94..b53909a 100644
|
||||
--- a/lib/automake.mk
|
||||
+++ b/lib/automake.mk
|
||||
@@ -113,8 +113,9 @@ lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
|
||||
(echo '#include "lib/dhparams.h"' && \
|
||||
openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
|
||||
openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
|
||||
- openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
|
||||
- | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
|
||||
+ openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) | \
|
||||
+ sed -e 's/\(get_dh[0-9]*\)()/\1(void)/' \
|
||||
+ -e 's/static DH \*get_dh/DH \*get_dh/' > lib/dhparams.c.tmp
|
||||
mv lib/dhparams.c.tmp lib/dhparams.c
|
||||
endif
|
||||
|
||||
--
|
||||
2.18.0
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From b875c6e264eaf7350ad4e4ebf427692d8fd3cd72 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 29 Aug 2022 12:58:53 -0700
|
||||
Subject: [PATCH] socket-util: Include sys/stat.h for fchmod
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
lib/socket-util.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/socket-util.c b/lib/socket-util.c
|
||||
index c7b5d6d..5b3d602 100644
|
||||
--- a/lib/socket-util.c
|
||||
+++ b/lib/socket-util.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
+#include <sys/stat.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
#include "fatal-signal.h"
|
||||
@@ -0,0 +1,59 @@
|
||||
From 5bba224edea38607e8732081f86679ffd8b218ab Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 20 Jul 2017 04:29:04 -0700
|
||||
Subject: [PATCH 2/2] lib/netdev: Adjust header include sequence
|
||||
|
||||
Specify libc headers before kernel UAPIs
|
||||
this helps compiling with musl where otherwise
|
||||
it uses the definition from kernel and complains
|
||||
about double definition in libc headers
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
lib/netdev.c | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lib/netdev.c b/lib/netdev.c
|
||||
index 3b6fbc5..c7de25e 100644
|
||||
--- a/lib/netdev.c
|
||||
+++ b/lib/netdev.c
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <inttypes.h>
|
||||
-#include <linux/if_tun.h>
|
||||
|
||||
/* Fix for some compile issues we were experiencing when setting up openwrt
|
||||
* with the 2.4 kernel. linux/ethtool.h seems to use kernel-style inttypes,
|
||||
@@ -57,10 +56,6 @@
|
||||
#define s64 __s64
|
||||
#endif
|
||||
|
||||
-#include <linux/ethtool.h>
|
||||
-#include <linux/rtnetlink.h>
|
||||
-#include <linux/sockios.h>
|
||||
-#include <linux/version.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -68,12 +63,16 @@
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
-#include <net/if_packet.h>
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <linux/ethtool.h>
|
||||
+#include <linux/rtnetlink.h>
|
||||
+#include <linux/sockios.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/if_tun.h>
|
||||
|
||||
#include "fatal-signal.h"
|
||||
#include "list.h"
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
include ${BPN}.inc
|
||||
|
||||
SRCREV = "5ccca75a69f99791659bcfbcf35353ab1921320a"
|
||||
PV = "1.0"
|
||||
@@ -0,0 +1,10 @@
|
||||
include ${BPN}.inc
|
||||
|
||||
SRCREV = "c84f33f09d5dbcfc9b489f64cb30475bf36f653a"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
|
||||
SRC_URI += "file://0001-Check-and-use-strlcpy-from-libc-before-defining-own.patch \
|
||||
file://0002-lib-netdev-Adjust-header-include-sequence.patch \
|
||||
file://0001-generate-not-static-get_dh-functions.patch \
|
||||
file://0001-socket-util-Include-sys-stat.h-for-fchmod.patch \
|
||||
"
|
||||
Reference in New Issue
Block a user