From add708f030f15791a5d702f966c26cf34e7a0a54 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Thu, 22 Apr 2021 00:00:08 +0100 Subject: [PATCH] gnunet: update to version 0.16.2 Sync GNUnet package with master branch. This is a new major release. It breaks protocol compatibility with the 0.15.x versions. Please be aware that Git master is thus henceforth (and has been for a while) INCOMPATIBLE with the 0.15.x GNUnet network, and interactions between old and new peers will result in issues. 0.15.x peers will be able to communicate with Git master or 0.16.x peers, but some services - in particular GNS - will not be compatible. Signed-off-by: Daniel Golle (cherry picked from commits deafd6cf3f gnunet: update to v0.14.1 746bb95552 gnunet: update to version 0.15.3 23b5b516ae gnunet: fix compilation with big endian c3c6a2ff1d gnunet: several improvements 23f722f905 gnunet: packaging fixes 2f8e696189 gnunet: update to 0.16.1 f951f61005 gnunet: improve init script 033744ac59 gnunet: update to 0.16.2 65f5f850f3 gnunet: work-around sysupgrade restore missing file ownerships ) --- net/gnunet/Makefile | 56 +++++++++++------- .../files/gnunet-dhtcache-pgsql.defaults | 2 + net/gnunet/files/gnunet-fs-pgsql.defaults | 2 + net/gnunet/files/gnunet-gns-flat.defaults | 6 +- net/gnunet/files/gnunet-gns-pgsql.defaults | 4 ++ net/gnunet/files/gnunet.init | 57 +++++++++---------- net/gnunet/patches/010-endian.patch | 18 ++++++ ...fix-opus-and-pulse-library-detection.patch | 36 ------------ .../100-remove-mysql-version-check.patch | 38 +++++++++++++ 9 files changed, 130 insertions(+), 89 deletions(-) create mode 100644 net/gnunet/patches/010-endian.patch delete mode 100644 net/gnunet/patches/100-fix-opus-and-pulse-library-detection.patch create mode 100644 net/gnunet/patches/100-remove-mysql-version-check.patch diff --git a/net/gnunet/Makefile b/net/gnunet/Makefile index 72647b8f3d..4b64c7d62f 100644 --- a/net/gnunet/Makefile +++ b/net/gnunet/Makefile @@ -2,11 +2,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnunet -PKG_VERSION:=0.13.3 -PKG_RELEASE:=4 +PKG_VERSION:=0.16.2 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/gnunet -PKG_HASH:=318e06c4134d1a8ce3b4385d82b11316eaaeb9a4dbc5d4b646453dfc53199296 +PKG_HASH:=b5858833836509b71d5c0d9bdc11fd1beeeaba5a75be4bbd93581a4d13e0f49a PKG_LICENSE:=AGPL-3.0 PKG_LICENSE_FILES:=COPYING @@ -17,27 +17,32 @@ PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=gettext-version PKG_INSTALL:=1 +# despite configure fails if sqlite3 isn't detected +PKG_BUILD_DEPENDS:=sqlite3 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +# always pass --with-sqlite3 as configure fails when trying --without-sqlite3 CONFIGURE_ARGS+= \ --with-libiconv-prefix="$(ICONV_PREFIX)" \ --with-libintl-prefix="$(INTL_PREFIX)" \ --with-ltdl \ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \ - $(if $(CONFIG_PACKAGE_libsqlite3),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \ - --enable-testing \ + --with-sqlite3="$(STAGING_DIR)/usr" \ --disable-testruns \ --disable-documentation \ --enable-experimental \ --with-extractor=$(STAGING_DIR)/usr \ --with-gnutls=$(STAGING_DIR)/usr \ - $(if $(CONFIG_PACKAGE_$(PKG_NAME)-transport-bluetooth),--with-libbluetooth="$(STAGING_DIR)/usr",--without-libbluetooth) \ + $(if $(CONFIG_PACKAGE_$(PKG_NAME)-transport-bluetooth),--with-bluetooth="$(STAGING_DIR)/usr",--without-bluetooth) \ --with-libgnurl=$(STAGING_DIR)/usr \ - --with-libogg=$(STAGING_DIR)/usr \ - --with-libopus=$(STAGING_DIR)/usr \ - --with-libpulse=$(STAGING_DIR)/usr \ + --with-ogg=$(STAGING_DIR)/usr \ + --with-opus=$(STAGING_DIR)/usr \ + --with-pabc=$(STAGING_DIR)/usr \ + --with-png=$(STAGING_DIR)/usr \ + --with-pulse=$(STAGING_DIR)/usr \ --with-libunistring-prefix=$(STAGING_DIR)/usr \ --with-microhttpd=$(STAGING_DIR)/usr @@ -151,24 +156,24 @@ 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 block_revocation transport_unix; do \ + ( for plug in ats_proportional block_dht block_regex block_revocation dhtu_gnunet dhtu_ip transport_unix; do \ $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \ done ) - ( for lex in daemon-topology helper-nat-client \ + ( for lex in communicator-unix daemon-topology helper-nat-client \ helper-nat-server service-arm service-ats service-ats-new service-cadet \ service-core service-dht service-identity service-nat service-nat-auto \ service-nse service-peerinfo service-peerstore service-regex \ service-revocation service-scalarproduct-alice \ service-scalarproduct-bob service-scalarproduct-ecc-alice \ service-scalarproduct-ecc-bob service-set service-seti service-setu service-statistics \ - service-transport timeout; do \ + service-tng service-transport timeout; do \ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \ done ) - ( for conf in arm ats cadet communicator-unix core datacache dht identity \ + ( for conf in arm ats cadet communicator-unix core datacache dht dhtu identity \ nat nat-auto nse peerinfo peerstore regex revocation \ - scalarproduct set seti setu statistics topology transport util; do \ + scalarproduct set seti setu statistics tlds topology transport util; do \ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \ done ) @@ -219,6 +224,9 @@ DEPENDS_hostlist:=+libmicrohttpd-ssl +gnunet-curl +ca-certificates LIBEXEC_hostlist:=daemon-hostlist CONF_hostlist:=hostlist +LIBEXEC_communicator-udp:=communicator-udp +LIBEXEC_communicator-tcp:=communicator-tcp + DEPENDS_transport-bluetooth:=+bluez-libs PLUGIN_transport-bluetooth:=transport_bluetooth LIBEXEC_transport-bluetooth:=helper-transport-bluetooth @@ -256,11 +264,11 @@ USERID_gns:=:gnunetdns=452 BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport LIB_gns:=gns gnsrecord namecache namestore PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns -LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster +LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster service-zonemaster-monitor CONF_gns:=dns gns namecache namestore resolver zonemaster FILE_MODES_gns:=/usr/lib/gnunet/libexec/gnunet-helper-dns:root:gnunetdns:4750 /usr/lib/gnunet/libexec/gnunet-service-dns:gnunet:gnunetdns:2750 -DEPENDS_namestore-fcfsd:=+gnunet-gns +libmicrohttpd-ssl +DEPENDS_namestore-fcfsd:=+gnunet-rest +libmicrohttpd-ssl LIBEXEC_namestore-fcfsd:=namestore-fcfsd DEPENDS_gns-proxy:=+gnunet-gns +gnunet-curl +libmicrohttpd-ssl +PACKAGE_libgnutls-dane:libgnutls-dane @@ -272,16 +280,21 @@ LIB_datastore:=datastore LIBEXEC_datastore:=service-datastore CONF_datastore:=datastore +BIN_messenger:=messenger +LIB_messenger:=messenger +LIBEXEC_messenger:=service-messenger +CONF_messenger:=messenger +PLUGIN_messenger:=gnsrecord_messenger DEPENDS_reclaim:=+gnunet-gns +gnunet-sqlite +libpbc +libgabe +jansson -BIN_reclaim:=reclaim +BIN_reclaim:=did reclaim LIB_reclaim:=consensus abe reclaim reclaimattribute secretsharing LIBEXEC_reclaim:=service-consensus service-reclaim service-secretsharing CONF_reclaim:=consensus reclaim secretsharing PLUGIN_reclaim:=block_consensus gnsrecord_reclaim reclaim_credential_jwt reclaim_attribute_basic DEPENDS_rest:=+gnunet-gns +gnunet-reclaim +libmicrohttpd-ssl +jansson -LIB_rest:=rest json +LIB_rest:=rest json gnsrecordjson PLUGIN_rest:=rest_config rest_copying rest_gns rest_identity rest_namestore rest_peerinfo rest_openid_connect rest_reclaim LIBEXEC_rest:=rest-server CONF_rest:=rest @@ -311,8 +324,9 @@ DEPENDS_fs-mysql:=+gnunet-mysql +gnunet-datastore PLUGIN_fs-mysql:=datastore_mysql CONFLICTS_fs-mysql:=gnunet-fs-pgsql gnunet-fs-sqlite -DEPENDS_pgsql:=+libpq +DEPENDS_pgsql:=+libpq +pgsql-server LIB_pgsql:=pq +# USERID_pgsql:=gnunet=958::postgres=5432 DEPENDS_dhtcache-pgsql:=+gnunet-pgsql PLUGIN_dhtcache-pgsql:=datacache_postgres @@ -326,7 +340,6 @@ 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 LIB_sqlite:=sq @@ -410,6 +423,7 @@ $(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,y)) +$(eval $(call BuildComponent,messenger,group chat messenger,)) $(eval $(call BuildComponent,reclaim,reclaim identity-provider subsystem,)) $(eval $(call BuildComponent,rest,REST interface,)) $(eval $(call BuildComponent,rps,RPS routing component,y)) @@ -429,6 +443,8 @@ $(eval $(call BuildComponent,dhtcache-sqlite,libsqlite3 dhtcache plugin,)) $(eval $(call BuildComponent,fs-sqlite,libsqlite3 filesharing plugin,)) $(eval $(call BuildComponent,gns-sqlite,libsqlite3 gns plugins,)) $(eval $(call BuildComponent,peerstore-sqlite,libsqlite3 peerstore plugin,)) +$(eval $(call BuildComponent,communicator-tcp,tng transport TCP communicator,y)) +$(eval $(call BuildComponent,communicator-udp,tng transport UDP communicator,y)) $(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,)) diff --git a/net/gnunet/files/gnunet-dhtcache-pgsql.defaults b/net/gnunet/files/gnunet-dhtcache-pgsql.defaults index 7ea8061ce4..eedbe24a34 100644 --- a/net/gnunet/files/gnunet-dhtcache-pgsql.defaults +++ b/net/gnunet/files/gnunet-dhtcache-pgsql.defaults @@ -4,5 +4,7 @@ uci -q get gnunet.dhtcache || uci set gnunet.dhtcache=gnunet-config uci -q batch < -+ ]])) - ]) - ], - [AC_MSG_RESULT([--with-libpulse not specified]) -@@ -856,10 +858,12 @@ AC_ARG_WITH(libopus, - LDFLAGS="-L$with_libopus/lib $LDFLAGS" - CPPFLAGS="-I$with_libopus/include $CPPFLAGS" - AC_CHECK_HEADERS(opus/opus.h, -- AC_CHECK_LIB([opus], -- [OPUS_SET_GAIN], -- EXT_LIB_PATH="-L$with_libopus/lib $EXT_LIB_PATH" -- opus=1)) -+ AC_CHECK_DECL([OPUS_SET_GAIN], -+ [opus=1], -+ [], -+ [[ -+ #include -+ ]])) - ]) - ], - [AC_MSG_RESULT([--with-libopus not specified]) diff --git a/net/gnunet/patches/100-remove-mysql-version-check.patch b/net/gnunet/patches/100-remove-mysql-version-check.patch new file mode 100644 index 0000000000..c6c131e32d --- /dev/null +++ b/net/gnunet/patches/100-remove-mysql-version-check.patch @@ -0,0 +1,38 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -981,33 +981,13 @@ AC_ARG_WITH([mysql], + AC_CHECK_LIB([mysqlclient], [mysql_init], + [AC_CHECK_HEADERS([mysql/mysql.h], + [MYSQL_LDFLAGS="-L$MYSQL_LIBDIR" +- mysql=true], ++ mysql=true ++ mysql8=true], + [mysql=false])], + [mysql=false])]) + AC_SUBST(MYSQL_LDFLAGS) + AC_SUBST(MYSQL_CPPFLAGS) + +-# additional version checks for mysql +-AS_IF([test "x$mysql" = "xtrue"], +- [AC_MSG_CHECKING([for mysql version]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +- [[include ]], +- [[#if (MYSQL_VERSION_ID < 40100) +-#error required at least version 4.1 +-#endif]])], +- [mysql=true], +- [mysql=false]) +- AS_IF([test "x$mysql" = "xfalse"], +- [AC_MSG_RESULT([< 4.1]) +- AC_MSG_RESULT([mysql version >= 4.1 required. Will not use MySQL])]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +- [[#include ]], +- [[#if (MYSQL_VERSION_ID < 80000) +-#error needs at least version 8.0 +-#endif]])], +- [mysql8=true], +- [mysql8=false])]) +- + AS_IF([test "x$mysql" = "xtrue"], + [AS_IF([test "x$mysql8" = "xfalse"], + [AC_MSG_RESULT([between 4.1 and 8.0])], -- 2.30.2