From 5f3bb0f4e84e2b9dec6aa1b6d371e058f107eca5 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 14 Sep 2022 22:59:11 +0200 Subject: [PATCH] - allow ftp to continue if mktime fails, patch from PLD --- poldek-notzdata.patch | 12 ++++++++++++ poldek.spec | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 poldek-notzdata.patch diff --git a/poldek-notzdata.patch b/poldek-notzdata.patch new file mode 100644 index 0000000..24ac681 --- /dev/null +++ b/poldek-notzdata.patch @@ -0,0 +1,12 @@ +--- poldek-0.32.2/vfile/vfff/ftp.c~ 2016-01-30 14:05:57.000000000 +0000 ++++ poldek-0.32.2/vfile/vfff/ftp.c 2019-10-02 08:50:20.832444438 +0000 +@@ -654,6 +654,9 @@ + tm.tm_year -= 1900; + tm.tm_mon -= 1; + ts = mktime(&tm); ++ /* We can't do much if time can't be represented */ ++ if (ts < 0) ++ return 0; + } + return ts; + } diff --git a/poldek.spec b/poldek.spec index 4eee4ca..332a487 100644 --- a/poldek.spec +++ b/poldek.spec @@ -14,7 +14,7 @@ %define ver_db_rel 1 %define ver_rpm 4.5-49 -%define rel 8 +%define rel 9 Summary: RPM packages management helper tool Summary(hu.UTF-8): RPM csomagkezelést segítő eszköz Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM @@ -39,6 +39,7 @@ Patch4: %{name}-multiproto.patch Patch5: %{name}-python-fix.patch Patch6: %{name}-libdb.patch Patch7: openssl.patch +Patch8: %{name}-notzdata.patch URL: http://poldek.pld-linux.org/ BuildRequires: %{db_pkg}-devel >= %{ver_db}-%{ver_db_rel} BuildRequires: autoconf @@ -207,6 +208,7 @@ Moduły języka Python dla poldka. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %{__rm} m4/libtool.m4 m4/lt*.m4 -- 2.46.0