create kumod user during rpm and deb install

I haven't tested the deb stuff explicitly, will see what
happens when it makes it through CI
This commit is contained in:
Wez Furlong
2023-03-20 13:45:57 -07:00
parent 37f56fb15b
commit 2d5fe38aba
2 changed files with 17 additions and 0 deletions
+9
View File
@@ -34,6 +34,15 @@ EOF
./assets/install.sh pkg/debian/opt/kumomta
cat > pkg/debian/preinst <<EOF
#!/bin/sh
getent group kumod >/dev/null || groupadd --system kumod
getent passwd kumod >/dev/null || \
useradd --system -g kumod -d /var/spool/kumod -s /sbin/nologin \
-c "Service account for kumomta" kumod
exit 0
EOF
deps=$(cd pkg && dpkg-shlibdeps -O -e debian/opt/kumomta/*bin/*)
mv pkg/debian/control pkg/debian/DEBIAN/control
sed -i '/^Source:/d' pkg/debian/DEBIAN/control # The `Source:` field needs to be valid in a binary package
+8
View File
@@ -27,6 +27,7 @@ Packager: Wez Furlong <wez@wezfurlong.org>
License: MIT
URL: https://kumomta.com
Summary: A high performance, modern MTA.
Requires(pre): shadow-utils
%description
A high performance, modern MTA.
@@ -34,6 +35,13 @@ A high performance, modern MTA.
%build
echo "Doing the build bit here"
%pre
getent group kumod >/dev/null || groupadd --system kumod
getent passwd kumod >/dev/null || \
useradd --system -g kumod -d /var/spool/kumod -s /sbin/nologin \
-c "Service account for kumomta" kumod
exit 0
%install
set -x
cd ${HERE}