Commit fbcc1178 authored by Maxime Perrotin's avatar Maxime Perrotin
parents 9b9b0b10 c502c27a
#
# Process with:
# docker build -t taste .
#
FROM debian:stretch
RUN apt-get update
RUN apt-get -y install netcat net-tools wget
# There is immense waste of re-downloading the .deb files
# in every attempt to setup the Docker image.
# The following uses a locally-provided proxy
# that will make sure the .deb files are only downloaded once,
# and are re-used in all subsequent attempts to build the image.
RUN route -n | awk '/^0.0.0.0/ {print $2}' > /tmp/host_ip.txt
RUN echo "HEAD /" | nc `cat /tmp/host_ip.txt` 8000 | grep squid-deb-proxy \
&& (echo "Acquire::http::Proxy \"http://$(cat /tmp/host_ip.txt):8000\";" > /etc/apt/apt.conf.d/30proxy) \
&& (echo "Acquire::http::Proxy::ppa.launchpad.net DIRECT;" >> /etc/apt/apt.conf.d/30proxy) \
|| echo "No squid-deb-proxy detected on docker host"
RUN bash -c 'export DEBIAN_FRONTEND=noninteractive ; apt-get -y install git sudo'
RUN bash -c 'cd /root ; git clone https://gitrepos.estec.esa.int/taste/taste-setup.git tool-src'
# The following pieces correspond to the execution of Update-TASTE.sh ;
# but the execution has to be broken down into steps, so that Docker
# can resume the build from whichever step failed in the last attempt.
RUN bash -c 'cd /root/tool-src ; git submodule init ; git submodule update'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/01_sudo.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/03_debian.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/04_pythonlibs.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/05_antlr.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/06_stlink.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/10_dmt.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/15_asn1scc.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/20_msc.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/30_qemu.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/40_ocarina.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/45_pohi.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/50_opengeode.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/53_pymsc.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/54_speedometer.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/55_asn1valueEditor.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/56_msc-editor.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/60_buildsupport.sh'
# Those that need postgres can set it up themselves (avoid creating huge Docker image)
# RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/65_postgres.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/70_taste-model-checker.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/80_build-scripts.sh'
# Those that need RTEMS can set it up themselves (avoid creating huge Docker image)
#RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/85_rtems.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/90_misc.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/91_env.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/95_components_library.sh'
RUN bash -c 'cd /bin ; sudo rm sh ; sudo ln -s bash sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/98_bash.sh'
RUN bash -c 'cd /root/tool-src ; DISABLE_TASTE_BANNER=1 install/99_paths.sh'
RUN bash -c 'echo ". ~/.bashrc.taste" >> /root/.bashrc'
#
# Now run the Docker image with
#
# docker run -it taste /bin/bash
......@@ -4,7 +4,31 @@ TASTE
This is the meta package that is used to install all git modules required
to make a TASTE installation.
To install:
If possible, please use the TASTE VM - available at http://taste.tools
(follow the 'Downloads' link and download the .ova file - that's a VirtualBox
machine that you can import via VirtualBox's "File/Import Appliance")
$ git clone --recursive https://gitrepos.estec.esa.int/taste/taste-setup.git
Otherwise, use a Debian-based distribution, create a new 'taste' user, and...
$ git clone --recursive https://gitrepos.estec.esa.int/taste/taste-setup.git tool-src
...followed by
$ cd tool-src
$ ./Update-TASTE.sh
Then follow the prompts to fix whatever issues are detected in your configuration.
The setup depends on the environment being a Debian distro; if this is not the case,
you can try the setup from inside a debootstrap-ed chroot:
# mkdir /opt/stretch-chroot
# debootstrap stretch /opt/stretch-chroot
# mount -t proc none /opt/stretch-chroot/proc/
# mount -t sysfs none /opt/stretch-chroot/sys/
# mount -o bind /dev /opt/stretch-chroot/dev/
# mount -o bind /dev/pts /opt/stretch-chroot/dev/pts/
# chroot /opt/stretch-chroot
There is also a Dockerfile (currently under construction) that will eventually
automate the setup enough to allow working under any distribution.
Subproject commit e16076741754adb4da628fea2f670e64cee8d53c
Subproject commit d37c75fae3fa42d9765c7d98a4ef35dfdf970439
Subproject commit c4f685a193600706c7503232d039d01b8e2cb29b
Subproject commit 306b876c31558e04eac23f3b72cbb78b8d9610cc
......@@ -9,4 +9,4 @@ sudo apt-get update
if [ "${ARCH}" == "x86_64" ] ; then
sudo apt-get install -y --force-yes libc6:i386 libgcc1:i386 libxft2:i386 libxss1:i386 libcairo2:i386 libc6-dev-i386
fi
sudo apt-get install -y --force-yes autoconf automake curl exuberant-ctags gcc git gnat gtkwave kate lcov libacl1 libacl1-dev libarchive-dev libattr1 libattr1-dev libbonoboui2-0 libdbd-sqlite3-perl libdbi-perl libfile-copy-recursive-perl libglib2.0-0 libgnome2-0 libgnome2-perl libgnome2-vfs-perl libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common libgtk2-gladexml-perl libgtk2-perl libgraphviz-dev libmono-system-data-linq4.0-cil libmono-system-numerics4.0-cil libmono-system-runtime-serialization-formatters-soap4.0-cil libmono-system-runtime4.0-cil libmono-system-web4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil libsqlite3-dev libtool libxml-libxml-perl libxml-libxml-simple-perl libxml-parser-perl libxml2-dev libxslt1-dev libzmq3-dev mono-mcs mono-reference-assemblies-2.0 mono-runtime nedit net-tools pgadmin3 postgresql postgresql-client postgresql-client-common postgresql-common python-antlr python-coverage python-gtk2-dev python-jinja2 python-lxml python-matplotlib python-pexpect python-pip python-ply python-psycopg2 python-pygraphviz python-pyside python3-pip qemu-system sqlite3 sudo tk8.5 tree vim-gtk wmctrl xmldiff xpdf xterm xterm zip openjdk-8-jre python3-lxml bash-completion strace libtemplates-parser11.10.1-dev libusb-1.0-0-dev cmake dfu-util gnuplot
sudo apt-get install -y --force-yes autoconf automake curl exuberant-ctags gcc git gnat gtkwave kate lcov libacl1 libacl1-dev libarchive-dev libattr1 libattr1-dev libbonoboui2-0 libdbd-sqlite3-perl libdbi-perl libfile-copy-recursive-perl libglib2.0-0 libgnome2-0 libgnome2-perl libgnome2-vfs-perl libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common libgtk2-gladexml-perl libgtk2-perl libgraphviz-dev libmono-system-data-linq4.0-cil libmono-system-numerics4.0-cil libmono-system-runtime-serialization-formatters-soap4.0-cil libmono-system-runtime4.0-cil libmono-system-web4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil libsqlite3-dev libtool libxml-libxml-perl libxml-libxml-simple-perl libxml-parser-perl libxml2-dev libxslt1-dev libzmq3-dev mono-mcs mono-reference-assemblies-2.0 mono-runtime nedit net-tools pgadmin3 postgresql postgresql-client postgresql-client-common postgresql-common python-antlr python-coverage python-gtk2-dev python-jinja2 python-lxml python-matplotlib python-pexpect python-pip python-ply python-psycopg2 python-pygraphviz python-pyside python3-pip qemu-system sqlite3 sudo tk8.5 tree vim-gtk wmctrl xmldiff xpdf xterm xterm zip openjdk-8-jre python3-lxml bash-completion strace libtemplates-parser11.10.1-dev libusb-1.0-0-dev cmake dfu-util gnuplot libstdc++-6-dev
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
. "${DIR}/common.sh"
# Setup the tools in ~/.local/bin
cd $DIR/../ocarina || exit 1
cd "$DIR/../ocarina" || exit 1
# Skip Ocarina building if tree is clean and version is identical
HEAD="$(git log --oneline | head -1 | cut -d' ' -f1)"
VERSION_INSTALLED="$(ocarina -v 2>&1 | grep ^Oca | awk '{print $NF}' | sed 's,),,;s,r,,')"
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
GIT_OUTPUT=$(git status --porcelain)
if [ "${GIT_OUTPUT}" == "" ] ; then
TREE_DIRTY=0
else
TREE_DIRTY=1
fi
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo Ocarina tree is clean and already installed. Skipping Ocarina build...
exit 0
fi
make distclean # ignore any errors here
./support/reconfig || exit 1
./configure --prefix=${PREFIX} || exit 1
./configure --prefix="${PREFIX}" || exit 1
make || exit 1
make install
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
. "${DIR}/common.sh"
# Setup opengeode in ~/.local/bin
cd $DIR/../opengeode || exit 1
cd "$DIR/../opengeode" || exit 1
# Skip install if the version installed is the same and the tree is clean
HEAD="$(grep _version_ opengeode/opengeode.py | head -1 | awk -F\' '{print $2}')"
VERSION_INSTALLED="$(opengeode --version 2>&1)"
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
GIT_OUTPUT=$(git status --porcelain)
if [ "${GIT_OUTPUT}" == "" ] ; then
TREE_DIRTY=0
else
TREE_DIRTY=1
fi
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo OpenGEODE tree is clean and already installed. Skipping OpenGEODE install...
exit 0
fi
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
. "${DIR}/common.sh"
# Setup pymsc in ~/.local
cd $DIR/../pymsc || exit 1
cd "$DIR/../pymsc" || exit 1
# Skip install if the version installed is the same and the tree is clean
HEAD="$(grep __version msccore/__init__.py | awk '{print $NF}' | tr -d '"')"
VERSION_INSTALLED="$(pip2 freeze | grep taste-msc | awk -F= '{print $NF}')"
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
GIT_OUTPUT=$(git status --porcelain)
if [ "${GIT_OUTPUT}" == "" ] ; then
TREE_DIRTY=0
else
TREE_DIRTY=1
fi
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo taste-msc tree is clean and already installed. Skipping taste-msc install...
exit 0
fi
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
. "${DIR}/common.sh"
# Setup speedometer library in ~/.local
cd $DIR/../speedometer || exit 1
cd "$DIR/../speedometer" || exit 1
# Skip install if the version installed is the same and the tree is clean
HEAD="$(grep version speedometer/speedometer.py | head -1 | awk -F\" '{print $(NF-1)}')"
# This is much slower than a --version option would be...
# But there's no such functionality in speedometer :-(
VERSION_INSTALLED="$(pip2 freeze | grep speedometer | awk -F= '{print $NF}')"
GIT_OUTPUT=$(git status --porcelain)
if [ "${GIT_OUTPUT}" == "" ] ; then
TREE_DIRTY=0
else
TREE_DIRTY=1
fi
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo Speedometer tree is clean and already installed. Skipping Speedometer install...
exit 0
fi
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
. "${DIR}/common.sh"
# Setup asn1valueEditor in ~/.local/bin
cd $DIR/../asn1-value-editor || exit 1
cd "$DIR/../asn1-value-editor" || exit 1
# Skip install if the version installed is the same and the tree is clean
HEAD="$(grep __version asn1_value_editor/asn1_value_editor.py | head -1 | awk -F\" '{print $(NF-1);}')"
VERSION_INSTALLED="$(taste-gui --version 2>&1 | head -1 | awk '{print $NF}')"
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
GIT_OUTPUT=$(git status --porcelain)
if [ "${GIT_OUTPUT}" == "" ] ; then
TREE_DIRTY=0
else
TREE_DIRTY=1
fi
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo ASN.1 Value Editor tree is clean and already installed. Skipping asn1valueEditor install...
exit 0
fi
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
. "${DIR}/common.sh"
# Setup the tools in ~/.local/bin
cd $DIR/../msc-editor || exit 1
cd "$DIR/../msc-editor" || exit 1
# Skip install if the version installed is the same and the tree is clean
HEAD="$(grep __version msce/msce.py | head -1 | awk -F\' '{print $(NF-1)}')"
# This is much slower than a --version option would be...
# But there's no such functionality in msc-editor :-(
VERSION_INSTALLED="$(pip2 freeze | grep msce | awk -F= '{print $NF}')"
GIT_OUTPUT=$(git status --porcelain)
if [ "${GIT_OUTPUT}" == "" ] ; then
TREE_DIRTY=0
else
TREE_DIRTY=1
fi
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo MSC editor tree is clean and already installed. Skipping MSCE install...
exit 0
fi
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${DIR}/common.sh
. "${DIR}/common.sh"
# Setup the tools in ~/.local/bin
cd $DIR/../buildsupport || exit 1
cd "$DIR/../buildsupport" || exit 1
# Skip Ocarina building if tree is clean and version is identical
HEAD="$(git log --oneline | head -1 | cut -d' ' -f1)"
VERSION_INSTALLED="$(buildsupport -v 2>&1 | grep Version | cut -f 4 -d' ' | tr -d '\012')"
git status >/dev/null
TREE_CLEAN=$?
if [ ${TREE_CLEAN} -eq 0 -a "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
GIT_OUTPUT=$(git status --porcelain)
if [ "${GIT_OUTPUT}" == "" ] ; then
TREE_DIRTY=0
else
TREE_DIRTY=1
fi
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo Buildsupport tree is clean and already installed. Skipping Buildsupport build...
exit 0
fi
make clean # ignore any errors here
make || exit 1
cp buildsupport ${PREFIX}/bin || exit 1
cp buildsupport "${PREFIX}/bin" || exit 1
# Add Ocarina to PATH
PATH_CMD='export PATH=$PATH:'"${PREFIX}/bin"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment