aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/control2
-rw-r--r--debian/db/install/pgsql2
-rw-r--r--debian/db/upgrade/pgsql2
-rw-r--r--debian/etc/taler-exchange-db.conf3
-rw-r--r--debian/etc/taler-exchange.conf2
-rw-r--r--debian/etc/taler-wire.conf1
-rw-r--r--debian/taler-exchange.README.Debian22
-rw-r--r--debian/taler-exchange.config6
-rw-r--r--debian/taler-exchange.install2
-rw-r--r--debian/taler-exchange.postinst58
-rw-r--r--debian/taler-exchange.postrm68
-rw-r--r--debian/taler-exchange.prerm5
12 files changed, 59 insertions, 114 deletions
diff --git a/debian/control b/debian/control
index 1658990c4..909c4dbaa 100644
--- a/debian/control
+++ b/debian/control
@@ -65,7 +65,7 @@ Section: libdevel
Architecture: any
Depends:
libtalerexchange (= ${binary:Version}),
- libgnunet-dev (>=1:0.14.0),
+ libgnunet-dev (>=0.14.0),
libgcrypt20-dev (>=1.6),
libmicrohttpd-dev (>=0.9.33),
${misc:Depends}
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql
deleted file mode 100644
index 0740e0d1d..000000000
--- a/debian/db/install/pgsql
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-taler-exchange-dbinit -c /etc/taler.conf
diff --git a/debian/db/upgrade/pgsql b/debian/db/upgrade/pgsql
deleted file mode 100644
index 0740e0d1d..000000000
--- a/debian/db/upgrade/pgsql
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-taler-exchange-dbinit -c /etc/taler.conf
diff --git a/debian/etc/taler-exchange-db.conf b/debian/etc/taler-exchange-db.conf
deleted file mode 100644
index b894671d5..000000000
--- a/debian/etc/taler-exchange-db.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-[taler-exchangdb-postgres]
-
-CONFIG = postgres:///taler-exchange
diff --git a/debian/etc/taler-exchange.conf b/debian/etc/taler-exchange.conf
index 4a8069598..2b304aed3 100644
--- a/debian/etc/taler-exchange.conf
+++ b/debian/etc/taler-exchange.conf
@@ -1,5 +1,3 @@
-@INLINE@ /etc/taler-exchange-db.conf
-
[PATHS]
# Move runtime data "tmp" directory to /var/lib/taler-exchange/
diff --git a/debian/etc/taler-wire.conf b/debian/etc/taler-wire.conf
index f30fe0778..e69de29bb 100644
--- a/debian/etc/taler-wire.conf
+++ b/debian/etc/taler-wire.conf
@@ -1 +0,0 @@
-@INLINE@ /etc/taler-exchange-db.conf
diff --git a/debian/taler-exchange.README.Debian b/debian/taler-exchange.README.Debian
index 72adb7908..def3ddc9d 100644
--- a/debian/taler-exchange.README.Debian
+++ b/debian/taler-exchange.README.Debian
@@ -1,12 +1,22 @@
taler-exchange
--------------
-Note that the configuration installed in /etc/taler.conf is incomplete and
-that Debian cannot launch an exchange with this minimal template. You must
-setup the currency, denominations and bank account access details before
-launching the Taler exchange can possibly succeed.
+Note that the configuration is incomplete, and that Debian cannot launch an
+exchange with this minimal template. You must:
-In order to start, stop or restart manually the server, use:
+* Configure the Postgres database for the exchange, ideally including
+ remote replication of the database to the auditor.
+* Run taler-exchange-dbinit (also after package upgrades).
+* Edit /etc/taler-exchange.conf to must setup the currency and denominations
+ details.
+* Edit /etc/taler-wire.conf to provide details about the bank account access.
+
+None of these are done by the Debian package because we cannot provide the
+required complete configuration details.
+
+
+Once you have done this, you can use the following commands to start, stop or
+restart the Taler exchange:
# systemctl start taler-exchange
# systemctl stop taler-exchange
@@ -16,7 +26,5 @@ To permanently the exchange whenever the system boots, use:
# systemctl enable taler-exchange
-None of these are done by the Debian package because we cannot provide the
-required complete configuration details.
-- Christian Grothoff <grothoff@gnu.org> Mon 28 Dec 2020 11:37:14 AM CET
diff --git a/debian/taler-exchange.config b/debian/taler-exchange.config
index 1afcf3587..c8ef2b4ff 100644
--- a/debian/taler-exchange.config
+++ b/debian/taler-exchange.config
@@ -22,10 +22,4 @@ db_go
db_input low taler-exchange/groupname || true
db_go
-if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
- . /usr/share/dbconfig-common/dpkg/config.pgsql
- dbc_go taler-exchange "$@"
-fi
-
-
db_stop
diff --git a/debian/taler-exchange.install b/debian/taler-exchange.install
index 028040b3e..eee4a8fc7 100644
--- a/debian/taler-exchange.install
+++ b/debian/taler-exchange.install
@@ -1,6 +1,4 @@
usr/bin/
usr/lib/*/taler/*.so
debian/etc/* etc/
-debian/db/install/* usr/share/dbconfig-common/scripts/taler-exchange/install/
-debian/db/upgrade/* usr/share/dbconfig-common/scripts/taler-exchange/upgrade/
debian/conf/* etc/taler-exchange/
diff --git a/debian/taler-exchange.postinst b/debian/taler-exchange.postinst
index 8256e886a..e2b2ab310 100644
--- a/debian/taler-exchange.postinst
+++ b/debian/taler-exchange.postinst
@@ -55,13 +55,19 @@ case "${1}" in
CONFIG_FILE="/etc/default/taler-exchange"
TALER_HOME="/var/lib/taler-exchange"
- # Creating taler group if needed
+ # Creating taler groups as needed
if ! getent group ${_GROUPNAME} > /dev/null
then
echo -n "Creating new Taler group ${_GROUPNAME}:"
addgroup --quiet --system ${_GROUPNAME}
echo " done."
fi
+ if ! getent group ${_DBGROUPNAME} > /dev/null
+ then
+ echo -n "Creating new Taler group ${_DBGROUPNAME}:"
+ addgroup --quiet --system ${_DBGROUPNAME}
+ echo " done."
+ fi
# Creating taler users if needed
if ! getent passwd ${_EUSERNAME} > /dev/null
@@ -87,14 +93,14 @@ case "${1}" in
then
echo -n "Creating new Taler user ${_WIREUSERNAME}:"
adduser --quiet --system --home ${TALER_HOME}/wire ${_WIREUSERNAME}
- adduser ${_WIREUSERNAME} ${_DBGROUPNAME}
+ adduser --quiet ${_WIREUSERNAME} ${_DBGROUPNAME}
echo " done."
fi
if ! getent passwd ${_AGGRUSERNAME} > /dev/null
then
echo -n "Creating new Taler user ${_AGGRUSERNAME}:"
adduser --quiet --system --home ${TALER_HOME}/aggregator ${_AGGRUSERNAME}
- adduser ${_AGGRUSERNAME} ${_DBGROUPNAME}
+ adduser --quiet ${_AGGRUSERNAME} ${_DBGROUPNAME}
echo " done."
fi
@@ -194,58 +200,26 @@ Restart=on-failure
ExecStart=/usr/bin/taler-exchange-aggregator -c /etc/taler.conf
EOF
- systemctl daemon-reload
-
cp -f "${CONFIG_NEW}" "${CONFIG_FILE}"
+ rm -f "${CONFIG_NEW}"
echo " done."
+ echo -n "Setting up system services "
+
mkdir -p /var/lib/taler-exchange/tmp
- chown root:taler /var/lib/taler-exchange/tmp
+ chown root:${_GROUPNAME} /var/lib/taler-exchange/tmp
chmod 770 /var/lib/taler-exchange/tmp
chmod +s /var/lib/taler-exchange/tmp
- # Setup postgres database (needs dbconfig-pgsql package)
- if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then
- . /usr/share/dbconfig-common/dpkg/postinst.pgsql
- # dbc_dbfile_* should not apply for Postgres, but better be safe...
- dbc_dbfile_owner="${_EUSERNAME}:${_DBGROUPNAME}"
- dbc_dbfile_perms="0660"
- dbc_pgsql_createdb_encoding="UTF8"
- dbc_go taler-exchange "$@"
- fi
- # get database settings from dbconfig-common
- if [ -f /etc/dbconfig-common/taler-exchange.conf ]; then
- . /etc/dbconfig-common/taler-exchange.conf
- case "$dbc_dbtype" in
- pgsql)
- taler-config -c /etc/taler-exchange-db.conf \
- -s "exchangedb-postgres" \
- -o "CONFIG" \
- -V "postgres://$dbc_dbuser:$dbc_dbpass@$dbc_dbserver/$dbc_dbname"
- taler-config -c /etc/taler-exchange-db.conf \
- -s "exchange" \
- -o "DB" \
- -V "postgres"
- chown ${_EUSERNAME}:${_DBGROUPNAME} /etc/taler-exchange-db.conf
- chmod 440 /etc/taler-exchange-db.conf
- ;;
- "")
- ;;
- *)
- echo "Unsupported database type $dbc_type."
- exit 1
- ;;
- esac
- fi
+ systemctl daemon-reload
+
+ echo "done."
# Cleaning
- rm -f "${CONFIG_NEW}"
echo "All done."
-
;;
abort-upgrade|abort-remove|abort-deconfigure)
-
;;
*)
diff --git a/debian/taler-exchange.postrm b/debian/taler-exchange.postrm
index 3843294e0..6fc7c9843 100644
--- a/debian/taler-exchange.postrm
+++ b/debian/taler-exchange.postrm
@@ -29,61 +29,47 @@ nginx_remove() {
fi
}
-if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then
- . /usr/share/dbconfig-common/dpkg/postrm.pgsql
- dbc_go taler-exchange "$@"
+if [ -f /usr/share/debconf/confmodule ];
+then
+ . /usr/share/debconf/confmodule
fi
-
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
- if [ -f /usr/share/debconf/confmodule ]; then
- db_version 2.0
- db_get taler-exchange/reconfigure-webserver
- webservers="$RET"
- for webserver in $webservers; do
- webserver=${webserver%,}
- if [ "$webserver" = "nginx" ] ; then
- nginx_remove
- else
- apache_remove
- fi
- done
- fi
+ db_version 2.0
+ db_get taler-exchange/reconfigure-webserver
+ webservers="$RET"
+ for webserver in $webservers; do
+ webserver=${webserver%,}
+ if [ "$webserver" = "nginx" ] ; then
+ nginx_remove
+ else
+ apache_remove
+ fi
+ done
fi
case "${1}" in
purge)
- if [ -e /usr/share/debconf/confmodule ]
- then
- . /usr/share/debconf/confmodule
- db_version 2.0
+ db_version 2.0
- db_get taler-exchange/eusername
- _EUSERNAME="${RET:-taler-exchange-httpd}"
+ db_get taler-exchange/eusername
+ _EUSERNAME="${RET:-taler-exchange-httpd}"
- db_get taler-exchange/rsecusername
- _RSECUSERNAME="${RET:-taler-exchange-helper-rsa}"
+ db_get taler-exchange/rsecusername
+ _RSECUSERNAME="${RET:-taler-exchange-helper-rsa}"
- db_get taler-exchange/esecusername
- _ESECUSERNAME="${RET:-taler-exchange-helper-eddsa}"
+ db_get taler-exchange/esecusername
+ _ESECUSERNAME="${RET:-taler-exchange-helper-eddsa}"
- db_get taler-exchange/wireusername
- _WIREUSERNAME="${RET:-taler-exchange-wire}"
+ db_get taler-exchange/wireusername
+ _WIREUSERNAME="${RET:-taler-exchange-wire}"
- db_get taler-exchange/aggrusername
- _AGGRUSERNAME="${RET:-taler-exchange-aggregator}"
+ db_get taler-exchange/aggrusername
+ _AGGRUSERNAME="${RET:-taler-exchange-aggregator}"
- db_get taler-exchange/groupname
- _GROUPNAME="${RET:-taler-private}"
- else
- _EUSERNAME="taler-exchange-httpd"
- _RSECUSERNAME="taler-exchange-helper-rsa"
- _ESECUSERNAME="taler-exchange-helper-eddsa"
- _WIREUSERNAME="taler-exchange-wire"
- _AGGRUSERNAME="taler-exchange-aggregator"
- _GROUPNAME="taler-private"
- fi
+ db_get taler-exchange/groupname
+ _GROUPNAME="${RET:-taler-private}"
if pathfind deluser
then
diff --git a/debian/taler-exchange.prerm b/debian/taler-exchange.prerm
index 88a747cb7..d1dd90ed3 100644
--- a/debian/taler-exchange.prerm
+++ b/debian/taler-exchange.prerm
@@ -8,10 +8,5 @@ if [ -f /usr/share/debconf/confmodule ]; then
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 taler-exchange "$@"
-fi
-
db_stop
exit 0 \ No newline at end of file