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

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()