summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog10
-rw-r--r--debian/control2
-rw-r--r--debian/patches/0022-Fix-findln-by-timestamp-test.patch34
-rw-r--r--debian/patches/series1
4 files changed, 46 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 3e88592..9d0a567 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+crmsh (4.6.0-2) unstable; urgency=medium
+
+ [ Athos Ribeiro ]
+ * d/patches: fix failing unit test (Closes: #1068562)
+
+ [ Valentin Vidic ]
+ * d/control: update Standards-Version to 4.7.0
+
+ -- Valentin Vidic <vvidic@debian.org> Sun, 14 Apr 2024 13:11:19 +0200
+
crmsh (4.6.0-1) unstable; urgency=medium
* New upstream version 4.6.0
diff --git a/debian/control b/debian/control
index 368c753..fdbe477 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@ Build-Depends:
python3-pygments,
python3-setuptools,
xsltproc
-Standards-Version: 4.6.2
+Standards-Version: 4.7.0
Rules-Requires-Root: no
Homepage: https://crmsh.github.io/
Vcs-Browser: https://salsa.debian.org/ha-team/crmsh
diff --git a/debian/patches/0022-Fix-findln-by-timestamp-test.patch b/debian/patches/0022-Fix-findln-by-timestamp-test.patch
new file mode 100644
index 0000000..14e996c
--- /dev/null
+++ b/debian/patches/0022-Fix-findln-by-timestamp-test.patch
@@ -0,0 +1,34 @@
+From ee77de8e8b2f9820303d9d049ad39ccf9fcc6ba3 Mon Sep 17 00:00:00 2001
+From: xin liang <xliang@suse.com>
+Date: Sun, 7 Apr 2024 09:46:13 +0800
+Subject: [PATCH] Dev: unittest: Adjust unit test
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068562
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/crmsh/+bug/2060536
+Forwarded: https://github.com/ClusterLabs/crmsh/pull/1379/commits/ee77de8e8b2f9820303d9d049ad39ccf9fcc6ba3
+Last-Update: 2024-04-10
+---
+ test/unittests/test_report_utils.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/test/unittests/test_report_utils.py
++++ b/test/unittests/test_report_utils.py
+@@ -816,7 +816,8 @@
+
+ def test_findln_by_timestamp(self):
+ target_time = "Apr 03 13:10"
+- target_time_stamp = crmutils.parse_to_timestamp(target_time+' 2023')
++ this_year = datetime.datetime.now().year
++ target_time_stamp = crmutils.parse_to_timestamp(target_time+' '+str(this_year))
+ with open('pacemaker.log') as f:
+ data = f.read()
+ constants.STAMP_TYPE = utils.determin_log_format(data)
+@@ -828,7 +829,7 @@
+ assert result_pre_line_stamp < target_time_stamp
+
+ target_time = "Apr 03 11:01:19"
+- target_time_stamp = crmutils.parse_to_timestamp(target_time+' 2023')
++ target_time_stamp = crmutils.parse_to_timestamp(target_time+' '+str(this_year))
+ result_line = utils.findln_by_timestamp(data, target_time_stamp, pacemaker_file_path)
+ result_time = ' '.join(data.split('\n')[result_line-1].split()[:3])
+ self.assertEqual(result_time, target_time)
diff --git a/debian/patches/series b/debian/patches/series
index b77d82f..b91b33a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,4 @@
0019-Remove-news-adoc.patch
0020-Replace-distutils.patch
0021-Fix-bootstrap-bash.patch
+0022-Fix-findln-by-timestamp-test.patch