diff --git a/SOURCES/0000-lib-Seek-beginning-of-mountinfo-file.patch b/SOURCES/0000-lib-Seek-beginning-of-mountinfo-file.patch new file mode 100644 index 0000000..97b4523 --- /dev/null +++ b/SOURCES/0000-lib-Seek-beginning-of-mountinfo-file.patch @@ -0,0 +1,34 @@ +From c767c5b858c88aa9fad0ca3aa80e5fd18c6d830d Mon Sep 17 00:00:00 2001 +From: Matej Marusak +Date: Tue, 4 Dec 2018 09:38:32 +0100 +Subject: [PATCH 0/2] lib: Seek beginning of mountinfo file + +Signed-off-by: Matej Marusak +(cherry picked from commit c8afd2847f59278faac8d12c150db1d29f7ad622) +--- + src/lib/get_cmdline.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/lib/get_cmdline.c b/src/lib/get_cmdline.c +index 83c2fb45..49d419d5 100644 +--- a/src/lib/get_cmdline.c ++++ b/src/lib/get_cmdline.c +@@ -905,6 +905,7 @@ int process_has_own_root_at(int pid_proc_fd) + close(mnt_fd); + return r; + } ++ fseek(fin, 0, SEEK_SET); + + r = get_mountinfo_for_mount_point(fin, &pid_root, "/"); + fclose(fin); +@@ -925,6 +926,7 @@ int process_has_own_root_at(int pid_proc_fd) + return r; + } + ++ fseek(fin, 0, SEEK_SET); + r = get_mountinfo_for_mount_point(fin, &system_root, "/"); + fclose(fin); + if (r) +-- +2.21.0 + diff --git a/SOURCES/0001-testsuite-Correct-string-format.patch b/SOURCES/0001-testsuite-Correct-string-format.patch new file mode 100644 index 0000000..70fd2b7 --- /dev/null +++ b/SOURCES/0001-testsuite-Correct-string-format.patch @@ -0,0 +1,27 @@ +From e8e69f0bf6f0bf067bc7f58f018a74c35d469342 Mon Sep 17 00:00:00 2001 +From: Matej Marusak +Date: Tue, 4 Dec 2018 11:47:16 +0100 +Subject: [PATCH 1/2] testsuite: Correct string format + +Signed-off-by: Matej Marusak +(cherry picked from commit 7b123846bc8baa3ff3a6ab8b4e1c5c062d666b5f) +--- + tests/reported_to.at | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/reported_to.at b/tests/reported_to.at +index ecf323d8..f95971f7 100644 +--- a/tests/reported_to.at ++++ b/tests/reported_to.at +@@ -221,7 +221,7 @@ bool parse_and_check(const char *reported_to, GList *expected) + + if(e->timestamp != c->timestamp) + { +- printf("Timestamps: '%lld' != '%lld'\n", e->timestamp, c->timestamp); ++ printf("Timestamps: '%ld' != '%ld'\n", e->timestamp, c->timestamp); + goto finish; + } + +-- +2.21.0 + diff --git a/SOURCES/0002-lib-Explicitly-do-not-use-DST.patch b/SOURCES/0002-lib-Explicitly-do-not-use-DST.patch new file mode 100644 index 0000000..46bf669 --- /dev/null +++ b/SOURCES/0002-lib-Explicitly-do-not-use-DST.patch @@ -0,0 +1,33 @@ +From a5fbbd2fca0c8cd2a3c0c9a898dca37addf4b2e0 Mon Sep 17 00:00:00 2001 +From: Matej Marusak +Date: Thu, 6 Dec 2018 11:59:56 +0100 +Subject: [PATCH 2/2] lib: Explicitly do not use DST + +DST = Daylight Saving Time +Value of this field is not set up by strptime and therefore value +of `tm_isdst` field is undefined. Bacause of this reason, output of +`mktime` may differ +-1 hour. + +Signed-off-by: Matej Marusak +(cherry picked from commit bd7b93d056d780df18b377f5c553611deeff2443) +--- + src/lib/iso_date_string.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/lib/iso_date_string.c b/src/lib/iso_date_string.c +index ab23f05b..cb887832 100644 +--- a/src/lib/iso_date_string.c ++++ b/src/lib/iso_date_string.c +@@ -61,6 +61,9 @@ int iso_date_string_parse(const char *date, time_t *pt) + return -EINVAL; + } + ++ // daylight saving time not in use ++ local.tm_isdst = 0; ++ + *pt = mktime(&local); + return 0; + } +-- +2.21.0 + diff --git a/SPECS/libreport.spec b/SPECS/libreport.spec index 593b84a..37bf8e0 100644 --- a/SPECS/libreport.spec +++ b/SPECS/libreport.spec @@ -37,7 +37,7 @@ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.ta Patch0001: 0001-ureport-use-python3-to-get-consumerCertDir.patch Patch0002: 0002-Remove-option-to-screencast-problems.patch Patch0003: 0003-offer-reporting-to-Bugzilla-only-for-pre-GA-Anaconda.patch -Patch0004: 0004-replace-all-Fedora-URLs-by-corresponding-values-for-.patch +#Patch0004: 0004-replace-all-Fedora-URLs-by-corresponding-values-for-.patch Patch0005: 0005-coverity-fix-def6.patch Patch0006: 0006-coverity-fix-def7.patch Patch0007: 0007-coverity-fix-def9.patch @@ -70,6 +70,10 @@ Patch0028: 0028-dirsize-Skip-dirs-in-which-sosreport-is-being-genera.patch # autogen.sh is need to regenerate all the Makefile files Patch9000: 9000-Add-autogen.sh.patch +Patch9990: 0000-lib-Seek-beginning-of-mountinfo-file.patch +Patch9991: 0001-testsuite-Correct-string-format.patch +Patch9992: 0002-lib-Explicitly-do-not-use-DST.patch + BuildRequires: %{dbus_devel} BuildRequires: gtk3-devel BuildRequires: curl-devel