netcat-openbsd: upgrade 1.228 -> 1.238

Update the Debian-snapshot SRC_URI to snapshot.debian.org's 1.238-1
timestamp (20260519T203124Z). LIC_FILES_CHKSUM is refreshed since
debian/copyright's md5 changed (license text/terms unchanged,
BSD-3-Clause).

0001-fix-netcat-openbsd-ftbfs-with-GCC-15.patch is dropped: Debian's
own quilt-patches/quit-timer.patch (applied before our OE patches via
netcat_do_patch) already changes quit() to take an int sig argument in
1.238-1, making our GCC-15 fix fully redundant.

0001-bundle-own-base64-encode-decode-functions.patch is kept (still
needed, no libc-provided b64_ntop/b64_pton) but rebased: the Makefile
hunk's context line changed from "LIBS=" to "LIBS ?=" and the netcat.c
hunk's context line changed from "static void quit();" to
"static void quit(int sig);" following the quit-timer.patch rebase
upstream; both are updated to apply without fuzz.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Khem Raj
2026-08-06 11:17:21 +00:00
parent 14ae5e5323
commit d07e2e94f3
3 changed files with 9 additions and 61 deletions
@@ -32,8 +32,8 @@ index 8247cfd..b8d8547 100644
+SRCS= netcat.c atomicio.c socks.c base64.c
PKG_CONFIG ?= pkg-config
-LIBS= `$(PKG_CONFIG) --libs libbsd` -lresolv
+LIBS= `$(PKG_CONFIG) --libs libbsd`
-LIBS ?= `$(PKG_CONFIG) --libs libbsd` -lresolv
+LIBS ?= `$(PKG_CONFIG) --libs libbsd`
OBJS= $(SRCS:.c=.o)
CFLAGS= -g -O2
LDFLAGS= -Wl,--no-add-needed
@@ -362,8 +362,8 @@ index a0fb51b..9c4ed23 100644
+++ b/netcat.c
@@ -239,6 +239,9 @@ 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);
+
@@ -1,51 +0,0 @@
From 4ca437b129252635e89694446945e69912300ceb Mon Sep 17 00:00:00 2001
From: "mark.yang" <mark.yang@lge.com>
Date: Wed, 16 Apr 2025 20:35:46 +0900
Subject: [PATCH] fix netcat-openbsd: ftbfs with GCC-15
* fix build failure with GCC-15
netcat.c:1443:41: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
1443 | signal(SIGALRM, quit);
| ^~~~
| |
| void (*)(void)
In file included from netcat.c:100:
TOPDIR/tmp/work/core2-64-oe-linux/netcat-openbsd/1.195/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)'
88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
| ~~~~~~~~~~~~~~~^~~~~~~~~
netcat.c:241:13: note: 'quit' declared here
241 | static void quit();
| ^~~~
TOPDIR/tmp/work/core2-64-oe-linux/netcat-openbsd/1.195/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
72 | typedef void (*__sighandler_t) (int);
| ^~~~~~~~~~~~~~
make: *** [Makefile:17: netcat.o] Error 1
Upstream-Status: Submitted [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097448]
Signed-off-by: mark.yang <mark.yang@lge.com>
---
netcat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/netcat.c b/netcat.c
index 62d01d8..7367f47 100644
--- a/netcat.c
+++ b/netcat.c
@@ -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);
@@ -2347,7 +2347,7 @@ usage(int ret)
* quit()
* handler for a "-q" timeout (exit 0 instead of 1)
*/
-static void quit()
+static void quit(__attribute__((unused)) int sig)
{
exit(0);
}
@@ -2,19 +2,18 @@ require netcat.inc
SUMMARY = "OpenBSD Netcat"
HOMEPAGE = "http://ftp.debian.org"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=7c58e21ba8c9e76c25f46b2182b23bb8"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=258066eab695382a48c91d09e865d7c3"
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} \
SRC_URI = "http://snapshot.debian.org/archive/debian/20260519T203124Z/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \
http://snapshot.debian.org/archive/debian/20260519T203124Z/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"
SRC_URI[netcat.sha256sum] = "9f72a37d85dec1366309fdb0172be4e67e09ec26e89f13156315149e17c02479"
SRC_URI[netcat-patch.sha256sum] = "eefeb9ff863ebd4384274b132a3ff9b492aacb244e445c34dbfb36cfee596930"
inherit pkgconfig