gnunet-svn
[Top][All Lists]
Advanced

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

[taler-sync] branch master updated: -try to fix Debian package and other


From: gnunet
Subject: [taler-sync] branch master updated: -try to fix Debian package and other issues
Date: Fri, 17 Sep 2021 11:28:43 +0200

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

grothoff pushed a commit to branch master
in repository sync.

The following commit(s) were added to refs/heads/master by this push:
     new 6c93801  -try to fix Debian package and other issues
6c93801 is described below

commit 6c9380144f0d37c2fd3fbc74824918089f2390dd
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Sep 17 11:28:41 2021 +0200

    -try to fix Debian package and other issues
---
 debian/db/install/pgsql          |  2 +-
 debian/sync-httpd.config         |  1 +
 src/sync/sync.conf               | 40 ----------------------------------------
 src/syncdb/Makefile.am           |  6 ++++++
 src/syncdb/sync-dbinit.c         |  1 +
 src/syncdb/sync_db_postgres.conf |  4 ----
 src/util/Makefile.am             |  5 +++++
 src/util/paths.conf              | 34 ++++++++++++++++++++++++++++++++++
 8 files changed, 48 insertions(+), 45 deletions(-)

diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql
index 4695224..f24927b 100755
--- a/debian/db/install/pgsql
+++ b/debian/db/install/pgsql
@@ -13,7 +13,7 @@ if [ -f /etc/dbconfig-common/sync-httpd.conf ]; then
     echo -e "# Config file auto-generated by Debian.\n[sync]\nDB=postgres\n\n" 
> \
       $conf_override
     # We assume ident auth here.  We might support password auth later.
-    echo -e "[stasis-postgres]\nCONFIG=postgres:///${dbc_dbname}\n\n" > \
+    echo -e "# Config file auto-generated by 
Debian.\n[syncdb-postgres]\nCONFIG=postgres:///${dbc_dbname}\n\n" > \
       $conf_sync_db
 
     # Allow the taler-merchant-httpd user to create schemas, needed by dbinit
diff --git a/debian/sync-httpd.config b/debian/sync-httpd.config
index 36e67d1..63f7a0a 100644
--- a/debian/sync-httpd.config
+++ b/debian/sync-httpd.config
@@ -10,6 +10,7 @@ _GROUPNAME=www-data
 # For now, we only support postgres
 dbc_dbtypes=pgsql
 dbc_dbuser=${_USERNAME}
+dbc_dbname="sync"
 
 dbc_authmethod_user=ident
 dbc_authmethod_admin=ident
diff --git a/src/sync/sync.conf b/src/sync/sync.conf
index af3203f..2eccdc1 100644
--- a/src/sync/sync.conf
+++ b/src/sync/sync.conf
@@ -42,43 +42,3 @@ PAYMENT_BACKEND_URL = http://localhost:9966/
 
 # API key to pass when accessing the merchant backend.
 # API_KEY = SECRET_VALUE
-
-# Configuration for postgres database.
-[syncdb-postgres]
-CONFIG = postgres:///sync
-
-
-[PATHS]
-# The PATHS section is special, as filenames including $-expression are
-# expanded using the values from PATHS or the system environment (PATHS
-# is checked first).  libgnunetutil supports expanding $-expressions using
-# defaults with the syntax "${VAR:-default}".  Here, "default" can again
-# be a $-expression.
-#
-# We usually want $HOME for $SYNC_HOME
-#
-SYNC_HOME = ${HOME:-${USERPROFILE}}
-
-# see XDG Base Directory Specification at
-# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
-# for how these should be used.
-
-# Persistent data storage
-SYNC_DATA_HOME = ${XDG_DATA_HOME:-$SYNC_HOME/.local/share}/sync/
-
-# Configuration files
-SYNC_CONFIG_HOME = ${XDG_CONFIG_HOME:-$SYNC_HOME/.config}/sync/
-
-# Cached data, no big deal if lost
-SYNC_CACHE_HOME = ${XDG_CACHE_HOME:-$SYNC_HOME/.cache}/sync/
-
-# Runtime data (i.e UNIX domain sockets, locks, always lost on system boot)
-SYNC_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/sync-runtime/
-
-# Directory to use for temporary files.
-SYNC_TMP = ${TMPDIR:-${TMP:-/tmp}}/sync/
-
-# DEFAULTCONFIG = /etc/sync.conf
-# If 'DEFAULTCONFIG' is not defined, the current
-# configuration file is assumed to be the default,
-# which is what we want by default...
diff --git a/src/syncdb/Makefile.am b/src/syncdb/Makefile.am
index d71e24e..1c1ab91 100644
--- a/src/syncdb/Makefile.am
+++ b/src/syncdb/Makefile.am
@@ -1,6 +1,11 @@
 # This Makefile.am is in the public domain
 AM_CPPFLAGS = -I$(top_srcdir)/src/include
 
+pkgcfgdir = $(prefix)/share/sync/config.d/
+
+pkgcfg_DATA = \
+  sync_db_postgres.conf
+
 plugindir = $(libdir)/sync
 
 if HAVE_POSTGRESQL
@@ -80,4 +85,5 @@ TESTS = \
   test_sync_db-postgres
 
 EXTRA_DIST = \
+  $(pkgcfg_DATA) \
   test_sync_db_postgres.conf
diff --git a/src/syncdb/sync-dbinit.c b/src/syncdb/sync-dbinit.c
index be7b2ae..a158abf 100644
--- a/src/syncdb/sync-dbinit.c
+++ b/src/syncdb/sync-dbinit.c
@@ -85,6 +85,7 @@ run (void *cls,
     struct GNUNET_TIME_Absolute ancient;
 
     now = GNUNET_TIME_absolute_get ();
+    (void) GNUNET_TIME_round_abs (&now);
     ancient = GNUNET_TIME_absolute_subtract (now,
                                              GNUNET_TIME_relative_multiply (
                                                GNUNET_TIME_UNIT_YEARS,
diff --git a/src/syncdb/sync_db_postgres.conf b/src/syncdb/sync_db_postgres.conf
index db41bd0..ddf7d06 100644
--- a/src/syncdb/sync_db_postgres.conf
+++ b/src/syncdb/sync_db_postgres.conf
@@ -1,7 +1,3 @@
-[anastasis]
-#The DB plugin to use
-DB = postgres
-
 [syncdb-postgres]
 #The connection string the plugin has to use for connecting to the database
 CONFIG = postgres:///sync
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 6bc2447..4dfb823 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -9,11 +9,16 @@ endif
 
 pkgcfgdir = $(prefix)/share/sync/config.d/
 
+pkgcfg_DATA = \
+  paths.conf
+
+
 bin_SCRIPTS = \
   sync-config
 
 EXTRA_DIST = \
   $(bin_SCRIPTS) \
+  $(pkgcfg_DATA) \
   sync-config.in
 
 edit_script = $(SED) -e 's,%libdir%,$(libdir),'g $(NULL)
diff --git a/src/util/paths.conf b/src/util/paths.conf
new file mode 100644
index 0000000..7fc5394
--- /dev/null
+++ b/src/util/paths.conf
@@ -0,0 +1,34 @@
+[PATHS]
+# The PATHS section is special, as filenames including $-expression are
+# expanded using the values from PATHS or the system environment (PATHS
+# is checked first).  libgnunetutil supports expanding $-expressions using
+# defaults with the syntax "${VAR:-default}".  Here, "default" can again
+# be a $-expression.
+#
+# We usually want $HOME for $SYNC_HOME
+#
+SYNC_HOME = ${HOME:-${USERPROFILE}}
+
+# see XDG Base Directory Specification at
+# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+# for how these should be used.
+
+# Persistent data storage
+SYNC_DATA_HOME = ${XDG_DATA_HOME:-$SYNC_HOME/.local/share}/sync/
+
+# Configuration files
+SYNC_CONFIG_HOME = ${XDG_CONFIG_HOME:-$SYNC_HOME/.config}/sync/
+
+# Cached data, no big deal if lost
+SYNC_CACHE_HOME = ${XDG_CACHE_HOME:-$SYNC_HOME/.cache}/sync/
+
+# Runtime data (i.e UNIX domain sockets, locks, always lost on system boot)
+SYNC_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/sync-runtime/
+
+# Directory to use for temporary files.
+SYNC_TMP = ${TMPDIR:-${TMP:-/tmp}}/sync/
+
+# DEFAULTCONFIG = /etc/sync.conf
+# If 'DEFAULTCONFIG' is not defined, the current
+# configuration file is assumed to be the default,
+# which is what we want by default...

-- 
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]