[mythtv] Update to latest fixes/33 to fix ftbs on 6.5 kernel
by Andrew Bauer
commit 0e2ff5a581e886fc6601685298b4de6b2a20a7f5
Author: Andrew Bauer <zonexpertconsulting(a)outlook.com>
Date: Tue Jul 25 09:27:48 2023 -0500
Update to latest fixes/33 to fix ftbs on 6.5 kernel
recommend gnome-shell-extension-no-overview for mythfrontend
mythtv.spec | 11 +++-
v33.1..beaf2bacbe.patch => v33.1..402c6d7758.patch | 64 +++++++++++++++++-----
2 files changed, 59 insertions(+), 16 deletions(-)
---
diff --git a/mythtv.spec b/mythtv.spec
index 6751b36..1cd06c2 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 v33.1-14-gbeaf2bacbe
+%global vers_string v33.1-15-g402c6d7758
# The git date of last commit on mythtv repo
# git_date=$(git log -1 --format=%cd --date=format:"%Y%m%d")
-%global git_date 20230714
+%global git_date 20230725
# Specfile for building MythTV and MythPlugins RPMs from a git checkout.
#
@@ -470,6 +470,9 @@ Provides: mythtv-frontend-api%{?_isa} = %{mythfeapiver}
# https://www.mythtv.org/wiki/Using_MythTV#Optical_Disks
Recommends: libdvdcss
+# Disable the startup overview on newer Gnome desktops to allow proper kiosk mode
+Recommends: gnome-shell-extension-no-overview
+
%description frontend
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
@@ -1284,6 +1287,10 @@ exit 0
################################################################################
%changelog
+* Tue Jul 25 2023 Andrew Bauer <zonexpertconsulting(a)outlook.com> - 33.1-1.15.20230725gitg402c6d775
+- Update to latest fixes/33 to fix ftbs on 6.5 kernel
+- recommend gnome-shell-extension-no-overview for mythfrontend
+
* Mon Jul 24 2023 Andrew Bauer <zonexpertconsulting(a)outlook.com> - 33.1-1.14.20230714gitggbeaf2bacb
- Update to latest fixes/33
- add firewalld config for new web frontend
diff --git a/v33.1..beaf2bacbe.patch b/v33.1..402c6d7758.patch
similarity index 94%
rename from v33.1..beaf2bacbe.patch
rename to v33.1..402c6d7758.patch
index 58cbd92..eff2279 100644
--- a/v33.1..beaf2bacbe.patch
+++ b/v33.1..402c6d7758.patch
@@ -1,7 +1,7 @@
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 01/14] Arch linux refuses to accept egrep. Switch to 'grep
+Subject: [PATCH 01/15] Arch linux refuses to accept egrep. Switch to 'grep
-E'.
(cherry picked from commit bbcc7db3fdcd338af1889c8226c933cc7172715d)
@@ -26,7 +26,7 @@ index 871d9748821..cbbd696721c 100755
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 02/14] Android: OpenSSL 1.1.1 load system CA certificates
+Subject: [PATCH 02/15] Android: OpenSSL 1.1.1 load system CA certificates
explicitly Issue: 125
* Move all android library dependencies to the packaging repo
@@ -118,7 +118,7 @@ index 0b17943c309..4b9913f9d93 100644
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 03/14] Send REC_PENDING event before recording starts
+Subject: [PATCH 03/15] 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.
@@ -221,7 +221,7 @@ index 2fc66467a10..aba76438cec 100644
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 04/14] OSX: Handle constants deprecated for 11.7
+Subject: [PATCH 04/15] OSX: Handle constants deprecated for 11.7
- Fixes regression caused by deprecation of constants by Apple
in 11.5.7.
@@ -505,7 +505,7 @@ index 98b054f9874..d6da5c653c0 100644
From 7f288be61b5fa653b5afd35b0ceea3b524ae8a1c Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Sun, 12 Mar 2023 20:54:07 +0100
-Subject: [PATCH 05/14] mythtv-setup hanging at Video Sources
+Subject: [PATCH 05/15] mythtv-setup hanging at Video Sources
On Ubuntu 22.10 mythtv-setup hangs in Video Sources when creating a new Video source.
The problem has been traced to running tv_find_grabbers by MythSystemLegacy.
@@ -536,7 +536,7 @@ index 6bb169409eb..1bb70946466 100644
From b391cfb6a7ac87d245f697edb77c0114d67de683 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Fri, 17 Mar 2023 23:01:07 +0100
-Subject: [PATCH 06/14] Conversion of negative time values to string
+Subject: [PATCH 06/15] Conversion of negative time values to string
When converting a negative time value with format string "m:ss" there is
a minus sign before the minutes and also a minus sign before the seconds.
@@ -583,7 +583,7 @@ index 8f3397241a6..21a307cb453 100644
From 142a8e070841c74d200e3444f6b815cde5452809 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Sun, 26 Mar 2023 14:29:59 +0200
-Subject: [PATCH 07/14] End-of-file in MythMusic
+Subject: [PATCH 07/15] End-of-file in MythMusic
Detect end-of-file when reading music files and return the AVERROR_EOF status to FFmpeg.
In version 33 MythTV has upgraded to a version of FFmpeg that does require this.
@@ -614,7 +614,7 @@ index 92c9c6264cf..0a1b713ff09 100644
From f2a964ed814a08d8a3016e5b0b1f0979e4586360 Mon Sep 17 00:00:00 2001
From: Jan Hambrecht <jaham(a)gmx.net>
Date: Sat, 18 Mar 2023 23:16:08 +0100
-Subject: [PATCH 08/14] Fix detection of optical drives
+Subject: [PATCH 08/15] Fix detection of optical drives
Checking for mount points is not reliable to determine if a block device
is an optical drive. This commit uses the 'MediaCompatibility' property
@@ -701,7 +701,7 @@ index c9536f5584a..1a752c4aeb9 100644
From 44b1ac1d59aff9b9e4340e9a693a0e7a2b3e0799 Mon Sep 17 00:00:00 2001
From: Jan Hambrecht <jaham(a)gmx.net>
Date: Sun, 19 Mar 2023 16:20:43 +0100
-Subject: [PATCH 09/14] Remove checking 'ReadOnly' drive property
+Subject: [PATCH 09/15] Remove checking 'ReadOnly' drive property
When checking if a drive is an optical drive, rely only on the
'MediaCompatibility' property and not the 'ReadOnly' property
@@ -740,7 +740,7 @@ index 1a752c4aeb9..85ef34218d4 100644
From 0682d4d42dd50ad8592c522fe39fc8a81a11ee59 Mon Sep 17 00:00:00 2001
From: Jan Hambrecht <jaham(a)gmx.net>
Date: Sun, 19 Mar 2023 16:26:15 +0100
-Subject: [PATCH 10/14] Cleanup function 'DetectDevice'
+Subject: [PATCH 10/15] Cleanup function 'DetectDevice'
Remove dead code which is not going to be used anymore
@@ -783,7 +783,7 @@ index 85ef34218d4..36aa9f4c906 100644
From 51cb10a67855bae82a97ca1995956622b0902021 Mon Sep 17 00:00:00 2001
From: Bill Meek <bmeek(a)mythtv.org>
Date: Mon, 10 Apr 2023 10:45:38 -0500
-Subject: [PATCH 11/14] ApplyRecordRecGroupChange: replace chanid/starttime
+Subject: [PATCH 11/15] ApplyRecordRecGroupChange: replace chanid/starttime
with recordedid
Solves issue here: https://forum.mythtv.org/viewtopic.php?p=25852#p25852
@@ -814,7 +814,7 @@ index c5126376f47..a16c7f2c6bd 100644
From c4b7e4c43321154bf5eaa67af02b7ba7ea6bffb8 Mon Sep 17 00:00:00 2001
From: Bill Meek <bmeek(a)mythtv.org>
Date: Sun, 16 Apr 2023 23:59:37 -0500
-Subject: [PATCH 12/14] mythdbcon: force QMetaType::QDateTime values to use
+Subject: [PATCH 12/15] mythdbcon: force QMetaType::QDateTime values to use
MythDate::kDatabase
This cares for a recent ibqt5sql5-mysql update in at least one
@@ -880,7 +880,7 @@ index 1ec6e1ca7da..b1e251fd809 100644
From 83e1df82c2094586a585b8d5cde9de14e9be0735 Mon Sep 17 00:00:00 2001
From: Klaas de Waal <klaas(a)kldo.nl>
Date: Thu, 18 May 2023 21:00:28 +0200
-Subject: [PATCH 13/14] Fix mythbackend segfault after failed Live TV
+Subject: [PATCH 13/15] Fix mythbackend segfault after failed Live TV
A failing Live TV can cause a segfault of mythbackend
due to a delete of an already deleted object.
@@ -910,7 +910,7 @@ index 7d16a16ddb1..d4a106c6b9e 100644
From beaf2bacbe63da92da49e37807efa1738e1fa5c1 Mon Sep 17 00:00:00 2001
From: MmAaXx500 <viktor.balogh45(a)gmail.com>
Date: Thu, 6 Jul 2023 17:58:46 +0200
-Subject: [PATCH 14/14] Fix heap-use-after-free in TVRec with Live TV
+Subject: [PATCH 14/15] Fix heap-use-after-free in TVRec with Live TV
When playing Live TV continuously on the same channel, there is
a moment when according to the guide one program ends and the next
@@ -942,3 +942,39 @@ index d4a106c6b9e..2b1708176d4 100644
if (pginfo)
{
if (m_curRecording)
+
+From 402c6d7758d02733e0b4c76a80df862c977e3307 Mon Sep 17 00:00:00 2001
+From: David Hampton <mythtv(a)love2code.net>
+Date: Fri, 21 Jul 2023 00:59:43 -0400
+Subject: [PATCH 15/15] Work around Linux kernel header 6.5 using C++ reserved
+ keyword.
+
+Starting with kernel 6.5.0, a rewrite of the linux/ioprio.h header
+file uses the C++ reserved keyword "class" as a variable name.
+Fortunately we can redefine the string "class" for the duration of the
+inclusion without any ill effects.
+
+Fixes #778.
+
+(cherry picked from commit 7d6c7d605f87b697c7488d1eb4a3246b83e31f01)
+---
+ mythtv/libs/libmythbase/mythmiscutil.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/mythtv/libs/libmythbase/mythmiscutil.cpp b/mythtv/libs/libmythbase/mythmiscutil.cpp
+index 1fc0e93b0b5..6f4241268f7 100644
+--- a/mythtv/libs/libmythbase/mythmiscutil.cpp
++++ b/mythtv/libs/libmythbase/mythmiscutil.cpp
+@@ -703,7 +703,12 @@ void myth_yield(void)
+ #include <sys/ptrace.h>
+ #include <sys/syscall.h>
+ #if __has_include(<linux/ioprio.h>)
++// Starting with kernel 6.5.0, the following include uses the C++
++// reserved keyword "class" as a variable name. Fortunately we can
++// redefine it without any ill effects.
++#define class class2
+ #include <linux/ioprio.h>
++#undef class
+ #else
+ static constexpr int8_t IOPRIO_BITS { 16 };
+ static constexpr int8_t IOPRIO_CLASS_SHIFT { 13 };
1 year, 4 months
[obs-studio-freeworld] Update to 29.1.3
by Dominik Mierzejewski
commit 4960f34a61dc9e0fe5a869313372d8933a5749fe
Author: Dominik 'Rathann' Mierzejewski <dominik(a)greysector.net>
Date: Tue Jul 25 10:16:51 2023 +0200
Update to 29.1.3
obs-studio-freeworld.spec | 7 +++++--
sources | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/obs-studio-freeworld.spec b/obs-studio-freeworld.spec
index 56aeb4a..c365c56 100644
--- a/obs-studio-freeworld.spec
+++ b/obs-studio-freeworld.spec
@@ -5,7 +5,7 @@
%bcond_without lua_scripting
%endif
-%global obswebsocket_version 5.2.2
+%global obswebsocket_version 5.2.3
%global origname obs-studio
%if "%{__isa_bits}" == "64"
@@ -14,7 +14,7 @@
%global libvlc_soversion 5
Name: obs-studio-freeworld
-Version: 29.1.2
+Version: 29.1.3
Release: 1%{?dist}
Summary: Open Broadcaster Software Studio -- Freeworld plugins
@@ -264,6 +264,9 @@ mv preserve/%{_prefix} %{buildroot}
%changelog
+* Tue Jul 25 2023 Dominik Mierzejewski <dominik(a)greysector.net> - 29.1.3-1
+- Update to 29.1.3
+
* Tue Jul 04 2023 Dominik Mierzejewski <dominik(a)greysector.net> - 29.1.2-1
- Update to 29.1.2
diff --git a/sources b/sources
index b1b0383..c635c9c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (obs-studio-29.1.2.tar.gz) = cbe24fb56da38f14700cbc05fd2ad0cff1028c73bfbdecfe70332835d7d94a8cf6ccfcdc947d779e80bb6c3b49265585ba49f712659e2d923791d51642d1167f
-SHA512 (obs-websocket-5.2.2.tar.gz) = 7678e247b8cc4d9cbe650a7b45a63b47a0752ba8e08e3b02bc7bdff42ec7d122eff9bad9139edb0f268379e495bae5e8f05dd177c6f935c7b47c02858727cb28
+SHA512 (obs-studio-29.1.3.tar.gz) = 563a9b71ebe273b604807b9c43be8bde58fb326e8a0b741afb84a481a99176c96bf63da2aa26b6dcc026573b7fb0bf53e0a296e2db0b93c28f0d4710cd7cf019
+SHA512 (obs-websocket-5.2.3.tar.gz) = 76e25bc0a3eb3f6d11b123b5b193544e409cd794b4b38de4ddd634a34cfbdba023c181b81b467fb31d7b4dff17d9b66781be6f1cf0e7e66042868078022d03af
1 year, 4 months
[mythtv] Update to latest fixes/33
by Andrew Bauer
commit c031fa77eb8d613013cc7568397663004369b20d
Author: Andrew Bauer <zonexpertconsulting(a)outlook.com>
Date: Mon Jul 24 14:04:57 2023 -0500
Update to latest fixes/33
add firewalld config for new web frontend
adjust runtime requirements
mythtv-webfrontend.xml | 7 +
mythtv.spec | 29 +-
v33.1..c273ed0f9a.patch => v33.1..beaf2bacbe.patch | 450 ++++++++++++++++++++-
3 files changed, 480 insertions(+), 6 deletions(-)
---
diff --git a/mythtv-webfrontend.xml b/mythtv-webfrontend.xml
new file mode 100644
index 0000000..2194edd
--- /dev/null
+++ b/mythtv-webfrontend.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<service version="1.0">
+<short>mythtv-webfrontend</short>
+<description>Browser based frontend that replaces Mythweb</description>
+ <port port="6544-6549" protocol="tcp"/>
+</service>
+
diff --git a/mythtv.spec b/mythtv.spec
index 89b158f..6751b36 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 v33.1-4-gc273ed0f9a
+%global vers_string v33.1-14-gbeaf2bacbe
# The git date of last commit on mythtv repo
# git_date=$(git log -1 --format=%cd --date=format:"%Y%m%d")
-%global git_date 20230219
+%global git_date 20230714
# Specfile for building MythTV and MythPlugins RPMs from a git checkout.
#
@@ -69,6 +69,10 @@
# A list of which applications we want to put into the desktop menu system
%global desktop_applications mythfrontend mythtv-setup
+# This is the correct folder for firewalld service files, even on x86_64
+# It is not used for shared objects
+%global fw_services %{_prefix}/lib/firewalld/services
+
#
# Basic descriptive tags for this package:
#
@@ -139,6 +143,9 @@ Source111: 99-mythbackend.rules
Source112: mythjobqueue.service
Source113: mythdb-optimize.service
Source114: mythdb-optimize.timer
+# firewalld config for new webfrontend
+# https://www.mythtv.org/wiki/WebFrontend
+Source115: mythtv-webfrontend.xml
# Global MythTV and Shared Build Requirements
@@ -459,6 +466,10 @@ Recommends: libaacs%{?_isa}
%{?fedora:Recommends: mesa-vdpau-drivers%{?_isa}}
Provides: mythtv-frontend-api%{?_isa} = %{mythfeapiver}
+# Mythfrontend dvd menu support comes from libdvdcss
+# https://www.mythtv.org/wiki/Using_MythTV#Optical_Disks
+Recommends: libdvdcss
+
%description frontend
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
@@ -503,6 +514,9 @@ Requires: mythtv-backend%{?_isa} = %{version}-%{release}
Requires: mythtv-base-themes%{?_isa} = %{version}
Requires: google-droid-sans-fonts
+# Needed for svg channel icon support
+Requires: qt5-qtsvg
+
%description setup
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
@@ -999,6 +1013,10 @@ popd
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}:' {} ';'
+# Install firewalld config
+mkdir -p %{buildroot}%{fw_services}
+install -pm 0644 %{SOURCE115} %{buildroot}%{fw_services}/
+
%pre common
# Add the "mythtv" user, with membership in the audio and video group
getent group mythtv >/dev/null || groupadd -r mythtv
@@ -1028,6 +1046,7 @@ exit 0
%systemd_post mythbackend.service
%systemd_post mythjobqueue.service
%systemd_post mythdb-optimize.service
+ %{?firewalld_reload}
%preun backend
%systemd_preun mythbackend.service
@@ -1090,6 +1109,7 @@ exit 0
%{_datadir}/mythtv/internetcontent/
%{_datadir}/mythtv/html/
%{_datadir}/mythtv/externrecorder/
+%{fw_services}/mythtv-webfrontend.xml
%files setup
%{_bindir}/mythtv-setup
@@ -1264,6 +1284,11 @@ exit 0
################################################################################
%changelog
+* Mon Jul 24 2023 Andrew Bauer <zonexpertconsulting(a)outlook.com> - 33.1-1.14.20230714gitggbeaf2bacb
+- Update to latest fixes/33
+- add firewalld config for new web frontend
+- adjust runtime requirements
+
* Sat Jul 08 2023 Leigh Scott <leigh123linux(a)gmail.com> - 33.1-2.4.20230219gitc273ed0f9a
- Rebuilt for Python 3.12
diff --git a/v33.1..c273ed0f9a.patch b/v33.1..beaf2bacbe.patch
similarity index 52%
rename from v33.1..c273ed0f9a.patch
rename to v33.1..beaf2bacbe.patch
index 22ad0f8..58cbd92 100644
--- a/v33.1..c273ed0f9a.patch
+++ b/v33.1..beaf2bacbe.patch
@@ -1,7 +1,8 @@
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'.
+Subject: [PATCH 01/14] Arch linux refuses to accept egrep. Switch to 'grep
+ -E'.
(cherry picked from commit bbcc7db3fdcd338af1889c8226c933cc7172715d)
---
@@ -25,7 +26,7 @@ index 871d9748821..cbbd696721c 100755
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
+Subject: [PATCH 02/14] Android: OpenSSL 1.1.1 load system CA certificates
explicitly Issue: 125
* Move all android library dependencies to the packaging repo
@@ -117,7 +118,7 @@ index 0b17943c309..4b9913f9d93 100644
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
+Subject: [PATCH 03/14] 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.
@@ -220,7 +221,7 @@ index 2fc66467a10..aba76438cec 100644
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
+Subject: [PATCH 04/14] OSX: Handle constants deprecated for 11.7
- Fixes regression caused by deprecation of constants by Apple
in 11.5.7.
@@ -500,3 +501,444 @@ index 98b054f9874..d6da5c653c0 100644
return result;
io_service_t service = 0;
+
+From 7f288be61b5fa653b5afd35b0ceea3b524ae8a1c Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sun, 12 Mar 2023 20:54:07 +0100
+Subject: [PATCH 05/14] mythtv-setup hanging at Video Sources
+
+On Ubuntu 22.10 mythtv-setup hangs in Video Sources when creating a new Video source.
+The problem has been traced to running tv_find_grabbers by MythSystemLegacy.
+The fix consists of adding the kMSDontDisableDrawing flag to the invocation of MythSystemLegacy.
+It is not clear why this problem only appears on Ubuntu 22.10 and not on other distro's.
+
+Refs #690
+
+(cherry picked from commit 337500ecae712b48a2956bae5d786d6e90e4c667)
+---
+ mythtv/libs/libmythtv/videosource.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp
+index 6bb169409eb..1bb70946466 100644
+--- a/mythtv/libs/libmythtv/videosource.cpp
++++ b/mythtv/libs/libmythtv/videosource.cpp
+@@ -298,7 +298,7 @@ class XMLTVGrabber : public MythUIComboBoxSetting
+ args += "baseline";
+
+ MythSystemLegacy find_grabber_proc("tv_find_grabbers", args,
+- kMSStdOut | kMSRunShell);
++ kMSStdOut | kMSRunShell | kMSDontDisableDrawing);
+ find_grabber_proc.Run(25s);
+ LOG(VB_GENERAL, LOG_INFO,
+ loc + "Running 'tv_find_grabbers " + args.join(" ") + "'.");
+
+From b391cfb6a7ac87d245f697edb77c0114d67de683 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Fri, 17 Mar 2023 23:01:07 +0100
+Subject: [PATCH 06/14] Conversion of negative time values to string
+
+When converting a negative time value with format string "m:ss" there is
+a minus sign before the minutes and also a minus sign before the seconds.
+The implementation apparently only supports positive time interval values.
+The implementation is now extended to support negative time interval values
+by converting the absolute time value to string and then prepending a minus
+sign when the time value is negative.
+The implementation was introduced in commit 65b9c73adacabe38877c3e18af5d4a0545799c1
+"Better fix for MythDate::formatTime to handle overflows.", committed on Mar 16, 2022.
+
+Refs #733
+
+(cherry picked from commit c166849536ca2785184b5b6a20aec6bfd3b7a099)
+---
+ mythtv/libs/libmythbase/mythdate.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/mythtv/libs/libmythbase/mythdate.cpp b/mythtv/libs/libmythbase/mythdate.cpp
+index 8f3397241a6..21a307cb453 100644
+--- a/mythtv/libs/libmythbase/mythdate.cpp
++++ b/mythtv/libs/libmythbase/mythdate.cpp
+@@ -237,6 +237,9 @@ QString formatTime(std::chrono::milliseconds msecs, QString fmt)
+ static const QRegularExpression sRe("s+");
+ static const QRegularExpression zRe("z+");
+
++ bool negativeTime = msecs < 0ms;
++ msecs = std::chrono::milliseconds(std::abs(msecs.count()));
++
+ QRegularExpressionMatch match = hRe.match(fmt);
+ if (match.hasMatch())
+ {
+@@ -272,6 +275,10 @@ QString formatTime(std::chrono::milliseconds msecs, QString fmt)
+ QString text = StringUtil::intToPaddedString(value, width);
+ fmt.replace(match.capturedStart(), match.capturedLength(), text);
+ }
++
++ if (negativeTime)
++ fmt.prepend("-");
++
+ return fmt;
+ }
+
+
+From 142a8e070841c74d200e3444f6b815cde5452809 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Sun, 26 Mar 2023 14:29:59 +0200
+Subject: [PATCH 07/14] End-of-file in MythMusic
+
+Detect end-of-file when reading music files and return the AVERROR_EOF status to FFmpeg.
+In version 33 MythTV has upgraded to a version of FFmpeg that does require this.
+
+Refs #686
+
+(cherry picked from commit b9354c9f9e5672655a87078c15d6cda77702d89e)
+---
+ mythplugins/mythmusic/mythmusic/remoteavformatcontext.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h b/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h
+index 92c9c6264cf..0a1b713ff09 100644
+--- a/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h
++++ b/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h
+@@ -136,7 +136,9 @@ class RemoteAVFormatContext
+ static int ReadFunc(void *opaque, uint8_t *buf, int buf_size)
+ {
+ auto *rf = reinterpret_cast< RemoteFile* >(opaque);
+- return rf->Read(buf, buf_size);
++ int len = rf->Read(buf, buf_size);
++ int ret = ((len == 0) && (buf_size > 0)) ? AVERROR_EOF : len;
++ return ret;
+ }
+
+ static int WriteFunc(void */*opaque*/, uint8_t */*buf*/, int/*buf_size*/)
+
+From f2a964ed814a08d8a3016e5b0b1f0979e4586360 Mon Sep 17 00:00:00 2001
+From: Jan Hambrecht <jaham(a)gmx.net>
+Date: Sat, 18 Mar 2023 23:16:08 +0100
+Subject: [PATCH 08/14] Fix detection of optical drives
+
+Checking for mount points is not reliable to determine if a block device
+is an optical drive. This commit uses the 'MediaCompatibility' property
+of the 'org.freedesktop.UDisks2.Drive' DBUS interface to check if the
+drive supports optical media.
+Also changes the function name in the log messages to match the function
+they are called from.
+
+(cherry picked from commit 998669de6114706d0459214ecc030aed7489afab)
+---
+ mythtv/libs/libmyth/mediamonitor-unix.cpp | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/mythtv/libs/libmyth/mediamonitor-unix.cpp b/mythtv/libs/libmyth/mediamonitor-unix.cpp
+index c9536f5584a..1a752c4aeb9 100644
+--- a/mythtv/libs/libmyth/mediamonitor-unix.cpp
++++ b/mythtv/libs/libmyth/mediamonitor-unix.cpp
+@@ -179,7 +179,8 @@ static QVariant DriveProperty(const QDBusObjectPath& o, const std::string& kszPr
+ {
+ v = iface.property(kszProperty.c_str());
+ LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- "Udisks2:Drive:" + kszProperty.c_str() + " : " + v.toString() );
++ "Udisks2:Drive:" + kszProperty.c_str() + " : " +
++ (v.canConvert<QStringList>() ? v.toStringList().join(", ") : v.toString()) );
+ }
+ return v;
+ }
+@@ -193,18 +194,18 @@ static bool DetectDevice(const QDBusObjectPath& entry, MythUdisksDevice& device,
+ #if 0
+ QString devraw = block.property("Device").toString();
+ LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- "CheckMountable: Raw Device found: " + devraw);
++ "DetectDevice: Raw Device found: " + devraw);
+ #endif
+ if (!block.property("HintSystem").toBool() &&
+ !block.property("HintIgnore").toBool())
+ {
+ dev = block.property("Device").toString();
+ LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- "CheckMountable: Device found: " + dev);
++ "DetectDevice: Device found: " + dev);
+
+ bool readonly = block.property("ReadOnly").toBool();
+ LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- QString("CheckMountable: Device:ReadOnly '%1'").arg(readonly));
++ QString("DetectDevice: Device:ReadOnly '%1'").arg(readonly));
+
+ // ignore floppies, too slow
+ if (dev.startsWith("/dev/fd"))
+@@ -219,7 +220,7 @@ static bool DetectDevice(const QDBusObjectPath& entry, MythUdisksDevice& device,
+ bool isfsmountable = (properties.lastError().type() == QDBusError::NoError);
+
+ LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- QString(" CheckMountable:Entry:isfsmountable : %1").arg(isfsmountable));
++ QString(" DetectDevice:Entry:isfsmountable : %1").arg(isfsmountable));
+
+ // Get properties of the corresponding drive
+ // Note: the properties 'Optical' and 'OpticalBlank' needs a medium inserted
+@@ -229,17 +230,19 @@ static bool DetectDevice(const QDBusObjectPath& entry, MythUdisksDevice& device,
+ desc += " ";
+ desc += DriveProperty(drivePath, "Model").toString();
+ LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- QString("CheckMountable: Found drive '%1'").arg(desc));
++ QString("DetectDevice: Found drive '%1'").arg(desc));
++ const auto media = DriveProperty(drivePath, "MediaCompatibility").toStringList();
++ const bool isOptical = !media.filter("optical", Qt::CaseInsensitive).isEmpty();
+ #if 0
+- LOG(VB_MEDIA, LOG_DEBUG, LOC + QString("CheckMountable:Drive:Optical : %1")
++ LOG(VB_MEDIA, LOG_DEBUG, LOC + QString("DetectDevice:Drive:Optical : %1")
+ .arg(DriveProperty(drivePath, "Optical").toString()));
+- LOG(VB_MEDIA, LOG_DEBUG, LOC + QString("CheckMountable:Drive:OpticalBlank : %1")
++ LOG(VB_MEDIA, LOG_DEBUG, LOC + QString("DetectDevice:Drive:OpticalBlank : %1")
+ .arg(DriveProperty(drivePath, "OpticalBlank").toString()));
+ #endif
+
+ if (DriveProperty(drivePath, "Removable").toBool())
+ {
+- if (readonly && !isfsmountable)
++ if (readonly && isOptical)
+ {
+ device = UDisks2DVD;
+ return true;
+
+From 44b1ac1d59aff9b9e4340e9a693a0e7a2b3e0799 Mon Sep 17 00:00:00 2001
+From: Jan Hambrecht <jaham(a)gmx.net>
+Date: Sun, 19 Mar 2023 16:20:43 +0100
+Subject: [PATCH 09/14] Remove checking 'ReadOnly' drive property
+
+When checking if a drive is an optical drive, rely only on the
+'MediaCompatibility' property and not the 'ReadOnly' property
+of the 'org.freedesktop.UDisks2.Drive' interface.
+
+(cherry picked from commit 9957ffab6c452c373bc60a1b9b9c3a3212d4f8f0)
+---
+ mythtv/libs/libmyth/mediamonitor-unix.cpp | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/mythtv/libs/libmyth/mediamonitor-unix.cpp b/mythtv/libs/libmyth/mediamonitor-unix.cpp
+index 1a752c4aeb9..85ef34218d4 100644
+--- a/mythtv/libs/libmyth/mediamonitor-unix.cpp
++++ b/mythtv/libs/libmyth/mediamonitor-unix.cpp
+@@ -203,10 +203,6 @@ static bool DetectDevice(const QDBusObjectPath& entry, MythUdisksDevice& device,
+ LOG(VB_MEDIA, LOG_DEBUG, LOC +
+ "DetectDevice: Device found: " + dev);
+
+- bool readonly = block.property("ReadOnly").toBool();
+- LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- QString("DetectDevice: Device:ReadOnly '%1'").arg(readonly));
+-
+ // ignore floppies, too slow
+ if (dev.startsWith("/dev/fd"))
+ return false;
+@@ -242,7 +238,7 @@ static bool DetectDevice(const QDBusObjectPath& entry, MythUdisksDevice& device,
+
+ if (DriveProperty(drivePath, "Removable").toBool())
+ {
+- if (readonly && isOptical)
++ if (isOptical)
+ {
+ device = UDisks2DVD;
+ return true;
+
+From 0682d4d42dd50ad8592c522fe39fc8a81a11ee59 Mon Sep 17 00:00:00 2001
+From: Jan Hambrecht <jaham(a)gmx.net>
+Date: Sun, 19 Mar 2023 16:26:15 +0100
+Subject: [PATCH 10/14] Cleanup function 'DetectDevice'
+
+Remove dead code which is not going to be used anymore
+
+(cherry picked from commit 80b4911f15324440fbd04c3580922463f87a2ae1)
+---
+ mythtv/libs/libmyth/mediamonitor-unix.cpp | 12 +-----------
+ 1 file changed, 1 insertion(+), 11 deletions(-)
+
+diff --git a/mythtv/libs/libmyth/mediamonitor-unix.cpp b/mythtv/libs/libmyth/mediamonitor-unix.cpp
+index 85ef34218d4..36aa9f4c906 100644
+--- a/mythtv/libs/libmyth/mediamonitor-unix.cpp
++++ b/mythtv/libs/libmyth/mediamonitor-unix.cpp
+@@ -191,11 +191,7 @@ static bool DetectDevice(const QDBusObjectPath& entry, MythUdisksDevice& device,
+ {
+ QDBusInterface block(UDISKS2_SVC, entry.path(), UDISKS2_SVC_BLOCK,
+ QDBusConnection::systemBus() );
+-#if 0
+- QString devraw = block.property("Device").toString();
+- LOG(VB_MEDIA, LOG_DEBUG, LOC +
+- "DetectDevice: Raw Device found: " + devraw);
+-#endif
++
+ if (!block.property("HintSystem").toBool() &&
+ !block.property("HintIgnore").toBool())
+ {
+@@ -229,12 +225,6 @@ static bool DetectDevice(const QDBusObjectPath& entry, MythUdisksDevice& device,
+ QString("DetectDevice: Found drive '%1'").arg(desc));
+ const auto media = DriveProperty(drivePath, "MediaCompatibility").toStringList();
+ const bool isOptical = !media.filter("optical", Qt::CaseInsensitive).isEmpty();
+-#if 0
+- LOG(VB_MEDIA, LOG_DEBUG, LOC + QString("DetectDevice:Drive:Optical : %1")
+- .arg(DriveProperty(drivePath, "Optical").toString()));
+- LOG(VB_MEDIA, LOG_DEBUG, LOC + QString("DetectDevice:Drive:OpticalBlank : %1")
+- .arg(DriveProperty(drivePath, "OpticalBlank").toString()));
+-#endif
+
+ if (DriveProperty(drivePath, "Removable").toBool())
+ {
+
+From 51cb10a67855bae82a97ca1995956622b0902021 Mon Sep 17 00:00:00 2001
+From: Bill Meek <bmeek(a)mythtv.org>
+Date: Mon, 10 Apr 2023 10:45:38 -0500
+Subject: [PATCH 11/14] ApplyRecordRecGroupChange: replace chanid/starttime
+ with recordedid
+
+Solves issue here: https://forum.mythtv.org/viewtopic.php?p=25852#p25852
+---
+ mythtv/libs/libmythtv/recordinginfo.cpp | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
+index c5126376f47..a16c7f2c6bd 100644
+--- a/mythtv/libs/libmythtv/recordinginfo.cpp
++++ b/mythtv/libs/libmythtv/recordinginfo.cpp
+@@ -685,12 +685,10 @@ void RecordingInfo::ApplyRecordRecGroupChange(const QString &newrecgroup)
+ query.prepare("UPDATE recorded"
+ " SET recgroup = :RECGROUP, "
+ " recgroupid = :RECGROUPID "
+- " WHERE chanid = :CHANID"
+- " AND starttime = :START ;");
++ " WHERE recordedid = :RECORDEDID");
+ query.bindValue(":RECGROUP", null_to_empty(newrecgroup));
+ query.bindValue(":RECGROUPID", newrecgroupid);
+- query.bindValue(":START", m_recStartTs);
+- query.bindValue(":CHANID", m_chanId);
++ query.bindValue(":RECORDEDID", m_recordedId);
+
+ if (!query.exec())
+ MythDB::DBError("RecGroup update", query);
+
+From c4b7e4c43321154bf5eaa67af02b7ba7ea6bffb8 Mon Sep 17 00:00:00 2001
+From: Bill Meek <bmeek(a)mythtv.org>
+Date: Sun, 16 Apr 2023 23:59:37 -0500
+Subject: [PATCH 12/14] mythdbcon: force QMetaType::QDateTime values to use
+ MythDate::kDatabase
+
+This cares for a recent ibqt5sql5-mysql update in at least one
+distribution where it isn't removing timezone information from
+a query causing it to fail.
+
+Log example without patch:
+MSqlQuery::exec(DBManager16) UPDATE recorded SET recgroup = 'Deleted', recgroupid = 3 WHERE chanid = '10901' AND starttime = '2023-04-08T05:00:00.000Z' ; <<<< Took 0ms
+
+Log example with patch:
+MSqlQuery::exec(DBManager1) UPDATE recorded SET recgroup = 'Deleted', recgroupid = 3 WHERE chanid = '10901' AND starttime = '2023-04-07 05:30:00' ; <<<< Took 0ms
+
+Results seen by users on the Forum and mailing list.
+
+Credits to Mark, Roland and Klaas.
+
+See: https://forum.mythtv.org/viewtopic.php?p=25833#p25833
+
+The Debian solution is due 4/31/2023.
+
+(cherry picked from commit d889da2b0ebdbbfaa59051ae30a6b5b9a5930cdb)
+---
+ mythtv/libs/libmythbase/mythdbcon.cpp | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/mythtv/libs/libmythbase/mythdbcon.cpp b/mythtv/libs/libmythbase/mythdbcon.cpp
+index 1ec6e1ca7da..b1e251fd809 100644
+--- a/mythtv/libs/libmythbase/mythdbcon.cpp
++++ b/mythtv/libs/libmythbase/mythdbcon.cpp
+@@ -882,6 +882,15 @@ bool MSqlQuery::testDBConnection()
+
+ void MSqlQuery::bindValue(const QString &placeholder, const QVariant &val)
+ {
++#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
++ if (static_cast<QMetaType::Type>(val.type()) == QMetaType::QDateTime)
++ {
++ QSqlQuery::bindValue(placeholder,
++ MythDate::toString(val.toDateTime(), MythDate::kDatabase),
++ QSql::In);
++ return;
++ }
++#endif
+ QSqlQuery::bindValue(placeholder, val, QSql::In);
+ }
+
+@@ -897,6 +906,15 @@ void MSqlQuery::bindValueNoNull(const QString &placeholder, const QVariant &val)
+ QSqlQuery::bindValue(placeholder, QString(""), QSql::In);
+ return;
+ }
++#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
++ if (type == QMetaType::QDateTime)
++ {
++ QSqlQuery::bindValue(placeholder,
++ MythDate::toString(val.toDateTime(), MythDate::kDatabase),
++ QSql::In);
++ return;
++ }
++#endif
+ QSqlQuery::bindValue(placeholder, val, QSql::In);
+ }
+
+
+From 83e1df82c2094586a585b8d5cde9de14e9be0735 Mon Sep 17 00:00:00 2001
+From: Klaas de Waal <klaas(a)kldo.nl>
+Date: Thu, 18 May 2023 21:00:28 +0200
+Subject: [PATCH 13/14] Fix mythbackend segfault after failed Live TV
+
+A failing Live TV can cause a segfault of mythbackend
+due to a delete of an already deleted object.
+This is not immediately obvious due to pointer
+aliasing but valgrind figures it out anyway.
+
+(cherry picked from commit 68b368673704f35072dbc3fb44e0c8444d737963)
+Signed-off-by: Klaas de Waal <klaas(a)kldo.nl>
+---
+ mythtv/libs/libmythtv/tv_rec.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
+index 7d16a16ddb1..d4a106c6b9e 100644
+--- a/mythtv/libs/libmythtv/tv_rec.cpp
++++ b/mythtv/libs/libmythtv/tv_rec.cpp
+@@ -4218,6 +4218,8 @@ void TVRec::TuningNewRecorder(MPEGStreamData *streamData)
+ gCoreContext->dispatch(me);
+ }
+ TeardownRecorder(kFlagKillRec);
++ if (m_tvChain)
++ rec = nullptr;
+ goto err_ret;
+ }
+
+
+From beaf2bacbe63da92da49e37807efa1738e1fa5c1 Mon Sep 17 00:00:00 2001
+From: MmAaXx500 <viktor.balogh45(a)gmail.com>
+Date: Thu, 6 Jul 2023 17:58:46 +0200
+Subject: [PATCH 14/14] Fix heap-use-after-free in TVRec with Live TV
+
+When playing Live TV continuously on the same channel, there is
+a moment when according to the guide one program ends and the next
+program begins. At this moment the Live TV recording is stopped and
+a new recording is started. There is small time period in between
+in which there is no valid program info and an update of the program
+info from another thread in that period results then in access
+of already deleted program info instance.
+Fixed by using the m_stateChangeLock to lock the complete sequence.
+
+Refs #768
+Refs #769
+
+Signed-off-by: Klaas de Waal <klaas(a)kldo.nl>
+---
+ mythtv/libs/libmythtv/tv_rec.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
+index d4a106c6b9e..2b1708176d4 100644
+--- a/mythtv/libs/libmythtv/tv_rec.cpp
++++ b/mythtv/libs/libmythtv/tv_rec.cpp
+@@ -3339,6 +3339,8 @@ void TVRec::RingBufferChanged(MythMediaBuffer *Buffer, RecordingInfo *pginfo, Re
+ {
+ LOG(VB_GENERAL, LOG_INFO, LOC + "RingBufferChanged()");
+
++ QMutexLocker lock(&m_stateChangeLock);
++
+ if (pginfo)
+ {
+ if (m_curRecording)
1 year, 4 months