Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425776 - www-client/httrack uses internal copy of sys-libs/zlib[minizip]
Summary: www-client/httrack uses internal copy of sys-libs/zlib[minizip]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: bundled-libs 425692
  Show dependency tree
 
Reported: 2012-07-11 07:11 UTC by Samuli Suominen (RETIRED)
Modified: 2016-10-08 19:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Use minizip of system's zlib rather than a bundled copy (httrack-3.45.4-system-zlib.patch,3.78 KB, patch)
2012-07-14 21:35 UTC, Sebastian Pipping
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2012-07-11 07:11:23 UTC
Instead of shipping this patch...

httrack-3.44.1+zlib-1.2.5.1.patch

...it should be patched to use system copy of the sys-libs/zlib[minizip] instead, that allows dropping the entire patch which is not suitable for upstream in any case
Comment 1 Sebastian Pipping gentoo-dev 2012-07-14 21:35:44 UTC
Created attachment 318184 [details, diff]
Use minizip of system's zlib rather than a bundled copy

httrack uses a function zipFlush that minizip no longer exposes.
I would remove all but that function if it wasn't using zip_internal, which zlib current doesn't expose.  Here's the code I refer to:

=====================================================================
int ZEXPORT zipFlush (file)
    zipFile file;
{
    zip_internal* zi;
    if (file == NULL)
        return ZIP_PARAMERROR;
    zi = (zip_internal*)file;

    if (zi->z_filefunc.zflush_file != NULL && zi->filestream != NULL)
      return ZFLUSH(zi->z_filefunc,zi->filestream);
    else
      return EOF;
}
=====================================================================

Any suggestions?

Attached you find a patch that unbundles minizip completely (but goes to far, unfortunately).
Comment 2 Sebastian Pipping gentoo-dev 2012-07-14 21:59:37 UTC
I just contacted upstream about it.  Here's a copy of my mail to Xavier Roche:


SUBJECT: Function zipFlush of minizip/zlib in httrack 3.45.4


Hello Xavier,


I found httrack 3.45.4 bundling minizip of zlib, meaning that i builds
and uses its own copy of minizip rather than making use of the
system-wide minizip/zlib installation.

For security and other reasons (please see [1] for details) I tried to
make httrack use the version of minizip that is installed system-wide,
zlib 1.2.7 (the most recent one) to be concrete.

So I I started making this patch [2] before I figured out that httrack
uses a function zipFlush that is no longer exposed by recent versions of
zlib.  As function zipFlush requires access to minizip internals (e.g.
type zip_internal), removing every minizip code but zipFlush does not work.


There are two ways you could go with httrack, each of which would
improve the situation to us:

 A) Resolve the use of function zipFlush one way or another or

 B) Upgrade the bundled code of minizip to the version from zlib 1.2.7
    and make httrack work with that new version.

If you are undecided, option B is recommended.

For completeness and transparency, I would like to mention that this
process is tracked as issue #425776 in Gentoo Linux [3].

Thanks for listening and for consideration!

Best,



Sebastian


[1] https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies
[2] https://bugs.gentoo.org/attachment.cgi?id=318184&action=diff
[3] https://bugs.gentoo.org/show_bug.cgi?id=425776
Comment 3 Sebastian Pipping gentoo-dev 2016-10-08 19:08:12 UTC
Closing, zlib not bundled with any version in Gentoo as of today.