source: debian/patches/0001-path-substitution.patch @ fb93609

Last change on this file since fb93609 was fb93609, checked in by kytv <kytv@…>, 7 years ago

merge of '7d480c0749394d3ee1b10c1f714a1be3091596f8'

and '9cb464ed9b358b1e9807792b37f703977d6f5f96'

  • Property mode set to 100644
File size: 16.8 KB
  • installer/resources/eepget

    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.
    ---
     installer/resources/eepget         |    2 +-
     installer/resources/i2prouter      |   82 ++++--------------------------------
     installer/resources/runplain.sh    |    4 +-
     installer/resources/wrapper.config |   70 ++++++------------------------
     4 files changed, 24 insertions(+), 134 deletions(-)
    
    a b  
    11#!/bin/sh
    2 I2P="%INSTALL_PATH"
     2I2P="/usr/share/i2p"
    33java -cp "$I2P/lib/i2p.jar" net.i2p.util.EepGet "$@"
  • installer/resources/i2prouter

    a b  
    1010# wrapper configuration file.
    1111#
    1212# If this script fails to successfully invoke i2psvc on your platform,
    13 # try the runplain.sh script instead.
     13# try the i2prouter-nowrapper script instead.
    1414#
    1515# This software is the proprietary information of Tanuki Software.
    1616# You shall use it only in accordance with the terms of the
     
    2424# These settings can be modified to fit the needs of your application
    2525# Optimized for use with version 3.5.17 of the Wrapper.
    2626
    27 # Paths
    28 # Note that (percent)INSTALL_PATH, (percent)USER_HOME,  and (percent)SYSTEM_java_io_tmpdir
    29 # should have been replaced by the izpack installer.
    30 # If you did not run the installer, replace them with the appropriate paths.
    31 I2P="%INSTALL_PATH"
    32 if [ "`uname -s`" == "Darwin" ]; then
    33    if [ -d "%USER_HOME/Library/Application Support" ]; then
    34        I2P_CONFIG_DIR="%USER_HOME/Library/Application Support/i2p"
    35    else
    36        I2P_CONFIG_DIR="%USER_HOME/.i2p"
    37    fi
    38 else
    39     I2P_CONFIG_DIR="%USER_HOME/.i2p"
    40 fi
    41 I2PTEMP="%SYSTEM_java_io_tmpdir"
     27# Read config file if found
     28[ -f /etc/default/i2p ] && . /etc/default/i2p
     29
     30I2P="/usr/share/i2p"
     31I2P_CONFIG_DIR="$HOME/.i2p"
     32I2PTEMP="/tmp"
    4233# PORTABLE installation:
    4334# Use the following instead.
    4435#I2PTEMP="%INSTALL_PATH"
     
    6960#RUN_AS_USER=
    7061
    7162# Wrapper
    72 WRAPPER_CMD="$I2P/i2psvc"
    73 WRAPPER_CONF="$I2P/wrapper.config"
     63WRAPPER_CMD="/usr/sbin/wrapper"
     64WRAPPER_CONF="/etc/i2p/wrapper.config"
    7465
    7566# Priority at which to run the wrapper.  See "man nice" for valid priorities.
    7667#  nice is only used if a priority is specified.
     
    175166# Workaround for Gentoo
    176167JAVABINARY=$(awk -F'=' '/^ *wrapper\.java\.command/{print $2}' "$WRAPPER_CONF")
    177168
    178 if [ -e /etc/gentoo-release ]; then
    179     if [ $JAVABINARY = java ]; then
    180         if [ -x /etc/java-config-2/current-system-vm/bin/java ]; then
    181             JAVABINARY="/etc/java-config-2/current-system-vm/bin/java"
    182         else
    183             echo "Please set wrapper.java.command in $WRAPPER_CONF"
    184             exit 1
    185         fi
    186     fi
    187 fi
    188 
    189 WRAPPER_URL="http://www.i2p2.de/manualwrapper"
    190 unsupported() {
    191     echo "The most likely reason is that a supported version of the java"
    192     echo "wrapper is not available in the I2P installation package for your"
    193     echo "platform. It may be possible to manually download and install"
    194     echo "a compatible wrapper for your system."
    195     echo "See ${WRAPPER_URL} for hints."
    196     echo
    197     echo "In the meantime, you may start I2P by running the script"
    198     echo "${I2P}/runplain.sh"
    199     echo
    200 }
    201 
    202 failed() {
    203         echo "**`gettext 'Failed to load the wrapper'`**"
    204         case `uname -s` in
    205              FreeBSD)
    206                 echo
    207                 echo "The wrapper requires libiconv to be on your system."
    208                 echo "It can be installed with pkg_add -r libiconv"
    209                 echo
    210                 exit 1
    211                 ;;
    212              *)
    213                 echo
    214                 unsupported
    215                 exit 1
    216                 ;;
    217         esac
    218 }
    219 
    220169if [ -n "$FIXED_COMMAND" ]
    221170then
    222171    COMMAND="$FIXED_COMMAND"
     
    928877        # The string passed to eval must handles spaces in paths correctly.
    929878        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 wrapper.script.version=3.5.17 $ADDITIONAL_PARA"
    930879        eval $COMMAND_LINE
    931         if [ "$?" -ne "0" ]; then
    932                 failed
    933         fi
    934880    else
    935881        eval echo `gettext '$APP_LONG_NAME is already running.'`
    936882        exit 1
     
    10541000        # The string passed to eval must handles spaces in paths correctly.
    10551001        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 wrapper.script.version=3.5.17 $ADDITIONAL_PARA"
    10561002        eval $COMMAND_LINE
    1057         if [ "$?" -ne "0" ]; then
    1058                 failed
    1059         fi
    10601003    else
    10611004        eval echo `gettext '$APP_LONG_NAME is already running.'`
    10621005        exit 1
     
    17931736}
    17941737
    17951738showsetusermesg()  {
    1796     echo "`gettext 'Please edit i2prouter and set the variable RUN_AS_USER'`."
     1739    echo "`gettext 'Please edit /etc/default/i2p and set the variable RUN_AS_USER'`."
    17971740}
    17981741
    17991742checkifstartingasroot() {
     
    18011744        echo "`gettext 'Running I2P as the root user is *not* recommended.'`"
    18021745        showsetusermesg
    18031746        echo
    1804         echo "`gettext 'To run as root anyway, edit i2prouter and set ALLOW_ROOT=true.'`"
     1747        echo "`gettext 'To run as root anyway, edit /etc/default/i2p and set ALLOW_ROOT=true.'`"
    18051748        exit 1
    18061749    fi
    18071750}
     
    18581806            status
    18591807            ;;
    18601808
    1861         'install')
    1862             installdaemon
    1863             if [ ! `grep ^RUN_AS_USER $0` ]; then
    1864                  echo
    1865                  showsetusermesg
    1866             fi
    1867             echo
    1868             echo "You may want to disable the browser from launching at startup at"
    1869             echo "http://127.0.0.1:7657/configclients"
    1870             echo
    1871             echo "I2P_CONFIG_DIR is currently set to $I2P_CONFIG_DIR."
    1872             echo "Change the value in $0 if this is not"
    1873             echo "appropriate for your configuration."
    1874             ;;
    1875 
    1876         'remove' | 'uninstall')
    1877             removedaemon
    1878             ;;
     1809        'install' | 'remove' | 'uninstall')
     1810            echo "Use \"dpkg-reconfigure i2p\" to configure the initscript."
     1811            exit 1
    18791812
    18801813        'dump')
    18811814            checkUser "" "$COMMAND"
  • installer/resources/runplain.sh

    a b  
    1111# Note that (percent)INSTALL_PATH and (percent)SYSTEM_java_io_tmpdir
    1212# should have been replaced by the izpack installer.
    1313# If you did not run the installer, replace them with the appropriate path.
    14 I2P="%INSTALL_PATH"
    15 I2PTEMP="%SYSTEM_java_io_tmpdir"
     14I2P="/usr/share/i2p"
     15I2PTEMP="/tmp"
    1616
    1717# Having IPv6 enabled can cause problems with certain configurations. Changing the
    1818# next value to true may help.
  • installer/resources/wrapper.config

    a b  
    88# click "Shutdown", wait 11 minutes, then start i2p.
    99#
    1010# WARNING - The wrapper is NOT run (and this file is not used)
    11 # if you start I2P with the 'no window' icon on Windows, or
    12 # with the runplain.sh script on Linux. Use the 'restartable'
    13 # icon on Windows or the i2prouter script on Linux to run the wrapper.
     11# if you start I2P with the i2prouter-nowrapper script in Linux.
     12# Use i2prouter or the initscript to run the wrapper.
    1413#
    1514# NOTE - Directory organization:
    1615# The standard I2P Installation will set up a "split" directory structure
    1716# with code in the install directory, data and configuration files in the
    1817# user's home directory, and temporary files in the system temporary directory.
    19 # To set up a single-directory "portable" installation suitable for
    20 # a USB stick, make several changes specified below (search for PORTABLE).
    21 #
    22 # NOTE - The izpack installer performs variable subsitiution on this
    23 # file upon installation. If you did not use izpack, you must
    24 # find and replace all instances of (dollar)INSTALL_PATH and
    25 # (dollar)SYSTEM_java_io_tmpdir with appropriate values
    26 # (perhaps . and /var/tmp, respectively)
    2718#
    2819#********************************************************************
    2920# Java Application
     
    6051# classes, or all the classes of i2p.jar, are in a different directory).
    6152# Be sure there are no other duplicate classes.
    6253#
    63 wrapper.java.classpath.1=$INSTALL_PATH/lib/*.jar
     54wrapper.java.classpath.1=/usr/share/i2p/lib/*.jar
     55wrapper.java.classpath.2=/usr/share/java/wrapper.jar
    6456#  uncomment this to use the system classpath as well (e.g. to get tools.jar)
    65 # wrapper.java.classpath.2=%CLASSPATH%
     57# wrapper.java.classpath.3=%CLASSPATH%
    6658
    67 # Java Library Path (location of Wrapper.DLL or libwrapper.so)
    68 wrapper.java.library.path.1=$INSTALL_PATH
    69 wrapper.java.library.path.2=$INSTALL_PATH/lib
     59# Java Library Path (location of libjbigi/libjcpuid)
     60wrapper.java.library.path.1=/usr/lib/jni
     61wrapper.java.library.path.2=/usr/share/java/lib
    7062
    7163# Java Bits.  On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
    7264wrapper.java.additional.auto_bits=TRUE
     
    7668wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
    7769wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
    7870wrapper.java.additional.3=-Dorg.mortbay.xml.XmlParser.NotValidating=true
    79 wrapper.java.additional.4=-Di2p.dir.base="$INSTALL_PATH"
     71wrapper.java.additional.4=-Di2p.dir.base=/usr/share/i2p
    8072wrapper.java.additional.4.stripquotes=TRUE
    8173
    8274# On some IPv6 enabled systems, I2P and other network-enabled java applications
     
    143135# You may wish to change this.
    144136# NOTE: On Linux/Mac this is overridden in the i2prouter script; changes here will have no effect.
    145137# System temp directory:
    146 wrapper.logfile=$SYSTEM_java_io_tmpdir/wrapper.log
    147 # PORTABLE installation:
    148 # Use the following instead. I2P will find the logfile here,
    149 # no need for a wrapper.java.additional line too.
    150 #wrapper.logfile=$INSTALL_PATH/wrapper.log
     138#wrapper.logfile=/tmp/wrapper.log
    151139
    152140# Format of output for the log file.
    153141# The format consists of the tokens 'L' for log level, 'P' for prefix, 'D' for thread,
     
    217205# Linux/Mac users, do not set here, see settings in the i2prouter script.
    218206# Directory must exist or the wrapper will fail to start.
    219207# System temp directory:
    220 #wrapper.java.pidfile=$SYSTEM_java_io_tmpdir/routerjvm.pid
    221 # PORTABLE installation:
    222 # Use the following instead.
    223 #wrapper.java.pidfile=$INSTALL_PATH/routerjvm.pid
    224 # pid file for the service monitoring the JVM
     208#wrapper.java.pidfile=/tmp/routerjvm.pid
    225209#
    226210# From i2prouter:
    227211#
     
    235219# Linux/Mac users, do not set here, see settings in the i2prouter script.
    236220# Directory must exist or the wrapper will fail to start.
    237221# System temp directory:
    238 #wrapper.pidfile=$SYSTEM_java_io_tmpdir/i2p.pid
    239 # PORTABLE installation:
    240 # Use the following instead.
    241 #wrapper.pidfile=$INSTALL_PATH/i2p.pid
     222#wrapper.pidfile=/tmp/i2p.pid
    242223
    243224#********************************************************************
    244225# Wrapper General Properties
     
    255236wrapper.umask=0022
    256237wrapper.java.umask=0022
    257238wrapper.logfile.umask=077
    258 
    259 #********************************************************************
    260 # Wrapper NT Service Properties
    261 #********************************************************************
    262 # WARNING - Do not modify any of these properties when an application
    263 #  using this configuration file has been installed as a service.
    264 #  Please uninstall the service before modifying this section.  The
    265 #  service can then be reinstalled.
    266 
    267 # Name of the service
    268 wrapper.ntservice.name=i2p
    269 
    270 # Display name of the service
    271 wrapper.ntservice.displayname=I2P Service
    272 
    273 # Description of the service
    274 wrapper.ntservice.description=The I2P router service
    275 
    276 # Service dependencies.  Add dependencies as needed starting from 1
    277 wrapper.ntservice.dependency.1=
    278 
    279 # Mode in which the service is installed.  AUTO_START or DEMAND_START
    280 wrapper.ntservice.starttype=AUTO_START
    281 
    282 # Allow the service to interact with the desktop.
    283 wrapper.ntservice.interactive=false
    284 
  • installer/resources/locale/po/messages_de.po

    a b  
    192192msgstr "Falls gestartet, fordere einen Java Thread dump an"
    193193
    194194#: ../i2prouter:1788
    195 msgid "Please edit i2prouter and set the variable RUN_AS_USER"
    196 msgstr "Bitte bearbeite i2prouter und setze die Variable RUN_AS_USER"
     195msgid "Please edit /etc/default/i2p and set the variable RUN_AS_USER"
     196msgstr "Bitte bearbeite /etc/default/i2p und setze die Variable RUN_AS_USER"
    197197
    198198#: ../i2prouter:1793
    199199msgid "Running I2P as the root user is *not* recommended."
    200200msgstr "I2P als root Benutzer auszuführen ist *nicht* empfehlenswert."
    201201
    202202#: ../i2prouter:1796
    203 msgid "To run as root anyway, edit i2prouter and set ALLOW_ROOT=true."
     203msgid "To run as root anyway, edit /etc/default/i2p and set ALLOW_ROOT=true."
    204204msgstr ""
    205 "Um I2P trotzdem als root auszuführen bearbeite i2prouter und setze ALLOW_ROOT=true."
     205"Um I2P trotzdem als root auszuführen bearbeite /etc/default/i2p und setze ALLOW_ROOT=true."
  • installer/resources/locale/po/messages_en.po

    a b  
    185185msgstr ""
    186186
    187187#: ../i2prouter:1788
    188 msgid "Please edit i2prouter and set the variable RUN_AS_USER"
     188msgid "Please edit /etc/default/i2p and set the variable RUN_AS_USER"
    189189msgstr ""
    190190
    191191#: ../i2prouter:1793
     
    193193msgstr ""
    194194
    195195#: ../i2prouter:1796
    196 msgid "To run as root anyway, edit i2prouter and set ALLOW_ROOT=true."
     196msgid "To run as root anyway, edit /etc/default/i2p and set ALLOW_ROOT=true."
    197197msgstr ""
  • installer/resources/locale/po/messages_fr.po

    a b  
    186186msgstr "Request a Java thread dump if running."
    187187
    188188#: ../i2prouter:1788
    189 msgid "Please edit i2prouter and set the variable RUN_AS_USER"
    190 msgstr "Veuillez éditer $0 et paramétrer la variable RUN_AS_USER"
     189msgid "Please edit /etc/default/i2p and set the variable RUN_AS_USER"
     190msgstr "Veuillez éditer /etc/default/i2p et paramétrer la variable RUN_AS_USER"
    191191
    192192#: ../i2prouter:1793
    193193msgid "Running I2P as the root user is *not* recommended."
    194194msgstr "Faire fonctionner I2P en tant qu'utilisateur root n'est *pas* recommandé."
    195195
    196196#: ../i2prouter:1796
    197 msgid "To run as root anyway, edit i2prouter and set ALLOW_ROOT=true."
    198 msgstr "Pour exécuter en tant que root de toute façon, éditer $0 et mettre ALLOW_ROOT=true."
     197msgid "To run as root anyway, edit /etc/default/i2p and set ALLOW_ROOT=true."
     198msgstr "Pour exécuter en tant que root de toute façon, éditer /etc/default/i2p et mettre ALLOW_ROOT=true."
  • installer/resources/locale/po/messages_it.po

    a b  
    187187msgstr ""
    188188
    189189#: ../i2prouter:1780
    190 msgid "Please edit i2prouter and set the variable RUN_AS_USER"
     190msgid "Please edit /etc/default/i2p and set the variable RUN_AS_USER"
    191191msgstr ""
    192192
    193193#: ../i2prouter:1785
     
    195195msgstr ""
    196196
    197197#: ../i2prouter:1788
    198 msgid "To run as root anyway, edit i2prouter and set ALLOW_ROOT=true."
     198msgid "To run as root anyway, edit /etc/default/i2p and set ALLOW_ROOT=true."
    199199msgstr ""
  • installer/resources/locale/po/messages_ru.po

    a b  
    188188msgstr ""
    189189
    190190#: ../i2prouter:1780
    191 msgid "Please edit i2prouter and set the variable RUN_AS_USER"
     191msgid "Please edit /etc/default/i2p and set the variable RUN_AS_USER"
    192192msgstr ""
    193193
    194194#: ../i2prouter:1785
     
    196196msgstr ""
    197197
    198198#: ../i2prouter:1788
    199 msgid "To run as root anyway, edit i2prouter and set ALLOW_ROOT=true."
     199msgid "To run as root anyway, edit /etc/default/i2p and set ALLOW_ROOT=true."
    200200msgstr ""
  • installer/resources/locale/po/messages_sv.po

    a b  
    187187msgstr "Fråga efter en Java thread dump vid drift."
    188188
    189189#: ../i2prouter:1780
    190 msgid "Please edit i2prouter and set the variable RUN_AS_USER"
    191 msgstr "Var god ändra i2prouter och sätt variabeln RUN_AS_USER"
     190msgid "Please edit /etc/default/i2p and set the variable RUN_AS_USER"
     191msgstr "Var god ändra /etc/default/i2p och sätt variabeln RUN_AS_USER"
    192192
    193193#: ../i2prouter:1785
    194194msgid "Running I2P as the root user is *not* recommended."
    195195msgstr "Att köra I2P som användare root är *inte* rekommenderat."
    196196
    197197#: ../i2prouter:1788
    198 msgid "To run as root anyway, edit i2prouter and set ALLOW_ROOT=true."
    199 msgstr "För att köra som root iallafall, ändra i2prouter och sätt ALLOW_ROOT=true"
     198msgid "To run as root anyway, edit /etc/default/i2p and set ALLOW_ROOT=true."
     199msgstr "För att köra som root iallafall, ändra /etc/default/i2p och sätt ALLOW_ROOT=true"
Note: See TracBrowser for help on using the repository browser.