[or-cvs] r19491: {incognito} Added i2p. (in incognito/branches/hardened: . arch/x86 portage.config portage.overlay/net-p2p portage.overlay/net-p2p/i2p portage.overlay/net-p2p/i2p/files root_overlay/etc root_overlay/usr/share/applications root_overlay/var/lib/iptables)

anonym at seul.org anonym at seul.org
Sun May 10 17:29:21 UTC 2009


Author: anonym
Date: 2009-05-10 13:29:20 -0400 (Sun, 10 May 2009)
New Revision: 19491

Added:
   incognito/branches/hardened/portage.overlay/net-p2p/i2p/
   incognito/branches/hardened/portage.overlay/net-p2p/i2p/Manifest
   incognito/branches/hardened/portage.overlay/net-p2p/i2p/files/
   incognito/branches/hardened/portage.overlay/net-p2p/i2p/files/i2p.initd
   incognito/branches/hardened/portage.overlay/net-p2p/i2p/i2p-0.7.2.ebuild
   incognito/branches/hardened/root_overlay/usr/share/applications/i2p.desktop
Modified:
   incognito/branches/hardened/arch/x86/livecd-stage1.spec
   incognito/branches/hardened/fsscript.sh
   incognito/branches/hardened/portage.config/package.keywords
   incognito/branches/hardened/root_overlay/etc/sudoers
   incognito/branches/hardened/root_overlay/var/lib/iptables/rules-save
Log:
Added i2p.


Modified: incognito/branches/hardened/arch/x86/livecd-stage1.spec
===================================================================
--- incognito/branches/hardened/arch/x86/livecd-stage1.spec	2009-05-10 09:55:23 UTC (rev 19490)
+++ incognito/branches/hardened/arch/x86/livecd-stage1.spec	2009-05-10 17:29:20 UTC (rev 19491)
@@ -227,6 +227,7 @@
 	net-misc/vidalia
 	net-misc/whois
 	net-p2p/freenet
+	net-p2p/i2p
 	net-p2p/ktorrent
 	net-proxy/3proxy
 	net-proxy/dante

Modified: incognito/branches/hardened/fsscript.sh
===================================================================
--- incognito/branches/hardened/fsscript.sh	2009-05-10 09:55:23 UTC (rev 19490)
+++ incognito/branches/hardened/fsscript.sh	2009-05-10 17:29:20 UTC (rev 19491)
@@ -68,6 +68,7 @@
 # Make sure we use IcedTea as java VM
 echo "Setting up system Java VM"
 eselect java-vm set system icedtea6-bin
+eselect java-nsplugin set icedtea6-bin
 
 # Tor nick
 echo "Nickname incognito`date | md5sum | cut -b 1-10`" >> /etc/tor/torrc
@@ -203,6 +204,12 @@
 		cp -a /var/lib/pidgin-config ${USERDIR}/.purple
 	fi
 
+	# Mplayer config
+	if [[ -x /usr/bin/mplayer ]]; then
+		echo "Setting up mplayer"
+		cp -a /var/lib/mplayer-config ${USERDIR}/.mplayer
+	fi
+
 	# Ensure correct user dir permissions
 	echo "Setting user permissions"
 	chown -R ${USERNAME}:users ${USERDIR}

Modified: incognito/branches/hardened/portage.config/package.keywords
===================================================================
--- incognito/branches/hardened/portage.config/package.keywords	2009-05-10 09:55:23 UTC (rev 19490)
+++ incognito/branches/hardened/portage.config/package.keywords	2009-05-10 17:29:20 UTC (rev 19491)
@@ -9,6 +9,7 @@
 net-misc/tor ~*
 net-misc/vidalia ~*
 net-p2p/freenet ~*
+net-p2p/i2p ~*
 net-p2p/retroshare ~*
 net-proxy/polipo ~*
 net-proxy/tsocks ~*

Added: incognito/branches/hardened/portage.overlay/net-p2p/i2p/Manifest
===================================================================
--- incognito/branches/hardened/portage.overlay/net-p2p/i2p/Manifest	                        (rev 0)
+++ incognito/branches/hardened/portage.overlay/net-p2p/i2p/Manifest	2009-05-10 17:29:20 UTC (rev 19491)
@@ -0,0 +1,3 @@
+AUX i2p.initd 379 RMD160 fe9d3a9b45d207e0bfb19939ba032e6941f855da SHA1 0563131b695f728df132919c4ab13299818eca72 SHA256 6353663ff03e4c6ed2e9411f59f34d7312a0ec351496dd9edfaf88191d6241f4
+DIST i2pheadless_0.7.2.tar.bz2 7321223 RMD160 df531d6b24c54e550b47d4c930198610eeb55e25 SHA1 068512a688a793ee8ad55e4de8fd82417d4d9f98 SHA256 83307dd35d7b3fe494e3b7d5116e75eaf49c3ae0e1b8bdc34defc7c717deedd4
+EBUILD i2p-0.7.2.ebuild 2030 RMD160 aa47b59b54bdb4d67c3b5a4fda805cd50839291b SHA1 2f0df71f5e5e6c241a22c803dc5f810fc7c11246 SHA256 fd9b5640ebb07cde3432f21c8e0def72ba780134363b6c71ff3d7fa4d3da8b9c

Added: incognito/branches/hardened/portage.overlay/net-p2p/i2p/files/i2p.initd
===================================================================
--- incognito/branches/hardened/portage.overlay/net-p2p/i2p/files/i2p.initd	                        (rev 0)
+++ incognito/branches/hardened/portage.overlay/net-p2p/i2p/files/i2p.initd	2009-05-10 17:29:20 UTC (rev 19491)
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+
+PIDFILE=/var/i2p/i2p.pid
+
+depend() {
+        need net
+}
+
+start() {
+	ebegin "Starting i2p"
+	start-stop-daemon --start --background --oknodo --pidfile "${PIDFILE}" --exec /usr/bin/i2prouter -- start &>/dev/null
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping i2p"
+	start-stop-daemon --stop --pidfile "${PIDFILE}" --exec /usr/bin/i2prouter -- stop &> /dev/null
+	eend $?
+}


Property changes on: incognito/branches/hardened/portage.overlay/net-p2p/i2p/files/i2p.initd
___________________________________________________________________
Added: svn:executable
   + *

Added: incognito/branches/hardened/portage.overlay/net-p2p/i2p/i2p-0.7.2.ebuild
===================================================================
--- incognito/branches/hardened/portage.overlay/net-p2p/i2p/i2p-0.7.2.ebuild	                        (rev 0)
+++ incognito/branches/hardened/portage.overlay/net-p2p/i2p/i2p-0.7.2.ebuild	2009-05-10 17:29:20 UTC (rev 19491)
@@ -0,0 +1,82 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+# Based on ebuild by Ycarus (http://gentoo.zugaina.org/)
+
+inherit eutils
+
+DESCRIPTION="I2P is an anonymous network, exposing a simple layer that applications can use to anonymously and securely send messages to each other."
+SRC_URI="http://mirror.i2p2.de/i2pheadless_${PV}.tar.bz2"
+HOMEPAGE="http://www.i2p.net/"
+
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+LICENSE="GPL-2 public-domain"
+IUSE=""
+DEPEND="virtual/jre"
+
+S=${WORKDIR}/${PN}
+
+QA_TEXTRELS="/var/i2p/i2psvc"
+QA_EXECSTACK="/var/i2p/i2psvc"
+
+pkg_setup() {
+	enewgroup i2p
+	enewuser i2p -1 -1 /var/i2p i2p
+}
+
+src_install() {
+	dodoc history.txt LICENSE.txt
+	rm -f history.txt LICENSE.txt
+
+	if [ "${ARCH}" == "x86" ]; then
+		WRAPPER=linux
+	elif [ "${ARCH}" == "amd64" ] ; then
+		WRAPPER=linux64
+	fi
+
+	cp lib/wrapper/${WRAPPER}/libwrapper.so lib
+	cp lib/wrapper/${WRAPPER}/wrapper.jar lib
+	cp lib/wrapper/${WRAPPER}/i2psvc .
+
+	rm -rf icons
+	rm -rf lib/wrapper
+	rm -f lib/*.dll
+	rm -f *.bat
+	rm -f *.exe
+	rm -f postinstall.sh
+
+	chmod 755 eepget
+	chmod 755 scripts/i2pbench.sh
+	chmod 755 scripts/i2ptest.sh
+	chmod 755 i2prouter
+	chmod 755 i2psvc
+
+	# disable automatic updates
+	if [ ! -e /var/i2p/router.config ]; then
+		if grep -q -e "^router.updatePolicy=.*$" router.config; then
+			sed -i "s/^router.updatePolicy=.*$/router.updatePolicy=notify/" router.config
+		else
+			echo "router.updatePolicy=notify" >> router.config
+		fi
+	fi
+
+	dodir /var/i2p /usr/bin
+	cp -R "${S}"/* "${D}"/var/i2p
+	dosym "/var/i2p"/i2prouter /usr/bin/i2prouter
+	newinitd "${FILESDIR}"/i2p.initd i2p
+}
+
+pkg_postinst() {
+	einfo "Start i2p with /etc/init.d/i2p start"
+	einfo "Configure the router in a browser by opening: http://localhost:7657"
+	#workaround for previously existing i2p user
+	[[ $(stat --format="%U" /var/i2p) == "i2p" ]] || chown i2p:i2p /var/i2p
+}
+
+pkg_postrm() {
+	if [ -z has_version ]; then
+		elog "In order to remove i2p completely you must rem"
+		elog "	rm -rf /var/i2p"
+	fi
+}

Modified: incognito/branches/hardened/root_overlay/etc/sudoers
===================================================================
--- incognito/branches/hardened/root_overlay/etc/sudoers	2009-05-10 09:55:23 UTC (rev 19490)
+++ incognito/branches/hardened/root_overlay/etc/sudoers	2009-05-10 17:29:20 UTC (rev 19491)
@@ -38,3 +38,4 @@
 %wheel	ALL	=	NOPASSWD: /sbin/iwconfig
 %wheel	ALL	=	NOPASSWD: /sbin/route
 %wheel  ALL     =       NOPASSWD: /etc/init.d/freenet
+%wheel  ALL     =       NOPASSWD: /etc/init.d/i2p

Added: incognito/branches/hardened/root_overlay/usr/share/applications/i2p.desktop
===================================================================
--- incognito/branches/hardened/root_overlay/usr/share/applications/i2p.desktop	                        (rev 0)
+++ incognito/branches/hardened/root_overlay/usr/share/applications/i2p.desktop	2009-05-10 17:29:20 UTC (rev 19491)
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Categories=Network;
+Comment=Anonymous overlay network 
+Exec=sudo /etc/init.d/i2p restart; sleep 30; firefox http://localhost:7657/
+Name=i2p
+GenericName=Anonymous overlay network
+Terminal=false
+Type=Application

Modified: incognito/branches/hardened/root_overlay/var/lib/iptables/rules-save
===================================================================
--- incognito/branches/hardened/root_overlay/var/lib/iptables/rules-save	2009-05-10 09:55:23 UTC (rev 19490)
+++ incognito/branches/hardened/root_overlay/var/lib/iptables/rules-save	2009-05-10 17:29:20 UTC (rev 19491)
@@ -12,9 +12,10 @@
 [0:0] -A OUTPUT -d 172.16.0.0/255.240.0.0 -j ACCEPT
 [0:0] -A OUTPUT -d 127.0.0.0/255.0.0.0 -j ACCEPT
 
-# Tor, Freenet and NTP get direct network access.
+# Tor, Freenet, i2p and NTP get direct network access.
 [0:0] -A OUTPUT -m owner --uid-owner tor -j ACCEPT
 [0:0] -A OUTPUT -m owner --uid-owner freenet -j ACCEPT
+[0:0] -A OUTPUT -m owner --uid-owner i2p -j ACCEPT
 [0:0] -A OUTPUT -m owner --uid-owner ntp -j ACCEPT
 
 # Drop remaining traffic.
@@ -35,9 +36,10 @@
 [0:0] -A OUTPUT -d 127.0.0.0/255.128.0.0 -j RETURN
 [0:0] -A OUTPUT -d 127.128.0.0/255.192.0.0 -j RETURN
 
-# Tor, Freenet and NTP get direct network access.
+# Tor, Freenet, i2p and NTP get direct network access.
 [0:0] -A OUTPUT -m owner --uid-owner tor -j RETURN
 [0:0] -A OUTPUT -m owner --uid-owner freenet -j RETURN
+[0:0] -A OUTPUT -m owner --uid-owner i2p -j RETURN
 [0:0] -A OUTPUT -m owner --uid-owner ntp -j RETURN
 
 # .onion mapped addresses redirection to Tor.



More information about the tor-commits mailing list