diff --git a/LICENSE.txt b/LICENSE.txt index 206d51f104cc992019b3e4f29abe4b632ec82dbd..ff288844e41e3ed01fd244cab648da1f173d0a7f 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -58,7 +58,7 @@ Public domain except as listed below: PRNG: Copyright (C) 2001, 2002, Free Software Foundation, Inc. - See licenses/LICENSE-LGPLv2.1.txt + See licenses/LICENSE-LGPLv2.1.txt or /usr/share/common-licenses/LGPL-2.1 HashCash code: Copyright 2006 Gregory Rubin grrubin@gmail.com diff --git a/debian-alt/jessie/control b/debian-alt/jessie/control index e5c9401ec012fccd424d2fb607176edf8b7a724b..c9014ad230886d2e65b951ea2a1de9a94c55272f 100644 --- a/debian-alt/jessie/control +++ b/debian-alt/jessie/control @@ -30,9 +30,9 @@ Depends: ${java:Depends}, ${shlibs:Depends}, debconf, i2p-router (>= 0.8.6-5), libjbigi-jni, - lsb-base, + lsb-base (>= 3.0-6), service-wrapper -Description: I2P anonymous network +Description: Anonymous network (I2P) I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no @@ -99,7 +99,7 @@ Suggests: tor ,syndie ,www-browser ,xul-ext-torbutton -Description: I2P router +Description: Router for I2P I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no diff --git a/debian-alt/precise/control b/debian-alt/precise/control index 5e11ecf1480332ea7aab2c41cddd2d9dd1accf15..093ef05bcea77fcf029ccca0927fabc73ab6b0c7 100644 --- a/debian-alt/precise/control +++ b/debian-alt/precise/control @@ -31,9 +31,9 @@ Depends: ${java:Depends}, ${shlibs:Depends}, debconf, i2p-router (>= 0.8.6-5), libjbigi-jni, - lsb-base, + lsb-base (>= 3.0-6), service-wrapper -Description: I2P anonymous network +Description: Anonymous network (I2P) I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no @@ -100,7 +100,7 @@ Suggests: tor ,syndie ,www-browser ,xul-ext-torbutton -Description: I2P router +Description: Router for I2P I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no diff --git a/debian-alt/precise/i2p.postinst b/debian-alt/precise/i2p.postinst new file mode 100755 index 0000000000000000000000000000000000000000..d612902ba3313c8f6c3170b085b73dc560654107 --- /dev/null +++ b/debian-alt/precise/i2p.postinst @@ -0,0 +1,127 @@ +#!/bin/sh + +set -e + +I2PHOME=/var/lib/i2p +I2PSYSUSER=i2psvc + +conffile="/etc/default/i2p" +systemdservice="/lib/systemd/system/i2p.service" + +# Source debconf library -- we have a Depends line +# to make sure it is there... +. /usr/share/debconf/confmodule +db_version 2.0 + + +case "$1" in + configure|reconfigure) + if [ ! -e $conffile ]; then + echo "# Defaults for i2p initscript (/etc/init.d/i2p" >> $conffile + echo "# This is a posix shell fragment" >> $conffile + echo >> $conffile + echo "# [automatically edited by postinst, do not change line format ]" >> $conffile + echo "# Run 'dpkg-reconfigure -plow i2p' to change these values." >> $conffile + echo >> $conffile + echo "RUN_DAEMON=" >> $conffile + echo "I2PUSER=" >> $conffile + echo "ULIMIT=" >> $conffile + echo "CONFINE_WITH_APPARMOR=" >> $conffile + echo "# The next value is also wrapper.java.maxmemory in /etc/i2p/wrapper.config" >> $conffile + echo "MEMORYLIMIT=" >> $conffile + fi + + db_get i2p/daemon + RUN_DAEMON="$RET" + db_get i2p/user + I2PUSER="$RET" + db_get i2p/memory + MEMORYLIMIT="$RET" + db_get i2p/aa + CONFINE_WITH_APPARMOR="$RET" + + cp -a -f $conffile $conffile.tmp + + # If the admin deleted or commented some variables but then set them via debconf, + # (re-)add them to the conffile. + test -z "$RUN_DAEMON" || grep -Eq '^ *RUN_DAEMON=' $conffile || \ + echo "RUN_DAEMON=" >> $conffile + test -z "$I2PUSER" || grep -Eq '^ *I2PUSER=' $conffile || \ + echo "I2PUSER=" >> $conffile + test -z "$MEMORYLIMIT" || grep -Eq '^ *MEMORYLIMIT=' $conffile || \ + echo "MEMORYLIMIT=" >> $conffile + test -z "$ULIMIT" || grep -Eq '^ *ULIMIT=' $conffile || \ + echo "ULIMIT=" >> $conffile + test -z "$CONFINE_WITH_APPARMOR" || grep -Eq '^ *CONFINE_WITH_APPARMOR=' $conffile || \ + echo "CONFINE_WITH_APPARMOR=" >> $conffile + + if [ -z $RUN_DAEMON ]; then + RUN_DAEMON="false" + I2PUSER="i2psvc" + fi + + sed -e "s/^ *RUN_DAEMON=.*/RUN_DAEMON=\"$RUN_DAEMON\"/" \ + -e "s/^ *I2PUSER=.*/I2PUSER=\"$I2PUSER\"/" \ + -e "s/^ *MEMORYLIMIT=.*/MEMORYLIMIT=\"$MEMORYLIMIT\"/" \ + -e "s/^ *CONFINE_WITH_APPARMOR=.*/CONFINE_WITH_APPARMOR=\"$CONFINE_WITH_APPARMOR\"/" \ + < $conffile > $conffile.tmp + mv -f $conffile.tmp $conffile + + if [ -e "$systemdservice" ]; then + sed -e "s/User=.*/User=$I2PUSER/" < "$systemdservice" > "$systemdservice.tmp" + mv -f "$systemdservice.tmp" "$systemdservice" + chmod 0644 -f "$systemdservice" + if grep -q 'systemd' /proc/1/comm > /dev/null 2>&1; then + systemctl --system daemon-reload + if [ $RUN_DAEMON = 'true' ]; then + systemctl enable i2p.service + else + systemctl disable i2p.service + fi + fi + fi + + sed -e "s/^ *wrapper\.java\.maxmemory=.*/wrapper\.java\.maxmemory=$MEMORYLIMIT/" \ + < /etc/i2p/wrapper.config > /etc/i2p/wrapper.config.tmp + mv -f /etc/i2p/wrapper.config.tmp /etc/i2p/wrapper.config + chmod 0644 -f /etc/i2p/wrapper.config + + # Older versions of adduser created the home directory. + # The version of adduser in Debian unstable does not. + [ -d $I2PHOME ] || mkdir -m0750 $I2PHOME + + # Create user and group as a system user. + if getent passwd i2psvc > /dev/null 2>&1 ; then + groupadd -f $I2PSYSUSER || true + usermod -c "I2P Router Daemon" -d $I2PHOME -g $I2PSYSUSER -s "/bin/false" \ + $I2PSYSUSER -e 1 > /dev/null 2>&1 || true + else + adduser --system --quiet --group --home $I2PHOME $I2PSYSUSER > /dev/null 2>&1 + fi + + [ -d /var/log/i2p ] || mkdir -m0750 /var/log/i2p + chown -f -R $I2PSYSUSER:i2psvc /var/log/i2p + + # Has someone set the permissions with dpkg-statoverride? If so, obey them. + if ! dpkg-statoverride --list $I2PHOME > /dev/null 2>&1 + then + chown -f -R $I2PSYSUSER:$I2PSYSUSER $I2PHOME + chmod -f u=rwx,g=rxs,o= $I2PHOME + fi + + db_stop +;; +abort-upgrade|abort-remove|abort-deconfigure) + echo "Aborting upgrade" + exit 0 + ;; +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 +# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff --git a/debian-alt/trusty/control b/debian-alt/trusty/control index a09c2f4d622707c94f9e414dad0b99239bfb0efe..6268eececd3001ee1a3c7a81fbb0d1093677f38a 100644 --- a/debian-alt/trusty/control +++ b/debian-alt/trusty/control @@ -32,9 +32,9 @@ Depends: ${java:Depends}, ${shlibs:Depends}, debconf, i2p-router (>= 0.8.6-5), libjbigi-jni, - lsb-base, + lsb-base (>= 3.0-6), service-wrapper -Description: I2P anonymous network +Description: Anonymous network (I2P) I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no @@ -101,7 +101,7 @@ Suggests: tor ,syndie ,www-browser ,xul-ext-torbutton -Description: I2P router +Description: Router for I2P I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no diff --git a/debian-alt/wheezy/control b/debian-alt/wheezy/control index 0c0695d53d57d3d168247438c6abebe97c9aed63..fac5e9a4571b9484a0bbafb5d0b4e651e65d8b46 100644 --- a/debian-alt/wheezy/control +++ b/debian-alt/wheezy/control @@ -28,9 +28,9 @@ Depends: ${java:Depends}, ${shlibs:Depends}, debconf, i2p-router (>= 0.8.6-5), libjbigi-jni, - lsb-base, + lsb-base (>= 3.0-6), service-wrapper -Description: I2P anonymous network +Description: Anonymous network (I2P) I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no @@ -98,7 +98,7 @@ Suggests: tor ,syndie ,www-browser ,xul-ext-torbutton -Description: I2P router +Description: Router for I2P I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no diff --git a/debian-alt/xenial/control b/debian-alt/xenial/control index 2aea16cdfabbfb11c79c1172f1433a05e5450bbb..75883983c54d6e63c9a10617f35609d60d44fe71 100644 --- a/debian-alt/xenial/control +++ b/debian-alt/xenial/control @@ -31,9 +31,9 @@ Depends: ${java:Depends}, ${shlibs:Depends}, debconf, i2p-router (>= 0.8.6-5), libjbigi-jni, - lsb-base, + lsb-base (>= 3.0-6), service-wrapper -Description: I2P anonymous network +Description: Anonymous network (I2P) I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no @@ -102,7 +102,7 @@ Suggests: tor ,syndie ,www-browser ,xul-ext-torbutton -Description: I2P router +Description: Router for I2P I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no diff --git a/debian/control b/debian/control index d665948653cd2e1de8c5c10216f0b2e78301de8d..f7002d4e3dd694d7dd516e49a82de6527803532c 100644 --- a/debian/control +++ b/debian/control @@ -30,9 +30,9 @@ Depends: ${java:Depends}, ${shlibs:Depends}, debconf, i2p-router (>= 0.8.6-5), libjbigi-jni, - lsb-base, + lsb-base (>= 3.0-6), service-wrapper -Description: I2P anonymous network +Description: Anonymous network (I2P) I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no @@ -102,7 +102,7 @@ Suggests: tor ,syndie ,www-browser ,xul-ext-torbutton -Description: I2P router +Description: Router for I2P I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no diff --git a/debian/i2p.postinst b/debian/i2p.postinst index d612902ba3313c8f6c3170b085b73dc560654107..724a616eca1b14f520aec5f807b356cf284c0a41 100755 --- a/debian/i2p.postinst +++ b/debian/i2p.postinst @@ -74,9 +74,9 @@ case "$1" in if grep -q 'systemd' /proc/1/comm > /dev/null 2>&1; then systemctl --system daemon-reload if [ $RUN_DAEMON = 'true' ]; then - systemctl enable i2p.service + deb-systemd-helper enable i2p.service else - systemctl disable i2p.service + deb-systemd-helper disable i2p.service fi fi fi