Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 69972

Summary: [TRACKER] don't build packages using bundled jars
Product: Gentoo Linux Reporter: Karl Trygve Kalleberg (RETIRED) <karltk>
Component: Current packagesAssignee: Java team <java>
Status: CONFIRMED ---    
Severity: normal CC: bertrand, esigra, jstein
Priority: High Keywords: Tracker
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 179801, 447904, 617722, 689752, 838010, 839528, 841632, 843134, 847817, 858557, 63255, 63256, 63257, 63258, 63259, 63260, 63261, 63262, 63263, 63264, 63265, 63266, 63267, 63268, 63270, 63271, 63272, 63273, 63274, 63275, 63276, 63281, 63283, 63287, 63288, 63293, 63295, 63299, 63300, 63301, 63302, 63305, 63306, 63308, 63309, 63310, 70843, 76738, 89328, 92873, 98865, 99435, 110905, 174173, 174614, 179817, 179851, 190387, 245705, 258358, 792606, 853100, 892703, 896244    
Bug Blocks: 251464    

Description Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-11-03 12:58:33 UTC
As part of our policy, http://gentoo-wiki.com/Gentoo_Java_Policy/ we require
that all .jar files are built entirely from source code whenever possible. 

Among other things, this means that a package is not allowed to install 
"bundled" jar files, such as junit.jar, xml-apis.jar, etc. Rather, they should
add these libraries in their RDEPENDS, and use java-pkg_jar-from to set up
the build environment before invoking ant (or whatever other build tool is
in use).

The typical procedure for removing bundled jars is:

1) ebuild dev-java/<packagename>/<packagename>-<version>.ebuild unpack
2) (As root) Inspect /var/tmp/portage/<packagename>/work/ for .jar files
3) Create or modify the src_unpack in the ebuild to
 3.1) Remove all bundled .jar files by rm <list-of-jarfiles>
 3.2) Install symbolic links for the required jars using java-pkg_jar-from
4) Update the RDEPENDS to ensure the require libraries are available to
 java-pkg_jar-from
5) Recompile and test that everything works.
6) Submit a patch for the ebuild.