Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Feb 2026 07:48:06 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ee392a20fc25 - main - net-p2p/xbt: unbreak the build and update to the latest GitHub snapshot
Message-ID:  <6986ee36.37f41.6e13f68@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ee392a20fc2590bc5f44147dfb4361242397b9ba

commit ee392a20fc2590bc5f44147dfb4361242397b9ba
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2026-02-07 07:47:02 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2026-02-07 07:47:02 +0000

    net-p2p/xbt: unbreak the build and update to the latest GitHub snapshot
    
    - Revert some changes made upstream so we stay compatible with C++17
    - Do not increase UDP sent packets counter if sendto() call failed
    - Don't try to be smart and assume BSD make (see commit 3129c2094ecb
      for detailed explanation)
    - Use more accurate values for WWW and BUILD_DEPENDS, add PORTSCOUT
    
    Reported by:    pkg-fallout
---
 net-p2p/xbt/Makefile                               | 11 ++++++-----
 net-p2p/xbt/distinfo                               |  6 +++---
 net-p2p/xbt/files/makefile                         |  2 +-
 net-p2p/xbt/files/patch-Tracker_connection.cpp     | 15 +++++++++++++++
 net-p2p/xbt/files/patch-Tracker_tracker__input.cpp | 14 --------------
 net-p2p/xbt/files/patch-Tracker_transaction.cpp    | 13 +++++++++++++
 6 files changed, 38 insertions(+), 23 deletions(-)

diff --git a/net-p2p/xbt/Makefile b/net-p2p/xbt/Makefile
index e680d3c0c3b2..00ff2a8540c2 100644
--- a/net-p2p/xbt/Makefile
+++ b/net-p2p/xbt/Makefile
@@ -1,21 +1,20 @@
 PORTNAME=	xbt
-PORTVERSION=	g20221002
-PORTREVISION=	1
+PORTVERSION=	g20251212
 CATEGORIES=	net-p2p
 
 MAINTAINER=	danfe@FreeBSD.org
 COMMENT=	High-performance low-overhead BitTorrent tracker
-WWW=		https://xbtt.sourceforge.net/
+WWW=		https://xbtt.sourceforge.net/tracker.html
 
 LICENSE=	GPLv3
 
-BUILD_DEPENDS=	${LOCALBASE}/include/boost/asio.hpp:devel/boost-libs
+BUILD_DEPENDS=	${LOCALBASE}/include/boost/format.hpp:devel/boost-libs
 
 USES=		compiler:c++17-lang mysql pkgconfig
 IGNORE_WITH_MYSQL=	105m 106m 1011m
 USE_GITHUB=	yes
 GH_ACCOUNT=	OlafvdSpek
-GH_TAGNAME=	9c7dbc4
+GH_TAGNAME=	c5bcfe6
 
 MAKEFILE=	${FILESDIR}/makefile
 
@@ -23,6 +22,8 @@ PLIST_FILES=	bin/${PORTNAME}_tracker \
 		@sample\ etc/xbt_tracker.conf.sample \
 		${DATADIR_REL}/xbt_tracker.sql
 
+PORTSCOUT=	ignore:1	# plenty of old tags from 2008 and earlier
+
 do-install:
 	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME}_tracker \
 		${STAGEDIR}${PREFIX}/bin
diff --git a/net-p2p/xbt/distinfo b/net-p2p/xbt/distinfo
index 079effc2084c..98fe730c65a5 100644
--- a/net-p2p/xbt/distinfo
+++ b/net-p2p/xbt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1664705861
-SHA256 (OlafvdSpek-xbt-g20221002-9c7dbc4_GH0.tar.gz) = dfc99aa59f661f5df2479cc10f27422b51b696353bfd1cbb2cfe5a155e25989c
-SIZE (OlafvdSpek-xbt-g20221002-9c7dbc4_GH0.tar.gz) = 276909
+TIMESTAMP = 1765538944
+SHA256 (OlafvdSpek-xbt-g20251212-c5bcfe6_GH0.tar.gz) = 3cf4b46ea65816a96de2a6bf09890e6a3530da7e50ceb61b3b6768d8812dd9c1
+SIZE (OlafvdSpek-xbt-g20251212-c5bcfe6_GH0.tar.gz) = 281679
diff --git a/net-p2p/xbt/files/makefile b/net-p2p/xbt/files/makefile
index f6f6f0f55679..b55dba2e8257 100644
--- a/net-p2p/xbt/files/makefile
+++ b/net-p2p/xbt/files/makefile
@@ -23,7 +23,7 @@ CCACHE!=	command -v ccache
 	$(CCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $<
 
 xbt_tracker: $(misc_OBJS) $(tracker_OBJS)
-	$(CXX) $(LDFLAGS) -o $@ $>$^ $(LIBS)
+	$(CXX) $(LDFLAGS) -o $@ $> $(LIBS)
 
 all: xbt_tracker
 
diff --git a/net-p2p/xbt/files/patch-Tracker_connection.cpp b/net-p2p/xbt/files/patch-Tracker_connection.cpp
new file mode 100644
index 000000000000..3561caf77521
--- /dev/null
+++ b/net-p2p/xbt/files/patch-Tracker_connection.cpp
@@ -0,0 +1,15 @@
+--- Tracker/connection.cpp.orig	2025-12-12 11:29:04 UTC
++++ Tracker/connection.cpp
+@@ -248,10 +248,10 @@ void connection_t::read(std::string_view v)
+     if (WSAGetLastError() != WSAECONNRESET)
+       std::cerr << "send failed: " << Csocket::error2a(WSAGetLastError()) << std::endl;
+   }
+-  else if (r != ssize(h) + ssize(s))
++  else if (static_cast<size_t>(r) != h.size() + s.size())
+   {
+ #ifndef WIN32
+-    if (r < ssize(h))
++    if (static_cast<size_t>(r) < h.size())
+     {
+       write_b_ = shared_data(h.size() + s.size());
+       memcpy(write_b_.data(), h);
diff --git a/net-p2p/xbt/files/patch-Tracker_tracker__input.cpp b/net-p2p/xbt/files/patch-Tracker_tracker__input.cpp
deleted file mode 100644
index ba42a11ad1bc..000000000000
--- a/net-p2p/xbt/files/patch-Tracker_tracker__input.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- Tracker/tracker_input.cpp.orig	2023-01-10 00:32:43 UTC
-+++ Tracker/tracker_input.cpp
-@@ -1,9 +1,9 @@
- #include "stdafx.h"
- #include "tracker_input.h"
- 
--static std::array<char, 16> to_ipv6(uint32_t v)
-+static std::array<signed char, 16> to_ipv6(uint32_t v)
- {
--	std::array<char, 16> res = { 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0 };
-+	std::array<signed char, 16> res = { 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0 };
- 	memcpy(&res[12], &v, 4);
- 	return res;
- }
diff --git a/net-p2p/xbt/files/patch-Tracker_transaction.cpp b/net-p2p/xbt/files/patch-Tracker_transaction.cpp
new file mode 100644
index 000000000000..873c5abb3b89
--- /dev/null
+++ b/net-p2p/xbt/files/patch-Tracker_transaction.cpp
@@ -0,0 +1,13 @@
+--- Tracker/transaction.cpp.orig	2025-12-12 11:29:04 UTC
++++ Tracker/transaction.cpp
+@@ -149,7 +149,8 @@ void Ctransaction::send_error(data_ref r, std::string_
+ 
+ void Ctransaction::send(data_ref b)
+ {
+-  if (m_s.sendto(b, reinterpret_cast<const sockaddr*>(&m_a), sizeof(sockaddr_in)) != std::ssize(b))
++  if (m_s.sendto(b, reinterpret_cast<const sockaddr*>(&m_a), sizeof(sockaddr_in)) == -1)
+     std::cerr << "send failed: " << Csocket::error2a(WSAGetLastError()) << std::endl;
+-  srv_stats().sent_udp++;
++  else
++    srv_stats().sent_udp++;
+ }


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6986ee36.37f41.6e13f68>