summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/anastasis-httpd.config14
-rw-r--r--debian/anastasis-httpd.install11
-rw-r--r--debian/anastasis-httpd.postinst18
-rw-r--r--debian/anastasis-httpd.postrm10
-rw-r--r--debian/anastasis-httpd.preinst29
-rw-r--r--debian/anastasis-httpd.prerm11
-rw-r--r--debian/anastasis-httpd.service2
-rw-r--r--debian/changelog44
-rw-r--r--debian/control22
-rwxr-xr-xdebian/db/install/pgsql38
-rw-r--r--debian/etc/anastasis/secrets/anastasis-db.secret.conf2
11 files changed, 72 insertions, 129 deletions
diff --git a/debian/anastasis-httpd.config b/debian/anastasis-httpd.config
index 97f57bc..97d5101 100644
--- a/debian/anastasis-httpd.config
+++ b/debian/anastasis-httpd.config
@@ -6,17 +6,3 @@ set -e
_USERNAME=anastasis-httpd
_GROUPNAME=www-data
-
-# For now, we only support postgres
-dbc_dbtypes=pgsql
-dbc_dbuser=${_USERNAME}
-
-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 anastasis-httpd "$@"
-fi
-
-db_stop
diff --git a/debian/anastasis-httpd.install b/debian/anastasis-httpd.install
index 2de9453..6594f28 100644
--- a/debian/anastasis-httpd.install
+++ b/debian/anastasis-httpd.install
@@ -3,7 +3,9 @@ usr/lib/*/anastasis/
usr/lib/*/libanastasisauthorization.*
usr/lib/*/libanastasisdb.*
usr/lib/*/libanastasiseufin.so.*
-usr/share/man/man5/*
+usr/share/man/man5/anastasis.conf.5
+usr/share/man/man1/anastasis-dbconfig.1
+usr/share/man/man1/anastasis-dbinit.1
usr/share/man/man1/anastasis-httpd.1
usr/share/man/man1/anastasis-helper-authorization-iban.1
usr/share/man/man1/anastasis-config.1
@@ -11,6 +13,7 @@ usr/share/anastasis/*
usr/share/anastasis/sql/*
usr/share/anastasis/config.d/*
debian/etc/* /etc/
-
-# Files needed by dbconf
-debian/db/install/* usr/share/dbconfig-common/scripts/anastasis-httpd/install/
+# Terms of service / privacy policy templates
+usr/share/anastasis/terms/*.rst
+# Translations of ToS/PP
+usr/share/locale/*/LC_MESSAGES/*.po
diff --git a/debian/anastasis-httpd.postinst b/debian/anastasis-httpd.postinst
index 428d228..1dd41f4 100644
--- a/debian/anastasis-httpd.postinst
+++ b/debian/anastasis-httpd.postinst
@@ -22,33 +22,23 @@ ANASTASIS_HOME="/var/lib/anastasis/"
_USERNAME=anastasis-httpd
_GROUPNAME=www-data
-# Set permissions for sqlite3 file
-# (for when we support sqlite3 in the future)
-dbc_dbfile_owner="${_USERNAME}:${_GROUPNAME}"
-dbc_dbfile_perms="0600"
-
. /usr/share/debconf/confmodule
case "${1}" in
configure)
# Creating taler users if needed
- if ! getent passwd ${_USERNAME} >/dev/null; then
+ if ! getent passwd ${_USERNAME} >/dev/null
+ then
adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${ANASTASIS_HOME} ${_USERNAME}
fi
- if ! dpkg-statoverride --list /etc/anastasis/secrets/anastasis-db.secret.conf >/dev/null 2>&1; then
+ if ! dpkg-statoverride --list /etc/anastasis/secrets/anastasis-db.secret.conf >/dev/null 2>&1
+ then
dpkg-statoverride --add --update \
anastasis-httpd root 460 \
/etc/anastasis/secrets/anastasis-db.secret.conf
fi
- # 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_pgsql_createdb_encoding="UTF8"
- dbc_go anastasis-httpd "$@"
- fi
-
;;
abort-upgrade | abort-remove | abort-deconfigure) ;;
diff --git a/debian/anastasis-httpd.postrm b/debian/anastasis-httpd.postrm
index dae3873..ee84d38 100644
--- a/debian/anastasis-httpd.postrm
+++ b/debian/anastasis-httpd.postrm
@@ -2,19 +2,19 @@
set -e
+_USERNAME=anastasis-httpd
+
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 anastasis-httpd "$@"
-fi
-
case "${1}" in
purge)
rm -rf /var/lib/anastasis/httpd/
rm -f /etc/anastasis/override.conf
+ deluser --system --quiet ${_USERNAME} || true
+ dpkg-statoverride --remove \
+ /etc/anastasis/secrets/anastasis-db.secret.conf || true
;;
remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear)
;;
diff --git a/debian/anastasis-httpd.preinst b/debian/anastasis-httpd.preinst
deleted file mode 100644
index 2d6c261..0000000
--- a/debian/anastasis-httpd.preinst
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# We prevent a few questions from being asked
-# upon installation by specifying defaults. Namely,
-# we want the database to be accessed via Unix domain
-# sockets and password-less.
-
-set -e
-
-# When purging this package after the selections in the preinst have been made,
-# the debconf database is left in an inconsistent state and the package cannot
-# be installed again. This happens because dbconf-common will create a
-# template for these questions with a shared owner. Purging will only delete
-# one of the two templates, leading to a DB state where debconf-set-selections
-# fails. We work around this by manually fixing up the debconf database.
-#
-# Unfortunately we can't do this in "postrm", because during "postrm"
-# the configuration database is locked (even after db_stop).
-#
-# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487300
-if [ -x /usr/share/debconf/fix_db.pl ]; then
- /usr/share/debconf/fix_db.pl || true
-fi
-
-echo anastasis-httpd anastasis-httpd/pgsql/method select Unix socket | debconf-set-selections
-echo anastasis-httpd anastasis-httpd/pgsql/authmethod-user select ident | debconf-set-selections
-echo anastasis-httpd anastasis-httpd/pgsql/app-pass password | debconf-set-selections
-
-exit 0
diff --git a/debian/anastasis-httpd.prerm b/debian/anastasis-httpd.prerm
index c59777c..951f5ac 100644
--- a/debian/anastasis-httpd.prerm
+++ b/debian/anastasis-httpd.prerm
@@ -6,15 +6,4 @@ if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
deb-systemd-invoke stop 'anastasis-httpd.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 anastasis-httpd "$@"
-fi
-
-db_stop
exit 0
diff --git a/debian/anastasis-httpd.service b/debian/anastasis-httpd.service
index bd6919e..372e824 100644
--- a/debian/anastasis-httpd.service
+++ b/debian/anastasis-httpd.service
@@ -5,7 +5,7 @@ Description=Anastasis key recovery backend
User=anastasis-httpd
Type=simple
Restart=on-failure
-ExecStart=/usr/bin/anastasis-httpd -c /etc/anastasis/anastasis.conf
+ExecStart=/usr/bin/anastasis-httpd -c /etc/anastasis/anastasis.conf -L INFO
[Install]
WantedBy=multi-user.target
diff --git a/debian/changelog b/debian/changelog
index e601233..071951f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,47 @@
+anastasis (0.4.2-1) unstable; urgency=low
+
+ * Bump for build with Taler 0.10 release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Fri, 12 Apr 2024 09:50:12 +0200
+
+anastasis (0.4.2) unstable; urgency=low
+
+ * Improve auth scripts, install them with the package
+ * Set default log level to INFO
+ * Make drop.sql more robust to future changes
+
+ -- Christian Grothoff <grothoff@gnu.org> Tue, 9 Apr 2024 09:50:12 +0200
+
+anastasis (0.4.1) unstable; urgency=low
+
+ * Actual v0.4.1 release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Sat, 10 Feb 2024 03:50:12 +0200
+
+anastasis (0.4.0-2) unstable; urgency=low
+
+ * Updates for packaging with GNU Taler v0.9.4.
+
+ -- Christian Grothoff <grothoff@gnu.org> Sun, 21 Jan 2024 23:50:12 +0200
+
+anastasis (0.4.0-1) unstable; urgency=low
+
+ * Actual v0.4.0 release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Wed, 27 Sep 2023 03:50:12 +0200
+
+anastasis (0.4.0) unstable; urgency=low
+
+ * First work towards packaging v0.4.0.
+
+ -- Christian Grothoff <grothoff@gnu.org> Thu, 7 Sep 2023 23:50:12 +0200
+
+anastasis (0.3.2) unstable; urgency=low
+
+ * Official Anastasis 0.3.2 release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Tue, 21 Feb 2023 09:50:12 +0200
+
anastasis (0.3.1) unstable; urgency=low
* Official Anastasis 0.3.1 release.
diff --git a/debian/control b/debian/control
index 3ebc9fc..85865ef 100644
--- a/debian/control
+++ b/debian/control
@@ -8,10 +8,10 @@ Build-Depends:
autopoint,
debhelper-compat (= 12),
gettext,
- libgnunet-dev (>=0.17.0),
- libtalerexchange-dev (>= 0.8.99),
- libtalermerchant-dev (>= 0.8.99),
- libpq-dev (>=13),
+ libgnunet-dev (>=0.21),
+ libtalerexchange-dev (>= 0.10.2),
+ libtalermerchant-dev (>= 0.10.2),
+ libpq-dev (>=14),
libsqlite3-dev (>=3.8),
pkg-config,
po-debconf,
@@ -45,18 +45,16 @@ Architecture: any
Pre-Depends:
${misc:Pre-Depends}
Depends:
- libtalerexchange (>= 0.8.99),
+ libtalerexchange (>= 0.10.2),
libgnutls30 (>= 3.7.1),
adduser,
lsb-base,
netbase,
- sudo,
- apache2 | nginx | httpd,
- dbconfig-pgsql | dbconfig-no-thanks,
${misc:Depends},
${shlibs:Depends}
Recommends:
- postgresql (>=13.0)
+ apache2 | nginx | httpd,
+ postgresql (>=14.0)
Description: GNU's key escrow provider.
.
GNU Anastasis allows users to make backups of their
@@ -89,9 +87,9 @@ Package: libanastasis-dev
Section: libdevel
Architecture: any
Depends:
- libtalermerchant-dev (>= 0.8.99),
- libtalerexchange-dev (>= 0.8.99),
- libgnunet-dev (>=0.17.0),
+ libtalermerchant-dev (>= 0.10.2),
+ libtalerexchange-dev (>= 0.10.2),
+ libgnunet-dev (>=0.21),
${misc:Depends},
${shlibs:Depends}
Description: libraries to talk to a GNU Anastasis provider (development).
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql
deleted file mode 100755
index 08648db..0000000
--- a/debian/db/install/pgsql
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-set -eu
-
-conf_anastasis_db=/etc/anastasis/secrets/anastasis-db.secret.conf
-conf_override=/etc/anastasis/override.conf
-
-# Get database settings from dbconfig-common and write anastasis configuration files.
-if [ -f /etc/dbconfig-common/anastasis-httpd.conf ]; then
- . /etc/dbconfig-common/anastasis-httpd.conf
- case "$dbc_dbtype" in
- pgsql)
- echo -e "# Config file auto-generated by Debian.\n[anastasis]\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" > \
- $conf_anastasis_db
-
- # Allow the taler-merchant-httpd user to create schemas, needed by dbinit
- echo "GRANT CREATE ON DATABASE \"${dbc_dbname}\" TO \"anastasis-httpd\";" | sudo -u postgres psql -f -
- # Run database initialization logic
- sudo -u anastasis-httpd anastasis-dbinit -c /etc/anastasis/anastasis.conf
- ;;
- sqlite3)
- # Later: use something like:
- # sqlite:///$DATA_DIR/anastasis.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/etc/anastasis/secrets/anastasis-db.secret.conf b/debian/etc/anastasis/secrets/anastasis-db.secret.conf
index 8f9fb54..512366d 100644
--- a/debian/etc/anastasis/secrets/anastasis-db.secret.conf
+++ b/debian/etc/anastasis/secrets/anastasis-db.secret.conf
@@ -1,3 +1,3 @@
[stasis-postgres]
#The connection string the plugin has to use for connecting to the database
-CONFIG = postgres:///anastasis
+# CONFIG = postgres:///anastasis