diff options
author | 2017-04-03 14:07:48 +0800 | |
---|---|---|
committer | 2017-04-08 23:21:07 +0200 | |
commit | c7120465539c5cc77c22d74304da1d93369cb853 (patch) | |
tree | 00b88aaa28496ba972088e3c7b6b028acdea9a9b /net-vpn/i2p/files | |
parent | app-shells/mpv-bash-completion: verbump to 3.3.12 (diff) | |
download | gentoo-c7120465539c5cc77c22d74304da1d93369cb853.tar.gz gentoo-c7120465539c5cc77c22d74304da1d93369cb853.tar.bz2 gentoo-c7120465539c5cc77c22d74304da1d93369cb853.zip |
net-vpn/i2p: version bump to 0.9.29.
Signed-off-by: Tom Li <biergaizi@member.fsf.org>
Closes: https://github.com/gentoo/gentoo/pull/4349
Diffstat (limited to 'net-vpn/i2p/files')
-rw-r--r-- | net-vpn/i2p/files/i2p-0.9.29-add_libs.patch | 22 | ||||
-rw-r--r-- | net-vpn/i2p/files/i2p-0.9.29-revert-gentoo-detection.patch | 21 | ||||
-rw-r--r-- | net-vpn/i2p/files/i2p-0.9.29.initd | 35 | ||||
-rw-r--r-- | net-vpn/i2p/files/i2p-0.9.29.service | 13 |
4 files changed, 91 insertions, 0 deletions
diff --git a/net-vpn/i2p/files/i2p-0.9.29-add_libs.patch b/net-vpn/i2p/files/i2p-0.9.29-add_libs.patch new file mode 100644 index 000000000000..0ea3149a3628 --- /dev/null +++ b/net-vpn/i2p/files/i2p-0.9.29-add_libs.patch @@ -0,0 +1,22 @@ +diff -Naur a/installer/resources/wrapper.config b/installer/resources/wrapper.config +--- a/installer/resources/wrapper.config 2016-11-07 11:42:42.503030002 +0100 ++++ b/installer/resources/wrapper.config 2016-11-07 11:43:11.873031594 +0100 +@@ -61,12 +61,18 @@ + # Be sure there are no other duplicate classes. + # + wrapper.java.classpath.1=$INSTALL_PATH/lib/*.jar ++wrapper.java.classpath.2=/usr/share/tomcat-jstl-impl/lib/*.jar ++wrapper.java.classpath.3=/usr/share/tomcat-jstl-spec/lib/*.jar ++wrapper.java.classpath.4=/usr/share/java-service-wrapper/lib/*.jar ++wrapper.java.classpath.5=/usr/share/bcprov-1.50/lib/*.jar ++wrapper.java.classpath.6=/usr/share/jrobin/lib/*.jar + # uncomment this to use the system classpath as well (e.g. to get tools.jar) + # wrapper.java.classpath.2=%CLASSPATH% + + # Java Library Path (location of Wrapper.DLL or libwrapper.so) + wrapper.java.library.path.1=$INSTALL_PATH + wrapper.java.library.path.2=$INSTALL_PATH/lib ++wrapper.java.library.path.3=/usr/lib/java-service-wrapper + + # Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode. + wrapper.java.additional.auto_bits=TRUE diff --git a/net-vpn/i2p/files/i2p-0.9.29-revert-gentoo-detection.patch b/net-vpn/i2p/files/i2p-0.9.29-revert-gentoo-detection.patch new file mode 100644 index 000000000000..ac12811575bb --- /dev/null +++ b/net-vpn/i2p/files/i2p-0.9.29-revert-gentoo-detection.patch @@ -0,0 +1,21 @@ +diff -upr i2p-0.9.29/core/java/src/net/i2p/util/SystemVersion.java i2p-0.9.29.workaround/core/java/src/net/i2p/util/SystemVersion.java +--- i2p-0.9.29/core/java/src/net/i2p/util/SystemVersion.java 2017-02-27 22:36:36.000000000 +0800 ++++ i2p-0.9.29.workaround/core/java/src/net/i2p/util/SystemVersion.java 2017-04-03 14:04:17.395820925 +0800 +@@ -20,7 +20,6 @@ public abstract class SystemVersion { + * @since 0.9.28 + */ + public static final String DAEMON_USER = "i2psvc"; +- public static final String GENTOO_USER = "i2p"; + + private static final boolean _isWin = System.getProperty("os.name").startsWith("Win"); + private static final boolean _isMac = System.getProperty("os.name").startsWith("Mac"); +@@ -64,8 +63,7 @@ public abstract class SystemVersion { + String runtime = System.getProperty("java.runtime.name"); + _isOpenJDK = runtime != null && runtime.contains("OpenJDK"); + _isLinuxService = !_isWin && !_isMac && !_isAndroid && +- (DAEMON_USER.equals(System.getProperty("user.name")) || +- (_isGentoo && GENTOO_USER.equals(System.getProperty("user.name")))); ++ DAEMON_USER.equals(System.getProperty("user.name")); + + int sdk = 0; + if (_isAndroid) { diff --git a/net-vpn/i2p/files/i2p-0.9.29.initd b/net-vpn/i2p/files/i2p-0.9.29.initd new file mode 100644 index 000000000000..216d19474cb8 --- /dev/null +++ b/net-vpn/i2p/files/i2p-0.9.29.initd @@ -0,0 +1,35 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +HOME="/var/lib/i2p" +USER_HOME="$HOME" +JAVABINARY="/etc/java-config-2/current-system-vm/bin/java" +INSTALL_PATH="/usr/share/i2p" +I2P="$INSTALL_PATH" +I2P_CONFIG_DIR="$USER_HOME/.i2p" +SYSTEM_java_io_tmpdir="$I2P_CONFIG_DIR" +I2PTEMP="$SYSTEM_java_io_tmpdir" +LOGFILE="$I2P_CONFIG_DIR/wrapper.log" +PIDFILE="/var/run/i2p.pid" +WRAPPER_CMD="$I2P/i2psvc" +WRAPPER_CONF="$I2P/wrapper.config" + +start() { + ebegin "Starting I2P" + start-stop-daemon --start -b -m -u i2p --pidfile "$PIDFILE" --quiet --exec $WRAPPER_CMD -- -c $WRAPPER_CONF wrapper.daemonize=FALSE wrapper.syslog.ident=i2p wrapper.java.command="$JAVABINARY" wrapper.name=i2p wrapper.displayname="I2P Service" wrapper.statusfile="$I2P_CONFIG_DIR/i2p.status" wrapper.java.statusfile="$I2P_CONFIG_DIR/i2p.java.status" wrapper.logfile="$LOGFILE" + sleep 1 + [ -e "$PIDFILE" -a -e /proc/$(cat "$PIDFILE") ] + eend $? +} + +stop() { + ebegin "Stopping I2P" + start-stop-daemon --stop -u i2p --pidfile "$PIDFILE" --quiet --exec $WRAPPER_CMD -R SIGTERM/20 SIGKILL/20 -P + eend $? +} + diff --git a/net-vpn/i2p/files/i2p-0.9.29.service b/net-vpn/i2p/files/i2p-0.9.29.service new file mode 100644 index 000000000000..ccbadbd4d167 --- /dev/null +++ b/net-vpn/i2p/files/i2p-0.9.29.service @@ -0,0 +1,13 @@ +[Unit] +Description=Invisible Internet Project +After=network.target + +[Service] +User=i2p +Type=forking +ExecReload=/usr/bin/i2prouter restart +ExecStart=/usr/bin/i2prouter start +ExecStop=/usr/bin/i2prouter stop + +[Install] +WantedBy=multi-user.target |