Add a proper patch for ebz#534255

This commit is contained in:
Mat Booth 2018-05-03 10:30:53 +01:00
parent e182d67090
commit 101f5bbc0b
2 changed files with 62 additions and 76 deletions

View File

@ -1,6 +1,15 @@
--- tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java.orig 2018-04-30 14:30:10.281927855 +0100
+++ tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java 2018-04-30 14:30:58.973755768 +0100
@@ -29,7 +29,7 @@
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java
index ae8d6c88..197e104d 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/locking/FileLockServiceImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 SAP AG and others.
+ * Copyright (c) 2011, 2018 SAP AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ public class FileLockServiceImpl implements FileLockService {
private Location anyLocation;
public FileLockServiceImpl() {
@ -9,74 +18,43 @@
new EquinoxContainer(null), new AtomicBoolean(false));
}
--- tycho-core/pom.xml.orig 2018-04-30 14:24:51.873051601 +0100
+++ tycho-core/pom.xml 2018-04-30 14:25:46.426859073 +0100
@@ -123,7 +123,7 @@
<artifactId>plexus-archiver</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
</dependency>
<dependency>
--- sisu-equinox/sisu-equinox-embedder/pom.xml.orig 2018-04-30 14:25:12.892977419 +0100
+++ sisu-equinox/sisu-equinox-embedder/pom.xml 2018-04-30 14:25:46.427859069 +0100
@@ -30,7 +30,7 @@
<artifactId>plexus-component-annotations</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
<dependency>
--- tycho-compiler-jdt/pom.xml.orig 2018-04-30 14:57:02.459229391 +0100
+++ tycho-compiler-jdt/pom.xml 2018-04-30 14:56:08.265420993 +0100
@@ -29,7 +29,7 @@
<dependencies>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
</dependency>
<dependency>
@@ -47,7 +47,7 @@
<artifactId>maven-core</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
</dependency>
<dependency>
--- pom.xml.orig 2018-04-30 14:24:58.019029911 +0100
+++ pom.xml 2018-04-30 14:56:08.264420997 +0100
@@ -217,22 +217,22 @@
<version>3.1</version>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>${equinoxVersionMaven}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.platform</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
<version>${equinoxCompatVersionMaven}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>${jdtVersionMaven}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jdt</groupId>
+ <groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
<version>${jdtAptVersionMaven}</version>
</dependency>
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java
index 941a84b9..b072823c 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/EquinoxResolver.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Sonatype Inc. and others.
+ * Copyright (c) 2008, 2018 Sonatype Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -276,6 +276,7 @@ public class EquinoxResolver {
systemBundleManifest.put(Constants.BUNDLE_SYMBOLICNAME, SYSTEM_BUNDLE_SYMBOLIC_NAME);
systemBundleManifest.put(Constants.BUNDLE_VERSION, "0.0.0");
systemBundleManifest.put(Constants.BUNDLE_MANIFESTVERSION, "2");
+ systemBundleManifest.put(StateImpl.Eclipse_JREBUNDLE, "true");
if (systemPackages != null && systemPackages.trim().length() > 0) {
systemBundleManifest.put(Constants.EXPORT_PACKAGE, systemPackages);
} else {
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java b/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java
index e062e0b7..56462e8c 100644
--- a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java
+++ b/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/EquinoxResolverTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Sonatype Inc. and others.
+ * Copyright (c) 2012, 2018 Sonatype Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -68,6 +68,8 @@ public class EquinoxResolverTest extends AbstractTychoMojoTestCase {
.getFullSpecification();
assertEquals("CDC-1.0/Foundation-1.0", ee.getProfileName());
Properties platformProperties = subject.getPlatformProperties(projects.get(2), ee);
- assertEquals("javax.microedition.io", platformProperties.get(Constants.FRAMEWORK_SYSTEMPACKAGES));
+ assertEquals(
+ "java.io,java.lang,java.lang.ref,java.lang.reflect,java.math,java.net,java.security,java.security.acl,java.security.cert,java.security.interfaces,java.security.spec,java.text,java.text.resources,java.util,java.util.jar,java.util.zip,javax.microedition.io",
+ platformProperties.get(Constants.FRAMEWORK_SYSTEMPACKAGES));
}
}

View File

@ -22,7 +22,7 @@
Name: tycho
Version: 1.2.0
Release: 0.3.git5d018bb%{?dist}
Release: 0.4.git5d018bb%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
# license file is missing but all files having some licensing information are ASL 2.0
@ -56,6 +56,7 @@ Patch1: tycho-maven-archiver-3.0.1.patch
Patch2: %{name}-use-custom-resolver.patch
Patch3: %{name}-maven-delegation.patch
# Changes needed for building against photon
# Submitted upstream in https://bugs.eclipse.org/bugs/show_bug.cgi?id=534255
Patch4: build-against-photon-equinox.patch
# Changes needed for building against latest surefire
Patch5: build-against-surefire-2.21.patch
@ -173,12 +174,16 @@ mv fedoraproject-p2-%{fp_p2_git_tag} fedoraproject-p2
%patch1
%patch2 -p1
%patch3 -p1
%patch4
%patch4 -p1
%patch5 -p1
# Unneeded for RPM builds
%pom_remove_plugin :maven-site-plugin
# Switch for "tycho" platform deps
%pom_change_dep org.eclipse.platform: org.eclipse.tycho: . tycho-core sisu-equinox/sisu-equinox-embedder
%pom_change_dep org.eclipse.jdt: org.eclipse.tycho: . tycho-compiler-jdt
sed -i -e 's/>%{version}-SNAPSHOT</>%{version}</' $(grep -rl '>%{version}-SNAPSHOT<' --include=pom.xml)
sed -i -e 's/\.qualifier//' $(find tycho-{surefire,bundles} -maxdepth 3 -name MANIFEST.MF)
@ -361,6 +366,9 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}${xmvn_libdir}/inst
%files javadoc -f .mfiles-javadoc
%changelog
* Thu May 03 2018 Mat Booth <mat.booth@redhat.com> - 1.2.0-0.4.git5d018bb
- Add a proper patch for ebz#534255
* Wed May 02 2018 Mat Booth <mat.booth@redhat.com> - 1.2.0-0.3.git5d018bb
- Update tycho snapshot and simplify bootstrapping