Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Alexander Bokovoy
e2f8fc27c4 Update to 0.13.69 2018-09-04 11:02:58 +03:00
Alexander Bokovoy
35ae27c258 Update to 0.13.68
Fixes #1543942
2018-02-14 18:38:32 +02:00
Alexander Bokovoy
2e3781089c Only use patched _config.h on non i686 and armv7hl 2018-02-01 23:49:34 +02:00
Alexander Bokovoy
b3f86d446b Use predictable builddir 2018-02-01 23:15:19 +02:00
Alexander Bokovoy
2f0499910a Fix CVE 2018-6381 2018-02-01 23:05:29 +02:00
Alexander Bokovoy
6217833825 Update to 0.13.67 2018-02-01 23:05:22 +02:00
5 changed files with 82 additions and 55 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@ zziplib-0.13.49.tar.bz2
/zziplib-0.13.59.tar.bz2
/zziplib-0.13.60.tar.bz2
/zziplib-0.13.62.tar.bz2
/v0.13.67.tar.gz
/v0.13.68.tar.gz

View file

@ -1 +1,3 @@
5fe874946390f939ee8f4abe9624b96c zziplib-0.13.62.tar.bz2
SHA512 (v0.13.67.tar.gz) = a34b801a18a2051aa3898a572508ffd327521b69878413af679b10f6a68b37e770651884ae611bf9c01ce14013c6a1e06adeadd3ef6219d4b9278f1b9e7a6459
SHA512 (v0.13.68.tar.gz) = e8a9976242acc04064ec239b9b929228370a946e5bd37092adcc1bda14605710a3850d39795d1937b609d1ab9a9a1998152f8c88b2dccc387ac6ec774d9cfce9
SHA512 (v0.13.69.tar.gz) = ade026289737f43ca92a8746818d87dd7618d473dbce159546ce9071c9e4cbe164a6b1c9efff16efb7aa0327b2ec6b34f3256c6bda19cd6e325703fffc810ef0

View file

@ -1,42 +0,0 @@
diff -Naupr zziplib-0.13.59.orig/zzip/_config.h zziplib-0.13.59/zzip/_config.h
--- zziplib-0.13.59.orig/zzip/_config.h 2010-02-14 22:29:34.000000000 +0100
+++ zziplib-0.13.59/zzip/_config.h 2010-12-04 16:22:19.809534085 +0100
@@ -133,7 +133,11 @@
/* whether the system defaults to 32bit off_t but can do 64bit when requested
*/
-/* #undef LARGEFILE_SENSITIVE */
+#if __WORDSIZE == 32
+#ifndef ZZIP_LARGEFILE_SENSITIVE
+#define ZZIP_LARGEFILE_SENSITIVE 1
+#endif
+#endif
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
@@ -178,8 +181,12 @@
/* The number of bytes in type long */
#ifndef ZZIP_SIZEOF_LONG
+#if __WORDSIZE == 32
+#define ZZIP_SIZEOF_LONG 4
+#elif __WORDSIZE == 64
#define ZZIP_SIZEOF_LONG 8
#endif
+#endif
/* The number of bytes in type short */
#ifndef ZZIP_SIZEOF_SHORT
@@ -209,7 +216,11 @@
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
+#if __WORDSIZE == 32
+#ifndef ZZIP__FILE_OFFSET_BITS
+#define ZZIP__FILE_OFFSET_BITS 64
+#endif
+#endif
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

View file

@ -0,0 +1,31 @@
diff -up ./_builddir/zzip/_config.h.orig ./_builddir/zzip/_config.h
--- ./_builddir/zzip/_config.h.orig 2018-07-23 09:11:59.971840954 +0300
+++ ./_builddir/zzip/_config.h 2018-07-23 09:12:07.438731527 +0300
@@ -139,6 +139,11 @@
/* whether the system defaults to 32bit off_t but can do 64bit when requested
*/
/* #undef LARGEFILE_SENSITIVE */
+#if __WORDSIZE == 32
+#ifndef ZZIP_LARGEFILE_SENSITIVE
+#define ZZIP_LARGEFILE_SENSITIVE 1
+#endif
+#endif
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#ifndef ZZIP_LT_OBJDIR
@@ -197,6 +202,15 @@
/* The number of bytes in type short */
/* #undef SIZEOF_SHORT */
+/* The number of bytes in type long */
+#ifndef ZZIP_SIZEOF_LONG
+#if __WORDSIZE == 32
+#define ZZIP_SIZEOF_LONG 4
+#elif __WORDSIZE == 64
+#define ZZIP_SIZEOF_LONG 8
+#endif
+#endif
+
/* Define to 1 if you have the ANSI C header files. */
#ifndef ZZIP_STDC_HEADERS
#define ZZIP_STDC_HEADERS 1

View file

@ -1,14 +1,16 @@
Summary: Lightweight library to easily extract data from zip files
Name: zziplib
Version: 0.13.62
Release: 10%{?dist}
Version: 0.13.69
Release: 1%{?dist}
License: LGPLv2+ or MPLv1.1
Group: Applications/Archiving
URL: http://zziplib.sourceforge.net/
Source: http://dl.sf.net/zziplib/zziplib-%{version}.tar.bz2
Patch0: zziplib-0.13.59-multilib.patch
Source: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz
Patch0: zziplib-0.13.69-multilib.patch
BuildRequires: gcc
BuildRequires: perl-interpreter
BuildRequires: python
BuildRequires: python2
BuildRequires: python2-rpm-macros
BuildRequires: zip
BuildRequires: xmlto
BuildRequires: zlib-devel
@ -58,26 +60,33 @@ zziplib library.
%prep
%setup -q
%patch0 -p1
# Save the common patched _config.h file to overwrite the generated one
cp -a zzip/_config.h _config.h
# Force py2 for the build
find . -name '*.py' | xargs sed -i 's@#! /usr/bin/python@#! %__python2@g;s@#! /usr/bin/env python@#! %__python2@g'
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export PYTHON=%__python2
%configure \
--disable-static \
--enable-sdl \
--enable-frame-pointer
--enable-frame-pointer \
--enable-builddir=_builddir
# Remove rpath on 64bit archs
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' */libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' */libtool
# Only patch generated _config.h on non-i686 and armv7hl
# These platforms have a correct _config.h already
%ifnarch i686 armv7hl
cd _builddir
%apply_patch %{PATCH0} -p2
cd ..
%endif
%{__make} %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
# Overwrite the platform specific _config.h with our own modified common one
rm -f %{buildroot}%{_includedir}/zzip/_config.h
install -p -m 0644 _config.h %{buildroot}%{_includedir}/zzip/_config.h
%post -p /sbin/ldconfig
@ -100,6 +109,31 @@ install -p -m 0644 _config.h %{buildroot}%{_includedir}/zzip/_config.h
%{_mandir}/man3/*
%changelog
* Tue Sep 4 2018 Alexander Bokovoy <abokovoy@redhat.com> - 0.13.69-1
- Update to 0.13.69 release
- Fixes: #1545819 (CVE-2018-6869, CVE-2018-6484)
- Fixes: #1598246 (CVE-2018-6541)
- Fixes: #1554673 (CVE-2018-7727)
- Use versioned python executables everywhere
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.68-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Mar 18 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.13.68-2
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Wed Feb 14 2018 Alexander Bokovoy <abokovoy@redhat.com> - 0.13.68-1
- 0.13.68
- Fixes: #1543942 (CVE-2018-6484)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.67-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Feb 01 2018 Alexander Bokovoy <abokovoy@redhat.com> - 0.13.67-1
- Update release
- CVE-2018-6381
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.62-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild