- resolves: #805874
  update to 1.2.7
This commit is contained in:
Peter Schiffer 2012-05-10 22:22:44 +02:00
parent 812a7a9104
commit 679d495f9c
7 changed files with 14 additions and 172 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
zlib-1.2.5.tar.bz2
/zlib-1.2.7.tar.bz2

View File

@ -1,12 +0,0 @@
diff -up zlib-1.2.5/contrib/minizip/unzip.c.pom zlib-1.2.5/contrib/minizip/unzip.c
--- zlib-1.2.5/contrib/minizip/unzip.c.pom 2010-02-15 12:59:40.000000000 +0100
+++ zlib-1.2.5/contrib/minizip/unzip.c 2011-04-06 12:06:04.000000000 +0200
@@ -1145,7 +1145,7 @@ extern int ZEXPORT unzGetCurrentFileInfo
szFileName,fileNameBufferSize,
extraField,extraFieldBufferSize,
szComment,commentBufferSize);
- if (err==UNZ_OK)
+ if (pfile_info && err==UNZ_OK)
{
pfile_info->version = file_info64.version;
pfile_info->version_needed = file_info64.version_needed;

View File

@ -1 +1 @@
be1e89810e66150f5b0327984d8625a0 zlib-1.2.5.tar.bz2
2ab442d169156f34c379c968f3f482dd zlib-1.2.7.tar.bz2

View File

@ -1,68 +0,0 @@
diff -up zlib-1.2.4/contrib/minizip/configure.ac.atools zlib-1.2.4/contrib/minizip/configure.ac
--- zlib-1.2.4/contrib/minizip/configure.ac.atools 2010-03-29 10:28:50.000000000 +0200
+++ zlib-1.2.4/contrib/minizip/configure.ac 2010-03-29 10:28:50.000000000 +0200
@@ -0,0 +1,13 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_INIT([minizip], [1.2.4], [bugzilla.redhat.com])
+AC_CONFIG_SRCDIR([minigzip.c])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+
+AC_SUBST([HAVE_UNISTD_H], [0])
+AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
+AC_CONFIG_FILES([Makefile minizip.pc])
+AC_OUTPUT
diff -up zlib-1.2.4/contrib/minizip/Makefile.am.atools zlib-1.2.4/contrib/minizip/Makefile.am
--- zlib-1.2.4/contrib/minizip/Makefile.am.atools 2010-03-29 10:28:50.000000000 +0200
+++ zlib-1.2.4/contrib/minizip/Makefile.am 2010-03-29 10:32:11.000000000 +0200
@@ -0,0 +1,31 @@
+ACLOCAL_AMFLAGS = -I m4 --install
+
+lib_LTLIBRARIES = libminizip.la
+
+libminizip_la_SOURCES = \
+ ioapi.c \
+ mztools.c \
+ unzip.c \
+ zip.c
+
+# do not build the static version of libminizip
+libminizip_la_CFLAGS = -shared -I ../.. -L../..
+libminizip_la_LDFLAGS = -version-info 1:0:0 -lz
+
+minizip_includedir = $(includedir)/minizip
+minizip_include_HEADERS = \
+ crypt.h \
+ ioapi.h \
+ mztools.h \
+ unzip.h \
+ zip.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = minizip.pc
+
+EXTRA_PROGRAMS = miniunzip minizip
+
+miniunzip_SOURCES = miniunz.c
+miniunzip_LDADD = libminizip.la
+
+minizip_SOURCES = minizip.c
+minizip_LDADD = libminizip.la
diff -up zlib-1.2.4/contrib/minizip/minizip.pc.in.atools zlib-1.2.4/contrib/minizip/minizip.pc.in
--- zlib-1.2.4/contrib/minizip/minizip.pc.in.atools 2010-03-29 10:28:50.000000000 +0200
+++ zlib-1.2.4/contrib/minizip/minizip.pc.in 2010-03-29 10:28:50.000000000 +0200
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/minizip
+
+Name: minizip
+Description: Minizip zip file manipulation library
+Requires:
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lminizip -lz
+Cflags: -I${includedir}

View File

@ -1,12 +0,0 @@
diff -up zlib-1.2.5/zlib.h.pom zlib-1.2.5/zlib.h
--- zlib-1.2.5/zlib.h.pom 2010-04-20 06:12:48.000000000 +0200
+++ zlib-1.2.5/zlib.h 2010-06-16 13:08:59.000000000 +0200
@@ -1578,7 +1578,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF(
# define gzoffset gzoffset64
# define adler32_combine adler32_combine64
# define crc32_combine crc32_combine64
-# ifdef _LARGEFILE64_SOURCE
+# ifndef _LARGEFILE64_SOURCE
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));

View File

@ -1,59 +0,0 @@
diff -ru zlib-1.2.5/contrib/minizip/ioapi.c zlib-1.2.5-patch/contrib/minizip/ioapi.c
--- zlib-1.2.5/contrib/minizip/ioapi.c 2010-01-04 12:31:24.000000000 -0500
+++ zlib-1.2.5-patch/contrib/minizip/ioapi.c 2011-07-05 15:47:48.263474587 -0400
@@ -47,7 +47,7 @@
else
{
uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
- if ((tell_uLong) == ((uLong)-1))
+ if ((tell_uLong) == MAXU32)
return (ZPOS64_T)-1;
else
return tell_uLong;
diff -ru zlib-1.2.5/contrib/minizip/ioapi.h zlib-1.2.5-patch/contrib/minizip/ioapi.h
--- zlib-1.2.5/contrib/minizip/ioapi.h 2010-02-15 06:59:40.000000000 -0500
+++ zlib-1.2.5-patch/contrib/minizip/ioapi.h 2011-07-05 15:48:36.281546917 -0400
@@ -85,6 +85,8 @@
typedef uint64_t ZPOS64_T;
#else
+/* Maximum unsigned 32-bit value used as placeholder for zip64 */
+#define MAXU32 0xffffffff
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef unsigned __int64 ZPOS64_T;
diff -ru zlib-1.2.5/contrib/minizip/unzip.c zlib-1.2.5-patch/contrib/minizip/unzip.c
--- zlib-1.2.5/contrib/minizip/unzip.c 2010-02-15 06:59:40.000000000 -0500
+++ zlib-1.2.5-patch/contrib/minizip/unzip.c 2011-07-05 15:50:31.409310349 -0400
@@ -1040,26 +1040,26 @@
{
uLong uL;
- if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1)
+ if(file_info.uncompressed_size == MAXU32)
{
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
err=UNZ_ERRNO;
}
- if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1)
+ if(file_info.compressed_size == MAXU32)
{
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
err=UNZ_ERRNO;
}
- if(file_info_internal.offset_curfile == (ZPOS64_T)(unsigned long)-1)
+ if(file_info_internal.offset_curfile == MAXU32)
{
/* Relative Header offset */
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
err=UNZ_ERRNO;
}
- if(file_info.disk_num_start == (unsigned long)-1)
+ if(file_info.disk_num_start == MAXU32)
{
/* Disk Start Number */
if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)

View File

@ -1,16 +1,11 @@
Summary: The zlib compression and decompression library
Name: zlib
Version: 1.2.5
Release: 6%{?dist}
Version: 1.2.7
Release: 1%{?dist}
Group: System Environment/Libraries
Source: http://www.zlib.net/zlib-%{version}.tar.bz2
Patch3: zlib-1.2.4-autotools.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=591317
Patch4: zlib-1.2.5-gentoo.patch
Patch5: minizip-null.patch
Patch6: zlib-1.2.5-minizip-fixuncrypt.patch
Patch7: zlib-1.2.5-zip64.patch
URL: http://www.gzip.org/zlib/
Patch0: zlib-1.2.5-minizip-fixuncrypt.patch
URL: http://www.zlib.net/
# /contrib/dotzlib/ have Boost license
License: zlib and Boost
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -61,14 +56,7 @@ developing applications which use minizip.
%prep
%setup -q
%patch3 -p1 -b .atools
%patch4 -p1 -b .g
%patch5 -p1 -b .null
%patch6 -p1 -b .fixuncrypt
%patch7 -p1 -b .zip64
# patch cannot create an empty dir
mkdir contrib/minizip/m4
cp minigzip.c contrib/minizip
%patch0 -p1 -b .fixuncrypt
iconv -f windows-1252 -t utf-8 <ChangeLog >ChangeLog.tmp
mv ChangeLog.tmp ChangeLog
@ -78,7 +66,7 @@ make %{?_smp_mflags}
cd contrib/minizip
autoreconf --install
%configure CPPFLAGS="-I/$RPM_BUILD_DIR/%{name}-%{version}-%{release}"
%configure --enable-static=no CPPFLAGS="-I/$RPM_BUILD_DIR/%{name}-%{version}-%{release}"
LDFLAGS="-L/$RPM_BUILD_DIR/%{name}-%{version}-%{release}"
make %{?_smp_mflags}
@ -120,7 +108,7 @@ rm -rf ${RPM_BUILD_ROOT}
%files devel
%defattr(-,root,root,-)
%doc README doc/algorithm.txt example.c
%doc README doc/algorithm.txt test/example.c
%{_libdir}/libz.so
%{_includedir}/zconf.h
%{_includedir}/zlib.h
@ -145,6 +133,11 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/pkgconfig/minizip.pc
%changelog
* Thu May 10 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-1
- resolves: #785726
- resolves: #805874
update to 1.2.7
* Tue Jan 10 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.5-6
- resolves: #719139
Zlib fails to read zip64 files on 64-bit system