NEW - bug 472292: aot-compile-rpm tree does not carry all the files needed

by find-debuginfo.sh https://bugzilla.redhat.com/show_bug.cgi?id=472292
Thu Nov 20 2008 Andrew Overholt <overholt@redhat.com> 3.4.1-7
- Update and re-enable patch for always generating debuginfo for class
    files when doing an RPM build.
This commit is contained in:
Andrew Overholt 2008-11-20 19:45:36 +00:00
parent bdc1e101bf
commit e6ab17d1b1
2 changed files with 241 additions and 39 deletions

View File

@ -0,0 +1,196 @@
### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
retrieving revision 1.327
diff -u -r1.327 Main.java
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000
@@ -268,22 +268,22 @@
if ((startPosition > endPosition)
|| ((startPosition < 0) && (endPosition < 0))
|| length == 0)
- return Messages.problem_noSourceInformation;
+ return Messages.problem_noSourceInformation;
StringBuffer errorBuffer = new StringBuffer();
if ((bits & Main.Logger.EMACS) == 0) {
- errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber())));
+ errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber())));
errorBuffer.append(Util.LINE_SEPARATOR);
}
errorBuffer.append('\t');
-
+
char c;
final char SPACE = '\u0020';
final char MARK = '^';
final char TAB = '\t';
//the next code tries to underline the token.....
//it assumes (for a good display) that token source does not
- //contain any \r \n. This is false on statements !
+ //contain any \r \n. This is false on statements !
//(the code still works but the display is not optimal !)
// expand to line limits
@@ -295,11 +295,11 @@
for (end = endPosition >= length ? length - 1 : endPosition ; end+1 < length; end++) {
if ((c = unitSource[end + 1]) == '\r' || c == '\n') break;
}
-
+
// trim left and right spaces/tabs
while ((c = unitSource[begin]) == ' ' || c == '\t') begin++;
//while ((c = unitSource[end]) == ' ' || c == '\t') end--; TODO (philippe) should also trim right, but all tests are to be updated
-
+
// copy source
errorBuffer.append(unitSource, begin, end-begin+1);
errorBuffer.append(Util.LINE_SEPARATOR).append("\t"); //$NON-NLS-1$
@@ -424,7 +424,7 @@
String.valueOf(generateTime),
String.valueOf(((int) (generateTime * 1000.0 / time)) / 10.0),
}));
- }
+ }
}
public void logClassFile(boolean generatePackagesStructure, String outputPath, String relativeFileName) {
if ((this.tagBits & Logger.XML) != 0) {
@@ -916,7 +916,7 @@
this.main.bind("compile.totalTime", //$NON-NLS-1$
new String[] {
String.valueOf(time),
- }));
+ }));
}
if ((this.main.timing & Main.TIMING_DETAILED) != 0) {
this.printlnOut(
@@ -1119,7 +1119,7 @@
this.endTag(Logger.STATS);
}
}
-
+
private void printTag(String name, HashMap params, boolean insertNewLine, boolean closeTag) {
if (this.log != null) {
((GenericXMLWriter) this.log).printTag(name, parameters, true, insertNewLine, closeTag);
@@ -1245,12 +1245,12 @@
boolean warnJavadocOn;
boolean warnAllJavadocOn;
-
+
public Compiler batchCompiler;
/* Bundle containing messages */
public ResourceBundle bundle;
protected FileSystem.Classpath[] checkedClasspaths;
-
+
public Locale compilerLocale;
public CompilerOptions compilerOptions; // read-only
public CompilationProgress progress;
@@ -1299,7 +1299,7 @@
public static final int TIMING_DISABLED = 0;
public static final int TIMING_ENABLED = 1;
public static final int TIMING_DETAILED = 2;
-
+
public int timing = TIMING_DISABLED;
public CompilerStats[] compilerStats;
public boolean verbose = false;
@@ -1312,7 +1312,7 @@
// two uses: recognize 'none' in options; code the singleton none
// for the '-d none' option (wherever it may be found)
public static final int DEFAULT_SIZE_CLASSPATH = 4;
-
+
public static final String NONE = "none"; //$NON-NLS-1$
/**
@@ -1562,7 +1562,7 @@
}
/**
* Return true if and only if the running VM supports the given minimal version.
- *
+ *
* <p>This only checks the major version, since the minor version is always 0 (at least for the useful cases).</p>
* <p>The given minimalSupportedVersion is one of the constants:</p>
* <ul>
@@ -2536,8 +2536,8 @@
mode = DEFAULT;
continue;
}
-
- // set DocCommentSupport, with appropriate side effects on defaults if
+
+ // set DocCommentSupport, with appropriate side effects on defaults if
// javadoc is not enabled
if (this.enableJavadocOn) {
this.options.put(
@@ -2601,7 +2601,7 @@
this.logger.logVersion(printVersionRequired);
validateOptions(didSpecifyCompliance);
-
+
// Enable annotation processing by default in batch mode when compliance is at least 1.6
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=185768
if (!didSpecifyDisabledAnnotationProcessing
@@ -2609,6 +2609,29 @@
this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
}
+ {
+ // If we're building an RPM, force full debugging info to
+ // be generated, no matter what options have been passed
+ // by Ant. This is something of a kludge, but it is far
+ // better than the alternative, which is having class
+ // files with debug info mysteriously missing.
+
+ String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
+ String RpmArch = System.getenv("RPM_ARCH");
+ String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
+ if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
+ this.options.put(
+ CompilerOptions.OPTION_LocalVariableAttribute,
+ CompilerOptions.GENERATE);
+ this.options.put(
+ CompilerOptions.OPTION_LineNumberAttribute,
+ CompilerOptions.GENERATE);
+ this.options.put(
+ CompilerOptions.OPTION_SourceFileAttribute,
+ CompilerOptions.GENERATE);
+ }
+ }
+
this.logger.logCommandLineArguments(newCommandLineArgs);
this.logger.logOptions(this.options);
@@ -2636,7 +2659,7 @@
0,
classCount);
}
-
+
setPaths(bootclasspaths,
sourcepathClasspathArg,
sourcepathClasspaths,
@@ -2644,7 +2667,7 @@
extdirsClasspaths,
endorsedDirClasspaths,
customEncoding);
-
+
if (this.pendingErrors != null) {
for (Iterator iterator = this.pendingErrors.iterator(); iterator.hasNext(); ) {
String message = (String) iterator.next();
@@ -3376,7 +3399,7 @@
} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
this.options.put(
CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+ isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
} else {
addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$
}

View File

@ -23,14 +23,14 @@ Epoch: 1
# FIXME: update java packaging guidelines for this. See
# fedora-devel-java-list discussion in September 2008.
#
#
# Prevent brp-java-repack-jars from being run.
%define __jar_repack 0
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_majmin}.%{eclipse_micro}
Release: 6%{?dist}
Release: 7%{?dist}
License: EPL
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.eclipse.org/
@ -56,7 +56,7 @@ Source18: ecj.sh.in
# when using the FileInitializer
Source19: %{name}-filenamepatterns.txt
# cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co equinox-incubator/org.eclipse.equinox.initializer
# tar cjf eclipse-fileinitializerapp.tar.bz2 equinox-incubator/
# tar cjf eclipse-fileinitializerapp.tar.bz2 equinox-incubator/
# (generated 2006-11-01 18:48 UTC)
Source20: %{name}-fileinitializerapp.tar.bz2
# Script to wrap PDE Build calls for bundle builds
@ -109,10 +109,9 @@ Patch32: %{name}-compilelibs.patch
#Patch12: %{name}-launcher-set-install-dir-and-shared-config.patch
# Always generate debug info when building RPMs (Andrew Haley)
# This needs to be investigated for getEnv changes
# FIXME: update this patch to avoid fuzz
#Patch14: %{name}-ecj-rpmdebuginfo.patch
Patch14: %{name}-ecj-rpmdebuginfo.patch
# generic releng plugins that can be used to build plugins
# see this thread for details:
# see this thread for details:
# https://www.redhat.com/archives/fedora-devel-java-list/2006-April/msg00048.html
Patch15: %{name}-pde.build-add-package-build.patch
Patch24: %{name}-add-ppc64-sparc64-s390-s390x.patch
@ -191,7 +190,7 @@ BuildRequires: mx4j >= 2.1
BuildRequires: jetty >= 5.1.14-1.6
BuildRequires: lucene >= 2.3.1-3.4
BuildRequires: lucene-contrib >= 2.3.1-3.4
BuildRequires: regexp
BuildRequires: regexp
BuildRequires: junit >= 3.8.1-3jpp
BuildRequires: junit4
BuildRequires: sat4j
@ -330,7 +329,7 @@ pushd features/org.eclipse.equinox.executable
# FIXME: deal with this
## put the configuration directory in an arch-specific location
#sed --in-place "s:/usr/lib/eclipse/configuration:%{_libdir}/%{name}/configuration:" library/eclipse.c
## make the eclipse binary relocatable
## make the eclipse binary relocatable
#sed --in-place "s:/usr/share/eclipse:%{_datadir}/%{name}:" library/eclipse.c
zip -q -9 -r ../../plugins/org.eclipse.platform/launchersrc.zip library
popd
@ -349,7 +348,9 @@ sed -i -e "s|http://java.sun.com/j2se/1.4/docs/api|%{_datadir}/javadoc/java|" \
plugins/org.eclipse.pde.doc.user/pdeOptions.txt \
plugins/org.eclipse.pde.doc.user/pdeOptions
#%patch14 -p0
pushd plugins/org.eclipse.jdt.core
%patch14 -p0
popd
pushd plugins/org.eclipse.pde.build
%patch15
@ -417,7 +418,7 @@ sed --in-place "s/$swt_frag_ver_s390x/$swt_frag_ver/g" plugins/org.eclipse.swt.g
sed -i "s/\(rootFileslinux_gtk_\)ppc64/\1ppc128/g" \
features/org.eclipse.equinox.executable/target.build.xml
# Copy all of the s390x directories and files to ppc64 or sparc{,64} or alpha dirs and replace
# Copy all of the s390x directories and files to ppc64 or sparc{,64} or alpha dirs and replace
# the s390x strings with ppc64, etc.
%ifnarch %{ix86} x86_64
cp -rp features/org.eclipse.platform/about_files/linux.gtk.{x86,%{_arch}}
@ -469,7 +470,7 @@ IFS='
popd
IFS=$OLDIFS
%endif
%endif
# Don't build for non-linux,gtk,%%{_arch} targets
pushd features
@ -673,7 +674,7 @@ ant \
-Dlibsconfig=true \
-DJavaSE-1.6=%{_jvmdir}/java/jre/lib/rt.jar \
-DcompilerArg="-encoding ISO-8859-1 -nowarn"
# Build the FileInitializer application
SDK=$(cd eclipse && pwd)
mkdir -p home
@ -782,7 +783,7 @@ tar -C $RPM_BUILD_ROOT%{_libdir} -zxf result/linux-gtk-%{eclipse_arch}-sdk.tar.g
# ECF filetransfer plugins we built
rm $sdkDir/plugins/org.eclipse.ecf*.jar
unzip -d $RPM_BUILD_ROOT%{_libdir} \
org.eclipse.ecf/build/rpmBuild/org.eclipse.ecf.filetransfer_feature.zip
org.eclipse.ecf/build/rpmBuild/org.eclipse.ecf.filetransfer_feature.zip
# Remove the feature we used for building
rm -rf \
$sdkDir/features/org.eclipse.ecf.filetransfer_feature_*
@ -983,7 +984,7 @@ rm -r $sdkDir/configuration/org.eclipse.update
# -Dosgi.sharedConfiguration.area=$RPM_BUILD_ROOT%{_libdir}/%{name}/configuration
# Note (2006-12-05): upon looking at this again, we (bkonrath, overholt) don't
# know what we're doing with $libdir_path :) It requires some investigation.
#
#
# Extract .so files
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=90535
pushd $RPM_BUILD_ROOT
@ -1027,25 +1028,25 @@ for id in `ls configuration/org.eclipse.osgi/bundles`; do
else
echo "%{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" >> %{_builddir}/%{buildsubdir}/%{name}-platform.install;
fi
done
done
popd
# Install symlinks to the SWT JNI shared libraries in %%{_libdir}/eclipse
pushd $RPM_BUILD_ROOT%{_libdir}/%{name}
for lib in $(find configuration -name libswt\*.so); do
for lib in $(find configuration -name libswt\*.so); do
ln -s $lib `basename $lib`
done
popd
# Ensure the shared libraries have the correct permissions
pushd $RPM_BUILD_ROOT%{_libdir}/%{name}
pushd $RPM_BUILD_ROOT%{_libdir}/%{name}
for lib in `find configuration -name \*.so`; do
chmod 755 $lib
done
popd
%endif
# Set eclipse.product to org.fedoraproject.ide.platform
# Set eclipse.product to org.fedoraproject.ide.platform
sed --in-place "s/plugins\/org.eclipse.platform/plugins\/org.fedoraproject.ide.platform/" \
$RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/config.ini
sed --in-place "s/eclipse.product=org.eclipse.platform.ide/eclipse.product=org.fedoraproject.ide.platform.product/" \
@ -1109,14 +1110,14 @@ ln -s %{_libdir}/%{name}/plugins/org.fedoraproject.ide.platform_%{version}/eclip
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/pixmaps
ln -s %{_datadir}/icons/hicolor/48x48/apps/%{name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
# Install the efj wrapper script
# Install the efj wrapper script
install -p -D -m0755 %{SOURCE17} $RPM_BUILD_ROOT%{_bindir}/efj
sed --in-place "s:startup.jar:%{_libdir}/%{name}/startup.jar:" \
$RPM_BUILD_ROOT%{_bindir}/efj
$RPM_BUILD_ROOT%{_bindir}/efj
# Install the ecj wrapper script
install -p -D -m0755 %{SOURCE18} $RPM_BUILD_ROOT%{_bindir}/ecj
sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj
sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj
# A sanity check.
desktop-file-validate %{SOURCE2}
@ -1534,6 +1535,11 @@ fi
#%{_libdir}/%{name}/configuration/org.eclipse.equinox.source
%changelog
* Thu Nov 20 2008 Andrew Overholt <overholt@redhat.com> 3.4.1-7
- Update and re-enable patch for always generating debuginfo for class files
when doing an RPM build.
- Resolves rh#472292.
* Mon Oct 27 2008 Andrew Overholt <overholt@redhat.com> 3.4.1-6
- Keep Provides: eclipse on -pde (different than Fedora 9 but probably
more correct).
@ -1557,19 +1563,19 @@ fi
- Add conditionals around Equinox initialization to enable debugging.
* Fri Oct 13 2008 Alexander Kurtakov <akurtako@redhat.com> 3.4.1-1
- Symlink to ant-apache-bsf and ant-commons-net.
- Symlink to ant-apache-bsf and ant-commons-net.
- Update branding.
- Don't re-pack JARs (see fedora-devel-java-list discussion in September 2008).
- Update desktop-file-install usage and add --vendor=fedora. (Andrew Overholt)
- Resolves #466476. Fix pdebuild script. (Jeff Johnston)
- Remove dropins contents while running initializer.
- Remove dropins contents while running initializer.
- Add patch for wrong javaHome on x86_64 in the native build.(Alexander Kurtakov)
* Thu Oct 03 2008 Alexander Kurtakov <akurtako@redhat.com> 3.4.1-0
- 3.4.1
- Update nojarsignatures patch.
- Added osgi-classpath.patch fixes broken bootclasspath (Sean Flanigan).
- Removed patches 33 and 34 - not needed anymore.
- Removed patches 33 and 34 - not needed anymore.
* Thu Sep 25 2008 Michal Nowak <mnowak@redhat.com> 3.4.0-24
- exclude parts of eclipse-pydev from JIT compilation
@ -1702,7 +1708,7 @@ fi
SDK)
* Sat Jun 14 2008 Dennis Gilmore <dennis@ausil.us> 3.3.2-13
- make changes to support sparcv9
- make changes to support sparcv9
* Wed May 14 2008 Andrew Overholt <overholt@redhat.com> 3.3.2-12
- Back-port patch for e.o#206432 (rh#446064).
@ -1960,7 +1966,7 @@ fi
* Mon Feb 26 2007 Ben Konrath <bkonrath@redhat.com> 3.3.0-0.1.M5eh
- 3.3M5.
- Remove launcher-addplatformtotildeeclipse.patch as it's only needed
- Remove launcher-addplatformtotildeeclipse.patch as it's only needed
for FC-5 -> FC-6.
- Remove swt firefox patches as they are no longer needed.
- Remove ppc64, s390{,x} and sparc{,64} support.
@ -2017,8 +2023,8 @@ fi
* Mon Nov 06 2006 Ben Konrath <bkonrath@redhat.com> 3.2.1-16
- Move copy-platform back to %%{_datadir}/eclipse.
- Require gjdoc >= 0.7.7-14 as it generates consistent html across archs.
- Move most of the doc plugins back to %%{_datatdir}/eclipse now that gjdoc
is fixed.
- Move most of the doc plugins back to %%{_datatdir}/eclipse now that gjdoc
is fixed.
* Fri Nov 03 2006 Andrew Overholt <overholt@redhat.com> 3.2.1-15
- Make sdk require config.ini itself rather than the package to deal with the
@ -2046,9 +2052,9 @@ fi
- Disable building the help indexes on all archs so that we have the same doc
plugins on all archs.
- Remove org.apache.ant_1.6.5/bin/runant.py to avoid multilib conflicts.
- Repack all the jars and the jars within those jars. This is needed
- Repack all the jars and the jars within those jars. This is needed
to make this package multilib compatible.
- Put SWT symlinks in %%{_libdir}/eclipse instead of
- Put SWT symlinks in %%{_libdir}/eclipse instead of
%%{_libdir}/eclipse/plugins.
* Wed Nov 01 2006 Andrew Overholt <overholt@redhat.com> 3.2.1-11
@ -2080,7 +2086,7 @@ fi
* Sat Oct 28 2006 Ben Konrath <bkonrath@redhat.com> 3.2.1-7
- Add patch for ecj [] classpath problem.
- Remove configuration files from rcp files list.
- Remove configuration files from rcp files list.
- Add patch set bindir and shared config patch to allow the eclipse binary
to sit in %%{_bindir} and remove the symlinks. This patch also allows us to
set osgi.sharedConfiguration.area config on a per build basis so that the
@ -2136,7 +2142,7 @@ fi
* Tue Sep 26 2006 Ben Konrath <bkonrath@redhat.com> 3.2.1-0.RC.2
- Don't set eclipse.product incorrectly in %%postun of -sdk and -platform.
* Mon Sep 25 2006 Ben Konrath <bkonrath@redhat.com> 3.2.1-0.RC.1
* Mon Sep 25 2006 Ben Konrath <bkonrath@redhat.com> 3.2.1-0.RC.1
- M20060921-0945 (3.2.1 pre-release).
- Upadate patches to 3.2.1.
- Add icu4j 3.4.5 sources.
@ -2148,7 +2154,7 @@ fi
* Thu Sep 21 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-7
- Use real SWT version on ia64, ppc64, s390 and s390x.
- Remove the swt native libs from the rcp sub-package because they are
- Remove the swt native libs from the rcp sub-package because they are
already in the libswt-gtk2 sub-package and rcp requires libswt-gtk2.
- Set correct eclipse.product in post and postun of sdk and platform
sub-packages (rh bug # 207442)
@ -2162,7 +2168,7 @@ fi
* Mon Sep 11 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-6
- Update swt-firefox patch and remove libswt-xpcom patch (rh bug # 200929).
- Re-work files list to match upstream and remove rebuild-sdk-features
- Re-work files list to match upstream and remove rebuild-sdk-features
(rh bug # 205933).
* Thu Sep 07 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-5
@ -2174,7 +2180,7 @@ fi
- Re-add customBuildCallbacks.xml-add-pre.gather.bin.parts.patch because
it has not been applied upstream.
- Minor spec file clean ups.
- Add %%{name} to the -devel package Provides so that upgrading from
- Add %%{name} to the -devel package Provides so that upgrading from
FC-5 to FC-6 works.
- Re-enable natively compiling the ant.ui plugin.
- Re-enable natively compiling the team.cvs.core plugin on ia64.
@ -2244,7 +2250,7 @@ fi
- Use tomcat plugin version instead of org.eclipse.tomcat_*.
* Tue Jul 04 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-1jpp_1fc
- Fix tomcat symlinks.
- Fix tomcat symlinks.
* Tue Jul 04 2006 Andrew Overholt <overholt@redhat.com> 3.2.0-1jpp_1fc
- 3.2.0.
@ -2253,7 +2259,7 @@ fi
* Tue Jun 13 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-0jpp_0fc.3.2RC7.7
- Rename -devel packages to -sdk to match upstream names.
- Add Provides eclipse-sdk to platform-sdk.
- Add Provides eclipse-sdk to platform-sdk.
- Remove zip re-pack code.
* Mon Jun 12 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-0jpp_0fc.3.2RC7.6
@ -2283,8 +2289,8 @@ fi
* Tue Jun 06 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-0jpp_0fc.3.2RC7.1
- 3.2RC7.
- Remove com.jcraft.jsch_0.1.28.jar and repackage with classes from the system
jsch.jar.
- Work around ia64 compile problem in aot-compile-rpm.
jsch.jar.
- Work around ia64 compile problem in aot-compile-rpm.
* Wed May 31 2006 Ben Konrath <bkonrath@redhat.com> 3.2.0-0jpp_0fc.3.2RC6
- 3.2RC6.