summaryrefslogtreecommitdiff
path: root/net-vpn/i2pd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-vpn/i2pd/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-vpn/i2pd/files')
-rw-r--r--net-vpn/i2pd/files/99i2pd1
-rw-r--r--net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch31
-rw-r--r--net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch30
-rw-r--r--net-vpn/i2pd/files/i2pd-2.6.0-r3.confd12
-rw-r--r--net-vpn/i2pd/files/i2pd-2.6.0-r3.initd45
-rw-r--r--net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate11
-rw-r--r--net-vpn/i2pd/files/i2pd-2.6.0-r3.service21
7 files changed, 151 insertions, 0 deletions
diff --git a/net-vpn/i2pd/files/99i2pd b/net-vpn/i2pd/files/99i2pd
new file mode 100644
index 000000000000..3cf3b46797c4
--- /dev/null
+++ b/net-vpn/i2pd/files/99i2pd
@@ -0,0 +1 @@
+CONFIG_PROTECT="/var/lib/i2pd/certificates"
diff --git a/net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch b/net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch
new file mode 100644
index 000000000000..fe7bdcc4083f
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch
@@ -0,0 +1,31 @@
+--- a/build/CMakeLists.txt
++++ b/build/CMakeLists.txt
+@@ -455,20 +455,7 @@ if (WITH_BINARY)
+ endif ()
+ endif ()
+
+-install(FILES ../LICENSE
+- DESTINATION .
+- COMPONENT Runtime
+- )
+-# Take a copy on Appveyor
+-install(FILES "C:/projects/openssl-$ENV{OPENSSL}/LICENSE"
+- DESTINATION .
+- COMPONENT Runtime
+- RENAME LICENSE_OPENSSL
+- OPTIONAL # for local builds only!
+- )
+-
+ file(GLOB_RECURSE I2PD_SOURCES "../libi2pd/*.cpp" "../libi2pd_client/*.cpp" "../daemon/*.cpp" "../build" "../Win32" "../Makefile*")
+-install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source)
+ # install(DIRECTORY ../ DESTINATION src/
+ # # OPTIONAL
+ # COMPONENT Source FILES_MATCHING
+@@ -477,7 +464,6 @@ install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source)
+ # )
+
+ file(GLOB I2PD_HEADERS "../libi2pd/*.h" "../libi2pd_client/*.h" "../daemon/*.h")
+-install(FILES ${I2PD_HEADERS} DESTINATION src/ COMPONENT Headers)
+ # install(DIRECTORY ../ DESTINATION src/
+ # # OPTIONAL
+ # COMPONENT Headers FILES_MATCHING
diff --git a/net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch b/net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch
new file mode 100644
index 000000000000..0416901117c5
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch
@@ -0,0 +1,30 @@
+--- a/build/CMakeLists.txt.old 2016-02-04 21:30:50.954251000 +0100
++++ b/build/CMakeLists.txt 2016-02-04 21:34:50.457793484 +0100
+@@ -356,10 +356,6 @@
+ endif ()
+ endif ()
+
+-install(FILES ../LICENSE
+- DESTINATION .
+- COMPONENT Runtime
+- )
+ # Take a copy on Appveyor
+ install(FILES "C:/projects/openssl-$ENV{OPENSSL}/LICENSE"
+ DESTINATION .
+@@ -369,7 +365,6 @@
+ )
+
+ file(GLOB_RECURSE I2PD_SOURCES "../*.cpp" "../build" "../Win32" "../Makefile*")
+-install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source)
+ # install(DIRECTORY ../ DESTINATION src/
+ # # OPTIONAL
+ # COMPONENT Source FILES_MATCHING
+@@ -378,7 +373,7 @@
+ # )
+
+ file(GLOB I2PD_HEADERS "../*.h")
+-install(FILES ${I2PD_HEADERS} DESTINATION src/ COMPONENT Headers)
++install(FILES ${I2PD_HEADERS} DESTINATION "include/${PROJECT_NAME}" COMPONENT Headers)
+ # install(DIRECTORY ../ DESTINATION src/
+ # # OPTIONAL
+ # COMPONENT Headers FILES_MATCHING
diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.confd b/net-vpn/i2pd/files/i2pd-2.6.0-r3.confd
new file mode 100644
index 000000000000..d2ef16b0f61c
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.confd
@@ -0,0 +1,12 @@
+I2PD_USER=i2pd
+I2PD_GROUP=i2pd
+I2PD_LOG=/var/log/i2pd.log
+I2PD_PID=/run/i2pd/i2pd.pid
+
+# max number of open files (for floodfill)
+rc_ulimit="-n 4096"
+
+# Options to i2pd
+I2PD_OPTIONS="--daemon --service --pidfile=${I2PD_PID} \
+--log=file --logfile=${I2PD_LOG} \
+--conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf"
diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.initd b/net-vpn/i2pd/files/i2pd-2.6.0-r3.initd
new file mode 100644
index 000000000000..09c83927b206
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.initd
@@ -0,0 +1,45 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="C++ daemon for accessing the I2P network"
+description_graceful="Graceful shutdown, takes 10 minutes"
+
+command="/usr/bin/i2pd"
+command_args="${I2PD_OPTIONS}"
+user="${I2PD_USER}:${I2PD_GROUP}"
+start_stop_daemon_args="
+ --user \"${user}\"
+ --pidfile \"${I2PD_PID}\"
+ --progress --retry 'SIGTERM/20/SIGKILL/20'
+"
+I2PD_PID_DIR=$(dirname "${I2PD_PID}")
+
+extra_started_commands="graceful"
+
+depend() {
+ use dns logger netmount
+}
+
+start_pre() {
+ if [ -z "${I2PD_USER}" ] || \
+ [ -z "${I2PD_GROUP}" ] || \
+ [ -z "${I2PD_PID}" ] || \
+ [ -z "${I2PD_LOG}" ] || \
+ [ -z "${I2PD_OPTIONS}" ] ; then
+ eerror "Not all variables I2PD_USER, I2PD_GROUP, I2PD_PID, I2PD_OPTIONS, I2PD_LOG are defined."
+ eerror "Check your /etc/conf.d/i2pd."
+ return 1
+ fi
+ checkpath -f -o "${user}" "${I2PD_LOG}"
+ checkpath -d -m 0750 -o "${user}" "${I2PD_PID_DIR}"
+}
+
+graceful() {
+ # on SIGINT, i2pd stops accepting tunnels and shuts down in 600 seconds
+ ebegin "Gracefully stopping i2pd, this takes 10 minutes"
+ mark_service_stopping
+ eval start-stop-daemon --stop ${start_stop_daemon_args} \
+ --exec "${command}" --retry 'SIGINT/620/SIGTERM/20/SIGKILL/20'
+ eend $? && mark_service_stopped
+}
diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate b/net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate
new file mode 100644
index 000000000000..251128b7be78
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate
@@ -0,0 +1,11 @@
+/var/log/i2pd.log {
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ create 640 i2pd i2pd
+ postrotate
+ /bin/kill -HUP $(cat /run/i2pd/i2pd.pid)
+ endscript
+}
+
diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.service b/net-vpn/i2pd/files/i2pd-2.6.0-r3.service
new file mode 100644
index 000000000000..6821a00552df
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=C++ daemon for accessing the I2P network
+After=network.target
+
+[Service]
+Type=forking
+Restart=on-abnormal
+PIDFile=/run/i2pd/i2pd.pid
+User=i2pd
+Group=i2pd
+LimitNOFILE=4096
+PermissionsStartOnly=yes
+ExecStartPre=/bin/mkdir -p /run/i2pd
+ExecStartPre=/bin/chown i2pd:i2pd /run/i2pd
+ExecStartPre=/bin/touch /run/i2pd/i2pd.pid /var/log/i2pd.log
+ExecStartPre=/bin/chown i2pd:i2pd /run/i2pd/i2pd.pid /var/log/i2pd.log
+ExecStart=/usr/bin/i2pd --daemon --service --pidfile=/run/i2pd/i2pd.pid --log=file --logfile=/var/log/i2pd.log --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf
+
+[Install]
+WantedBy=multi-user.target
+