gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: fix #7762 (remove dbconfig from libeuf


From: gnunet
Subject: [libeufin] branch master updated: fix #7762 (remove dbconfig from libeufin packages)
Date: Fri, 04 Aug 2023 22:05:15 +0200

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

grothoff pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 8abd1a6a fix #7762 (remove dbconfig from libeufin packages)
8abd1a6a is described below

commit 8abd1a6a1a6e7632163f4aa71fd1a1897e4932e2
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Fri Aug 4 22:04:59 2023 +0200

    fix #7762 (remove dbconfig from libeufin packages)
---
 debian/control                   |  2 --
 debian/db/install-nexus/pgsql    | 34 ----------------------------------
 debian/db/install-sandbox/pgsql  | 36 ------------------------------------
 debian/libeufin-nexus.config     | 22 ----------------------
 debian/libeufin-nexus.postinst   | 13 -------------
 debian/libeufin-nexus.prerm      | 12 ------------
 debian/libeufin-sandbox.config   | 22 ----------------------
 debian/libeufin-sandbox.install  |  3 ---
 debian/libeufin-sandbox.postinst | 16 ----------------
 debian/libeufin-sandbox.prerm    | 12 ------------
 10 files changed, 172 deletions(-)

diff --git a/debian/control b/debian/control
index 70967a15..9435eb51 100644
--- 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
deleted file mode 100755
index 19351b22..00000000
--- a/debian/db/install-nexus/pgsql
+++ /dev/null
@@ -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
deleted file mode 100755
index 9c0be24b..00000000
--- a/debian/db/install-sandbox/pgsql
+++ /dev/null
@@ -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
deleted file mode 100644
index cdd0833e..00000000
--- a/debian/libeufin-nexus.config
+++ /dev/null
@@ -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
index bbe059c4..df569dee 100644
--- 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
index 68a1e18f..efd3238b 100644
--- 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
deleted file mode 100644
index 7b870c3c..00000000
--- a/debian/libeufin-sandbox.config
+++ /dev/null
@@ -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
index 37cacd06..565e9196 100644
--- 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
index 2df6a516..227e7d26 100644
--- 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
index ed430c4a..6a97b16c 100644
--- 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

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