sync

Backup service to store encrypted wallet databases (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 22026a2b96824f08e32036f9ac28f688676da33f
parent e91f984566a50ac934b5c5496d4fd53d51d10626
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sun, 12 Oct 2025 19:34:50 +0200

improve multiarch support

Diffstat:
Mconfigure.ac | 19+++++++++++++------
Mdebian/sync-httpd.postinst | 7+++----
Mdebian/sync-httpd.postrm | 4+---
3 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -32,6 +32,14 @@ DX_RTF_FEATURE(OFF), DX_CHI_FEATURE(OFF), DX_XML_FEATURE(OFF)) + +AC_CHECK_PROG([DPKG_ARCH], [dpkg-architecture], [yes], [no]) +if test "x$DPKG_ARCH" = "xyes"; then + MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH` +else + MULTIARCH="" +fi + AC_MSG_CHECKING([whether to compile documentation ONLY]) AC_ARG_ENABLE([only-doc], [AS_HELP_STRING([--enable-only-doc], [only compile Taler documentation])], @@ -66,7 +74,7 @@ AC_ARG_WITH(merchant, AS_CASE([$with_merchant], [yes], [], [no], [AC_MSG_ERROR([--with-merchant is required])], - [LDFLAGS="-L$with_merchant/lib $LDFLAGS" + [LDFLAGS="-L$with_merchant/lib/$MULTIARCH -L$with_merchant/lib/ $LDFLAGS" CPPFLAGS="-I$with_merchant/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"]) AC_CHECK_HEADERS([taler/taler_merchant_service.h], @@ -87,7 +95,7 @@ AC_ARG_WITH(gnunet, AS_CASE([$with_gnunet], [yes], [], [no], [AC_MSG_ERROR([--with-gnunet is required])], - [LDFLAGS="-L$with_gnunet/lib $LDFLAGS" + [LDFLAGS="-L$with_gnunet/lib/$MULTIARCH -L$with_gnunet/lib/ $LDFLAGS" CPPFLAGS="-I$with_gnunet/include $CPPFLAGS"]) AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h], [AC_CHECK_LIB([gnunetutil], [GNUNET_SCHEDULER_run], libgnunetutil=1)]) @@ -135,11 +143,10 @@ AC_ARG_WITH(exchange, AS_CASE([$with_exchange], [yes], [], [no], [AC_MSG_ERROR([--with-exchange is required])], - [LDFLAGS="-L$with_exchange/lib $LDFLAGS" + [LDFLAGS="-L$with_exchange/lib/$MULTIARCH -L$with_exchange/lib/ $LDFLAGS" CPPFLAGS="-I$with_exchange/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"]) CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" -LDFLAGS="$LDFLAGS -L/usr/local/lib" AC_CHECK_HEADERS([gnunet/gnunet_pq_lib.h], [AC_CHECK_LIB([gnunetpq], [GNUNET_PQ_connect_with_cfg], libgnunetpq=1)]) @@ -159,7 +166,7 @@ AC_ARG_WITH([microhttpd], AS_CASE([$with_microhttpd], [yes], [], [no], [AC_MSG_ERROR([--with-microhttpd is required])], - [LDFLAGS="-L$with_microhttpd/lib $LDFLAGS" + [LDFLAGS="-L$with_microhttpd/lib/$MULTIARCH -L$with_microhttpd/lib/ $LDFLAGS" CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"]) AC_CHECK_LIB(microhttpd,MHD_start_daemon, [AC_CHECK_HEADER([microhttpd.h],[microhttpd=1])]) @@ -180,7 +187,7 @@ AC_ARG_WITH([microhttpd2], AS_CASE([$with_microhttpd2], [yes],[], [no],[], - [LDFLAGS="-L$with_microhttpd2/lib $LDFLAGS" + [LDFLAGS="-L$with_microhttpd2/lib/$MULTIARCH -L$with_microhttpd2/lib/ $LDFLAGS" CPPFLAGS="-I$with_microhttpd2/include $CPPFLAGS"]) MHD2_VERSION_AT_LEAST([1.99.0]) diff --git a/debian/sync-httpd.postinst b/debian/sync-httpd.postinst @@ -19,16 +19,15 @@ if [ "$1" = "purge" ]; then fi SYNC_HOME="/var/lib/sync/" -_USERNAME=sync-httpd -_GROUPNAME=www-data . /usr/share/debconf/confmodule case "${1}" in configure) # Creating taler users if needed - if ! getent passwd ${_USERNAME} >/dev/null; then - adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${SYNC_HOME} ${_USERNAME} + if ! getent passwd sync-httpd >/dev/null; + then + adduser --quiet --system --ingroup www-data --no-create-home --home ${SYNC_HOME} sync-httpd fi if ! dpkg-statoverride --list /etc/sync/secrets/sync-db.secret.conf >/dev/null 2>&1; diff --git a/debian/sync-httpd.postrm b/debian/sync-httpd.postrm @@ -6,14 +6,12 @@ if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi -_USERNAME=sync-httpd - case "${1}" in purge) rm -rf /var/lib/sync/httpd/ rm -f /etc/sync/override.conf dpkg-statoverride --remove /etc/sync/secrets/sync-db.secret.conf - deluser --system --quiet ${_USERNAME} || true + deluser --system --quiet sync-httpd || true ;; remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) ;;