From aecb45bd06edb0f130fce653077b19d8453cb2d9 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sat, 25 Dec 2021 18:32:27 +0100 Subject: Use dh_sysuser instead of manual adduser in postinst Signed-off-by: Olivier Gayot --- debian/control | 1 + debian/rules | 2 +- debian/swiftstory.postinst | 34 ---------------------------------- debian/swiftstory.sysuser | 1 + 4 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 debian/swiftstory.postinst create mode 100644 debian/swiftstory.sysuser diff --git a/debian/control b/debian/control index 0acb744..60a8631 100644 --- a/debian/control +++ b/debian/control @@ -4,6 +4,7 @@ Section: python Priority: optional Build-Depends: python3-setuptools, dh-python, + dh-sysuser, debhelper-compat (= 13), python3-pytest, python3-websockets, diff --git a/debian/rules b/debian/rules index 3938ed4..6f7eaf3 100755 --- a/debian/rules +++ b/debian/rules @@ -5,5 +5,5 @@ export PYBUILD_NAME=swiftstory export PYBUILD_TEST_PYTEST=1 %: - dh $@ --with python3 --buildsystem=pybuild + dh $@ --with python3,sysuser --buildsystem=pybuild diff --git a/debian/swiftstory.postinst b/debian/swiftstory.postinst deleted file mode 100644 index 5874566..0000000 --- a/debian/swiftstory.postinst +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# postinst script for swiftstory - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -case "$1" in - configure) - adduser --system swiftstory --no-create-home - ;; - - abort-upgrade | abort-remove | abort-deconfigure ) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/swiftstory.sysuser b/debian/swiftstory.sysuser new file mode 100644 index 0000000..da0430e --- /dev/null +++ b/debian/swiftstory.sysuser @@ -0,0 +1 @@ +swiftstory defaults -- cgit v1.2.3