Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 304112

Summary: [eclipse-build] [debian] The SDK source contains precompiled class files
Product: [Tools] Linux Tools Reporter: Benjamin Drung <bdrung>
Component: eclipse-buildAssignee: Krzysztof Daniel <krzysztof.daniel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, linux.packagingtools-inbox, niels, overholt
Version: unspecified   
Target Milestone: 1.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 304710, 319476, 319478, 319479    
Bug Blocks:    
Attachments:
Description Flags
classfiles.list
none
build-source.patch
none
build-source2.patch
none
remove-cvs.patch
none
clean-source.patch
none
compile-xpt.patch
none
clean-source2.patch
none
clean-source3.patch none

Description Benjamin Drung CLA 2010-02-26 16:43:01 EST
Created attachment 160372 [details]
classfiles.list

The SDK source contains precompiled class files:

plugins/org.eclipse.jdt.core/scripts/*.class
plugins/org.eclipse.core.runtime.compatibility.registry/classes/org/eclipse/core/runtime/IPluginDescriptor.class

plugins/org.eclipse.osgi.util/
plugins/org.eclipse.osgi.services/

A complete list of class files is attached. These files should be removed from the tarball and regenerated on build time.
Comment 1 Benjamin Drung CLA 2010-02-26 17:32:55 EST
Created attachment 160382 [details]
build-source.patch

Here is a patch for building the source tarball without the .class files.
Comment 2 Andrew Overholt CLA 2010-03-02 09:52:33 EST
Do these class files automatically get re-built if we remove them?
Comment 3 Andrew Overholt CLA 2010-03-02 10:13:22 EST
I've spent a few minutes trying to find the reasons for these .class files being included.  My findings are below.

org.eclipse.jdt.core/scripts - no idea; been there for 3 or 4 years
org.eclipse.core.runtime.compatibility.registry - bug #138376 seemed related but I don't think so; been there for 4 years (bug #126344 also seems related)
org.eclipse.osgi.util - bug #189371 seems related; been there for at least a year in its current state (bug #253243 seems related)
org.eclipse.osgi.services - bug #189371 seems related; been there for 4 years
Comment 4 Benjamin Drung CLA 2010-03-02 10:25:24 EST
Created attachment 160628 [details]
build-source2.patch

We can remove the source in:

plugins/org.eclipse.jdt.core/scripts/
plugins/org.eclipse.osgi.util/

We have to adjust eclipse-build for the class files in:

plugins/org.eclipse.osgi.services/
plugins/org.eclipse.core.runtime.compatibility.registry/classes/org/eclipse/core/runtime/

Attached the patch that should be applied once the build issues are resolved.
Comment 5 Andrew Overholt CLA 2010-03-02 10:28:25 EST
Okay, I will do nothing here until we're sorted on being able to re-build.
Comment 6 Benjamin Drung CLA 2010-03-04 14:37:12 EST
After a complete review, I found plugins/org.eclipse.swt/components/external.xpt and some .cvsignore files.
Comment 7 Andrew Overholt CLA 2010-03-04 16:05:39 EST
After looking at this page:

https://developer.mozilla.org/en/XPIDL/xpidl

and seeing that xpidl is built as part of the Mozilla build, I don't think we'll be able to make that a build requirement of eclipse-build.  Does Debian ship xpidl?  Does Ubuntu?

I'll get rid of the .cvsignore files in buildSDKSource.sh.

Thanks.
Comment 8 Benjamin Drung CLA 2010-03-04 16:20:37 EST
Created attachment 161034 [details]
remove-cvs.patch

Yes, Debian and Ubuntu ships xpidl. IIRC it's in the xulrunner-dev package, on which we already depend.

Attached the patch for removing the .cvsignore files.
Comment 9 Andrew Overholt CLA 2010-03-04 16:50:47 EST
.cvsignore files removed from tarball (before your patch, sorry :)).

I'll work on re-building the .xpt file.  Note to self:  Debian keeps xpidl in /usr/lib/xulrunner-1.9.1/xpidl (xulrunner-dev package) and Fedora in %{_libdir}/xulrunner-1.9.1/xpidl (xulrunner-devel package).
Comment 10 Benjamin Drung CLA 2010-03-11 11:09:11 EST
Note: You can rebuild the .xpt file with this command: $(pkg-config --variable=sdkdir libxul | sed "s/-devel//")/xpidl -m typelib -I $(pkg-config --variable=idldir libxul)/unstable/ -e external.xpt external.idl
Comment 11 Andrew Overholt CLA 2010-03-11 11:55:47 EST
Benjamin, please file a separate bug so we can track the .xpt issue.  It would be best if SWT were to build this themselves.  I suggest something like (pseudo-code):

buildXpt=false
...
if ($buildXpt)
  build it

I think org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh is the best place for it.  The SWT team will know best.
Comment 12 Andrew Overholt CLA 2010-03-11 11:57:09 EST
AFAIK there is nothing I can do on this bug ATM.  This bug is also not targetted for 0.5.
Comment 13 Benjamin Drung CLA 2010-03-15 21:58:36 EDT
Created attachment 162120 [details]
clean-source.patch

Here's the patch that we use for creating our source tarball.
Comment 14 Benjamin Drung CLA 2010-03-17 08:27:40 EDT
Created attachment 162270 [details]
compile-xpt.patch

Here is the patch for compiling the .xpt file (if it does not exit).
Comment 15 Alexander Kurtakov CLA 2010-03-17 08:53:46 EDT
(In reply to comment #14)
> Created an attachment (id=162270) [details]
> compile-xpt.patch
> 
> Here is the patch for compiling the .xpt file (if it does not exit).

Please propose the patch to the SWT component.
Comment 16 Benjamin Drung CLA 2010-03-17 19:27:10 EDT
I posted the patch to bug ~305569.
Comment 17 Benjamin Drung CLA 2010-07-10 20:35:08 EDT
Created attachment 173962 [details]
clean-source2.patch

I moved the compile-xpt.patch to the separate bug ~319479. Attached the updated patch to clean the SDK source. You have to apply the patches from bug ~304710, ~319479, ~319476, and ~319478 first.
Comment 18 Benjamin Drung CLA 2010-07-11 10:16:25 EDT
Created attachment 173973 [details]
clean-source3.patch

Updated clean source patch.
Comment 19 Andrew Overholt CLA 2010-07-14 11:52:53 EDT
Adding dependencies on other bugs.  I will look at this when those are closed.
Comment 20 Krzysztof Daniel CLA 2012-04-12 05:56:13 EDT
plugins/org.eclipse.osgi.util/
plugins/org.eclipse.osgi.services/

are clean now.
Comment 21 Krzysztof Daniel CLA 2012-04-12 05:59:37 EDT
I should have closed this bug yet.
Comment 22 Krzysztof Daniel CLA 2012-04-12 06:12:44 EDT
commit 971faa77f78c862f5b938ff6800eb2a15698dc7d
no class files anymore.