diff --git a/debian.changelog b/debian.changelog new file mode 100644 index 0000000..d762c9e --- /dev/null +++ b/debian.changelog @@ -0,0 +1,5 @@ +system-user-gromox (5-0) unstable; urgency=low + + * That's it. + + -- Gromox Wed, 28 Feb 2024 10:00:00 +0100 diff --git a/debian.compat b/debian.compat new file mode 100644 index 0000000..e243817 --- /dev/null +++ b/debian.compat @@ -0,0 +1 @@ +12 diff --git a/debian.control b/debian.control new file mode 100644 index 0000000..1a64a01 --- /dev/null +++ b/debian.control @@ -0,0 +1,13 @@ +Source: system-user-gromox +Priority: optional +Section: mail +Maintainer: Gromox +Standards-Version: 4.5.0 + +Package: system-user-gromox +Architecture: all +Pre-Depends: ${misc:Pre-Depends} +Depends: adduser, ${misc:Depends} +Description: System user and group gromox + . + This package provides the gromox account. diff --git a/debian.rules b/debian.rules new file mode 100644 index 0000000..953462f --- /dev/null +++ b/debian.rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ --parallel diff --git a/debian.system-user-gromox.install b/debian.system-user-gromox.install new file mode 100644 index 0000000..473a0f4 diff --git a/debian.system-user-gromox.postinst b/debian.system-user-gromox.postinst new file mode 100644 index 0000000..0cbf6d4 --- /dev/null +++ b/debian.system-user-gromox.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +getent group gromox >/dev/null || addgroup --system gromox +getent group gromoxcf >/dev/null || addgroup --system gromoxcf +getent passwd gromox >/dev/null || \ + adduser --system gromox --home /var/lib/gromox --no-create-home --disabled-password --ingroup gromox +usermod gromox -aG gromoxcf diff --git a/system-user-gromox.changes b/system-user-gromox.changes index 07bd140..f4076fe 100644 --- a/system-user-gromox.changes +++ b/system-user-gromox.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Mar 12 23:54:28 UTC 2024 - Jan Engelhardt + +- Update to release 5 + * Do away with %sysusers_generate_pre, it is not needed because + system-user-gromox.%post runs before gromox.%pre anyway. + +------------------------------------------------------------------- +Wed Feb 21 22:20:25 UTC 2024 - Jan Engelhardt + +- Update to release 3 + * Create gromoxcf group + ------------------------------------------------------------------- Thu Jun 2 09:17:46 UTC 2022 - Jan Engelhardt diff --git a/system-user-gromox.dsc b/system-user-gromox.dsc new file mode 100644 index 0000000..61fdaf7 --- /dev/null +++ b/system-user-gromox.dsc @@ -0,0 +1,10 @@ +Format: 1.0 +Source: system-user-gromox +Architecture: all +Version: 5 +Maintainer: Gromox +Homepage: https://grommunio.com +Standards-Version: 3.9.4 +# You need to update both .dsc and debian.control (*sigh* - Debian) +Build-Depends: + debhelper diff --git a/system-user-gromox.spec b/system-user-gromox.spec index bc4daa6..5bacb9a 100644 --- a/system-user-gromox.spec +++ b/system-user-gromox.spec @@ -1,7 +1,7 @@ # # spec file for package system-user-gromox # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,16 +17,19 @@ Name: system-user-gromox -Version: 2 +Version: 5 Release: 0 Summary: System user and group gromox License: MIT Group: System/Fhs +#Source: https://download.grommunio.com/community/openSUSE_Tumbleweed/system-user-gromox-*.src.rpm URL: https://grommunio.com/ BuildArch: noarch BuildRequires: systemd-rpm-macros +%if 0%{?suse_version} +# SUSE doing SUSE things again BuildRequires: sysuser-tools -%sysusers_requires +%endif %description This package provides the gromox account. @@ -34,13 +37,22 @@ This package provides the gromox account. %prep %build -echo 'u gromox - "Gromox services"' >u.conf -%sysusers_generate_pre u.conf user +# The conf file is provided by system-user-gromox rather than +# gromox.spec so that e.g. grommunio-admin-api does not grow a +# BuildRequire on gromox (wait times). +# +cat >u.conf <<-EOF + g gromox - + g gromoxcf - + u gromox - "Gromox services" + m gromox gromoxcf +EOF %install install -Dpm0644 u.conf "%buildroot/%_sysusersdir/system-user-gromox.conf" -%pre -f user.pre +%post +%sysusers_create system-user-gromox.conf %files %_sysusersdir/*.conf