abishai@moonstar:/tmp/zm % diff -ruN bad/zoneminder-1.36.5/ good/zoneminder-1.36.5/
diff -ruN bad/zoneminder-1.36.5/CMakeLists.txt good/zoneminder-1.36.5/CMakeLists.txt
--- bad/zoneminder-1.36.5/CMakeLists.txt 2021-06-22 21:34:01.000000000 +0300
+++ good/zoneminder-1.36.5/CMakeLists.txt 2021-06-22 21:35:13.000000000 +0300
@@ -189,8 +189,14 @@
"Relative path used to install ZoneMinder's Man pages into a
non-standard folder. Most Linux users will not need to change this.
BSD users may need to set this.")
+set(ZM_CAKEPHP_CACHE "Apc" CACHE STRING
+ "Set the CakePHP cache engine, default: Apc")
# Reassign some variables if a target distro has been specified
+if(ZM_TARGET_DISTRO MATCHES "^fc")
+ set(ZM_CAKEPHP_CACHE "Memcached")
+endif()
+
if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
set(ZM_RUNDIR "/var/run/zoneminder")
set(ZM_SOCKDIR "/var/lib/zoneminder/sock")
diff -ruN bad/zoneminder-1.36.5/distros/fedora/zoneminder.spec good/zoneminder-1.36.5/distros/fedora/zoneminder.spec
--- bad/zoneminder-1.36.5/distros/fedora/zoneminder.spec 2021-06-22 21:34:01.000000000 +0300
+++ good/zoneminder-1.36.5/distros/fedora/zoneminder.spec 2021-06-22 21:35:13.000000000 +0300
@@ -17,16 +17,21 @@
# This will tell zoneminder's cmake process we are building against a known distro
%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}}
-# Fedora needs apcu backwards compatibility module
-%if 0%{?fedora}
-%global with_apcu_bc 1
-%endif
-
# Newer php's keep json functions in a subpackage
%if 0%{?fedora} || 0%{?rhel} >= 8
%global with_php_json 1
%endif
+# el7 uses cmake3 package and macros
+%if 0%{?rhel} == 7
+%global cmake %{cmake3}
+%global cmake_build %{cmake3_build}
+%global cmake_install %{cmake3_install}
+%global cmake_pkg_name cmake3
+%else
+%global cmake_pkg_name cmake
+%endif
+
# The default for everything but el7 these days
%global _hardened_build 1
@@ -56,7 +61,7 @@
BuildRequires: mariadb-devel
BuildRequires: perl-podlators
BuildRequires: polkit-devel
-BuildRequires: cmake3
+BuildRequires: %{cmake_pkg_name}
BuildRequires: gnutls-devel
BuildRequires: bzip2-devel
BuildRequires: pcre-devel
@@ -116,8 +121,8 @@
Requires: php-common
Requires: php-gd
%{?with_php_json:Requires: php-json}
-Requires: php-pecl-apcu
-%{?with_apcu_bc:Requires: php-pecl-apcu-bc}
+%{?fedora:Requires: php-pecl-memcached}
+%{?rhel:Requires: php-pecl-apcu}
Requires: cambozola
Requires: net-tools
Requires: psmisc
@@ -216,16 +221,16 @@
# See https://fedoraproject.org/wiki/LTOByDefault
%define _lto_cflags %{nil}
-%cmake3 \
+%cmake \
-DZM_WEB_USER="%{zmuid_final}" \
-DZM_WEB_GROUP="%{zmgid_final}" \
-DZM_TARGET_DISTRO="%{zmtargetdistro}" \
.
-%cmake3_build
+%cmake_build
%install
-%cmake3_install
+%cmake_install
desktop-file-install \
--dir %{buildroot}%{_datadir}/applications \
@@ -427,6 +432,10 @@
%changelog
* Tue Jun 22 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.5-1
- 1.36.5 release
+
+* Fri Jun 18 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.4-2
+- apcu-bc deprecated on fedora, use memcached instead
+- only refer to cmake3 when building on el7
* Tue Jun 08 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.4-1
- 1.36.4 release
File bad/zoneminder-1.36.5/distros/opensuse/redalert.wav is not a regular file or directory and was skipped
diff -ruN bad/zoneminder-1.36.5/distros/redhat/zoneminder.spec good/zoneminder-1.36.5/distros/redhat/zoneminder.spec
--- bad/zoneminder-1.36.5/distros/redhat/zoneminder.spec 2021-06-22 21:34:01.000000000 +0300
+++ good/zoneminder-1.36.5/distros/redhat/zoneminder.spec 2021-06-22 21:35:13.000000000 +0300
@@ -17,16 +17,21 @@
# This will tell zoneminder's cmake process we are building against a known distro
%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}}
-# Fedora needs apcu backwards compatibility module
-%if 0%{?fedora}
-%global with_apcu_bc 1
-%endif
-
# Newer php's keep json functions in a subpackage
%if 0%{?fedora} || 0%{?rhel} >= 8
%global with_php_json 1
%endif
+# el7 uses cmake3 package and macros
+%if 0%{?rhel} == 7
+%global cmake %{cmake3}
+%global cmake_build %{cmake3_build}
+%global cmake_install %{cmake3_install}
+%global cmake_pkg_name cmake3
+%else
+%global cmake_pkg_name cmake
+%endif
+
# The default for everything but el7 these days
%global _hardened_build 1
@@ -56,7 +61,7 @@
BuildRequires: mariadb-devel
BuildRequires: perl-podlators
BuildRequires: polkit-devel
-BuildRequires: cmake3
+BuildRequires: %{cmake_pkg_name}
BuildRequires: gnutls-devel
BuildRequires: bzip2-devel
BuildRequires: pcre-devel
@@ -116,8 +121,8 @@
Requires: php-common
Requires: php-gd
%{?with_php_json:Requires: php-json}
-Requires: php-pecl-apcu
-%{?with_apcu_bc:Requires: php-pecl-apcu-bc}
+%{?fedora:Requires: php-pecl-memcached}
+%{?rhel:Requires: php-pecl-apcu}
Requires: cambozola
Requires: net-tools
Requires: psmisc
@@ -216,16 +221,16 @@
# See https://fedoraproject.org/wiki/LTOByDefault
%define _lto_cflags %{nil}
-%cmake3 \
+%cmake \
-DZM_WEB_USER="%{zmuid_final}" \
-DZM_WEB_GROUP="%{zmgid_final}" \
-DZM_TARGET_DISTRO="%{zmtargetdistro}" \
.
-%cmake3_build
+%cmake_build
%install
-%cmake3_install
+%cmake_install
desktop-file-install \
--dir %{buildroot}%{_datadir}/applications \
@@ -427,6 +432,10 @@
%changelog
* Tue Jun 22 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.5-1
- 1.36.5 release
+
+* Fri Jun 18 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.4-2
+- apcu-bc deprecated on fedora, use memcached instead
+- only refer to cmake3 when building on el7
* Tue Jun 08 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.4-1
- 1.36.4 release
diff -ruN bad/zoneminder-1.36.5/web/api/app/Config/bootstrap.php.in good/zoneminder-1.36.5/web/api/app/Config/bootstrap.php.in
--- bad/zoneminder-1.36.5/web/api/app/Config/bootstrap.php.in 2021-06-22 21:34:01.000000000 +0300
+++ good/zoneminder-1.36.5/web/api/app/Config/bootstrap.php.in 2021-06-22 21:35:13.000000000 +0300
@@ -23,7 +23,7 @@
*/
// Setup a 'default' cache configuration for use in the application.
-Cache::config('default', array('engine' => 'Apc'));
+Cache::config('default', array('engine' => '@ZM_CAKEPHP_CACHE@'));
/**
* The settings below can be used to set additional paths to models, views and controllers.