Bug 491616 - Review Request: mingw32-zfstream - MinGW Windows C++ abstraction library for compressed and non-compressed file I/O
Summary: Review Request: mingw32-zfstream - MinGW Windows C++ abstraction library for ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Erik van Pienbroek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: zfstream 498508
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-23 11:11 UTC by Thomas Sailer
Modified: 2016-08-14 16:27 UTC (History)
6 users (show)

Fixed In Version: 20041202-5.fc11
Clone Of:
Environment:
Last Closed: 2009-05-25 21:20:35 UTC
Type: ---
Embargoed:
erik-fedora: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)

Description Thomas Sailer 2009-03-23 11:11:42 UTC
Spec URL: http://sailer.fedorapeople.org/mingw32-zfstream.spec
SRPM URL: http://sailer.fedorapeople.org/mingw32-zfstream-20041202-3.fc11.src.rpm
Description:
MinGW Windows C++ abstraction library for compressed and non-compressed file I/O.

Approved MinGW packaging guidelines are here:
http://fedoraproject.org/wiki/Packaging/MinGW

Comment 1 Thomas Sailer 2009-03-23 11:13:04 UTC
Note: the review request for the native version of this library is still pending, see https://bugzilla.redhat.com/show_bug.cgi?id=438588

Comment 2 Thomas Sailer 2009-04-30 22:21:47 UTC
Update:
Spec URL: http://sailer.fedorapeople.org/mingw32-zfstream.spec
SRPM URL: http://sailer.fedorapeople.org/mingw32-zfstream-20041202-4.fc11.src.rpm

Incorporate changes to native zfstream.

Comment 3 Erik van Pienbroek 2009-05-14 20:59:02 UTC
Let's take this for review. Looks good at first sight :)

Comment 4 Erik van Pienbroek 2009-05-14 21:55:47 UTC
- The package fails to compile due to a missing BR: mingw32-gcc-c++. After adding this, the package compiles fine
- The patch contains a comment mentioning it has been sent upstream, but what does the patch actually fix?

Comment 5 Thomas Sailer 2009-05-14 22:31:47 UTC
(In reply to comment #4)
> - The package fails to compile due to a missing BR: mingw32-gcc-c++. After
> adding this, the package compiles fine

Update:
Spec URL: http://sailer.fedorapeople.org/mingw32-zfstream.spec
SRPM URL:
http://sailer.fedorapeople.org/mingw32-zfstream-20041202-5.fc11.src.rpm

> - The patch contains a comment mentioning it has been sent upstream, but what
> does the patch actually fix?  

The patch fixes the inability of zfstream to read/write zip files. Without the patch, it can only read/write .gz and .bz2 and uncompressed files.

Comment 6 Wojciech Pilorz 2009-05-15 12:37:44 UTC
There was a bug report from Hiroshi Kuno on 
zlib-devel mailing list at Feb 6, 2009:

Please find it attached below, as well as response form Mark Adler.
I would suggest looking at the bug, as it might propagate to zfstream;
---------------------------------------
I found a bug in minizip, when i create a zip file on a FD.
That lose a write error (i.e. disk full), and return ZIP_OK.
Thus, the minizip make a broken zip file without a error.

** Where is bug.

zipCloseFileInZipRaw() in src/contrib/minizip/zip.c

1067	    if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
1068	        if (zipFlushWriteBuffer(zi)==ZIP_ERRNO)
1069	            err = ZIP_ERRNO;		/* 1. Here, setting ZIP_ERRNO to "err" */
1070	
1071	    if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
1072	    {
1073	        err=deflateEnd(&zi->ci.stream); /* 2. BUG! overwriting defalteEnd()'s return-value(ZIP_OK) to "err" */
1074	        zi->ci.stream_initialised = 0;
1075	    }
1076	


** How to fix.

I have made a small patch that avoid to overwrite to "err", when "err" has a error code.
Would you merge my patch?

ndex: /zlib/branches/BUG-write-error/src/contrib/minizip/zip.c
 ===================================================================
 --- /zlib/branches/BUG-write-error/src/contrib/minizip/zip.c (revision 537)
 +++ /zlib/branches/BUG-write-error/src/contrib/minizip/zip.c (revision 566)
 @@ -1071,5 +1071,6 @@
      if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
      {
 -        err=deflateEnd(&zi->ci.stream);
 +        int tmperr=deflateEnd(&zi->ci.stream);
 +        if (err==ZIP_OK) err = tmperr;
          zi->ci.stream_initialised = 0;
      }
 

--------------------------------------------
From: xxx (Mark Adler)
Date: Thu, 5 Feb 2009 22:03:34 -0800
Subject: [Zlib-devel] Patch for losing a write error


Hiroshi,

Minizip is a contribution to zlib from Gilles Vollant.  He is however  
on this list, so he may respond.

Mark

Comment 7 Thomas Sailer 2009-05-15 13:14:48 UTC
(In reply to comment #6)

> I would suggest looking at the bug, as it might propagate to zfstream;

Thanks for the report. zfstream is fine however, as it does not include minizip (anymore), but links to minizip provided by the zlib and mingw32-zlib packages. So this bug needs to be fixed in zlib (mingw32-zlib), then zfstream is automatically fixed, as it links dynamically to the minizip DLL / shared lib.

Have you reported the bug against zlib and mingw32-zlib?

Comment 8 Wojciech Pilorz 2009-05-18 11:00:01 UTC
No, not yet

Comment 9 Erik van Pienbroek 2009-05-20 12:01:54 UTC
$ rpmlint mingw32-zfstream.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

$ rpmlint mingw32-zfstream-20041202-5.fc11.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint mingw32-zfstream-20041202-5.fc11.noarch.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

Everything's okay, no further changes required

======================================================

 The package mingw32-zfstream is APPROVED by epienbro

======================================================

Comment 10 Thomas Sailer 2009-05-20 12:22:52 UTC
Thank you for the review.

New Package CVS Request
=======================
Package Name: mingw32-zfstream
Short Description: MinGW Windows C++ abstraction library for compressed and non-compressed file I/O
Owners: sailer rjones
Branches: F-10 F-11
InitialCC:

Comment 11 Kevin Fenzi 2009-05-21 23:45:26 UTC
cvs done.

Comment 12 Fedora Update System 2009-05-22 00:15:51 UTC
mingw32-zfstream-20041202-5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/mingw32-zfstream-20041202-5.fc11

Comment 13 Fedora Update System 2009-05-25 21:20:30 UTC
mingw32-zfstream-20041202-5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.