Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2016-04-25 20:18:55 +0000
committerDavid Williams2016-04-25 20:18:55 +0000
commitdfeaa967879a2132ab98dfc05bd8d8c0d6867d3b (patch)
tree24da7dd048c46749dd7fd4360977d5b4982491a6 /production/miscToolsAndNotes/updaterepo
parent8c73859f8e2f17374df41fbad78b69709f6fabcc (diff)
downloadeclipse.platform.releng.aggregator-dfeaa967879a2132ab98dfc05bd8d8c0d6867d3b.tar.gz
eclipse.platform.releng.aggregator-dfeaa967879a2132ab98dfc05bd8d8c0d6867d3b.tar.xz
eclipse.platform.releng.aggregator-dfeaa967879a2132ab98dfc05bd8d8c0d6867d3b.zip
[releng] Misc cleanup and clarification
Diffstat (limited to 'production/miscToolsAndNotes/updaterepo')
-rwxr-xr-xproduction/miscToolsAndNotes/updaterepo/cleanComposite.sh76
-rw-r--r--production/miscToolsAndNotes/updaterepo/cleanComposite.xml64
-rw-r--r--production/miscToolsAndNotes/updaterepo/updateComposite38milestone.xml24
-rw-r--r--production/miscToolsAndNotes/updaterepo/updateComposite42milestone.xml31
-rw-r--r--production/miscToolsAndNotes/updaterepo/updateComposite43N.xml41
-rwxr-xr-xproduction/miscToolsAndNotes/updaterepo/updateGenericComposites.sh90
-rw-r--r--production/miscToolsAndNotes/updaterepo/updateGenericComposites.xml104
7 files changed, 430 insertions, 0 deletions
diff --git a/production/miscToolsAndNotes/updaterepo/cleanComposite.sh b/production/miscToolsAndNotes/updaterepo/cleanComposite.sh
new file mode 100755
index 000000000..514fecc7d
--- /dev/null
+++ b/production/miscToolsAndNotes/updaterepo/cleanComposite.sh
@@ -0,0 +1,76 @@
+#!/usr/bin/env bash
+
+# Utility to invoke p2.process.artifacts via eclipse antrunner
+# First argument must be the absolute directory path to the
+# (simple) artifact repository.
+
+JAVA_5_HOME=${JAVA_5_HOME:-/shared/common/jdk1.5.0-latest}
+JAVA_6_HOME=${JAVA_6_HOME:-/shared/common/jdk1.6.0-latest}
+JAVA_7_HOME=${JAVA_7_HOME:-/shared/common/jdk1.7.0-latest}
+JAVA_8_HOME=${JAVA_8_HOME:-/shared/common/jdk1.8.0_x64-latest}
+
+export JAVA_HOME=${JAVA_HOME:-${JAVA_8_HOME}}
+
+devJRE="${JAVA_HOME}/bin/java"
+
+if [[ ! -n ${devJRE} -a -x ${devJRE} ]]
+then
+ echo "ERROR: could not find (or execute) JRE were expected: ${devJRE}"
+ exit 1
+else
+ # display version, just to be able to log it.
+ echo "DEBUG: JRE Location and Version: ${devJRE}"
+ echo "DEBUG: $( $devJRE -version )"
+fi
+
+
+# remember, the eclipse install must match the VM used (e.g. both 64 bit, both 32 bit, etc).
+ECLIPSE_EXE=${ECLIPSE_EXE:-/shared/simrel/tools/eclipse45/eclipse/eclipse}
+
+if [ ! -n ${ECLIPSE_EXE} -a -x ${ECLIPSE_EXE} ]
+then
+ echo "ERROR: ECLIPSE_EXE is not defined or not executable: ${ECLIPSE_EXE}"
+ exit 2
+fi
+
+BUILDFILE=cleanComposite.xml
+if [[ -z "${BUILDFILE}" ]]
+then
+ printf "\n\t%s\t%s\n" "ERROR" "must provide ant file to perform composite update as first argument"
+ exit 1
+fi
+if [[ ! -e "${BUILDFILE}" ]]
+then
+ printf "\n\t%s\t%s\n" "ERROR" "BUILDFILE does not exist: ${BUILDFILE}"
+ exit 1
+fi
+BUILDFILESTR="-f ${BUILDFILE}"
+
+repodir=$1
+if [[ -z "${repodir}" ]]
+then
+ printf "\n\t%s\t%s\n" "ERROR" "repodir must be specified as first argument"
+ exit 1
+fi
+if [[ ! -e "${repodir}" ]]
+then
+ printf "\n\t%s\t%s\n" "ERROR" "repodir does not exist: ${repodir}"
+ exit 1
+else
+ REPODIRSTR="-Drepodir=${repodir}"
+fi
+
+devArgs="$devArgs $REPODIRSTR $COMPLOCATIONSTR"
+
+devworkspace=workspace-updateComposite
+
+${ECLIPSE_EXE} --launcher.suppressErrors -nosplash -console -debug -data $devworkspace -application org.eclipse.ant.core.antRunner $BUILDFILESTR ${extraArgs} -vm $devJRE -vmargs $devArgs
+RC=$?
+if [[ $RC != 0 ]]
+then
+ echo "error occurred in composite operation RC: $RC"
+ exit $RC
+fi
+
+exit 0
+
diff --git a/production/miscToolsAndNotes/updaterepo/cleanComposite.xml b/production/miscToolsAndNotes/updaterepo/cleanComposite.xml
new file mode 100644
index 000000000..c46fa04bd
--- /dev/null
+++ b/production/miscToolsAndNotes/updaterepo/cleanComposite.xml
@@ -0,0 +1,64 @@
+<project
+ default="updatecomposite"
+ basedir=".">
+
+ <target name="updatecomposite">
+ <fail
+ unless="repodir"
+ message="repodir must be passed in to this script" />
+ <p2.composite.repository>
+ <repository location="file://${repodir}" />
+ <remove>
+ <repository location="I20130502-0800" />
+ <repository location="I20130503-2000" />
+ <repository location="I20130504-1500" />
+ <repository location="I20130505-2000" />
+ <repository location="I20130507-1100" />
+ <repository location="I20130508-1200" />
+ <repository location="I20130508-2000" />
+ <repository location="I20130509-2000" />
+ <repository location="I20130510-2000" />
+ <repository location="I20130511-1500" />
+ <repository location="I20130512-2000" />
+ <repository location="I20130513-2000" />
+ <repository location="I20130514-2000" />
+ <repository location="I20130515-2000" />
+ <repository location="I20130516-2200" />
+ <repository location="I20130518-1500" />
+ <repository location="I20130519-2000" />
+ <repository location="I20130520-2000" />
+ <repository location="I20130521-2000" />
+ <repository location="I20130522-2000" />
+
+ </remove>
+ </p2.composite.repository>
+<!-- needs work -->
+ <delete>
+ <fileset dir="${repodir}">
+
+ <include name="I20130502-0800" />
+ <include name="I20130503-2000" />
+ <include name="I20130504-1500" />
+ <include name="I20130505-2000" />
+ <include name="I20130507-1100" />
+ <include name="I20130508-1200" />
+ <include name="I20130508-2000" />
+ <include name="I20130509-2000" />
+ <include name="I20130510-2000" />
+ <include name="I20130511-1500" />
+ <include name="I20130512-2000" />
+ <include name="I20130513-2000" />
+ <include name="I20130514-2000" />
+ <include name="I20130515-2000" />
+ <include name="I20130516-2200" />
+ <include name="I20130518-1500" />
+ <include name="I20130519-2000" />
+ <include name="I20130520-2000" />
+ <include name="I20130521-2000" />
+ <include name="I20130522-2000" />
+ </fileset>
+ </delete>
+
+ </target>
+</project>
+
diff --git a/production/miscToolsAndNotes/updaterepo/updateComposite38milestone.xml b/production/miscToolsAndNotes/updaterepo/updateComposite38milestone.xml
new file mode 100644
index 000000000..8c79567d3
--- /dev/null
+++ b/production/miscToolsAndNotes/updaterepo/updateComposite38milestone.xml
@@ -0,0 +1,24 @@
+<project
+ default="updatecomposite"
+ basedir=".">
+ <target name="updatecomposite">
+ <p2.composite.repository>
+ <repository
+ location="file:///home/data/httpd/download.eclipse.org/eclipse/updates/3.8milestones/"
+ name="The Eclipse Project milestone repository" />
+ <remove>
+ <repository location="S-3.8M1-201108031800" />
+ <repository location="S-3.8M2-201109151308" />
+ <repository location="S-3.8M3-201110271800" />
+ <repository location="S-3.8M4-201112091447" />
+ <repository location="S-3.8M5-201201251800" />
+ <repository location="S-3.8M6-201203141800" />
+ <repository location="S-3.8M7-201205022000" />
+ <repository location="S-3.8RC1-201205182345" />
+ <repository location="S-3.8RC2-201205251400" />
+ <repository location="S-3.8RC3-201205310600" />
+ </remove>
+ </p2.composite.repository>
+ </target>
+</project>
+
diff --git a/production/miscToolsAndNotes/updaterepo/updateComposite42milestone.xml b/production/miscToolsAndNotes/updaterepo/updateComposite42milestone.xml
new file mode 100644
index 000000000..62658da66
--- /dev/null
+++ b/production/miscToolsAndNotes/updaterepo/updateComposite42milestone.xml
@@ -0,0 +1,31 @@
+<project
+ default="updatecomposite"
+ basedir=".">
+ <target name="updatecomposite">
+ <p2.composite.repository>
+ <repository
+ location="file:///home/data/httpd/download.eclipse.org/eclipse/updates/4.2milestones/"
+ name="The Eclipse Project milestone repository" />
+ <!--
+ <add>
+ <repository location="http://download.eclipse.org/webtools/downloads/drops/R3.3.0/R-3.3.0-20110607160810/repository/"/>
+ <repository location='http://download.eclipse.org/libra/releases/R-0.1.0-201106071417/'/>
+ </add>
+
+ -->
+ <remove>
+ <repository location="S-4.2M1-201108051200" />
+ <repository location="S-4.2M2-201109161615" />
+ <repository location="S-4.2M3-201110281100" />
+ <repository location="S-4.2M4-201112092100" />
+ <repository location="S-4.2M5-201201271145" />
+ <repository location="S-4.2M6-201203151300" />
+ <repository location="S-4.2M7-201205031800" />
+ <repository location="S-4.2RC1-201205182145" />
+ <repository location="S-4.2RC2-201205242100" />
+ <repository location="S-4.2RC3-201205311500" />
+ </remove>
+ </p2.composite.repository>
+ </target>
+</project>
+
diff --git a/production/miscToolsAndNotes/updaterepo/updateComposite43N.xml b/production/miscToolsAndNotes/updaterepo/updateComposite43N.xml
new file mode 100644
index 000000000..ef464f29a
--- /dev/null
+++ b/production/miscToolsAndNotes/updaterepo/updateComposite43N.xml
@@ -0,0 +1,41 @@
+<project
+ default="updatecomposite"
+ basedir=".">
+ <target name="updatecomposite">
+
+ <fail unless="repodir" message="must specify repodirectory" />
+ <echo message="repodir: ${repodir}" />
+
+
+ <p2.composite.repository>
+ <repository
+ location="file://${repodir}"
+ name="The Eclipse Project nightly repository" />
+ <!--
+ <add>
+ <repository location="http://download.eclipse.org/webtools/downloads/drops/R3.3.0/R-3.3.0-20110607160810/repository/"/>
+ <repository location='http://download.eclipse.org/libra/releases/R-0.1.0-201106071417/'/>
+ </add>
+
+ -->
+ <remove>
+ <repository location="N20120626-1030" />
+ <repository location="N20120627-2000" />
+ <repository location="N20120628-2000" />
+ <repository location="N20120629-2000" />
+ <repository location="N20120701-0800" />
+ <repository location="N20120701-2000" />
+ <repository location="N20120702-2000" />
+ </remove>
+ </p2.composite.repository>
+ <echo message="repodir: ${repodir}" />
+ <delete dir="${repodir}/N20120626-1030" />
+ <delete dir="${repodir}/N20120627-2000" />
+ <delete dir="${repodir}/N20120628-2000" />
+ <delete dir="${repodir}/N20120629-2000" />
+ <delete dir="${repodir}/N20120701-0800" />
+ <delete dir="${repodir}/N20120701-2000" />
+ <delete dir="${repodir}/N20120702-2000" />
+ </target>
+</project>
+
diff --git a/production/miscToolsAndNotes/updaterepo/updateGenericComposites.sh b/production/miscToolsAndNotes/updaterepo/updateGenericComposites.sh
new file mode 100755
index 000000000..5a4023bc3
--- /dev/null
+++ b/production/miscToolsAndNotes/updaterepo/updateGenericComposites.sh
@@ -0,0 +1,90 @@
+#!/usr/bin/env bash
+#*******************************************************************************
+# Copyright (c) 2015 IBM Corporation 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
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# David Williams - initial API and implementation
+#*******************************************************************************
+
+# Utility to invoke p2.process.artifacts via eclipse antrunner
+# First argument must be the absolute directory path to the
+# (simple) artifact repository.
+
+JAVA_5_HOME=${JAVA_5_HOME:-/shared/common/jdk1.5.0-latest}
+JAVA_6_HOME=${JAVA_6_HOME:-/shared/common/jdk1.6.0-latest}
+JAVA_7_HOME=${JAVA_7_HOME:-/shared/common/jdk1.7.0-latest}
+JAVA_8_HOME=${JAVA_8_HOME:-/shared/common/jdk1.8.0_x64-latest}
+
+export JAVA_HOME=${JAVA_HOME:-${JAVA_8_HOME}}
+
+devJRE="${JAVA_HOME}"/bin/java
+
+if [ ! -n ${devJRE} -a -x ${devJRE} ]
+then
+ echo "ERROR: could not find (or execute) JRE where expected: ${devJRE}"
+ exit 1
+else
+ # display version, just to be able to log it.
+ echo "JRE Location and Version: ${devJRE}"
+ echo $( $devJRE -version )
+fi
+
+# Assumed there is an Eclipse SDK already installed.
+# remember, the eclipse install must match the VM used (e.g. both 64 bit, both 32 bit, etc).
+ECLIPSE_EXE=${ECLIPSE_EXE:-/shared/eclipse/sdk/eclipse45/eclipse/eclipse}
+
+if [[ ! -n ${ECLIPSE_EXE} && -x ${ECLIPSE_EXE} ]]
+then
+ echo "ERROR: ECLIPSE_EXE is not defined or not executable: ${ECLIPSE_EXE}"
+ exit 2
+fi
+
+BUILDFILE=updateGenericComposites.xml
+if [[ -z "${BUILDFILE}" ]]
+then
+ printf "\n\t%s\t%s\n" "ERROR:" "must provide ant file to perform composite update"
+ exit 1
+fi
+if [[ ! -e "${BUILDFILE}" ]]
+then
+ printf "\n\t%s\t%s\n" "ERROR:" "BUILDFILE does not exist: ${BUILDFILE}"
+ exit 1
+fi
+BUILDFILESTR="-f ${BUILDFILE}"
+
+currentStream=$1
+if [[ -z "${currentStream}" ]]
+then
+ printf "\n\t%s\t%s\n" "WARNING:" "Current stream version not specified on command line, assuming 4.6"
+ currentStream="4.6"
+fi
+
+maintenanceStream=$2
+if [[ -z "${maintenanceStream}" ]]
+then
+ printf "\n\t%s\t%s\n" "WARNING:" "Maintenance stream version not specified on command line, assuming 4.5"
+ maintenanceStream="4.5"
+fi
+
+
+
+devArgs="$devArgs -DcurrentStream=$currentStream -DmaintenanceStream=$maintenanceStream"
+
+devworkspace=workspace-updateGenericComposite
+
+${ECLIPSE_EXE} --launcher.suppressErrors -nosplash -console -data $devworkspace -application org.eclipse.ant.core.antRunner $BUILDFILESTR ${extraArgs} -vm $devJRE -vmargs $devArgs
+RC=$?
+if [[ $RC != 0 ]]
+then
+ echo "error occurred in composite operation RC: $RC"
+ exit $RC
+fi
+
+
+
+exit 0
+
diff --git a/production/miscToolsAndNotes/updaterepo/updateGenericComposites.xml b/production/miscToolsAndNotes/updaterepo/updateGenericComposites.xml
new file mode 100644
index 000000000..a487f1beb
--- /dev/null
+++ b/production/miscToolsAndNotes/updaterepo/updateGenericComposites.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 IBM Corporation 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
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ David Williams - initial API and implementation
+-->
+
+<project
+ default="updateGenericComposites"
+ basedir=".">
+
+ <!--
+ updateGenericComposites is a utilty to use once a year or so,
+ when ever a new release is started.
+ It must be ran from "antRunner appliction"
+
+ -->
+ <target name="updateGenericComposites">
+
+ <fail
+ unless="currentStream"
+ message="currentStream (such as '4.6') must be defined for this script" />
+ <fail
+ unless="maintenanceStream"
+ message="maintenanceStream (such as '4.5') must be defined for this script" />
+
+ <!-- Note: we do not put stream number in 'name', since once a 'name' is defined
+ in Eclipse's UI, it does not change. -->
+ <updatecomposite
+ repotocreate="/home/data/httpd/download.eclipse.org/eclipse/updates/I-builds"
+ repotopointto="http://download.eclipse.org/eclipse/updates/${currentStream}-I-builds/"
+ reponame="Eclipse Project current integration builds repository" />
+ <updatecomposite
+ repotocreate="/home/data/httpd/download.eclipse.org/eclipse/updates/N-builds"
+ repotopointto="http://download.eclipse.org/eclipse/updates/${currentStream}-N-builds/"
+ reponame="Eclipse Project current nightly builds repository" />
+ <updatecomposite
+ repotocreate="/home/data/httpd/download.eclipse.org/eclipse/updates/milestones"
+ repotopointto="http://download.eclipse.org/eclipse/updates/${currentStream}milestones/"
+ reponame="Eclipse Project current milestone builds repository" />
+ <updatecomposite
+ repotocreate="/home/data/httpd/download.eclipse.org/eclipse/updates/M-builds"
+ repotopointto="http://download.eclipse.org/eclipse/updates/${maintenanceStream}-M-builds/"
+ reponame="Eclipse Project maintenance builds repository" />
+
+ </target>
+
+ <!--
+ macro to create a "generic" composite site, that simply points to
+ annohter repository.
+
+ repoToCreate must be an absolute file path directory,
+ that is writeable.
+
+ repoToPointTo can be any repo, but must be in "full form", such as
+ http://download.eclipse.org/eclipse/updates/${currentStream}milestones/
+
+ -->
+ <macrodef name="updatecomposite">
+ <attribute name="repoToCreate" />
+ <attribute name="repoToPointTo" />
+ <attribute name="reponame" />
+ <sequential>
+ <!-- delete it, if already exists -->
+ <delete
+ dir="@{repoToCreate}"
+ failonerror="false" />
+ <!-- create it -->
+ <mkdir dir="@{repoToCreate}" />
+ <!-- now add the one child -->
+ <echo message="(re)creating repostory: @{repoToCreate}" />
+ <echo message="adding child repository: @{repoToPointTo}" />
+ <p2.composite.repository>
+ <repository location="file://@{repoToCreate}" name="@{reponame}"/>
+ <add location="@{repoToPointTo}" />
+ </p2.composite.repository>
+
+ <local name="p2IndexFilename" />
+ <property
+ name="p2IndexFilename"
+ value="@{repoToCreate}/p2.index" />
+ <echo message="creating p2.index file" />
+ <echo
+ file="${p2IndexFilename}"
+ message="version=1${line.separator}" />
+ <echo
+ file="${p2IndexFilename}"
+ append="true"
+ message="metadata.repository.factory.order=compositeContent.xml,!${line.separator}" />
+ <echo
+ file="${p2IndexFilename}"
+ append="true"
+ message="artifact.repository.factory.order=compositeArtifacts.xml,!${line.separator}" />
+
+ </sequential>
+ </macrodef>
+
+</project>
+

Back to the top