diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index 20c99fb42..1ad6e79a6 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -165,8 +165,8 @@ Operating System Requirements The following operating systems are currently supported by SOGo: -* Red Hat Enterprise Linux (RHEL) Server 6, 7 and 8 -* Community ENTerprise Operating System (CentOS) 6, 7 and 8 +* Red Hat Enterprise Linux (RHEL) Server 7 and 8 +* Community ENTerprise Operating System (CentOS) 7 and 8 * Debian GNU/Linux 7.0 (Wheezy), 8.0 (Jessie), 9.0 (Stretch) and 10.0 (Buster) * Ubuntu 14.04 (Trusty), 16.04 (Xenial), 18.04 (Bionic) and 20.04 (Focal) diff --git a/packaging/rhel/sogo.spec b/packaging/rhel/sogo.spec index 082f02bf7..fa8744d5f 100644 --- a/packaging/rhel/sogo.spec +++ b/packaging/rhel/sogo.spec @@ -1,12 +1,5 @@ %{!?sogo_major_version: %global sogo_major_version %(/bin/echo %{sogo_version} | /bin/cut -f 1 -d .)} -# Systemd for fedora >= 17 or el 7 -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 - %global _with_systemd 1 -%else - %global _with_systemd 0 -%endif - %define sogo_user sogo Summary: SOGo @@ -21,37 +14,13 @@ Group: Productivity/Groupware Source: SOGo-%{sogo_version}.tar.gz Prefix: /usr AutoReqProv: off -Requires: gnustep-base >= 1.23, sope%{sope_major_version}%{sope_minor_version}-core, httpd, sope%{sope_major_version}%{sope_minor_version}-core, sope%{sope_major_version}%{sope_minor_version}-appserver, sope%{sope_major_version}%{sope_minor_version}-ldap, sope%{sope_major_version}%{sope_minor_version}-cards >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-gdl1-contentstore >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-sbjson, libmemcached, memcached, libzip +Requires: gnustep-base >= 1.23, sope%{sope_major_version}%{sope_minor_version}-core, httpd, sope%{sope_major_version}%{sope_minor_version}-core, sope%{sope_major_version}%{sope_minor_version}-appserver, sope%{sope_major_version}%{sope_minor_version}-ldap, sope%{sope_major_version}%{sope_minor_version}-cards >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-gdl1-contentstore >= %{sogo_version}, sope%{sope_major_version}%{sope_minor_version}-sbjson, lasso, libmemcached, memcached, libcurl, libzip, liboath, libsodium BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -BuildRequires: gcc-objc gnustep-base gnustep-make sope%{sope_major_version}%{sope_minor_version}-appserver-devel sope%{sope_major_version}%{sope_minor_version}-core-devel sope%{sope_major_version}%{sope_minor_version}-ldap-devel sope%{sope_major_version}%{sope_minor_version}-mime-devel sope%{sope_major_version}%{sope_minor_version}-xml-devel sope%{sope_major_version}%{sope_minor_version}-gdl1-devel sope%{sope_major_version}%{sope_minor_version}-sbjson-devel libmemcached-devel sed libzip-devel %{?oc_build_depends} +BuildRequires: gcc-objc gnustep-base gnustep-make sope%{sope_major_version}%{sope_minor_version}-appserver-devel sope%{sope_major_version}%{sope_minor_version}-core-devel sope%{sope_major_version}%{sope_minor_version}-ldap-devel sope%{sope_major_version}%{sope_minor_version}-mime-devel sope%{sope_major_version}%{sope_minor_version}-xml-devel sope%{sope_major_version}%{sope_minor_version}-gdl1-devel sope%{sope_major_version}%{sope_minor_version}-sbjson-devel lasso-devel libmemcached-devel sed libcurl-devel libzip-devel liboath-devel libsodium-devel - -# Required by MS Exchange freebusy lookups -%{?el6:Requires: libcurl} -%{?el6:BuildRequires: libcurl-devel} - -# saml is enabled everywhere except on el5 since its glib2 is prehistoric %define saml2_cfg_opts "--enable-saml2" %define mfa_cfg_opts "--enable-mfa" -%{?el6:%define mfa_cfg_opts ""} -%{?el6:Requires: lasso} -%{?el6:BuildRequires: lasso-devel} -%{?el7:Requires: lasso} -%{?el7:BuildRequires: lasso-devel} -%{?el7:Requires: liboath} -%{?el7:BuildRequires: liboath-devel} -%{?el8:Requires: lasso} -%{?el8:BuildRequires: lasso-devel} -%{?el8:Requires: liboath} -%{?el8:BuildRequires: liboath-devel} - -%if 0%{?rhel} >= 7 -Requires: libsodium -BuildRequires: libsodium-devel %define sodium_cfg_opts "--enable-sodium" -%else -%define sodium_cfg_opts "--disable-sodium" -%endif %description SOGo is a groupware server built around OpenGroupware.org (OGo) and @@ -163,11 +132,7 @@ rm -fr ${RPM_BUILD_ROOT} # ****************************** build ******************************** %build -%if 0%{?rhel} >= 7 -. /usr/lib64/GNUstep/Makefiles/GNUstep.sh -%else -. /usr/share/GNUstep/Makefiles/GNUstep.sh -%endif +/usr/lib64/GNUstep/Makefiles/GNUstep.sh ./configure %saml2_cfg_opts %mfa_cfg_opts %sodium_cfg_opts case %{_target_platform} in @@ -200,13 +165,8 @@ make DESTDIR=${RPM_BUILD_ROOT} \ CC="$cc" LDFLAGS="$ldflags" \ install -%if 0%{?_with_systemd} - install -d ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -%else - install -d ${RPM_BUILD_ROOT}/etc/init.d -%endif - -install -d ${RPM_BUILD_ROOT}/etc/cron.d +install -d ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ +install -d ${RPM_BUILD_ROOT}/etc/cron.d install -d ${RPM_BUILD_ROOT}/etc/cron.daily install -d ${RPM_BUILD_ROOT}/etc/logrotate.d install -d ${RPM_BUILD_ROOT}/etc/sysconfig @@ -223,18 +183,11 @@ install -m 600 Scripts/sogo.cron ${RPM_BUILD_ROOT}/etc/cron.d/sogo cp Scripts/tmpwatch ${RPM_BUILD_ROOT}/etc/cron.daily/sogo-tmpwatch chmod 755 ${RPM_BUILD_ROOT}/etc/cron.daily/sogo-tmpwatch cp Scripts/logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/sogo - -%if 0%{?_with_systemd} - cp Scripts/sogo-systemd-redhat ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service - chmod 644 ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service - mkdir ${RPM_BUILD_ROOT}/etc/tmpfiles.d - cp Scripts/sogo-systemd.conf ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf - chmod 644 ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf -%else - cp Scripts/sogo-init.d-redhat ${RPM_BUILD_ROOT}/etc/init.d/sogod - chmod 755 ${RPM_BUILD_ROOT}/etc/init.d/sogod -%endif - +cp Scripts/sogo-systemd-redhat ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service +chmod 644 ${RPM_BUILD_ROOT}/usr/lib/systemd/system/sogod.service +mkdir ${RPM_BUILD_ROOT}/etc/tmpfiles.d +cp Scripts/sogo-systemd.conf ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf +chmod 644 ${RPM_BUILD_ROOT}/etc/tmpfiles.d/sogo.conf cp Scripts/sogo-default ${RPM_BUILD_ROOT}/etc/sysconfig/sogo rm -rf ${RPM_BUILD_ROOT}%{_bindir}/test_quick_extract @@ -254,12 +207,8 @@ rm -fr ${RPM_BUILD_ROOT} %files -n sogo %defattr(-,root,root,-) -%if 0%{?_with_systemd} /usr/lib/systemd/system/sogod.service /etc/tmpfiles.d/sogo.conf -%else -/etc/init.d/sogod -%endif /etc/cron.daily/sogo-tmpwatch %dir %attr(0700, %sogo_user, %sogo_user) %{_var}/lib/sogo %dir %attr(0700, %sogo_user, %sogo_user) %{_var}/log/sogo @@ -356,25 +305,15 @@ find %{_libdir}/GNUstep/SOGo/WebServerResources -exec touch {} \; # make shells scripts in documentation directory executable find %{_docdir}/ -name '*.sh' -exec chmod a+x {} \; -%if 0%{?_with_systemd} - systemctl daemon-reload - systemctl enable sogod - systemctl try-restart sogod > /dev/null 2>&1 -%else - /sbin/chkconfig --add sogod - /etc/init.d/sogod condrestart > /dev/null 2>&1 -%endif +systemctl daemon-reload +systemctl enable sogod +systemctl try-restart sogod > /dev/null 2>&1 %preun if [ "$1" == "0" ] then - %if 0%{?_with_systemd} - systemctl disable sogod - systemctl stop sogod > /dev/null 2>&1 - %else - /sbin/chkconfig --del sogod - /sbin/service sogod stop > /dev/null 2>&1 - %endif + systemctl disable sogod + systemctl stop sogod > /dev/null 2>&1 fi %postun