From 5b4465a25548471788809880b28003edfae2081ce58cc9d30a5ab2e71ba3907b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 14 Jan 2023 10:47:38 +0000 Subject: [PATCH] Version 3.1.182.52d9180 Switch to sysuser-tools-backed useradd OBS-URL: https://build.opensuse.org/package/show/server:mail/grommunio-web?expand=0&rev=2 --- debian.changelog | 2 +- grommunio-web-3.1.181.9f6b29e.tar.xz | 3 --- grommunio-web-3.1.182.52d9180.tar.xz | 3 +++ grommunio-web.changes | 4 +-- grommunio-web.dsc | 2 +- grommunio-web.spec | 40 +++++++++++++++++++++------- system-user-groweb.conf | 2 ++ 7 files changed, 40 insertions(+), 16 deletions(-) delete mode 100644 grommunio-web-3.1.181.9f6b29e.tar.xz create mode 100644 grommunio-web-3.1.182.52d9180.tar.xz create mode 100644 system-user-groweb.conf diff --git a/debian.changelog b/debian.changelog index 6663c43..9e2b5d9 100644 --- a/debian.changelog +++ b/debian.changelog @@ -1,4 +1,4 @@ -grommunio-web (3.1.181.9f6b29e) unstable; urgency=low +grommunio-web (3.1.182.52d9180) unstable; urgency=low * Current release diff --git a/grommunio-web-3.1.181.9f6b29e.tar.xz b/grommunio-web-3.1.181.9f6b29e.tar.xz deleted file mode 100644 index 68c7d8b..0000000 --- a/grommunio-web-3.1.181.9f6b29e.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3b2f2b1705abc8e1fc51cec2f23577de3fd730a5ddd92bd18154160d835d78c8 -size 22435332 diff --git a/grommunio-web-3.1.182.52d9180.tar.xz b/grommunio-web-3.1.182.52d9180.tar.xz new file mode 100644 index 0000000..086c815 --- /dev/null +++ b/grommunio-web-3.1.182.52d9180.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5619af932fa5389f4839bc8be6467115a020bf1d4496feb161e3ae0919e7dec +size 22435712 diff --git a/grommunio-web.changes b/grommunio-web.changes index e946952..566071c 100644 --- a/grommunio-web.changes +++ b/grommunio-web.changes @@ -1,4 +1,4 @@ ------------------------------------------------------------------- -Thu Jan 12 13:18:01 UTC 2023 - Jan Engelhardt +Sat Jan 14 10:47:06 UTC 2023 - Jan Engelhardt -- Initial package (v3.1.181.9f6b29e) for build.opensuse.org +- Initial package (version 3.1.182.52d9180) for build.opensuse.org diff --git a/grommunio-web.dsc b/grommunio-web.dsc index 051c1bf..bee15af 100644 --- a/grommunio-web.dsc +++ b/grommunio-web.dsc @@ -3,7 +3,7 @@ Source: grommunio-web Binary: grommunio-web Architecture: all DEBTRANSFORM-RELEASE: 1 -Version: 3.1.181.9f6b29e +Version: 3.1.182.52d9180 Maintainer: grommunio Homepage: https://grommunio.com/ Standards-Version: 3.9.4 diff --git a/grommunio-web.spec b/grommunio-web.spec index dea0e81..fb7d57f 100644 --- a/grommunio-web.spec +++ b/grommunio-web.spec @@ -21,7 +21,7 @@ %endif Name: grommunio-web -Version: 3.1.181.9f6b29e +Version: 3.1.182.52d9180 Release: 0 Summary: Web client for access to grommunio features from the web License: AGPL-3.0-or-later AND GPL-3.0-only AND LGPL-2.1-only AND MIT @@ -49,6 +49,7 @@ BuildRequires: java-11-openjdk-devel BuildRequires: php-cli BuildRequires: php-json %endif +BuildRequires: mapi-header-php BuildRequires: php BuildRequires: xz %if 0%{?suse_version} >= 1220 @@ -56,12 +57,18 @@ BuildRequires: libxml2-tools %else BuildRequires: libxml2 %endif +%if 0%{?suse_version} >= 1500 +BuildRequires: sysuser-tools +%sysusers_requires +%else +Requires(pre): %_sbindir/groupadd +Requires(pre): %_sbindir/useradd +%endif BuildArch: noarch -Requires(pre): user(groweb) -Requires(pre): group(groweb) +Obsoletes: system-user-groweb +Provides: system-user-groweb Requires: gromox >= 1.27 -BuildRequires: mapi-header-php Requires: mapi-header-php %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} Requires: php-bcmath @@ -122,7 +129,12 @@ echo "%version-%release" >version echo "%version-%release" | sha1sum | cut -b 1-8 >cachebuster %build -make +%make_build -j1 +%if 0%{?suse_version} >= 1500 +%sysusers_generate_pre %_sourcedir/system-user-groweb.conf %name system-user-groweb.conf +%else +: >>"%name.pre" +%endif %install b="%buildroot" @@ -165,14 +177,20 @@ for dir in "$b/%_datadir/%name/plugins"/*; do fi done +%if 0%{?suse_version} >= 1500 +mkdir -p "%buildroot/%_sysusersdir" +install -m 0644 "%_sourcedir/system-user-groweb.conf" "%buildroot/%_sysusersdir/" +%endif %if 0%{?fdupes:1} %fdupes %buildroot/%_prefix %endif -%pre -if [ -d "%_datadir/grommunio-web/server/includes/mapi" ]; then - rm -Rf "%_datadir/grommunio-web/server/includes/mapi" -fi +%pre -f %name.pre +%if 0%{?suse_version} < 1500 +getent group groweb >/dev/null || %_sbindir/groupadd -r groweb +getent passwd groweb >/dev/null || %_sbindir/useradd -g groweb -s /bin/false \ + -r -c "user for %name" -d "%_localstatedir/lib/groweb" groweb +%endif %post # clear translation caches @@ -219,6 +237,10 @@ ipcrm -M 0x950412de 2>/dev/null || : %_datadir/%name/cachebuster %attr(750,root,root) /var/log/grommunio/ +%if 0%{?suse_version} >= 1500 +%_sysusersdir/*.conf +%endif + %dir %langdir/ %lang(af_ZA) %langdir/af_ZA.UTF-8 %lang(am_ET) %langdir/am_ET.UTF-8 diff --git a/system-user-groweb.conf b/system-user-groweb.conf new file mode 100644 index 0000000..651f714 --- /dev/null +++ b/system-user-groweb.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u groweb - "user for grommunio-web" /var/lib/groweb -