summaryrefslogtreecommitdiff
path: root/net-vpn/i2p
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-20 16:18:45 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-20 16:18:45 +0100
commit2ffbfc63824a9e437090fb3c744670dd45369ae0 (patch)
treead31a5650e31f93490157943681bb982f8a4520c /net-vpn/i2p
parent399fa07bfac673a8846466b16c76549e329b55b8 (diff)
gentoo auto-resync : 20:05:2023 - 16:18:45
Diffstat (limited to 'net-vpn/i2p')
-rw-r--r--net-vpn/i2p/Manifest11
-rw-r--r--net-vpn/i2p/files/1.7.0-i2p.init17
-rw-r--r--net-vpn/i2p/files/1.7.0-i2p.service10
-rw-r--r--net-vpn/i2p/files/2.1.0-fix-getopt-classpath.patch24
-rw-r--r--net-vpn/i2p/files/i2p.init10
-rw-r--r--net-vpn/i2p/files/i2p.service3
-rw-r--r--net-vpn/i2p/i2p-1.7.0-r1.ebuild (renamed from net-vpn/i2p/i2p-1.7.0.ebuild)14
-rw-r--r--net-vpn/i2p/i2p-2.1.0-r1.ebuild225
8 files changed, 294 insertions, 20 deletions
diff --git a/net-vpn/i2p/Manifest b/net-vpn/i2p/Manifest
index 4a1a9cbaa6f9..f400b32ba804 100644
--- a/net-vpn/i2p/Manifest
+++ b/net-vpn/i2p/Manifest
@@ -1,5 +1,10 @@
-AUX i2p.init 391 BLAKE2B e62a23021db61ba93adaf1ff9c2f0bb9372cee3921544c9ca498f3472dc64c700a0fb78d2fed9dafc0fa98c97670f67266a2e0f8c594c7c1352d15e1b23d7586 SHA512 12c69b2c5918a23219d84f2c1ded286ced6f78564241372bead318ddcb77876e90c800735f7ed6e92c03f69dfeb990ec43e40efd1e9ee32888b404d1e2e9643a
-AUX i2p.service 253 BLAKE2B 2647a1920083fedf88b351b084d3a4d177393065da3dc7aecbeb09e1afc3373116f972c40db4500f76fe1a983ac24503d9a95ee08917ff7625946e4928449512 SHA512 59639b4f78637e5b03ed67b7e08d21bc873c844b474df3ed9101b34934a4c22aef46db1b66cbdc9aad2438ee84f130230c368a78b5bb1017843f016bba6c30e5
+AUX 1.7.0-i2p.init 391 BLAKE2B e62a23021db61ba93adaf1ff9c2f0bb9372cee3921544c9ca498f3472dc64c700a0fb78d2fed9dafc0fa98c97670f67266a2e0f8c594c7c1352d15e1b23d7586 SHA512 12c69b2c5918a23219d84f2c1ded286ced6f78564241372bead318ddcb77876e90c800735f7ed6e92c03f69dfeb990ec43e40efd1e9ee32888b404d1e2e9643a
+AUX 1.7.0-i2p.service 253 BLAKE2B 2647a1920083fedf88b351b084d3a4d177393065da3dc7aecbeb09e1afc3373116f972c40db4500f76fe1a983ac24503d9a95ee08917ff7625946e4928449512 SHA512 59639b4f78637e5b03ed67b7e08d21bc873c844b474df3ed9101b34934a4c22aef46db1b66cbdc9aad2438ee84f130230c368a78b5bb1017843f016bba6c30e5
+AUX 2.1.0-fix-getopt-classpath.patch 1164 BLAKE2B 555679640b2639174b99e4e1e5dc7e6a0a235e706619c77a833ee86b9c04c4d7c60cad074aa2650919fa4ea248a4015b984fbd3b19f443b2a8ba4174e5a19e82 SHA512 cf99289659b8f08ae33f942347444e04a82e7bd1b8802c8b472f9484c950fd23be47de6fc1c067b4c68f5b7650295b993f94af54749f800d7a6bed227b595461
+AUX i2p.init 278 BLAKE2B 2e26e9d25e21494d2f6a221a3c332f1afe475513096eb7c51a0fbc4cacc8e9bd418f98d622cb054f55d7b7c4941054be8b6314f9b19c249e9ad0e77893980ca6 SHA512 1edb33cd0df28de95e02b1015e86cbc44c867a8df1260abb0565bc232c2cccc2625d36fdefa4a050ea3215d938c1ff0521a591a0bc2b27d57ca6be621795cd52
+AUX i2p.service 172 BLAKE2B 8523af82e33d7a8f5b37138f8d28c7adb4c08607b84813f35b42f11064c0ec2768bf443eca32bd7b281ed084d6b820b23977c55a1cd5b8ad058ab18117b83f90 SHA512 c87574c968f4142b3dbe556dab86438765dc8b9b23475dca8c7e268d2963e5dffcd9175bb749b2d42c3fc7fe75d9175158f56cb78f0fa4faa7d6029fdf4b8e6c
DIST i2psource_1.7.0.tar.bz2 33300522 BLAKE2B dcb83477f6d066b707632f8db44bc811558b0bc52368ce992aaf14d0d21acc1fb9bce1dfa8171fca8cf3819765f0b7993ae4a2566a6f65786cca84c02ea4336a SHA512 a27c448246538f152355ecfdf781e39bf9e57b5d0f7ea139ce06d800ce3eed7fa4e375210e6545da2a75245b45282bc8d8e7453d96729f940c34daa75bdc588f
-EBUILD i2p-1.7.0.ebuild 4316 BLAKE2B 952572dedc6598bb0a445e365aebae196e75dcbaae90e1c0c6b4b6e32117315bf83a7c7e1dda7f16e78195f2301790234274affb946a49e35a579c6e74948dee SHA512 954bc994fe2cfbc46083a8d43440ca6f61c1b07f4f2de7c920ca26b7fd201b7113ffa000c5067caf2e5110c2279f448f1e917d0793d7333cfa1e344fa9be9b8f
+DIST i2psource_2.1.0.tar.bz2 32817295 BLAKE2B d37463522143c02e04c96d58578312b536ab5e2842e5647dbe5ba3d5c139329c447f16de7e326ef48ef4c6b3c11631e23300b5327cc31d9da5288240f86c926f SHA512 e8639c2b2869d3c7856b598d4cd3505458ed5cab5dce3570cafdaec3ccd77dbaec35787cccc6782acc75adb423b7baaab724ac3c98e5b91b41cf4c76f3614355
+EBUILD i2p-1.7.0-r1.ebuild 4212 BLAKE2B 7cf5f94c8d1a9814f69cce175ce49b6f63575b9e90e6c404bec07be1f4476713db635561b355aab314a71cfe7e02ae1615902f6ad22984d238037c234146644f SHA512 a3c609a3c37e6430daed918d215536d1ec9ddd4c12f1191a26184503fee3b8dd88b2db700be6870414a4d775dc548d0c8bc0d579a595a9b079e57f1142dd712a
+EBUILD i2p-2.1.0-r1.ebuild 7167 BLAKE2B f2a5bcdb1b0e52fa258aae083525cec795a5d64c17fc203cdc5a2305529fc8e3dcb3eae5a208a4fc97d6d91a0c0119958e61b9188bf504a7b898c14bce1b856b SHA512 5fb4b5f20ab5079f4a8825c54a9d63bbd3f1e68b9b8e06221fed102cbfdd97743ab8dbebf75b9b7eb381ddb225d84f372fb5e23cdde0e3a09742fd26f517c0a0
MISC metadata.xml 832 BLAKE2B ecda42c25627405f84f1df24fecf9b117c2dd15c44166eaea65df6924dce67e562a0ba7af83508fe7512d5ee75b23620e59ab7376701178f0cef6c47d42b751f SHA512 effe4661ecc390b6b76984192fcd4124cb29302e5ff4c545447b08ca5fc07ae63efa57d3082487940c64ade864d9c76a55f1bd1a05217808fb733a3a18cb553d
diff --git a/net-vpn/i2p/files/1.7.0-i2p.init b/net-vpn/i2p/files/1.7.0-i2p.init
new file mode 100644
index 000000000000..d59899b899e9
--- /dev/null
+++ b/net-vpn/i2p/files/1.7.0-i2p.init
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+readonly WRAPPER_CONF="/usr/share/i2p/wrapper.config"
+
+command=wrapper
+command_args="$WRAPPER_CONF wrapper.syslog.ident=i2p"
+command_background=true
+command_progress=true
+command_user=i2p
+pidfile=/var/run/i2p.pid
+retry='SIGTERM/20 SIGKILL/20'
diff --git a/net-vpn/i2p/files/1.7.0-i2p.service b/net-vpn/i2p/files/1.7.0-i2p.service
new file mode 100644
index 000000000000..87c218075a1c
--- /dev/null
+++ b/net-vpn/i2p/files/1.7.0-i2p.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Invisible Internet Project
+After=network.target
+
+[Service]
+User=i2p
+ExecStart=/usr/bin/wrapper /usr/share/i2p/wrapper.config wrapper.syslog.ident=i2p wrapper.logfile=/var/lib/i2p/.i2p/wrapper.log
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-vpn/i2p/files/2.1.0-fix-getopt-classpath.patch b/net-vpn/i2p/files/2.1.0-fix-getopt-classpath.patch
new file mode 100644
index 000000000000..a67b43ba08da
--- /dev/null
+++ b/net-vpn/i2p/files/2.1.0-fix-getopt-classpath.patch
@@ -0,0 +1,24 @@
+diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml
+index 48f9245..2fba5e4 100644
+--- a/apps/routerconsole/java/build.xml
++++ b/apps/routerconsole/java/build.xml
+@@ -85,6 +85,7 @@
+ <!-- following jars only present for debian builds -->
+ <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
+ <pathelement location="../../../core/java/build/json-simple.jar" />
++ <pathelement location="../../../core/java/build/gnu-getopt.jar" />
+ </classpath>
+ </javac>
+ </target>
+diff --git a/router/java/build.xml b/router/java/build.xml
+index 3449609..bcd9602 100644
+--- a/router/java/build.xml
++++ b/router/java/build.xml
+@@ -277,6 +277,7 @@
+ <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
+ <pathelement location="${junit.home}/junit4.jar" />
+ <pathelement location="../../core/java/build/i2ptest.jar" />
++ <pathelement location="../../core/java/build/gnu-getopt.jar" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
diff --git a/net-vpn/i2p/files/i2p.init b/net-vpn/i2p/files/i2p.init
index d59899b899e9..5115c14bb1a9 100644
--- a/net-vpn/i2p/files/i2p.init
+++ b/net-vpn/i2p/files/i2p.init
@@ -6,12 +6,10 @@ depend() {
need net
}
-readonly WRAPPER_CONF="/usr/share/i2p/wrapper.config"
-
-command=wrapper
-command_args="$WRAPPER_CONF wrapper.syslog.ident=i2p"
+command=i2prouter
+pidfile=/var/run/i2p.pid
command_background=true
command_progress=true
command_user=i2p
-pidfile=/var/run/i2p.pid
-retry='SIGTERM/20 SIGKILL/20'
+stopsig=SIGHUP
+retry=20
diff --git a/net-vpn/i2p/files/i2p.service b/net-vpn/i2p/files/i2p.service
index 87c218075a1c..e7c525e695eb 100644
--- a/net-vpn/i2p/files/i2p.service
+++ b/net-vpn/i2p/files/i2p.service
@@ -4,7 +4,8 @@ After=network.target
[Service]
User=i2p
-ExecStart=/usr/bin/wrapper /usr/share/i2p/wrapper.config wrapper.syslog.ident=i2p wrapper.logfile=/var/lib/i2p/.i2p/wrapper.log
+ExecStart=/usr/bin/i2prouter
+KillSignal=SIGHUP
[Install]
WantedBy=multi-user.target
diff --git a/net-vpn/i2p/i2p-1.7.0.ebuild b/net-vpn/i2p/i2p-1.7.0-r1.ebuild
index 5914fa6ea733..16802953f72a 100644
--- a/net-vpn/i2p/i2p-1.7.0.ebuild
+++ b/net-vpn/i2p/i2p-1.7.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -69,14 +69,8 @@ src_prepare() {
installer/resources/clients.config || die
# generate wrapper classpath, keeping the default to be replaced later
- i2p_cp="" # global forced by java-pkg_gen-cp
- java-pkg_gen-cp i2p_cp
- local lib i=2
local classpath="wrapper.java.classpath.1=${EPREFIX}/usr/share/i2p/lib/*\n"
- for lib in ${i2p_cp//,/ }
- do
- classpath+="wrapper.java.classpath.$((i++))=$(java-pkg_getjars ${lib})\n"
- done
+ classpath+="wrapper.java.classpath.2=$(java-pkg_getjars java-service-wrapper)\n"
# add generated classpath, hardcode system VM, setting system's conf
sed -e "s|\(wrapper\.java\.classpath\.1\)=.*|${classpath}|" \
@@ -132,8 +126,8 @@ src_install() {
java-pkg_dowar webapps/*.war
# Install daemon files
- newinitd "${FILESDIR}/i2p.init" i2p
- systemd_dounit "${FILESDIR}/i2p.service"
+ newinitd "${FILESDIR}/${PV}-i2p.init" i2p
+ systemd_dounit "${FILESDIR}/${PV}-i2p.service"
# setup log
keepdir /var/log/i2p
diff --git a/net-vpn/i2p/i2p-2.1.0-r1.ebuild b/net-vpn/i2p/i2p-2.1.0-r1.ebuild
new file mode 100644
index 000000000000..f927c3080df1
--- /dev/null
+++ b/net-vpn/i2p/i2p-2.1.0-r1.ebuild
@@ -0,0 +1,225 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="test"
+
+inherit java-pkg-2 java-ant-2 systemd
+
+DESCRIPTION="A privacy-centric, anonymous network"
+HOMEPAGE="https://geti2p.net"
+SRC_URI="https://files.i2p-projekt.de/${PV}/i2psource_${PV}.tar.bz2"
+
+LICENSE="Apache-2.0 Artistic BSD CC-BY-2.5 CC-BY-3.0 CC-BY-SA-3.0 EPL-1.0 GPL-2 GPL-3 LGPL-2.1 LGPL-3 MIT public-domain WTFPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+LANGS=(
+ ar az bg ca cs da de el en es es-AR et fa fi fr gl he hi hr hu id it ja ko ku mg nb nl nn pl pt pt-BR ro ru sk sl sq
+ sr sv tk tr uk vi zh zh-TW
+)
+IUSE="${LANGS[@]/#/l10n_}"
+
+CP_DEPEND="
+ dev-java/bcprov:0
+ dev-java/hashcash:1
+ dev-java/httpcomponents-client:4
+ dev-java/identicon:1
+ dev-java/java-getopt:1
+ dev-java/java-service-wrapper:0
+ dev-java/jbcrypt:0
+ dev-java/json-simple:2.3
+ dev-java/json-smart:1
+ dev-java/jsonrpc2-base:1
+ dev-java/jsonrpc2-server:1
+ dev-java/jstl:0
+ dev-java/jstl-api:0
+ dev-java/minidns-core:1
+ dev-java/zxing-core:3
+ dev-java/zxing-javase:3
+ >=net-libs/nativebiginteger-2.1.0:0
+ sys-devel/gettext:0[java]
+ >=www-servers/tomcat-9.0.73:9
+"
+DEPEND="
+ ${CP_DEPEND}
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/hamcrest:0
+ dev-java/hamcrest-core:1.3
+ dev-java/junit:4
+ dev-java/mockito:4
+ )
+"
+RDEPEND="
+ ${CP_DEPEND}
+ acct-user/i2p
+ acct-group/i2p
+ >=virtual/jre-1.8:*
+"
+
+EANT_BUILD_TARGET="preppkg-base"
+# no scala as depending on antlib.xml not installed by dev-lang/scala
+EANT_TEST_TARGET="junit.test"
+JAVA_ANT_ENCODING="UTF-8"
+JAVA_ANT_CLASSPATH_TAGS="javac java"
+# built locally
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/core/java/build/i2p.jar"
+EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/router/java/build/router.jar"
+EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/apps/ministreaming/java/build/mstreaming.jar"
+
+DOCS=( README.md history.txt )
+
+pkg_pretend() {
+ # see https://bugs.gentoo.org/831290
+ if [[ "`java-config --show-active-vm`" = openjdk*-8 ]] &&
+ [[ "`java-config --query MERGE_VM --package=ant-core`" != openjdk*-8 ]]
+ then
+ eerror "dev-java/ant-core was emerged with a newer version of the JDK."
+ eerror "It will fail to build with virtual/jdk:1.8 due to #831290."
+ eerror "Please switch to a newer JDK"
+ eerror " eselect java-vm set system ..."
+ eerror "Or remerge dev-java/ant-core with virtual/jdk:1.8"
+ eerror " emerge dev-java/ant-core"
+ die 'bad JDK for ant-core'
+ fi
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ # add our classpath
+ for f in `find -name build.xml`
+ do
+ java-ant_rewrite-classpath "$f"
+ done
+
+ # remove most bundled
+ # apps/addressbook/java/src/net/metanotion too much code drift
+ # apps/i2psnark/java/src/org/klomp/snark too much code drift
+ # apps/jrobin need rrd4j ebuild
+ # apps/routerconsole/java/src/{com,edu} too much code drift
+ # {core,router}/java/src/com/southernstorm/noise use internal symbols
+ # core/java/src/freenet too much code drift
+ # core/java/src/gnu/crypto too much code drift
+ # router/java/src/com/maxmind changed interface
+ # router/java/src/org/cybergarage unable to find version 3
+ # router/java/src/org/freenetproject too big to pull
+ # router/java/src/org/xlattice changed interface
+ java-pkg_clean ! \
+ -path "./apps/jetty/jetty-distribution-*" # need to package jetty
+ ( cat >> override.properties || die 'set unbundled properties' ) <<- EOF
+ require.gettext=true
+ with-libgetopt-java=true
+ with-libjakarta-taglibs-standard-java=true
+ with-libjson-simple-java=true
+ with-libtomcat9-java=true
+ with-gettext-base=true
+ # with-geoip-database=true need std geoip use
+ # with-libjetty9-java=true needs a jetty ebuild
+ EOF
+
+ # bcprov
+ rm -r core/java/src/net/i2p/crypto/elgamal || die 'unbundle bcprov'
+ sed -e 's,net\.i2p\.crypto\.elgamal\.impl,org.bouncycastle.jce.provider,' \
+ -e 's,net\.i2p\.crypto\.elgamal\.spec,org.bouncycastle.jce.spec,' \
+ -i core/java/src/net/i2p/crypto/{provider/I2PProvider,CryptoConstants}.java ||
+ die 'redirect imports of bcprov'
+ # getopt, gettext
+ rm -r core/java/src/gnu/{getopt,gettext} || die 'unbundle GNU code'
+ # httpcomponents-client
+ rm -r core/java/src/net/i2p/apache || die 'unbundle httpcomponents-client'
+ sed -e 's,net\.i2p\.apache,org.apache,' \
+ -i core/java/src/net/i2p/util/{Addresses,I2PSSLSocketFactory}.java \
+ apps/i2pcontrol/java/net/i2p/i2pcontrol/HostCheckHandler.java ||
+ die 'redirect imports of httpcomponents-client'
+ # identicon, zxing
+ rm -r apps/imagegen/{identicon,zxing} || die 'unbundle identicon & zxing'
+ sed -e '/LICENSE-Identicon.txt/d' -i build.xml &&
+ sed -E '/dir="[^"]*(identicon|zxing)/d' -i apps/imagegen{/imagegen,}/build.xml &&
+ sed -E '/(todir="build\/WEB-INF\/classes"|<\/copy>)/d' -i apps/imagegen/imagegen/build.xml ||
+ die 'do not depend on unbundled'
+ # hashcash
+ rm core/java/src/com/nettgryppa/security/HashCash.java ||
+ die 'unbundle hashcash'
+ # jbcrypt, jsonrpc2-*
+ rm -r apps/i2pcontrol/java/{com,org} || die 'unbundle jbcrypt & jsonrpc2-*'
+ # jstl*
+ sed -E '/"apps\/susidns\/src\/lib\/(jstl|standard).jar"/d' -i build.xml ||
+ die 'unbundle jstl*'
+ # minidns-core, json-simple
+ rm -r core/java/src/org || die 'unbundle minidns-core & json-simple'
+
+ # keep only enabled locales
+ local lang
+ for lang in ${LANGS[@]}
+ do
+ if ! use "l10n_${lang}"
+ then
+ find -regextype egrep \
+ -regex ".*[_\\./]${lang/-/_}.(html|po|1)" \
+ -delete || die "unbundling ${lang} translations"
+ fi
+ done
+
+ # fix some locale names
+ find -name '*_in.*' -exec rename --no-overwrite _in. _id. {} \; &&
+ find -name '*_iw.*' -exec rename --no-overwrite _iw. _he. {} \; ||
+ die 'fix some locale names'
+}
+
+src_configure() {
+ # deamon shouldn't start GUI
+ sed -i 's|\(clientApp.4.startOnLoad\)=true|\1=false|' \
+ installer/resources/clients.config ||
+ die 'avoid auto starting browser'
+
+ # yep, that's us
+ echo "build.built-by=Gentoo" >> override.properties ||
+ die 'bragging failed'
+}
+
+src_test() {
+ # avoid rebuilding
+ sed -e '/<delete dir=".\/build" \/>/d' -i core/java/build.xml ||
+ die 'avoid building twice'
+
+ EANT_GENTOO_CLASSPATH+=",hamcrest,junit-4,mockito-4"
+ java-pkg-2_src_test
+}
+
+src_install() {
+ # install basic documentation
+ einstalldocs
+ doman installer/resources/man/eepget.*
+
+ # install main files
+ cd "${S}/pkg-temp" || die 'unable to change dir to built artifacts'
+ # remove merged packages
+ java-pkg_dojar lib/*.jar
+ insinto "/usr/share/i2p"
+ doins blocklist.txt hosts.txt {clients,i2p*}.config
+ doins -r certificates docs eepsite geoip scripts
+ java-pkg_dowar webapps/*.war
+
+ # install daemons
+ newinitd "${FILESDIR}/i2p.init" i2p
+ systemd_dounit "${FILESDIR}/i2p.service"
+
+ # setup dirs
+ keepdir /var/log/i2p /var/lib/i2p
+ fowners i2p:i2p /var/lib/i2p /var/log/i2p
+
+ # create own launchers
+ java-pkg_dolauncher i2prouter --main net.i2p.router.Router --jar i2p.jar \
+ --pwd "${EPREFIX}/usr/share/i2p" \
+ --java_args "\
+ -Di2p.dir.app=${EPREFIX}/var/lib/i2p/app \
+ -Di2p.dir.config=${EPREFIX}/var/lib/i2p/config \
+ -Di2p.dir.router=${EPREFIX}/var/lib/i2p/router \
+ -Di2p.dir.log=${EPREFIX}/var/log/i2p \
+ -DloggerFilenameOverride=${EPREFIX}/var/log/i2p/router-@"
+ java-pkg_dolauncher eepget --main net.i2p.util.EepGet --jar i2p.jar
+}