Drop workaround for metainfo problem
Add patch for javascript/webkit2 bug ebz#525340 Add missing mocking deps for contributor-tools
This commit is contained in:
parent
7ad9810339
commit
d8b4167392
|
@ -0,0 +1,81 @@
|
|||
From 9c3c5c10465f18f1082ce1bcfe5393eb98ef053c Mon Sep 17 00:00:00 2001
|
||||
From: Leo Ufimtsev
|
||||
Date: Fri, 29 Sep 2017 11:57:53 -0400
|
||||
Subject: Bug 525340 [Gtk][Webkit2] Javascript evaluate fails with
|
||||
"SyntaxError: Return statements are only valid inside functions"
|
||||
|
||||
Wrapping evaluate logic into a function to deal with corner
|
||||
case where 'return' is not at the beginnign of the script.
|
||||
|
||||
Tested with all Browser jUnit tests.
|
||||
|
||||
Change-Id: Icb7c6d29006a0382fb5525bd7184101c3ea0cbdd
|
||||
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
|
||||
---
|
||||
.../gtk/org/eclipse/swt/browser/WebKit.java | 26 ++++++++++------------
|
||||
1 file changed, 12 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
|
||||
index f9361e1..1227298 100644
|
||||
--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
|
||||
+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
|
||||
@@ -1216,7 +1216,7 @@
|
||||
// Mechanism to generate unique ID's
|
||||
private static int nextCallbackId = 1;
|
||||
private static HashSet<Integer> usedCallbackIds = new HashSet<>();
|
||||
- private static int getNextId() {
|
||||
+ static int getNextId() {
|
||||
int value = 0;
|
||||
boolean unique = false;
|
||||
while (unique == false) {
|
||||
@@ -1236,28 +1236,26 @@
|
||||
}
|
||||
|
||||
static Object evaluate(String script, Browser browser, long /*int*/ webView, boolean doNotBlock) {
|
||||
- /* Webkit2: We remove the 'return' prefix that normally comes with the script.
|
||||
- * The reason is that in Webkit1, script was wrapped into a function and if an exception occured
|
||||
- * it was caught on Javascript side and a callback to java was made.
|
||||
- * In Webkit2, we handle errors in the callback, no need to wrap them in a function anymore.
|
||||
+ /* Wrap script around a function for backwards compatibility,
|
||||
+ * user can specify 'return', which may not be at the beginning of the script.
|
||||
+ * Valid scripts:
|
||||
+ * 'hi'
|
||||
+ * return 'hi'
|
||||
+ * var x = 1; return 'hi'
|
||||
*/
|
||||
- String fixedScript;
|
||||
- if (script.length() > 7 && script.substring(0, 7).equals("return ")) {
|
||||
- fixedScript = script.substring(7);
|
||||
- } else {
|
||||
- fixedScript = script;
|
||||
- }
|
||||
+ String swtUniqueExecFunc = "SWTWebkit2TempFunc" + CallBackMap.getNextId() + "()";
|
||||
+ String wrappedScript = "function " + swtUniqueExecFunc +"{" + script + "}; " + swtUniqueExecFunc;
|
||||
|
||||
if (doNotBlock) {
|
||||
// Execute script, but do not wait for async call to complete. (assume it does). Bug 512001.
|
||||
- WebKitGTK.webkit_web_view_run_javascript(webView, Converter.wcsToMbcs(fixedScript, true), 0, 0, 0);
|
||||
+ WebKitGTK.webkit_web_view_run_javascript(webView, Converter.wcsToMbcs(wrappedScript, true), 0, 0, 0);
|
||||
return null;
|
||||
} else {
|
||||
// Callback logic: Initiate an async callback and wait for it to finish.
|
||||
// The callback comes back in javascriptExecutionFinishedProc(..) below.
|
||||
Webkit2EvalReturnObj retObj = new Webkit2EvalReturnObj();
|
||||
int callbackId = CallBackMap.putObject(retObj);
|
||||
- WebKitGTK.webkit_web_view_run_javascript(webView, Converter.wcsToMbcs(fixedScript, true), 0, callback.getAddress(), callbackId);
|
||||
+ WebKitGTK.webkit_web_view_run_javascript(webView, Converter.wcsToMbcs(wrappedScript, true), 0, callback.getAddress(), callbackId);
|
||||
Shell shell = browser.getShell();
|
||||
Display display = browser.getDisplay();
|
||||
while (!shell.isDisposed()) {
|
||||
@@ -1270,7 +1268,7 @@
|
||||
CallBackMap.removeObject(callbackId);
|
||||
|
||||
if (retObj.errorNum != 0) {
|
||||
- throw new SWTException(retObj.errorNum, retObj.errorMsg);
|
||||
+ throw new SWTException(retObj.errorNum, retObj.errorMsg +"\nScript that was evaluated:\n" + wrappedScript);
|
||||
} else {
|
||||
return retObj.returnValue;
|
||||
}
|
||||
--
|
||||
cgit v1.1
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From 889543269853e12925ef00a6e76c3dd85ce5b915 Mon Sep 17 00:00:00 2001
|
||||
From: Roland Grunberg <rgrunber@redhat.com>
|
||||
Date: Tue, 25 Oct 2016 16:48:28 -0400
|
||||
Subject: [PATCH] Disable uses by default (osgi.resolver.usesMode=ignore).
|
||||
set.
|
||||
|
||||
---
|
||||
.../felix/src/org/apache/felix/resolver/ResolverImpl.java | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git rt.equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java rt.equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java
|
||||
index ded683f..7216865 100755
|
||||
--- rt.equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java
|
||||
+++ rt.equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java
|
||||
@@ -1210,7 +1210,9 @@ public class ResolverImpl implements Resolver
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
- computeUses(session, allWireCandidates, allPackages, resource);
|
||||
+ if (! "ignore".equals(System.getProperty("osgi.resolver.usesMode"))) {
|
||||
+ computeUses(session, allWireCandidates, allPackages, resource);
|
||||
+ }
|
||||
}
|
||||
});
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -334,7 +334,7 @@ index 88a8daa..382c5ee 100644
|
|||
id="org.eclipse.equinox.preferences"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
@@ -575,27 +498,6 @@
|
||||
@@ -617,27 +540,6 @@
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
|
@ -362,7 +362,7 @@ index 88a8daa..382c5ee 100644
|
|||
id="org.eclipse.equinox.console"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
@@ -624,13 +526,6 @@
|
||||
@@ -666,13 +568,6 @@
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
|
@ -376,7 +376,7 @@ index 88a8daa..382c5ee 100644
|
|||
id="org.eclipse.e4.emf.xpath"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
@@ -660,4 +555,18 @@
|
||||
@@ -702,4 +597,18 @@
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java.orig 2012-05-05 15:24:03.000000000 +0200
|
||||
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java 2012-05-17 16:14:48.607827015 +0200
|
||||
@@ -807,7 +807,7 @@
|
||||
@@ -805,7 +805,7 @@
|
||||
//First check to see if there is already an IU around for this
|
||||
IInstallableUnit bundleIU = queryForIU(result, bundleDescriptions[i].getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion()));
|
||||
IArtifactKey key = createBundleArtifactKey(bd.getSymbolicName(), bd.getVersion().toString());
|
||||
|
|
|
@ -214,7 +214,7 @@ index 7e1f520..734dd10 100644
|
|||
+requires.12.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=s390x)(!(org.eclipse.swt.buildtime=true)))
|
||||
--- a/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh 2017-04-19 13:31:15.000000000 +0100
|
||||
+++ b/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh 2017-04-23 16:58:34.022207885 +0100
|
||||
@@ -127,7 +127,7 @@
|
||||
@@ -128,7 +128,7 @@
|
||||
defaultJava=DEFAULT_JAVA_EXEC
|
||||
OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
|
||||
;;
|
||||
|
|
27
eclipse.spec
27
eclipse.spec
|
@ -38,7 +38,7 @@ Epoch: 1
|
|||
Summary: An open, extensible IDE
|
||||
Name: eclipse
|
||||
Version: 4.7.1
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: EPL
|
||||
URL: http://www.eclipse.org/
|
||||
|
||||
|
@ -110,6 +110,9 @@ Patch23: eclipse-webkit2-by-default.patch
|
|||
# Only build gtk3 backend for SWT
|
||||
Patch24: eclipse-swt-disable-gtk2.patch
|
||||
|
||||
# Disable uses by default
|
||||
Patch25: eclipse-disable-uses-constraints.patch
|
||||
|
||||
# Droplet fixes
|
||||
Patch26: eclipse-make-droplets-runnable.patch
|
||||
Patch27: eclipse-disable-droplets-in-dropins.patch
|
||||
|
@ -123,6 +126,9 @@ Patch29: fix_ant_build.patch
|
|||
# Hide the p2 Droplets from cluttering Install Wizard Combo
|
||||
Patch30: eclipse-hide-droplets-from-install-wizard.patch
|
||||
|
||||
# Fix webkit/javascript problem affecting jboss
|
||||
Patch31: eclipse-bug-525340.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: tycho
|
||||
BuildRequires: tycho-extras
|
||||
|
@ -351,6 +357,8 @@ installer UIs.
|
|||
Summary: Tools for Eclipse Contributors
|
||||
|
||||
Requires: %{name}-platform = %{epoch}:%{version}-%{release}
|
||||
Requires: easymock
|
||||
Requires: mockito
|
||||
|
||||
%description contributor-tools
|
||||
This package contains tools specifically for Eclipse contributors. It includes
|
||||
|
@ -391,6 +399,7 @@ tar --strip-components=1 -xf %{SOURCE1}
|
|||
%patch23
|
||||
%endif
|
||||
%patch24
|
||||
%patch25
|
||||
%patch26
|
||||
%patch27
|
||||
%if 0%{?rhel} || 0%{?fedora} < 27
|
||||
|
@ -399,6 +408,7 @@ tar --strip-components=1 -xf %{SOURCE1}
|
|||
%endif
|
||||
%patch29
|
||||
%patch30
|
||||
%patch31 -p1
|
||||
|
||||
# Use ecj when bootstrapping
|
||||
%if %{bootstrap}
|
||||
|
@ -728,6 +738,7 @@ popd #eclipse
|
|||
%if 0%{?rhel}
|
||||
# Quote paths that contain spaces, necessary on rhel
|
||||
sed -i -e 's|\(%{_prefix}.*\)|"\1"|' .mfiles*
|
||||
sed -i -e '/^%%dir .$/d' .mfiles-tests
|
||||
%endif
|
||||
|
||||
# Some directories we need
|
||||
|
@ -757,11 +768,8 @@ desktop-file-validate $RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop
|
|||
|
||||
# Install appstream appdata
|
||||
install -m644 -D desktopintegration/eclipse.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/eclipse.appdata.xml
|
||||
# Workaround for https://pagure.io/releng/issue/7037
|
||||
%if 0%{?fedora} < 27
|
||||
install -m644 -D desktopintegration/eclipse-jdt.metainfo.xml $RPM_BUILD_ROOT%{_datadir}/appdata/eclipse-jdt.metainfo.xml
|
||||
install -m644 -D desktopintegration/eclipse-pde.metainfo.xml $RPM_BUILD_ROOT%{_datadir}/appdata/eclipse-pde.metainfo.xml
|
||||
%endif
|
||||
|
||||
LOCAL_PWD=`pwd`
|
||||
#change the installation p2 files
|
||||
|
@ -1048,16 +1056,10 @@ fi
|
|||
%{_javadir}/%{name}/equinox*
|
||||
|
||||
%files jdt -f .mfiles-jdt
|
||||
# Workaround for https://pagure.io/releng/issue/7037
|
||||
%if 0%{?fedora} < 27
|
||||
%{_datadir}/appdata/eclipse-jdt.metainfo.xml
|
||||
%endif
|
||||
|
||||
%files pde -f .mfiles-pde -f .mfiles-cvs -f .mfiles-sdk
|
||||
# Workaround for https://pagure.io/releng/issue/7037
|
||||
%if 0%{?fedora} < 27
|
||||
%{_datadir}/appdata/eclipse-pde.metainfo.xml
|
||||
%endif
|
||||
|
||||
%files p2-discovery -f .mfiles-p2-discovery
|
||||
|
||||
|
@ -1074,6 +1076,11 @@ fi
|
|||
%{_eclipsedir}/plugins/org.eclipse.osgi.util_*
|
||||
|
||||
%changelog
|
||||
* Mon Oct 02 2017 Mat Booth <mat.booth@redhat.com> - 1:4.7.1-5
|
||||
- Drop workaround for metainfo problem
|
||||
- Add patch for javascript/webkit2 bug ebz#525340
|
||||
- Add missing mocking deps for contributor-tools
|
||||
|
||||
* Tue Sep 19 2017 Mat Booth <mat.booth@redhat.com> - 1:4.7.1-4
|
||||
- Add workaround for appstream metainfo bug in RPM on F27
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- rt.equinox.framework/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c.orig 2016-10-13 16:53:39.092748697 +0100
|
||||
+++ rt.equinox.framework/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c 2016-10-13 17:01:12.350231281 +0100
|
||||
@@ -122,6 +122,11 @@
|
||||
@@ -119,6 +119,11 @@
|
||||
setenv("OXYGEN_DISABLE_INNER_SHADOWS_HACK", "1", 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue