-
kytv authored
- add kFreeBSD to NBI and CPUID - add kFreeBSD to jcpuid/jbigi build scripts - refresh debian patches to compensate for kFreeBSD changes - i2prouter: Detect kFreeBSD and normalize its name - clean up osid (switching to "elif") and adding support for detecting kFreeBSD - update postinstall.sh; I2P cannot be installed using gij so postinstall.sh will not be run. If/when openjdk finally comes to kFreeBSD, we'll be ready for it.
kytv authored- add kFreeBSD to NBI and CPUID - add kFreeBSD to jcpuid/jbigi build scripts - refresh debian patches to compensate for kFreeBSD changes - i2prouter: Detect kFreeBSD and normalize its name - clean up osid (switching to "elif") and adding support for detecting kFreeBSD - update postinstall.sh; I2P cannot be installed using gij so postinstall.sh will not be run. If/when openjdk finally comes to kFreeBSD, we'll be ready for it.
0001-path-substitution.patch 10.80 KiB
From: Kill Your TV <killyourtv@i2pmail.org>
Date: Mon, 18 Apr 2011 16:43:40 +0000
Subject: path substitution
The purpose of this patch is the change the values handled by
the Izpack based installer.
Non-applicable sections (e.g., portable & windows) are also removed for the
Debian wrapper.config to try to prevent confusion.
---
--- a/installer/resources/eepget
+++ b/installer/resources/eepget
@@ -1,3 +1,3 @@
#!/bin/sh
-I2P="%INSTALL_PATH"
+I2P="/usr/share/i2p"
java -cp "$I2P/lib/i2p.jar" net.i2p.util.EepGet "$@"
--- a/installer/resources/i2prouter
+++ b/installer/resources/i2prouter
@@ -10,7 +10,7 @@
# wrapper configuration file.
#
# If this script fails to successfully invoke i2psvc on your platform,
-# try the runplain.sh script instead.
+# try the i2prouter-nowrapper script instead.
#
# This software is the proprietary information of Tanuki Software.
# You shall use it only in accordance with the terms of the
@@ -24,16 +24,9 @@
# These settings can be modified to fit the needs of your application
# Optimized for use with version 3.5.14 of the Wrapper.
-# Paths
-# Note that (percent)INSTALL_PATH, (percent)USER_HOME, and (percent)SYSTEM_java_io_tmpdir
-# should have been replaced by the izpack installer.
-# If you did not run the installer, replace them with the appropriate paths.
-I2P="%INSTALL_PATH"
-I2P_CONFIG_DIR="%USER_HOME/.i2p"
-I2PTEMP="%SYSTEM_java_io_tmpdir"
-# PORTABLE installation:
-# Use the following instead.
-#I2PTEMP="%INSTALL_PATH"
+I2P="/usr/share/i2p"
+I2P_CONFIG_DIR="$HOME/.i2p"
+I2PTEMP="/tmp"
# Application
APP_NAME="i2p"
@@ -61,8 +54,8 @@
#RUN_AS_USER=
# Wrapper
-WRAPPER_CMD="$I2P/i2psvc"
-WRAPPER_CONF="$I2P/wrapper.config"
+WRAPPER_CMD="/usr/sbin/wrapper"
+WRAPPER_CONF="/etc/i2p/wrapper.config"
# Priority at which to run the wrapper. See "man nice" for valid priorities.
# nice is only used if a priority is specified.
@@ -173,48 +166,6 @@
# Workaround for Gentoo
JAVABINARY=$(awk -F'=' '/^ *wrapper\.java\.command/{print $2}' "$WRAPPER_CONF")
-if [ -e /etc/gentoo-release ]; then
- if [ $JAVABINARY = java ]; then
- if [ -x /etc/java-config-2/current-system-vm/bin/java ]; then
- JAVABINARY="/etc/java-config-2/current-system-vm/bin/java"
- else
- echo "Please set wrapper.java.command in $WRAPPER_CONF"
- exit 1
- fi
- fi
-fi
-
-WRAPPER_URL="http://www.i2p2.de/manualwrapper"
-unsupported() {
- echo "The most likely reason is that a supported version of the java"
- echo "wrapper is not available in the I2P installation package for your"
- echo "platform. It may be possible to manually download and install"
- echo "a compatible wrapper for your system."
- echo "See ${WRAPPER_URL} for hints."
- echo
- echo "In the meantime, you may start I2P by running the script"
- echo "${I2P}/runplain.sh"
- echo
-}
-
-failed() {
- echo "**Failed to load the wrapper**"
- case `uname -s` in
- FreeBSD)
- echo
- echo "The wrapper requires libiconv to be on your system."
- echo "It can be installed with pkg_add -r libiconv"
- echo
- exit 1
- ;;
- *)
- echo
- unsupported
- exit 1
- ;;
- esac
-}
-
if [ -n "$FIXED_COMMAND" ]
then
COMMAND="$FIXED_COMMAND"
@@ -908,9 +859,6 @@
# The string passed to eval must handles spaces in paths correctly.
COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.java.command=\"$JAVABINARY\" wrapper.pidfile=\"$PIDFILE\" wrapper.name=\"$APP_NAME\" wrapper.displayname=\"$APP_LONG_NAME\" $ANCHORPROP $STATUSPROP $COMMANDPROP $LOCKPROP $LOGPROP $ADDITIONAL_PARA"
eval $COMMAND_LINE
- if [ "$?" -ne "0" ]; then
- failed
- fi
else
eval echo `gettext '$APP_LONG_NAME is already running.'`
exit 1
@@ -1034,9 +982,6 @@
# The string passed to eval must handles spaces in paths correctly.
COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.java.command=\"$JAVABINARY\" wrapper.pidfile=\"$PIDFILE\" wrapper.name=\"$APP_NAME\" wrapper.displayname=\"$APP_LONG_NAME\" wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $STATUSPROP $COMMANDPROP $LOCKPROP $LOGPROP $ADDITIONAL_PARA"
eval $COMMAND_LINE
- if [ "$?" -ne "0" ]; then
- failed
- fi
else
eval echo `gettext '$APP_LONG_NAME is already running.'`
exit 1
@@ -1877,18 +1822,9 @@
status
;;
- 'install')
- installdaemon
- if [ ! `grep ^RUN_AS_USER $0` ]; then
- showsetusermesg
- fi
- echo
- echo "You may want to disable the browser from launching at startup at"
- echo "http://127.0.0.1:7657/configclients"
- ;;
-
- 'remove' | 'uninstall')
- removedaemon
+ 'install' | 'remove' | 'uninstall')
+ echo "Use \"dpkg-reconfigure i2p\" to configure the initscript."
+ exit 1
;;
'dump')
--- a/installer/resources/runplain.sh
+++ b/installer/resources/runplain.sh
@@ -11,8 +11,8 @@
# Note that (percent)INSTALL_PATH and (percent)SYSTEM_java_io_tmpdir
# should have been replaced by the izpack installer.
# If you did not run the installer, replace them with the appropriate path.
-I2P="%INSTALL_PATH"
-I2PTEMP="%SYSTEM_java_io_tmpdir"
+I2P="/usr/share/i2p"
+I2PTEMP="/tmp"
# Having IPv6 enabled can cause problems with certain configurations. Changing the
# next value to true may help.
--- a/installer/resources/wrapper.config
+++ b/installer/resources/wrapper.config
@@ -8,22 +8,13 @@
# click "Shutdown", wait 11 minutes, then start i2p.
#
# WARNING - The wrapper is NOT run (and this file is not used)
-# if you start I2P with the 'no window' icon on Windows, or
-# with the runplain.sh script on Linux. Use the 'restartable'
-# icon on Windows or the i2prouter script on Linux to run the wrapper.
+# if you start I2P with the i2prouter-nowrapper script in Linux.
+# Use i2prouter or the initscript to run the wrapper.
#
# NOTE - Directory organization:
# The standard I2P Installation will set up a "split" directory structure
# with code in the install directory, data and configuration files in the
# user's home directory, and temporary files in the system temporary directory.
-# To set up a single-directory "portable" installation suitable for
-# a USB stick, make several changes specified below (search for PORTABLE).
-#
-# NOTE - The izpack installer performs variable subsitiution on this
-# file upon installation. If you did not use izpack, you must
-# find and replace all instances of (dollar)INSTALL_PATH and
-# (dollar)SYSTEM_java_io_tmpdir with appropriate values
-# (perhaps . and /var/tmp, respectively)
#
#********************************************************************
# Java Application
@@ -60,13 +51,14 @@
# classes, or all the classes of i2p.jar, are in a different directory).
# Be sure there are no other duplicate classes.
#
-wrapper.java.classpath.1=$INSTALL_PATH/lib/*.jar
+wrapper.java.classpath.1=/usr/share/i2p/lib/*.jar
+wrapper.java.classpath.2=/usr/share/java/wrapper.jar
# uncomment this to use the system classpath as well (e.g. to get tools.jar)
-# wrapper.java.classpath.2=%CLASSPATH%
+# wrapper.java.classpath.3=%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
+# Java Library Path (location of libjbigi/libjcpuid)
+wrapper.java.library.path.1=/usr/lib/jni
+wrapper.java.library.path.2=/usr/share/java/lib
# Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
wrapper.java.additional.auto_bits=TRUE
@@ -76,7 +68,7 @@
wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
wrapper.java.additional.3=-Dorg.mortbay.xml.XmlParser.NotValidating=true
-wrapper.java.additional.4=-Di2p.dir.base="$INSTALL_PATH"
+wrapper.java.additional.4=-Di2p.dir.base=/usr/share/i2p
wrapper.java.additional.4.stripquotes=TRUE
# On some IPv6 enabled systems, I2P and other network-enabled java applications
@@ -144,11 +136,7 @@
# NOTE: On Linux/Mac this is overridden in the i2prouter script; changes here will have no effect.
# Windows users may wish to change this to %APPDATA%\I2P\wrapper.log
# System temp directory:
-wrapper.logfile=$SYSTEM_java_io_tmpdir/wrapper.log
-# PORTABLE installation:
-# Use the following instead. I2P will find the logfile here,
-# no need for a wrapper.java.additional line too.
-#wrapper.logfile=$INSTALL_PATH/wrapper.log
+#wrapper.logfile=/tmp/wrapper.log
# Format of output for the log file.
# The format consists of the tokens 'L' for log level, 'P' for prefix, 'D' for thread,
@@ -218,11 +206,7 @@
# Linux/Mac users, do not set here, see settings in the i2prouter script.
# Directory must exist or the wrapper will fail to start.
# System temp directory:
-#wrapper.java.pidfile=$SYSTEM_java_io_tmpdir/routerjvm.pid
-# PORTABLE installation:
-# Use the following instead.
-#wrapper.java.pidfile=$INSTALL_PATH/routerjvm.pid
-# pid file for the service monitoring the JVM
+#wrapper.java.pidfile=/tmp/routerjvm.pid
#
# From i2prouter:
#
@@ -236,10 +220,7 @@
# Linux/Mac users, do not set here, see settings in the i2prouter script.
# Directory must exist or the wrapper will fail to start.
# System temp directory:
-#wrapper.pidfile=$SYSTEM_java_io_tmpdir/i2p.pid
-# PORTABLE installation:
-# Use the following instead.
-#wrapper.pidfile=$INSTALL_PATH/i2p.pid
+#wrapper.pidfile=/tmp/i2p.pid
#********************************************************************
# Wrapper General Properties
@@ -256,30 +237,3 @@
wrapper.umask=0022
wrapper.java.umask=0022
wrapper.logfile.umask=077
-
-#********************************************************************
-# Wrapper NT Service Properties
-#********************************************************************
-# WARNING - Do not modify any of these properties when an application
-# using this configuration file has been installed as a service.
-# Please uninstall the service before modifying this section. The
-# service can then be reinstalled.
-
-# Name of the service
-wrapper.ntservice.name=i2p
-
-# Display name of the service
-wrapper.ntservice.displayname=I2P Service
-
-# Description of the service
-wrapper.ntservice.description=The I2P router service
-
-# Service dependencies. Add dependencies as needed starting from 1
-wrapper.ntservice.dependency.1=
-
-# Mode in which the service is installed. AUTO_START or DEMAND_START
-wrapper.ntservice.starttype=AUTO_START
-
-# Allow the service to interact with the desktop.
-wrapper.ntservice.interactive=false
-