]> TLD Linux GIT Repositories - packages/poldek.git/commitdiff
- allow ftp to continue if mktime fails, patch from PLD
authorMarcin Krol <hawk@tld-linux.org>
Wed, 14 Sep 2022 20:59:11 +0000 (22:59 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 14 Sep 2022 20:59:11 +0000 (22:59 +0200)
poldek-notzdata.patch [new file with mode: 0644]
poldek.spec

diff --git a/poldek-notzdata.patch b/poldek-notzdata.patch
new file mode 100644 (file)
index 0000000..24ac681
--- /dev/null
@@ -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;
+ }
index 4eee4cad3d4b91d335980961d954a324fcdd791d..332a4874cc2d4cff81cd31a6a830bcdb1e533955 100644 (file)
@@ -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