summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Blas Izquierdo Riera (klondike) <klondike@xiscosoft.es>2014-12-29 23:19:14 +0100
committerFrancisco Blas Izquierdo Riera (klondike) <klondike@xiscosoft.es>2014-12-29 23:19:14 +0100
commit9b6e54708e54ab01df7830845a933bc36458c8bb (patch)
treec719c547c3b99e3ca31cf1c16f4c405d23a07812
parentNo more old EAPIs here (diff)
downloadklondike-9b6e54708e54ab01df7830845a933bc36458c8bb.tar.gz
klondike-9b6e54708e54ab01df7830845a933bc36458c8bb.tar.bz2
klondike-9b6e54708e54ab01df7830845a933bc36458c8bb.zip
Initial support for i2pd using a live ebuild
Package-Manager: portage-2.2.14 Manifest-Sign-Key: 0xA5C1A1D24B128E52
-rw-r--r--net-misc/i2pd/ChangeLog6
-rw-r--r--net-misc/i2pd/Manifest24
-rw-r--r--net-misc/i2pd/files/99i2pd1
-rw-r--r--net-misc/i2pd/files/i2pd.1107
-rw-r--r--net-misc/i2pd/files/i2pd.conf4
-rw-r--r--net-misc/i2pd/files/i2pd.confd6
-rw-r--r--net-misc/i2pd/files/i2pd.initd24
-rw-r--r--net-misc/i2pd/files/i2pd.logrotate14
-rw-r--r--net-misc/i2pd/files/i2pd.service17
-rw-r--r--net-misc/i2pd/i2pd-9999.ebuild65
-rw-r--r--net-misc/i2pd/metadata.xml19
11 files changed, 287 insertions, 0 deletions
diff --git a/net-misc/i2pd/ChangeLog b/net-misc/i2pd/ChangeLog
new file mode 100644
index 0000000..1043500
--- /dev/null
+++ b/net-misc/i2pd/ChangeLog
@@ -0,0 +1,6 @@
+*i2pd-9999 (29 Dec 2014)
+
+ 29 Dec 2014; Francisco Blas Izquierdo Riera (klondike) +i2pd-9999.ebuild,
+ +files/99i2pd, +files/i2pd.1, +files/i2pd.conf, +files/i2pd.confd,
+ +files/i2pd.initd, +files/i2pd.logrotate, +files/i2pd.service, +metadata.xml:
+ Initial support for i2pd using a live ebuild
diff --git a/net-misc/i2pd/Manifest b/net-misc/i2pd/Manifest
new file mode 100644
index 0000000..aa0d65f
--- /dev/null
+++ b/net-misc/i2pd/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX 99i2pd 44 SHA256 ecc85329d663182165bf6b5f672237a9f4f129f39f168d38c876345f3b83d765 SHA512 0bd08ff5b1b2ad8d91572efee848a760e2fb46d9c1a5ead3fbdde91d679d832d985905952b393eb523ec9d8f1815bf1512ae61fbc059d10f0773991ac097c23f WHIRLPOOL 08404eab764fa25ae0f5cbda5fa38deabcae913baf3e0d4e151ae34a0fb3383994d0ab4db15e60827a3fc18ebaf4e4f541163cc3825b3baf3c75533a08d4c94e
+AUX i2pd.1 3568 SHA256 713a40b5fe6c6fb40a7c1ee4e7cc4e7c5cdd9cde88a01651357c6b744168983d SHA512 523d2823c0ddec83ed650cc4c61e4965c3985d7399c73679e68d27c675924715bf86c22a3335ac97e963095c1db9c199da3a74ddbddc3110289561194e06d109 WHIRLPOOL d9b2ab16cf8da0330f0b88740496a5c2f5221f83daeabf493faafa6b4d010bff01da160547e7b3e513c88a1642e98531858f0a5aa2a357c25f680ec0b779fce9
+AUX i2pd.conf 32 SHA256 723d883dbdc9cdad64d58db65d29f48f63b9402d9af6ce81bc2c17cd0e250e02 SHA512 426c141445a84dcadf38f0321c68e0c851b9f01cc40858a217ef5e8202fee446f250dbeeeeef22a48086628ee8b4f8ea7683b3f936ce70fa6c28d29eee4271f8 WHIRLPOOL f5596d54105052b996bc0fc93937f92ff7eb52b3c8290c1eae51a45b54a453cc6b83acc49dfaeab30947807bcbb312ee1fd4a8ed1b38a11402a2e54a8ffd4075
+AUX i2pd.confd 176 SHA256 9021447caafd6193a5a87b12d815facf8608d37e0af3e6ff934975f255811385 SHA512 706be4b5c7c1f14222129ec079294fa99c8ee024fede18a64d6d117bf7982e1bc87b19544bf46ff139caad18dc4d592275f7f73171be5abd140909a72c0a14ed WHIRLPOOL c71d2055a64bceb9f4e31415e306e14453f5780874744142025c5c97bb3519c06bd50fcd3ef2b839932cedf313dcd171fe8c77d2d55ee46c74ee247b02e69235
+AUX i2pd.initd 472 SHA256 94bfa1638141b8d5595e814cedb3ed828aade088f9c6f8fb7e703a1af37df88a SHA512 4cd191d0256cb8ee325c18e62c7cfad3a1117cee96ff83bf8987e5efb8574742993410a4f96083969860a88f6575ca3489ae6cba4035dcc3d7787b8c246b274c WHIRLPOOL 8b5b872fc17966c0cc5fe5ee0bd38bf29f4c6a54e22d0ea9a44036043248d04f01f87c3668e778e6fe812f1b3c4f499c1b124c54fb288941a0d7e898cb0a1c10
+AUX i2pd.logrotate 270 SHA256 cac89d98a0c2eff2eeedb323b3b81c3e316293f80d3397bfeb833f700e98b691 SHA512 08a944576f3f103ef7206e5e09ad7256f79254097d389b955271db9a8e3781332d9ac564cef06a7bb6c3837324abee3035cb18588470f43861310e886c4f7075 WHIRLPOOL 79096ea93a446240d84bc65930e0746f8fae203303d9309a1a345a1818c11525d782f51dd7200f55d5f1c79b79a7d43c9d1a510225aa5bdf522baf4884a45700
+AUX i2pd.service 399 SHA256 6fa9a8a00e9831c824cf049ebc245ec65510d19fa65e7f8a352f88b0433115d4 SHA512 353e33254ba2d7bc8b6ebc5551ee1bb81ccbce97667018c5b6341df154d1d734cad09a2a1e0bc8b05132020aca92e98783e6719176d1306e1984bd86a4d45f65 WHIRLPOOL fd0bb4b15449d1a892c62a4aa1015cec4ee8c8af38e2b263e654200938af15128b444ee2a79ff2fc6ba83801d21385a09b779dc45d53e9060f4aff250f6e760a
+EBUILD i2pd-9999.ebuild 1875 SHA256 2e34270722cfb8501c282c89d14987a1857cc6adb70f50c884b988e5cbbe9fd3 SHA512 18877c292889d5d614fdd310a243e0e574fe98f124ac29411a716a634318b2a25770505635444994c6903d1303c1b24625463c860ed4c2afaf3cf085b25f7d38 WHIRLPOOL 283361622bfee68c94b832bae9c43d5e86f146fc6031c9620da6c55ebcc36a789bf0c3329f6cdd69abe418b56259f2f6eccf48dd8f8fb3463020ca71071b9ede
+MISC ChangeLog 298 SHA256 e877c347437e7493355d59e1646421833afe35f509cbae76a34c7a93eb295610 SHA512 1523fd336e1eda84718e3c87b88c89f138a7307f21b550fb7430dd7cb97c1fdac216f254e87ccf61ee480b342aabef44e17854a874c89c881709878dc10f6871 WHIRLPOOL 0d80e964fcad10c9705e13f1f8d57af85d187209140a45a658c9ffb7e37de2c1f385015ba65e4d4820ceb9c59096768ae6c3df526ea1c3526de66949dcad18c1
+MISC metadata.xml 505 SHA256 94805fb4a94ff250fb81c585d9088f9575b6cef36b717bee72a566fe7a9d13aa SHA512 c4ff8b6c0535316934c77fd3c5249481a4c2a619a4f743b7f7784ff25e1b2839690239581c1d92b4176d4369c4f6a5a488f206c3ed6cc0433843e08b1f2c20f5 WHIRLPOOL 8231dfd31bdbc80c375f3efc8f190c10bd208c553e070ae3181bcf3d7e0760b540877a90f347080c43984c6a6a3815e91f5e211972058b444869b43b82c7e710
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQEcBAEBCAAGBQJUodNiAAoJEKXBodJLEo5SMjAIAKGr5VQXQaQvCtXvHp9ZRuY3
+CwjCxRNgaMosyGL3DtZw6Yy3E6HHJ3VIEWjkJpgEVymL30U5CB4ZLwnAaAMT7WO8
+QwygEQ9nP57RfeVAde75qavMmz0ve7pg2Q+r+B4qujwJeI14z/kghVEv4jiRiw8x
+0gHv0HbXQlBMaY6Ztv2vsf6wBxrhST9n5xhfZkhqTfFJ0EMi6KEGbMRjJrl8W6q/
+RDo3PJmidUmiPmBrasK0Tjic3qZMBuT7FX2RnRrJK9xjCJ9WDIuDxxc6098ji3aq
+ohXYXnadLST9yGkd/ShNxmd+lZc/pno06LT+juaV/DEK70VhLSYBzPLd1DVsRYw=
+=czJ9
+-----END PGP SIGNATURE-----
diff --git a/net-misc/i2pd/files/99i2pd b/net-misc/i2pd/files/99i2pd
new file mode 100644
index 0000000..3cf3b46
--- /dev/null
+++ b/net-misc/i2pd/files/99i2pd
@@ -0,0 +1 @@
+CONFIG_PROTECT="/var/lib/i2pd/certificates"
diff --git a/net-misc/i2pd/files/i2pd.1 b/net-misc/i2pd/files/i2pd.1
new file mode 100644
index 0000000..dd08fb4
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.1
@@ -0,0 +1,107 @@
+.TH I2PD "1" "November 29, 2014"
+
+.SH NAME
+i2pd \- Load-balanced unspoofable packet switching network
+
+.SH SYNOPSIS
+.B i2pd
+[\fIOPTION1\fR) [\fIOPTION2\fR]...
+
+.SH DESCRIPTION
+i2pd
+is a C++ implementation of the router for the I2P 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.
+
+.PP
+Any of the configuration options below can be used in the \fBDAEMON_ARGS\fR variable in \fI/etc/default/i2pd\fR.
+.BR
+.TP
+\fB\-\-host=\fR
+The external IP
+.TP
+\fB\-\-port=\fR
+The external port to listen on
+.TP
+\fB\-\-httpport=\fR
+The HTTP port to listen on
+.TP
+\fB\-\-log=\fR[\fI1\fR|\fI0\fR]
+.br
+Enable of disable logging to a file. \fI1\fR for yes, \fI0\fR for no. (default: \fI0\fR, off)
+.TP
+\fB\-\-daemon=\fR[\fI1\fR|\fI0\fR]
+Enable or disable daemon mode. Daemon mode is enabled with \fI1\fR and disabled with \fI0\fR. (default: \fI0\fR, off)
+.TP
+\fB\-\-service=\fR[\fI1\fR|\fI0\fR]
+If enabled, system folders (\fB/var/run/i2pd.pid\fR, \fB/var/log/i2pd.log\fR, \fB/var/lib/i2pd\fR) will be used. If off, \fB$HOME/.i2pd\fR will be used instead. (default: \fI0\fR, off).
+.TP
+\fB\-\-unreachable=\fR[\fI1\fR|\fI0\fR]
+\fI1\fR if router is declared as unreachable and works through introducers. (default: \fI0\fR, off)
+.TP
+\fB\-\-v6=\fR[\fI1\fR|\fI0\fR]
+\fI1\fR if \fBi2pd\fR should communicate via IPv6. (default: \fI0\fR, off)
+.TP
+\fB\-\-httpproxyport=\fR
+The local port for the HTTP Proxy to listen on (default: \fI4446\fR)
+.TP
+\fB\-\-socksproxyport=\fR
+The local port for the SOCKS proxy to listen on (default: \fI4447\fR)
+.TP
+\fB\-\-ircport=\fR
+The local port of IRC tunnel to listen on. (default: \fI6668\fR)
+.TP
+\fB\-\-ircdest=\fR
+I2P destination address of an IRC server to connect to, e.g. \fIirc.postman.i2p\fR
+.TP
+\fB\-\-irckeys=\fR
+optional keys file for local destination
+.TP
+\fB\-\-eepkeys=\fR
+File name containing destination keys. For example \fIprivKeys.dat\fR
+.TP
+\fB\-\-eephost=\fR
+Address incoming trafic is forwarded to, \fI127.0.0.1\fR by default
+.TP
+\fB\-\-eepport=\fR
+Port incoming trafic forward to. \fI80\fR by default
+.TP
+\fB\-\-samport=\fR
+Port of SAM bridge. Usually \fI7656\fR. SAM will not be enabled if this is not set. (default: unset)
+.TP
+\fB\-\-bobport=\fR
+Port of BOB command channel. Usually \fI2827\fR. BOB will not be enabled if this is not set. (default: unset)
+.TP
+\fB\-\-conf=\fR
+Config file (default: \fI~/.i2pd/i2p.conf\fR or \fI/var/lib/i2pd/i2p.conf\fR)
+This parameter will be silently ignored if the specified config file does not exist.
+Options specified on the command line take precedence over those in the config file.
+
+.SH FILES
+.PP
+/etc/default/i2pd
+.RS 4
+i2pd configuration file (when running as a system service)
+
+.RE
+.PP
+/var/lib/i2pd/
+.RS 4
+i2pd profile directory (when running as a system service, see \fB\-\-service=\fR above)
+.RE
+.PP
+$HOME/.i2pd
+.RS 4
+i2pd profile directory (when running as a normal user)
+.RE
+.PP
+/usr/share/doc/i2pd/examples/hosts.txt.gz
+.RS 4
+default I2P hosts file
+.SH AUTHOR
+This manual page was written by kytv <killyourtv@i2pmail.org> for the Debian system (but may be used by others).
+.BR
+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation
+.BR
+On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL
diff --git a/net-misc/i2pd/files/i2pd.conf b/net-misc/i2pd/files/i2pd.conf
new file mode 100644
index 0000000..f1c06c0
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.conf
@@ -0,0 +1,4 @@
+log = 1
+daemon = 0
+service = 1
+
diff --git a/net-misc/i2pd/files/i2pd.confd b/net-misc/i2pd/files/i2pd.confd
new file mode 100644
index 0000000..7913af7
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.confd
@@ -0,0 +1,6 @@
+I2PD_USER="${I2PD_USER:-i2pd}"
+I2PD_GROUP="${I2PD_GROUP:-i2pd}"
+I2PD_LOG="/var/log/i2pd.log"
+I2PD_PID="/var/run/i2pd.pid"
+# Options to i2pd
+I2PDOPTIONS="--conf=/etc/i2pd.conf"
diff --git a/net-misc/i2pd/files/i2pd.initd b/net-misc/i2pd/files/i2pd.initd
new file mode 100644
index 0000000..f9e2839
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+description="C++ daemon for accessing the I2P network"
+
+command="/usr/bin/i2pd"
+command_args="${I2PDOPTIONS}"
+pidfile="${I2PD_PID}"
+
+depend() {
+ use dns logger netmount
+}
+
+start_pre() {
+ touch "${I2PD_LOG}" "${I2PD_PID}"
+ chown "${I2PD_USER}:${I2PD_GROUP}" "${I2PD_LOG}" "${I2PD_PID}"
+}
+
+
+stop_post() {
+ rm -f "${I2PD_PID}"
+}
diff --git a/net-misc/i2pd/files/i2pd.logrotate b/net-misc/i2pd/files/i2pd.logrotate
new file mode 100644
index 0000000..790cd2a
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.logrotate
@@ -0,0 +1,14 @@
+/var/log/i2pd.log {
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ compress
+ delaycompress
+ copytruncate
+ create 640 i2pd i2pd
+ postrotate
+ /etc/init.d/i2pd restart >/dev/null
+ endscript
+}
+
diff --git a/net-misc/i2pd/files/i2pd.service b/net-misc/i2pd/files/i2pd.service
new file mode 100644
index 0000000..c98083c
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=C++ daemon for accessing the I2P network
+After=network.target
+
+[Service]
+Restart=on-abnormal
+PIDFile=/var/run/i2pd.pid
+User=i2pd
+Group=i2pd
+PermissionsStartOnly=yes
+ExecStartPre=/bin/touch /var/run/i2pd.pid /var/log/i2pd.log
+ExecStartPre=/bin/chown i2pd:i2pd /run/i2pd.pid /var/log/i2pd.log
+ExecStart=/usr/lib/i2pd/i2p --conf=/etc/i2pd.conf
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-misc/i2pd/i2pd-9999.ebuild b/net-misc/i2pd/i2pd-9999.ebuild
new file mode 100644
index 0000000..74d1990
--- /dev/null
+++ b/net-misc/i2pd/i2pd-9999.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit eutils systemd user git-2 cmake-utils
+
+DESCRIPTION="A C++ daemon for accessing the I2P anonymous network"
+HOMEPAGE="https://github.com/PrivacySolutions/i2pd"
+SRC_URI=""
+EGIT_REPO_URI="git://github.com/PrivacySolutions/i2pd"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="aesni i2p-hardening +library static"
+
+RDEPEND="!static? ( >=dev-libs/boost-1.46[threads] )
+ !static? ( dev-libs/crypto++ )"
+DEPEND="${RDEPEND}
+ static? ( >=dev-libs/boost-1.46[static-libs,threads] )
+ static? ( dev-libs/crypto++[static-libs] )
+ >=dev-util/cmake-2.8
+ i2p-hardening? ( >=sys-devel/gcc-4.6 )
+ || ( >=sys-devel/gcc-4.6 >=sys-devel/clang-3.3 )"
+
+I2PD_USER="${I2PD_USER:-i2pd}"
+I2PD_GROUP="${I2PD_GROUP:-i2pd}"
+
+CMAKE_USE_DIR="${S}/build"
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_with aesni AESNI)
+ $(cmake-utils_use_with i2p-hardening HARDENING)
+ $(cmake-utils_use_with library LIBRARY)
+ $(cmake-utils_use_with static STATIC)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc README.md
+ doman "${FILESDIR}/${PN}.1"
+ keepdir /var/lib/i2pd/
+ fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
+ fperms 700 /var/lib/i2pd/
+ insinto /etc/
+ doins "${FILESDIR}/${PN}.conf"
+ fowners "${I2PD_USER}:${I2PD_GROUP}" "/etc/${PN}.conf"
+ fperms 600 "/etc/${PN}.conf"
+ dodir /usr/share/i2pd
+ cp -R "${S}/contrib/certificates" "${D}/var/lib/i2pd" || die "Install failed!"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ doenvd "${FILESDIR}/99${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+}
+
+pkg_setup() {
+ enewgroup "${I2PD_GROUP}"
+ enewuser "${I2PD_USER}" -1 -1 "/var/lib/run/${PN}" "${I2PD_GROUP}"
+}
diff --git a/net-misc/i2pd/metadata.xml b/net-misc/i2pd/metadata.xml
new file mode 100644
index 0000000..7a2dc0e
--- /dev/null
+++ b/net-misc/i2pd/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>klondike@gentoo.org</email>
+ <name>Francisco Blas Izquierdo Riera</name>
+ </maintainer>
+ <use>
+ <flag name="aesni">
+ Enable support for the AES-NI instruction set
+ </flag>
+ <flag name="i2p-hardening">
+ Compile with hardening on vanilla compilers/linkers
+ </flag>
+ <flag name="library">
+ Build the libi2pd library
+ </flag>
+ </use>
+</pkgmetadata>