diff options
author | kyechou | 2023-11-20 21:26:48 -0600 |
---|---|---|
committer | kyechou | 2023-11-20 21:26:48 -0600 |
commit | 485b346c6464847b270d6be5f03423302762d4d4 (patch) | |
tree | 60dab4f385ad1baaae50de74449c821433f6a902 | |
parent | 0a8b9afe6be77178bcdc4d2981d82707e36b9d48 (diff) | |
download | aur-containernet-git.tar.gz |
Fix strlcpy issue and update dependencies
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | fix-openflow-strlcpy.patch | 26 |
3 files changed, 41 insertions, 10 deletions
@@ -1,6 +1,6 @@ pkgbase = containernet-git pkgdesc = Mininet fork adding support for container-based emulated hosts - pkgver = 3.1.r388.g541b268 + pkgver = 3.1.r416.g31eeb75 pkgrel = 1 url = https://github.com/containernet/containernet install = containernet.install @@ -27,7 +27,6 @@ pkgbase = containernet-git depends = python-pexpect depends = python-urllib3 depends = python-networkx - depends = python-ipaddress optdepends = xorg-xhost: for X11 forwarding optdepends = socat: for X11 forwarding optdepends = xterm: required for MiniEdit @@ -36,7 +35,9 @@ pkgbase = containernet-git conflicts = mininet source = containernet-git::git+https://github.com/containernet/containernet source = git+https://github.com/mininet/openflow + source = fix-openflow-strlcpy.patch sha256sums = SKIP sha256sums = SKIP + sha256sums = 0a85f8a5ce2dd900d4f874849b28301aa47d7b9d7b03ed405c973d917d98383a pkgname = containernet-git @@ -4,15 +4,14 @@ # Contributor: Walter Dworak <preparationh67@gmail.com> pkgname=containernet-git -pkgver=3.1.r388.g541b268 +pkgver=3.1.r416.g31eeb75 pkgrel=1 pkgdesc="Mininet fork adding support for container-based emulated hosts" _mn_deps=('python' 'iptables' 'iproute2' 'net-tools' 'iputils' 'inetutils' 'iperf' 'ethtool' 'libcgroup' 'openvswitch' 'psmisc') -depends=(${_mn_deps[@]} +depends=("${_mn_deps[@]}" 'docker' 'python-docker' 'python-pytest' 'python-iptables-git' - 'python-pexpect' 'python-urllib3' 'python-networkx' - 'python-ipaddress') + 'python-pexpect' 'python-urllib3' 'python-networkx') optdepends=('xorg-xhost: for X11 forwarding' 'socat: for X11 forwarding' 'xterm: required for MiniEdit' @@ -25,9 +24,11 @@ provides=('mininet') conflicts=('mininet') install="${pkgname%-git}.install" source=("$pkgname"::'git+https://github.com/containernet/containernet' - 'git+https://github.com/mininet/openflow') + 'git+https://github.com/mininet/openflow' + 'fix-openflow-strlcpy.patch') sha256sums=('SKIP' - 'SKIP') + 'SKIP' + '0a85f8a5ce2dd900d4f874849b28301aa47d7b9d7b03ed405c973d917d98383a') pkgver() { cd "$srcdir/$pkgname" @@ -43,10 +44,13 @@ prepare() { sed '/^include debian\/automake.mk/d' -i Makefile.am # Patch controller to handle more than 16 switches patch -Np1 -i "$srcdir/$pkgname/util/openflow-patches/controller.patch" + patch -Np1 -i "$srcdir/fix-openflow-strlcpy.patch" cd "$srcdir/$pkgname" - sed 's:PREFIX ?= /usr:PREFIX ?= "$(DESTDIR)"/usr:' -i Makefile - sed '/^[[:space:]]*$(PYTHON) /d' -i Makefile + # shellcheck disable=SC2016 + sed -i Makefile \ + -e 's:PREFIX ?= /usr:PREFIX ?= "$(DESTDIR)"/usr:' \ + -e '/^[[:space:]]*$(PYTHON) /d' } build() { diff --git a/fix-openflow-strlcpy.patch b/fix-openflow-strlcpy.patch new file mode 100644 index 000000000000..3a007cff28b5 --- /dev/null +++ b/fix-openflow-strlcpy.patch @@ -0,0 +1,26 @@ +diff --git a/lib/util.c b/lib/util.c +index 21cc28d..67ba765 100644 +--- a/lib/util.c ++++ b/lib/util.c +@@ -138,7 +138,7 @@ xasprintf(const char *format, ...) + return s; + } + +-void ++size_t + strlcpy(char *dst, const char *src, size_t size) + { + if (size > 0) { +diff --git a/lib/util.h b/lib/util.h +index fde681f..efb0df9 100644 +--- a/lib/util.h ++++ b/lib/util.h +@@ -106,7 +106,7 @@ char *xvasprintf(const char *format, va_list) PRINTF_FORMAT(1, 0) MALLOC_LIKE; + void *x2nrealloc(void *p, size_t *n, size_t s); + + #ifndef HAVE_STRLCPY +-void strlcpy(char *dst, const char *src, size_t size); ++size_t strlcpy(char *dst, const char *src, size_t size); + #endif + + void ofp_fatal(int err_no, const char *format, ...) |