public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-vpn/i2pd/files/, net-vpn/i2pd/
@ 2017-06-05 11:24 Anthony G. Basile
  0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2017-06-05 11:24 UTC (permalink / raw
  To: gentoo-commits

commit:     9b6ae0631b52d5dd18c7af7f89494972974beb9f
Author:     Alexey Korepanov <kaikaikai <AT> yandex <DOT> ru>
AuthorDate: Mon Jun  5 10:26:22 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jun  5 11:23:25 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b6ae063

net-vpn/i2pd: 2.14.0 version bump

 net-vpn/i2pd/Manifest                              |  1 +
 .../i2pd-2.14.0-fix_installed_components.patch     | 31 +++++++
 net-vpn/i2pd/i2pd-2.14.0.ebuild                    | 98 ++++++++++++++++++++++
 3 files changed, 130 insertions(+)

diff --git a/net-vpn/i2pd/Manifest b/net-vpn/i2pd/Manifest
index 228b6d925b7..d9ed33b3c30 100644
--- a/net-vpn/i2pd/Manifest
+++ b/net-vpn/i2pd/Manifest
@@ -1,3 +1,4 @@
 DIST i2pd-2.11.0.tar.gz 3091516 SHA256 4d7946e33a6a1dd4439590ea23b494f36e6fbcb81f7b36857bf264413a19e9db SHA512 c4964c23f6852e6ce225de6f6f03ce4e5c52a6ec2b925b82c01be574b14196112079ada5864b10f353c3dd385645db550d5ce290647b6d980225a79c64f19ddb WHIRLPOOL f2a4c42ad2df09188b5be8fad23f7f2ec2080e17b980b55c1647c13499c6b3cce88d6e9c2fbfd34bf8783a0b52c15659775351835ae181e58357c455ebb1dea1
 DIST i2pd-2.12.0.tar.gz 3150471 SHA256 afb763aea2a4f4b51e327352d5da82ec08e84735d28db9af7710563a117fc648 SHA512 70b6143e713d43e24b780239aed899fb17d6224ef053020c738369ca110241e4624ae5c69b04a75a037b68094d3030be5296509ff699905ef7c175447d093232 WHIRLPOOL 8b5fb9a5123ce700a646de72a81e476b3545ad62f4bb8d143438bc1e1b6393b381e13224b3d538fa063d24b732588df5b3abe9b2d5485473d83038f01d296b4e
 DIST i2pd-2.13.0.tar.gz 3131893 SHA256 9fbf9750503dd565ba5b31b16e1de959bda59530f088d40b14618d3ef238b065 SHA512 146e68559f44bcc8447857a0deb8be4a59d1b8032826af368355f9e9309b619a3575f99fed2b45071784c728a2265cb6446e816baf797b71aeffa09d1cbdd004 WHIRLPOOL 62b65f1b0cd8f9bf04bbaae61604e664f1b7f6f8eea30b9b41227659f6237e2739d3943ad91852462b229b0b4a718213b96aed63758680af135598224ca2d50f
+DIST i2pd-2.14.0.tar.gz 1906272 SHA256 3cb5751d9584449721e2f3ae878411b652863fa7093994f1d8cce1fd3b40bf71 SHA512 39e6cc0ed0456b93c9a7462e5630d7be87c3dda91887bef7aec50b404212f1cef02b94488ded1918eaf4264d9be5da767dab4652cf2b8470fadfa89886e42e7b WHIRLPOOL fcfb403889f33a0cce4ed9d9508b59c5deeade85230aec4929b0ee3a00ec57d9c3bf9644e13796e158bd1cd893f69b0cb9f86dba25543e0348ed743188dd3d2c

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 00000000000..fe7bdcc4083
--- /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/i2pd-2.14.0.ebuild b/net-vpn/i2pd/i2pd-2.14.0.ebuild
new file mode 100644
index 00000000000..752102811a0
--- /dev/null
+++ b/net-vpn/i2pd/i2pd-2.14.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils systemd user cmake-utils
+
+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 ~x86"
+IUSE="cpu_flags_x86_aes i2p-hardening libressl pch static +upnp"
+
+RDEPEND="!static? ( >=dev-libs/boost-1.49[threads]
+			!libressl? ( dev-libs/openssl:0[-bindist] )
+			libressl? ( dev-libs/libressl )
+			upnp? ( net-libs/miniupnpc )
+		)"
+DEPEND="${RDEPEND}
+	static? ( >=dev-libs/boost-1.49[static-libs,threads]
+		!libressl? ( dev-libs/openssl:0[static-libs] )
+		libressl? ( dev-libs/libressl[static-libs] )
+		upnp? ( net-libs/miniupnpc[static-libs] ) )
+	i2p-hardening? ( >=sys-devel/gcc-4.7 )
+	|| ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.3 )"
+
+I2PD_USER=i2pd
+I2PD_GROUP=i2pd
+
+CMAKE_USE_DIR="${S}/build"
+
+DOCS=( README.md contrib/i2pd.conf contrib/tunnels.conf )
+
+PATCHES=( "${FILESDIR}/${PN}-2.14.0-fix_installed_components.patch" )
+
+src_configure() {
+	mycmakeargs=(
+		-DWITH_AESNI=$(usex cpu_flags_x86_aes ON OFF)
+		-DWITH_HARDENING=$(usex i2p-hardening ON OFF)
+		-DWITH_PCH=$(usex pch ON OFF)
+		-DWITH_STATIC=$(usex static ON OFF)
+		-DWITH_UPNP=$(usex upnp ON OFF)
+		-DWITH_LIBRARY=ON
+		-DWITH_BINARY=ON
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# config
+	insinto /etc/i2pd
+	doins contrib/i2pd.conf
+	doins contrib/tunnels.conf
+
+	# grant i2pd group read and write access to config files
+	fowners "root:${I2PD_GROUP}" \
+		/etc/i2pd/i2pd.conf \
+		/etc/i2pd/tunnels.conf
+	fperms 660 \
+		/etc/i2pd/i2pd.conf \
+		/etc/i2pd/tunnels.conf
+
+	# working directory
+	keepdir /var/lib/i2pd
+	insinto /var/lib/i2pd
+	doins -r contrib/certificates
+	fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
+	fperms 700 /var/lib/i2pd/
+
+	# add /var/lib/i2pd/certificates to CONFIG_PROTECT
+	doenvd "${FILESDIR}/99i2pd"
+
+	# openrc and systemd daemon routines
+	newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd
+	newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd
+	systemd_newunit "${FILESDIR}/i2pd-2.6.0-r3.service" i2pd.service
+
+	# logrotate
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/i2pd-2.6.0-r3.logrotate" i2pd
+}
+
+pkg_setup() {
+	enewgroup "${I2PD_GROUP}"
+	enewuser "${I2PD_USER}" -1 -1 /var/lib/run/i2pd "${I2PD_GROUP}"
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/i2pd/files/, net-vpn/i2pd/
@ 2019-06-06 17:11 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2019-06-06 17:11 UTC (permalink / raw
  To: gentoo-commits

commit:     4246473bb004e13e13f1f0b79c9a612dfa881836
Author:     Alexey Korepanov <kaikaikai <AT> yandex <DOT> ru>
AuthorDate: Tue May 21 23:10:23 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun  6 17:11:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4246473b

net-vpn/i2pd: bump EAPI to 7

Signed-off-by: Alexey Korepanov <kaikaikai <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/11998
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 net-vpn/i2pd/files/i2pd-2.25.0-lib-path.patch |  22 +++++
 net-vpn/i2pd/files/i2pd-2.25.0-link.patch     |  13 +++
 net-vpn/i2pd/i2pd-2.25.0-r1.ebuild            | 123 ++++++++++++++++++++++++++
 3 files changed, 158 insertions(+)

diff --git a/net-vpn/i2pd/files/i2pd-2.25.0-lib-path.patch b/net-vpn/i2pd/files/i2pd-2.25.0-lib-path.patch
new file mode 100644
index 00000000000..af0590be32f
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.25.0-lib-path.patch
@@ -0,0 +1,22 @@
+diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
+index 949f6a46..a6d29990 100644
+--- a/build/CMakeLists.txt
++++ b/build/CMakeLists.txt
+@@ -103,8 +103,6 @@ set_target_properties(libi2pd PROPERTIES PREFIX "")
+ if (WITH_LIBRARY)
+   install(TARGETS libi2pd
+     EXPORT libi2pd
+-    ARCHIVE DESTINATION lib
+-    LIBRARY DESTINATION lib
+     COMPONENT Libraries)
+ # TODO Make libi2pd available to 3rd party projects via CMake as imported target
+ # FIXME This pulls stdafx
+@@ -135,8 +133,6 @@ set_target_properties(libi2pdclient PROPERTIES PREFIX "")
+ if (WITH_LIBRARY)
+   install(TARGETS libi2pdclient
+     EXPORT libi2pdclient
+-    ARCHIVE DESTINATION lib
+-    LIBRARY DESTINATION lib
+     COMPONENT Libraries)
+ endif()
+ 

diff --git a/net-vpn/i2pd/files/i2pd-2.25.0-link.patch b/net-vpn/i2pd/files/i2pd-2.25.0-link.patch
new file mode 100644
index 00000000000..52c5dc74527
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.25.0-link.patch
@@ -0,0 +1,13 @@
+diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
+index e50bbc865..949f6a46e 100644
+https://github.com/PurpleI2P/i2pd/issues/1353
+--- a/build/CMakeLists.txt
++++ b/build/CMakeLists.txt
+@@ -470,6 +470,7 @@ if (WITH_BINARY)
+   if (WITH_STATIC)
+     set(DL_LIB ${CMAKE_DL_LIBS})
+   endif()
++  target_link_libraries(libi2pd ${Boost_LIBRARIES} ${ZLIB_LIBRARY})
+   target_link_libraries( "${PROJECT_NAME}" libi2pd libi2pdclient ${DL_LIB} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${MINGW_EXTRA} ${DL_LIB} ${CMAKE_REQUIRED_LIBRARIES})
+ 
+   install(TARGETS "${PROJECT_NAME}" RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)

diff --git a/net-vpn/i2pd/i2pd-2.25.0-r1.ebuild b/net-vpn/i2pd/i2pd-2.25.0-r1.ebuild
new file mode 100644
index 00000000000..43a6b4401bd
--- /dev/null
+++ b/net-vpn/i2pd/i2pd-2.25.0-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit systemd user cmake-utils toolchain-funcs
+
+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 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="cpu_flags_x86_aes cpu_flags_x86_avx i2p-hardening libressl static +upnp websocket"
+
+# if using libressl, require >=boost-1.65, see #597798
+RDEPEND="
+	!static? (
+		dev-libs/boost:=[threads]
+		!libressl? ( dev-libs/openssl:0=[-bindist] )
+		libressl? (
+			dev-libs/libressl:0=
+			>=dev-libs/boost-1.65:=
+		)
+		upnp? ( net-libs/miniupnpc )
+	)"
+DEPEND="${RDEPEND}
+	static? (
+		dev-libs/boost:=[static-libs,threads]
+		!libressl? ( dev-libs/openssl:0=[static-libs] )
+		libressl? (
+			dev-libs/libressl:0=[static-libs]
+			>=dev-libs/boost-1.65:=
+		)
+		sys-libs/zlib:=[static-libs]
+		upnp? ( net-libs/miniupnpc[static-libs] )
+	)
+	websocket? ( dev-cpp/websocketpp )"
+
+I2PD_USER=i2pd
+I2PD_GROUP=i2pd
+
+CMAKE_USE_DIR="${S}/build"
+
+DOCS=( README.md contrib/i2pd.conf contrib/tunnels.conf )
+
+PATCHES=( "${FILESDIR}/${PN}-2.14.0-fix_installed_components.patch"
+	"${FILESDIR}/i2pd-2.25.0-link.patch"
+	"${FILESDIR}/i2pd-2.25.0-lib-path.patch" )
+
+pkg_pretend() {
+	if tc-is-gcc && ! ver_test "$(gcc-version)" -ge "4.7"; then
+		die "At least gcc 4.7 is required"
+	fi
+	if use i2p-hardening && ! tc-is-gcc; then
+		die "i2p-hardening requires gcc"
+	fi
+}
+
+src_configure() {
+	mycmakeargs=(
+		-DWITH_AESNI=$(usex cpu_flags_x86_aes ON OFF)
+		-DWITH_AVX=$(usex cpu_flags_x86_avx ON OFF)
+		-DWITH_HARDENING=$(usex i2p-hardening ON OFF)
+		-DWITH_PCH=OFF
+		-DWITH_STATIC=$(usex static ON OFF)
+		-DWITH_UPNP=$(usex upnp ON OFF)
+		-DWITH_WEBSOCKETS=$(usex websocket ON OFF)
+		-DWITH_LIBRARY=ON
+		-DWITH_BINARY=ON
+	)
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	# config
+	insinto /etc/i2pd
+	doins contrib/i2pd.conf
+	doins contrib/tunnels.conf
+
+	# grant i2pd group read and write access to config files
+	fowners "root:${I2PD_GROUP}" \
+		/etc/i2pd/i2pd.conf \
+		/etc/i2pd/tunnels.conf
+	fperms 660 \
+		/etc/i2pd/i2pd.conf \
+		/etc/i2pd/tunnels.conf
+
+	# working directory
+	keepdir /var/lib/i2pd
+	insinto /var/lib/i2pd
+	doins -r contrib/certificates
+	fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
+	fperms 700 /var/lib/i2pd/
+
+	# add /var/lib/i2pd/certificates to CONFIG_PROTECT
+	doenvd "${FILESDIR}/99i2pd"
+
+	# openrc and systemd daemon routines
+	newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd
+	newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd
+	systemd_newunit "${FILESDIR}/i2pd-2.6.0-r3.service" i2pd.service
+
+	# logrotate
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/i2pd-2.6.0-r3.logrotate" i2pd
+}
+
+pkg_setup() {
+	enewgroup "${I2PD_GROUP}"
+	enewuser "${I2PD_USER}" -1 -1 /var/lib/run/i2pd "${I2PD_GROUP}"
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/i2pd/files/, net-vpn/i2pd/
@ 2021-05-28  2:27 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2021-05-28  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     5dfa1de38dfbaf3e3e70bd0151d36dab66adc0fa
Author:     Alexey Korepanov <kaikaikai <AT> yandex <DOT> ru>
AuthorDate: Thu May 27 20:35:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 28 02:00:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dfa1de3

net-vpn/i2pd: update systemd service

Signed-off-by: Alexey Korepanov <kaikaikai <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/21009
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-vpn/i2pd/files/i2pd-2.38.0.service   | 37 ++++++++++++++++++++++++++++++++
 net-vpn/i2pd/files/i2pd-2.6.0-r3.service | 21 ------------------
 net-vpn/i2pd/i2pd-2.38.0.ebuild          |  2 +-
 3 files changed, 38 insertions(+), 22 deletions(-)

diff --git a/net-vpn/i2pd/files/i2pd-2.38.0.service b/net-vpn/i2pd/files/i2pd-2.38.0.service
new file mode 100644
index 00000000000..99c1bf20225
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.38.0.service
@@ -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

diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.service b/net-vpn/i2pd/files/i2pd-2.6.0-r3.service
deleted file mode 100644
index 6821a00552d..00000000000
--- a/net-vpn/i2pd/files/i2pd-2.6.0-r3.service
+++ /dev/null
@@ -1,21 +0,0 @@
-[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
-

diff --git a/net-vpn/i2pd/i2pd-2.38.0.ebuild b/net-vpn/i2pd/i2pd-2.38.0.ebuild
index 2422eec0aa6..847dab8ce29 100644
--- a/net-vpn/i2pd/i2pd-2.38.0.ebuild
+++ b/net-vpn/i2pd/i2pd-2.38.0.ebuild
@@ -75,7 +75,7 @@ src_install() {
 	# openrc and systemd daemon routines
 	newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd
 	newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd
-	systemd_newunit "${FILESDIR}/i2pd-2.6.0-r3.service" i2pd.service
+	systemd_newunit "${FILESDIR}/i2pd-2.38.0.service" i2pd.service
 
 	# logrotate
 	insinto /etc/logrotate.d


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-vpn/i2pd/files/, net-vpn/i2pd/
@ 2025-05-21 21:51 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-05-21 21:51 UTC (permalink / raw
  To: gentoo-commits

commit:     b63d81cc7eee01fd502897d82767876ac52280fc
Author:     Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Tue May  6 15:42:16 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 21 21:47:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b63d81cc

net-vpn/i2pd: add 2.56.0-r1 with improved openrc files

Basically a rewrite at this point

Added:
- name
- reload command
- required_{dirs,files}
- command_args_background
- I2PD_LOGLEVEL
- default USER & GROUP
- confd file header
Fixed:
- pidfile usage
  - properly fix for #808845
  - part of #949988 (bad shutdown)
- not changing group
Changed:
- hardcode pidfile path to /run/i2pd/
- use command_progress instead of --progress
- use command_user instead of --user
- change `retry` timeouts to match upstream
- always run with --daemon --service --log=file
- rename OPTIONS to ARGS & add default value
- rename LOG to LOGFILE & add default value
- graceful command:
  - drop eval
  - use $retry
- style
  - group subcommands stuff at the bottom
  - indent stuff
  - unquote known atomic constants
  - use " instead of ' for strings
  - confd: move unprefixed rc_ulimit to the bottom
Removed:
- use netmount
- I2P_PID_DIR

Bug: https://bugs.gentoo.org/808845
Bug: https://bugs.gentoo.org/949988
Bug: https://bugs.gentoo.org/955416
Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
Part-of: https://github.com/gentoo/gentoo/pull/41968
Closes: https://github.com/gentoo/gentoo/pull/41968
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-vpn/i2pd/files/i2pd-2.56.0.confd | 16 ++++++++
 net-vpn/i2pd/files/i2pd-2.56.0.initd | 53 +++++++++++++++++++++++++
 net-vpn/i2pd/i2pd-2.56.0-r1.ebuild   | 76 ++++++++++++++++++++++++++++++++++++
 3 files changed, 145 insertions(+)

diff --git a/net-vpn/i2pd/files/i2pd-2.56.0.confd b/net-vpn/i2pd/files/i2pd-2.56.0.confd
new file mode 100644
index 000000000000..97cb169f9c45
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.56.0.confd
@@ -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"

diff --git a/net-vpn/i2pd/files/i2pd-2.56.0.initd b/net-vpn/i2pd/files/i2pd-2.56.0.initd
new file mode 100644
index 000000000000..c58dcfcb575b
--- /dev/null
+++ b/net-vpn/i2pd/files/i2pd-2.56.0.initd
@@ -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
+}

diff --git a/net-vpn/i2pd/i2pd-2.56.0-r1.ebuild b/net-vpn/i2pd/i2pd-2.56.0-r1.ebuild
new file mode 100644
index 000000000000..0d05e22b9f24
--- /dev/null
+++ b/net-vpn/i2pd/i2pd-2.56.0-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2025 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="+upnp"
+
+DEPEND="
+	dev-libs/boost:=
+	dev-libs/openssl:0=[-bindist(-)]
+	sys-libs/zlib
+	upnp? ( net-libs/miniupnpc:= )
+"
+RDEPEND="
+	acct-user/i2pd
+	acct-group/i2pd
+	${DEPEND}
+"
+
+CMAKE_USE_DIR="${WORKDIR}/${P}/build"
+
+DOCS=( ../README.md ../contrib/i2pd.conf ../contrib/tunnels.conf )
+
+src_configure() {
+	local mycmakeargs=(
+		-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.38.0-r1.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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-21 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06 17:11 [gentoo-commits] repo/gentoo:master commit in: net-vpn/i2pd/files/, net-vpn/i2pd/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2025-05-21 21:51 Sam James
2021-05-28  2:27 Sam James
2017-06-05 11:24 Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox