aboutsummaryrefslogtreecommitdiff
path: root/net/gnunet
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2017-06-24 15:03:51 +0200
committerDaniel Golle <daniel@makrotopia.org>2017-06-24 15:05:59 +0200
commit358de85d400ed54bd20a0eaec28ac7e076d8ffcb (patch)
tree608e6300917483e5a7f32f503fc8ed70abf1569d /net/gnunet
parent66afa3c3ea011643462f042b226a5a02a7bec56e (diff)
gnunet: update source and init script
Fixes starting EXIT service when offering services. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'net/gnunet')
-rw-r--r--net/gnunet/Makefile9
-rwxr-xr-xnet/gnunet/files/gnunet.init22
2 files changed, 27 insertions, 4 deletions
diff --git a/net/gnunet/Makefile b/net/gnunet/Makefile
index a188af78b..959143023 100644
--- a/net/gnunet/Makefile
+++ b/net/gnunet/Makefile
@@ -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,))
diff --git a/net/gnunet/files/gnunet.init b/net/gnunet/files/gnunet.init
index 5975313fb..2dd35f6c2 100755
--- a/net/gnunet/files/gnunet.init
+++ b/net/gnunet/files/gnunet.init
@@ -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
+}