From nobody Sat Nov 19 01:38:18 2022 X-Original-To: dev-commits-ports-all@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 4NDbrp2qGdz4hHL2; Sat, 19 Nov 2022 01:38:18 +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 4NDbrp2BVjz3NfZ; Sat, 19 Nov 2022 01:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668821898; 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=bFvDjoqlmUpEm8v6PYPFuSNaF9OVG2mfFFeubxzgAzY=; b=NkHtxK+zBbcJVgBgkMhDFAbm+/AmblNhiCE56I75Di8YNNJNP/0zAvsrLeRNwhwYaF+2w7 +ULLpqmF5BX5YBEMR4dLDNikzvxa9x4MS6lNsu+XFHFq7hCb/LlWlOH3uPJrTy159zbhiR o02JZVbfoRpsrddJG45X82AFS6Ka+Z21/+PBH+gZe7XfYcprCjwvbVsgdodaBJFxWl2j4q 6K602jaL+9EXmIVfr0sBwjHoatoiYzVjyhFbSycLglkogykcQYjW6v2PnEmKFc9PpHvTax aZl8dXnOKkeCCdmYzDcrOLEoUO7yBTxQkLTjhB7uD9/qQUmgvRiohU48xZj8jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668821898; 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=bFvDjoqlmUpEm8v6PYPFuSNaF9OVG2mfFFeubxzgAzY=; b=hPDtaGEu0fi4Hyu70leyJxM8A5vd0JxzZLVH8wTjqTU55Xs0JqbbOCtIS0nhvJTxR+J/m9 Ikst3HVI4I1qvyFRbr3LZyHCYt8/CuoNXQgtilMoMHMPWPNnB0iFIac2ltx9RbatOolD6z eH7msjUI2dNjbXNSeWMyhmjPYn2+u00sDFYoO+Lhp22RlxanLE8E0efFkDQYE8p6lTha8S dKZkfpmvi8g36X26U0SU7VXomWt65dvDIwalRJDIq5RJG3yifUYlLntAjaQAIwaQOh2iCd xfw+5nnTk2bIdM2p9f3A8ye5xPLH4laCWbLHYEbfa2NRZNVebwdqHqURkqeL8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668821898; a=rsa-sha256; cv=none; b=GLZDJsK+94YB01+whuRt7Yrc17UpaOhQRNHVKBGuGM+mbtydCiWL8H0dj6K5w8DaIyESXm qa4KK8ynY7BJyaIUGLgpbdKZiGCb6+1BU45v34imFOmOwLcdRCxWfXAoG4rf3V8OpmlWey S3QIj88PlX0bZQKx+F8+7W2xs5Ggb/+RKXgn3lobFIJx6RsXX3M7rZFKS7sN0Q3sLiiFPp 7dxIqRp6aA0QBeqqV7MyMDh/AmQbOc116FnN4XyDKYR8rsSrcaq4oFIL/QX/7MWCfz7x9O bLHslMJxfeaytEi5608p+koE1VKKVt8eyF/WC8tWSFxU+8XiicON4Hqoe9hkbg== 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 4NDbrp1FdjzSMv; Sat, 19 Nov 2022 01:38:18 +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 2AJ1cIRD040479; Sat, 19 Nov 2022 01:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AJ1cIXA040478; Sat, 19 Nov 2022 01:38:18 GMT (envelope-from git) Date: Sat, 19 Nov 2022 01:38:18 GMT Message-Id: <202211190138.2AJ1cIXA040478@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "=?utf-8?Q?Alexandre=20C.=20Guimar=C3=A3es?=" Subject: git: f549e38b7705 - main - net/libutp: Update to g20180515. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rigoletto X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f549e38b77052da0a9eac3a9686e39eebac0f681 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rigoletto: URL: https://cgit.FreeBSD.org/ports/commit/?id=f549e38b77052da0a9eac3a9686e39eebac0f681 commit f549e38b77052da0a9eac3a9686e39eebac0f681 Author: Alexandre C. GuimarĂ£es AuthorDate: 2022-11-19 01:14:41 +0000 Commit: Alexandre C. GuimarĂ£es CommitDate: 2022-11-19 01:37:47 +0000 net/libutp: Update to g20180515. - move to the net-p2p category - change PORTNAME to libutp from bittorrent-libutp - switch to transmissions upstream - switch to using cmake - take maintainership. The port is clearly abbandoned Reported by: Vasileios Kalampakas --- net-p2p/Makefile | 1 + net-p2p/libutp/Makefile | 23 +++++++++++++ net-p2p/libutp/distinfo | 3 ++ net-p2p/libutp/files/patch-CMakeLists.txt | 11 +++++++ {net => net-p2p}/libutp/pkg-descr | 0 net/Makefile | 1 - net/libutp/Makefile | 36 --------------------- net/libutp/distinfo | 2 -- net/libutp/files/BSDmakefile | 16 --------- net/libutp/files/BSDmakefile.utils | 10 ------ net/libutp/files/patch-CVE-2012-6129 | 52 ----------------------------- net/libutp/files/patch-c++11 | 20 ------------ net/libutp/files/patch-size_t | 54 ------------------------------- net/libutp/files/patch-utypes | 34 ------------------- net/libutp/pkg-plist | 10 ------ 15 files changed, 38 insertions(+), 235 deletions(-) diff --git a/net-p2p/Makefile b/net-p2p/Makefile index fbb6df2e48c4..7c0c6f1730b3 100644 --- a/net-p2p/Makefile +++ b/net-p2p/Makefile @@ -50,6 +50,7 @@ SUBDIR += libtorrent SUBDIR += libtorrent-rasterbar SUBDIR += libtorrent-rasterbar2 + SUBDIR += libutp SUBDIR += lidarr SUBDIR += linuxdcpp SUBDIR += litecoin diff --git a/net-p2p/libutp/Makefile b/net-p2p/libutp/Makefile new file mode 100644 index 000000000000..60a6b5ae31ef --- /dev/null +++ b/net-p2p/libutp/Makefile @@ -0,0 +1,23 @@ +PORTNAME= libutp +DISTVERSION= g20180515 +CATEGORIES= net-p2p + +MAINTAINER= rigoletto@FreeBSD.org +COMMENT= uTorrent Transport Protocol library and sample utilities +WWW= https://github.com/bittorrent/libutp + +LICENSE= MIT + +USES= cmake uidfix + +USE_GITHUB= yes +GH_ACCOUNT= transmission +GH_TAGNAME= fda9f4b3db97ccb243fcbed2ce280eb4135d705b + +USE_LDCONFIG= yes + +PLIST_FILES= include/libutp/utp.h \ + include/libutp/utypes.h \ + lib/libutp.so + +.include diff --git a/net-p2p/libutp/distinfo b/net-p2p/libutp/distinfo new file mode 100644 index 000000000000..443fdc9d884a --- /dev/null +++ b/net-p2p/libutp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1668792304 +SHA256 (transmission-libutp-g20180515-fda9f4b3db97ccb243fcbed2ce280eb4135d705b_GH0.tar.gz) = c515e6f9add47d3d202389e8a62feb765f0ae41d6398cc238e44028be520774e +SIZE (transmission-libutp-g20180515-fda9f4b3db97ccb243fcbed2ce280eb4135d705b_GH0.tar.gz) = 71743 diff --git a/net-p2p/libutp/files/patch-CMakeLists.txt b/net-p2p/libutp/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..35e1773d3966 --- /dev/null +++ b/net-p2p/libutp/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2017-01-01 23:21:43 UTC ++++ CMakeLists.txt +@@ -11,7 +11,7 @@ include_directories(.) + + include_directories(.) + +-add_library(${PROJECT_NAME} STATIC ++add_library(${PROJECT_NAME} SHARED + utp.cpp + utp_utils.cpp + ${${PROJECT_NAME}_ADD_SOURCES} diff --git a/net/libutp/pkg-descr b/net-p2p/libutp/pkg-descr similarity index 100% rename from net/libutp/pkg-descr rename to net-p2p/libutp/pkg-descr diff --git a/net/Makefile b/net/Makefile index 7ba7eca16610..fe3553e3f36e 100644 --- a/net/Makefile +++ b/net/Makefile @@ -418,7 +418,6 @@ SUBDIR += libunp SUBDIR += libusipp SUBDIR += libusrsctp - SUBDIR += libutp SUBDIR += libvncserver SUBDIR += libwebsockets SUBDIR += libyang diff --git a/net/libutp/Makefile b/net/libutp/Makefile deleted file mode 100644 index a28e0083e1ac..000000000000 --- a/net/libutp/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -PORTNAME= bittorrent-libutp -PORTVERSION= 0.20130514 -PORTREVISION= 1 -CATEGORIES= net devel - -MAINTAINER= mi@aldan.algebra.com -COMMENT= The uTorrent Transport Protocol library and sample utilities -WWW= https://github.com/bittorrent/libutp - -LICENSE= MIT - -USE_GITHUB= yes -GH_ACCOUNT= ${PORTNAME:C/-.*//} -GH_PROJECT= ${PORTNAME:C/.*-//} -GH_TAGNAME= 7c4f19a - -USES= dos2unix uidfix -MAKEFILE= ${FILESDIR}/BSDmakefile -USE_LDCONFIG= yes - -pre-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/include/libutp - -post-build: - ${MAKE} -f ${FILESDIR}/BSDmakefile.utils -C ${WRKSRC}/utp_file PROG_CXX=utp_send - ${MAKE} -f ${FILESDIR}/BSDmakefile.utils -C ${WRKSRC}/utp_file PROG_CXX=utp_recv - ${MAKE} -f ${FILESDIR}/BSDmakefile.utils -C ${WRKSRC}/utp_test PROG_CXX=utp_test - -post-install: - ${INSTALL_PROGRAM} \ - ${WRKSRC}/utp_file/utp_send \ - ${WRKSRC}/utp_file/utp_recv \ - ${WRKSRC}/utp_test/utp_test \ - ${STAGEDIR}${PREFIX}/bin/ - -.include diff --git a/net/libutp/distinfo b/net/libutp/distinfo deleted file mode 100644 index 4b3de5dba864..000000000000 --- a/net/libutp/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (bittorrent-libutp-0.20130514-7c4f19a_GH0.tar.gz) = 690e9beeb434341d81cc51d2bbd0758e186a519673ef2f391536cdb28c5cee47 -SIZE (bittorrent-libutp-0.20130514-7c4f19a_GH0.tar.gz) = 71011 diff --git a/net/libutp/files/BSDmakefile b/net/libutp/files/BSDmakefile deleted file mode 100644 index 8fbb85bece76..000000000000 --- a/net/libutp/files/BSDmakefile +++ /dev/null @@ -1,16 +0,0 @@ -LIB= utp -SHLIB_MAJOR= 0 -SRCS= utp.cpp utp_utils.cpp -MK_PROFILE= no - -CXXFLAGS+= -fno-exceptions -fno-rtti -CXXFLAGS+= -I${.CURDIR} -I${.CURDIR}/utp_config_lib -DPOSIX -CXXFLAGS+= -Wall - -INCLUDEDIR= ${PREFIX}/include/libutp -LIBDIR= ${PREFIX}/lib -INCS= utp.h utp_utils.h utypes.h utp_file/udp.h - -WARNS= 5 - -.include diff --git a/net/libutp/files/BSDmakefile.utils b/net/libutp/files/BSDmakefile.utils deleted file mode 100644 index 5ad223344e50..000000000000 --- a/net/libutp/files/BSDmakefile.utils +++ /dev/null @@ -1,10 +0,0 @@ -# PROG_CXX defined on command-line - -SRCS= ${PROG_CXX}.cpp -MAN= -LDADD= -L.. -lutp -CXXFLAGS+= -I.. -DPOSIX - -WARNS= 3 - -.include diff --git a/net/libutp/files/patch-CVE-2012-6129 b/net/libutp/files/patch-CVE-2012-6129 deleted file mode 100644 index 0c5cf9f821c4..000000000000 --- a/net/libutp/files/patch-CVE-2012-6129 +++ /dev/null @@ -1,52 +0,0 @@ -Index: utp.cpp -=================================================================== ---- utp.cpp (revision 13645) -+++ utp.cpp (revision 13646) -@@ -1487,6 +1487,8 @@ size_t UTPSocket::selective_ack_bytes(uint base, c - return acked_bytes; - } - -+enum { MAX_EACK = 128 }; -+ - void UTPSocket::selective_ack(uint base, const byte *mask, byte len) - { - if (cur_window_packets == 0) return; -@@ -1499,7 +1501,7 @@ void UTPSocket::selective_ack(uint base, const byt - // resends is a stack of sequence numbers we need to resend. Since we - // iterate in reverse over the acked packets, at the end, the top packets - // are the ones we want to resend -- int resends[32]; -+ int resends[MAX_EACK]; - int nr = 0; - - LOG_UTPV("0x%08x: Got EACK [%032b] base:%u", this, *(uint32*)mask, base); -@@ -1572,6 +1574,12 @@ void UTPSocket::selective_ack(uint base, const byt - if (((v - fast_resend_seq_nr) & ACK_NR_MASK) <= OUTGOING_BUFFER_MAX_SIZE && - count >= DUPLICATE_ACKS_BEFORE_RESEND && - duplicate_ack < DUPLICATE_ACKS_BEFORE_RESEND) { -+ // resends is a stack, and we're mostly interested in the top of it -+ // if we're full, just throw away the lower half -+ if (nr >= MAX_EACK - 2) { -+ memmove(resends, &resends[MAX_EACK/2], MAX_EACK/2 * sizeof(resends[0])); -+ nr -= MAX_EACK / 2; -+ } - resends[nr++] = v; - LOG_UTPV("0x%08x: no ack for %u", this, v); - } else { -@@ -1580,13 +1588,12 @@ void UTPSocket::selective_ack(uint base, const byt - } - } while (--bits >= -1); - -- if (((base - 1 - fast_resend_seq_nr) & ACK_NR_MASK) < 256 && -- count >= DUPLICATE_ACKS_BEFORE_RESEND && -- duplicate_ack < DUPLICATE_ACKS_BEFORE_RESEND) { -+ if (((base - 1 - fast_resend_seq_nr) & ACK_NR_MASK) <= OUTGOING_BUFFER_MAX_SIZE && -+ count >= DUPLICATE_ACKS_BEFORE_RESEND) { - // if we get enough duplicate acks to start - // resending, the first packet we should resend - // is base-1 -- resends[nr++] = base - 1; -+ resends[nr++] = (base - 1) & ACK_NR_MASK; - } else { - LOG_UTPV("0x%08x: not resending %u count:%d dup_ack:%u fast_resend_seq_nr:%u", - this, base - 1, count, duplicate_ack, fast_resend_seq_nr); diff --git a/net/libutp/files/patch-c++11 b/net/libutp/files/patch-c++11 deleted file mode 100644 index 438d7f0aa2a2..000000000000 --- a/net/libutp/files/patch-c++11 +++ /dev/null @@ -1,20 +0,0 @@ ---- utp.cpp.orig 2013-05-14 23:05:36 UTC -+++ utp.cpp -@@ -1698,7 +1698,7 @@ void UTPSocket::apply_ledbat_ccontrol(size_t bytes_ack - // used in parse_log.py - LOG_UTP("0x%08x: actual_delay:%u our_delay:%d their_delay:%u off_target:%d max_window:%u " - "delay_base:%u delay_sum:%d target_delay:%d acked_bytes:%u cur_window:%u " -- "scaled_gain:%f rtt:%u rate:%u quota:%d wnduser:%u rto:%u timeout:%d get_microseconds:"I64u" " -+ "scaled_gain:%f rtt:%u rate:%u quota:%d wnduser:%u rto:%u timeout:%d get_microseconds:" I64u " " - "cur_window_packets:%u packet_size:%u their_delay_base:%u their_actual_delay:%u", - this, actual_delay, our_delay / 1000, their_hist.get_value() / 1000, - (int)off_target / 1000, (uint)(max_window), our_hist.delay_base, -@@ -1783,7 +1783,7 @@ size_t UTP_ProcessIncoming(UTPSocket *conn, const byte - - if (pk_flags >= ST_NUM_STATES) return 0; - -- LOG_UTPV("0x%08x: Got %s. seq_nr:%u ack_nr:%u state:%s version:%u timestamp:"I64u" reply_micro:%u", -+ LOG_UTPV("0x%08x: Got %s. seq_nr:%u ack_nr:%u state:%s version:%u timestamp:" I64u " reply_micro:%u", - conn, flagnames[pk_flags], pk_seq_nr, pk_ack_nr, statenames[conn->state], conn->version, - conn->version == 0?(uint64)(pf->tv_sec) * 1000000 + pf->tv_usec:uint64(pf1->tv_usec), - conn->version == 0?(uint32)(pf->reply_micro):(uint32)(pf1->reply_micro)); diff --git a/net/libutp/files/patch-size_t b/net/libutp/files/patch-size_t deleted file mode 100644 index ef1ed62db97c..000000000000 --- a/net/libutp/files/patch-size_t +++ /dev/null @@ -1,54 +0,0 @@ ---- utp_file/utp_recv.cpp 2013-05-14 19:05:36.000000000 -0400 -+++ utp_file/utp_recv.cpp 2015-01-22 16:45:03.000000000 -0500 -@@ -82,5 +82,5 @@ - UTPSocket *utp_socket = NULL; - FILE *file = NULL; --size_t total_recv = 0; -+intmax_t total_recv = 0; - bool no_connection = true; - -@@ -205,5 +205,5 @@ - { - assert(utp_socket == socket); -- printf("utp on_write %u\n", count); -+ printf("utp on_write %zu\n", count); - assert(false); - } -@@ -365,10 +365,10 @@ - last_recv = total_recv; - last_time = cur_time; -- printf("\r[%u] recv: %d %.1f bytes/s ", cur_time, total_recv, rate); -+ printf("\r[%u] recv: %jd %.1f bytes/s ", cur_time, total_recv, rate); - fflush(stdout); - } - } - -- printf("\nreceived: %d bytes\n", total_recv); -+ printf("\nreceived: %jd bytes\n", (intmax_t)total_recv); - fclose(file); - fclose(log_file); ---- utp_file/utp_send.cpp 2013-05-14 19:05:36.000000000 -0400 -+++ utp_file/utp_send.cpp 2015-01-22 16:45:03.000000000 -0500 -@@ -82,6 +82,6 @@ - UTPSocket *utp_socket = NULL; - FILE *file = NULL; --size_t total_sent = 0; --size_t file_size = 0; -+intmax_t total_sent = 0; -+intmax_t file_size = 0; - - void utp_log(char const* fmt, ...) -@@ -252,5 +252,5 @@ - { - assert(utp_socket == socket); -- printf("utp on_read %u\n", count); -+ printf("utp on_read %zu\n", count); - assert(false); - } -@@ -392,5 +392,5 @@ - last_sent = total_sent; - last_time = cur_time; -- printf("\r[%u] sent: %d/%d %.1f bytes/s ", cur_time, total_sent, file_size, rate); -+ printf("\r[%u] sent: %jd/%jd %.1f bytes/s ", cur_time, total_sent, file_size, rate); - fflush(stdout); - } diff --git a/net/libutp/files/patch-utypes b/net/libutp/files/patch-utypes deleted file mode 100644 index 6d86afddb4ae..000000000000 --- a/net/libutp/files/patch-utypes +++ /dev/null @@ -1,34 +0,0 @@ ---- utypes.h 2012-05-26 22:02:05.000000000 -0400 -+++ utypes.h 2012-07-26 17:21:44.000000000 -0400 -@@ -2,13 +2,15 @@ - #define __UTYPES_H__ - -+#include -+ - // standard types --typedef unsigned char byte; --typedef unsigned char uint8; --typedef signed char int8; --typedef unsigned short uint16; --typedef signed short int16; -+typedef uint8_t byte; -+typedef uint8_t uint8; -+typedef int8_t int8; -+typedef uint16_t uint16; -+typedef int16_t int16; - typedef unsigned int uint; --typedef unsigned int uint32; --typedef signed int int32; -+typedef uint32_t uint32; -+typedef int32_t int32; - - #ifdef _MSC_VER -@@ -16,6 +18,6 @@ - typedef signed __int64 int64; - #else --typedef unsigned long long uint64; --typedef long long int64; -+typedef uint64_t uint64; -+typedef int64_t int64; - #endif - diff --git a/net/libutp/pkg-plist b/net/libutp/pkg-plist deleted file mode 100644 index 5d74febba7df..000000000000 --- a/net/libutp/pkg-plist +++ /dev/null @@ -1,10 +0,0 @@ -bin/utp_send -bin/utp_recv -bin/utp_test -lib/libutp.so.0 -lib/libutp.so -lib/libutp.a -include/libutp/udp.h -include/libutp/utp.h -include/libutp/utp_utils.h -include/libutp/utypes.h