taldir

Directory service to resolve wallet mailboxes by messenger addresses
Log | Files | Refs | Submodules | README | LICENSE

commit 9e528556e5057d2237e0ae941e587cfd5d3faa88
parent 622ec7719b6c0d15d1d649ccf2b14d8166bf155f
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Sat, 20 Dec 2025 22:42:10 +0900

update gana using script; remove submodule; clone from git+ssh

Diffstat:
M.gitmodules | 3---
MMakefile.in | 5+----
Acontrib/gana_update.sh | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Minternal/gana/taler_error_codes.go | 78+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
4 files changed, 132 insertions(+), 10 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "contrib/gana"] - path = third_party/gana - url = https://git.gnunet.org/git/gana [submodule "third_party/gnunet-go"] path = third_party/gnunet-go url = https://git.gnunet.org/gnunet-go diff --git a/Makefile.in b/Makefile.in @@ -41,10 +41,7 @@ check: ${GO} test ./cmd/taldir-server gana: - TMPSAVE=${PWD} - cd third_party/gana/gnu-taler-error-codes && make taler_error_codes.go - cd ${TMPSAVE} - cp third_party/gana/gnu-taler-error-codes/taler_error_codes.go internal/gana/ + ./contrib/gana_update.sh dist: git archive --format=tar.gz -o taldir-${GITVER}.tar.gz --prefix=taldir-${GITVER}/ HEAD diff --git a/contrib/gana_update.sh b/contrib/gana_update.sh @@ -0,0 +1,56 @@ +# This is more portable than `which' but comes with +# the caveat of not(?) properly working on busybox's ash: +TALDIR_SRC_ROOT=$PWD +if [ ! -f $TALDIR_SRC_ROOT/contrib/gana_update.sh ]; then + echo "Please run this script from the root of the source tree!" + exit 1 +fi + +COMMIT_HASH="" +if [ ! -z $1 ]; then + COMMIT_HASH=$1 +fi + +cleanup() { + if [ -d $GANA_TMP ]; then + rm -rf $GANA_TMP + fi + cd $GNUNET_SRC_ROOT +} + +# This is more portable than `which' but comes with +# the caveat of not(?) properly working on busybox's ash: +existence() +{ + type "$1" >/dev/null 2>&1 +} + +gana_update() +{ + echo "Updating GANA..." + if ! existence git; then + echo "Script requires git" + exit 1 + fi + if ! existence recfmt; then + echo "Script requires recutils" + exit 1 + fi + GANA_TMP=`mktemp -d` + cd $GANA_TMP || exit 1 + git clone git+ssh://git@git.gnunet.org/gana.git || exit 1 + cd gana || exit 1 + if [ ! -z "${COMMIT_HASH}" ]; then + git checkout "${COMMIT_HASH}" || exit 1 + fi + # GNS + echo "Updating Taler error codes" + make -C gnu-taler-error-codes taler_error_codes.go >/dev/null && \ + cp gnu-taler-error-codes/taler_error_codes.go $TALDIR_SRC_ROOT/internal/gana/ || exit 1 + + echo "GANA finished" + cd $TALDIR_SRC_ROOT +} + +trap cleanup EXIT +gana_update diff --git a/internal/gana/taler_error_codes.go b/internal/gana/taler_error_codes.go @@ -747,6 +747,54 @@ const ( /** + * The process to generate a PDF from a template failed. A likely cause is a syntactic error in the template. This needs to be investigated by the exchange operator. + * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). + * (A value of 0 indicates that the error is generated client-side). + */ + EXCHANGE_GENERIC_TYPST_TEMPLATE_FAILURE = 1044 + + + /** + * A process to combine multiple PDFs into one larger document failed. A likely cause is a resource exhaustion problem on the server. This needs to be investigated by the exchange operator. + * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). + * (A value of 0 indicates that the error is generated client-side). + */ + EXCHANGE_GENERIC_PDFTK_FAILURE = 1045 + + + /** + * The process to generate a PDF from a template crashed. A likely cause is a bug in the Typst software. This needs to be investigated by the exchange operator. + * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). + * (A value of 0 indicates that the error is generated client-side). + */ + EXCHANGE_GENERIC_TYPST_CRASH = 1046 + + + /** + * The process to combine multiple PDFs into a larger document crashed. A likely cause is a bug in the pdftk software. This needs to be investigated by the exchange operator. + * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). + * (A value of 0 indicates that the error is generated client-side). + */ + EXCHANGE_GENERIC_PDFTK_CRASH = 1047 + + + /** + * One of the binaries needed to generate the PDF is not installed. If this feature is required, the system administrator should make sure Typst and pdftk are both installed. + * Returned with an HTTP status code of #MHD_HTTP_NOT_IMPLEMENTED (501). + * (A value of 0 indicates that the error is generated client-side). + */ + EXCHANGE_GENERIC_NO_TYPST_OR_PDFTK = 1048 + + + /** + * The exchange is not aware of the given target account. The specified account is not a customer of this service. + * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). + * (A value of 0 indicates that the error is generated client-side). + */ + EXCHANGE_GENERIC_TARGET_ACCOUNT_UNKNOWN = 1049 + + + /** * The exchange did not find information about the specified transaction in the database. * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). * (A value of 0 indicates that the error is generated client-side). @@ -2363,6 +2411,14 @@ const ( /** + * The unit referenced in the request is not known to the backend. + * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). + * (A value of 0 indicates that the error is generated client-side). + */ + MERCHANT_GENERIC_UNIT_UNKNOWN = 2004 + + + /** * The proposal is not known to the backend. * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). * (A value of 0 indicates that the error is generated client-side). @@ -2587,6 +2643,14 @@ const ( /** + * The unit referenced in the request is builtin and cannot be modified or deleted. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + MERCHANT_GENERIC_UNIT_BUILTIN = 2033 + + + /** * The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response. * Returned with an HTTP status code of #MHD_HTTP_OK (200). * (A value of 0 indicates that the error is generated client-side). @@ -2835,11 +2899,11 @@ const ( /** - * Legacy stuff. Remove me with protocol v1. - * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0). + * The refund request is too late because it is past the wire transfer deadline of the order. The merchant must find a different way to pay back the money to the customer. + * Returned with an HTTP status code of #MHD_HTTP_GONE (410). * (A value of 0 indicates that the error is generated client-side). */ - DEAD_QQQ_PAY_MERCHANT_POST_ORDERS_ID_ABORT_REFUND_REFUSED_PAYMENT_COMPLETE = 2169 + MERCHANT_PRIVATE_POST_REFUND_AFTER_WIRE_DEADLINE = 2169 /** @@ -4691,6 +4755,14 @@ const ( /** + * The order could not be found. Maybe the merchant deleted it. + * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0). + * (A value of 0 indicates that the error is generated client-side). + */ + WALLET_MERCHANT_ORDER_NOT_FOUND = 7049 + + + /** * We encountered a timeout with our payment backend. * Returned with an HTTP status code of #MHD_HTTP_GATEWAY_TIMEOUT (504). * (A value of 0 indicates that the error is generated client-side).