add i2pd version and fkn (((discord)))

This commit is contained in:
2026-02-21 16:28:56 +02:00
parent 78937bd205
commit 04bcac5a8f
12 changed files with 269 additions and 2 deletions

1
net-vpn/i2pd/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST i2pd-2.59.0.tar.gz 743516 BLAKE2B 4b4497eec4a9b9b1687827e0a069e9abf3884ad8ae3a99b40aa182e327ccec0c5d2aa6d65a5e1f4bc0a3fdae847c16cf856a13fab8d163fdd2db7582f36d8095 SHA512 5fa4365eaa6fbc0e448732d3c96b867e27db21927727aeb9df8241d56fea08561028a7b6d51ba7fa1141d53c95b848108806edb9f420c2ebbed85f627f045af7

View File

@@ -0,0 +1 @@
CONFIG_PROTECT="/var/lib/i2pd/certificates"

View File

@@ -0,0 +1,37 @@
[Unit]
Description=C++ daemon for accessing the I2P network
After=network.target
[Service]
Type=forking
Restart=on-abnormal
User=i2pd
Group=i2pd
LimitNOFILE=4096
# restrictions
ProtectSystem=full
ProtectHome=yes
ProtectControlGroups=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectClock=yes
PrivateUsers=yes
PrivateDevices=yes
PrivateTmp=yes
RestrictNamespaces=yes
RestrictSUIDSGID=yes
CapabilityBoundingSet=
NoNewPrivileges=yes
RuntimeDirectory=i2pd
RuntimeDirectoryMode=0700
PIDFile=/run/i2pd/i2pd.pid
ExecStartPre=+/bin/touch /var/log/i2pd.log
ExecStartPre=+/bin/chown i2pd:i2pd /var/log/i2pd.log
ExecStartPre=+/bin/chmod 600 /var/log/i2pd.log
ExecStart=/usr/bin/i2pd --daemon --service --pidfile=${RUNTIME_DIRECTORY}/i2pd.pid --log=file --logfile=/var/log/i2pd.log --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,16 @@
# /etc/conf.d/i2pd: config file for /etc/init.d/i2pd
#I2PD_USER=i2pd
#I2PD_GROUP=i2pd
# Location of the i2pd log file
#I2PD_LOGFILE=/var/log/i2pd.log
# Minimal level of log messages (debug, info, warn, error, none)
#I2PD_LOGLEVEL="warn"
# Additional arguments passed to the daemon
#I2PD_ARGS="--floodfill"
# Max number of open files (for floodfill)
rc_ulimit="-n 4096"

View File

@@ -0,0 +1,53 @@
#!/sbin/openrc-run
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="Invisible Internet Protocol daemon"
description="C++ daemon for accessing the I2P network"
command="/usr/bin/i2pd"
pidfile="/run/i2pd/i2pd.pid"
command_args_background="--daemon --pidfile=${pidfile}"
command_progress=1
command_user="${I2PD_USER:=i2pd}:${I2PD_GROUP:=i2pd}"
retry="SIGTERM/30/SIGKILL/10"
required_dirs="/var/lib/i2pd"
required_files="/etc/i2pd/i2pd.conf"
I2PD_LOGFILE="${I2PD_LOGFILE:=/var/log/i2pd.log}"
command_args="--service --log=file \
--conf=/etc/i2pd/i2pd.conf \
--tunconf=/etc/i2pd/tunnels.conf \
--tunnelsdir=/etc/i2pd/tunnels.conf.d \
--loglevel='${I2PD_LOGLEVEL:=warn}'\
--logfile=${I2PD_LOGFILE} ${I2PD_ARGS} \
"
depend() {
use dns # for bootstrapping
use logger
}
start_pre() {
checkpath -o ${command_user} -d $(dirname ${pidfile})
checkpath -o ${command_user} -f ${I2PD_LOGFILE}
}
extra_started_commands="reload graceful"
description_reload="Reload tunnels.conf configuration"
reload() {
start-stop-daemon -s HUP -x ${command} -p ${pidfile}
eend $? "Reloaded tunnels configuration"
}
description_graceful="Graceful shutdown, takes 10 minutes"
graceful() {
# on SIGINT, i2pd stops accepting tunnels and shuts down in 10 minutes
ebegin "Gracefully stopping i2pd, this takes 10 minutes"
mark_service_stopping
start-stop-daemon -K -x ${command} -p ${pidfile} -R "SIGINT/620/${retry}"
eend $? && mark_service_stopped
}

View File

@@ -0,0 +1,13 @@
/var/log/i2pd.log {
rotate 4
weekly
missingok
notifempty
create 640 i2pd i2pd
postrotate
if [ -f /run/i2pd/i2pd.pid ]; then
/bin/kill -SIGUSR1 $(/bin/cat /run/i2pd/i2pd.pid)
fi
endscript
}

View File

@@ -0,0 +1,32 @@
From: https://github.com/PurpleI2P/i2pd/commit/06a86f31a12815fbd16615cc9fa17199bac1ac17
Bug: https://bugs.gentoo.org/969018
From: orignal <i2porignal@yandex.ru>
Date: Tue, 28 Oct 2025 17:24:48 -0400
Subject: [PATCH] exclude boost_system
---
build/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
index bc936e18846..c7389d467b3 100644
--- a/build/CMakeLists.txt
+++ b/build/CMakeLists.txt
@@ -256,14 +256,14 @@ else()
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif()
- add_definitions(-DBOOST_ATOMIC_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK)
+ add_definitions(-DBOOST_ATOMIC_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK)
if(WIN32)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
endif()
endif()
-find_package(Boost REQUIRED COMPONENTS system filesystem program_options)
+find_package(Boost REQUIRED COMPONENTS filesystem program_options)
if(NOT DEFINED Boost_FOUND)
message(SEND_ERROR "Boost is not found, or your boost version was below 1.46. Please download Boost!")
endif()

View File

@@ -0,0 +1,84 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake systemd
DESCRIPTION="A C++ daemon for accessing the I2P anonymous network"
HOMEPAGE="https://github.com/PurpleI2P/i2pd"
SRC_URI="https://github.com/PurpleI2P/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="test +upnp"
RESTRICT="!test? ( test )"
COMMON_DEPEND="
dev-libs/boost:=
dev-libs/openssl:0=[-bindist(-)]
virtual/zlib:=
upnp? ( net-libs/miniupnpc:= )
"
DEPEND="
${COMMON_DEPEND}
test? ( dev-libs/check )
"
RDEPEND="
${COMMON_DEPEND}
acct-user/i2pd
acct-group/i2pd
"
CMAKE_USE_DIR="${WORKDIR}/${P}/build"
DOCS=( ../README.md ../contrib/i2pd.conf ../contrib/tunnels.conf )
PATCHES=( "${FILESDIR}"/i2pd-2.58.0-boost-1.89.patch )
src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test ON OFF)
-DWITH_HARDENING=OFF # worsens or matches the non-hardened profiles
-DWITH_STATIC=OFF
-DWITH_UPNP=$(usex upnp ON OFF)
-DWITH_LIBRARY=ON
-DWITH_BINARY=ON
)
cmake_src_configure
}
src_install() {
cmake_src_install
# config
insinto /etc/i2pd
doins contrib/i2pd.conf
doins contrib/tunnels.conf
# working directory
insinto /var/lib/i2pd
doins -r contrib/certificates
# add /var/lib/i2pd/certificates to CONFIG_PROTECT
doenvd "${FILESDIR}/99i2pd"
# openrc and systemd daemon routines
newconfd "${FILESDIR}/i2pd-2.56.0.confd" i2pd
newinitd "${FILESDIR}/i2pd-2.56.0.initd" i2pd
systemd_newunit "${FILESDIR}/i2pd-2.38.0.service" i2pd.service
# logrotate
insinto /etc/logrotate.d
newins "${FILESDIR}/i2pd-2.57.0.logrotate" i2pd
}
pkg_postinst() {
if [[ -f ${EROOT}/etc/i2pd/subscriptions.txt ]]; then
ewarn
ewarn "Configuration of the subscriptions has been moved from"
ewarn "subscriptions.txt to i2pd.conf. We recommend updating"
ewarn "i2pd.conf accordingly and deleting subscriptions.txt."
fi
}

18
net-vpn/i2pd/metadata.xml Normal file
View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>kaikaikai@yandex.ru</email>
<name>Alexey Korepanov</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<bugs-to>https://github.com/PurpleI2P/i2pd/issues</bugs-to>
<changelog>https://github.com/PurpleI2P/i2pd/blob/openssl/ChangeLog</changelog>
<doc>https://i2pd.readthedocs.io/</doc>
<remote-id type="github">PurpleI2P/i2pd</remote-id>
</upstream>
</pkgmetadata>

12
net-vpn/metadata.xml Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<catmetadata>
<longdescription lang="en">
The net-vpn category contains packages related to virtual private
networks and tunneling utilities.
</longdescription>
<longdescription lang="de">
Die Kategorie net-vpn enthält Pakete für virtuelle private
Netze und Tunneling-Dienstprogramme.
</longdescription>
</catmetadata>