Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id CDC6D84F10 for ; Wed, 6 Dec 2023 15:56:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id taCwry2OmZc8 for ; Wed, 6 Dec 2023 15:56:57 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id EAE4184F0B for ; Wed, 6 Dec 2023 15:56:56 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id DDCEAFA42; Wed, 6 Dec 2023 15:56:56 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_170187821615550" MIME-Version: 1.0 Date: Wed, 6 Dec 2023 15:56:56 +0000 From: "David Brownlee" Subject: CVS commit: pkgsrc/www/siege To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: abs@netbsd.org X-Mailer: log_accum Message-Id: <20231206155656.DDCEAFA42@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_170187821615550 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: abs Date: Wed Dec 6 15:56:56 UTC 2023 Modified Files: pkgsrc/www/siege: Makefile distinfo pkgsrc/www/siege/patches: patch-src_init.c Added Files: pkgsrc/www/siege/patches: patch-configure patch-configure.ac patch-src_sock.c Log Message: Fix crash on BSD when concurrency > 1 Add check for getaddrinfo() for non __GLIBC__ systems, rather than falling back to mixing gethostbyname() with threads OK'd by $MAINTAINER, bump PKGREVISION To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 pkgsrc/www/siege/Makefile cvs rdiff -u -r1.8 -r1.9 pkgsrc/www/siege/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/www/siege/patches/patch-configure \ pkgsrc/www/siege/patches/patch-configure.ac \ pkgsrc/www/siege/patches/patch-src_sock.c cvs rdiff -u -r1.1 -r1.2 pkgsrc/www/siege/patches/patch-src_init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_170187821615550 Content-Disposition: inline Content-Length: 5682 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/www/siege/Makefile diff -u pkgsrc/www/siege/Makefile:1.12 pkgsrc/www/siege/Makefile:1.13 --- pkgsrc/www/siege/Makefile:1.12 Tue Oct 24 22:11:34 2023 +++ pkgsrc/www/siege/Makefile Wed Dec 6 15:56:56 2023 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.12 2023/10/24 22:11:34 wiz Exp $ +# $NetBSD: Makefile,v 1.13 2023/12/06 15:56:56 abs Exp $ # DISTNAME= siege-4.1.6 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= www MASTER_SITES= http://download.joedog.org/siege/ Index: pkgsrc/www/siege/distinfo diff -u pkgsrc/www/siege/distinfo:1.8 pkgsrc/www/siege/distinfo:1.9 --- pkgsrc/www/siege/distinfo:1.8 Sun Apr 30 18:17:39 2023 +++ pkgsrc/www/siege/distinfo Wed Dec 6 15:56:56 2023 @@ -1,6 +1,9 @@ -$NetBSD: distinfo,v 1.8 2023/04/30 18:17:39 nils Exp $ +$NetBSD: distinfo,v 1.9 2023/12/06 15:56:56 abs Exp $ BLAKE2s (siege-4.1.6.tar.gz) = 6e392874863ff175d99ab987358fa210e3b317e43ef708b63f78bcd7d7e249cd SHA512 (siege-4.1.6.tar.gz) = cc674c9dc33aac35988708cd73b5061343cb1939e8a10b4dc50ceab42e65647b58557b6f3b48a03f5c992109bcac233425bf363e1f899135cfd9333d2517cfb2 Size (siege-4.1.6.tar.gz) = 527103 bytes -SHA1 (patch-src_init.c) = 88ee2383af55c71a647ef778b728d967a6199fb2 +SHA1 (patch-configure) = 390d5e74c40a71e90b1f19b76c8f6f2b68de54d5 +SHA1 (patch-configure.ac) = 508c1b9cf6bdfde3ba6c6636b9ebc4a4723eea69 +SHA1 (patch-src_init.c) = ce88e31253e09fde3f7bcb52c777eb93f7d3b441 +SHA1 (patch-src_sock.c) = dd2452398e5ccfde9eddce116d397c484851313d Index: pkgsrc/www/siege/patches/patch-src_init.c diff -u pkgsrc/www/siege/patches/patch-src_init.c:1.1 pkgsrc/www/siege/patches/patch-src_init.c:1.2 --- pkgsrc/www/siege/patches/patch-src_init.c:1.1 Sun Aug 18 20:32:59 2019 +++ pkgsrc/www/siege/patches/patch-src_init.c Wed Dec 6 15:56:56 2023 @@ -1,7 +1,9 @@ -$NetBSD: patch-src_init.c,v 1.1 2019/08/18 20:32:59 nils Exp $ +$NetBSD: patch-src_init.c,v 1.2 2023/12/06 15:56:56 abs Exp $ Signals are defined in signal.h in *BSD +Submitted upstream as https://github.com/JoeDog/siege/pull/230 + --- src/init.c.orig 2017-09-11 17:36:08.000000000 +0000 +++ src/init.c @@ -39,7 +39,10 @@ Added files: Index: pkgsrc/www/siege/patches/patch-configure diff -u /dev/null pkgsrc/www/siege/patches/patch-configure:1.1 --- /dev/null Wed Dec 6 15:56:56 2023 +++ pkgsrc/www/siege/patches/patch-configure Wed Dec 6 15:56:56 2023 @@ -0,0 +1,26 @@ +$NetBSD: patch-configure,v 1.1 2023/12/06 15:56:56 abs Exp $ + +Add check for getaddrinfo(), for non __GLIBC__ systems + +Submitted upstream as https://github.com/JoeDog/siege/pull/232 + +--- configure.orig 2023-01-05 15:53:01.000000000 +0000 ++++ configure +@@ -21148,6 +21148,17 @@ _ACEOF + fi + done + ++for ac_func in getaddrinfo ++do : ++ ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" ++if test "x$ac_cv_func_getaddrinfo" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETADDRINFO 1 ++_ACEOF ++ ++fi ++done ++ + for ac_func in gethostbyname_r + do : + ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" Index: pkgsrc/www/siege/patches/patch-configure.ac diff -u /dev/null pkgsrc/www/siege/patches/patch-configure.ac:1.1 --- /dev/null Wed Dec 6 15:56:56 2023 +++ pkgsrc/www/siege/patches/patch-configure.ac Wed Dec 6 15:56:56 2023 @@ -0,0 +1,16 @@ +$NetBSD: patch-configure.ac,v 1.1 2023/12/06 15:56:56 abs Exp $ + +Add check for getaddrinfo(), for non __GLIBC__ systems + +Submitted upstream as https://github.com/JoeDog/siege/pull/232 + +--- configure.ac.orig 2023-12-02 16:23:14.538447643 +0000 ++++ configure.ac +@@ -332,6 +332,7 @@ AC_CHECK_FUNCS(snprintf) + AC_CHECK_FUNCS(strdup) + AC_CHECK_FUNCS(rand_r) + AC_CHECK_FUNCS(localtime_r) ++AC_CHECK_FUNCS(getaddrinfo) + AC_CHECK_FUNCS(gethostbyname_r) + AC_CHECK_FUNCS(gmtime_r) + AC_CHECK_FUNCS(getipnodebyname) Index: pkgsrc/www/siege/patches/patch-src_sock.c diff -u /dev/null pkgsrc/www/siege/patches/patch-src_sock.c:1.1 --- /dev/null Wed Dec 6 15:56:56 2023 +++ pkgsrc/www/siege/patches/patch-src_sock.c Wed Dec 6 15:56:56 2023 @@ -0,0 +1,53 @@ +$NetBSD: patch-src_sock.c,v 1.1 2023/12/06 15:56:56 abs Exp $ + +Use getaddrinfo() on more than just __GLIBC__ systems + +Submitted upstream as https://github.com/JoeDog/siege/pull/232 + +--- src/sock.c.orig 2023-01-05 15:52:49.000000000 +0000 ++++ src/sock.c +@@ -94,7 +94,7 @@ new_socket(CONN *C, const char *hostpara + char hn[512]; + int port; + int domain; +-#if defined(__GLIBC__) ++#if defined(HAVE_GETADDRINFO) + char port_str[10]; + struct addrinfo hints; + struct addrinfo *addr_res; +@@ -143,7 +143,7 @@ new_socket(CONN *C, const char *hostpara + return -1; + } + +-#if defined(__GLIBC__) ++#if defined(HAVE_GETADDRINFO) + { + snprintf(port_str, sizeof(port_str), "%d", port); + +@@ -188,7 +188,7 @@ new_socket(CONN *C, const char *hostpara + herrno = h_errno; + #endif/*OS SPECIFICS*/ + +-#if !defined(__GLIBC__) ++#if !defined(HAVE_GETADDRINFO) + /* gethostbyname only offers IPv4 support */ + domain = AF_INET; + +@@ -219,7 +219,7 @@ new_socket(CONN *C, const char *hostpara + + s_addr = (struct sockaddr *)&cli; + addrlen = sizeof(struct sockaddr_in); +-#endif /* end of __GLIBC__ not defined */ ++#endif /* end of HAVE_GETADDRINFO not defined */ + + /* create a socket, return -1 on failure */ + if (__socket_create(C, domain) < 0) { +@@ -233,7 +233,7 @@ new_socket(CONN *C, const char *hostpara + */ + conn = connect(C->sock, s_addr, addrlen); + pthread_testcancel(); +-#if defined(__GLIBC__) ++#if defined(HAVE_GETADDRINFO) + /** + * The result of getaddrinfo is a linked list. Attempt + * to connect to each result until successful --_----------=_170187821615550--