From 076db171301328ca19013bcf5ec3b7e0b86c14272c571af25eaf214ee013745f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 21 Feb 2024 22:22:06 +0000 Subject: [PATCH 1/2] - Update to release 3 OBS-URL: https://build.opensuse.org/package/show/server:mail/system-user-gromox?expand=0&rev=6 --- debian.changelog | 5 ++++ debian.compat | 1 + debian.control | 13 +++++++++ debian.rules | 3 ++ debian.system-user-gromox.install | 0 debian.system-user-gromox.postinst | 6 ++++ system-user-gromox-EL9.spec | 46 ++++++++++++++++++++++++++++++ system-user-gromox-Fedora_39.spec | 46 ++++++++++++++++++++++++++++++ system-user-gromox.changes | 6 ++++ system-user-gromox.spec | 16 +++++++++-- 10 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 debian.changelog create mode 100644 debian.compat create mode 100644 debian.control create mode 100644 debian.rules create mode 100644 debian.system-user-gromox.install create mode 100644 debian.system-user-gromox.postinst create mode 100644 system-user-gromox-EL9.spec create mode 100644 system-user-gromox-Fedora_39.spec diff --git a/debian.changelog b/debian.changelog new file mode 100644 index 0000000..5167ddf --- /dev/null +++ b/debian.changelog @@ -0,0 +1,5 @@ +system-user-gromox (0-0) unstable; urgency=low + + * Initial package. + + -- Gromox Mon, 25 Jan 2021 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-EL9.spec b/system-user-gromox-EL9.spec new file mode 100644 index 0000000..3fcddc3 --- /dev/null +++ b/system-user-gromox-EL9.spec @@ -0,0 +1,46 @@ +# +# spec file for package system-user-gromox-EL9 +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: system-user-gromox +Version: 3 +Release: 0 +Summary: System user and group gromox +License: MIT +Group: System/Fhs +URL: https://grommunio.com/ +BuildArch: noarch +Requires(pre): shadow-utils +Requires(pre): glibc-common +Provides: group(gromox) +Provides: group(gromoxcf) +Provides: user(gromox) + +%description +This package provides the gromox account. + +%pre +getent group gromox >/dev/null || groupadd -r gromox +getent group gromoxcf >/dev/null || groupadd -r gromoxcf +getent passwd gromox >/dev/null || \ + useradd -r -M -g gromox -d /var/lib/gromox -s /sbin/nologin \ + -c "Gromox services" gromox +usermod gromox -aG gromoxcf + +%files + +%changelog diff --git a/system-user-gromox-Fedora_39.spec b/system-user-gromox-Fedora_39.spec new file mode 100644 index 0000000..915c991 --- /dev/null +++ b/system-user-gromox-Fedora_39.spec @@ -0,0 +1,46 @@ +# +# spec file for package system-user-gromox-Fedora_39 +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: system-user-gromox +Version: 3 +Release: 0 +Summary: System user and group gromox +License: MIT +Group: System/Fhs +URL: https://grommunio.com/ +BuildArch: noarch +Requires(pre): shadow-utils +Requires(pre): glibc-common +Provides: group(gromox) +Provides: group(gromoxcf) +Provides: user(gromox) + +%description +This package provides the gromox account. + +%pre +getent group gromox >/dev/null || groupadd -r gromox +getent group gromoxcf >/dev/null || groupadd -r gromoxcf +getent passwd gromox >/dev/null || \ + useradd -r -M -g gromox -d /var/lib/gromox -s /sbin/nologin \ + -c "Gromox services" gromox +usermod gromox -aG gromoxcf + +%files + +%changelog diff --git a/system-user-gromox.changes b/system-user-gromox.changes index 07bd140..3ee14a8 100644 --- a/system-user-gromox.changes +++ b/system-user-gromox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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.spec b/system-user-gromox.spec index bc4daa6..c339720 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,11 +17,12 @@ Name: system-user-gromox -Version: 2 +Version: 3 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 @@ -34,7 +35,16 @@ This package provides the gromox account. %prep %build -echo 'u gromox - "Gromox services"' >u.conf +# 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 %sysusers_generate_pre u.conf user %install From 90eea15503ec8756856ea5e2fc88ff9497a2c14422bc8ce612eeb53b6bfe9489 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 12 Mar 2024 23:59:59 +0000 Subject: [PATCH 2/2] - Update to release 5 OBS-URL: https://build.opensuse.org/package/show/server:mail/system-user-gromox?expand=0&rev=7 --- debian.changelog | 6 ++-- system-user-gromox-EL9.spec | 46 ------------------------------- system-user-gromox-Fedora_39.spec | 46 ------------------------------- system-user-gromox.changes | 7 +++++ system-user-gromox.dsc | 10 +++++++ system-user-gromox.spec | 10 ++++--- 6 files changed, 26 insertions(+), 99 deletions(-) delete mode 100644 system-user-gromox-EL9.spec delete mode 100644 system-user-gromox-Fedora_39.spec create mode 100644 system-user-gromox.dsc diff --git a/debian.changelog b/debian.changelog index 5167ddf..d762c9e 100644 --- a/debian.changelog +++ b/debian.changelog @@ -1,5 +1,5 @@ -system-user-gromox (0-0) unstable; urgency=low +system-user-gromox (5-0) unstable; urgency=low - * Initial package. + * That's it. - -- Gromox Mon, 25 Jan 2021 10:00:00 +0100 + -- Gromox Wed, 28 Feb 2024 10:00:00 +0100 diff --git a/system-user-gromox-EL9.spec b/system-user-gromox-EL9.spec deleted file mode 100644 index 3fcddc3..0000000 --- a/system-user-gromox-EL9.spec +++ /dev/null @@ -1,46 +0,0 @@ -# -# spec file for package system-user-gromox-EL9 -# -# 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 -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via https://bugs.opensuse.org/ -# - - -Name: system-user-gromox -Version: 3 -Release: 0 -Summary: System user and group gromox -License: MIT -Group: System/Fhs -URL: https://grommunio.com/ -BuildArch: noarch -Requires(pre): shadow-utils -Requires(pre): glibc-common -Provides: group(gromox) -Provides: group(gromoxcf) -Provides: user(gromox) - -%description -This package provides the gromox account. - -%pre -getent group gromox >/dev/null || groupadd -r gromox -getent group gromoxcf >/dev/null || groupadd -r gromoxcf -getent passwd gromox >/dev/null || \ - useradd -r -M -g gromox -d /var/lib/gromox -s /sbin/nologin \ - -c "Gromox services" gromox -usermod gromox -aG gromoxcf - -%files - -%changelog diff --git a/system-user-gromox-Fedora_39.spec b/system-user-gromox-Fedora_39.spec deleted file mode 100644 index 915c991..0000000 --- a/system-user-gromox-Fedora_39.spec +++ /dev/null @@ -1,46 +0,0 @@ -# -# spec file for package system-user-gromox-Fedora_39 -# -# 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 -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via https://bugs.opensuse.org/ -# - - -Name: system-user-gromox -Version: 3 -Release: 0 -Summary: System user and group gromox -License: MIT -Group: System/Fhs -URL: https://grommunio.com/ -BuildArch: noarch -Requires(pre): shadow-utils -Requires(pre): glibc-common -Provides: group(gromox) -Provides: group(gromoxcf) -Provides: user(gromox) - -%description -This package provides the gromox account. - -%pre -getent group gromox >/dev/null || groupadd -r gromox -getent group gromoxcf >/dev/null || groupadd -r gromoxcf -getent passwd gromox >/dev/null || \ - useradd -r -M -g gromox -d /var/lib/gromox -s /sbin/nologin \ - -c "Gromox services" gromox -usermod gromox -aG gromoxcf - -%files - -%changelog diff --git a/system-user-gromox.changes b/system-user-gromox.changes index 3ee14a8..f4076fe 100644 --- a/system-user-gromox.changes +++ b/system-user-gromox.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +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 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 c339720..5bacb9a 100644 --- a/system-user-gromox.spec +++ b/system-user-gromox.spec @@ -17,7 +17,7 @@ Name: system-user-gromox -Version: 3 +Version: 5 Release: 0 Summary: System user and group gromox License: MIT @@ -26,8 +26,10 @@ Group: System/Fhs 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. @@ -45,12 +47,12 @@ cat >u.conf <<-EOF u gromox - "Gromox services" m gromox gromoxcf EOF -%sysusers_generate_pre u.conf user %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