1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

Fix bug 153655 - incorrect source features on update site

This commit is contained in:
Martin Oberhuber 2006-08-18 14:30:48 +00:00
parent b60ea3b816
commit ae74daf5de
7 changed files with 335 additions and 59 deletions

View file

@ -0,0 +1,228 @@
# User specific environment and startup programs
umask 002
BASE_PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin
LD_LIBRARY_PATH=.
BASH_ENV=$HOME/.bashrc
USERNAME=`whoami`
xhost +$HOSTNAME
DISPLAY=:0.0
CVS_RSH=ssh
ulimit -c unlimited
export CVS_RSH USERNAME BASH_ENV LD_LIBRARY_PATH DISPLAY
proc=$$
curdir=`pwd`
cd `dirname $0`
mydir=`pwd`
#notification list
recipients=
#sets skip.performance.tests Ant property
skipPerf=""
#sets skip.tests Ant property
skipTest=""
#sets sign Ant property
sign=""
tagMaps=""
#sets fetchTag="HEAD" for nightly builds if required
tag=""
#Basebuilder for Eclipse 3.2.1 maintenance
buildProjectTags=v20060529
#updateSite property setting
updateSite=""
#flag indicating whether or not mail should be sent to indicate build has started
mail=""
#flag used to build based on changes in map files
compareMaps=""
#buildId - build name
buildId=""
#buildLabel - name parsed in php scripts <buildType>-<buildId>-<datestamp>
buildLabel=""
# tag for build contribution project containing .map files
mapVersionTag=HEAD
# directory in which to export builder projects
#builderDir=/builds/eclipsebuilder
builderDir=$mydir/../working/build
# buildtype determines whether map file tags are used as entered or are replaced with HEAD
buildType=N
# directory where to copy build
#postingDirectory=/builds/transfer/files/master/downloads/drops
postingDirectory=$mydir/../publish
# flag to indicate if test build
testBuild=""
# path to javadoc executable
javadoc=""
# value used in buildLabel and for text replacement in index.php template file
builddate=`date +%Y%m%d`
buildtime=`date +%H%M`
timestamp=$builddate$buildtime
# process command line arguments
usage="usage: $0 [-notify emailaddresses][-test][-buildDirectory directory][-buildId name][-buildLabel directory name][-tagMapFiles][-mapVersionTag tag][-builderTag tag][-bootclasspath path][-compareMaps][-skipPerf] [-skipTest][-updateSite site][-sign] M|N|I|S|R"
if [ $# -lt 1 ]
then
echo >&2 "$usage"
exit 1
fi
while [ $# -gt 0 ]
do
case "$1" in
-buildId) buildId="$2"; shift;;
-buildLabel) buildLabel="$2"; shift;;
-mapVersionTag) mapVersionTag="$2"; shift;;
-tagMapFiles) tagMaps="-DtagMaps=true";;
-skipPerf) skipPerf="-Dskip.performance.tests=true";;
-skipTest) skipTest="-Dskip.tests=true";;
-buildDirectory) builderDir="$2"; shift;;
-notify) recipients="$2"; shift;;
-test) postingDirectory="/builds/transfer/files/bogus/downloads/drops";testBuild="-Dtest=true";;
-builderTag) buildProjectTags="$2"; shift;;
-compareMaps) compareMaps="-DcompareMaps=true";;
-updateSite) updateSite="-DupdateSite=$2";shift;;
-sign) sign="-Dsign=true";;
-*)
echo >&2 $usage
exit 1;;
*) break;; # terminate while loop
esac
shift
done
# After the above the build type is left in $1.
buildType=$1
# Set default buildId and buildLabel if none explicitly set
if [ "$buildId" = "" ]
then
buildId=$buildType$builddate-$buildtime
fi
if [ "$buildLabel" = "" ]
then
buildLabel=$buildId
fi
#Set the tag to HEAD for Nightly builds
if [ "$buildType" = "N" ]
then
tag="-DfetchTag=HEAD"
versionQualifier="-DforceContextQualifier=$buildId"
fi
# tag for eclipseInternalBuildTools on ottcvs1
internalToolsTag=$buildProjectTags
# tag for exporting org.eclipse.releng.basebuilder
baseBuilderTag=$buildProjectTags
# tag for exporting the custom builder
customBuilderTag=$buildProjectTags
if [ -e $builderDir ]
then
builderDir=$builderDir$timestamp
fi
# directory where features and plugins will be compiled
buildDirectory=$builderDir/src
mkdir -p $builderDir
cd $builderDir
#check out org.eclipse.releng.basebuilder
cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co -r $baseBuilderTag org.eclipse.releng.basebuilder
#check out org.eclipse.rse.build
cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp co -r $customBuilderTag org.eclipse.tm.rse/releng/org.eclipse.rse.build
if [ "$tagMaps" == "-DtagMaps=true" ]; then
cvs -d moberhuber@dev.eclipse.org:/cvsroot/dsdp rtag -r $customBuilderTag v$buildId org.eclipse.tm.rse/releng/org.eclipse.rse.build
fi
if [ "$HOSTNAME" == "utils" ]
then
#Running on build.eclipse.org
java15_home=/shared/common/ibm-java2-ppc64-50
java14_home=/shared/webtools/apps/IBMJava2-ppc64-142
javadoc="-Djavadoc15=$java15_home/bin/javadoc"
PATH=$java15_home/jre/bin:$PATH;export PATH
elif [ "$HOSTNAME" == "parser.takefive.co.at" ]
then
#Running on parser
java15_home=/opt/jdk1.5.0_06
java14_home=/opt/j2sdk1.4.2_12
javadoc="-Djavadoc15=$java15_home/bin/javadoc"
PATH=$java15_home/jre/bin:$PATH;export PATH
fi
mkdir -p $postingDirectory/$buildLabel
chmod -R 755 $builderDir
#default value of the bootclasspath attribute used in ant javac calls.
bootclasspath="$java14_home/jre/lib/rt.jar:$java14_home/jre/lib/jsse.jar"
bootclasspath_15="$java15_home/jre/lib/rt.jar"
cd $builderDir/org.eclipse.rse.build
echo buildId=$buildId >> monitor.properties
echo timestamp=$timestamp >> monitor.properties
echo buildLabel=$buildLabel >> monitor.properties
echo recipients=$recipients >> monitor.properties
echo log=$postingDirectory/$buildLabel/index.php >> monitor.properties
#the base command used to run AntRunner headless
antRunner="`which java` -Xmx500m -jar ../org.eclipse.releng.basebuilder/startup.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"
#clean drop directories
# $antRunner -buildfile eclipse/helper.xml cleanSites
echo recipients=$recipients
echo postingDirectory=$postingDirectory
echo builderTag=$buildProjectTags
echo buildDirectory=$buildDirectory
echo bootclasspath=$bootclasspath
echo bootclasspath_15=$bootclasspath_15
#full command with args
buildCommand="$antRunner -q -buildfile buildAll.xml $mail $testBuild $compareMaps -DmapVersionTag=$mapVersionTag -DpostingDirectory=$postingDirectory -Dbootclasspath=$bootclasspath -DbuildType=$buildType -D$buildType=true -DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildLabel -Dtimestamp=$timestamp -DmapCvsRoot=:ext:sdimitro@dev.eclipse.org:/cvsroot/eclipse $skipPerf $skipTest $tagMaps -DJ2SE-1.5=$bootclasspath_15 -DJ2SE-1.4=$bootclasspath -DCDC-1.0/Foundation-1.0=$bootclasspath_foundation -DlogExtension=.xml $javadoc $updateSite $sign -DgenerateFeatureVersionSuffix=true -Djava15-home=$builderDir/jdk/linuxppc/ibm-java2-ppc-50/jre -listener org.eclipse.releng.build.listeners.EclipseBuildListener"
#capture command used to run the build
echo $buildCommand>command.txt
#run the build
$buildCommand
retCode=$?
if [ $retCode != 0 ]
then
echo "Build failed (error code $retCode)."
exit -1
fi
#clean up
rm -rf $builderDir

View file

@ -33,6 +33,10 @@ sub makeAbsolute($) {
# This should include the org.eclipse.pde.build project
$eclipse = "../eclipse";
# $basebuilder" is the location of the Eclipse Releng basebuilder
# This can also be set to ${eclipse}
$basebuilder = "../org.eclipse.releng.basebuilder"
# $builder is the location of the custom build scripts customTargets.xml and build.properties
# (i.e. the contents of org.eclipse.rse.build)
$builder = ".";
@ -42,13 +46,14 @@ $working = "../working";
# make these absolute paths
$eclipse = makeAbsolute($eclipse);
$basebuilder = makeAbsolute($basebuilder);
$builder = makeAbsolute($builder);
$working = makeAbsolute($working);
$plugins = File::Spec->catdir($eclipse, "plugins");
$baseBuilderGlob = File::Spec->catdir($plugins, "org.eclipse.pde.build*");
$plugins = File::Spec->catdir($basebuilder, "plugins");
$pdeBuildGlob = File::Spec->catdir($plugins, "org.eclipse.pde.build*");
# Find the base build scripts: genericTargets.xml and build.xml
@candidates = glob($baseBuilderGlob);
@candidates = glob($pdeBuildGlob);
$n = @candidates;
if ($n == 0) {
die("PDE Build was not found.");
@ -56,7 +61,7 @@ if ($n == 0) {
if ($n > 1) {
die("Too many versions of PDE Build were found.");
}
$baseBuilder = $candidates[0];
$pdeBuild = $candidates[0];
$buildDirectory = "$working/build";
$packageDirectory = "$working/package";
@ -69,9 +74,9 @@ $timeStamp = sprintf("%4.4d%2.2d%2.2d-%2.2d%2.2d", $year + 1900, ($mon + 1), $md
$buildId = $buildType . $timeStamp;
$buildId = ask("Enter the build id", $buildType . $timeStamp);
$incantation = "java -cp ${eclipse}/startup.jar org.eclipse.core.launcher.Main ";
$incantation = "java -cp ${basebuilder}/startup.jar org.eclipse.core.launcher.Main ";
$incantation .= "-application org.eclipse.ant.core.antRunner ";
$incantation .= "-buildfile ${baseBuilder}/scripts/build.xml ";
$incantation .= "-buildfile ${pdeBuild}/scripts/build.xml ";
$incantation .= "-DbuildDirectory=${buildDirectory} ";
$incantation .= "-DpackageDirectory=${packageDirectory} ";
$incantation .= "-DpublishDirectory=${publishDirectory} ";

View file

@ -1,3 +1,4 @@
outputUpdateJars=true
archivePrefix=eclipse
collectingFolder=${archivePrefix}
buildType=P
@ -10,3 +11,11 @@ mapVersionTag=HEAD
#adds checksum suffix to directory names
generateFeatureVersionSuffix=true
#Compiler options
javacFailOnError=false
javacDebugInfo=on
#javacVerbose=true
#compileArg=-enableJavadoc
zipargs=
tarargs=--owner=0 --group=0

View file

@ -19,6 +19,10 @@ end
# This should include the org.eclipse.pde.build project
eclipse = "../eclipse"
# "basebuilder" is the location of the Eclipse Releng basebuilder
# This can be set to #{eclipse}
basebuilder = "../org.eclipse.releng.basebuilder"
# "builder" is the location of the custom build scripts customTargets.xml and build.properties
# (i.e. the contents of org.eclipse.rse.build)
builder = "."
@ -28,18 +32,19 @@ working = "../working"
# make these absolute paths
eclipse = File.expand_path(eclipse)
basebuilder = File.expand_path(basebuilder)
builder = File.expand_path(builder)
working = File.expand_path(working)
# Find the base build scripts: genericTargets.xml and build.xml
candidates = Dir["#{eclipse}/plugins/org.eclipse.pde.build*"]
candidates = Dir["#{basebuilder}/plugins/org.eclipse.pde.build*"]
if (candidates.size == 0) then
raise("PDE Build was not found.")
end
if (candidates.size > 1) then
raise("Too many versions of PDE Build were found.")
end
baseBuilder = candidates[0]
pdeBuild = candidates[0]
buildDirectory = "#{working}/build"
packageDirectory = "#{working}/package"
@ -49,9 +54,9 @@ tag = ask("Enter tag to fetch from CVS", "HEAD")
buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable)", "P")
buildId = ask("Enter the build id", buildType + Time.now.strftime("%Y%m%d-%H%M"))
command = "java -cp #{eclipse}/startup.jar org.eclipse.core.launcher.Main "
command = "java -cp #{basebuilder}/startup.jar org.eclipse.core.launcher.Main "
command += "-application org.eclipse.ant.core.antRunner "
command += "-buildfile #{baseBuilder}/scripts/build.xml "
command += "-buildfile #{pdeBuild}/scripts/build.xml "
command += "-DbuildDirectory=#{buildDirectory} "
command += "-DpackageDirectory=#{packageDirectory} "
command += "-DpublishDirectory=#{publishDirectory} "

View file

@ -43,31 +43,69 @@
<!-- ===================================================================== -->
<target name="assemble.org.eclipse.rse.sdk">
<property name="archiveName" value="RSE-SDK-${buildId}.zip"/>
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
<antcall target="unpackUpdateJarsForPackaging" />
</target>
<target name="assemble.org.eclipse.rse.core">
<property name="archiveName" value="RSE-runtime-core-${buildId}.zip"/>
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
<antcall target="unpackUpdateJarsForPackaging" />
</target>
<target name="assemble.org.eclipse.rse.local">
<property name="archiveName" value="RSE-runtime-local-${buildId}.zip"/>
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
<antcall target="unpackUpdateJarsForPackaging" />
</target>
<target name="assemble.org.eclipse.rse.ftp">
<property name="archiveName" value="RSE-runtime-ftp-${buildId}.zip"/>
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
<antcall target="unpackUpdateJarsForPackaging" />
</target>
<target name="assemble.org.eclipse.rse.ssh">
<property name="archiveName" value="RSE-runtime-ssh-${buildId}.zip"/>
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
<antcall target="unpackUpdateJarsForPackaging" />
</target>
<target name="assemble.org.eclipse.rse.dstore">
<property name="archiveName" value="RSE-runtime-dstore-${buildId}.zip"/>
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
<antcall target="unpackUpdateJarsForPackaging" />
</target>
<target name="assemble.org.eclipse.rse.examples">
<property name="archiveName" value="RSE-examples-${buildId}.zip"/>
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
<antcall target="unpackUpdateJarsForPackaging" />
</target>
<target name="unpackUpdateJarsForPackaging" depends="myInit">
<property name="tmpsite" value="${buildDirectory}/tmpsite" />
<mkdir dir="${tmpsite}/new/eclipse/features" />
<mkdir dir="${tmpsite}/new/eclipse/plugins" />
<exec executable="unzip" dir="${buildDirectory}/${buildLabel}">
<arg line="-q ${archiveName} -d ${tmpsite}" />
</exec>
<copy todir="${buildUpdateSitePath}">
<fileset dir="${tmpsite}/eclipse"/>
</copy>
<unpackUpdateJars site="${tmpsite}/eclipse" output="${tmpsite}/new/eclipse"/>
<!-- <antcall target="packageLicenseFiles"/> -->
<zip destfile="${buildDirectory}/${buildLabel}/${archiveName}"
basedir="${tmpsite}/new"
/>
<delete dir="${tmpsite}"/>
</target>
<target name="packageLicenseFiles">
<copy file="${buildRoot}/eclipse/epl-v10.html" todir="${tmpsite}/new/eclipse"/>
<copy file="${buildRoot}/eclipse/notice.html" todir="${tmpsite}/new/eclipse"/>
</target>
<!-- ===================================================================== -->
@ -117,6 +155,7 @@
<condition property="dropDir" value="S-${buildId}-${DSTAMP}${TSTAMP}" else="${buildId}">
<equals arg1="${buildType}" arg2="S"/>
</condition>
<property name="buildUpdateSitePath" value="${packageDirectory}/${dropDir}/updates"/>
</target>
<!-- ===================================================================== -->
@ -178,44 +217,8 @@
<replace dir="${buildDirectory}/plugins" value="${buildId}" token="@build@">
<include name="**/about.mappings" />
</replace>
<!-- build.update.jars builds BEFORE the normal build, since -->
<!-- update.jars does a clean but the normal build does not -->
<antcall target="build.update.jars" />
</target>
<target name="build.update.jars" depends="myInit">
<!-- build this only for toplevel features, since they include all -->
<!-- other features and the build.update.jar cleans all build results -->
<property name="updateDir" value="${packageDirectory}/${dropDir}/updates" />
<property name="type" value="feature" />
<property name="id" value="org.eclipse.rse.sdk" />
<mkdir dir="${updateDir}/features" />
<mkdir dir="${updateDir}/plugins" />
<property name="elementPath" value="${buildDirectory}/${type}s/${id}" />
<ant antfile="build.xml" dir="${elementPath}" target="build.update.jar">
<property name="target" value="build.update.jar"/>
<property name="plugin.destination" value="${updateDir}/plugins" />
<property name="feature.destination" value="${updateDir}/features" />
</ant>
<!-- Now get rid of server jars: works on UNIX only! -->
<exec dir="${updateDir}/plugins" executable="sh">
<arg value="-c"/>
<arg value="zip org.eclipse.dstore.core_*.jar -d dstore_core.jar"/>
</exec>
<exec dir="${updateDir}/plugins" executable="sh">
<arg value="-c"/>
<arg value="zip org.eclipse.dstore.extra_*.jar -d dstore_extra_server.jar"/>
</exec>
<exec dir="${updateDir}/plugins" executable="sh">
<arg value="-c"/>
<arg value="zip org.eclipse.rse.services_*.jar -d clientserver.jar"/>
</exec>
<exec dir="${updateDir}/plugins" executable="sh">
<arg value="-c"/>
<arg value="zip org.eclipse.rse.services.dstore_*.jar -d dstore_miners.jar"/>
</exec>
</target>
<!-- ===================================================================== -->
<!-- Steps to do after running the build.xmls for the elements being built. -->
<!-- ===================================================================== -->
@ -249,16 +252,7 @@
<target name="postBuild" depends="myInit">
<mkdir dir="${packageDirectory}/${dropDir}" />
<move todir="${packageDirectory}/${dropDir}">
<fileset dir="${buildDirectory}/${buildLabel}" includes="org.eclipse.rse.sdk-*"/>
<mapper type="glob" from="org.eclipse.rse.sdk-*" to="RSE-SDK-*"/>
</move>
<move todir="${packageDirectory}/${dropDir}">
<fileset dir="${buildDirectory}/${buildLabel}" includes="org.eclipse.rse.examples-*"/>
<mapper type="glob" from="org.eclipse.rse.examples-*" to="RSE-examples-*"/>
</move>
<move todir="${packageDirectory}/${dropDir}">
<fileset dir="${buildDirectory}/${buildLabel}" includes="org.eclipse.rse.*" excludes="*.sdk-* *.examples-*"/>
<mapper type="glob" from="org.eclipse.rse.*" to="RSE-runtime-*"/>
<fileset dir="${buildDirectory}/${buildLabel}" includes="RSE-*.zip"/>
</move>
<move todir="${packageDirectory}/${dropDir}">
<fileset dir="${buildDirectory}/${buildLabel}" includes="rseserver-*"/>

View file

@ -0,0 +1,29 @@
###############################################################################
# Copyright (c) 2005, 2006 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:
# IBM Corporation - initial API and implementation
###############################################################################
# properties file used by the class org.eclipse.releng.build.listeners.EclipseBuildListener
#prefix added to subject line of build related email messages
buildSubjectPrefix=[RSE-build]
#email information for sending build failure notices
host=localhost
sender=moberhuber@eclipse.org
#the http Url to Eclipse drop directories
httpUrl=http://download.eclipse.org/dsdp/tm/downloads/drops
#the ftp Url to Eclipse drop directories
#ftpUrl=ftp://download.eclipse.org
#use comma separated list for recipients
#build log name.This file is copied into drop directory until files.count file updated with correct number of zip files
#additional information added a build time by build shell script
#buildid, timestamp, buildLabel, email notification list, buildlog location

View file

@ -1,5 +1,10 @@
#!/bin/sh
#nightly build for RSE - to be executed on build.eclipse.org
#
# Prerequisites:
# - Eclipse 3.2 installed or linked from ../eclipse
# - org.eclipse.releng.basebuilder checked out to ../org.eclipse.releng.basebuilder
#
#author: martin oberhuber
curdir=`pwd`
@ -8,12 +13,13 @@ mydir=`pwd`
# pathes: see build.rb for reference
cd "$mydir/../eclipse" ; eclipse=`pwd`
cd "$mydir/../org.eclipse.releng.basebuilder" ; basebuilder=`pwd`
cd "$mydir/../working" ; working=`pwd`
cd "$mydir/../publish" ; publishDirectory=`pwd`
cd "$mydir" ; builder=`pwd`
# Find the base build scripts: genericTargets.xml and build.xml
baseBuilder="${eclipse}/plugins/org.eclipse.pde.build_3.2.0.v20060603"
pdeBuild="${basebuilder}/plugins/org.eclipse.pde.build"
buildDirectory="${working}/build"
packageDirectory="${working}/package"
@ -23,9 +29,9 @@ timestamp=`date +'%Y%m%d-%H%M'`
buildId="${buildType}${timestamp}"
rm -rf "${buildDirectory}"
command="java -cp ${eclipse}/startup.jar org.eclipse.core.launcher.Main "
command="java -cp ${basebuilder}/startup.jar org.eclipse.core.launcher.Main "
command="$command -application org.eclipse.ant.core.antRunner "
command="$command -buildfile ${baseBuilder}/scripts/build.xml "
command="$command -buildfile ${pdeBuild}/scripts/build.xml "
command="$command -DbuildDirectory=${buildDirectory} "
command="$command -DpackageDirectory=${packageDirectory} "
command="$command -DpublishDirectory=${publishDirectory} "