commit e1e1cc3f8447827d6cded4715fb71fe81ab8443d
Author: Göran Uddeborg <goeran(a)uddeborg.se>
Date: Sat Dec 30 23:02:25 2023 +0100
Patch to expect GB in status reports, matching a patch in the base mythtv package
mythtv-space_in_GB.patch | 90 ++++++++++++++++++++++++++++++++++++++++++++++++
mythtv-status.spec | 10 +++++-
2 files changed, 99 insertions(+), 1 deletion(-)
---
diff --git a/mythtv-space_in_GB.patch b/mythtv-space_in_GB.patch
new file mode 100644
index 0000000..222c091
--- /dev/null
+++ b/mythtv-space_in_GB.patch
@@ -0,0 +1,90 @@
+--- mythtv-status-1.1.0/bin/mythtv-status.orig 2023-07-22 14:17:03.000000000 +0200
++++ mythtv-status-1.1.0/bin/mythtv-status 2023-12-30 22:36:43.000000000 +0100
+@@ -90,20 +90,13 @@
+ my @size_thresholds = (
+ {
+ 'unit' => 'TB',
+- 'threshold' => 1024 * 1024,
+- 'conversion' => 1024 * 1024,
+- 'make_integer' => 1,
+- 'make_integer_threshold' => 500,
+- },
+- {
+- 'unit' => 'GB',
+- 'threshold' => 50 * 1024, # 50GB seems like a good threshold.
++ 'threshold' => 50 * 1024,
+ 'conversion' => 1024,
+ 'make_integer' => 1,
+ 'make_integer_threshold' => 500,
+ },
+ {
+- 'unit' => 'MB',
++ 'unit' => 'GB',
+ },
+ );
+
+--- mythtv-status-1.1.0/t/05-v0.20-clean.t.orig 2023-07-22 14:17:03.000000000 +0200
++++ mythtv-status-1.1.0/t/05-v0.20-clean.t 2023-12-30 22:58:41.000000000 +0100
+@@ -13,7 +13,7 @@
+
+ like($out, qr/MythTV status for localhost/, 'Header is present');
+ like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is
present');
+-like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m,
'Total disk space is present');
++like($out, qr/^Total Disk Space: Total space is 100 TB, with 72\.2 TB used \(72%\)$/m,
'Total disk space is present');
+ unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present');
+ like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and
recording');
+ like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is
present (the news)');
+@@ -24,7 +24,7 @@
+
+ like($out, qr/MythTV status for localhost/, 'Header is present');
+ unlike($out, qr/^Status as of\.*:/m, 'Status line is not present');
+-like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m,
'Total disk space is present');
++like($out, qr/^Total Disk Space: Total space is 100 TB, with 72\.2 TB used \(72%\)$/m,
'Total disk space is present');
+ unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present');
+ like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and
recording');
+ like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is
present (the news)');
+@@ -35,7 +35,7 @@
+
+ like($out, qr/MythTV status for localhost/, 'Header is present');
+ like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is
present');
+-unlike($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m,
'Total disk space is not present');
++unlike($out, qr/^Total Disk Space: Total space is 100 TB, with 72\.2 TB used \(72%\)$/m,
'Total disk space is not present');
+ unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present');
+ like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and
recording');
+ like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is
present (the news)');
+@@ -46,7 +46,7 @@
+
+ like($out, qr/MythTV status for localhost/, 'Header is present');
+ like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is
present');
+-like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m,
'Total disk space is present');
++like($out, qr/^Total Disk Space: Total space is 100 TB, with 72\.2 TB used \(72%\)$/m,
'Total disk space is present');
+ unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present');
+ unlike($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is not
present');
+ like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is
present (the news)');
+@@ -57,7 +57,7 @@
+
+ like($out, qr/MythTV status for localhost/, 'Header is present');
+ like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is
present');
+-like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m,
'Total disk space is present');
++like($out, qr/^Total Disk Space: Total space is 100 TB, with 72\.2 TB used \(72%\)$/m,
'Total disk space is present');
+ unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present');
+ like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and
recording');
+ unlike($out, qr/^Recording Now:\s+3 News \(TV3\) Ends: 19:00:00$/m, 'Recording now
is not present');
+@@ -70,7 +70,7 @@
+
+ like($out, qr/MythTV status for localhost/, 'Header is present');
+ like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is
present');
+-like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m,
'Total disk space is present');
++like($out, qr/^Total Disk Space: Total space is 100 TB, with 72\.2 TB used \(72%\)$/m,
'Total disk space is present');
+ unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present');
+ like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and
recording');
+ like($out, qr/^Recording Now:\s+3 News \(TV3\), Enc: 9, Chan: 3, Ends: 19:00:00$/m,
'Recording now is present (the news) with encoder details');
+@@ -83,7 +83,7 @@
+
+ like($out, qr/MythTV status for localhost/, 'Header is present');
+ like($out, qr/^\* Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is
present (with bullet)');
+-like($out, qr/^\* Total Disk Space: Total space is 100 GB, with 72\.2 GB used
\(72%\)$/m, 'Total disk space is present (with bullet)');
++like($out, qr/^\* Total Disk Space: Total space is 100 TB, with 72\.2 TB used
\(72%\)$/m, 'Total disk space is present (with bullet)');
+ unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present');
+ like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and
recording');
+ like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is
present (the news)');
diff --git a/mythtv-status.spec b/mythtv-status.spec
index acaf1f5..81d6ff0 100644
--- a/mythtv-status.spec
+++ b/mythtv-status.spec
@@ -1,6 +1,6 @@
Name: mythtv-status
Version: 1.0.1
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Get the current status of your MythTV system at the command line
Summary(sv): Hämta ett MythTV-systems status på kommandoraden
License: GPLv3
@@ -9,6 +9,9 @@
Source0:
http://www.etc.gen.nz/projects/mythtv/tarballs/mythtv-status-%{version}
Source1: sysconfig
# Patch for Fedora specifics
Patch0: mythtv-status-fedora.patch
+# To match a corresponding patch in the base mythtv package; it reports in GB
+# rather than MB as upstreams.
+Patch3: mythtv-space_in_GB.patch
BuildArch: noarch
# For perl dependency auto-detection
BuildRequires: perl-generators
@@ -44,6 +47,7 @@ Uppdateringen körs en gång i timmen. Den resulterande motd:n baseras
på
%prep
%setup -q
%patch0 -p1 -b .orig
+%patch3 -p1 -b .orig
%build
pod2man bin/mythtv-status man/mythtv-status.1
@@ -77,6 +81,10 @@ chmod 755
%{buildroot}%{_sysconfdir}/cron.hourly/mythtv-update-motd.cron
%config %{_sysconfdir}/sysconfig/%{name}
%changelog
+* Sat Dec 30 2023 Göran Uddeborg <goeran(a)uddeborg.se> - 1.0.1-10
+- Patch to expect GB in status reports, matching a patch in the base mythtv
+ package
+
* Sun Aug 07 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
1.0.1-9
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg
5.1