1
0
forked from pool/grommunio-web

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
This commit is contained in:
Jan Engelhardt 2023-01-14 10:47:38 +00:00 committed by Git OBS Bridge
parent 1afd3cb329
commit 5b4465a255
7 changed files with 40 additions and 16 deletions

View File

@ -1,4 +1,4 @@
grommunio-web (3.1.181.9f6b29e) unstable; urgency=low
grommunio-web (3.1.182.52d9180) unstable; urgency=low
* Current release

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b2f2b1705abc8e1fc51cec2f23577de3fd730a5ddd92bd18154160d835d78c8
size 22435332

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5619af932fa5389f4839bc8be6467115a020bf1d4496feb161e3ae0919e7dec
size 22435712

View File

@ -1,4 +1,4 @@
-------------------------------------------------------------------
Thu Jan 12 13:18:01 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
Sat Jan 14 10:47:06 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Initial package (v3.1.181.9f6b29e) for build.opensuse.org
- Initial package (version 3.1.182.52d9180) for build.opensuse.org

View File

@ -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 <dev@grommunio.com>
Homepage: https://grommunio.com/
Standards-Version: 3.9.4

View File

@ -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

2
system-user-groweb.conf Normal file
View File

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u groweb - "user for grommunio-web" /var/lib/groweb -