summaryrefslogtreecommitdiff
path: root/pcr/i2p
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/i2p')
-rw-r--r--pcr/i2p/PKGBUILD33
-rw-r--r--pcr/i2p/i2p.initd44
-rw-r--r--pcr/i2p/wrapper.config13
3 files changed, 77 insertions, 13 deletions
diff --git a/pcr/i2p/PKGBUILD b/pcr/i2p/PKGBUILD
index 6084bdf6a..d91e23411 100644
--- a/pcr/i2p/PKGBUILD
+++ b/pcr/i2p/PKGBUILD
@@ -1,19 +1,20 @@
-# Contributor (AUR): skydrome <skydrome@protonmail.com>
-# Maintainer (AUR): skydrome <skydrome@protonmail.com>
+# Contributor: skydrome <skydrome@protonmail.com>
+# Maintainer (aur): skydrome <skydrome@protonmail.com>
# Maintainer: Freemor <freemor@freemor.ca>
+# Maintainer (aur): 6543 <6543 at obermui dot de> ('i2p-openrc' openrc init script)
# uncomment if you do not want to build all language translations
#export LG2=en
pkgname=i2p
-pkgver=1.6.1
+pkgver=1.7.0
pkgrel=1
pkgdesc="A distributed anonymous network"
url="https://geti2p.net"
license=('GPL2')
arch=('any')
-depends=('java-runtime' 'java-service-wrapper')
-makedepends=('java-environment' 'ant')
+depends=('java-runtime>=13' 'java-service-wrapper')
+makedepends=('java-environment>=13' 'ant')
#optdepends=('gtk2: for rrd graphs')
conflicts=('i2p-bin' 'i2p-dev')
backup=('opt/i2p/wrapper.config')
@@ -30,20 +31,29 @@ _url="https://files.i2p-projekt.de/${pkgver}"
source=("${_url}/i2psource_${pkgver}.tar.bz2"{,.sig}
'i2prouter.service' 'i2p.tmpfiles' 'wrapper.config' 'router.config'
- 'i2prouter.bash' 'i2prouter.sh'
+ 'i2prouter.bash' 'i2prouter.sh' 'chromium-i2p.sh'
+ speed_up_prng.patch
+ update_firefox_useragent.patch
)
-sha256sums=('719606c4cb510de4fe74f24bbfa53911a70531821fc1ee79a29e3d96eaa16733'
+source=( ${source[*]/chromium-i2p.sh/} )
+source+=(i2p.initd)
+sha256sums=('aa53591e89eacc3491ab472dc4df998780fb6747eea3b97ecb7a9f81ff2c9a5e'
'SKIP'
'644b771ec7f5db3efab3206bf1f896566cdb00d410a54608fda85bdb4c2ad876'
'fc30dd32f48fe1c93bf36c8297ca48203a1479e4e221ebe62c57cf3c3c0347d3'
- 'ba4bcb8d9aef307045d1d24385a456d096ea45f69d95a474467728ea140188ec'
+ 'e3a85d8992a09e8f57498b1eba0aef758ceffdb944d296528e8c5cec970becd9'
'90f202e5b66d5a5b425522b409e71fb892d34c534e32ce2d6fe5284015cacf94'
'7a19b9f90c8792460fd58e8b8aa435a065e34d29a942479850472510e9d3078a'
- '8d39f080c7a2e49226db3a785f3e18583159ef2f95e1ab467fd9984c4e38c9f5')
-
+ '8d39f080c7a2e49226db3a785f3e18583159ef2f95e1ab467fd9984c4e38c9f5'
+ '55b05dec917d5a55f2a7c3b76c5111d2cdbb3694968049fca5cdb089cb18e390'
+ '70f2ada05fa56e06c7cfc107a87b327aa37683bd0c47f0cb5454c60105a71be8'
+)
+sha256sums+=('b9e490398732d3d3b0f5f0233adcb55030cf217e4fc2d2bbfe7cf5577aeb87bf')
prepare() {
cd "$pkgname-$pkgver"
+ patch -Np1 -i ../speed_up_prng.patch
+ patch -Np1 -i ../update_firefox_useragent.patch
}
build() {
@@ -53,6 +63,7 @@ build() {
ant -Dfile.encoding=UTF-8 \
-Djavac.compilerargs=-Xlint:-options \
-Dbuild.reproducible=true \
+ -Djavac.version=13 \
preppkg-linux-only
}
@@ -94,4 +105,6 @@ package() {
rm -r opt/i2p/{osid,postinstall.sh,runplain.sh,INSTALL-headless.txt,LICENSE.txt,licenses,man,lib/wrapper*}
+ # install an init script for openrc
+ install -Dm755 "${srcdir}"/i2p.initd "${pkgdir}"/etc/init.d/i2p
}
diff --git a/pcr/i2p/i2p.initd b/pcr/i2p/i2p.initd
new file mode 100644
index 000000000..47299e1b8
--- /dev/null
+++ b/pcr/i2p/i2p.initd
@@ -0,0 +1,44 @@
+#!/usr/bin/openrc-run
+# Distributed under the terms of the GNU General Public License v3
+
+user="${user:-i2p}"
+group="${group:-i2p}"
+pidfile="/run/i2p/$RC_SVCNAME.pid"
+command="/usr/bin/java-service-wrapper"
+command_args="/opt/i2p/wrapper.config wrapper.name=i2prouter wrapper.syslog.ident=i2prouter wrapper.daemonize=TRUE TZ=UTC"
+command_background=1
+workdir=/opt/i2p
+
+depend() {
+ use net
+ need localmount
+}
+
+start() {
+ ebegin "Start ${SVCNAME}"
+
+ cd $workdir
+ export HOME=$workdir
+ su -s /bin/sh -c "$command $command_args" $user
+
+ eend $?
+ return 0;
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+
+ /bin/kill -TERM $(cat $pidfile)
+
+ eend $?
+ return 0;
+}
+
+reload() {
+ ebegin "Reload ${SVCNAME}"
+
+ /bin/kill -USR1 $(cat $pidfile)
+
+ eend $?
+ return 0;
+}
diff --git a/pcr/i2p/wrapper.config b/pcr/i2p/wrapper.config
index 1474aa02c..2bc2b8e9e 100644
--- a/pcr/i2p/wrapper.config
+++ b/pcr/i2p/wrapper.config
@@ -169,8 +169,15 @@ wrapper.filter.action.1=RESTART
wrapper.filter.message.1=The JVM has run out of memory.
#********************************************************************
-# Advanced Options
+# Advanced Options - https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html
#********************************************************************
-# Enable the Shenandoah Gargabe Collector
-#wrapper.java.additional.100=-XX:+UnlockExperimentalVMOptions
+# Enable the Shenandoah Garbage Collector
#wrapper.java.additional.101=-XX:+UseShenandoahGC
+#wrapper.java.additional.102=-XX:+DisableExplicitGC
+
+# Committing heap pages into memory helps to reduce latency hiccups
+#wrapper.java.additional.103=-XX:+AlwaysPreTouch
+
+# Using large pages greatly improves performance on large heaps
+# Recommended to set /sys/kernel/mm/transparent_hugepage/enabled and /sys/kernel/mm/transparent_hugepage/defrag to "madvise"
+#wrapper.java.additional.104=XX:+UseTransparentHugePages