diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-06-20 23:31:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-06-20 23:31:04 +0200 |
commit | e9e568139d08cfd101e6559a55e50d57dedb2889 (patch) | |
tree | c86438ebbf4e21917fa9c335987f9c1fde8171be | |
parent | aecfe6973db3cf5c9ff2be0aa164eabfa50a60bb (diff) | |
download | anastasis-e9e568139d08cfd101e6559a55e50d57dedb2889.tar.gz anastasis-e9e568139d08cfd101e6559a55e50d57dedb2889.tar.bz2 anastasis-e9e568139d08cfd101e6559a55e50d57dedb2889.zip |
-fix anastasis Debian package
-rw-r--r-- | debian/anastasis-httpd.install | 4 | ||||
-rw-r--r-- | debian/anastasis-httpd.postinst | 20 | ||||
-rw-r--r-- | debian/anastasis-httpd.postrm | 1 | ||||
-rw-r--r-- | debian/anastasis-httpd.prerm | 4 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/control | 22 | ||||
-rwxr-xr-x | debian/db/install/pgsql | 2 | ||||
-rw-r--r-- | debian/etc/anastasis/anastasis.conf | 4 | ||||
-rwxr-xr-x | debian/rules | 5 | ||||
-rw-r--r-- | src/authorization/Makefile.am | 3 | ||||
-rw-r--r-- | src/restclient/Makefile.am | 3 |
11 files changed, 54 insertions, 19 deletions
diff --git a/debian/anastasis-httpd.install b/debian/anastasis-httpd.install index 652caa0..2de9453 100644 --- a/debian/anastasis-httpd.install +++ b/debian/anastasis-httpd.install @@ -11,4 +11,6 @@ usr/share/anastasis/* usr/share/anastasis/sql/* usr/share/anastasis/config.d/* debian/etc/* /etc/ -debian/db/install/* usr/share/dbconfig-common/scripts/anastasis/install/ + +# Files needed by dbconf +debian/db/install/* usr/share/dbconfig-common/scripts/anastasis-httpd/install/ diff --git a/debian/anastasis-httpd.postinst b/debian/anastasis-httpd.postinst index 994b06b..428d228 100644 --- a/debian/anastasis-httpd.postinst +++ b/debian/anastasis-httpd.postinst @@ -2,7 +2,23 @@ set -e -TALER_HOME="/var/lib/taler/" +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 'anastasis-httpd.service' >/dev/null || true + fi +fi + +if [ "$1" = "purge" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper purge 'anastasis-httpd.service' >/dev/null || true + deb-systemd-helper unmask 'anastasis-httpd.service' >/dev/null || true + fi +fi + +ANASTASIS_HOME="/var/lib/anastasis/" _USERNAME=anastasis-httpd _GROUPNAME=www-data @@ -17,7 +33,7 @@ case "${1}" in configure) # Creating taler users if needed if ! getent passwd ${_USERNAME} >/dev/null; then - adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${TALER_HOME} ${_USERNAME} + 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 diff --git a/debian/anastasis-httpd.postrm b/debian/anastasis-httpd.postrm index 9954a33..dae3873 100644 --- a/debian/anastasis-httpd.postrm +++ b/debian/anastasis-httpd.postrm @@ -14,6 +14,7 @@ fi case "${1}" in purge) rm -rf /var/lib/anastasis/httpd/ + rm -f /etc/anastasis/override.conf ;; remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) ;; diff --git a/debian/anastasis-httpd.prerm b/debian/anastasis-httpd.prerm index 24625c0..c59777c 100644 --- a/debian/anastasis-httpd.prerm +++ b/debian/anastasis-httpd.prerm @@ -2,6 +2,10 @@ set -e +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 diff --git a/debian/changelog b/debian/changelog index fad8c85..aa165fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,8 @@ +anastasis (0.2.99-2) unstable; urgency=low + + * Close to Anastasis 0.3.0, but testing package details. + + -- Christian Grothoff <grothoff@gnu.org> Tue, 01 Feb 2022 14:02:10 +0100 anastasis (0.2.99-1) unstable; urgency=low * Close to Anastasis 0.3.0, but a preview release for UX testing. diff --git a/debian/control b/debian/control index 0252c0d..69fd06a 100644 --- a/debian/control +++ b/debian/control @@ -8,19 +8,16 @@ Build-Depends: autopoint, debhelper-compat (= 12), gettext, - libgnunet-dev, - libtalerexchange-dev (>= 0.8.5), - libtalermerchant-dev (>= 0.8.4), - libpq-dev (>=9.5), + libgnunet-dev (>=0.17.0), + libtalerexchange-dev (>= 0.9.0), + libtalermerchant-dev (>= 0.9.0), + libpq-dev (>=13), libsqlite3-dev (>=3.8), pkg-config, po-debconf, libqrencode-dev, uuid-dev, zlib1g-dev -Build-Conflicts: - autoconf2.13, - automake1.4 Standards-Version: 4.5.0 Vcs-Git: https://salsa.debian.org/debian/anastasis.git Vcs-browser: https://salsa.debian.org/debian/anastasis @@ -42,11 +39,12 @@ Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: - libtalerexchange (>= 0.8.5), + libtalerexchange (>= 0.9.0), libgnutls30 (>= 3.7.1), adduser, lsb-base, netbase, + sudo, apache2 | nginx | httpd, postgresql, dbconfig-pgsql | dbconfig-no-thanks, @@ -59,7 +57,7 @@ Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: - libanastasis (>= 0.0.0), + libanastasis, ${misc:Depends}, ${shlibs:Depends} Description: Command-line interface for the Anastasis key escrow provider service. @@ -68,9 +66,9 @@ Package: libanastasis-dev Section: libdevel Architecture: any Depends: - libtalermerchant-dev (>= 0.8.3), - libtalerexchange-dev (>= 0.8.5), - libgnunet-dev (>=0.15.3), + libtalermerchant-dev (>= 0.9.0), + libtalerexchange-dev (>= 0.9.0), + libgnunet-dev (>=0.17.0), ${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 index f695fed..08648db 100755 --- a/debian/db/install/pgsql +++ b/debian/db/install/pgsql @@ -17,7 +17,7 @@ if [ -f /etc/dbconfig-common/anastasis-httpd.conf ]; then $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 - + 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 ;; diff --git a/debian/etc/anastasis/anastasis.conf b/debian/etc/anastasis/anastasis.conf index 9938438..9b85754 100644 --- a/debian/etc/anastasis/anastasis.conf +++ b/debian/etc/anastasis/anastasis.conf @@ -14,7 +14,7 @@ SERVE = unix # Name of your business #BUSINESS_NAME = "" -# Random server salt. Use output of 'uuidgen' +# Random server salt. Use output of 'uuidgen'. Make a backup of the value. #SERVER_SALT = "" # How high is the per key share insurance offered @@ -32,7 +32,7 @@ PAYMENT_BACKEND_URL = http://backend.demo.taler.net/instances/Tutorial/ [taler] -# Currency accepted by anastasis via GNU Taler payments. +# Currency accepted by GNU Anastasis via GNU Taler payments. CURRENCY = KUDOS [paths] diff --git a/debian/rules b/debian/rules index 0307145..8fa0b04 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,11 @@ override_dh_auto_install-indep: override_dh_auto_clean: dh_auto_clean +override_dh_installsystemd: + dh_installsystemd -panastasis-httpd --name=anastasis-httpd --no-start --no-enable + # final invocation to generate daemon reload + dh_installsystemd + override_dh_install: dh_install # Done manually for debhelper-compat<13 diff --git a/src/authorization/Makefile.am b/src/authorization/Makefile.am index ec9ae5a..c6a7af1 100644 --- a/src/authorization/Makefile.am +++ b/src/authorization/Makefile.am @@ -98,6 +98,7 @@ libanastasis_plugin_authorization_email_la_LIBADD = \ libanastasis_plugin_authorization_email_la_LDFLAGS = \ $(ANASTASIS_PLUGIN_LDFLAGS) \ $(top_builddir)/src/stasis/libanastasisdb.la \ + $(top_builddir)/src/util/libanastasisutil.la \ -ltalerjson \ -ltalermhd \ -ltalerutil \ @@ -130,6 +131,7 @@ libanastasis_plugin_authorization_post_la_LIBADD = \ libanastasis_plugin_authorization_post_la_LDFLAGS = \ $(ANASTASIS_PLUGIN_LDFLAGS) \ $(top_builddir)/src/stasis/libanastasisdb.la \ + $(top_builddir)/src/util/libanastasisutil.la \ -ltalerjson \ -ltalermhd \ -ltalerutil \ @@ -146,6 +148,7 @@ libanastasis_plugin_authorization_sms_la_LIBADD = \ libanastasis_plugin_authorization_sms_la_LDFLAGS = \ $(ANASTASIS_PLUGIN_LDFLAGS) \ $(top_builddir)/src/stasis/libanastasisdb.la \ + $(top_builddir)/src/util/libanastasisutil.la \ -ltalerjson \ -ltalermhd \ -ltalerutil \ diff --git a/src/restclient/Makefile.am b/src/restclient/Makefile.am index 9bee2dd..1a4d83c 100644 --- a/src/restclient/Makefile.am +++ b/src/restclient/Makefile.am @@ -29,9 +29,10 @@ libanastasisrest_la_LIBADD = \ -lgnunetutil \ -ljansson \ -ltalerjson \ - -ltalerutil \ + -ltalercurl \ -ltalermerchant \ -ltalerjson \ + -ltalerutil \ $(XLIB) if HAVE_LIBCURL |