Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Mat Booth | 2b65e819be | |
Mat Booth | 661eff1d65 | |
Mat Booth | 684e04c591 | |
Mat Booth | 8e71d9f21a | |
Mat Booth | 28d5bf0382 | |
Mat Booth | a506bec4b3 | |
Roland Grunberg | 4b7b42b00b | |
Mat Booth | fe25fe53dc |
4
sources
4
sources
|
@ -1,3 +1,3 @@
|
|||
2cfc11196f68212dbaf9e6eb364c4a98 fedoraproject-p2-7a5a01.tar.xz
|
||||
0791998bcb54d44669edefed10557499 fedoraproject-p2-09403d.tar.xz
|
||||
0a14e091316e0a467f94c7821b9e21e6 org.eclipse.tycho-tycho-0.23.0.tar.xz
|
||||
c600a5115f29962c974b75b4b25e74f1 eclipse-bootstrap.tar.xz
|
||||
cd436a0741267ce86e97184cfee608e9 eclipse-bootstrap.tar.xz
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
eclipse_bootstrap=$1
|
||||
preV='0.23.0'
|
||||
v='0.23.0-SNAPSHOT'
|
||||
osgiV='3.10.0.v20140328-1811'
|
||||
osgiV='3.10.100.v20150602-1500'
|
||||
fp2V='0.0.1-SNAPSHOT'
|
||||
bundles=()
|
||||
bundles[0]='tycho-bundles/org.eclipse.tycho.embedder.shared'
|
||||
|
@ -135,5 +135,4 @@ cp 'tycho-bundles/tycho-bundles-external/pom.xml' "${loc}/tycho-bundles-external
|
|||
|
||||
sed -i "s/<equinox\(.*\)VersionMaven>.*<\/equinox\(.*\)VersionMaven>/<equinox\1VersionMaven>${osgiV}<\/equinox\1VersionMaven>/" pom.xml
|
||||
# xmvn-p2-installer-plugin needs to find the org.eclipse.osgi bundle
|
||||
sed -i "s/<groupId>org.eclipse.osgi<\/groupId>/<groupId>org.eclipse.tycho<\/groupId>/
|
||||
/<artifactId>org.eclipse.osgi<\/artifactId>/ a <version>${osgiV}<\/version>" fedoraproject-p2/xmvn-p2-installer-plugin/pom.xml
|
||||
sed -i "s/>\${equinox-version}</>${osgiV}</" fedoraproject-p2/xmvn-p2-installer-plugin/pom.xml
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
From f35b198f727a7b4d8e57ed52b6aa77b24a3af274 Mon Sep 17 00:00:00 2001
|
||||
From: Mat Booth <mat.booth@redhat.com>
|
||||
Date: Thu, 23 Apr 2015 10:27:12 +0100
|
||||
Subject: [PATCH] Keep compatibility with xmvn 2.1.0
|
||||
|
||||
Add copies of functions from xmvn 2.4.0 that we need to maintain
|
||||
compatibility with xmvn 2.1.0
|
||||
|
||||
This branch should be used only when xmvn >= 2.4.0 is not available.
|
||||
|
||||
Signed-off-by: Mat Booth <mat.booth@redhat.com>
|
||||
---
|
||||
pom.xml | 2 +-
|
||||
.../fedoraproject/xmvn/tools/install/JarUtils.java | 143 +++++++++++++++++++++
|
||||
2 files changed, 144 insertions(+), 1 deletion(-)
|
||||
create mode 100644 xmvn-p2-installer-plugin/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java
|
||||
|
||||
diff --git a/fedoraproject-p2/pom.xml b/fedoraproject-p2/pom.xml
|
||||
index 9febe26..91910e4 100644
|
||||
--- a/fedoraproject-p2/pom.xml
|
||||
+++ b/fedoraproject-p2/pom.xml
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<properties>
|
||||
<tycho-version>0.23.0</tycho-version>
|
||||
- <xmvn-version>2.4.0</xmvn-version>
|
||||
+ <xmvn-version>2.1.0</xmvn-version>
|
||||
<equinox-version>3.10.100.v20150521-1310</equinox-version>
|
||||
</properties>
|
||||
|
||||
diff --git a/fedoraproject-p2/xmvn-p2-installer-plugin/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java b/fedoraproject-p2/xmvn-p2-installer-plugin/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java
|
||||
new file mode 100644
|
||||
index 0000000..ccba2b0
|
||||
--- /dev/null
|
||||
+++ b/fedoraproject-p2/xmvn-p2-installer-plugin/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java
|
||||
@@ -0,0 +1,106 @@
|
||||
+/*-
|
||||
+ * Copyright (c) 2012-2015 Red Hat, Inc.
|
||||
+ *
|
||||
+ * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ * you may not use this file except in compliance with the License.
|
||||
+ * You may obtain a copy of the License at
|
||||
+ *
|
||||
+ * http://www.apache.org/licenses/LICENSE-2.0
|
||||
+ *
|
||||
+ * Unless required by applicable law or agreed to in writing, software
|
||||
+ * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ * See the License for the specific language governing permissions and
|
||||
+ * limitations under the License.
|
||||
+ */
|
||||
+package org.fedoraproject.xmvn.tools.install;
|
||||
+
|
||||
+import java.io.IOException;
|
||||
+import java.nio.file.Files;
|
||||
+import java.nio.file.Path;
|
||||
+import java.util.zip.ZipEntry;
|
||||
+import java.util.zip.ZipInputStream;
|
||||
+
|
||||
+import org.slf4j.Logger;
|
||||
+import org.slf4j.LoggerFactory;
|
||||
+
|
||||
+/**
|
||||
+ * @author Mikolaj Izdebski
|
||||
+ */
|
||||
+public class JarUtils
|
||||
+{
|
||||
+ private static final Logger logger = LoggerFactory.getLogger( JarUtils.class );
|
||||
+
|
||||
+ /**
|
||||
+ * Heuristically try to determine whether given JAR (or WAR, EAR, ...) file contains native (architecture-dependent)
|
||||
+ * code.
|
||||
+ * <p>
|
||||
+ * Currently this code only checks only for ELF binaries, but that behavior can change in future.
|
||||
+ *
|
||||
+ * @return {@code true} if native code was found inside given JAR
|
||||
+ */
|
||||
+ public static boolean containsNativeCode( Path jar )
|
||||
+ {
|
||||
+ // From /usr/include/linux/elf.h
|
||||
+ final int ELFMAG0 = 0x7F;
|
||||
+ final int ELFMAG1 = 'E';
|
||||
+ final int ELFMAG2 = 'L';
|
||||
+ final int ELFMAG3 = 'F';
|
||||
+
|
||||
+ try (ZipInputStream jis = new ZipInputStream( Files.newInputStream( jar ) ))
|
||||
+ {
|
||||
+ ZipEntry ent;
|
||||
+ while ( ( ent = jis.getNextEntry() ) != null )
|
||||
+ {
|
||||
+ if ( ent.isDirectory() )
|
||||
+ continue;
|
||||
+ if ( jis.read() == ELFMAG0 && jis.read() == ELFMAG1 && jis.read() == ELFMAG2 && jis.read() == ELFMAG3 )
|
||||
+ {
|
||||
+ logger.debug( "Native code found inside {}: {}", jar, ent.getName() );
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ logger.trace( "Native code not found inside {}", jar );
|
||||
+ return false;
|
||||
+ }
|
||||
+ catch ( IOException e )
|
||||
+ {
|
||||
+ logger.debug( "I/O exception caught when trying to determine whether JAR contains native code: {}", jar, e );
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ static class NativeMethodFound
|
||||
+ extends RuntimeException
|
||||
+ {
|
||||
+ private static final long serialVersionUID = 1;
|
||||
+
|
||||
+ final String className;
|
||||
+
|
||||
+ final String methodName;
|
||||
+
|
||||
+ final String methodSignature;
|
||||
+
|
||||
+ NativeMethodFound( String className, String methodName, String methodSignature )
|
||||
+ {
|
||||
+ this.className = className;
|
||||
+ this.methodName = methodName;
|
||||
+ this.methodSignature = methodSignature;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Heuristically try to determine whether given JAR (or WAR, EAR, ...) file is using native (architecture-dependent)
|
||||
+ * code.
|
||||
+ * <p>
|
||||
+ * Currently this code only checks if any class file declares Java native methods, but that behavior can change in
|
||||
+ * future.
|
||||
+ *
|
||||
+ * @return {@code true} given JAR as found inside to use native code
|
||||
+ */
|
||||
+ public static boolean usesNativeCode( Path jar )
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.1.0
|
||||
|
|
@ -42,7 +42,7 @@ packagefiles="${classfiles}"
|
|||
[ -e plugin.properties ] && packagefiles="plugin.properties $packagefiles"
|
||||
[ -e plugin.xml ] && packagefiles="plugin.xml $packagefiles"
|
||||
[ -e OSGI-INF ] && packagefiles="OSGI-INF $packagefiles"
|
||||
jar -cfmv "target/${bName}-${version}.jar" 'META-INF/MANIFEST.MF' ${classfiles}
|
||||
jar -cfmv "target/${bName}-${version}.jar" 'META-INF/MANIFEST.MF' ${packagefiles}
|
||||
popd
|
||||
|
||||
# Install
|
||||
|
|
47
tycho.spec
47
tycho.spec
|
@ -19,7 +19,7 @@
|
|||
|
||||
%global git_tag tycho-0.23.0
|
||||
|
||||
%global fp_p2_sha 7a5a01
|
||||
%global fp_p2_sha 09403d
|
||||
%global fp_p2_version 0.0.1
|
||||
%global fp_p2_snap -SNAPSHOT
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
Name: %{?scl_prefix}tycho
|
||||
Version: 0.23.0
|
||||
Release: 1%{?dist}
|
||||
Release: 5%{?dist}.3
|
||||
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
|
||||
|
@ -39,9 +39,9 @@ Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/or
|
|||
# version 2.4.3 (impossible to have empty mojo created as aggregate). This
|
||||
# should be fixed upstream properly
|
||||
Source1: EmptyMojo.java
|
||||
Source2: %{pkg_name}-scripts.sh
|
||||
Source3: %{pkg_name}-bootstrap.sh
|
||||
Source4: %{pkg_name}-debundle.sh
|
||||
Source2: tycho-scripts.sh
|
||||
Source3: tycho-bootstrap.sh
|
||||
Source4: tycho-debundle.sh
|
||||
# Fedora Eclipse bundles (needed when Eclipse not present) to build Tycho
|
||||
%if %{eclipse_bootstrap}
|
||||
Source5: eclipse-bootstrap.tar.xz
|
||||
|
@ -61,6 +61,7 @@ Patch4: %{pkg_name}-maven-delegation.patch
|
|||
# Additional changes needed just for bootstrap build
|
||||
Patch5: %{pkg_name}-fix-bootstrap-build.patch
|
||||
Patch6: %{pkg_name}-port-to-jetty-9.3.0.patch
|
||||
Patch7: %{pkg_name}-port-to-xmvn-2.1.0.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
@ -89,10 +90,13 @@ BuildRequires: %{name}
|
|||
%if %{eclipse_bootstrap}
|
||||
# Dependencies for Eclipse bundles we use
|
||||
BuildRequires: eclipse-filesystem
|
||||
BuildRequires: icu4j
|
||||
BuildRequires: apache-commons-jxpath
|
||||
BuildRequires: geronimo-annotation
|
||||
BuildRequires: glassfish-jsp-api
|
||||
BuildRequires: icu4j
|
||||
BuildRequires: sac
|
||||
BuildRequires: sat4j
|
||||
BuildRequires: xz-java
|
||||
%else
|
||||
BuildRequires: eclipse-platform
|
||||
%endif
|
||||
|
@ -153,8 +157,6 @@ no duplication of metadata between POM and OSGi metadata.
|
|||
|
||||
%package javadoc
|
||||
Summary: Javadocs for %{pkg_name}
|
||||
Group: Documentation
|
||||
Requires: jpackage-utils
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{pkg_name}.
|
||||
|
@ -173,6 +175,7 @@ tar -xf %{SOURCE6}
|
|||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch6 -p0
|
||||
%patch7 -p1
|
||||
|
||||
find tycho-core -iname '*html' -delete
|
||||
|
||||
|
@ -374,7 +377,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<version>3.10.0.v20140328-1811</version>
|
||||
<version>3.10.100.v20150602-1500</version>
|
||||
</project>' > JPP.tycho-osgi.pom
|
||||
|
||||
install -pm 644 JPP.tycho-osgi.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.pom
|
||||
|
@ -390,7 +393,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.osgi</groupId>
|
||||
<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
|
||||
<version>1.0.0.v20140328-1811</version>
|
||||
<version>1.0.100.v20150602-1500</version>
|
||||
</project>' > JPP.tycho-osgi.compatibility.state.pom
|
||||
|
||||
install -pm 644 JPP.tycho-osgi.compatibility.state.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.compatibility.state.pom
|
||||
|
@ -410,7 +413,6 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/li
|
|||
%{?scl:EOF}
|
||||
|
||||
%files -f .mfiles
|
||||
%dir %{_javadir}/tycho
|
||||
%{_datadir}/xmvn/lib/installer/*
|
||||
%{_javadir}-utils/p2-install.sh
|
||||
%doc README.md
|
||||
|
@ -419,6 +421,29 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/li
|
|||
%{_javadocdir}/tycho
|
||||
|
||||
%changelog
|
||||
* Mon Oct 12 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-5.3
|
||||
- fedoraproject-p2: Single IU resolving requirements with multiple matches.
|
||||
- fedoraproject-p2: Remove host localization fragments from reactor units.
|
||||
|
||||
* Thu Aug 06 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-5.2
|
||||
- Non-bootstrap build
|
||||
|
||||
* Tue Jul 14 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-5.1
|
||||
- Rebootstrap for secondary architectures
|
||||
|
||||
* Tue Jul 14 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-5
|
||||
- Add patch to support xmvn < 2.4
|
||||
|
||||
* Tue Jun 30 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-4
|
||||
- Fix bootstrap build
|
||||
- fedoraproject-p2: Allow xmvn-p2-installer to work in bootstrap mode
|
||||
|
||||
* Thu Jun 25 2015 Roland Grunberg <rgrunber@redhat.com> - 0.23.0-3
|
||||
- fedoraproject-p2: Do not generate requires for fragments.
|
||||
|
||||
* Tue Jun 09 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-2
|
||||
- Fix bootstrap build
|
||||
|
||||
* Fri Jun 05 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-1
|
||||
- Update to 0.23.0 release
|
||||
- Allow tycho-bootstrap.sh to work with "set -e" to fail faster
|
||||
|
|
Loading…
Reference in New Issue