gnunet: update source and init script
authorDaniel Golle <redacted>
Sat, 24 Jun 2017 13:03:51 +0000 (15:03 +0200)
committerDaniel Golle <redacted>
Sat, 24 Jun 2017 13:05:59 +0000 (15:05 +0200)
Fixes starting EXIT service when offering services.

Signed-off-by: Daniel Golle <redacted>
net/gnunet/Makefile
net/gnunet/files/gnunet.init

index a188af78ba001d077b881dbb9943246724a59ca1..959143023828c7255708268dde0278d81fa3c51e 100644 (file)
@@ -1,10 +1,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=d7547ab18052726a69ee088876389a18798e03a8
-PKG_MIRROR_HASH:=c3e8d545e1e9fa33a92bf392c4d090416b3a0d672c2403d732dc0c043505e4fa
+PKG_SOURCE_VERSION:=e29410cee115f099f093605692ec94614fbbe6d9
+PKG_MIRROR_HASH:=b397c73c6cb8da852d2198469d04a8e0f6e61dcd0adead24634e7c57e2c952af
 
-PKG_VERSION:=0.10.2-git-20170623-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=0.10.2-git-20170624-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -192,6 +192,8 @@ PLUGIN_conversation:=gnsrecord_conversation
 LIBEXEC_conversation:=helper-audio-playback helper-audio-record service-conversation
 CONF_conversation:=conversation
 
+BIN_dht-cli:=dht-get dht-put dht-monitor
+
 DEPENDS_hostlist:=+libmicrohttpd +libgnurl +ca-certificates
 LIBEXEC_hostlist:=daemon-hostlist
 CONF_hostlist:=hostlist
@@ -387,6 +389,7 @@ $(eval $(call PostInstFixSUIDPerms,gnunet-vpn))
 $(eval $(call BuildPackage,gnunet))
 $(eval $(call BuildComponent,conversation,conversation component,))
 $(eval $(call BuildComponent,datastore,data storage components,))
+$(eval $(call BuildComponent,dht-cli,DHT command line clients,))
 # $(eval $(call BuildComponent,dv,distance-vector routing component,y))
 $(eval $(call BuildComponent,experiments,experimental components,))
 $(eval $(call BuildComponent,fs,file-sharing components,))
index 5975313fb01aced83cc3e1759f0151893173092c..2dd35f6c2ccd1dc0ecc412db2102e661fd29b4a6 100755 (executable)
@@ -10,6 +10,7 @@ GNUNET_HOME=/var/run/gnunet
 # LOGFILE=$GNUNET_HOME/gnunet.log
 CONFIGFILE=$GNUNET_HOME/gnunet.conf
 SUID_ROOT_HELPERS="exit nat-server nat-client transport-bluetooth transport-wlan vpn"
+EXTRA_COMMANDS="restart_transport"
 
 chmodown_execbin() {
        execname=/usr/lib/gnunet/libexec/gnunet-$1
@@ -34,6 +35,8 @@ fix_libexec_permissions() {
 }
 
 prepare_config() {
+       local had_exit_service=0;
+
        if [ ! -e "$GNUNET_HOME" ]; then
                mkdir -p $GNUNET_HOME
                chown gnunet:gnunet $GNUNET_HOME
@@ -80,7 +83,10 @@ prepare_config() {
                local __TYPE="$1"
                local __NAME="${2/_/-}"
                [ "${__TYPE}" = "gnunet-config" ] && _gnunet_section="${__NAME}"
-               [ "${__TYPE}" = "gnunet-exit-service" ] && _gnunet_section="${__NAME}.gnunet."
+               [ "${__TYPE}" = "gnunet-exit-service" ] && {
+                       had_exit_service=1
+                       _gnunet_section="${__NAME}.gnunet."
+               }
        }
        option_cb() {
                # $1    name of variable
@@ -89,11 +95,19 @@ prepare_config() {
                local __VAL="$2"
                gnunet-config -c $CONFIGFILE -w -s ${_gnunet_section} -o ${__OPT} -V "${__VAL}"
        }
+
        config_load gnunet
 
+       [ "$had_exit_service" -eq 1 ] && gnunet-config -c $CONFIGFILE -w -s exit -o FORCESTART -V YES
+
        return 0
 }
 
+restart_transport() {
+       gnunet-arm -c $CONFIGFILE -k transport
+       gnunet-arm -c $CONFIGFILE -i transport
+}
+
 start_service() {
        fix_libexec_permissions
        prepare_config
@@ -105,3 +119,9 @@ start_service() {
        procd_set_param respawn
        procd_close_instance
 }
+
+service_triggers()
+{
+       procd_add_reload_trigger "gnunet"
+       procd_add_raw_trigger "interface.*.up" 3000 /etc/init.d/gnunet restart_transport
+}
git clone https://git.99rst.org/PROJECT