Browse Source

gnunet: bump source, improve packaging

 * fix two typos in Makefile
 * package transports seperately
 * enable all installed transports by default
 * use logfile so we don't stdio-choke gnunet-service-arm
   -> should use syslog instead...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle 9 years ago
parent
commit
7b6e938790
2 changed files with 33 additions and 15 deletions
  1. 18
    11
      net/gnunet/Makefile
  2. 15
    4
      net/gnunet/files/gnunet.init

+ 18
- 11
net/gnunet/Makefile View File

@@ -8,14 +8,11 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=gnunet
11
-PKG_SOURCE_VERSION:=36019
11
+PKG_SOURCE_VERSION:=36048
12 12
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
13 13
 PKG_RELEASE:=1
14 14
 
15 15
 # ToDo:
16
-#  - break-out transports
17
-#    -> get rid of microhttpd and gnurl dependency for gns and vpn
18
-#       requires upstream to split config files
19 16
 #  - break-out {peer,name,data}store for each backend
20 17
 #  - package testing stuff
21 18
 
@@ -74,8 +71,8 @@ define Package/gnunet/description
74 71
  well as many missing features in this release.
75 72
 
76 73
  This package provides the core components of GNUnet including the
77
- CADET routing engine, a DHT implementation and most transports as well
78
- as their helpers.
74
+ CADET routing engine, a DHT implementation and basic transports as
75
+ well as their helpers.
79 76
 endef
80 77
 
81 78
 define BuildComponent
@@ -144,9 +141,7 @@ define Package/gnunet/install
144 141
 	done )
145 142
 
146 143
 	( for plug in ats_proportional block_dht block_regex datacache_heap  \
147
-	    transport_http_client transport_http_server \
148
-	    transport_https_client transport_https_server \
149
-	    transport_tcp transport_udp transport_unix transport_wlan; do \
144
+	    transport_tcp transport_udp transport_unix; do \
150 145
 		$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
151 146
 	done )
152 147
 
@@ -185,6 +180,15 @@ PLUGIN_conversation:=gnsrecord_conversation
185 180
 LIBEXEC_conversation:=helper-audio-playback helper-audio-record
186 181
 CONF_conversation:=conversation
187 182
 
183
+DEPENDS_transport-http_client:=+libgnurl
184
+PLUGIN_transport-http_client:=transport_http_client transport_https_client
185
+
186
+DEPENDS_transport-http_server:=+libmicrohttpd
187
+PLUGIN_transport-http_server:=transport_http_server transport_https_server
188
+
189
+PLUGIN_transport-wifi:=transport_wlan
190
+LIBEXEC_transport-wifi:=helper-transport-wlan
191
+
188 192
 DEPENDS_experiments:=+libglpk
189 193
 PLUGIN_experiments:=ats_mlp ats_ril
190 194
 
@@ -192,7 +196,7 @@ DEPENDS_fs:=+gnunet-datastore +libextractor
192 196
 BIN_fs:=auto-share directory download download-manager.scm fs publish unindex search
193 197
 LIB_fs:=fs
194 198
 PLUGIN_fs:=block_fs
195
-LIB_EXEC_fs:=helper-fs-publish service-fs
199
+LIBEXEC_fs:=helper-fs-publish service-fs
196 200
 CONF_fs:=fs
197 201
 
198 202
 DEPENDS_gns:=+gnunet-vpn
@@ -226,7 +230,7 @@ PLUGIN_transport-bluetooth:=transport_bluetooth
226 230
 LIBEXEC_transport-bluetooth:=helper-transport-bluetooth
227 231
 
228 232
 DEPENDS_utils:=+certtool +openssl-util
229
-BIN_utils:=config gns-import.sh gns-proxy-setup-ca transport-certificate-creation
233
+BIN_utils:=config gns-proxy-setup-ca transport-certificate-creation
230 234
 
231 235
 DEPENDS_vpn:=+kmod-tun
232 236
 LIB_vpn:=tun vpn
@@ -240,6 +244,9 @@ $(eval $(call BuildComponent,fs,file-sharing components,))
240 244
 $(eval $(call BuildComponent,gns,name resolution components,y))
241 245
 $(eval $(call BuildComponent,datastore,storage components,))
242 246
 $(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
247
+$(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
248
+$(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,))
249
+$(eval $(call BuildComponent,transport-wlan,WLAN transport,))
243 250
 $(eval $(call BuildComponent,utils,administration utililties,))
244 251
 $(eval $(call BuildComponent,vpn,vpn components,y))
245 252
 $(eval $(call BuildComponent,mysql,mySQL datastore backend,))

+ 15
- 4
net/gnunet/files/gnunet.init View File

@@ -8,6 +8,7 @@ USE_PROCD=1
8 8
 PROG=/usr/lib/gnunet/libexec/gnunet-service-arm
9 9
 
10 10
 GNUNET_HOME=/var/run/gnunet
11
+LOGFILE=$GNUNET_HOME/gnunet.log
11 12
 CONFIGFILE=$GNUNET_HOME/gnunet.conf
12 13
 SUID_ROOT_HELPERS="exit nat-server nat-client transport-bluetooth transport-wlan vpn"
13 14
 
@@ -37,10 +38,20 @@ prepare_config() {
37 38
 	touch $CONFIGFILE
38 39
 	chown root:gnunet $CONFIGFILE
39 40
 	chmod 0640 $CONFIGFILE
40
-	gnunet-config -c /tmp/run/gnunet/gnunet.conf -s PATHS -o GNUNET_HOME -V $GNUNET_HOME
41
+	gnunet-config -c $CONFIGFILE -s PATHS -o GNUNET_HOME -V $GNUNET_HOME
42
+	# enable gns2dns service
41 43
 	defaultservices=$( gnunet-config -c /tmp/run/gnunet/gnunet.conf -s arm -o DEFAULTSERVICES )
42
-	defaultservices="$defaultservices gns2dns"
43
-	gnunet-config -c /tmp/run/gnunet/gnunet.conf -s arm -o DEFAULTSERVICES -V "$defaultservices"
44
+	defaultservices="$defaultservices dns2gns"
45
+	# enable all installed transport plugins
46
+	gnunet-config -c $CONFIGFILE -s arm -o DEFAULTSERVICES -V "$defaultservices"
47
+	transport_plugins=$(gnunet-config -c $CONFIGFILE -s transport -o PLUGINS)
48
+	for transplug in /usr/lib/gnunet/libgnunet_plugin_transport_*.so; do
49
+		transplug=$( echo $transplug |
50
+			sed -ne 's!^.*_transport_\(.*\)\.so$!\1!p' )
51
+		[ -n "$( echo $transport_plugins | grep $transplug )" ] ||
52
+			transport_plugins="$transport_plugins $transplug"
53
+	done
54
+	gnunet-config -c $CONFIGFILE -s transport -o PLUGINS -V "$transport_plugins"
44 55
 }
45 56
 
46 57
 start_service() {
@@ -49,7 +60,7 @@ start_service() {
49 60
 
50 61
 	procd_open_instance
51 62
 	procd_set_param user gnunet
52
-	procd_set_param command $PROG -c $CONFIGFILE
63
+	procd_set_param command $PROG -c $CONFIGFILE -l $LOGFILE
53 64
 	procd_set_param respawn
54 65
 	procd_close_instance
55 66
 }