SHA256
1
0
forked from pool/gromox
Jan Engelhardt 2022-04-06 16:05:20 +00:00 committed by Git OBS Bridge
parent 687beea213
commit eed04e3041
11 changed files with 140 additions and 29 deletions

View File

@ -1,4 +1,4 @@
gromox (1.13.6.07d462a2-0) unstable; urgency=low
gromox (1.13-0) unstable; urgency=low
* Initial package.

View File

@ -1,7 +1,21 @@
#!/bin/sh
# %files
chown gromox:gromox /var/lib/gromox /var/log/gromox || :
chown root:gromox /etc/gromox || :
chmod 0770 /etc/gromox || :
vd="/var/lib/gromox \
/var/lib/gromox/domain \
/var/lib/gromox/queue \
/var/lib/gromox/queue/cache \
/var/lib/gromox/queue/clone \
/var/lib/gromox/queue/insulation \
/var/lib/gromox/queue/mess \
/var/lib/gromox/queue/save \
/var/lib/gromox/queue/timer \
/var/lib/gromox/user \
/var/log/gromox"
chown gromox:gromox $vd || :
chmod 0770 $vd || :
chmod 0770 /var/lib/gromox /var/log/gromox || :
# %post

View File

@ -1,12 +1,14 @@
#!/usr/bin/make -f
export DH_VERBOSE=1
phpdir := $(shell readlink -f $$(php-config --ini-path)/..)
%:
dh $@ --parallel --with autoreconf
override_dh_auto_install:
dh_auto_install
find ${INSTDIR} -type f -name "*.la" -delete
for i in /var/lib/gromox /var/lib/gromox/domain \
for i in /etc/gromox /var/lib/gromox /var/lib/gromox/domain \
/var/lib/gromox/queue /var/lib/gromox/queue/clone \
/var/lib/gromox/queue/mess /var/lib/gromox/queue/save \
/var/lib/gromox/queue/cache /var/lib/gromox/queue/insulation \
@ -15,7 +17,9 @@ override_dh_auto_install:
/usr/lib/sysctl.d; do \
mkdir -pv debian/gromox/$$i; \
done
mkdir -pv debian/gromox/etc/php/7.4/mods-available debian/gromox/etc/php/7.4/cli/conf.d debian/gromox/etc/php/7.4/fpm/conf.d
mv -v debian/gromox/etc/php/7.4/cli/conf.d/mapi.ini debian/gromox/etc/php/7.4/mods-available/
ln -s ../mods-available/mapi.ini debian/gromox/etc/php/7.4/cli/conf.d/mapi.ini
ln -s ../mods-available/mapi.ini debian/gromox/etc/php/7.4/fpm/conf.d/mapi.ini
mkdir -pv debian/gromox${phpdir}/fpm/pool.d
cp -av debian/gromox/usr/share/gromox/fpm-gromox.conf.sample debian/gromox${phpdir}/fpm/pool.d/gromox.conf
mkdir -pv debian/gromox${phpdir}/mods-available debian/gromox${phpdir}/cli/conf.d debian/gromox${phpdir}/fpm/conf.d
mv -v debian/gromox${phpdir}/cli/conf.d/mapi.ini debian/gromox${phpdir}/mods-available/
ln -s ${phpdir}/mods-available/mapi.ini debian/gromox${phpdir}/cli/conf.d/mapi.ini
ln -s ${phpdir}/mods-available/mapi.ini debian/gromox${phpdir}/fpm/conf.d/mapi.ini

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQS8oMXDCcrFaedKkhz3bv5dDCI6jwUCYgZstgAKCRD3bv5dDCI6
j555AP0fBxKNKMcLuBYUf661fXTM5japufzy3F5635xzqp40LQD+IAUl5+Uf8FDR
8OmDt7vS2KpdfJjML1d24KIKVSI50wc=
=QJk/
-----END PGP SIGNATURE-----

View File

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

7
gromox-1.18.tar.asc Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQS8oMXDCcrFaedKkhz3bv5dDCI6jwUCYjWqwQAKCRD3bv5dDCI6
j8bWAP0U0j8wxWBlOquNgcHaB0ddjj9a+INWQXsVKKbNUUY6AwEAxxf354t/gkmq
0Ks5qeEKOz6Rib4wm6dPyGa74m1Z2gU=
=l0q5
-----END PGP SIGNATURE-----

3
gromox-1.18.tar.xz Normal file
View File

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

View File

@ -1 +1,2 @@
# authorized
addFilter("suse-pam-unauthorized-module")

View File

@ -1,11 +1,12 @@
Format: 1.0
Source: gromox
Architecture: any
Version: 1.16
Version: 1.18
DEBTRANSFORM-RELEASE: 1
Maintainer: Gromox <null@gromox.com>
Homepage: https://gromox.com
Standards-Version: 4.5.0
# libbfio is in the require list because libpff-dev is lacking it (bug)
Build-Depends:
autoconf (>= 2.69),
automake (>= 1:1.11) | automake1.11,
@ -17,8 +18,10 @@ Build-Depends:
g++ (>= 7),
gettext,
libbfio-dev,
libcurl4-openssl-dev,
libfmt-dev,
libgumbo-dev,
libhx-dev (>= 4.0),
libhx-dev (>= 4.3),
libjsoncpp-dev (>= 1.4.0),
libldap2-dev,
libmariadbclient-dev | libmysqlclient-dev | libmariadb-dev,
@ -26,13 +29,16 @@ Build-Depends:
libpff-dev,
libsqlite3-dev,
libssl-dev,
libtinyxml2-dev (>= 8),
libtool (>= 2),
libtool-bin (>= 2) | libtool (>= 2),
lsb-release,
make,
m4,
openssl,
php-dev (>= 7.0),
pkg-config (>= 0.23),
sed,
systemd,
uuid-dev,
zlib1g-dev

25
gromox.keyring Normal file
View File

@ -0,0 +1,25 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEYdM5whYJKwYBBAHaRw8BAQdADytr1kM/qc54vO40yIHht0XeDD7sMe1rw8Xo
Nq/LtMO0IEphbiBFbmdlbGhhcmR0IDxqZW5nZWxoQGluYWkuZGU+iJUEExYKAD0W
IQS8oMXDCcrFaedKkhz3bv5dDCI6jwUCYdM5wgIbAwUJCWYBgAQLCQgHBRUKCQgL
BRYCAwEAAh4FAheAAAoJEPdu/l0MIjqPriUBAPLcct0ekiHZHS/mPDaS0I0mh5zy
zaZFuB5FaMpQQgQ5AP45H+SqGxP7BRlsEDajDmcEyM+IPvn22lOGKyR5OKQxDokC
MwQQAQoAHRYhBCNobBCkVpG+ekJRCdY4gYHzWgk4BQJh0zqPAAoJENY4gYHzWgk4
F7EP/3ZG6rs4l24k/GOvO1CNPM0rHaOccbB3E8BXzTJ6BsKIG1T3X4cokLHAkhmO
8ffw9NYV/HJ1AJyirvHfYFd6nn55aMakbyjo7RmDpmMmpJH5UpbhtqlJkeRQdMni
3bx+9i9E8QFJG6eFaGz8UhCCyzQvuLhawNcA6mPDumQkIri73NnA9vegw8yyDqpr
14fm4Eh+uERzXQ6JkNTqaZuKfyryb4MSluJ6LEUqNv1vqJeCHoE5iQc0WaDPamiP
Dnd3G/k2KHIFTlYdFVKnow0MYo+kyRKxUUL38x/tZ/WEhSv9oiNUOqTZJhkPOHOv
VaHfRdxOGV3845bWngegkXD6KGQvWT1vlfGa9XbNqxWQFqi59malm/jShnd8XJAK
gZuU9pB70lFwCglc+NQLPPrY16cYwFv1L2xU3owhtdiMydTI38Cw7hPteYPkASpa
/1EHf0pPxRhv01RtrPEsGhroXennooFTHe6U0Ay3Z0yBZbRJhoDv8PvBZ4RatdNR
p05qu2SBUWC+neecIHvbguI9x5G8egJ8WsGgDAuMcvWsW95H9oj/aONAgtL6LcsT
KHaPI9senfBTYI+ak+E9sHi/kaQIl5umvf8+B2CAh4QPhmkYvGtINH+HCZI6WdyE
tIsg+JklBgFwSBus9zHHUwwBfio2PgIlocRL6SL5Q2amcALPuDgEYdM5whIKKwYB
BAGXVQEFAQEHQKpjexO72fM4FUcrTh2r6MCyxmAF0CBUpnTQeIk5nVZ2AwEIB4h+
BBgWCgAmFiEEvKDFwwnKxWnnSpIc927+XQwiOo8FAmHTOcICGwwFCQlmAYAACgkQ
927+XQwiOo/sOgD9GOjmj2blZGtR5attfY46/9B9bBkb8kDW7LACK007YZUBAJr8
JCfIUFBfm5b/ev80rscAUSp4uTn4Z/W6ywR5STIH
=NTtt
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -3,14 +3,15 @@
%define _libexecdir %_prefix/libexec
Name: gromox
Version: 1.16
Version: 1.18
Release: 0
Summary: Groupware server backend with RPC, IMAP,POP3, PHP-MAPI support
License: AGPL-3.0-or-later AND GPL-2.0-only AND GPL-3.0-or-later
Group: Productivity/Networking/Email/Servers
URL: https://grommunio.com/
Source: https://github.com/grommunio/gromox/releases/download/gromox-%version/gromox-%version.tar.zst
Source2: https://github.com/grommunio/gromox/releases/download/gromox-%version/gromox-%version.tar.asc
Source: %name-%version.tar.xz
Source: %name-%version.tar.asc
Source8: %name.keyring
Source9: %name-rpmlintrc
BuildRequires: automake >= 1.11
BuildRequires: fdupes
@ -30,27 +31,34 @@ BuildRequires: php8-devel
%else
BuildRequires: php-devel >= 7
%endif
BuildRequires: zstd
BuildRequires: xz
BuildRequires: group(gromox)
BuildRequires: pkgconfig(fmt)
BuildRequires: pkgconfig(gumbo)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(libHX) >= 4.0
BuildRequires: pkgconfig(libHX) >= 4.3
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libpff)
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(tinyxml2) >= 8
BuildRequires: pkgconfig(zlib)
BuildRequires: user(gromox)
Requires: php-cli >= 7.4
Requires: php-fpm
%if 0%{?suse_version}
Requires: php-mysql
Requires: php-posix
%else
Requires: php-mysqlnd
Requires: php-mysqlnd
%endif
Requires: php-soap
Requires: w3m
Requires(pre): user(gromox)
Requires(pre): group(gromox)
Obsoletes: php7-mapi-gromox < %version-%release
Provides: php7-mapi-gromox = %version-%release
%{?systemd_ordering}
%if !0%{?_pamdir:1}
%define _pamdir /%_lib/security
@ -70,12 +78,11 @@ grommunio-web. The grommunio appliance ships these essentials and has a
ready-to-run installation of Gromox.
%prep
%setup -Tcq
tar --use=zstd --strip=1 -xf "%{S:0}"
%autosetup -p1
%build
autoreconf -fi
%configure
%configure CFLAGS="%optflags -Og" CXXFLAGS="%optflags -Og"
%make_build
%install
@ -102,11 +109,44 @@ find "$b" -type f -name "*.la" -delete
rm -fv "$b/%_libdir"/*.so
mkdir -p "$b/%_sysconfdir/%name" "$b/%_datadir/%name"
%if 0%{?suse_version} >= 1550
mkdir -p "$b/etc/php8/fpm/php-fpm.d"
cp -a "$b/usr/share/gromox/fpm-gromox.conf.sample" "$b/etc/php8/fpm/php-fpm.d/gromox.conf"
%endif
%if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1550
mkdir -p "$b/etc/php7/fpm/php-fpm.d"
cp -a "$b/usr/share/gromox/fpm-gromox.conf.sample" "$b/etc/php7/fpm/php-fpm.d/gromox.conf"
%endif
perl -i -lpe 's{Type=simple}{Type=simple\nRestart=on-failure}' "$b/%_unitdir"/*.service
%fdupes %buildroot/%_prefix
%global services gromox-delivery.service gromox-delivery-queue.service gromox-event.service gromox-http.service gromox-imap.service gromox-midb.service gromox-pop3.service gromox-timer.service gromox-zcore.service
%pre
if test -f /usr/share/gromox/http/php/config/config.ini; then
x=$(md5sum /usr/share/gromox/http/php/config/config.ini 2>/dev/null)
if test "${x:0:32}" = cac0cd7adb4c9e84474bd23721397b7e; then
:
elif test -e /usr/share/gromox/http/php/config/config.ini && test ! -e /etc/gromox/autodiscover.ini; then
echo "It appears you modified /usr/share/gromox/http/php/config/config.ini; moving it to /etc/gromox/"
mkdir -pv /etc/gromox
mv -v /usr/share/gromox/http/php/config/config.ini /etc/gromox/autodiscover.ini
elif test -e /usr/share/gromox/http/php/config/config.ini && test ! -e /etc/gromox/autodiscover.ini.conflict; then
echo "It appears you modified /usr/share/gromox/http/php/config/config.ini; saving it to /etc/gromox/ (check it)"
mv -v /usr/share/gromox/http/php/config/config.ini /etc/gromox/autodiscover.ini.conflict
fi
fi
# service is now out of use or entirely gone from this package,
# stop any old instances because the
# systemd macros don't do so when using rpm -U (only on rpm -e).
for i in alock amidb amysql asensor asession smtp adaptor; do
if systemctl is-active "gromox-$i" >/dev/null 2>/dev/null || \
systemctl is-enabled "gromox-$i" >/dev/null 2>/dev/null; then
echo "INFO: Deleting obsolete service gromox-$i. There may be warnings about its absence later in the upgrade, this is normal and can be ignored."
systemctl disable --now "gromox-$i.service" 2>/dev/null || :
fi
done
# User addition done a priori by system-user-gromox(!)
%if 0%{?service_add_pre:1}
%service_add_pre %services
%endif
@ -128,6 +168,27 @@ fi
# the pam module will be combined with a too old version of gromox
# libs. No good solution in sight..
/usr/bin/systemctl try-restart grommunio-chat.service php-fpm.service saslauthd.service 2>/dev/null || :
# Delete old service links
if /usr/bin/systemctl is-enabled gromox-exch.target >/dev/null 2>/dev/null; then
echo Migrating gromox-exch.target
/usr/bin/systemctl enable gromox-http.service gromox-midb.service gromox-zcore.service || :
/usr/bin/systemctl disable gromox-exch.target || :
fi
if /usr/bin/systemctl is-enabled gromox-mra.target >/dev/null 2>/dev/null; then
echo Migrating gromox-mra.target
/usr/bin/systemctl enable gromox-imap.service gromox-pop3.service || :
/usr/bin/systemctl disable gromox-mra.target || :
fi
if /usr/bin/systemctl is-enabled gromox-mta.target >/dev/null 2>/dev/null; then
echo Migrating gromox-mta.target
/usr/bin/systemctl enable gromox-delivery.service gromox-delivery-queue.service || :
/usr/bin/systemctl disable gromox-mta.target || :
fi
if /usr/bin/systemctl is-enabled gromox-sa.target >/dev/null 2>/dev/null; then
echo Migrating gromox-sa.target
/usr/bin/systemctl enable gromox-event.service gromox-timer.service || :
/usr/bin/systemctl disable gromox-sa.target || :
fi
%preun
%if 0%{?service_del_preun:1}
@ -150,7 +211,7 @@ fi
# RPM probably does not do ACL well (if at all).
# Services use ProtectSystem=, so it's ok to have g+w for grommunio-admin-api.
# pam.cfg needs to be readable by all
%attr(0771,root,gromox) %dir %_sysconfdir/%name/
%attr(0775,root,gromox) %dir %_sysconfdir/%name/
%_sbindir/gromox-*
%_libdir/*.so.*
%_libdir/%name/