libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 8abd1a6a1a6e7632163f4aa71fd1a1897e4932e2
parent 344d6d55ae60c383f6418bf4a18e0de03c35ed5c
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Fri,  4 Aug 2023 22:04:59 +0200

fix #7762 (remove dbconfig from libeufin packages)

Diffstat:
Mdebian/control | 2--
Ddebian/db/install-nexus/pgsql | 34----------------------------------
Ddebian/db/install-sandbox/pgsql | 36------------------------------------
Ddebian/libeufin-nexus.config | 22----------------------
Mdebian/libeufin-nexus.postinst | 13-------------
Mdebian/libeufin-nexus.prerm | 12------------
Ddebian/libeufin-sandbox.config | 22----------------------
Mdebian/libeufin-sandbox.install | 3---
Mdebian/libeufin-sandbox.postinst | 16----------------
Mdebian/libeufin-sandbox.prerm | 12------------
10 files changed, 0 insertions(+), 172 deletions(-)

diff --git a/debian/control b/debian/control @@ -24,7 +24,6 @@ Description: Resources shared between libeufin-nexus and libeufin-sandbox. Package: libeufin-nexus Architecture: all Depends: openjdk-11-jdk-headless | openjdk-11-jdk | openjdk-12-jdk-headless | openjdk-12-jdk | openjdk-13-jdk-headless | openjdk-13-jdk | openjdk-14-jdk-headless | openjdk-14-jdk | openjdk-15-jdk-headless | openjdk-15-jdk | openjdk-16-jdk-headless | openjdk-16-jdk | openjdk-17-jdk-headless | openjdk-17-jdk | openjdk-18-jdk-headless | openjdk-18-jdk | openjdk-19-jdk-headless | openjdk-19-jdk | openjdk-20-jdk-headless | openjdk-20-jdk | openjdk-21-jdk-headless | openjdk-21-jdk, - dbconfig-pgsql | dbconfig-no-thanks, python3 (>= 3.7), python3-click, python3-requests, @@ -39,7 +38,6 @@ Description: Software package to access FinTS/EBICS based Package: libeufin-sandbox Architecture: all Depends: openjdk-11-jdk-headless | openjdk-11-jdk | openjdk-12-jdk-headless | openjdk-12-jdk | openjdk-13-jdk-headless | openjdk-13-jdk | openjdk-14-jdk-headless | openjdk-14-jdk | openjdk-15-jdk-headless | openjdk-15-jdk | openjdk-16-jdk-headless | openjdk-16-jdk | openjdk-17-jdk-headless | openjdk-17-jdk | openjdk-18-jdk-headless | openjdk-18-jdk | openjdk-19-jdk-headless | openjdk-19-jdk | openjdk-20-jdk-headless | openjdk-20-jdk | openjdk-21-jdk-headless | openjdk-21-jdk, - dbconfig-pgsql | dbconfig-no-thanks, python3 (>= 3.7), python3-click, python3-requests, diff --git a/debian/db/install-nexus/pgsql b/debian/db/install-nexus/pgsql @@ -1,34 +0,0 @@ -#!/bin/bash - -set -eu - -# Get database settings from dbconfig-common and write libeufin configuration files. -if [ -f /etc/dbconfig-common/libeufin-nexus.conf ]; then - . /etc/dbconfig-common/libeufin-nexus.conf - case "$dbc_dbtype" in - pgsql) - # We assume ident auth here. We might support password auth later. - mkdir -p /etc/libeufin/ - echo -e "LIBEUFIN_NEXUS_PORT=5017" > \ - /etc/libeufin/nexus.env - echo -e "LIBEUFIN_NEXUS_DB_CONNECTION=\"jdbc:postgresql://${dbc_dbserver}/${dbc_dbname}?user=${dbc_dbuser}&password=${dbc_dbpass}\"\n\n" >> \ - /etc/libeufin/nexus.env - - # Allow the libeufin-sandbox/nexus user to create schemas. - echo "GRANT CREATE ON DATABASE \"${dbc_dbname}\" TO \"libeufin-nexus\";" | sudo -u postgres psql -f - - ;; - sqlite3) - # Later: use something like: - # sqlite:///$DATA_DIR/libeufin.db - # But for now, sqlite is unsupported: - echo "Unsupported database type $dbc_type." - exit 1 - ;; - "") ;; - - *) - echo "Unsupported database type $dbc_type." - exit 1 - ;; - esac -fi diff --git a/debian/db/install-sandbox/pgsql b/debian/db/install-sandbox/pgsql @@ -1,36 +0,0 @@ -#!/bin/bash - -set -eu - -# Get database settings from dbconfig-common and write libeufin configuration files. -if [ -f /etc/dbconfig-common/libeufin-sandbox.conf ]; then - . /etc/dbconfig-common/libeufin-sandbox.conf - case "$dbc_dbtype" in - pgsql) - # We assume ident auth here. We might support password auth later. - mkdir -p /etc/libeufin/ - echo -e "LIBEUFIN_SANDBOX_PORT=5016" > \ - /etc/libeufin/sandbox.env - echo -e "LIBEUFIN_SANDBOX_DB_CONNECTION=\"jdbc:postgresql://${dbc_dbserver}/${dbc_dbname}?user=${dbc_dbuser}&password=${dbc_dbpass}\"\n\n" >> \ - /etc/libeufin/sandbox.env - - - # Allow the libeufin-sandbox/nexus user to create schemas. - # Note: user name and DB name must match here. - echo "GRANT CREATE ON DATABASE \"${dbc_dbname}\" TO \"libeufin-sandbox\";" | sudo -u postgres psql -f - - ;; - sqlite3) - # Later: use something like: - # sqlite:///$DATA_DIR/libeufin.db - # But for now, sqlite is unsupported: - echo "Unsupported database type $dbc_type." - exit 1 - ;; - "") ;; - - *) - echo "Unsupported database type $dbc_type." - exit 1 - ;; - esac -fi diff --git a/debian/libeufin-nexus.config b/debian/libeufin-nexus.config @@ -1,22 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule -_USERNAME=libeufin-nexus -_GROUPNAME=libeufin-nexus - -# For now, we only support postgres -dbc_dbtypes=pgsql -dbc_dbuser=${_USERNAME} -dbc_first_version="0.9.2" - -dbc_authmethod_user=ident -dbc_authmethod_admin=ident - -if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/config.pgsql - dbc_go libeufin-nexus "$@" -fi - -db_stop diff --git a/debian/libeufin-nexus.postinst b/debian/libeufin-nexus.postinst @@ -21,12 +21,6 @@ nexus_user=libeufin-nexus nexus_group=libeufin-nexus libeufin_home=/var/lib/libeufin -# Set permissions for sqlite3 file -# (for when we support sqlite3 in the future) -dbc_dbfile_owner="${_USERNAME}:${_GROUPNAME}" -dbc_dbfile_perms="0600" -dbc_first_version="0.9.2" - . /usr/share/debconf/confmodule case "${1}" in @@ -41,13 +35,6 @@ case "${1}" in adduser --quiet --system --no-create-home --ingroup $nexus_group --home $libeufin_home $nexus_user fi - # Set up postgres database (needs dbconfig-pgsql package) - if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/postinst.pgsql - dbc_pgsql_createdb_encoding="UTF8" - dbc_go libeufin-nexus "$@" - fi - ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/libeufin-nexus.prerm b/debian/libeufin-nexus.prerm @@ -6,16 +6,4 @@ if [ -d /run/systemd/system ] && [ "$1" = remove ]; then deb-systemd-invoke stop 'libeufin-nexus.service' >/dev/null || true fi -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -. /usr/share/dbconfig-common/dpkg/prerm - -if [ -f /usr/share/dbconfig-common/dpkg/prerm.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/prerm.pgsql - dbc_go libeufin-nexus "$@" -fi - - -db_stop exit 0 diff --git a/debian/libeufin-sandbox.config b/debian/libeufin-sandbox.config @@ -1,22 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule -_USERNAME=libeufin-sandbox -_GROUPNAME=libeufin-sandbox - -# For now, we only support postgres -dbc_dbtypes=pgsql -dbc_dbuser=${_USERNAME} -dbc_first_version="0.9.2" - -dbc_authmethod_user=ident -dbc_authmethod_admin=ident - -if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/config.pgsql - dbc_go libeufin-sandbox "$@" -fi - -db_stop diff --git a/debian/libeufin-sandbox.install b/debian/libeufin-sandbox.install @@ -1,7 +1,4 @@ debian/etc/* etc/ -# Files needed by dbconf -debian/db/install-sandbox/* usr/share/dbconfig-common/scripts/libeufin-sandbox/install/ - # Install the SPA + JS config: debian/usr/share/libeufin/* usr/share/libeufin/ diff --git a/debian/libeufin-sandbox.postinst b/debian/libeufin-sandbox.postinst @@ -21,12 +21,6 @@ sandbox_user=libeufin-sandbox sandbox_group=libeufin-sandbox libeufin_home=/var/lib/libeufin -# Set permissions for sqlite3 file -# (for when we support sqlite3 in the future) -dbc_dbfile_owner="${_USERNAME}:${_GROUPNAME}" -dbc_dbfile_perms="0600" -dbc_first_version="0.9.2" - . /usr/share/debconf/confmodule case "${1}" in @@ -40,19 +34,9 @@ case "${1}" in if ! getent passwd $sandbox_user >/dev/null; then adduser --quiet --system --no-create-home --ingroup $sandbox_group --home $libeufin_home $sandbox_user fi - - # Set up postgres database (needs dbconfig-pgsql package) - if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/postinst.pgsql - dbc_pgsql_createdb_encoding="UTF8" - dbc_go libeufin-sandbox "$@" - fi - ;; - abort-upgrade|abort-remove|abort-deconfigure) ;; - *) echo "postinst called with unknown argument \`${1}'" >&2 exit 1 diff --git a/debian/libeufin-sandbox.prerm b/debian/libeufin-sandbox.prerm @@ -6,16 +6,4 @@ if [ -d /run/systemd/system ] && [ "$1" = remove ]; then deb-systemd-invoke stop 'libeufin-sandbox.service' >/dev/null || true fi -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -. /usr/share/dbconfig-common/dpkg/prerm - -if [ -f /usr/share/dbconfig-common/dpkg/prerm.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/prerm.pgsql - dbc_go libeufin-sandbox "$@" -fi - - -db_stop exit 0