libeufin

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

commit eba49fcf47c236b3982c9bdfb79c12c5a24e1c4d
parent c3c00fed691b64dea4eb7f92c99a232ae370a48f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  4 Mar 2023 13:36:15 +0100

split libeufin package

Diffstat:
Mdebian/control | 28+++++++++++++++++++++++++++-
Adebian/db/install-nexus/pgsql | 34++++++++++++++++++++++++++++++++++
Adebian/db/install-sandbox/pgsql | 36++++++++++++++++++++++++++++++++++++
Ddebian/db/install/pgsql | 39---------------------------------------
Adebian/libeufin-common.install | 1+
Adebian/libeufin-nexus.config | 22++++++++++++++++++++++
Adebian/libeufin-nexus.install | 2++
Rdebian/libeufin.libeufin-nexus.service -> debian/libeufin-nexus.libeufin-nexus.service | 0
Adebian/libeufin-nexus.postinst | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adebian/libeufin-nexus.postrm | 30++++++++++++++++++++++++++++++
Adebian/libeufin-nexus.prerm | 21+++++++++++++++++++++
Adebian/libeufin-sandbox.config | 22++++++++++++++++++++++
Adebian/libeufin-sandbox.install | 7+++++++
Rdebian/libeufin.libeufin-sandbox.service -> debian/libeufin-sandbox.libeufin-sandbox.service | 0
Adebian/libeufin-sandbox.postinst | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adebian/libeufin-sandbox.postrm | 30++++++++++++++++++++++++++++++
Adebian/libeufin-sandbox.prerm | 21+++++++++++++++++++++
Ddebian/libeufin.config | 24------------------------
Ddebian/libeufin.install | 7-------
Ddebian/libeufin.postinst | 79-------------------------------------------------------------------------------
Ddebian/libeufin.postrm | 31-------------------------------
Ddebian/libeufin.prerm | 23-----------------------
Ddebian/libeufin.tmpfiles | 3---
Mdebian/rules | 18++++++++++++++++--
24 files changed, 397 insertions(+), 209 deletions(-)

diff --git a/debian/control b/debian/control @@ -11,15 +11,41 @@ Standards-Version: 4.1.0 Vcs-Git: https://git.taler.net/libeufin.git Homepage: https://taler.net/ -Package: libeufin +Package: libeufin-common +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, + python3 (>= 3.7), + python3-click, + python3-requests, + ${misc:Depends} +Recommends: +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, + libeufin-common, apache2 | nginx | httpd, ${misc:Depends} Recommends: Description: Software package to access FinTS/EBICS based core banking systems. + + +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, + libeufin-common, + apache2 | nginx | httpd, + ${misc:Depends} +Recommends: +Description: Software package to provide a reference + implementation of a FinTS/EBICS based core banking system. diff --git a/debian/db/install-nexus/pgsql b/debian/db/install-nexus/pgsql @@ -0,0 +1,34 @@ +#!/bin/bash + +set -eu + +# Get database settings from dbconfig-common and write libeufin configuration files. +if [ -f /etc/dbconfig-common/taler-libeufin.conf ]; then + . /etc/dbconfig-common/taler-libeufin.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:postgres:///${dbc_dbname}\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 @@ -0,0 +1,36 @@ +#!/bin/bash + +set -eu + +# Get database settings from dbconfig-common and write libeufin configuration files. +if [ -f /etc/dbconfig-common/taler-libeufin.conf ]; then + . /etc/dbconfig-common/taler-libeufin.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:postgres:///${dbc_dbname}\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/db/install/pgsql b/debian/db/install/pgsql @@ -1,39 +0,0 @@ -#!/bin/bash - -set -eu - -# Get database settings from dbconfig-common and write libeufin configuration files. -if [ -f /etc/dbconfig-common/taler-libeufin.conf ]; then - . /etc/dbconfig-common/taler-libeufin.conf - case "$dbc_dbtype" in - pgsql) - # We assume ident auth here. We might support password auth later. - echo -e "LIBEUFIN_NEXUS_PORT=5017" >> \ - /etc/libeufin/nexus.env - echo -e "LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:postgres:///${dbc_dbname}\n\n" >> \ - /etc/libeufin/nexus.env - echo -e "LIBEUFIN_SANDBOX_PORT=5016" >> \ - /etc/libeufin/sandbox.env - echo -e "LIBEUFIN_SANDBOX_DB_CONNECTION=jdbc:postgres:///${dbc_dbname}\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 \"${dbc_dbname}\";" | 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-common.install b/debian/libeufin-common.install @@ -0,0 +1 @@ + diff --git a/debian/libeufin-nexus.config b/debian/libeufin-nexus.config @@ -0,0 +1,22 @@ +#!/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.install b/debian/libeufin-nexus.install @@ -0,0 +1,2 @@ +# Files needed by dbconf +debian/db/install-nexus/* usr/share/dbconfig-common/scripts/libeufin-nexus/install/ diff --git a/debian/libeufin.libeufin-nexus.service b/debian/libeufin-nexus.libeufin-nexus.service diff --git a/debian/libeufin-nexus.postinst b/debian/libeufin-nexus.postinst @@ -0,0 +1,64 @@ +#!/bin/bash + +set -e + +if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true +fi +if [ "$1" = "remove" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper mask 'libeufin-nexus.service' >/dev/null || true + fi +fi + +if [ "$1" = "purge" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper purge 'libeufin-nexus.service' >/dev/null || true + deb-systemd-helper unmask 'libeufin-nexus.service' >/dev/null || true + fi +fi +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 + configure) + + if ! getent group $nexus_group >/dev/null; then + addgroup --quiet --system $nexus_group + fi + + # Create users if needed + if ! getent passwd $nexus_user >/dev/null; then + 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) + ;; + + *) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/libeufin-nexus.postrm b/debian/libeufin-nexus.postrm @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.pgsql + dbc_go libeufin-nexus "$@" +fi + +case "${1}" in +purge) +# TODO: anything to clean up? Like: +# rm -f /etc/libeufin-db.conf + ;; +remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) + ;; + + *) + echo "postrm called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/libeufin-nexus.prerm b/debian/libeufin-nexus.prerm @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +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 @@ -0,0 +1,22 @@ +#!/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 @@ -0,0 +1,7 @@ +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.libeufin-sandbox.service b/debian/libeufin-sandbox.libeufin-sandbox.service diff --git a/debian/libeufin-sandbox.postinst b/debian/libeufin-sandbox.postinst @@ -0,0 +1,64 @@ +#!/bin/bash + +set -e + +if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true +fi +if [ "$1" = "remove" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper mask 'libeufin-sandbox.service' >/dev/null || true + fi +fi + +if [ "$1" = "purge" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper purge 'libeufin-sandbox.service' >/dev/null || true + deb-systemd-helper unmask 'libeufin-sandbox.service' >/dev/null || true + fi +fi +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 + configure) + + if ! getent group $sandbox_group >/dev/null; then + addgroup --quiet --system $sandbox_group + fi + + # Create users if needed + 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 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/libeufin-sandbox.postrm b/debian/libeufin-sandbox.postrm @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.pgsql + dbc_go libeufin-sandbox "$@" +fi + +case "${1}" in +purge) +# TODO: anything to clean up? Like: +# rm -f /etc/libeufin-db.conf + ;; +remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) + ;; + + *) + echo "postrm called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/libeufin-sandbox.prerm b/debian/libeufin-sandbox.prerm @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +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 diff --git a/debian/libeufin.config b/debian/libeufin.config @@ -1,24 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -_USERNAME=libeufin -_GROUPNAME=libeufin - -# 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 "$@" - dbc_go libeufin-sandbox "$@" -fi - -db_stop diff --git a/debian/libeufin.install b/debian/libeufin.install @@ -1,7 +0,0 @@ -debian/etc/* etc/ - -# Files needed by dbconf -debian/db/install/* usr/share/dbconfig-common/scripts/libeufin/install/ - -# Install the SPA + JS config: -debian/usr/share/libeufin/* usr/share/libeufin/ diff --git a/debian/libeufin.postinst b/debian/libeufin.postinst @@ -1,79 +0,0 @@ -#!/bin/bash - -set -e - -if [ -d /run/systemd/system ]; then - systemctl --system daemon-reload >/dev/null || true -fi -if [ "$1" = "remove" ]; then - if [ -x "/usr/bin/deb-systemd-helper" ]; then - deb-systemd-helper mask 'libeufin-nexus.service' >/dev/null || true - deb-systemd-helper mask 'libeufin-sandbox.service' >/dev/null || true - fi -fi - -if [ "$1" = "purge" ]; then - if [ -x "/usr/bin/deb-systemd-helper" ]; then - deb-systemd-helper purge 'libeufin-nexus.service' >/dev/null || true - deb-systemd-helper purge 'libeufin-sandbox.service' >/dev/null || true - deb-systemd-helper unmask 'libeufin-nexus.service' >/dev/null || true - deb-systemd-helper unmask 'libeufin-sandbox.service' >/dev/null || true - fi -fi -nexus_user=libeufin-nexus -sandbox_user=libeufin-sandbox -nexus_group=libeufin-nexus -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 - configure) - - if ! getent group $nexus_group >/dev/null; then - addgroup --quiet --system $nexus_group - fi - - if ! getent group $sandbox_group >/dev/null; then - addgroup --quiet --system $sandbox_group - fi - - # Create users if needed - if ! getent passwd $nexus_user >/dev/null; then - adduser --quiet --system --no-create-home --ingroup $nexus_group --home $libeufin_home $nexus_user - fi - - # Create users if needed - 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-nexus "$@" - dbc_go libeufin-sandbox "$@" - fi - - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/libeufin.postrm b/debian/libeufin.postrm @@ -1,31 +0,0 @@ -#!/bin/sh - -set -e - -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi - -if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then - . /usr/share/dbconfig-common/dpkg/postrm.pgsql - dbc_go libeufin-nexus "$@" - dbc_go libeufin-sandbox "$@" -fi - -case "${1}" in -purge) -# TODO: anything to clean up? Like: -# rm -f /etc/libeufin-db.conf - ;; -remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) - ;; - - *) - echo "postrm called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/libeufin.prerm b/debian/libeufin.prerm @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e - -if [ -d /run/systemd/system ] && [ "$1" = remove ]; then - deb-systemd-invoke stop 'libeufin-nexus.service' >/dev/null || true - 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-nexus "$@" - dbc_go libeufin-sandbox "$@" -fi - - -db_stop -exit 0 diff --git a/debian/libeufin.tmpfiles b/debian/libeufin.tmpfiles @@ -1,3 +0,0 @@ -#Type Path Mode UID GID Age Argument -d /var/lib/libeufin/sandbox 0700 libeufin-sandbox libeufin-sandbox - - -d /var/lib/libeufin/nexus 0700 libeufin-nexus libeufin-nexus - - diff --git a/debian/rules b/debian/rules @@ -43,12 +43,26 @@ override_dh_install: dh_install # Needs to be called manually for debhelper-compat < 13 dh_installtmpfiles +# Reorganize files + mkdir -p debian/libeufin-nexus/usr/share/libeufin/lib/ + mv debian/libeufin-common/usr/share/libeufin/lib/nexus-*.jar \ + debian/libeufin-nexus/usr/share/libeufin/lib/ + mkdir -p debian/libeufin-nexus/usr/bin/ + mv debian/libeufin-common/usr/bin/libeufin-nexus \ + debian/libeufin-nexus/usr/bin/ + mkdir -p debian/libeufin-sandbox/usr/share/libeufin/lib/ + mv debian/libeufin-common/usr/share/libeufin/lib/sandbox-*.jar \ + debian/libeufin-sandbox/usr/share/libeufin/lib/ + mkdir -p debian/libeufin-sandbox/usr/bin/ + mv debian/libeufin-common/usr/bin/libeufin-sandbox \ + debian/libeufin-sandbox/usr/bin/ + rm -rf debian/libeufin/ override_dh_installsystemd: # Need to specify units manually, since we have multiple # and dh_installsystemd by default only looks for "<package>.service". - dh_installsystemd -plibeufin --name=libeufin-nexus --no-start --no-enable - dh_installsystemd -plibeufin --name=libeufin-sandbox --no-start --no-enable + dh_installsystemd -plibeufin-nexus --name=libeufin-nexus --no-start --no-enable + dh_installsystemd -plibeufin-sandbox --name=libeufin-sandbox --no-start --no-enable # final invocation to generate daemon reload dh_installsystemd