From 91389e4d5aff2180fb947746c058c520ff3ea042 Mon Sep 17 00:00:00 2001 From: Dan McGregor Date: Thu, 27 Nov 2025 14:57:37 -0600 Subject: netcat-openbsd: update to 1.228 A version newer than 1.195 is required for certain features of newer versions of cloud-init. May as well bump to the version in Debian Testing. I also noticed it appears the licence was incorrectly specified, and is indeed BSD-3-Clause. License-update: Added copyright holders and clarified man page licence Signed-off-by: Dan McGregor Signed-off-by: Khem Raj --- ...bundle-own-base64-encode-decode-functions.patch | 12 ++--- ...0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch | 10 ++-- .../recipes-support/netcat/netcat-openbsd_1.195.bb | 57 ---------------------- .../recipes-support/netcat/netcat-openbsd_1.228.bb | 55 +++++++++++++++++++++ 4 files changed, 66 insertions(+), 68 deletions(-) delete mode 100644 meta-networking/recipes-support/netcat/netcat-openbsd_1.195.bb create mode 100644 meta-networking/recipes-support/netcat/netcat-openbsd_1.228.bb (limited to 'meta-networking') 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 929f63f4a9..7e665d777f 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 @@ -14,7 +14,7 @@ Update to version 1.190-2 Signed-off-by: Changqing Li --- Makefile | 4 +- - base64.c | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + base64.c | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ netcat.c | 3 + socks.c | 3 + 4 files changed, 321 insertions(+), 2 deletions(-) @@ -360,8 +360,8 @@ 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, - +@@ -239,6 +239,9 @@ char *proto_name(int, int); + static int connect_with_timeout(int, const struct sockaddr *, socklen_t, int); static void quit(); +int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize); @@ -378,10 +378,10 @@ index 9068f39..c576f6b 100644 #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 remote_connect(const char *, const char *, struct addrinfo, char *); int socks_connect(const char *, const char *, struct addrinfo, const char *, const char *, struct addrinfo, int, -- diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd/0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch b/meta-networking/recipes-support/netcat/netcat-openbsd/0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch index c1757d39ad..d574ee0b67 100644 --- a/meta-networking/recipes-support/netcat/netcat-openbsd/0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch +++ b/meta-networking/recipes-support/netcat/netcat-openbsd/0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch @@ -28,19 +28,19 @@ Signed-off-by: mark.yang 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netcat.c b/netcat.c -index d70598a..b8ba959 100644 +index 62d01d8..7367f47 100644 --- a/netcat.c +++ b/netcat.c -@@ -238,7 +238,7 @@ char *proto_name(int uflag, int dccpflag); - static int connect_with_timeout(int fd, const struct sockaddr *sa, - socklen_t salen, int ctimeout); +@@ -237,7 +237,7 @@ ssize_t fillbuf(int, unsigned char *, size_t *); + char *proto_name(int, int); + static int connect_with_timeout(int, const struct sockaddr *, socklen_t, int); -static void quit(); +static void quit(int sig); 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); -@@ -2235,7 +2235,7 @@ usage(int ret) +@@ -2347,7 +2347,7 @@ usage(int ret) * quit() * handler for a "-q" timeout (exit 0 instead of 1) */ diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.195.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.195.bb deleted file mode 100644 index 99ae90aa91..0000000000 --- a/meta-networking/recipes-support/netcat/netcat-openbsd_1.195.bb +++ /dev/null @@ -1,57 +0,0 @@ -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 = "http://snapshot.debian.org/archive/debian/20181022T085404Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \ - http://snapshot.debian.org/archive/debian/20181022T085404Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-1.debian.tar.xz;name=netcat-patch;subdir=${BP} \ - file://0001-bundle-own-base64-encode-decode-functions.patch \ - file://0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch \ - " - -SRC_URI[netcat.md5sum] = "219d5e49c45658e229a3bda63063a986" -SRC_URI[netcat.sha256sum] = "0e283b2a214313c69447cd962c528ac19afb3ddfe606b25de6d179f187cde4c3" -SRC_URI[netcat-patch.md5sum] = "7eba241989dbef6caa78ec4bc8e35151" -SRC_URI[netcat-patch.sha256sum] = "c6736fcbab5254cbbc52278993a951da1126e42800a297c27db297e332e2017e" - -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 - 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.228.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.228.bb new file mode 100644 index 0000000000..82753b9f42 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.228.bb @@ -0,0 +1,55 @@ +require netcat.inc +SUMMARY = "OpenBSD Netcat" +HOMEPAGE = "http://ftp.debian.org" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://debian/copyright;md5=7c58e21ba8c9e76c25f46b2182b23bb8" + +DEPENDS += "glib-2.0 libbsd" +do_patch[depends] = "quilt-native:do_populate_sysroot" + +SRC_URI = "http://snapshot.debian.org/archive/debian/20250301T025722Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \ + http://snapshot.debian.org/archive/debian/20250301T025722Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-1.debian.tar.xz;name=netcat-patch;subdir=${BP} \ + file://0001-bundle-own-base64-encode-decode-functions.patch \ + file://0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch \ + " + +SRC_URI[netcat.sha256sum] = "e501b0239db0d8f981b964adee74effe80e6337e5d402a00515a6df8d933269e" +SRC_URI[netcat-patch.sha256sum] = "7989cc18b3ffa4ef1da57149bd3fc03999546a91c35b82b49caf4d758015c573" + +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 + 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