summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog67
-rw-r--r--debian/control39
-rwxr-xr-xdebian/db/install/pgsql38
-rw-r--r--debian/etc/sync/secrets/sync-db.secret.conf2
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/sync-httpd.config22
-rw-r--r--debian/sync-httpd.install4
-rw-r--r--debian/sync-httpd.postinst22
-rw-r--r--debian/sync-httpd.postrm7
-rw-r--r--debian/sync-httpd.preinst29
-rw-r--r--debian/sync-httpd.prerm11
-rw-r--r--debian/sync-httpd.service8
12 files changed, 108 insertions, 143 deletions
diff --git a/debian/changelog b/debian/changelog
index 82bcd1f..ca93df4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,70 @@
+sync (0.10.1) unstable; urgency=low
+
+ * Updating man page submodule.
+
+ -- Christian Grothoff <grothoff@gnu.org> Fri, 12 Apr 2024 09:50:12 +0200
+
+sync (0.10.0) unstable; urgency=low
+
+ * Fix spelling issues
+ * Make drop.sql more robust to future changes
+
+ -- Christian Grothoff <grothoff@gnu.org> Tue, 9 Apr 2024 09:50:12 +0200
+
+sync (0.9.4-2) unstable; urgency=low
+
+ * v0.9.4a bugfix release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Mon, 3 Mar 2024 21:50:12 +0200
+
+sync (0.9.4-1) unstable; urgency=low
+
+ * Actual v0.9.4 release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Sat, 10 Feb 2024 03:50:12 +0200
+
+sync (0.9.4) unstable; urgency=low
+
+ * First work towards packaging v0.9.4.
+
+ -- Christian Grothoff <grothoff@gnu.org> Sun, 21 Jan 2024 23:50:12 +0200
+
+sync (0.9.3-1) unstable; urgency=low
+
+ * Actual v0.9.3 release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Wed, 27 Sep 2023 03:50:12 +0200
+
+sync (0.9.3) unstable; urgency=low
+
+ * First work towards packaging v0.9.3.
+
+ -- Christian Grothoff <grothoff@gnu.org> Thu, 7 Sep 2023 23:50:12 +0200
+
+sync (0.9.2) unstable; urgency=low
+
+ * Packaging latest release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Tue, 21 Feb 2023 13:50:12 +0200
+
+sync (0.9.1) unstable; urgency=low
+
+ * Packaging latest release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Tue, 17 Jan 2023 11:50:12 +0200
+
+sync (0.9.0) unstable; urgency=low
+
+ * Packaging official release.
+
+ -- Christian Grothoff <grothoff@gnu.org> Sat, 5 Nov 2022 09:50:12 +0200
+
+sync (0.8.99-2) unstable; urgency=low
+
+ * Packaging latest pre-release from Git.
+
+ -- Christian Grothoff <grothoff@gnu.org> Mon, 26 Sep 2022 09:50:12 +0200
+
sync (0.8.99) unstable; urgency=low
* Updating to latest pre-release from Git.
diff --git a/debian/control b/debian/control
index a8149e8..4f02003 100644
--- a/debian/control
+++ b/debian/control
@@ -8,10 +8,10 @@ Build-Depends:
autopoint,
debhelper-compat (= 12),
gettext,
- libgnunet-dev (>=0.17.1),
- libtalerexchange-dev (>= 0.8.99),
- libtalermerchant-dev (>= 0.8.99),
- libpq-dev (>=13.0),
+ libgnunet-dev (>=0.21),
+ libtalerexchange-dev (>= 0.10.2),
+ libtalermerchant-dev (>= 0.10.2),
+ libpq-dev (>=14.0),
pkg-config,
po-debconf,
zlib1g-dev,
@@ -31,36 +31,45 @@ Depends:
${misc:Depends},
${shlibs:Depends}
Description: libraries to talk to a Sync provider.
+ .
+ A Sync provider enables a GNU Taler wallet to store
+ an encrypted backup (possibly in return for payment).
+ The C library in this package implements the protocol
+ to talk to a Sync provider.
Package: sync-httpd
Architecture: any
Pre-Depends:
${misc:Pre-Depends}
Depends:
- libtalerexchange (>= 0.8.99),
- libtalermerchant (>= 0.8.99),
+ libtalerexchange (>= 0.10.2),
+ libtalermerchant (>= 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)
+ postgresql (>=14.0),
+ apache2 | nginx | httpd
Description: GNU Taler's encrypted backup store.
+ .
+ A Sync provider enables a GNU Taler wallet to store
+ an encrypted backup (possibly in return for payment).
+ This is the HTTP(S) REST backend that a Sync provider
+ must run to implement the protocol server-side.
Package: libsync-dev
Section: libdevel
Architecture: any
Depends:
- libtalermerchant-dev (>= 0.8.99),
- libtalerexchange-dev (>= 0.8.99),
- libgnunet-dev (>=0.17.1),
+ libtalermerchant-dev (>= 0.10.2),
+ libtalerexchange-dev (>= 0.10.2),
+ libgnunet-dev (>=0.21),
${misc:Depends},
${shlibs:Depends}
-Description: libraries to talk to a Sync provider (development)
+Description: libraries to talk to a Sync provider (development).
.
- This package contains the development files.
+ This package contains the development files for
+ libsync.
diff --git a/debian/db/install/pgsql b/debian/db/install/pgsql
deleted file mode 100755
index 47c2dc7..0000000
--- a/debian/db/install/pgsql
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-set -eu
-
-conf_sync_db=/etc/sync/secrets/sync-db.secret.conf
-conf_override=/etc/sync/override.conf
-
-# Get database settings from dbconfig-common and write sync configuration files.
-if [ -f /etc/dbconfig-common/sync-httpd.conf ]; then
- . /etc/dbconfig-common/sync-httpd.conf
- case "$dbc_dbtype" in
- pgsql)
- echo -e "# Config file auto-generated by Debian.\n[sync]\nDB=postgres\n\n" > \
- $conf_override
- # We assume ident auth here. We might support password auth later.
- echo -e "# Config file auto-generated by Debian.\n[syncdb-postgres]\nCONFIG=postgres:///${dbc_dbname}\n\n" > \
- $conf_sync_db
-
- # Allow the taler-merchant-httpd user to create schemas, needed by dbinit
- echo "GRANT CREATE ON DATABASE \"${dbc_dbname}\" TO \"sync-httpd\";" | sudo -u postgres psql -f -
- # Run database initialization logic
- sudo -u sync-httpd sync-dbinit -c /etc/sync/sync.conf
- ;;
- sqlite3)
- # Later: use something like:
- # sqlite:///$DATA_DIR/sync.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/sync/secrets/sync-db.secret.conf b/debian/etc/sync/secrets/sync-db.secret.conf
index b6ad31e..c7e3f12 100644
--- a/debian/etc/sync/secrets/sync-db.secret.conf
+++ b/debian/etc/sync/secrets/sync-db.secret.conf
@@ -2,7 +2,7 @@
# Typically, there should only be a single line here, of the form:
-CONFIG=postgres:///DATABASE
+CONFIG=postgres:///taler-sync
# The details of the URI depend on where the database lives and how
# access control was configured.
diff --git a/debian/rules b/debian/rules
index ed2f6c2..fd158ef 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,7 @@ include /usr/share/dpkg/architecture.mk
dh ${@}
override_dh_builddeb:
- dh_builddeb -- -Zgzip
+ dh_builddeb -- -Zgzip
override_dh_auto_configure-arch:
dh_auto_configure -- --disable-rpath --with-microhttpd=yes $(shell dpkg-buildflags --export=configure)
diff --git a/debian/sync-httpd.config b/debian/sync-httpd.config
deleted file mode 100644
index 36e67d1..0000000
--- a/debian/sync-httpd.config
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /usr/share/debconf/confmodule
-
-_USERNAME=sync-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 sync-httpd "$@"
-fi
-
-db_stop
diff --git a/debian/sync-httpd.install b/debian/sync-httpd.install
index 17e4ce9..a764eed 100644
--- a/debian/sync-httpd.install
+++ b/debian/sync-httpd.install
@@ -3,10 +3,8 @@ usr/lib/*/libsyncdb.so.*
usr/lib/*/sync/libsync_plugin*.*
usr/share/sync/sql/*
usr/share/sync/config.d/*
+usr/share/man/man1/sync-dbconfig.1
usr/share/man/man1/sync-dbinit.1
usr/share/man/man1/sync-httpd.1
debian/etc/* /etc/
-
-# Files needed by dbconf
-debian/db/install/* usr/share/dbconfig-common/scripts/sync-httpd/install/
diff --git a/debian/sync-httpd.postinst b/debian/sync-httpd.postinst
index 9eaddab..8fcf255 100644
--- a/debian/sync-httpd.postinst
+++ b/debian/sync-httpd.postinst
@@ -22,11 +22,6 @@ SYNC_HOME="/var/lib/sync/"
_USERNAME=sync-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
@@ -36,19 +31,12 @@ configure)
adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${SYNC_HOME} ${_USERNAME}
fi
- if ! dpkg-statoverride --list /etc/sync/secrets/sync-db.secret.conf >/dev/null 2>&1; then
- dpkg-statoverride --add --update \
- sync-httpd root 460 \
- /etc/sync/secrets/sync-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 sync-httpd "$@"
+ if ! dpkg-statoverride --list /etc/sync/secrets/sync-db.secret.conf >/dev/null 2>&1;
+ then
+ dpkg-statoverride --add --update \
+ sync-httpd root 640 \
+ /etc/sync/secrets/sync-db.secret.conf
fi
-
;;
abort-upgrade | abort-remove | abort-deconfigure) ;;
diff --git a/debian/sync-httpd.postrm b/debian/sync-httpd.postrm
index 79934a8..60aa9a5 100644
--- a/debian/sync-httpd.postrm
+++ b/debian/sync-httpd.postrm
@@ -6,15 +6,14 @@ 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 sync-httpd "$@"
-fi
+_USERNAME=sync-httpd
case "${1}" in
purge)
rm -rf /var/lib/sync/httpd/
rm -f /etc/sync/override.conf
+ dpkg-statoverride --remove /etc/sync/secrets/sync-db.secret.conf
+ deluser --system --quiet ${_USERNAME} || true
;;
remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear)
;;
diff --git a/debian/sync-httpd.preinst b/debian/sync-httpd.preinst
deleted file mode 100644
index 9588b73..0000000
--- a/debian/sync-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 sync-httpd sync-httpd/pgsql/method select Unix socket | debconf-set-selections
-echo sync-httpd sync-httpd/pgsql/authmethod-user select ident | debconf-set-selections
-echo sync-httpd sync-httpd/pgsql/app-pass password | debconf-set-selections
-
-exit 0
diff --git a/debian/sync-httpd.prerm b/debian/sync-httpd.prerm
index 0c134b2..317d020 100644
--- a/debian/sync-httpd.prerm
+++ b/debian/sync-httpd.prerm
@@ -6,15 +6,4 @@ if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
deb-systemd-invoke stop 'sync-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 sync-httpd "$@"
-fi
-
-db_stop
exit 0
diff --git a/debian/sync-httpd.service b/debian/sync-httpd.service
index 2c97c37..74fb8b4 100644
--- a/debian/sync-httpd.service
+++ b/debian/sync-httpd.service
@@ -4,8 +4,12 @@ Description=Sync backup backend
[Service]
User=sync-httpd
Type=simple
-Restart=on-failure
-ExecStart=/usr/bin/sync-httpd -c /etc/sync/sync.conf
+Restart=always
+RestartMode=direct
+RestartSec=1s
+RestartPreventExitStatus=2 3 4 5 6 9
+RuntimeMaxSec=3600s
+ExecStart=/usr/bin/sync-httpd -c /etc/sync/sync.conf -L INFO
[Install]
WantedBy=multi-user.target