diff --git a/debian/changelog b/debian/changelog index 0630433829fc0ada6df7e46bab65e02adcea9433..f02e8d39a402330e341199e29684c5443471ab38 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +i2p (0.9.11-2) UNRELEASED; urgency=medium + + * systemd support in Ubuntu Saucy (and newer) and Debian unstable (ticket + #1208) + * Set homepage address to geti2p.net + * Bump standards version (no source changes needed) + + -- Kill Your TV <killyourtv@i2pmail.org> Thu, 13 Mar 2014 01:10:46 +0000 + i2p (0.9.11-1) unstable; urgency=medium * New release diff --git a/debian/control b/debian/control index 499d77bf4056207146b96e7e78448afc296ebf01..7819031879c9be2923771ed9b78a0bdd403a4bcd 100644 --- a/debian/control +++ b/debian/control @@ -1,20 +1,24 @@ Source: i2p Maintainer: Kill Your TV <killyourtv@i2pmail.org> Section: net -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Priority: optional Bugs: mailto:killyourtv@i2pmail.org -Homepage: http://www.i2p2.de/ -Build-Depends: debhelper (>= 7.0.50~), - ant, - debconf, - default-jdk, - gettext, - libgmp3-dev, -# uncomment the next line for PPA builds -# libservice-wrapper-java, - libcommons-logging-java, - po-debconf +Homepage: https://geti2p.net +Build-Depends: debhelper (>= 7.0.50~) + ,ant (>= 1.8) + ,ant-optional + ,debconf + ,default-jdk | openjdk-7-jdk | openjdk-6-jdk + ,gettext + ,libgmp3-dev +# uncomment the next line for official builds +# ,libservice-wrapper-java + ,libcommons-logging-java + ,hardening-wrapper + ,po-debconf +# Uncomment the next line for Debian unstable or Ubuntu Saucy (and newer) +# ,dh-systemd Package: i2p Architecture: all @@ -49,46 +53,44 @@ Description: Java Big Integer library the ones used by I2P. You can expect to see a 5-7x speed improvement on certain tasks, such as elGamal encryption/decryption. -Package: i2p-doc -Architecture: all -Section: doc -Depends: ${misc:Depends} -Suggests: i2p, default-jdk-doc -Description: Documentation 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 - trusted parties. - . - This package contains the Javadoc files. +#Package: i2p-doc +#Architecture: all +#Section: doc +#Depends: ${misc:Depends} +#Suggests: i2p, default-jdk-doc +#Description: Documentation 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 +# trusted parties. +# . +# This package contains the Javadoc files. Package: i2p-router Architecture: all Section: net Priority: optional Depends: ${misc:Depends}, ${java:Depends}, ${shlibs:Depends}, - openjdk-6-jre-headless | openjdk-7-jre-headless | default-jre-headless | java5-runtime-headless | java6-runtime-headless, libecj-java + openjdk-7-jre-headless | openjdk-6-jre-headless | default-jre-headless | java7-runtime-headless | java6-runtime-headless, libecj-java Replaces: i2p ( << 0.8.6-5) Breaks: i2p (<< 0.8.6-5) -Recommends: libjbigi-jni (>= ${source:Version}), libjbigi-jni (<< ${source:Version}.1~), ttf-dejavu -Suggests: tor, - i2p-messenger, - i2phex, - i2p-tahoe-lafs, - imule, - i2pfox, - irc-client, - itoopie, - jircii, - mail-client, - mail-reader, - news-reader, - polipo, - privoxy, - robert, - syndie, - www-browser, - xul-ext-torbutton +Recommends: libjbigi-jni, ttf-dejavu +Suggests: tor + ,i2p-messenger + ,i2phex + ,i2p-tahoe-lafs + ,imule + ,irc-client + ,itoopie + ,mail-client + ,mail-reader + ,news-reader + ,polipo + ,privox + ,robert + ,syndie + ,www-browser + ,xul-ext-torbutton Description: Load-balanced unspoofable packet switching network I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several diff --git a/debian/i2p.postinst b/debian/i2p.postinst index dca27ccd245e0182819fc3b87b532f0a6625c091..1cf9ef87553a62f54bea65f7769370cc2513bcfa 100755 --- a/debian/i2p.postinst +++ b/debian/i2p.postinst @@ -1,9 +1,12 @@ -#!/bin/sh -e +#!/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... @@ -57,6 +60,20 @@ case "$1" in < $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 [ -x /bin/systemctl ]; 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 @@ -72,7 +89,7 @@ case "$1" in 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 + adduser --system --quiet --group --home $I2PHOME $I2PSYSUSER > /dev/null 2>&1 fi [ -d /var/log/i2p ] || mkdir -m0750 /var/log/i2p diff --git a/debian/i2p.service b/debian/i2p.service new file mode 100644 index 0000000000000000000000000000000000000000..6a4c8d3b40b294cd6400cfa6b93abce979f31d35 --- /dev/null +++ b/debian/i2p.service @@ -0,0 +1,26 @@ +[Unit] +Description=load-balanced unspoofable packet switching network +After=network.target + +[Service] +Type=forking +EnvironmentFile=/etc/default/i2p +Environment="I2P_ARGS=/etc/i2p/wrapper.config \ + wrapper.java.additional.1=-DloggerFilenameOverride=/var/log/i2p/log-router-@.txt \ + wrapper.java.additional.10=-Dwrapper.logfile=/var/log/i2p/wrapper.log \ + wrapper.java.additional.11=-Di2p.dir.pid=/run/i2p \ + wrapper.java.additional.12=-Di2p.dir.temp=/tmp/i2p-daemon \ + wrapper.logfile=/var/log/i2p/wrapper.log \ + wrapper.pidfile=/run/i2p/i2p.pid\ + wrapper.java.pidfile=/run/i2p/routerjvm.pid \ + wrapper.daemonize=TRUE" TZ=UTC +User=i2psvc +PermissionsStartOnly=true +ExecStartPre=/bin/mkdir -p /run/i2p /tmp/i2p-daemon +ExecStartPre=/bin/chown -R ${I2PUSER}:${I2PUSER} /var/log/i2p /run/i2p /tmp/i2p-daemon +ExecStartPre=/bin/chmod 750 /var/log/i2p +ExecStart=/usr/sbin/wrapper "$I2P_ARGS" +ExecStopPost=/bin/rm -rf /run/i2p /tmp/i2p-daemon + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index 9cab2018ce878fb0d64e9169bbabcc1904bb1834..447268238a05741316c9000a96c284318baadec7 100755 --- a/debian/rules +++ b/debian/rules @@ -36,6 +36,10 @@ export DEBIANVERSION := $(shell dpkg-parsechangelog |awk -F' ' '/^Version:/{prin %: dh $@ --with quilt + # with systemd needs dh-systemd which isn't available in Wheezy (except from backports), + # and is only Ubuntu as of "Saucy". The official packages will enable this for Debian unstable and + # Ubuntu Saucy (and newer) + #dh $@ --with systemd,quilt clean: createcopyright @@ -50,6 +54,13 @@ override_dh_auto_clean: override_dh_auto_build: +# Uncomment the next override line for systems that support dh-systemd +# (currently Debian unstable and Ubuntu Saucy (and newer)) +#override_dh_systemd_enable: + # We purposely do not set I2P to start at boot. + # This matches the behavior of the initscript + # and the setting RUN_DAEMON=false in /etc/default/i2p + binary-indep: build-indep build-indep: dh_prep