On Sat, 17 Aug, 2024 at 03:14:29 +0000, Theo Buehler wrote:
> On Sat, Aug 17, 2024 at 04:58:14AM +0200, David Uhden Collado wrote:
> > > Initially, I tried to update this port to version 2.53.0 but encountered
> > > compilation errors [2] due to the lack of SipHash in LibreSSL. For a
> > > moment, I thought I would have to add OpenSSL as a dependency to resolve
> > > the issue. Fortunately, the I2Pd developers fixed this problem in
> > > version 2.53.1.
> >
> > Recently, another issue arose with the use of I2Pd in conjunction with
> > LibreSSL [1].
>
> This problem is on -stable, not on -current.
I can confirm that i2pd-2.53.1 (the latest tagged release) runs fine on
-current, but not on -stable.
> > This was reported by the user SystemFailure, who has also
> > proposed other updates for this port in the past and appears to have
> > recently been testing version 2.53.1. Fortunately, the problem was finally
> > resolved a few days ago [2].
>
> Well, a hack was added for -stable which we now get to run in -current
> once we pull in that diff.
This hack makes i2pd-2.53.1 run on -stable, at least for me. Which I find
useful :-)
Since this "hackish" commit is not needed for -current, we can always ask the
i2pd devs to revert it when the next -stable release will be out. I'll try to
remember to do that :-)
> > Therefore, I think it would be better to either
> > update to the latest commit or wait for the next stable version to update
> > the port.
>
> I don't think so. But someone who knows how to run this software and
> wants to should test...
>
> >
> > References:
> > 1. https://github.com/PurpleI2P/i2pd/issues/2082
> > 2.
> > https://github.com/PurpleI2P/i2pd/commit/0c924836cf9ae04cd12e2647e6edd5c0f896ff7b
> >
IMHO the net/i2pd port can be updated to 2.53.1, without the aforementioned
hack, but with the UPnP flavor proposed by David.
I didn't test this flavor myself, but I guess such a feature is useful for
people running i2pd client-side and it has already been requested by other
folks in the past.
Please find attached 2 patches: one for -current, largely based on David's
suggestions, and another one for -stable, with the aforementioned commit
included included as a patch, for those who would wand to try this out. Both
build and run fine on amd64, with all tests passing.
Cheers.
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/i2pd/Makefile,v
diff -u -p -r1.24 Makefile
--- Makefile 27 May 2024 08:13:51 -0000 1.24
+++ Makefile 19 Aug 2024 13:28:48 -0000
@@ -2,7 +2,7 @@ COMMENT = client for the I2P anonymous n
GH_ACCOUNT = PurpleI2P
GH_PROJECT = i2pd
-GH_TAGNAME = 2.52.0
+GH_TAGNAME = 2.53.1
CATEGORIES = net
HOMEPAGE = https://i2pd.website
@@ -20,6 +20,15 @@ LIB_DEPENDS = devel/boost
# for tests
USE_GMAKE = Yes
+
+FLAVORS+=upnp
+FLAVOR?=
+
+.if ${FLAVOR:Mupnp}
+WANTLIB += miniupnpc
+LIB_DEPENDS += net/miniupnp/miniupnpc
+CONFIGURE_ARGS += -DWITH_UPNP=ON
+.endif
WRKSRC = ${WRKDIST}/build
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/i2pd/distinfo,v
diff -u -p -r1.19 distinfo
--- distinfo 27 May 2024 08:13:51 -0000 1.19
+++ distinfo 19 Aug 2024 13:28:48 -0000
@@ -1,2 +1,2 @@
-SHA256 (i2pd-2.52.0.tar.gz) = 9fr6cAth0HkdN72O7gSRJYLqXj87HYDsM5vYFYowmVs=
-SIZE (i2pd-2.52.0.tar.gz) = 677023
+SHA256 (i2pd-2.53.1.tar.gz) = xoY9hTkF51lOpmFZXqWRBV+PLwGLm5BQfVpDpkVhiOo=
+SIZE (i2pd-2.53.1.tar.gz) = 677029
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/net/i2pd/pkg/DESCR,v
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR 16 Jun 2019 22:13:55 -0000 1.1.1.1
+++ pkg/DESCR 19 Aug 2024 13:28:48 -0000
@@ -3,5 +3,8 @@ i2pd is a full featured client for the I
I2P (Invisible Internet Project) is a universal anonymous network layer.
All communications over I2P are anonymous and end-to-end encrypted.
Participants don't reveal their real IP address to each other. Peer to
-peer (cryptocorruencies, file sharing) and client-to-server applications
+peer (cryptocurrencies, file sharing) and client-to-server applications
(websites, instant messengers, chat servers) are supported.
+
+Flavors:
+ upnp - Built with UPnP support
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/i2pd/pkg/PLIST,v
diff -u -p -r1.13 PLIST
--- pkg/PLIST 16 Apr 2024 15:22:32 -0000 1.13
+++ pkg/PLIST 19 Aug 2024 13:28:48 -0000
@@ -8,7 +8,6 @@ include/i2pd/BOB.h
include/i2pd/Base.h
include/i2pd/Blinding.h
include/i2pd/CPU.h
-include/i2pd/ChaCha20.h
include/i2pd/ClientContext.h
include/i2pd/Config.h
include/i2pd/Crypto.h
@@ -38,7 +37,6 @@ include/i2pd/Log.h
include/i2pd/MatchedDestination.h
include/i2pd/NTCP2.h
include/i2pd/NetDbRequests.h
-include/i2pd/Poly1305.h
include/i2pd/Profiling.h
include/i2pd/Queue.h
include/i2pd/Reseed.h
@@ -190,12 +188,6 @@ share/examples/i2pd/certificates/reseed/
@owner _i2pd
@group _i2pd
@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/reseed/lazygravy_at_mail.i2p.crt
-@owner
-@group
-share/examples/i2pd/certificates/reseed/ls_at_mail.i2p.crt
-@owner _i2pd
-@group _i2pd
-@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/reseed/ls_at_mail.i2p.crt
@owner
@group
share/examples/i2pd/certificates/reseed/orignal_at_mail.i2p.crt
? patches/patch-libi2pd_Crypto_cpp
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/i2pd/Makefile,v
diff -u -p -r1.22.2.1 Makefile
--- Makefile 27 May 2024 08:46:58 -0000 1.22.2.1
+++ Makefile 19 Aug 2024 11:03:42 -0000
@@ -2,7 +2,7 @@ COMMENT = client for the I2P anonymous n
GH_ACCOUNT = PurpleI2P
GH_PROJECT = i2pd
-GH_TAGNAME = 2.52.0
+GH_TAGNAME = 2.53.1
CATEGORIES = net
HOMEPAGE = https://i2pd.website
@@ -20,6 +20,15 @@ LIB_DEPENDS = devel/boost
# for tests
USE_GMAKE = Yes
+
+FLAVORS+=upnp
+FLAVOR?=
+
+.if ${FLAVOR:Mupnp}
+WANTLIB += miniupnpc
+LIB_DEPENDS += net/miniupnp/miniupnpc
+CONFIGURE_ARGS += -DWITH_UPNP=ON
+.endif
WRKSRC = ${WRKDIST}/build
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/i2pd/distinfo,v
diff -u -p -r1.17.2.1 distinfo
--- distinfo 27 May 2024 08:46:58 -0000 1.17.2.1
+++ distinfo 19 Aug 2024 11:03:42 -0000
@@ -1,2 +1,2 @@
-SHA256 (i2pd-2.52.0.tar.gz) = 9fr6cAth0HkdN72O7gSRJYLqXj87HYDsM5vYFYowmVs=
-SIZE (i2pd-2.52.0.tar.gz) = 677023
+SHA256 (i2pd-2.53.1.tar.gz) = xoY9hTkF51lOpmFZXqWRBV+PLwGLm5BQfVpDpkVhiOo=
+SIZE (i2pd-2.53.1.tar.gz) = 677029
Index: patches/patch-libi2pd_Crypto_cpp.orig
===================================================================
RCS file: patches/patch-libi2pd_Crypto_cpp.orig
diff -N patches/patch-libi2pd_Crypto_cpp.orig
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-libi2pd_Crypto_cpp.orig 19 Aug 2024 11:03:42 -0000
@@ -0,0 +1,19 @@
+Index: libi2pd/Crypto.cpp
+--- libi2pd/Crypto.cpp.orig
++++ libi2pd/Crypto.cpp
+@@ -997,6 +997,15 @@
+ }
+ else
+ {
++#if defined(LIBRESSL_VERSION_NUMBER)
++ std::vector<uint8_t> m(msgLen + 16);
++ if (msg == buf)
++ {
++ // we have to use different buffers otherwise verification fails
++ memcpy (m.data (), msg, msgLen + 16);
++ msg = m.data ();
++ }
++#endif
+ EVP_DecryptInit_ex(ctx, EVP_chacha20_poly1305(), 0, 0, 0);
+ EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, 12, 0);
+ EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, 16, (uint8_t *)(msg + msgLen));
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/i2pd/pkg/PLIST,v
diff -u -p -r1.12.2.1 PLIST
--- pkg/PLIST 27 May 2024 08:46:58 -0000 1.12.2.1
+++ pkg/PLIST 19 Aug 2024 11:03:42 -0000
@@ -8,7 +8,6 @@ include/i2pd/BOB.h
include/i2pd/Base.h
include/i2pd/Blinding.h
include/i2pd/CPU.h
-include/i2pd/ChaCha20.h
include/i2pd/ClientContext.h
include/i2pd/Config.h
include/i2pd/Crypto.h
@@ -38,7 +37,6 @@ include/i2pd/Log.h
include/i2pd/MatchedDestination.h
include/i2pd/NTCP2.h
include/i2pd/NetDbRequests.h
-include/i2pd/Poly1305.h
include/i2pd/Profiling.h
include/i2pd/Queue.h
include/i2pd/Reseed.h
@@ -190,12 +188,6 @@ share/examples/i2pd/certificates/reseed/
@owner _i2pd
@group _i2pd
@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/reseed/lazygravy_at_mail.i2p.crt
-@owner
-@group
-share/examples/i2pd/certificates/reseed/ls_at_mail.i2p.crt
-@owner _i2pd
-@group _i2pd
-@sample ${LOCALSTATEDIR}/lib/i2pd/certificates/reseed/ls_at_mail.i2p.crt
@owner
@group
share/examples/i2pd/certificates/reseed/orignal_at_mail.i2p.crt