This page describes how we release software.
The following pages might be of use:
cd $PTII
ls -d `find . -name auto | awk -F / '{for(i=1;i<(NF);i++) { printf("%s/", $i);}printf("junit\n")}'`
cd $PTII/ptolemy/configs/doc make check_tests
$PTII/ptolemy/configs/doc/completeDemos.htm
cd $PTII
adm/bin/missingDemos
cd $PTII $PTII/adm/bin/demoLinkCheck
Note that not all the applets listed are missing. Some of them use the serial port, JAI, JMF etc. A sample command to create the demoLink lines:
grep ptides $PTII/ptolemy/configs/doc/models.txt | sed 's@$CLASSPATH/@@' | awk '{nf = split($0, f, "/"); print "demoLink(\"\", \"" $1 "\", \"" f[nf] "\");"}' | sed 's@.xml")@")@' | sed 's@.xml",@",@'
about:copyright
URLS specially. One facility on the copyright page is the ability
to expand all the model, .html files and .pdf files on
the various demonstration pages. This allows us to
verify that all the resources are present in the tree.
about:copyright
is an essential part of testing each release.
about:copyright
to test the Web Start release.
# Check out a clean tree svn co https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/trunk ptII cd ptII export PTII=`pwd` ./configure ant
make checkjunk
and adding files as appropriate to the makefiles:
cd $PTII make clean_shipping make checkjunkLook for
*** lines and add files to makefiles
or add them to the clean_shipping rule in $PTII/makefile
and the most recent src.ex file in
$PTII/adm/gen-x.y/src.ex.
$PTII/util/testsuite/chkjava on the java files and fix problems
cd $PTII make cleanDerivedJavaFiles make clean_shippingOr removing the files by hand:
cd $PTII/ptolemy/actor/ptalon rm `make echo_OPTIONAL_JSRCS` cd $PTII/ptolemy/data/expr rm `make echo_OPTIONAL_JSRCS` cd $PTII/ptolemy/data/unit rm `make echo_OPTIONAL_JSRCS` cd $PTII/ptolemy/copernicus/kernel/fragment rm `make echo_OPTIONAL_JSRCS` # Create a file that contains the names of the java files to include cd $PTII rm -rf vendors ptolemy/apps rm -rf ptolemy/domains/ct/demo/Corba/util/*.java
adm/bin/ptIItxtfiles > /tmp/f egrep '.java$' /tmp/f | grep -v /vendors/ >& /tmp/j
cd $PTII/adm/test make missingMakefilesBelow are the missing makefiles that are ok to be missing:
./config/makefile ./doc/coding/templates/makefile ./ptolemy/actor/lib/fmi/fmipp/swig/makefile ./ptolemy/backtrack/automatic/ptolemy/actor/lib/makefile ./ptolemy/backtrack/automatic/ptolemy/domains/sdf/lib/makefile ./ptolemy/backtrack/automatic/ptolemy/math/makefile ./ptolemy/backtrack/eclipse/plugin/makefile ./ptolemy/backtrack/eclipse/plugin/actions/makefile ./ptolemy/backtrack/eclipse/plugin/actions/codestyle/makefile ./ptolemy/backtrack/eclipse/plugin/compatibility/makefile ./ptolemy/backtrack/eclipse/plugin/console/makefile ./ptolemy/backtrack/eclipse/plugin/dialogs/makefile ./ptolemy/backtrack/eclipse/plugin/editor/makefile ./ptolemy/backtrack/eclipse/plugin/preferences/makefile ./ptolemy/backtrack/eclipse/plugin/util/makefile ./ptolemy/backtrack/eclipse/plugin/widgets/makefile ./ptolemy/backtrack/ui/makefile ./ptolemy/backtrack/util/java/util/makefile ./ptolemy/plot/servlet/makefile
doc/makefile:
cd $PTII/adm/test make missingDocPackagesBelow are the packages that need not be in
doc/makefile.
config contrib.actor.lib.example diva.util.java2d.svg doc.coding.templates doc.tutorial doc.tutorial.domains doc.tutorial.graph doc.tutorial.graph.junit doc.tutorial.gui ptolemy.actor.corba ptolemy.actor.corba.CoordinatorUtil ptolemy.actor.corba.CorbaIOUtil ptolemy.actor.corba.util ptolemy.actor.lib.javasound.test.pitchshift ptolemy.actor.lib.mail ptolemy.actor.lib.reactable ptolemy.actor.lib.tutorial ptolemy.backtrack.automatic.ptolemy.math ptolemy.backtrack.eclipse.plugin.actions.codestyle ptolemy.backtrack.eclipse.plugin.compatibility ptolemy.backtrack.eclipse.plugin.console ptolemy.backtrack.eclipse.plugin.dialogs ptolemy.backtrack.eclipse.plugin.widgets ptolemy.backtrack.test.array1 ptolemy.backtrack.test.random1 ptolemy.backtrack.test.test1 ptolemy.backtrack.test.test2 ptolemy.backtrack.util.java.util ptolemy.caltrop.ddi.util ptolemy.chic ptolemy.component ptolemy.component.domains.ptinyos ptolemy.copernicus.interpreted ptolemy.domains.gr.lib.quicktime ptolemy.plot.servlet
$PTII/adm/bin/addtrailingnl
cd $PTII # Run addtrailingnl without actually doing anything: cat /tmp/j | xargs $PTII/adm/bin/addtrailingnl -n # Run addtrailingnl with adding the new lines: cat /tmp/j | xargs $PTII/adm/bin/addtrailingnl # Run with -n and then without: cat /tmp/f | egrep '\.[cjh]$' | xargs $PTII/adm/bin/addtrailingnl -n cat /tmp/f | egrep makefile | xargs $PTII/adm/bin/addtrailingnl -n cat /tmp/f | egrep README | xargs $PTII/adm/bin/addtrailingnl -n cat /tmp/f | egrep '\.htm' | xargs $PTII/adm/bin/addtrailingnl -n cat /tmp/f | egrep '\.tcl' | xargs $PTII/adm/bin/addtrailingnl -n cat /tmp/f | egrep '\.xml' | xargs $PTII/adm/bin/addtrailingnl -n
cat /tmp/f | egrep "\.([ch]|java)$" | xargs adm/bin/ptnonasciichars
and then
$PTII/adm/bin/fix-nonasciichars `cat /tmp/f | egrep "\.([ch]|java)$" | xargs adm/bin/ptnonasciichars | awk -F : '{print $1}'`
$PTII/adm/bin/rmtabs
cd $PTII # Run rmtabs without actually doing anything: cat /tmp/j | xargs $PTII/util/testsuite/rmtabs -n # Run rmtabs with adding the new lines: cat /tmp/j | xargs $PTII/util/testsuite/rmtabs # Run with -n and then without: cat /tmp/f | egrep '*\.[cjh]$' | xargs $PTII/util/testsuite/rmtabs -n
$PTII/util/testsuite/rmtrailingspace
cd $PTII # Run rmtrailingspace without actually doing anything: cat /tmp/j | xargs $PTII/util/testsuite/rmtrailingspace -n # Run rmtrailingspace with adding the new lines: cat /tmp/j | xargs $PTII/util/testsuite/rmtrailingspace # Run with -n and then without: cat /tmp/f | egrep '\.[cjh]$' | xargs $PTII/util/testsuite/rmtrailingspace -n
cat /tmp/j | xargs $PTII/adm/bin/fix-files -n
cat /tmp/f | xargs $PTII/util/testsuite/controlm > /tmp/cms
To fix the files, run:
grep "has controlms" /tmp/cms | awk '{print $1}' > /tmp/cmfs
svn propset svn:keywords "Author Date Id Revision" `cat /tmp/cmfs`
svn propset svn:eol-style native `cat /tmp/cmfs`
svn commit -m "Added keywords and eol-style properties" `cat /tmp/cmfs`
You may need to use dos2unix to fix the files.
Check keywords in all files:
cd $PTII
cat /tmp/f | xargs $PTII/adm/bin/svnpropcheck > /tmp/props
grep keywords: /tmp/props | grep / | awk '{print $1}' | egrep -v '.xml$' > /tmp/keys
grep eolstyle: /tmp/props | grep / | awk '{print $1}' | egrep -v '.xml$'> /tmp/eols
cat /tmp/keys | xargs svn propset svn:keywords "Author Date Id Revision"
cat /tmp/eols | xargs svn propset svn:eol-style native
svn commit -m "Added keywords and eol-style properties" `cat /tmp/eols /tmp/keys`
$PTII/adm/copyright/fixcopyrights (not shipped with
the release) and update the copyrights on the .java, .tcl and makefiles
$PTII/adm/copyright/chkcopyright on all the nightly buildfiles.
cat /tmp/f | grep -v .class | grep -v codeDoc | grep -v xml | grep -v \
alljtests.tcl | grep -v .htm | grep -v qcf | grep -v .dtd | grep -v \
gif | grep -v .svn | grep -v jimblackler | grep -v openmodelica/lib/omc/corba \
grep -v metroIIcomm.java | grep -v swig | grep -v shallow/test/*2java | xargs sh $PTII/adm/copyright/chkcopyright >& /tmp/copycheck
grep "does not contain a Copyright" /tmp/copycheck | awk '$1 ~ /.java$/ {print $1}' | grep -v /actor/corba >/tmp/jc
$PTII/adm/copyright/copyright.txt
and $PTII/adm/copyright/insertcopyright and run
adm/copyright/insertcopyright -p `cat /tmp/jc`and then
adm/copyright/insertcopyright `cat /tmp/jc`
cd $PTII svn update ant ant jars
$PTII/adm/gen-X.Y, update the version number
and run make. See the top of the file for the appropriate make command.
cd $PTII/adm/dists wget http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII10.0.1.src.tar.gz tar -zxf ptII10.0.1.src.tar.gzThen check for files that don't have this year's copyright
cd $PTII/adm/dists
diff -r ptII10.0.1 ptII11.0.devel > /tmp/pt.diffs
cd $PTII
grep Copyright `egrep "^Only in ptII10.0.devel" /tmp/pt.diffs | \
grep .java | sed 's@ptII11.0.devel/@@' | awk '{print substr($3,1,length($3)-1) "/" $4}'` | grep -v `date +%Y` > /tmp/c2
Look over the output for files that should have their copyright updated
See $PTII/adm/copyright/fixcopyright, but basically:
cat /tmp/c2 | grep Regents | awk -F : '{print $1}'
$PTII/adm/bin/fixsince (not shipped with
the release) and update the @since tags. To use
fixsince, first edit $PTII/adm/bin/fixsince
and update the variables at the top. Then
cd $PTII $PTII/adm/bin/fixsinceThen check the output. Then edit the file and uncomment the cp line at the bottom:
#cp $tmpfile $fileThen edit fixsince and comment out the cp line and then commit the changes.
cd $PTII/doc; make chkpackagehtml (not shipped with
the release) and create any missing package.html
or README.txt files.
cd $PTII/doc
make chkpackagehtml > /tmp/s
cd $PTII
$PTII/adm/bin/mkpackagehtml `cat /tmp/s`
svn add `egrep '(README.txt|package.html)' /tmp/s | awk '{print $2}'`
svn commit -m "Added package.html and README.txt" `egrep '(README.txt|package.html)' /tmp/s | awk '{print $2}'`
$PTII/util/testsuite/ptspell.
cd $PTII/doc make docs cd codeDoc; find . -name "*.html" > /tmp/h cat /tmp/h | xargs cat > /tmp/docs cat /tmp/docs | aspell list -H --run-together-limit=10 --personal=$PTII/util/testsuite/ptlocaldict | sort -u | sed -e 's/^\([A-Z]*\)\([A-Z]\)/\1 \2/g' | sed -e 's/\([a-z]\)\([A-Z]\)/\1 \2/g' | aspell list -H | sort -u
cd $PTII/doc make findbugs.htm
Window | Preferences)
Eclipse | Preferences)
Java | Code Style | Clean Up
New, then type in a Profile name of "Ptolemy II" then hit OK
cd $PTII make clean make -k JAVAC=gcj JFLAGS="-O2 -Wunused -Wextraneous-semicolon -Wno-deprecated -C" all >& gcj.out & grep error: gcj.out | awk -F: '{for(i=3;i<=NF;i++) {printf("%s ",$i)} printf("\n");}' | sort | uniq | grep -v "not found in the decl"
cat /tmp/f | egrep "(.java$|.htm$|.html$|makefile$|.tcl$|.xml$)" | xargs ls -l | awk '{ if ($1 ~ /x/) print $NF}' | grep -v chkjava > /tmp/execs
cat /tmp/execs | xargs svn proplist
cat /tmp/execs | xargs svn propdel svn:executable
svn commit -m "Made regular .java files and other files not executable" `cat /tmp/execs`
To make a branch for 10.0.beta, use the following command:
svn copy https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/trunk https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/branches/rel-10-0-beta -m "Creating Ptolemy II 10.0.beta branch."
Then check out the release branch with
svn co https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/branches/rel-10-0-beta ptII10.0.beta
Note that you should avoid dots in the tag name
$PTII/makefile and $PTII/ptolemy/plot/makefile.
cd ptII10.0.beta
export PTII `pwd`
./configure
make svn_delete_clean_shipping
svn co https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/branches/rel-10-0-beta ptII10.0.beta
cd ptII10.0.beta
export PTII=`pwd`
export JAVA_HOME=/usr/lib/jvm/java-1.6.0
export PATH=${JAVA_HOME}/bin:${PATH}
./configure
ant
ant jars
cd $PTII/adm/gen-10.0
make release_sisyphus
The resulting file with the .class files gets copied to the website
and untar'd. Note that this does not require Java 3D on the build machine.
Java 3D is needed for the applets, we copy the jars over later.
While in $PTII/adm/gen-10.0, run:
make release_sisyphus_update_ftp
cd /home/www/ptweb/ptolemyII/ptII10.0/ptII10.0.beta/ptolemy/plot ln -s ../../../../../java/ptplot5.10/ptolemy/plot/ptplot5.7* . cd doc rm -rf download ln -s ../../../../../../java/ptplot5.10.beta/ptolemy/plot/doc/download .
ptolemy/domains/gr
svn co https://repo.eecs.berkeley.edu/svn/projects/eal/ptII/branches/rel-10-0-beta ptII10.0.beta
cd ptII10.0.beta
export PTII=c:/tmp/cxh/ptII10.0.beta
Set up missing packages such as joystick, JAI, JMF, javacomm, quicktime
Use an older javac so that the .class files are compatible. For example, use java 1.6.x so that java 1.7.x and 1.8.x can use the .class files.
However, Javadoc from 1.6.0_26 hangs while running, so use a more recent javadoc.
export PATH=/cygdrive/c/Program\ Files/Java/jdk1.6.0_26/bin:${PATH}
export JAVADOC=c:/Program\ Files/Java/jdk1.8.0_11/bin/javadoc
java -version
./configure
ant
(cd $PTII/doc; make codeDoc/tree.html)
ant jars
mkdir src cd src wget http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII10.0/ptII10.0.1.src.tar.gz tar -zxf ptII10.0.1.src.tar.gz cd ptII10.0.1 export PTII=`pwd` export JAVADOC=/usr/lib/jvm/jdk1.8.0_11/bin/javadoc ./configure ant (cd doc; make JAVADOC=/usr/lib/jvm/jdk1.8.0_11/bin/javadoc codeDoc/tree.html) make installIt is important to run
make install so that any demo-specific makefiles are created. These makefiles would include resources like images or pdfs that are listed in makefile's OTHER_FILES_TO_BE_JARED variable.
/home/ptII/adm/certs/ptkeystore from moog to $PTII. Note you will
need access to the ptII account on moog.
make jnlp_dist STOREPASSWORD="-storepass `cat ~/.certpw`" KEYPASSWORD="-keypass `cat ~/.certpw`"
~/.certpw contains the ptkeystore password.
Xvfb :2 -screen 0 1024x768x24 & export DISPLAY=localhost:2.0
export JAVAFLAGS="-Dptolemy.ptII.exportHTML.linkToJNLP=true -Dptolemy.ptII.exportHTML.usePtWebsite=true" (cd ptolemy/domains/continuous/demo/Lorenz; $PTII/bin/ptweb -run -openComposites -whiteBackground -force Lorenz.xml) (cd ptolemy/domains/continuous/demo/Lorenz; tar -cf - *.jar *.jnlp *JNLP.htm Lorenz) | ssh moog "cd ~www/ptweb/ptolemyII/ptII10.0/ptII10.0.devel/ptolemy/domains/continuous/demo/Lorenz; tar -xpf -"
cd $PTII ant test.longest >& test.outThe above will take about an hour.
export JAVAFLAGS="-Dptolemy.ptII.exportHTML.linkToJNLP=true -Dptolemy.ptII.exportHTML.usePtWebsite=true" $PTII/bin/ptinvoke ptolemy.vergil.basic.export.ExportModel -force htm -run -openComposites -timeOut 30000 -whiteBackground ptolemy/domains/continuous/demo/Thermostat/Thermostat.xml $PTII/ptolemy/domains/continuous/demo/Thermostat/Thermostat
make KEYSTORE=/users/ptII/adm/certs/ptkeystore KEYALIAS=ptolemy STOREPASSWORD="-storepass `cat ~/.certpw`" KEYPASSWORD="-keypass `cat ~/.certpw`" jnlp_dist
$PTII/ptKeystore.properties and change the
location of the keystore and the password. This file is read by
copernicus in the next step. If you do not edit this file, you
will get messages about mismatched keystores.
$PTII/ptolemy/copernicus/applet and generate
a list of commands that will create the jnlp files for the applets.
cd $PTII/ptolemy/copernicus/applet ./updateDemos >& doit
doit file now contains a list of make
commands that will generate jnlp files for each demo.
We will use the first command as a test case and then
run the rest of the commands after the first test case
works. Put the first line in a separate file:
head -1 doit > doit.1The steps below assume that the first model is actor/gt/demo/BouncingBallX2.
$PTII/ptolemy/copernicus/applet/makefile,
find the
jnlpUpdateDemo section and add
-ptIILocalURL "http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII10.0/ptII10.0.1/" \
Xvfb :2 -screen 0 1024x768x24 & export DISPLAY=localhost:2.0
doit.1 command and look for errors:
sh ./doit.1
signed/ directory in the jnlp-10.0.1
directory created when make ... jnlp_dist was run:
cd ~ptII/ptweb/ptolemyII/ptII10.0/ptII10.0.1 ln -s ../jnlp-10.0.1/signed .
$PTII/ptolemy/copernicus/applet/scpDemos
so that
demos=../../../ptolemy/actor/gt/demo/BouncingBallX2/BouncingBallX2.xmlis not commented out, then run
cd ptolemy/copernicus/applet ./scpDemos
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII10.0/ptII10.0.devel/ptolemy/actor/gt/demo/BouncingBallX2/BouncingBallX2
nohup sh doit >& doit.out &
scpDemos so that
demos=`cd $PTII/ptolemy/configs/doc; make --no-print-directory listDemos | egrep -v '(iRobotCreateVerification|Matlab|SystemLevelType)' `is used and then, in $PTII/ptolemy/copernicus/applet, run:
./scpDemos
cd ~ptII/ptweb/ptolemyII/ptII10.0/ptII10.0.1/doc mv deployJava.js deployJavaNoJNLP.js cp deployJavaJNLP.js deployJava.js
cd $PTII make jar_distLook for missing jar files in the output.
cd $PTII/adm/gen-10.0 make USER=cxh PTIIHOME=/cygdrive/c/cxh/ptII10.0.beta COMPRESS=gzip TAR=tar clean all src.jarBelow is the command to compare the old tree and the new tree:
diff -r -I '$Id:' -x alljtests.tcl -x allsimplejtests.tcl -x '*.jar' -x codeDoc -x '*.out' -x .svn -x '*.class' ~/ptII ~/src/ptII10.0.beta >& /tmp/pt.diffs
cd $PTII make exes cd $PTII/adm/gen-x.y make setup
Last Updated: $Date: 2015-08-06 23:51:25 +0200 (Thu, 06 Aug 2015) $