Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253515 - dev-tcltk/tclxml-expat bundles an internal copy of expat
Summary: dev-tcltk/tclxml-expat bundles an internal copy of expat
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: bundled-libs CVE-2009-3720
  Show dependency tree
 
Reported: 2009-01-03 07:18 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-08-21 11:11 UTC (History)
2 users (show)

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


Attachments
Patch to do initial work of unbundling Expat from tclxml - see WARNING below (tclxml-expat-no-bundle.patch,2.44 KB, patch)
2009-01-24 21:21 UTC, Kevin Pyle
Details | Diff
Patch to tclxml-2.4.ebuild to use the patch in attachment #179587, and remove Expat files (tclxml-expat.ebuild.patch,830 bytes, patch)
2009-01-24 21:23 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2009-01-03 07:18:44 UTC
And also installs header files.
Comment 1 Kevin Pyle 2009-01-24 21:18:38 UTC
This appears to be a forked copy.  It calls a function (XML_SetDefaultExpandInternalEntities) not implemented by upstream dev-libs/expat-2.0.1 or dev-libs/expat-1.95.4.  A workaround for that is to use one of two expat functions that implements the same behavior as a side effect.  However, the definitions of XML_ElementDeclHandler and a few related *DeclHandler functions, use an incompatible argument.  Non-trivial source patches will be required to make tclxml able to use the system library, and it is not clear from the tclxml code how to convert its handlers to work with the standard prototypes.

Also, this package appears to be obsolete.  It pulls in an old version of dev-tcltk/tclxml, and builds just a subdirectory of the source from that package.  Newer versions of dev-tcltk/tclxml build that directory on their own with USE=expat.  However, both have forked copies of expat and exhibit the forked *DeclHandler problem.

I have a patch that strips out the Expat code, but based on one of the warnings introduced, I suspect it will crash at runtime due to the incompatible definition of XML_ElementDeclHandler.  I lack suitable input to test this.  I will attach the work so far, in case it is a useful starting point.
Comment 2 Kevin Pyle 2009-01-24 21:21:08 UTC
Created attachment 179587 [details, diff]
Patch to do initial work of unbundling Expat from tclxml - see WARNING below

This patch makes the source and build file changes to remove use of the internal copy of Expat, stop installation of header files, and work around the use of the XML_SetDefaultExpandInternalEntities that is not available in upstream expat.

WARNING: as noted in comment #1, this is incomplete, and will probably crash if any of the *DeclHandler functions are called.  Interested parties are invited to use this patch as a base to finish the unbundling work.
Comment 3 Kevin Pyle 2009-01-24 21:23:19 UTC
Created attachment 179589 [details, diff]
Patch to tclxml-2.4.ebuild to use the patch in attachment #179587 [details, diff], and remove Expat files

This patch modifies the ebuild to apply the patch in attachment #179587 [details, diff], and also removes the Expat files that are rendered obsolete by that patch.
Comment 4 Federico Ferri (RETIRED) gentoo-dev 2009-08-08 01:55:46 UTC
patch does not apply
Comment 5 Federico Ferri (RETIRED) gentoo-dev 2009-08-08 02:26:27 UTC
tclxml-expat-2.4-r1.ebuild has been added
now it applies patch correctly

can this bug be closed now?