From nobody Sat Mar 11 17:52:27 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PYr974RtQz3xtRD; Sat, 11 Mar 2023 17:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PYr9742cLz3r10; Sat, 11 Mar 2023 17:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678557147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stbZN9YsrFrfvd0kKS30Waba3EsTtnxNHLOnkfZ7ga8=; b=mKlI/adHoZFjpefdihRP2sy9u/UgjWUQ3w56Q6zwT4mgoJRd61uhsfwlkGviYjVM/Fvvfl AYIflq0zb8CuveSAKQmpaSxmPIOVOBu1AkIXn7HGRO+26WYatPtIIEoAhShHwj4Uia0vIy E5BcCweR/+MrXRh75iScf3X+eejHTndsMxYCuvwt43ZhYLV/me7tiecAJR7QxgW2QdNkpj Rgp92p4gv4VjsMwPYCtYiIGRneCp5Go15NXmckx7QB+QRS28P/Fguqe3fRKHnGCVjebvA3 uy65v/sqc0Sp5UbBoOYXxNReaVD5+Y/rTmJgpd54OxOccCMIfLD+uxXYw7L1wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678557147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=stbZN9YsrFrfvd0kKS30Waba3EsTtnxNHLOnkfZ7ga8=; b=ajC+CQawOHJYoDLrZiiyOpoJlu2mOOHPqELHSO5+yE2rIT+6buTFOYHPr9QlL7NQPV69Uz xORrh+PKXV/rqN5ChkWhIYNk6EdXnvyeg7E8iLP/jZf4tfFGYVsCUQBDA9YvxZGOuc6jBm QyQLJv0elbkTsb0XAq6zkJAyK52FPITDgoR03f2ng32DhVAmnmvTxi4knEV2bIlq9ZJXt/ sNK225uBCcgD90fsH/Tk0ury6mygVtThMAvKdOFUNhKwaqF5JWtv4h9KOv6T/D3as2O9Qz 1SzAH3XNPb3HKNf5kLwutY+3lEyLWHH/9oZcCtA/wvkvnqmwrKnJ7tBo/NngMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678557147; a=rsa-sha256; cv=none; b=xN4LnoEiUflBA6Cjwh6X7cYCZAZm+bo1TwI6mx9V6aFlGJmwipIP0S54ZPAKd9eNHf+i74 jPcDo9oBqL+KXyoNMSL8bXkrZg1K51Laxk9OGdoyT22GTqWbVBko5us4H30p+17N8YxDP7 wLd/4HFlydsTi9bTBvuaATCQPsYfe8wUMsnsidCoUGwWI4owoCjQb6Uv7TGOXmo7q4Vpan QAauYfJYy3zTXsivRASwo6+EaWRKbbGv9hvXR8TfQ71ZLfuzmCRz3ufaGCO13LAFvKRVlT Esqtb1+mPZjtU0MHcODZfJmHZZvzL3M/keRWBYws+ySoOppGmfwWCS4y5GTsIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PYr97351XzfhN; Sat, 11 Mar 2023 17:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32BHqRTh002807; Sat, 11 Mar 2023 17:52:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32BHqRqb002806; Sat, 11 Mar 2023 17:52:27 GMT (envelope-from git) Date: Sat, 11 Mar 2023 17:52:27 GMT Message-Id: <202303111752.32BHqRqb002806@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dirk Meyer Subject: git: d761918ef496 - main - news/nntp: fix build on FreeBSD-14 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dinoex X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d761918ef496389a33b06cc07956e90b0f755f67 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dinoex: URL: https://cgit.FreeBSD.org/ports/commit/?id=d761918ef496389a33b06cc07956e90b0f755f67 commit d761918ef496389a33b06cc07956e90b0f755f67 Author: Dirk Meyer AuthorDate: 2023-03-11 17:51:57 +0000 Commit: Dirk Meyer CommitDate: 2023-03-11 17:51:57 +0000 news/nntp: fix build on FreeBSD-14 --- news/nntp/Makefile | 7 +-- news/nntp/distinfo | 6 +- news/nntp/files/patch-access.c | 100 ---------------------------------- news/nntp/files/patch-get_tcp_conn.c | 67 ----------------------- news/nntp/files/patch-netaux.c | 13 ----- news/nntp/files/patch-xfer-nntpxfer.c | 18 ------ 6 files changed, 5 insertions(+), 206 deletions(-) diff --git a/news/nntp/Makefile b/news/nntp/Makefile index c50c56146490..c4bc72a26abe 100644 --- a/news/nntp/Makefile +++ b/news/nntp/Makefile @@ -1,12 +1,12 @@ PORTNAME= nntp PORTVERSION= 1.5.12.2 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= news MASTER_SITES= ftp://ftp.dinoex.org/pub/c-news/ DISTNAME= ${PORTNAME}.${PORTVERSION} PATCH_SITES= ftp://ftp.dinoex.org/pub/c-news/ -PATCHFILES= nntp-patch-ansi +PATCHFILES= nntp-patch-ansi2 MAINTAINER= dinoex@FreeBSD.org COMMENT= NNTP with NOV support @@ -42,9 +42,6 @@ post-extract: ${CP} ${WRKSRC}/conf.h.dist ${WRKSRC}/conf.h post-patch: - ${REINPLACE_CMD} \ - -e 's=getline(=xmit_getline(=' \ - ${WRKSRC}/xmit/nntpxmit.c ${REINPLACE_CMD} \ -e 's=reaper()=reaper(int unused)=' \ ${WRKSRC}/server/netaux.c diff --git a/news/nntp/distinfo b/news/nntp/distinfo index 60867f3e5a65..147e2a8790d5 100644 --- a/news/nntp/distinfo +++ b/news/nntp/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1479241494 +TIMESTAMP = 1678044879 SHA256 (nntp.1.5.12.2.tar.gz) = c4b4b6e7aa6abfe06300c1667fc55049b01d9f3a2c6f8714845a1dfd4c33fe46 SIZE (nntp.1.5.12.2.tar.gz) = 153634 -SHA256 (nntp-patch-ansi) = 7f977465945aa9a051ab91c2e8648968e9f94f16b782e55ccc26b530d523c572 -SIZE (nntp-patch-ansi) = 73091 +SHA256 (nntp-patch-ansi2) = 17fc41009e826986833f7fdde80288fe781b12a19881532e8e7a338fe1e5d980 +SIZE (nntp-patch-ansi2) = 112982 diff --git a/news/nntp/files/patch-access.c b/news/nntp/files/patch-access.c deleted file mode 100644 index a5fa190c5f98..000000000000 --- a/news/nntp/files/patch-access.c +++ /dev/null @@ -1,100 +0,0 @@ ---- server/access.c.orig 2018-04-30 09:19:08 UTC -+++ server/access.c -@@ -11,6 +11,10 @@ static char sccsid[] = "@(#)$Id: access. - #endif - #include - -+#ifdef __FreeBSD__ -+# include -+#endif -+ - #define SNETMATCH 1 - #define NETMATCH 2 - -@@ -40,6 +44,12 @@ static char sccsid[] = "@(#)$Id: access. - * Side effects: None. - */ - -+typedef union { -+ struct sockaddr sa; -+ struct sockaddr_in sin; -+ struct sockaddr_in6 sin6; -+} nntp_sockaddr_union_t; -+ - #ifdef EXCELAN - extern struct sockaddr_in current_peer; - #endif -@@ -60,8 +70,7 @@ host_access(hcanread, hcanpost, hcanxfer - { - int sockt; - socklen_t length; -- struct sockaddr sa; -- struct sockaddr_in *sin = (struct sockaddr_in *) &sa; -+ nntp_sockaddr_union_t su; - #ifdef TLI - struct hostent *hp; - int argcnt = 0; -@@ -89,10 +98,11 @@ host_access(hcanread, hcanpost, hcanxfer - *hcanread = *hcanpost = *hcanxfer = 0; - - sockt = fileno(stdin); -- length = sizeof (sa); -+ length = sizeof (su); -+ int sa_len = (su.sa.sa_family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); - - #ifdef TLI -- if (t_getpeername(sockt, &sa, &length) < 0) { -+ if (t_getpeername(sockt, &su.sa, &length) < 0) { - if (isatty(sockt)) { - (void) strcpy(hostname, "stdin"); - *hcanread = 1; -@@ -110,7 +120,7 @@ host_access(hcanread, hcanpost, hcanxfer - #ifdef EXCELAN - if (raddr(current_peer.sin_addr) == NULL) { - #else -- if (getpeername(sockt, &sa, &length) < 0) { -+ if (getpeername(sockt, &su.sa, &length) < 0) { - #endif - if (isatty(sockt)) { - (void) strcpy(hostname, "stdin"); -@@ -124,24 +134,35 @@ host_access(hcanread, hcanpost, hcanxfer - return; - } - #ifdef EXCELAN -- else bcopy(¤t_peer,&sa,length); -+ else bcopy(¤t_peer,&su.sa,length); - #endif - #endif /* !TLI */ - -- switch (sa.sa_family) { -+ switch (su.sa.sa_family) { - case AF_INET: -- inet_netnames(sockt, sin, net_name, snet_name, host_name); -+ inet_netnames(sockt, &su.sin, net_name, snet_name, host_name); - break; - -+ case AF_INET6: -+ -+ getnameinfo( (struct sockaddr *) &su.sa, su.sa.sa_len, -+ host_name, sizeof(host_name), NULL, 0, 0 ); -+ net_name[0] = snet_name[0] = '\0'; -+#ifdef SYSLOG -+ syslog(LOG_DEBUG, "IPv6 connect from %s (%ld->%d/%d)", -+ host_name, sizeof(su.sa), length, su.sa.sa_len ); -+#endif -+ break; -+ - #ifdef DECNET - case AF_DECnet: -- dnet_netnames(sockt, &sa, net_name, snet_name, host_name); -+ dnet_netnames(sockt, &su.sa, net_name, snet_name, host_name); - break; - #endif - - default: - #ifdef SYSLOG -- syslog(LOG_ERR, "unknown address family %ld", (long)(sa.sa_family)); -+ syslog(LOG_ERR, "unknown address family %ld", (long)(su.sa.sa_family)); - #endif - return; - }; diff --git a/news/nntp/files/patch-get_tcp_conn.c b/news/nntp/files/patch-get_tcp_conn.c deleted file mode 100644 index 851d79dc5942..000000000000 --- a/news/nntp/files/patch-get_tcp_conn.c +++ /dev/null @@ -1,67 +0,0 @@ ---- xmit/get_tcp_conn.c.orig 2018-04-20 08:58:07 UTC -+++ xmit/get_tcp_conn.c -@@ -33,6 +33,7 @@ static const char * rcsid = "$Id: get_tc - #ifndef NONETDB - #include - #endif /* NONETDB */ -+#include - - extern char *Pname; - #ifndef BSD_44 -@@ -286,6 +287,50 @@ const char *serv; - sp.sp_protocol = (u_short)IPPROTO_TCP; - #endif /* OLDSOCKET */ - -+#ifndef PRE_IPv6 -+ /* see "man getaddrinfo()" */ -+ struct addrinfo hints, *addrs, *ai_p; -+ int r; -+ -+ memset( &hints, 0, sizeof(hints) ); -+ hints.ai_family = PF_UNSPEC; -+ hints.ai_socktype = SOCK_STREAM; -+ if ( (r = getaddrinfo( host, "nntp", &hints, &addrs )) != 0 ) -+ { -+ fprintf( stderr, "getaddrinfo(%s/nntp): %s", host, -+ gai_strerror(r)); -+ return(NOHOST); -+ } -+ sock=-1; -+ for( ai_p = addrs; ai_p != NULL; ai_p = ai_p->ai_next ) -+ { -+ sock = socket( ai_p->ai_family, ai_p->ai_socktype, -+ ai_p->ai_protocol); -+ if ( sock < 0 ) {continue;} -+ if ( connect( sock, ai_p->ai_addr, ai_p->ai_addrlen ) < 0 ) -+ { -+ fprintf( stderr, "connect() failed: %s", strerror(errno)); -+ close(sock); -+ sock=-1; -+ continue; -+ } -+ if ( ai_p->ai_family == AF_INET6 ) -+ { -+ char addrbuf[100]; -+ inet_ntop( ai_p->ai_family, ai_p->ai_addr, -+ addrbuf, sizeof(addrbuf) ); -+ syslog(LOG_INFO, "IPv6 connect to %s (%s) - yeah!", -+ host, addrbuf ); -+ } -+ break; -+ } -+ freeaddrinfo(addrs); -+ if ( sock < 0 ) { return(FAIL); } -+ -+ /* TODO: keepalives! */ -+ return(sock); -+ -+#else /*PRE_IPv6*/ - if ((addrlist = name_to_address(host)) == (struct in_addr **)NULL) { - return(NOHOST); - } -@@ -330,4 +375,5 @@ const char *serv; - } - } - return(FAIL); -+#endif /* PRE_IPv6 */ - } diff --git a/news/nntp/files/patch-netaux.c b/news/nntp/files/patch-netaux.c deleted file mode 100644 index 2dea3a1a852f..000000000000 --- a/news/nntp/files/patch-netaux.c +++ /dev/null @@ -1,13 +0,0 @@ ---- server/netaux.c.orig 2018-04-30 06:13:43 UTC -+++ server/netaux.c -@@ -281,10 +281,4 @@ reaper(int unused) - - #else /* !ALONE */ - --/* Kludge for greenhill's C compiler */ -- --static --netaux_greenkludge() --{ --} - #endif /* not ALONE */ diff --git a/news/nntp/files/patch-xfer-nntpxfer.c b/news/nntp/files/patch-xfer-nntpxfer.c deleted file mode 100644 index 94de45437f4d..000000000000 --- a/news/nntp/files/patch-xfer-nntpxfer.c +++ /dev/null @@ -1,18 +0,0 @@ ---- xfer/nntpxfer.c.orig 1996-01-09 07:28:03 UTC -+++ xfer/nntpxfer.c -@@ -547,12 +556,14 @@ char *articleid; - int len; - #endif - char id[BUFSIZ]; -+#ifndef CNEWS - char *p; -+#endif - - /* remove any case sensitivity */ - (void) strcpy(id, articleid); -- p = id; - #ifndef CNEWS -+ p = id; - while (*p) - { - if (isupper(*p))