This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 834975 - zipios++ RPM not working; source tarball?
zipios++ RPM not working; source tarball?
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: zipios++ (Show other bugs)
16
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Richard Shaw
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-24 23:59 EDT by John Morris
Modified: 2012-06-30 18:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-30 04:35:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
specfile patch: apply Debian's source patch; probably fixes to src/zipinputstreambuf.cpp that are the problem (1.73 KB, patch)
2012-06-26 17:29 EDT, John Morris
no flags Details | Diff

  None (edit)
Description John Morris 2012-06-24 23:59:14 EDT
Description of problem:
Using this with the FreeCAD RPM currently undergoing review in RPMFusion.

With this version of the zipios++ RPM, FreeCAD can write model files, but is unable to read model files created with this or working versions of zipios++.  The model files it creates can be read by other versions of zipios++.

I can't tell where this zipios tarball came from.  It is not the packed up version on the sourceforge site, and does not match SVN.  It is also not the version in Ubuntu.  As far as I know, SVN and Ubuntu versions work; haven't tested the released tarball on SF.

Version-Release number of selected component (if applicable):
0.1.5.9-6.fc16

How reproducible:
Always

Steps to Reproduce:
1. Build FreeCAD referenced from RPMFusion review ticket https://bugzilla.rpmfusion.org/show_bug.cgi?id=2300
2. Create a model
3. Save it
4. Close it
5. Attempt to reopen it
  
Actual results:
Error message on console; FreeCAD handles the error badly, appearing to have the file open, but with no model

Expected results:


Additional info:
Comment 1 John Morris 2012-06-25 00:01:32 EDT
I should add, I've been messing with this for a few hours now.  I'm pretty sure if the same specfile + patches are used, but with one of the tarballs pointed to above, the package should start working.

Also, this may be an older version of zipios++.  Compared to Ubuntu and SVN, there are quite a large number of changes.  I'd go with SVN.
Comment 2 Richard Shaw 2012-06-26 10:22:34 EDT
Yeah, zipios is a mess. Upstream seems pretty much dead and FreeCAD made modifications to their bundled version. 

Do you know of a SVN upstream? All I can find on sourceforge is CVS and none of the source files seem recently updated.

I'm wondering if FreeCAD even considers their zipios to be bundled since it's not in the 3rdparty directory. It could be considered a fork...
Comment 3 John Morris 2012-06-26 11:37:23 EDT
(In reply to comment #2)
> Yeah, zipios is a mess. Upstream seems pretty much dead and FreeCAD made
> modifications to their bundled version. 

Are you sure they modified their bundled version, or is it a stale version of zipios++, and the modifications came from upstream?

> Do you know of a SVN upstream? All I can find on sourceforge is CVS and none
> of the source files seem recently updated.

Oops, not sure why I said SVN just a few minutes after using CVS to check out the latest code.  :)

> I'm wondering if FreeCAD even considers their zipios to be bundled since
> it's not in the 3rdparty directory. It could be considered a fork...

They do consider it bundled, since the FreeCAD .dfsg tarball (in the SF files page) unbundles it.  On Debian, they use the system zipios++.

I'd just swap in either the CVS source or the Debian source (the difference is in one file, didn't look carefully to see what it was) and be done with it.

BTW, I looked at using the .dfsg tarball for the FreeCAD RPM, but they also removed some STEP files needed for a different piece.  Werner Mayer said that was to comply with some Debian copyright policies, but it's been cleared up and those files should be included for the next release.  Hopefully there's nothing else missing from the .dfsg tarball and we can just use that next time; it's 10MB smaller.
Comment 4 Richard Shaw 2012-06-26 11:44:45 EDT
To answer your question about where the source came from, I'm pretty sure I got it from debian.
Comment 5 Richard Shaw 2012-06-26 13:24:57 EDT
Ok, I'm getting myself confused trying to comapre cvs with what I have with debian, with ubuntu. I just want to rm -rf it all! 

I got my sources from Debian and the Ubuntu versions seems to be identical. I don't know why this version isn't working...

I pulled the ubuntu source and diff but it produces dpatch's not regular patches but they look to be the same as the ones I got from Debian...
Comment 6 John Morris 2012-06-26 14:49:33 EDT
Well dangit, now it seems like I'm the one who's confused.  I just compared all three versions:  CVS, Debian and Fedora, and they're all three identical.  Sorry about that.

Hold off and I'll go back and retrace my steps.  I'll get back later today, most likely.  My apologies for the confusion.

BTW, so I know whether to question my sanity, have you actually tried saving and re-opening a model from FreeCAD (with the Fedora+RPMFusion RPMs, of course) and confirmed the problem on your side?

    John
Comment 7 Richard Shaw 2012-06-26 14:52:26 EDT
(In reply to comment #6)
> Well dangit, now it seems like I'm the one who's confused.  I just compared
> all three versions:  CVS, Debian and Fedora, and they're all three
> identical.  Sorry about that.

Well at least I'm not going crazy! :)


> Hold off and I'll go back and retrace my steps.  I'll get back later today,
> most likely.  My apologies for the confusion.
> 
> BTW, so I know whether to question my sanity, have you actually tried saving
> and re-opening a model from FreeCAD (with the Fedora+RPMFusion RPMs, of
> course) and confirmed the problem on your side?

Not yet. If I have time I'll try tonight but I just got back from vacation and we badly need groceries :)
Comment 8 John Morris 2012-06-26 17:29:01 EDT
Created attachment 594602 [details]
specfile patch:  apply Debian's source patch; probably fixes to src/zipinputstreambuf.cpp that are the problem

(In reply to comment #7)
> Well at least I'm not going crazy! :)

Nope, as expected it's all me.

Turns out that the package you grabbed from me had a 'special' (I'm being kind to myself) tarball.  Apparently (am I innocent if I don't remember?) I grabbed the Debian tarball and unpacked it, then applied the Debian patch, and *then* repacked it all up as though it were original.  I know all about and am all for the 'pristine sources' objective, so I'm clueless why I would've done that, unless I found the tarball somewhere else (in which case I'm just as guilty because I didn't document it).

Attaching a patch to the specfile that should fix this.

> Not yet. If I have time I'll try tonight but I just got back from vacation
> and we badly need groceries :)

'Vacation'?  What is this thing, 'vacation', that you speak of?  Is it delicious?  I'm not sure I've ever had one of those!
Comment 9 Richard Shaw 2012-06-27 09:05:29 EDT
I have reproduced the bug. It seems (as I think your mention) that the file is created correctly. I could even open it in Archive Manger and see the files contained within, but it could not open the file.

I tried gdb, but since there wasn't an actual "crash" it didn't produce any output. I also tried strace which did find that there were seek errors in the file. I think that means that it's having trouble seeking within the zip stream. Since I'm using the latest available sources from Debian, where do we go from here? 

I'll post on the FreeCAD forums and see if they can help.
Comment 10 Richard Shaw 2012-06-27 11:35:53 EDT
Ok, although I did post to the forum, I found the answer on my own.

While comparing the Debian source and package diff I finally noticed that instead of creating a patch, the diff directly patches zipinputstreambuffer.cpp!!!

I didn't know that was acceptable but I guess it is. I have creating a patch from it and installed a local build. I had to test it over X11 Forwarding so the model wouldn't actually display (Coin issue) it didn't produce any console output so I think that's got it!

I'll start builds shortly.
Comment 11 Fedora Update System 2012-06-27 12:01:07 EDT
zipios++-0.1.5.9-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/zipios++-0.1.5.9-7.fc16
Comment 12 Fedora Update System 2012-06-27 12:01:17 EDT
zipios++-0.1.5.9-7.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/zipios++-0.1.5.9-7.fc17
Comment 13 John Morris 2012-06-27 12:13:15 EDT
Heh, you missed my comment #8!  Sorry Richard, of course it was my doing.  Thanks for the help.
Comment 14 Richard Shaw 2012-06-27 12:21:42 EDT
(In reply to comment #13)
> Heh, you missed my comment #8!  Sorry Richard, of course it was my doing. 
> Thanks for the help.

Yup, didn't catch what you meant at the time! Everything makes more sense once you already have the answer :)
Comment 15 Richard Shaw 2012-06-27 12:23:21 EDT
Almost forgot! When the builds make it into testing, please try installing them and if it fixes the problem (it should), go give it karma on bodhi so I can push it to stable quicker.
Comment 16 Fedora Update System 2012-06-27 23:30:56 EDT
Package zipios++-0.1.5.9-7.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing zipios++-0.1.5.9-7.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9996/zipios++-0.1.5.9-7.fc17
then log in and leave karma (feedback).
Comment 17 John Morris 2012-06-28 02:27:24 EDT
Great, this fixes it.  Karma left on bodhi.

(In reply to comment #14)
> (In reply to comment #13)
> > Heh, you missed my comment #8!  Sorry Richard, of course it was my doing. 
> > Thanks for the help.
> 
> Yup, didn't catch what you meant at the time! Everything makes more sense
> once you already have the answer :)

Ha, the attached patch would've explained everything, but I must've drowned it out with all the blabber.  Hope it didn't cost you too much time to figure it out again.

Thanks again!  I guess this can be closed?
Comment 18 Richard Shaw 2012-06-28 09:05:55 EDT
Nah, Bodhi will close it once it hits the stable repos.
Comment 19 Fedora Update System 2012-06-30 04:35:35 EDT
zipios++-0.1.5.9-7.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 20 Fedora Update System 2012-06-30 18:11:24 EDT
zipios++-0.1.5.9-7.fc16 has been pushed to the Fedora 16 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.