gnunet: update to SVN r38014 and improve packaging

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2016-09-26 08:59:09 +02:00
parent 6871e6b379
commit 85b5a6c485
13 changed files with 164 additions and 57 deletions

View File

@ -8,12 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
PKG_SOURCE_VERSION:=37738
PKG_SOURCE_VERSION:=38014
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
# ToDo:
# - break-out {peer,name,data}store for each backend
# - package testing stuff
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@ -86,6 +85,7 @@ define BuildComponent
DEPENDS:=gnunet $(DEPENDS_$(1))
$(if $(3),DEFAULT:=y if PACKAGE_gnunet)
$(if $(USERID_$(1)),USERID:=$(USERID_$(1)))
$(if $(CONFLICTS_$(1)),CONFLICTS:=$(CONFLICTS_$(1)))
endef
define Package/gnunet-$(1)/install
@ -149,7 +149,7 @@ define Package/gnunet/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
done )
( for plug in ats_proportional block_dht block_regex datacache_heap \
( for plug in ats_proportional block_dht block_regex \
transport_tcp transport_udp transport_unix; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
done )
@ -182,10 +182,6 @@ define Package/gnunet/install
$(INSTALL_BIN) ./files/gnunet-proto.sh $(1)/lib/netifd/proto/gnunet.sh
endef
define Package/gnunet/conffiles
/etc/config/gnunet
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
@ -244,11 +240,10 @@ LIBEXEC_namestore-fcfsd:=namestore-fcfsd
DEPENDS_gns-proxy:=+gnunet-gns +libgnurl +libmicrohttpd
LIBEXEC_gns-proxy:=gns-proxy
DEPENDS_datastore:=+gnunet-gns +libsqlite3
DEPENDS_datastore:=+gnunet-gns
BIN_datastore:=datastore
LIB_datastore:=datastore
PLUGIN_datastore:=datastore_heap
LIBEXEC_datastore:=daemon-latency-logger service-datastore
LIBEXEC_datastore:=service-datastore
CONF_datastore:=datastore
BIN_peerstore:=peerstore
@ -256,17 +251,6 @@ LIB_peerstore:=peerstore
LIBEXEC_peerstore:=service-peerstore
CONF_peerstore:=peerstore
DEPENDS_flat:=+gnunet-gns
PLUGIN_flat:=namecache_flat namestore_flat
DEPENDS_mysql:=+gnunet-gns +gnunet-datastore +gnunet-social +libmysqlclient
LIB_mysql:=mysql my
PLUGIN_mysql:=datastore_mysql psycstore_mysql
DEPENDS_pgsql:=+gnunet-gns +gnunet-datastore +libpq
LIB_pgsql:=postgres pq
PLUGIN_pgsql:=datacache_postgres datastore_postgres namecache_postgres namestore_postgres
DEPENDS_rest:=+gnunet-gns +gnunet-social +libmicrohttpd +jansson
LIB_rest:=rest json jsonapi jsonapiutils
PLUGIN_rest:=rest_gns rest_identity rest_identity_provider rest_namestore
@ -278,15 +262,60 @@ LIB_rps:=rps
LIBEXEC_rps:=service-rps
CONF_rps:=rps
DEPENDS_social:=+gnunet-sqlite +libmicrohttpd +jansson
DEPENDS_social:=+gnunet-gns +libmicrohttpd +jansson
BIN_social:=identity-token multicast social
LIB_social:=consensus identityprovider multicast psyc psycstore psycutil secretsharing social
PLUGIN_social:=psycstore_sqlite
LIBEXEC_social:=service-consensus service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-secretsharing service-social
CONF_social:=consensus multicast psyc psycstore secretsharing social
DEPENDS_sqlite:=+gnunet-gns +gnunet-datastore +gnunet-peerstore +libsqlite3
PLUGIN_sqlite:=datacache_sqlite datastore_sqlite namecache_sqlite namestore_sqlite peerstore_sqlite
DEPENDS_gns-flat:=+gnunet-gns
PLUGIN_gns-flat:=namecache_flat namestore_flat
DEPENDS_peerstore-flat:=+gnunet-peerstore
PLUGIN_peerstore-flat:=peerstore_flat
DEPENDS_fs-heap:=+gnunet-datastore
PLUGIN_fs-heap:=datacache_heap datastore_heap
CONFLICTS_fs-heap:=gnunet-fs-mysql gnunet-fs-pgsql gnunet-fs-sqlite
DEPENDS_mysql:=+libmysqlclient
LIB_mysql:=mysql my
DEPENDS_social-mysql:=+gnunet-mysql +gnunet-social
PLUGIN_social-mysql:=psycstore_mysql
CONFLICTS_social-mysql:=gnunet-social-sqlite
DEPENDS_fs-mysql:=+gnunet-mysql +gnunet-datastore
PLUGIN_fs-mysql:=datastore_mysql
CONFLICTS_fs-mysql:=gnunet-fs-pgsql gnunet-fs-sqlite
DEPENDS_pgsql:=+libpq
LIB_pgsql:=postgres pq
DEPENDS_fs-pgsql:=+gnunet-pgsql +gnunet-datastore
PLUGIN_fs-pgsql:=datacache_postgres datastore_postgres
CONFLICTS_fs-pgsql:=gnunet-fs-sqlite
DEPENDS_gns-pgsql:=+gnunet-pgsql +gnunet-gns
PLUGIN_gns-pgsql:=namecache_postgres namestore_postgres
CONFLICTS_gns-pgsql:=gnunet-gns-sqlite gnunet-gns-flat
DEPENDS_sqlite:=+libsqlite3
DEPENDS_gns-sqlite:=+gnunet-sqlite +gnunet-gns
PLUGIN_gns-sqlite:=namecache_sqlite namestore_sqlite
CONFLICTS_gns-sqlite:=gnunet-gns-flat
DEPENDS_peerstore-sqlite:=+gnunet-sqlite +gnunet-peerstore
PLUGIN_peerstore-sqlite:=peerstore_sqlite
CONFLICTS_peerstore-sqlite:=gnunet-peerstore-flat
DEPENDS_fs-sqlite:=+gnunet-sqlite +gnunet-datastore
PLUGIN_fs-sqlite:=datacache_sqlite datastore_sqlite
LIBEXEC_fs-sqlite:=daemon-latency-logger
DEPENDS_social-sqlite:=+gnunet-sqlite +gnunet-social
PLUGIN_social-sqlite:=psycstore_sqlite
DEPENDS_transport-bluetooth:=+bluez-libs
PLUGIN_transport-bluetooth:=transport_bluetooth
@ -351,19 +380,29 @@ $(eval $(call BuildComponent,conversation,conversation component,))
$(eval $(call BuildComponent,datastore,data storage components,))
$(eval $(call BuildComponent,dv,distance-vector routing component,))
$(eval $(call BuildComponent,experiments,experimental components,))
$(eval $(call BuildComponent,flat,flat storage backends,))
$(eval $(call BuildComponent,fs,file-sharing components,))
$(eval $(call BuildComponent,gns,name resolution components,y))
$(eval $(call BuildComponent,gns-proxy,gns-proxy component,))
$(eval $(call BuildComponent,hostlist,HTTP bootstrap hostlist client and server,))
$(eval $(call BuildComponent,mysql,mySQL datastore backend,))
$(eval $(call BuildComponent,namestore-fcfsd,first-come-first-serve registration server,))
$(eval $(call BuildComponent,pgsql,PostgreSQL storage backends,))
$(eval $(call BuildComponent,peerstore,peerstore local persistency component,))
$(eval $(call BuildComponent,rest,REST interface,))
$(eval $(call BuildComponent,rps,RPS routing component,))
$(eval $(call BuildComponent,social,social components,))
$(eval $(call BuildComponent,sqlite,libsqlite3 storage backends,y))
$(eval $(call BuildComponent,namestore-fcfsd,first-come-first-serve registration server,))
$(eval $(call BuildComponent,fs-heap,heap-based filesharing plugins,))
$(eval $(call BuildComponent,gns-flat,flat storage GNS plugins,))
$(eval $(call BuildComponent,peerstore-flat,flat storage peerstore plugin,))
$(eval $(call BuildComponent,mysql,mySQL datastore backend,))
$(eval $(call BuildComponent,fs-mysql,mySQL filesharing plugins,))
$(eval $(call BuildComponent,social-mysql,mySQL social plugins,))
$(eval $(call BuildComponent,pgsql,PostgreSQL storage backends,))
$(eval $(call BuildComponent,fs-pgsql,PostgreSQL filesharing plugins,))
$(eval $(call BuildComponent,gns-pgsql,PostgreSQL GNS plugins,))
$(eval $(call BuildComponent,sqlite,libsqlite3 storage backends,))
$(eval $(call BuildComponent,fs-sqlite,libsqlite3 filesharing plugins,))
$(eval $(call BuildComponent,gns-sqlite,libsqlite3 gns plugins,))
$(eval $(call BuildComponent,peerstore-sqlite,libsqlite3 peerstore plugin,))
$(eval $(call BuildComponent,social-sqlite,libsqlite3 social plugins,))
$(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
$(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
$(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,))

View File

@ -0,0 +1,10 @@
#!/bin/sh
uci -q get gnunet.datastore || uci set gnunet.datastore=gnunet-config
uci -q get gnunet.datacache || uci set gnunet.datacache=gnunet-config
uci -q batch <<EOF
set gnunet.datastore.DATABASE=heap
set gnunet.datacache.DATABASE=heap
commit gnunet
EOF

View File

@ -0,0 +1,10 @@
#!/bin/sh
uci -q get gnunet.datastore || uci set gnunet.datastore=gnunet-config
uci -q get gnunet.datacache || uci set gnunet.datacache=gnunet-config
uci -q batch <<EOF
set gnunet.datastore.DATABASE=postgres
set gnunet.datacache.DATABASE=postgres
commit gnunet
EOF

View File

@ -0,0 +1,16 @@
#!/bin/sh
uci -q get gnunet.datastore || uci set gnunet.datastore=gnunet-config
uci -q get gnunet.datacache || uci set gnunet.datacache=gnunet-config
uci -q batch <<EOF
del gnunet.datastore_sqlite
set gnunet.datastore_sqlite=gnunet-config
set gnunet.datastore_sqlite.FILENAME=/etc/gnunet/datastore.sqlite
set gnunet.datastore.DATABASE=sqlite
del gnunet.datacache_sqlite
set gnunet.datacache_sqlite=gnunet-config
set gnunet.datacache_sqlite.FILENAME=/var/run/gnunet/datacache.sqlite
set gnunet.datacache.DATABASE=sqlite
commit gnunet
EOF

View File

@ -8,6 +8,9 @@ uci -q batch <<EOF
set gnunet.namestore_flat=gnunet-config
set gnunet.namestore_flat.FILENAME=/etc/gnunet/namestore.flat
set gnunet.namestore.DATABASE=flat
del gnunet.namecache_flat
set gnunet.namecache_flat=gnunet-config
set gnunet.namecache_flat.FILENAME=/var/run/gnunet/namecache.flat
set gnunet.namecache.DATABASE=flat
commit gnunet
EOF

View File

@ -0,0 +1,10 @@
#!/bin/sh
uci -q get gnunet.namestore || uci set gnunet.namestore=gnunet-config
uci -q get gnunet.namecache || uci set gnunet.namecache=gnunet-config
uci -q batch <<EOF
set gnunet.namestore.DATABASE=postgres
set gnunet.namecache.DATABASE=postgres
commit gnunet
EOF

View File

@ -8,9 +8,9 @@ uci -q batch <<EOF
set gnunet.namestore_sqlite=gnunet-config
set gnunet.namestore_sqlite.FILENAME=/etc/gnunet/namestore.sqlite
set gnunet.namestore.DATABASE=sqlite
del gnunet.namecache_sqlite
set gnunet.namecache_sqlite=gnunet-config
set gnunet.namecache_sqlite.FILENAME=/var/run/gnunet/namecache.sqlite
set gnunet.namecache.DATABASE=sqlite
del gnunet.peerstore_sqlite
set gnunet.peerstore_sqlite=gnunet-config
set gnunet.peerstore_sqlite.FILENAME=/etc/gnunet/peerstore.sqlite
commit gnunet
EOF

View File

@ -0,0 +1,11 @@
#!/bin/sh
uci -q get gnunet.peerstore || uci set gnunet.peerstore=gnunet-config
uci -q batch <<EOF
del gnunet.peerstore_flat
set gnunet.peerstore_flat=gnunet-config
set gnunet.peerstore_flat.FILENAME=/etc/gnunet/peerstore.flat
set gnunet.peerstore.DATABASE=flat
commit gnunet
EOF

View File

@ -0,0 +1,11 @@
#!/bin/sh
uci -q get gnunet.peerstore || uci set gnunet.peerstore=gnunet-config
uci -q batch <<EOF
del gnunet.peerstore_sqlite
set gnunet.peerstore_sqlite=gnunet-config
set gnunet.peerstore_sqlite.FILENAME=/etc/gnunet/peerstore.sqlite
set gnunet.peerstore.DATABASE=sqlite
commit gnunet
EOF

View File

@ -0,0 +1,9 @@
#!/bin/sh
uci -q batch <<EOF
del postgresql.gnunet
set postgresql.gnunet=postgres-db
set postgresql.gnunet.name=gnunet
set postgresql.gnunet.user=gnunet
commit postgresql
EOF

View File

@ -0,0 +1,11 @@
#!/bin/sh
uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
uci -q batch <<EOF
del gnunet.psycstore_sqlite
set gnunet.psycstore_sqlite=gnunet-config
set gnunet.psycstore_sqlite.FILENAME=/etc/gnunet/psycstore.sqlite
set gnunet.psycstore.DATABASE=sqlite
commit gnunet
EOF

View File

@ -5,28 +5,6 @@
touch /etc/config/gnunet
uci batch <<EOF
set gnunet.datastore=gnunet-config
set gnunet.datastore.DATABASE=heap
set gnunet.datastore.QUOTA="4 MB"
set gnunet.fs=gnunet-config
set gnunet.fs.CONTENT_PUSHING=NO
set gnunet.fs.CONTENT_CACHING=NO
set gnunet.dhtcache=gnunet-config
set gnunet.dhtcache.QUOTA="4 MB"
set gnunet.dns2gns=gnunet-config
set gnunet.dns2gns.AUTOSTART=YES
set gnunet.dns2gns.FORCESTART=YES
set gnunet.pt=gnunet-config
set gnunet.pt.FORCESTART=YES
set gnunet.exit=gnunet-config
set gnunet.exit.AUTOSTART=YES
set gnunet.exit.FORCESTART=YES
set gnunet.nse=gnunet-config
set gnunet.nse.WORKDELAY='500 ms'

View File

@ -1,8 +1,7 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2015 OpenWrt.org
START=50
STOP=10
START=90
USE_PROCD=1
PROG=/usr/lib/gnunet/libexec/gnunet-service-arm