[mythtv] Update to latest fixes/33
by Andrew Bauer
commit 84da7d86b0152d66b4d7f810b9f3fb42ad799729
Author: Andrew Bauer <zonexpertconsulting(a)outlook.com>
Date: Sun Feb 26 12:50:53 2023 -0600
Update to latest fixes/33
remove support for rhel7
mythtv no longer needs fftw
.gitignore | 1 +
mythtv.spec | 120 +-
sources | 2 +-
update_fixes.sh | 8 +-
v32.0..44f88ed468.patch | 5056 -----------------------------------------------
v33.1..c273ed0f9a.patch | 502 +++++
6 files changed, 531 insertions(+), 5158 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 261e46a..8e2318f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@ mythtv-0.27.5.tar.gz
/v31.0..05c16580e1.patch
/v31.0..0680b37c68.patch
/mythtv-32.0.tar.gz
+/mythtv-33.1.tar.gz
diff --git a/mythtv.spec b/mythtv.spec
index d0b4d8a..7dee84d 100644
--- a/mythtv.spec
+++ b/mythtv.spec
@@ -1,9 +1,9 @@
# The full MythTV Version string is computed from the output of git describe.
-%global vers_string v32.0-76-g44f88ed468
+%global vers_string v33.1-4-gc273ed0f9a
# The git date of last commit on mythtv repo
# git_date=$(git log -1 --format=%cd --date=format:"%Y%m%d")
-%global git_date 20221129
+%global git_date 20230219
# Specfile for building MythTV and MythPlugins RPMs from a git checkout.
#
@@ -58,6 +58,7 @@
################################################################################
%define _lto_cflags %{nil}
+%global py_prefix python3
# These values are computed from git describe provided earlier
%global githash %(c=%{vers_string}; echo $c|cut -d"-" -f3)
@@ -68,14 +69,12 @@
# A list of which applications we want to put into the desktop menu system
%global desktop_applications mythfrontend mythtv-setup
-%global branch fixes/32
-
#
# Basic descriptive tags for this package:
#
Name: mythtv
-Version: 32.0
-Release: 6%{rel_string}%{?dist}
+Version: 33.1
+Release: 1%{rel_string}%{?dist}
Summary: A digital video recorder (DVR) application
# The primary license is GPLv2+, but bits are borrowed from a number of
@@ -86,6 +85,7 @@ Source0: https://github.com/MythTV/%{name}/archive/v%{version}/%{name}-%{
Patch0: https://github.com/MythTV/%{name}/compare/v%{version}..%{shorthash}.patch
Patch1: %{name}-space_in_GB.patch
+%global major_rel %(c=%{version}; echo $c|cut -d"." -f1)
################################################################################
@@ -118,14 +118,6 @@ Patch1: %{name}-space_in_GB.patch
%bcond_without mythzoneminder
%bcond_with mythnetvision
-# Python2 prefix for building on rhel
-%if 0%{?rhel} && 0%{?rhel} < 8
-%global py_prefix python2
-%else
-%global py_prefix python3
-%endif
-
-
################################################################################
#
### THE BELOW IS NOW AUTOMATED BY SCRIPTS IN SCM ###
@@ -165,11 +157,7 @@ BuildRequires: qt5-qtbase-devel >= 5.2
BuildRequires: qt5-qtscript-devel >= 5.2
BuildRequires: qt5-qtwebkit-devel >= 5.2
BuildRequires: freetype-devel >= 2
-%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: mariadb-connector-c-devel
-%else
-BuildRequires: mariadb-devel >= 5
-%endif
BuildRequires: libcec-devel >= 1.7
BuildRequires: libvpx-devel
BuildRequires: lm_sensors-devel
@@ -242,13 +230,9 @@ BuildRequires: libraw1394-devel
BuildRequires: hdhomerun-devel
BuildRequires: %{py_prefix}-future
-%if 0%{?fedora} || 0%{?rhel} >= 8
# For ttvdb.py, not available in EPEL
BuildRequires: %{py_prefix}-requests
BuildRequires: %{py_prefix}-requests-cache
-%else
-BuildRequires: python-requests
-%endif
%if %{with vdpau}
BuildRequires: libvdpau-devel
@@ -263,11 +247,7 @@ BuildRequires: systemd-devel
%endif
%if %{with mythgame}
-%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: minizip-compat-devel
-%else
-BuildRequires: minizip-devel
-%endif
%endif
@@ -297,13 +277,8 @@ BuildRequires: perl(IO::Socket::INET6)
BuildRequires: %{py_prefix}-setuptools
BuildRequires: %{py_prefix}-devel
BuildRequires: %{py_prefix}-simplejson
-%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: %{py_prefix}-mysqlclient
BuildRequires: %{py_prefix}-lxml
-%else
-BuildRequires: MySQL-python
-BuildRequires: python-lxml
-%endif
%endif
# Plugin Build Requirements
@@ -443,11 +418,7 @@ Summary: Development files for mythtv
Requires: mythtv-libs%{?_isa} = %{version}-%{release}
-%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: mariadb-connector-c-devel
-%else
-BuildRequires: mariadb-devel >= 5
-%endif
Requires: qt5-qtbase-devel%{?_isa} >= 5.2
Requires: qt5-qtscript-devel%{?_isa} >= 5.2
Requires: qt5-qtwebkit-devel%{?_isa} >= 5.2
@@ -480,18 +451,10 @@ Requires: mythtv-common%{?_isa} = %{version}-%{release}
Requires: mythtv-base-themes%{?_isa} = %{version}-%{release}
# RHBZ 1838780 - mariadb lacks mysql provides on el8
-%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: (mysql%{?_isa} >= 5 or mariadb%{?_isa})
-%else
-Requires: mysql%{?_isa} >= 5
-%endif
Requires: %{py_prefix}-MythTV = %{version}-%{release}
-%if 0%{?fedora} || 0%{?rhel} >= 8
Recommends: libaacs%{?_isa}
-%else
-Requires: libaacs%{?_isa}
-%endif
%{?fedora:Requires: google-droid-sans-mono-fonts}
%{?fedora:Recommends: mesa-vdpau-drivers%{?_isa}}
Provides: mythtv-frontend-api%{?_isa} = %{mythfeapiver}
@@ -516,12 +479,8 @@ Requires: mythtv-common%{?_isa} = %{version}-%{release}
Requires: mythtv-libs%{?_isa} = %{version}-%{release}
Requires: mythtv-setup%{?_isa}
Requires: %{py_prefix}-future
-%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: %{py_prefix}-requests
Requires: %{py_prefix}-requests-cache
-%else
-Requires: python-requests
-%endif
Requires(pre): shadow-utils
Conflicts: xmltv-grabbers < 0.5.37
@@ -557,12 +516,8 @@ mythtv backend.
Summary: Common components needed by multiple other MythTV components
# For ttvdb.py
Requires: %{py_prefix}-future
-%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: %{py_prefix}-requests
Requires: %{py_prefix}-requests-cache
-%else
-Requires: python-requests
-%endif
%description common
MythTV provides a unified graphical interface for recording and viewing
@@ -619,22 +574,12 @@ Provides a PHP-based interface to interacting with MythTV.
%package -n %{py_prefix}-MythTV
Summary: Python bindings for MythTV
-%if 0%{?fedora} || 0%{?rhel} >= 8
%{?python_provide:%python_provide python3-%{name}}
Obsoletes: python2-MythTV < 30.0-9.20190601git6bd8cd4993
-%else
-%{?python_provide:%python_provide python2-%{name}}
-%{?python_provide:%python_provide python2-MythTV}
-%endif
BuildArch: noarch
-%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: %{py_prefix}-mysqlclient
Requires: %{py_prefix}-lxml
-%else
-Requires: MySQL-python
-Requires: python-lxml
-%endif
%description -n %{py_prefix}-MythTV
Provides a python-based interface to interacting with MythTV.
@@ -692,13 +637,8 @@ Requires: dvdauthor%{?_isa} >= 0.6.11
Requires: ffmpeg%{?_isa} >= 0.4.9
Requires: mjpegtools%{?_isa} >= 1.6.2
Requires: genisoimage%{?_isa}
-%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: %{py_prefix}-mysqlclient
Requires: %{py_prefix}-pillow
-%else
-Requires: MySQL-python
-Requires: python-pillow
-%endif
Requires: pmount%{?_isa}
%description -n mytharchive
@@ -823,7 +763,7 @@ pushd mythtv
# Set the mythtv --version string
cat > EXPORTED_VERSION <<EOF
SOURCE_VERSION=%{vers_string}
-BRANCH=%{branch}
+BRANCH=fixes/%{major_rel}
EOF
# Drop execute permissions on contrib bits, since they'll be %%doc
@@ -860,12 +800,8 @@ pushd mythtv
%if ! %{with vaapi}
--disable-vaapi \
%endif
-%if 0%{?fedora} || 0%{?rhel} >= 8
--python=%{__python3} \
--enable-libvpx \
-%else
- --python=%{__python2} \
-%endif
--enable-libmp3lame \
--enable-libx264 \
--enable-libx265 \
@@ -965,12 +901,7 @@ pushd mythplugins
--disable-mythnetvision \
%endif
--enable-opengl \
-%if 0%{?fedora} || 0%{?rhel} >= 8
- --python=%{__python3} \
-%else
- --python=%{__python2} \
-%endif
- --enable-fftw
+ --python=%{__python3}
%make_build V=1
popd
@@ -1065,13 +996,8 @@ popd
%endif
# Fixes ERROR: ambiguous python shebang
-%if 0%{?fedora} || 0%{?rhel} >= 8
find %{buildroot}%{_datadir}/mythtv/ -type f -name "*.py" -exec sed -i '1s:#!/usr/bin/env python$:#!%{__python3}:' {} ';'
find %{buildroot}%{_datadir}/mythtv/ -type f -name "*.py" -exec sed -i '1s:#!/usr/bin/python$:#!%{__python3}:' {} ';'
-%else
-find %{buildroot}%{_datadir}/mythtv/ -type f -name "*.py" -exec sed -i '1s:#!/usr/bin/env python$:#!%{__python2}:' {} ';'
-find %{buildroot}%{_datadir}/mythtv/ -type f -name "*.py" -exec sed -i '1s:#!/usr/bin/python$:#!%{__python2}:' {} ';'
-%endif
%pre common
# Add the "mythtv" user, with membership in the audio and video group
@@ -1195,16 +1121,16 @@ exit 0
%{_datadir}/mythtv/themes/
%files libs
-%{_libdir}/libmyth-32.so.*
-%{_libdir}/libmythbase-32.so.*
-%{_libdir}/libmythfreemheg-32.so.*
-%{_libdir}/libmythmetadata-32.so.*
-%{_libdir}/libmythprotoserver-32.so.*
-%{_libdir}/libmythservicecontracts-32.so.*
-%{_libdir}/libmythtv-32.so.*
-%{_libdir}/libmythui-32.so.*
-%{_libdir}/libmythupnp-32.so.*
-%{_libdir}/libmythexiv2-*.so.32*
+%{_libdir}/libmyth-%{major_rel}.so.*
+%{_libdir}/libmythbase-%{major_rel}.so.*
+%{_libdir}/libmythfreemheg-%{major_rel}.so.*
+%{_libdir}/libmythmetadata-%{major_rel}.so.*
+%{_libdir}/libmythprotoserver-%{major_rel}.so.*
+%{_libdir}/libmythservicecontracts-%{major_rel}.so.*
+%{_libdir}/libmythtv-%{major_rel}.so.*
+%{_libdir}/libmythui-%{major_rel}.so.*
+%{_libdir}/libmythupnp-%{major_rel}.so.*
+%{_libdir}/libmythexiv2-*.so.%{major_rel}*
%files devel
%{_includedir}/*
@@ -1238,13 +1164,8 @@ exit 0
%files -n %{py_prefix}-MythTV
%{_bindir}/mythpython
%{_bindir}/mythwikiscripts
-%if 0%{?fedora} || 0%{?rhel} >= 8
%{python3_sitelib}/MythTV/
%{python3_sitelib}/MythTV-*.egg-info
-%else
-%{python2_sitelib}/MythTV/
-%{python2_sitelib}/MythTV-*.egg-info
-%endif
%endif
%if %{with plugins}
@@ -1343,6 +1264,11 @@ exit 0
################################################################################
%changelog
+* Sun Feb 26 2023 Andrew Bauer <zonexpertconsulting(a)outlook.com> - 33.1-1.4.20230219gitgc273ed0f9
+- Update to latest fixes/33
+- remove support for rhel7
+- mythtv no longer needs fftw
+
* Sun Dec 04 2022 Andrew Bauer <zonexpertconsulting(a)outlook.com> - 32.0-6.76.20221129gitg44f88ed46
- Update to latest fixes/32
- Take a minimalist approach with devel subpackage dependencies by removing most. See bz 6501
diff --git a/sources b/sources
index 66a8de8..1ebe8e5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mythtv-32.0.tar.gz) = 6a1472c954b929319a570d76769ababad43d086d53b6679c9d6da91446677f04b71918b326bb4ff0fc16fbaf7d9a447a86f623a6f1399f9ed29ca86a9782396c
+SHA512 (mythtv-33.1.tar.gz) = 4dc2943915e5e3ca047edc0a005a9e0b58edf7bc51c7fb097a6715bbbb52028260065a7f52f35e4ed98559cc4f4ccca76f1cf6ae68e76b1f2d06a1befd4776e9
diff --git a/update_fixes.sh b/update_fixes.sh
index 35cad67..885eac5 100755
--- a/update_fixes.sh
+++ b/update_fixes.sh
@@ -1,11 +1,11 @@
-RAWHIDE=37
-REPOS="f36 f35 f34 el8 el7"
+RAWHIDE=38
+REPOS="f37 f36 f35 el9 el8"
if ! [ -d "mythtv" ]; then
git clone https://github.com/MythTV/mythtv.git
fi
-version=32.0
-branch=fixes/32
+version=33.1
+branch=fixes/33
pushd mythtv
git checkout $branch
git pull
diff --git a/v33.1..c273ed0f9a.patch b/v33.1..c273ed0f9a.patch
new file mode 100644
index 0000000..22ad0f8
--- /dev/null
+++ b/v33.1..c273ed0f9a.patch
@@ -0,0 +1,502 @@
+From 3db72cc1d34609a1e07ec44b0d999c673501963c Mon Sep 17 00:00:00 2001
+From: David Hampton <mythtv(a)love2code.net>
+Date: Mon, 6 Feb 2023 22:53:49 -0500
+Subject: [PATCH 1/4] Arch linux refuses to accept egrep. Switch to 'grep -E'.
+
+(cherry picked from commit bbcc7db3fdcd338af1889c8226c933cc7172715d)
+---
+ mythtv/version.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mythtv/version.sh b/mythtv/version.sh
+index 871d9748821..cbbd696721c 100755
+--- a/mythtv/version.sh
++++ b/mythtv/version.sh
+@@ -80,7 +80,7 @@ else
+ esac
+ fi
+
+-if ! echo "${SOURCE_VERSION}" | egrep -i "v[0-9]+.*" ; then
++if ! echo "${SOURCE_VERSION}" | grep -Ei "v[0-9]+.*" ; then
+ # Invalid version - use SRC_VERSION file
+ echo "WARNING: Invalid source version ${SOURCE_VERSION}, must start with v and a number, will use SRC_VERSION file instead"
+ . $GITTREEDIR/SRC_VERSION
+
+From 0c373c3b98e2cf8426457ff75be2935ec6f53248 Mon Sep 17 00:00:00 2001
+From: Mark Spieth <mspieth(a)digivation.com.au>
+Date: Sat, 11 Feb 2023 13:48:57 +1100
+Subject: [PATCH 2/4] Android: OpenSSL 1.1.1 load system CA certificates
+ explicitly Issue: 125
+
+* Move all android library dependencies to the packaging repo
+---
+ mythtv/programs/mythfrontend/mythfrontend.cpp | 6 +++
+ mythtv/programs/mythfrontend/mythfrontend.pro | 53 +------------------
+ 2 files changed, 8 insertions(+), 51 deletions(-)
+
+diff --git a/mythtv/programs/mythfrontend/mythfrontend.cpp b/mythtv/programs/mythfrontend/mythfrontend.cpp
+index 8cc6448a365..221fe507236 100644
+--- a/mythtv/programs/mythfrontend/mythfrontend.cpp
++++ b/mythtv/programs/mythfrontend/mythfrontend.cpp
+@@ -1892,6 +1892,12 @@ Q_DECL_EXPORT int main(int argc, char **argv)
+ SignalHandler::SetHandler(SIGUSR2, handleSIGUSR2);
+ #endif
+
++#if defined(Q_OS_ANDROID)
++ auto config = QSslConfiguration::defaultConfiguration();
++ config.setCaCertificates(QSslConfiguration::systemCaCertificates());
++ QSslConfiguration::setDefaultConfiguration(config);
++#endif
++
+ int retval = cmdline.ConfigureLogging();
+ if (retval != GENERIC_EXIT_OK)
+ return retval;
+diff --git a/mythtv/programs/mythfrontend/mythfrontend.pro b/mythtv/programs/mythfrontend/mythfrontend.pro
+index 0b17943c309..4b9913f9d93 100644
+--- a/mythtv/programs/mythfrontend/mythfrontend.pro
++++ b/mythtv/programs/mythfrontend/mythfrontend.pro
+@@ -132,55 +132,6 @@ using_libdns_sd {
+ }
+
+ android {
+-
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libbluray.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libicudata70.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libexiv2.14.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libfreetype.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libharfbuzz.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libfribidi.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libiconv.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libass.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libtag.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libxml2.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libfontconfig.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)liblzo2.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libicuuc70.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libicui18n70.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)mariadb/libmariadb.so
+-
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libexiv2.14.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)liblzo2.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libicudata65.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libicui18n65.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libicuuc65.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libbluray.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libxml2.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libfreetype.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)mariadb/libmariadb.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libfontconfig.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libtag.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libfribidi.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libass.so
+- #ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libiconv.so
+-
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libmythavutil.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libmythpostproc.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libmythavfilter.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libmythswresample.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libmythswscale.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libmythavcodec.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIBCOMMON)libmythavformat.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmythbase-$${LIBVERSION}.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmythui-$${LIBVERSION}.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmythservicecontracts-$${LIBVERSION}.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmythupnp-$${LIBVERSION}.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmyth-$${LIBVERSION}.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmythtv-$${LIBVERSION}.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmythmetadata-$${LIBVERSION}.so
+- ANDROID_EXTRA_LIBS += $$(MYTHINSTALLLIB)libmythprotoserver-$${LIBVERSION}.so
+-
+- ANDROID_PACKAGE_SOURCE_DIR += $$(MYTHPACKAGEBASE)/android-package-source
+-
+- ANDROID_MIN_SDK_VERSION = $$(ANDROID_MIN_SDK_VERSION)
++ message( myth android lib include $$(ANDROID_QT_DEPENDENCY_INCLUDE) )
++ include ( $$(ANDROID_QT_DEPENDENCY_INCLUDE) )
+ }
+
+From a803b198a84e04aa9a83dee5047193e431e9b3ed Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Thu, 9 Feb 2023 21:44:34 +0100
+Subject: [PATCH 3/4] Send REC_PENDING event before recording starts
+
+Fix the logic that sends the REC_PENDING event.
+- REC_PENDING event is sent always before the REC_STARTED.
+- REC_PENDING event is sent at 120, 90, 60 and 30 seconds before the start of the recording.
+- Start of the recording is the scheduled program start time plus the RecordPreRoll setting value.
+- When a recording is scheduled to start recording immediately then there is
+ one REC_PENDING event with 0 seconds immediately followed by the REC_STARTED event.
+- The setting WakeUpThreshold specifies how early the slave backends are signaled to start
+ before the recording is started. This setting is used as configured, but now with a minimum
+ value of RecordPreRoll plus 120 seconds so that there is always time for the REC_PENDING events.
+
+(cherry picked from commit 55a7d8293004b0cadb921a383b44a0fb9954a287)
+---
+ mythtv/programs/mythbackend/scheduler.cpp | 45 ++++++++++++++++-------
+ 1 file changed, 32 insertions(+), 13 deletions(-)
+
+diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
+index 2fc66467a10..aba76438cec 100644
+--- a/mythtv/programs/mythbackend/scheduler.cpp
++++ b/mythtv/programs/mythbackend/scheduler.cpp
+@@ -2118,6 +2118,10 @@ void Scheduler::run(void)
+ idleWaitForRecordingTime =
+ gCoreContext->GetDurSetting<std::chrono::minutes>("idleWaitForRecordingTime", 15min);
+
++ // Wakeup slaves at least 2 minutes before recording starts.
++ // This allows also REC_PENDING events.
++ wakeThreshold = std::max(wakeThreshold, prerollseconds + 120s);
++
+ QElapsedTimer t; t.start();
+ if (HandleReschedule())
+ {
+@@ -2169,6 +2173,31 @@ void Scheduler::run(void)
+ }
+ }
+
++ // Wake any slave backends that need waking
++ curtime = MythDate::current();
++ for (auto it = startIter; it != m_recList.end(); ++it)
++ {
++ auto secsleft = std::chrono::seconds(curtime.secsTo((*it)->GetRecordingStartTime()));
++ auto timeBeforePreroll = secsleft - prerollseconds;
++ if (timeBeforePreroll <= wakeThreshold)
++ {
++ HandleWakeSlave(**it, prerollseconds);
++
++ // Adjust wait time until REC_PENDING event
++ if (timeBeforePreroll > 0s)
++ {
++ std::chrono::seconds waitpending;
++ if (timeBeforePreroll > 120s)
++ waitpending = timeBeforePreroll -120s;
++ else
++ waitpending = std::min(timeBeforePreroll, 30s);
++ nextWakeTime = MythDate::current().addSecs(waitpending.count());
++ }
++ }
++ else
++ break;
++ }
++
+ // Start any recordings that are due to be started
+ // & call RecordPending for recordings due to start in 30 seconds
+ // & handle RecStatus::Tuning updates
+@@ -2186,17 +2215,6 @@ void Scheduler::run(void)
+ if (m_recListChanged)
+ continue;
+
+- /// Wake any slave backends that need waking
+- curtime = MythDate::current();
+- for (auto it = startIter; it != m_recList.end(); ++it)
+- {
+- auto secsleft = std::chrono::seconds(curtime.secsTo((*it)->GetRecordingStartTime()));
+- if ((secsleft - prerollseconds) <= wakeThreshold)
+- HandleWakeSlave(**it, prerollseconds);
+- else
+- break;
+- }
+-
+ if (statuschanged)
+ {
+ MythEvent me("SCHEDULE_CHANGE");
+@@ -2547,13 +2565,14 @@ void Scheduler::HandleWakeSlave(RecordingInfo &ri, std::chrono::seconds prerolls
+ bool pendingEventSent = false;
+ for (size_t i = 0; i < kSysEventSecs.size(); i++)
+ {
+- if (((secsleft - prerollseconds) <= kSysEventSecs[i]) && (secsleft > 0s) &&
++ auto pending_secs = std::max((secsleft - prerollseconds), 0s);
++ if ((pending_secs <= kSysEventSecs[i]) &&
+ (!m_sysEvents[i].contains(sysEventKey)))
+ {
+ if (!pendingEventSent)
+ {
+ SendMythSystemRecEvent(
+- QString("REC_PENDING SECS %1").arg((secsleft - prerollseconds).count()), &ri);
++ QString("REC_PENDING SECS %1").arg(pending_secs.count()), &ri);
+ }
+
+ m_sysEvents[i].insert(sysEventKey);
+
+From c273ed0f9a2491b7f6ec377be0a0a861f7788849 Mon Sep 17 00:00:00 2001
+From: jhoyt4 <john.hoyt(a)gmail.com>
+Date: Sat, 18 Feb 2023 09:42:47 -0500
+Subject: [PATCH 4/4] OSX: Handle constants deprecated for 11.7
+
+ - Fixes regression caused by deprecation of constants by Apple
+ in 11.5.7.
+ - Initial fix for macOS 12 introduced in commit 3787583
+
+(cherry picked from commit df7903b418da240e0ed5ea9bcb981a921ff4e8de)
+---
+ mythtv/libs/libmyth/audio/audiooutputca.cpp | 44 +++++++++----------
+ .../libmythbase/platforms/mythpowerosx.cpp | 8 ++--
+ mythtv/libs/libmythui/devices/AppleRemote.cpp | 8 ++--
+ .../libmythui/platforms/mythutilscocoa.mm | 8 ++--
+ 4 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/mythtv/libs/libmyth/audio/audiooutputca.cpp b/mythtv/libs/libmyth/audio/audiooutputca.cpp
+index beef4941a62..a23c8bfcdf7 100644
+--- a/mythtv/libs/libmyth/audio/audiooutputca.cpp
++++ b/mythtv/libs/libmyth/audio/audiooutputca.cpp
+@@ -26,9 +26,9 @@
+ #include "libmythbase/mythcorecontext.h"
+ #include "audiooutputca.h"
+
+-#if !defined(MAC_OS_VERSION_12_0)
+-#define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster
+-#endif
++// kAudioObjectPropertyElementMaster was deprecated in OS_X 12
++// kAudioObjectPropertyElementMaster defaults to a main/master port value of 0
++static constexpr int8_t kMythAudioObjectPropertyElementMain { 0 };
+
+ #define LOC QString("CoreAudio: ")
+
+@@ -551,7 +551,7 @@ AudioDeviceID CoreAudioData::GetDeviceWithName(const QString &deviceName)
+ {
+ kAudioHardwarePropertyDevices,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ OSStatus err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &pa,
+@@ -605,7 +605,7 @@ AudioDeviceID CoreAudioData::GetDefaultOutputDevice()
+ {
+ kAudioHardwarePropertyDefaultOutputDevice,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ // Find the ID of the default Device
+@@ -633,7 +633,7 @@ int CoreAudioData::GetTotalOutputChannels()
+ {
+ kAudioDevicePropertyStreamConfiguration,
+ kAudioDevicePropertyScopeOutput, // Scope needs to be set to output to find output streams
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ OSStatus err = AudioObjectGetPropertyDataSize(mDeviceID, &pa,
+@@ -677,7 +677,7 @@ QString *CoreAudioData::GetName()
+ {
+ kAudioObjectPropertyName,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ CFStringRef name;
+@@ -705,7 +705,7 @@ bool CoreAudioData::GetAutoHogMode()
+ {
+ kAudioHardwarePropertyHogModeIsAllowed,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ OSStatus err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &pa, 0, nullptr, &size, &val);
+@@ -725,7 +725,7 @@ void CoreAudioData::SetAutoHogMode(bool enable)
+ {
+ kAudioHardwarePropertyHogModeIsAllowed,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ OSStatus err = AudioObjectSetPropertyData(kAudioObjectSystemObject, &pa, 0, nullptr,
+@@ -745,7 +745,7 @@ pid_t CoreAudioData::GetHogStatus()
+ {
+ kAudioDevicePropertyHogMode,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ OSStatus err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &pa, 0, nullptr,
+@@ -767,7 +767,7 @@ bool CoreAudioData::SetHogStatus(bool hog)
+ {
+ kAudioDevicePropertyHogMode,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ // According to Jeff Moore (Core Audio, Apple), Setting kAudioDevicePropertyHogMode
+@@ -831,7 +831,7 @@ bool CoreAudioData::SetMixingSupport(bool mix)
+ {
+ kAudioDevicePropertySupportsMixing,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+ OSStatus err = AudioObjectSetPropertyData(mDeviceID, &pa, 0, nullptr,
+ sizeof(mixEnable), &mixEnable);
+@@ -857,7 +857,7 @@ bool CoreAudioData::GetMixingSupport()
+ {
+ kAudioDevicePropertySupportsMixing,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+ OSStatus err = AudioObjectGetPropertyData(mDeviceID, &pa, 0, nullptr,
+ &size, &val);
+@@ -879,7 +879,7 @@ AudioStreamIDVec CoreAudioData::StreamsList(AudioDeviceID d)
+ {
+ kAudioDevicePropertyStreams,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ err = AudioObjectGetPropertyDataSize(d, &pa,
+@@ -925,7 +925,7 @@ AudioStreamRangedVec CoreAudioData::FormatsList(AudioStreamID s)
+ // Bugfix: kAudioStreamPropertyPhysicalFormats, is meant to only give array of AudioStreamBasicDescription
+ kAudioStreamPropertyAvailablePhysicalFormats, // gives array of AudioStreamRangedDescription
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ // Retrieve all the stream formats supported by this output stream
+@@ -987,7 +987,7 @@ RatesVec CoreAudioData::RatesList(AudioDeviceID d)
+ {
+ kAudioDevicePropertyAvailableNominalSampleRates,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ // retrieve size of rate list
+@@ -1119,7 +1119,7 @@ int CoreAudioData::OpenAnalog()
+ {
+ kAudioHardwarePropertyDevices,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ Debug("OpenAnalog: Entering");
+@@ -1511,7 +1511,7 @@ bool CoreAudioData::OpenSPDIF()
+ {
+ kAudioStreamPropertyPhysicalFormat,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ // Retrieve the original format of this stream first
+@@ -1628,7 +1628,7 @@ int CoreAudioData::AudioStreamChangeFormat(AudioStreamID s,
+ {
+ kAudioStreamPropertyPhysicalFormat,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+ OSStatus err = AudioObjectSetPropertyData(s, &pa, 0, nullptr,
+ sizeof(format), &format);
+@@ -1682,7 +1682,7 @@ void CoreAudioData::ResetAudioDevices()
+ {
+ kAudioHardwarePropertyDevices,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ OSStatus err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &pa,
+@@ -1728,7 +1728,7 @@ void CoreAudioData::ResetStream(AudioStreamID s)
+ {
+ kAudioStreamPropertyPhysicalFormat,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+
+@@ -1777,7 +1777,7 @@ QMap<QString, QString> *AudioOutputCA::GetDevices(const char */*type*/)
+ {
+ kAudioHardwarePropertyDevices,
+ kAudioObjectPropertyScopeGlobal,
+- kAudioObjectPropertyElementMain
++ kMythAudioObjectPropertyElementMain
+ };
+
+ OSStatus err = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &pa,
+diff --git a/mythtv/libs/libmythbase/platforms/mythpowerosx.cpp b/mythtv/libs/libmythbase/platforms/mythpowerosx.cpp
+index 60e4903be1e..bc743022016 100644
+--- a/mythtv/libs/libmythbase/platforms/mythpowerosx.cpp
++++ b/mythtv/libs/libmythbase/platforms/mythpowerosx.cpp
+@@ -8,9 +8,9 @@
+ #include <IOKit/ps/IOPSKeys.h>
+ #include <AvailabilityMacros.h>
+
+-#if !defined(MAC_OS_VERSION_12_0)
+-#define kIOMainPortDefault kIOMasterPortDefault
+-#endif
++// kIOMainPortDefault was deprecated in OS_X 12
++// kIOMainPortDefault defaults to a main/master port value of 0
++static constexpr int8_t kMythIOMainPortDefault { 0 };
+
+ #define LOC QString("PowerOSX: ")
+
+@@ -65,7 +65,7 @@ void MythPowerOSX::Init(void)
+
+ // Is there a battery?
+ CFArrayRef batteryinfo = NULL;
+- if (IOPMCopyBatteryInfo(kIOMainPortDefault, &batteryinfo) == kIOReturnSuccess)
++ if (IOPMCopyBatteryInfo(kMythIOMainPortDefault, &batteryinfo) == kIOReturnSuccess)
+ {
+ CFRelease(batteryinfo);
+
+diff --git a/mythtv/libs/libmythui/devices/AppleRemote.cpp b/mythtv/libs/libmythui/devices/AppleRemote.cpp
+index 3749ba894c9..e79db57e270 100644
+--- a/mythtv/libs/libmythui/devices/AppleRemote.cpp
++++ b/mythtv/libs/libmythui/devices/AppleRemote.cpp
+@@ -23,9 +23,9 @@
+
+ #include "libmythbase/mythlogging.h"
+
+-#if !defined(MAC_OS_VERSION_12_0)
+-#define kIOMainPortDefault kIOMasterPortDefault
+-#endif
++// kIOMainPortDefault was deprecated in OS_X 12
++// kIOMainPortDefault defaults to a main/master port value of 0
++static constexpr int8_t kMythIOMainPortDefault { 0 };
+
+ AppleRemote* AppleRemote::_instance = nullptr;
+
+@@ -193,7 +193,7 @@ static io_object_t _findAppleRemoteDevice(const char *devName)
+ hidMatchDictionary = IOServiceMatching(devName);
+
+ // check for matching devices
+- ioReturnValue = IOServiceGetMatchingServices(kIOMainPortDefault,
++ ioReturnValue = IOServiceGetMatchingServices(kMythIOMainPortDefault,
+ hidMatchDictionary,
+ &hidObjectIterator);
+
+diff --git a/mythtv/libs/libmythui/platforms/mythutilscocoa.mm b/mythtv/libs/libmythui/platforms/mythutilscocoa.mm
+index 98b054f9874..d6da5c653c0 100644
+--- a/mythtv/libs/libmythui/platforms/mythutilscocoa.mm
++++ b/mythtv/libs/libmythui/platforms/mythutilscocoa.mm
+@@ -6,9 +6,9 @@
+ #import <IOKit/graphics/IOGraphicsLib.h>
+ #include <AvailabilityMacros.h>
+
+-#if !defined(MAC_OS_VERSION_12_0)
+-#define kIOMainPortDefault kIOMasterPortDefault
+-#endif
++// kIOMainPortDefault was deprecated in OS_X 12
++// kIOMainPortDefault defaults to a main/master port value of 0
++static constexpr int8_t kMythIOMainPortDefault { 0 };
+
+ CGDirectDisplayID GetOSXCocoaDisplay(void* View)
+ {
+@@ -44,7 +44,7 @@ QByteArray GetOSXEDID(CGDirectDisplayID Display)
+ CFMutableDictionaryRef matching = IOServiceMatching("IODisplayConnect");
+
+ io_iterator_t iter;
+- if (IOServiceGetMatchingServices(kIOMainPortDefault, matching, &iter))
++ if (IOServiceGetMatchingServices(kMythIOMainPortDefault, matching, &iter))
+ return result;
+
+ io_service_t service = 0;
1 year, 9 months
[zoneminder/el7: 2/2] Merge branch 'master' into el7
by Andrew Bauer
commit b2a45e75a10a8b3f57a3867878564d7fc8967156
Merge: 1e0c234 5aa1597
Author: Andrew Bauer <zonexpertconsulting(a)outlook.com>
Date: Sun Feb 26 08:43:32 2023 -0600
Merge branch 'master' into el7
.gitignore | 1 +
sources | 2 +-
zoneminder.spec | 5 ++++-
3 files changed, 6 insertions(+), 2 deletions(-)
---
1 year, 9 months
[zoneminder/el8] 1.36.33 release
by Andrew Bauer
Summary of changes:
5aa1597... 1.36.33 release (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 9 months
[zoneminder/el9] 1.36.33 release
by Andrew Bauer
Summary of changes:
5aa1597... 1.36.33 release (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 9 months
[zoneminder/f35] 1.36.33 release
by Andrew Bauer
Summary of changes:
5aa1597... 1.36.33 release (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 9 months
[zoneminder/f36] 1.36.33 release
by Andrew Bauer
Summary of changes:
5aa1597... 1.36.33 release (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 9 months
[zoneminder/f37] 1.36.33 release
by Andrew Bauer
Summary of changes:
5aa1597... 1.36.33 release (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 9 months
[zoneminder/f38] 1.36.33 release
by Andrew Bauer
Summary of changes:
5aa1597... 1.36.33 release (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 9 months