From ac53fb25cca2b68e4d3bb493d3dafb384ec3494e Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Wed, 25 Jul 2018 11:27:32 +0800 Subject: netcat-openbsd: 1.105 -> 1.190 License-Update: License updated/Add copyright for some missing file/fix some URL Signed-off-by: Changqing Li Signed-off-by: Khem Raj --- ...bundle-own-base64-encode-decode-functions.patch | 70 ++++++++++++---------- .../recipes-support/netcat/netcat-openbsd_1.105.bb | 56 ----------------- .../recipes-support/netcat/netcat-openbsd_1.190.bb | 56 +++++++++++++++++ 3 files changed, 96 insertions(+), 86 deletions(-) delete mode 100644 meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb create mode 100644 meta-networking/recipes-support/netcat/netcat-openbsd_1.190.bb (limited to 'meta-networking/recipes-support/netcat') diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch b/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch index 0966b65808..929f63f4a9 100644 --- a/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch +++ b/meta-networking/recipes-support/netcat/netcat-openbsd/0001-bundle-own-base64-encode-decode-functions.patch @@ -1,40 +1,47 @@ -From ccd166b73eaae4dd1e1785c63ceb9b303568ed46 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 21 Mar 2017 11:30:49 -0700 +From 3da48ec13a44b71ca51adbc803b42c1b29a43f57 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Tue, 24 Jul 2018 14:03:51 +0800 Subject: [PATCH] bundle own base64 encode/decode functions Not all libc implementations provide it. as an aside libresolv is no longer needed +Upstream-Status: Pending + Signed-off-by: Khem Raj + +Update to version 1.190-2 +Signed-off-by: Changqing Li --- Makefile | 4 +- base64.c | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - netcat.c | 2 + + netcat.c | 3 + socks.c | 3 + - 4 files changed, 320 insertions(+), 2 deletions(-) + 4 files changed, 321 insertions(+), 2 deletions(-) create mode 100644 base64.c -Index: netcat-openbsd-1.105/Makefile -=================================================================== ---- netcat-openbsd-1.105.orig/Makefile -+++ netcat-openbsd-1.105/Makefile -@@ -1,9 +1,9 @@ - # $OpenBSD: Makefile,v 1.6 2001/09/02 18:45:41 jakob Exp $ +diff --git a/Makefile b/Makefile +index 8247cfd..b8d8547 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,10 +1,10 @@ + # $OpenBSD: Makefile,v 1.7 2015/09/11 21:07:01 beck Exp $ PROG= nc -SRCS= netcat.c atomicio.c socks.c +SRCS= netcat.c atomicio.c socks.c base64.c --LIBS= `pkg-config --libs libbsd` -lresolv -+LIBS= `pkg-config --libs libbsd` + PKG_CONFIG ?= pkg-config +-LIBS= `$(PKG_CONFIG) --libs libbsd` -lresolv ++LIBS= `$(PKG_CONFIG) --libs libbsd` OBJS= $(SRCS:.c=.o) CFLAGS= -g -O2 LDFLAGS= -Wl,--no-add-needed -Index: netcat-openbsd-1.105/base64.c -=================================================================== +diff --git a/base64.c b/base64.c +new file mode 100644 +index 0000000..b0ee6c2 --- /dev/null -+++ netcat-openbsd-1.105/base64.c ++++ b/base64.c @@ -0,0 +1,313 @@ +/* + * Copyright (c) 1996-1999 by Internet Software Consortium. @@ -349,31 +356,34 @@ Index: netcat-openbsd-1.105/base64.c + + return (tarindex); +} -Index: netcat-openbsd-1.105/netcat.c -=================================================================== ---- netcat-openbsd-1.105.orig/netcat.c -+++ netcat-openbsd-1.105/netcat.c -@@ -169,6 +169,9 @@ static int connect_with_timeout(int fd, - socklen_t salen, int ctimeout); +diff --git a/netcat.c b/netcat.c +index a0fb51b..9c4ed23 100644 +--- a/netcat.c ++++ b/netcat.c +@@ -240,6 +240,9 @@ static int connect_with_timeout(int fd, const struct sockaddr *sa, + static void quit(); -+int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize); -+int b64_pton(char const *src, u_char *target, size_t targsize); ++int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize); ++int b64_pton(char const *src, u_char *target, size_t targsize); + int main(int argc, char *argv[]) { -Index: netcat-openbsd-1.105/socks.c -=================================================================== ---- netcat-openbsd-1.105.orig/socks.c -+++ netcat-openbsd-1.105/socks.c +diff --git a/socks.c b/socks.c +index 9068f39..c576f6b 100644 +--- a/socks.c ++++ b/socks.c @@ -53,6 +53,9 @@ #define SOCKS_DOMAIN 3 #define SOCKS_IPV6 4 -+int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize); -+int b64_pton(char const *src, u_char *target, size_t targsize); ++int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize); ++int b64_pton(char const *src, u_char *target, size_t targsize); + int remote_connect(const char *, const char *, struct addrinfo); int socks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, +-- +2.7.4 + diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb deleted file mode 100644 index 9d7420f8c2..0000000000 --- a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb +++ /dev/null @@ -1,56 +0,0 @@ -require netcat.inc -SUMMARY = "OpenBSD Netcat" -HOMEPAGE = "http://ftp.debian.org" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=ee6bbaacb5db5f2973818f0902c3ae6f" - -DEPENDS += "glib-2.0 libbsd" -do_patch[depends] = "quilt-native:do_populate_sysroot" - -SRC_URI = "${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \ - ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz;name=netcat-patch;subdir=${BP} \ - file://0001-bundle-own-base64-encode-decode-functions.patch \ - " - -SRC_URI[netcat.md5sum] = "7e67b22f1ad41a1b7effbb59ff28fca1" -SRC_URI[netcat.sha256sum] = "40653fe66c1516876b61b07e093d826e2a5463c5d994f1b7e6ce328f3edb211e" -SRC_URI[netcat-patch.md5sum] = "e914f8eb7eda5c75c679dd77787ac76b" -SRC_URI[netcat-patch.sha256sum] = "eee759327ffea293e81d0dde67921b7fcfcad279ffd7a2c9d037bbc8f882b363" - -inherit pkgconfig - -EXTRA_OEMAKE += "'LDFLAGS=${LDFLAGS}'" - -do_configure[noexec] = "1" - -netcat_do_patch() { - cd ${S} - quilt pop -a || true - if [ -d ${S}/.pc-netcat ]; then - rm -rf ${S}/.pc - mv ${S}/.pc-netcat ${S}/.pc - QUILT_PATCHES=${S}/debian/patches quilt pop -a - rm -rf ${S}/.pc ${S}/debian - fi - QUILT_PATCHES=${S}/debian/patches quilt push -a - mv ${S}/.pc ${S}/.pc-netcat -} - -do_unpack[cleandirs] += "${S}" - -python do_patch() { - bb.build.exec_func('netcat_do_patch', d) - bb.build.exec_func('patch_do_patch', d) -} - -do_compile() { - cd ${S} - pkgrel=4 - oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\"" -} - -do_install() { - install -d ${D}${bindir} - install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN} -} -ALTERNATIVE_PRIORITY = "60" diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.190.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.190.bb new file mode 100644 index 0000000000..b4802fa2a9 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.190.bb @@ -0,0 +1,56 @@ +require netcat.inc +SUMMARY = "OpenBSD Netcat" +HOMEPAGE = "http://ftp.debian.org" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://debian/copyright;md5=f39e60ae4ea9fdb559c833be2e59de99" + +DEPENDS += "glib-2.0 libbsd" +do_patch[depends] = "quilt-native:do_populate_sysroot" + +SRC_URI = "${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \ + ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}-2.debian.tar.xz;name=netcat-patch;subdir=${BP} \ + file://0001-bundle-own-base64-encode-decode-functions.patch \ + " + +SRC_URI[netcat.md5sum] = "dd32fd1d7903b541ad8709794539b959" +SRC_URI[netcat.sha256sum] = "68ccc448392c05ec51baed0167a72b8c650454f990b895d6e6877d416a38e536" +SRC_URI[netcat-patch.md5sum] = "78058b7af0170654b877b02c37716cdf" +SRC_URI[netcat-patch.sha256sum] = "88088af3f520c7825e59bc133d65e70fc4a30139d451c6faabbd9f240bc78374" + +inherit pkgconfig + +EXTRA_OEMAKE += "'LDFLAGS=${LDFLAGS}'" + +do_configure[noexec] = "1" + +netcat_do_patch() { + cd ${S} + quilt pop -a || true + if [ -d ${S}/.pc-netcat ]; then + rm -rf ${S}/.pc + mv ${S}/.pc-netcat ${S}/.pc + QUILT_PATCHES=${S}/debian/patches quilt pop -a + rm -rf ${S}/.pc ${S}/debian + fi + QUILT_PATCHES=${S}/debian/patches quilt push -a + mv ${S}/.pc ${S}/.pc-netcat +} + +do_unpack[cleandirs] += "${S}" + +python do_patch() { + bb.build.exec_func('netcat_do_patch', d) + bb.build.exec_func('patch_do_patch', d) +} + +do_compile() { + cd ${S} + pkgrel=4 + oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\"" +} + +do_install() { + install -d ${D}${bindir} + install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN} +} +ALTERNATIVE_PRIORITY = "60" -- cgit v1.2.3-54-g00ecf