Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (738ce806a0dda1e04f03d2078d6b85d019db19a8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (738ce806a0dda1e04f03d2078d6b85d019db19a8)
  • Date: Thu, 20 Oct 2016 02:01:10 +0000

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

ChangeLog | 3 ++
net/i2pd/BUILD | 7 +++++
net/i2pd/CONFIGURE | 3 ++
net/i2pd/DEPENDS | 9 +++++++
net/i2pd/DETAILS | 27 ++++++++++++++++++++++
net/i2pd/HISTORY | 4 +++
net/i2pd/INSTALL | 21 +++++++++++++++++
net/i2pd/PRE_BUILD | 12 ++++++++++
net/i2pd/gcc46.patch | 55
++++++++++++++++++++++++++++++++++++++++++++++
net/i2pd/gcc46_upnp.patch | 26 +++++++++++++++++++++
net/i2pd/init.d/i2pd | 23 +++++++++++++++++++
net/i2pd/init.d/i2pd.conf | 3 ++
net/i2pd/libressl.patch | 11 +++++++++
13 files changed, 204 insertions(+)

New commits:
commit 738ce806a0dda1e04f03d2078d6b85d019db19a8
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

i2pd: new spell, full C++ implementation of I2P client

diff --git a/ChangeLog b/ChangeLog
index 5b0bca7..7cc3ca0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-10-19 Vlad Glagolev <stealth AT sourcemage.org>
+ * net/i2pd: new spell, full C++ implementation of I2P client
+
2016-10-19 Ismael Luceno <ismael AT sourcemage.org>
* devel/mercurylang: new spell, Mercury pure logic programming
language
diff --git a/net/i2pd/BUILD b/net/i2pd/BUILD
new file mode 100755
index 0000000..2ed0344
--- /dev/null
+++ b/net/i2pd/BUILD
@@ -0,0 +1,7 @@
+OPTS="${I2PD_OPTS} ${OPTS}" &&
+
+make $OPTS all api api_client &&
+
+if list_find "$LDFLAGS" "-s"; then
+ make strip
+fi
diff --git a/net/i2pd/CONFIGURE b/net/i2pd/CONFIGURE
new file mode 100755
index 0000000..1ae3839
--- /dev/null
+++ b/net/i2pd/CONFIGURE
@@ -0,0 +1,3 @@
+config_query_option I2PD_OPTS "Enable MeshNet support?" n \
+ "USE_MESHNET=yes" \
+ "USE_MESHNET=no"
diff --git a/net/i2pd/DEPENDS b/net/i2pd/DEPENDS
new file mode 100755
index 0000000..ef566fb
--- /dev/null
+++ b/net/i2pd/DEPENDS
@@ -0,0 +1,9 @@
+depends -sub CXX gcc &&
+depends -sub "SYSTEM DATE_TIME FILESYSTEM PROGRAM_OPTIONS" boost &&
+depends SSL &&
+depends zlib &&
+
+optional_depends miniupnpc \
+ "USE_UPNP=yes" \
+ "USE_UPNP=no" \
+ "for UPnP support"
diff --git a/net/i2pd/DETAILS b/net/i2pd/DETAILS
new file mode 100755
index 0000000..a20ba7b
--- /dev/null
+++ b/net/i2pd/DETAILS
@@ -0,0 +1,27 @@
+ SPELL=i2pd
+ VERSION=2.10.0
+ SOURCE=${SPELL}-${VERSION}.tar.gz
+
SOURCE_URL[0]=https://github.com/PurpleI2P/${SPELL}/archive/${VERSION}.tar.gz
+
SOURCE_HASH=sha256:614d746e4d0b13433de56eb0492a6a4aa36a5b43ab88f12429ed5bd20baa78a0:UPSTREAM_HASH
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+ DOCS="docs/configuration.md docs/usage.md"
+ DOC_DIRS=""
+ WEB_SITE=https://github.com/PurpleI2P/i2pd
+ LICENSE[0]=BSD
+ ENTERED=20161019
+ SHORT="full C++ implementation of I2P client"
+cat << EOF
+i2pd (I2P Daemon) is a full-featured C++ implementation of I2P client.
+
+I2P (Invisible Internet Protocol) is a universal anonymous network layer. All
+communications over I2P are anonymous and end-to-end encrypted, participants
+don't reveal their real IP addresses.
+
+I2P client is a software used for building and using anonymous I2P networks.
+Such networks are commonly used for anonymous peer-to-peer applications
+(filesharing, cryptocurrencies) and anonymous client-server applications
+(websites, instant messengers, chat-servers).
+
+I2P allows people from all around the world to communicate and share
information
+without restrictions.
+EOF
diff --git a/net/i2pd/HISTORY b/net/i2pd/HISTORY
new file mode 100644
index 0000000..8644293
--- /dev/null
+++ b/net/i2pd/HISTORY
@@ -0,0 +1,4 @@
+2016-10-19 Vlad Glagolev <stealth AT sourcemage.org>
+ * {PRE_,}BUILD, CONFIGURE, DEPENDS, DETAILS, INSTALL,
+ init.d/i2pd{,.conf}, gcc46{,_upnp}.patch, libressl.patch: spell
+ created, version 2.10.0
diff --git a/net/i2pd/INSTALL b/net/i2pd/INSTALL
new file mode 100755
index 0000000..2024d20
--- /dev/null
+++ b/net/i2pd/INSTALL
@@ -0,0 +1,21 @@
+install -vm 755 i2pd "${INSTALL_ROOT}/usr/sbin/i2pd" &&
+install -vm 755 libi2pd.so libi2pdclient.so "${INSTALL_ROOT}/usr/lib" &&
+
+install -vm 755 -d "${INSTALL_ROOT}/usr/share/i2pd" &&
+cp -vr contrib/certificates "${INSTALL_ROOT}/usr/share/i2pd" &&
+ln -vsf "${TRACK_ROOT}/usr/share/i2pd/certificates" \
+ "${INSTALL_ROOT}/var/lib/i2pd/certificates" &&
+
+install -vm 755 -d "${INSTALL_ROOT}/etc/i2pd" &&
+install -vm 755 -d -o nobody -g nogroup "${INSTALL_ROOT}/var/lib/i2pd" &&
+
+for cf in i2pd.conf subscriptions.txt tunnels.conf; do
+ install_config_file docs/${cf} "${INSTALL_ROOT}/etc/i2pd/${cf}" &&
+
+ ln -vsf "${TRACK_ROOT}/etc/i2pd/${cf}" "${INSTALL_ROOT}/var/lib/i2pd/${cf}"
+done &&
+
+if [[ $INIT_INSTALLED ]]; then
+ install_config_file "${SPELL_DIRECTORY}/init.d/i2pd.conf" \
+ "${INSTALL_ROOT}/etc/sysconfig/i2pd"
+fi
diff --git a/net/i2pd/PRE_BUILD b/net/i2pd/PRE_BUILD
new file mode 100755
index 0000000..accc62b
--- /dev/null
+++ b/net/i2pd/PRE_BUILD
@@ -0,0 +1,12 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+patch -p0 < "${SPELL_DIRECTORY}/libressl.patch" &&
+
+if spell_ok gcc && is_version_less $(installed_version gcc) 4.7; then
+ patch -p0 < "${SPELL_DIRECTORY}/gcc46.patch" &&
+
+ if is_depends_enabled ${SPELL} miniupnpc; then
+ patch -p0 < "${SPELL_DIRECTORY}/gcc46_upnp.patch"
+ fi
+fi
diff --git a/net/i2pd/gcc46.patch b/net/i2pd/gcc46.patch
new file mode 100644
index 0000000..d7ed689
--- /dev/null
+++ b/net/i2pd/gcc46.patch
@@ -0,0 +1,55 @@
+--- Makefile.linux.orig 2016-10-17 00:37:40.000000000 -0400
++++ Makefile.linux 2016-10-19 19:43:21.061181283 -0400
+@@ -18,7 +18,7 @@
+ else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
+ NEEDED_CXXFLAGS += -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1
+ else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
+- NEEDED_CXXFLAGS += -std=c++0x
++ NEEDED_CXXFLAGS += -std=c++0x -D_GLIBCXX_USE_NANOSLEEP=1
+ else ifeq ($(shell expr match ${CXXVER} "[5-6]\.[0-9]"),3) # gcc >= 5.0
+ NEEDED_CXXFLAGS += -std=c++11
+ else # not supported
+--- Tunnel.cpp.orig 2016-10-17 00:37:40.000000000 -0400
++++ Tunnel.cpp 2016-10-19 19:56:06.096526898 -0400
+@@ -406,7 +406,7 @@
+
+ void Tunnels::AddTransitTunnel (std::shared_ptr<TransitTunnel> tunnel)
+ {
+- if (m_Tunnels.emplace (tunnel->GetTunnelID (), tunnel).second)
++ if (m_Tunnels.insert (make_pair(tunnel->GetTunnelID (),
tunnel)).second)
+ m_TransitTunnels.push_back (tunnel);
+ else
+ LogPrint (eLogError, "Tunnel: tunnel with id ",
tunnel->GetTunnelID (), " already exists");
+@@ -808,7 +808,7 @@
+
+ void Tunnels::AddInboundTunnel (std::shared_ptr<InboundTunnel>
newTunnel)
+ {
+- if (m_Tunnels.emplace (newTunnel->GetTunnelID (),
newTunnel).second)
++ if (m_Tunnels.insert (make_pair(newTunnel->GetTunnelID (),
newTunnel)).second)
+ {
+ m_InboundTunnels.push_back (newTunnel);
+ auto pool = newTunnel->GetTunnelPool ();
+--- TunnelPool.cpp.orig 2016-10-17 00:37:40.000000000 -0400
++++ TunnelPool.cpp 2016-10-19 19:59:27.000000000 -0400
+@@ -9,6 +9,12 @@
+ #include "Log.h"
+ #include "TunnelPool.h"
+
++template<typename T> struct decltype_t {
++ typedef T type;
++};
++
++#define DECLTYPE(expr) decltype_t<decltype(expr)>::type
++
+ namespace i2p
+ {
+ namespace tunnel
+@@ -285,7 +291,7 @@
+ buf += 4;
+ uint64_t timestamp = bufbe64toh (buf);
+
+- decltype(m_Tests)::mapped_type test;
++ DECLTYPE(m_Tests)::mapped_type test;
+ bool found = false;
+ {
+ std::unique_lock<std::mutex> l(m_TestsMutex);
diff --git a/net/i2pd/gcc46_upnp.patch b/net/i2pd/gcc46_upnp.patch
new file mode 100644
index 0000000..5119a09
--- /dev/null
+++ b/net/i2pd/gcc46_upnp.patch
@@ -0,0 +1,26 @@
+--- UPnP.h.orig 2016-10-17 00:37:40.000000000 -0400
++++ UPnP.h 2016-10-19 20:56:18.628270468 -0400
+@@ -53,9 +53,9 @@
+ struct IGDdatas m_upnpData;
+
+ // For miniupnpc
+- char * m_MulticastIf = 0;
+- char * m_Minissdpdpath = 0;
+- struct UPNPDev * m_Devlist = 0;
++ char * m_MulticastIf;
++ char * m_Minissdpdpath;
++ struct UPNPDev * m_Devlist;
+ char m_NetworkAddr[64];
+ char m_externalIPAddress[40];
+ };
+--- UPnP.cpp.orig 2016-10-17 00:37:40.000000000 -0400
++++ UPnP.cpp 2016-10-19 21:02:23.135699101 -0400
+@@ -22,7 +22,7 @@
+ {
+ namespace transport
+ {
+- UPnP::UPnP () : m_IsRunning(false), m_Thread (nullptr), m_Timer
(m_Service)
++ UPnP::UPnP () : m_IsRunning(false), m_Thread (nullptr), m_Timer
(m_Service), m_MulticastIf(0), m_Minissdpdpath(0), m_Devlist(0)
+ {
+ }
+
diff --git a/net/i2pd/init.d/i2pd b/net/i2pd/init.d/i2pd
new file mode 100755
index 0000000..a7e1b10
--- /dev/null
+++ b/net/i2pd/init.d/i2pd
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+. /etc/sysconfig/i2pd
+
+PROGRAM=/usr/sbin/i2pd
+PIDFILE=/var/run/i2pd/i2pd.pid
+ARGS="--daemon --service --pidfile $PIDFILE $I2PD_ARGS"
+RUNLEVEL=3
+NEEDS="+network"
+
+. /etc/init.d/smgl_init
+
+start() {
+ local RUNDIR="/var/run/i2pd"
+
+ if [ ! -d $RUNDIR ] || [ `stat -c '%U:%G' $RUNDIR` != "nobody:nogroup" ];
then
+ mkdir -p $RUNDIR && chown nobody:nogroup $RUNDIR
+ fi
+
+ echo "Starting $NAME..."
+ su nobody -s /bin/sh -c "$PROGRAM $ARGS"
+ evaluate_retval
+}
diff --git a/net/i2pd/init.d/i2pd.conf b/net/i2pd/init.d/i2pd.conf
new file mode 100644
index 0000000..59ce872
--- /dev/null
+++ b/net/i2pd/init.d/i2pd.conf
@@ -0,0 +1,3 @@
+# For arguments and description see `i2pd --help`
+
+I2PD_ARGS="--log=syslog --conf=/etc/i2pd/i2pd.conf
--tunconf=/etc/i2pd/tunnels.conf"
diff --git a/net/i2pd/libressl.patch b/net/i2pd/libressl.patch
new file mode 100644
index 0000000..f01a277
--- /dev/null
+++ b/net/i2pd/libressl.patch
@@ -0,0 +1,11 @@
+--- Crypto.h.orig 2016-10-17 00:37:40.000000000 -0400
++++ Crypto.h 2016-10-19 19:52:24.209961151 -0400
+@@ -282,7 +282,7 @@
+
+ // take care about openssl version
+ #include <openssl/opensslv.h>
+-#if (OPENSSL_VERSION_NUMBER < 0x010100000) // 1.1.0
++#if (OPENSSL_VERSION_NUMBER < 0x010100000) ||
defined(LIBRESSL_VERSION_NUMBER)
+ // define getters and setters introduced in 1.1.0
+ inline int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) { d->p =
p; d->q = q; d->g = g; return 1; }
+ inline int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) {
d->pub_key = pub_key; d->priv_key = priv_key; return 1; }



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (738ce806a0dda1e04f03d2078d6b85d019db19a8), Vlad Glagolev, 10/19/2016

Archive powered by MHonArc 2.6.24.

Top of Page