From cfe62c770dc994dc38ef7b8a331d1127928207bfea245772cd111705c7fe2436 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 1 Sep 2021 10:06:32 +0000 Subject: [PATCH] Package import OBS-URL: https://build.opensuse.org/package/show/server:mail/gromox?expand=0&rev=1 --- .gitattributes | 23 +++++ .gitignore | 1 + _service | 16 ++++ debian.changelog | 5 + debian.compat | 1 + debian.control | 23 +++++ debian.rules | 3 + gromox-1.1.43.566b624e.tar.xz | 3 + gromox-rpmlintrc | 1 + gromox.changes | 4 + gromox.dsc | 39 ++++++++ gromox.spec | 171 ++++++++++++++++++++++++++++++++++ 12 files changed, 290 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 debian.changelog create mode 100644 debian.compat create mode 100644 debian.control create mode 100644 debian.rules create mode 100644 gromox-1.1.43.566b624e.tar.xz create mode 100644 gromox-rpmlintrc create mode 100644 gromox.changes create mode 100644 gromox.dsc create mode 100644 gromox.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..b785af2 --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + gromox + git + https://github.com/grommunio/gromox + master + gromox-1.1 + @PARENT_TAG@.@TAG_OFFSET@.%h + gromox-?(.*) + + + *.tar + xz + + + diff --git a/debian.changelog b/debian.changelog new file mode 100644 index 0000000..9bec076 --- /dev/null +++ b/debian.changelog @@ -0,0 +1,5 @@ +gromox (1.1.43.566b624e-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..905ed59 --- /dev/null +++ b/debian.control @@ -0,0 +1,23 @@ +Source: gromox +Priority: optional +Section: mail +Maintainer: Gromox +Standards-Version: 4.5.0 + +Package: gromox +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: php-cli, php-mysql, php-soap, w3m, ${shlibs:Depends}, ${misc:Depends} +Description: Groupware server (backend) with RPCH, IMAP and Z-MAPI support + . + Gromox is the central groupware server component of grommunio. It is + capable of serving as a replacement for Microsoft Exchange and + compatibles. Connectivity options include Outlook Anywhere + (RPC-over-HTTP), IMAP/POP3, an SMTP-speaking LDA, and a PHP module + with a Z-MAPI function subset. + . + Gromox relies on other components to provide a sensibly complete mail + system, such as Postfix as a mail transfer agent, and grommunio-admin + for user management. A webmail client interface is available with + grommunio-web. The grommunio appliance for example ships such a + ready-to-run installation of Gromox. diff --git a/debian.rules b/debian.rules new file mode 100644 index 0000000..ce2f684 --- /dev/null +++ b/debian.rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ --parallel --with autoreconf diff --git a/gromox-1.1.43.566b624e.tar.xz b/gromox-1.1.43.566b624e.tar.xz new file mode 100644 index 0000000..c03dfa5 --- /dev/null +++ b/gromox-1.1.43.566b624e.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0366bd646017d4e5f85127be4aad08250509727f59f75dec9831ab96226c74ba +size 972076 diff --git a/gromox-rpmlintrc b/gromox-rpmlintrc new file mode 100644 index 0000000..ff05238 --- /dev/null +++ b/gromox-rpmlintrc @@ -0,0 +1 @@ +addFilter("suse-pam-unauthorized-module") diff --git a/gromox.changes b/gromox.changes new file mode 100644 index 0000000..24cc067 --- /dev/null +++ b/gromox.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Sep 1 10:03:05 UTC 2021 - Jan Engelhardt + +- Initial entry for build.opensuse.org (gromox-1.1.43.566b624e) diff --git a/gromox.dsc b/gromox.dsc new file mode 100644 index 0000000..4b7a095 --- /dev/null +++ b/gromox.dsc @@ -0,0 +1,39 @@ +Format: 1.0 +Source: gromox +Architecture: any all +Version: 1.1.43.566b624e +DEBTRANSFORM-RELEASE: 1 +Maintainer: Gromox +Homepage: https://gromox.com +Standards-Version: 4.5.0 +Build-Depends: + autoconf (>= 2.69), + automake (>= 1:1.11) | automake1.11, + autotools-dev, + binutils (>= 2.20), + debhelper (>= 12), + devscripts, + fakeroot, + g++ (>= 7), + gettext, + libbfio-dev, + libgumbo-dev, + libhx-dev (>= 3), + libjsoncpp-dev (>= 1.4.0), + libldap2-dev, + libmariadbclient-dev | libmysqlclient-dev | libmariadb-dev, + libpam0g-dev, + libpff-dev, + libsqlite3-dev, + libssl-dev, + libtool (>= 2), + libtool-bin (>= 2) | libtool (>= 2), + lsb-release, + m4, + openssl, + php-dev (>= 7.0), + pkg-config (>= 0.23), + systemd, + uuid-dev, + zlib1g-dev +Files: diff --git a/gromox.spec b/gromox.spec new file mode 100644 index 0000000..9378f6c --- /dev/null +++ b/gromox.spec @@ -0,0 +1,171 @@ + + +%define _libexecdir %_prefix/libexec + +Name: gromox +Version: 1.1.43.566b624e +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: %name-%version.tar.xz +Source9: %name-rpmlintrc +BuildRequires: automake >= 1.11 +BuildRequires: fdupes +BuildRequires: gcc-c++ +%if 0%{?suse_version} +BuildRequires: libmysqlclient-devel >= 5.6 +%else +BuildRequires: mysql-devel >= 5.6 +%endif +BuildRequires: libtool >= 2 +BuildRequires: make +BuildRequires: openldap2-devel +BuildRequires: pam-devel +BuildRequires: pkg-config +%if 0%{?suse_version} >= 1550 +BuildRequires: php8-devel +%else +BuildRequires: php-devel >= 7 +%endif +BuildRequires: xz +BuildRequires: group(gromox) +BuildRequires: pkgconfig(gumbo) +BuildRequires: pkgconfig(jsoncpp) +BuildRequires: pkgconfig(libHX) >= 3 +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(libpff) +BuildRequires: pkgconfig(libssl) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(zlib) +BuildRequires: user(gromox) +Requires: php-cli >= 7.4 +Requires: php-mysql +Requires: php-soap +Requires: w3m +Requires(pre): user(gromox) +Requires(pre): group(gromox) +%{?systemd_ordering} +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +%define pamdir /%_lib/security +%else +%define pamdir %_libdir/security +%endif + +%description +Gromox is the central groupware server component of grommunio. It is +capable of serving as a replacement for Microsoft Exchange and +compatibles. Connectivity options include RPC/HTTP (Outlook +Anywhere), MAPI/HTTP, IMAP, POP3, an SMTP-speaking LDA, and a PHP +module with a Z-MAPI function subset. + +Gromox relies on other components to provide a sensibly complete mail +system, such as Postfix as a mail transfer agent, and grommunio-admin +for user management. A webmail client interface is available with +grommunio-web. The grommunio appliance for example ships such a +ready-to-run installation of Gromox. + +%prep +%autosetup -p1 + +%build +autoreconf -fi +%configure CFLAGS="%optflags -Og" CXXFLAGS="%optflags -Og" +%make_build + +%install +b="%buildroot" +%make_install +for i in /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 \ + /var/lib/gromox/queue/timer /var/lib/gromox/user \ + /var/log/gromox /run/gromox \ + /usr/lib/sysctl.d; do + mkdir -p "$b/$i" +done + +cat <<-EOF >"$b/usr/lib/sysctl.d/50-gromox.conf" + # privdrop mechanism not optimal yet + fs.suid_dumpable=2 +EOF + +find "$b" -type f -name "*.la" -delete +rm -fv "$b/%_libdir"/*.so +%if "%pamdir" != "%_libdir/security" +mkdir -p "$b/%pamdir" +mv "$b/%_libdir/security"/* "$b/%pamdir/" +%endif + +mkdir -p "$b/%_sysconfdir/%name" "$b/%_datadir/%name" +mkdir -p "$b/%_sysusersdir" "$b/%_tmpfilesdir" +ln -s "%_datadir/gromox/tmpfiles-gromox.conf" "$b/%_tmpfilesdir/gromox.conf" + +perl -i -lpe 's{Type=simple}{Type=simple\nRestart=on-failure}' "$b/%_unitdir"/*.service +%fdupes %buildroot/%_prefix + +%global services gromox-adaptor.service 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 0%{?service_add_pre:1} +%service_add_pre %services +%endif + +%post +/sbin/ldconfig +%tmpfiles_create gromox.conf +%if 0%{?service_add_post:1} +%service_add_post %services +%else +%systemd_post %services +%endif +if ! test -x /usr/bin/systemctl; then + exit 0 +fi +/usr/bin/systemctl try-restart php-fpm.service || : + +%preun +%if 0%{?service_del_preun:1} +%service_del_preun %services +%else +%systemd_preun %services +%endif + +%postun +%if 0%{?service_del_postun:1} +%service_del_postun %services +%else +%systemd_postun_with_restart %services +%endif +/sbin/ldconfig + +%files +%_sysconfdir/php* +# Somehow need to give grommunio-admin-api write permissions. +# 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/ +%_sbindir/gromox-* +%_libdir/*.so.* +%_libdir/%name/ +%_libdir/php*/ +%_prefix/lib/sysctl.d/ +%_libexecdir/%name/ +%pamdir/ +%_datadir/%name/ +%_mandir/man*/*.[0-9]* +%_tmpfilesdir/*.conf +%_unitdir/* +%attr(0770,gromox,gromox) /var/lib/gromox/ +%attr(0770,gromox,gromox) /var/log/gromox/ +%attr(0770,gromox,gromox) %ghost /run/gromox/ +%if 0%{?suse_version} >= 1500 && 0%{?suse_version} < 1550 +%dir %_libexecdir +%endif +%license LICENSE.txt +%doc doc/changelog.rst + +%changelog