i2pd: Update to 2.35.0
authorDavid Yang <mmyangfl@gmail.com>
Sat, 5 Dec 2020 08:57:53 +0000 (16:57 +0800)
committerDavid Yang <mmyangfl@gmail.com>
Sat, 5 Dec 2020 09:17:45 +0000 (17:17 +0800)
Signed-off-by: David Yang <mmyangfl@gmail.com>
net/i2pd/Makefile
net/i2pd/files/i2pd.config
net/i2pd/files/i2pd.init
net/i2pd/patches/010-config.patch

index 6d8c5addf26f96d9fd50f9ace9819618c89af877..2bcc74042d2e8c8b8ad6506f6e8f083600734661 100644 (file)
@@ -9,18 +9,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=i2pd
-PKG_VERSION:=2.32.1
-PKG_RELEASE:=2
-PKG_BUILD_PARALLEL:=1
+PKG_VERSION:=2.35.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=64229101411a9dda3237dc27939aa13ec90d4900aae499e59931063c36e8556b
+PKG_HASH:=d041fd4e7a88ac168e76f66fdab40174ad093cdc13451cdbd0dd1216e5581f8a
 
 PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/i2pd
@@ -46,6 +48,12 @@ define Package/i2pd/conffiles
 /etc/i2pd/tunnels.d/
 endef
 
+define Build/Prepare
+       $(Build/Prepare/Default)
+       # race condition
+       cd $(PKG_BUILD_DIR); $(MAKE) mk_obj_dir
+endef
+
 TARGET_LDFLAGS+=-latomic
 MAKE_FLAGS+=USE_AESNI=no USE_AVX=no
 
index 426ff9d11b2a2d19b775b8ccfa730a258050501e..c75bad2111ae87657e1e3cb03a970b681a73df9d 100644 (file)
@@ -1,8 +1,10 @@
 config i2pd
+       # Make sure your directories have the right owner! (i2pd:i2pd)
+
        # Set where i2pd should store its data (netDB, certificates, addresses,
        # etc). By default we store it in RAM so no data is written to ROM.
        # If you store data permanently, you may want to enable
-       # 'profiles = true' and 'addressbook = true' in i2pd.conf
+       # 'profiles = true' and 'addressbook = true' in i2pd.conf.
        #### IMPORTANT! ####
        # Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash
        # will die.
index 4c4790fc3ef6bc93b8aa11fc5c17801d6db12e3d..30dddae109e0b9a59f5406183b1b134356a462a3 100755 (executable)
@@ -17,7 +17,6 @@ CONFFILE=/etc/i2pd/i2pd.conf
 . /lib/functions.sh
 
 
-
 i2pd_start() {
        local cfg="$1"
        local data_dir
@@ -27,16 +26,19 @@ i2pd_start() {
        config_get addressbook_dir "$cfg" addressbook_dir
 
        ## Setting up data dir
-       [ -d "$data_dir" ] || {
+       if [ ! -d "$data_dir" ] ; then
                mkdir -p "$data_dir"
                chown "$USER:$GROUP" "$data_dir"
                ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
-               [ -n "$addressbook_dir" ] && {
-                       [ -d "$addressbook_dir" ] || mkdir -p "$addressbook_dir"
-                       chown "$USER:$GROUP" "$addressbook_dir"
+               if [ -n "$addressbook_dir" ] ; then
+                       if [ ! -d "$addressbook_dir" ] ; then
+                               mkdir -p "$addressbook_dir"
+                               chown "$USER:$GROUP" "$addressbook_dir"
+                       fi
                        ln -s "$addressbook_dir" "$data_dir/addressbook"
-               }
-       }
+               fi
+       fi
+       [ -d "$DATADIR" ] || ln -s "$data_dir" "$DATADIR"
 
        ## We need permissions
        touch "$PIDFILE"
@@ -44,7 +46,6 @@ i2pd_start() {
 
        procd_open_instance
        procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
-       ## Don't know about i2pd user's HOME
        procd_set_param env "HOME=$DATADIR"
        ## For debugging, provide about 512 MB on external storage for coredump and adjust /proc/sys/kernel/core_pattern
        # echo "/tmp/coredumps/core.%e.%p.%s.%t" > /proc/sys/kernel/core_pattern
@@ -65,13 +66,13 @@ start_service() {
        config_cb() {
                local type="$1"
                local name="$2"
-               [ "$type" = "i2pd" ] && [ -n "$instance" ] && [ "$instance" = "$name" ] && instance_found=1
+               [ "$type" = "i2pd" -a -n "$instance" -a "$instance" = "$name" ] && instance_found=1
        }
 
        config_load i2pd
 
        if [ -n "$instance" ]; then
-               [ "$instance_found" -gt 0 ] || return
+               [ "$instance_found" = 0 ] && return
                i2pd_start "$instance"
        else
                config_foreach i2pd_start i2pd
index c3bfbcb28f716f60d70c49e7f24fe6a5730fef91..be0584a4cb3cae2bfd7198a1da42876223461cc0 100644 (file)
@@ -1,3 +1,5 @@
+diff --git a/contrib/i2pd.conf b/contrib/i2pd.conf
+index 5ef39bc9..8d5034eb 100644
 --- a/contrib/i2pd.conf
 +++ b/contrib/i2pd.conf
 @@ -8,12 +8,12 @@
@@ -11,7 +13,7 @@
  ## Use that path to store separated tunnels in different config files.
  ## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d
 -# tunnelsdir = /var/lib/i2pd/tunnels.d
-+tunnelsdir = /etc/i2pd/tunnels.conf
++tunnelsdir = /etc/i2pd/tunnels.d
  
  ## Where to write pidfile (default: i2pd.pid, not used in Windows)
  # pidfile = /run/i2pd.pid
  port = 4447
  ## Optional keys file for proxy local destination
  # keys = socks-proxy-keys.dat
-@@ -228,4 +230,5 @@ verify = true
+@@ -228,7 +230,8 @@ verify = true
  
  [persist]
  ## Save peer profiles on disk (default: true)
 -# profiles = true
 +profiles = false
 +addressbook = false
+ [cpuext]
+ ## Use CPU AES-NI instructions set when work with cryptography when available (default: true)