gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-donau] branch master updated: fix makefile warnings, rename lib


From: gnunet
Subject: [taler-donau] branch master updated: fix makefile warnings, rename lib
Date: Tue, 12 Dec 2023 11:50:02 +0100

This is an automated email from the git hooks/post-receive script.

johannes-casaburi pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new 2380515  fix makefile warnings, rename lib
     new 424de43  Merge remote-tracking branch 'refs/remotes/origin/master'
2380515 is described below

commit 2380515adcc989f53e9ad42346208d0e2056b761
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
AuthorDate: Tue Dec 12 11:48:46 2023 +0100

    fix makefile warnings, rename lib
---
 contrib/gana                       |   2 +-
 src/donau-tools/Makefile.am        |   4 +-
 src/donau/Makefile.am              |   4 +-
 src/donaudb/Makefile.am            |  59 ++-------------------
 src/json/Makefile.am               |   4 +-
 src/lib/Makefile.am                |   2 +-
 src/pq/Makefile.am                 |   4 +-
 src/testing/donau-unified-setup.sh | 105 +++++++++++++++++++++++++++++--------
 src/util/Makefile.am               |  10 ++--
 src/util/donau-config.in           |  13 +++++
 10 files changed, 115 insertions(+), 92 deletions(-)

diff --git a/contrib/gana b/contrib/gana
index f557793..ec6c821 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit f5577937ddfe880a49c8bcfce6e531959d62fdd8
+Subproject commit ec6c82120f0c3dca85429b86652fd25d3c25a886
diff --git a/src/donau-tools/Makefile.am b/src/donau-tools/Makefile.am
index ef1d55e..2a781a8 100644
--- a/src/donau-tools/Makefile.am
+++ b/src/donau-tools/Makefile.am
@@ -22,7 +22,7 @@ taler_donau_offline_LDADD = \
   $(LIBGCRYPT_LIBS) \
   $(top_builddir)/src/lib/libtalerdonau.la \
   $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   -lgnunetjson \
   -lgnunetcurl \
   -ljansson \
@@ -33,7 +33,7 @@ taler_donau_dbinit_SOURCES = \
   taler-donau-dbinit.c
 taler_donau_dbinit_LDADD = \
   $(LIBGCRYPT_LIBS) \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   $(top_builddir)/src/pq/libtalerpq.la \
   $(top_builddir)/src/donaudb/libtalerdonaudb.la \
   -lgnunetutil \
diff --git a/src/donau/Makefile.am b/src/donau/Makefile.am
index 37aaf43..a094403 100644
--- a/src/donau/Makefile.am
+++ b/src/donau/Makefile.am
@@ -27,8 +27,8 @@ donau_httpd_SOURCES = \
 donau_httpd_LDADD = \
   $(LIBGCRYPT_LIBS) \
   $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/donaudb/libtalerdonaudb.la \  
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/donaudb/libtalerdonaudb.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   -lmicrohttpd \
   -ltalermhd   \
   -ltalerutil  \
diff --git a/src/donaudb/Makefile.am b/src/donaudb/Makefile.am
index 11c5305..6b7ccd6 100644
--- a/src/donaudb/Makefile.am
+++ b/src/donaudb/Makefile.am
@@ -75,7 +75,7 @@ libtaler_plugin_donaudb_postgres_la_LDFLAGS = \
   $(TALER_PLUGIN_LDFLAGS) \
   $(top_builddir)/src/pq/libtalerpq.la \
   $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   -lpq \
   -lpthread \
   -lgnunetpq \
@@ -89,7 +89,7 @@ lib_LTLIBRARIES = \
 libtalerdonaudb_la_SOURCES = \
   donaudb_plugin.c
 libtalerdonaudb_la_LIBADD = \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   -lgnunetutil \
   $(XLIB)
 libtalerdonaudb_la_LDFLAGS = \
@@ -111,65 +111,12 @@ test_donaudb_postgres_SOURCES = \
 test_donaudb_postgres_LDADD = \
   libtalerdonaudb.la \
   $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   $(top_builddir)/src/pq/libtalerpq.la \
   -ljansson \
   -lgnunetjson \
   -lgnunetutil \
   $(XLIB)
 
-perf_reserves_in_insert_postgres_SOURCES = \
-  perf_reserves_in_insert.c
-perf_reserves_in_insert_postgres_LDADD = \
-  libtalerdonaudb.la \
-  $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
-  $(top_builddir)/src/pq/libtalerpq.la \
-  -ljansson \
-  -lgnunetjson \
-  -lgnunetutil \
-  -lm \
-  $(XLIB)
-
-perf_select_refunds_by_coin_postgres_SOURCES = \
-  perf_select_refunds_by_coin.c
-perf_select_refunds_by_coin_postgres_LDADD = \
-  libtalerdonaudb.la \
-  $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
-  $(top_builddir)/src/pq/libtalerpq.la \
-  -ljansson \
-  -lgnunetjson \
-  -lgnunetutil \
-  -lm \
-  $(XLIB)
-
-perf_get_link_data_postgres_SOURCES = \
-  perf_get_link_data.c
-perf_get_link_data_postgres_LDADD = \
-  libtalerdonaudb.la \
-  $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
-  $(top_builddir)/src/pq/libtalerpq.la \
-  -ljansson \
-  -lgnunetjson \
-  -lgnunetutil \
-  -lm \
-  $(XLIB)
-
-perf_deposits_get_ready_postgres_SOURCES = \
-  perf_deposits_get_ready.c
-perf_deposits_get_ready_postgres_LDADD = \
-  libtalerdonaudb.la \
-  $(top_builddir)/src/json/libtalerjson.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
-  $(top_builddir)/src/pq/libtalerpq.la \
-  -ljansson \
-  -lgnunetjson \
-  -lgnunetutil \
-  -lm \
-  $(XLIB)
-
-
 EXTRA_test_donaudb_postgres_DEPENDENCIES = \
   libtaler_plugin_donaudb_postgres.la
diff --git a/src/json/Makefile.am b/src/json/Makefile.am
index 6a5c0a5..f35b3df 100644
--- a/src/json/Makefile.am
+++ b/src/json/Makefile.am
@@ -17,7 +17,7 @@ libtalerjson_la_LDFLAGS = \
   -version-info 1:0:1 \
   -no-undefined
 libtalerjson_la_LIBADD = \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   -lgnunetjson \
   -lgnunetutil \
   -lunistring \
@@ -36,6 +36,6 @@ test_json_SOURCES = \
 test_json_LDADD = \
   $(top_builddir)/src/json/libtalerjson.la \
   -lgnunetjson \
-  $(top_builddir)/src/util/libtalerdonauutil.la \
+  $(top_builddir)/src/util/libdonauutil.la \
   -lgnunetutil \
   -ljansson
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 1b2fe8c..40abd78 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -26,7 +26,7 @@ libtalerdonau_la_SOURCES = \
 # maybe need libtalercurl
 libtalerdonau_la_LIBADD = \
        $(top_builddir)/src/json/libtalerjson.la \
-       $(top_builddir)/src/util/libtalerdonauutil.la \
+       $(top_builddir)/src/util/libdonauutil.la \
        -lgnunetcurl \
        -lgnunetjson \
        -lgnunetutil \
diff --git a/src/pq/Makefile.am b/src/pq/Makefile.am
index d576668..5612de8 100644
--- a/src/pq/Makefile.am
+++ b/src/pq/Makefile.am
@@ -13,7 +13,7 @@ libtalerpq_la_SOURCES = \
   pq_query_helper.c \
   pq_result_helper.c
 libtalerpq_la_LIBADD = \
-  $(top_builddir)/src/util/libtalerdonauutil.la  \
+  $(top_builddir)/src/util/libdonauutil.la  \
   -lgnunetutil -ljansson \
   -lgnunetpq \
   -lpq \
@@ -33,7 +33,7 @@ test_pq_SOURCES = \
   test_pq.c
 test_pq_LDADD = \
   libtalerpq.la \
-  $(top_builddir)/src/util/libtalerdonauutil.la  \
+  $(top_builddir)/src/util/libdonauutil.la  \
   -lgnunetpq \
   -lgnunetutil \
   -ljansson \
diff --git a/src/testing/donau-unified-setup.sh 
b/src/testing/donau-unified-setup.sh
index dfdc26b..15a74d5 100644
--- a/src/testing/donau-unified-setup.sh
+++ b/src/testing/donau-unified-setup.sh
@@ -97,6 +97,9 @@ while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do
         d)
             WIRE_DOMAIN="$OPTARG"
             ;;
+        D)  
+            START_DONAU="1"
+            ;;
         e)
             START_EXCHANGE="1"
             ;;
@@ -111,6 +114,7 @@ while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do
             echo '  -c $CONF     -- set configuration'
             # shellcheck disable=SC2016
             echo '  -d $METHOD   -- use wire method (default: x-taler-bank)'
+            echo '  -D           -- start donau'
             echo '  -e           -- start exchange'
             echo '  -f           -- start fakebank'
             echo '  -g           -- start aggregator'
@@ -119,7 +123,6 @@ while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do
             echo '  -L $LOGLEVEL -- set log level'
             echo '  -m           -- start merchant'
             echo '  -n           -- start nexus'
-            echo '  -o           -- start donau'
             # shellcheck disable=SC2016
             echo '  -r $MEX      -- which exchange to use at the merchant 
(optional)'
             echo '  -s           -- start backup/sync'
@@ -145,9 +148,6 @@ while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do
         n)
             START_NEXUS="1"
             ;;
-        o)  
-            START_DONAU="1"
-            ;;
         r)
             USE_MERCHANT_EXCHANGE="$OPTARG"
             ;;
@@ -193,8 +193,8 @@ fi
 
 if [ "1" = "$START_DONAU" ]
 then
-    echo -n "Testing for Taler donau"
-    taler-donau-httpd -h > /dev/null || exit_skip " taler-donau-httpd required"
+    echo -n "Testing for Donau"
+    donau-httpd -h > /dev/null || exit_skip " donau-httpd required"
     echo " FOUND"
 fi
 
@@ -460,16 +460,16 @@ fi
 
 if [ "1" = "$START_DONAU" ]
 then
-    echo -n "Starting donau ..."
-    DONAU_PORT=$(taler-config -c "$CONF" -s DONAU -o PORT)
-    SERVE=$(taler-config -c "$CONF" -s DONAU -o SERVE)
+    echo -n "Starting Donau ..."
+    DONAU_PORT=$(donau-config -c "$CONF" -s DONAU -o PORT)
+    SERVE=$(donau-config -c "$CONF" -s DONAU -o SERVE)
     if [ "${SERVE}" = "unix" ]
     then
-        DONAU_URL=$(taler-config -c "$CONF" -s DONAU -o BASE_URL)
+        DONAU_URL=$(donau-config -c "$CONF" -s DONAU -o BASE_URL)
     else
         DONAU_URL="http://localhost:${DONAU_PORT}/";
     fi
-    MASTER_PRIV_FILE=$(taler-config -f -c "${CONF}" -s "DONAU-OFFLINE" -o 
"MASTER_PRIV_FILE")
+    MASTER_PRIV_FILE=$(donau-config -f -c "${CONF}" -s "DONAU-OFFLINE" -o 
"MASTER_PRIV_FILE")
     MASTER_PRIV_DIR=$(dirname "$MASTER_PRIV_FILE")
     mkdir -p "${MASTER_PRIV_DIR}"
     if [ ! -e "$MASTER_PRIV_FILE" ]
@@ -478,17 +478,17 @@ then
         echo -n "."
     fi
     MASTER_PUB=$(gnunet-ecc -p "${MASTER_PRIV_FILE}")
-    MPUB=$(taler-config -c "$CONF" -s donau -o MASTER_PUBLIC_KEY)
+    MPUB=$(donau-config -c "$CONF" -s donau -o MASTER_PUBLIC_KEY)
     if [ "$MPUB" != "$MASTER_PUB" ]
     then
         echo -n " patching master_pub ($MASTER_PUB)..."
-        taler-config -c "$CONF" -s donau -o MASTER_PUBLIC_KEY -V "$MASTER_PUB"
+        donau-config -c "$CONF" -s donau -o MASTER_PUBLIC_KEY -V "$MASTER_PUB"
     fi
-    taler-donau-dbinit -c "$CONF" --reset
-    $USE_VALGRIND taler-donau-secmod-eddsa -c "$CONF" -L "$LOGLEVEL" 2> 
taler-donau-secmod-eddsa.log &
-    $USE_VALGRIND taler-donau-secmod-rsa -c "$CONF" -L "$LOGLEVEL" 2> 
taler-donau-secmod-rsa.log &
-    $USE_VALGRIND taler-donau-secmod-cs -c "$CONF" -L "$LOGLEVEL" 2> 
taler-donau-secmod-cs.log &
-    $USE_VALGRIND taler-donau-httpd -c "$CONF" -L "$LOGLEVEL" 2> 
taler-donau-httpd.log &
+    donau-dbinit -c "$CONF" --reset
+    $USE_VALGRIND donau-secmod-eddsa -c "$CONF" -L "$LOGLEVEL" 2> 
donau-secmod-eddsa.log &
+    $USE_VALGRIND donau-secmod-rsa -c "$CONF" -L "$LOGLEVEL" 2> 
donau-secmod-rsa.log &
+    $USE_VALGRIND donau-secmod-cs -c "$CONF" -L "$LOGLEVEL" 2> 
donau-secmod-cs.log &
+    $USE_VALGRIND donau-httpd -c "$CONF" -L "$LOGLEVEL" 2> donau-httpd.log &
     echo " DONE"
 fi
 
@@ -623,7 +623,7 @@ fi
 echo -n "Waiting for Taler services ..."
 # Wait for all other taler services to be available
 E_DONE=0
-O_DONE=0
+D_DONE=0
 M_DONE=0
 S_DONE=0
 K_DONE=0
@@ -643,7 +643,7 @@ do
             -O /dev/null >/dev/null || continue
         E_DONE=1
     fi
-    if [ "0" = "$O_DONE" ] && [ "1" = "$START_DONAU" ]
+    if [ "0" = "$D_DONE" ] && [ "1" = "$START_DONAU" ]
     then
         echo -n "O"
         wget \
@@ -652,7 +652,7 @@ do
             "${DONAU_URL}config" \
             -o /dev/null \
             -O /dev/null >/dev/null || continue
-        O_DONE=1
+        D_DONE=1
     fi
     if [ "0" = "$M_DONE" ] && [ "1" = "$START_MERCHANT" ]
     then
@@ -792,6 +792,69 @@ then
     echo " OK"
 fi
 
+if [ "1" = "$START_DONAU" ]
+then
+    echo -n "Wait for donau /management/keys to be ready "
+    OK="0"
+    LAST_RESPONSE=$(mktemp tmp-last-response.XXXXXXXX)
+    for n in $(seq 1 10)
+    do
+        echo -n "."
+        sleep "$DEFAULT_SLEEP"
+        # donau
+        wget \
+            --tries=3 \
+            --waitretry=0 \
+            --timeout=30 \
+            "${DONAU_URL}management/keys"\
+            -o /dev/null \
+            -O "$LAST_RESPONSE" \
+            >/dev/null || continue
+        OK="1"
+        break;
+    done
+    if [ "1" != "$OK" ]
+    then
+        cat "$LAST_RESPONSE"
+        exit_fail "Failed to setup donau keys, check secmod logs"
+    fi
+    rm "$LAST_RESPONSE"
+    echo " OK"
+
+    echo -n "Setting up donau keys ..."
+    donau-offline -c "$CONF" \
+      download \
+      sign \
+      upload &> donau-offline.log
+    echo "OK"
+
+    echo -n "Checking /keys "
+    OK="0"
+    LAST_RESPONSE=$(mktemp tmp-last-response.XXXXXXXX)
+    for n in $(seq 1 10)
+    do
+        echo -n "."
+        sleep "$DEFAULT_SLEEP"
+        wget \
+            --tries=1 \
+            --timeout=5 \
+            "${DONAU_URL}keys" \
+            -a wget-keys-check.log \
+            -o /dev/null \
+            -O "$LAST_RESPONSE" \
+            >/dev/null || continue
+        OK="1"
+        break
+    done
+    if [ "1" != "$OK" ]
+    then
+        cat "$LAST_RESPONSE"
+        exit_fail " Failed to fetch ${DONAU_URL}keys"
+    fi
+    rm "$LAST_RESPONSE"
+    echo " OK"
+fi
+
 if [ "1" = "$START_AUDITOR" ]
 then
     echo -n "Setting up auditor signatures ..."
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index c8f84cb..1f9f1e8 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -10,14 +10,14 @@ endif
 pkgcfgdir = $(prefix)/share/taler/config.d/
 
 lib_LTLIBRARIES = \
-  libtalerdonauutil.la
+  libdonauutil.la
 
-libtalerdonauutil_la_SOURCES = \
+libdonauutil_la_SOURCES = \
   charity_signatures.c \
   donau_signatures.c \
   donau_os_installation.c 
 
-libtalerdonauutil_la_LIBADD = \
+libdonauutil_la_LIBADD = \
   -ltalerutil \
   -lgnunetutil \
   -lgnunetjson \
@@ -28,7 +28,7 @@ libtalerdonauutil_la_LIBADD = \
   -lz \
   -lm
 
-libtalerdonauutil_la_LDFLAGS = \
+libdonauutil_la_LDFLAGS = \
   -version-info 0:0:0 \
   -no-undefined
 
@@ -43,7 +43,7 @@ TESTS = \
 test_crypto_SOURCES = \
   test_crypto.c
 test_crypto_LDADD = \
-  libtalerdonauutil.la \
+  libdonauutil.la \
   -ltalerutil \
   -lgnunetutil 
 
diff --git a/src/util/donau-config.in b/src/util/donau-config.in
new file mode 100644
index 0000000..77fbc27
--- /dev/null
+++ b/src/util/donau-config.in
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set -eu
+
+if ! type gnunet-config >/dev/null; then
+  echo "$0 needs gnunet-config to be installed"
+  exit 1
+fi
+
+GC=`which gnunet-config`
+SO=`ls %libdir%/libdonauutil.so.* | sort -n | tail -n1`
+export LD_PRELOAD=${LD_PRELOAD:-}:${SO}
+exec gnunet-config "$@"
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]