aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2014-10-30 13:06:31 +0000
committercassiopc <cassiopc@gmail.com>2014-10-30 13:06:31 +0000
commit299167dab2835fd91ce67a84deb515fea76246a3 (patch)
treeae698bf68bdffedd735b443ac90fc13d2a6b7a3f /tools
parentc00c84f2b36aabc95370bca8004f170c2d28ce60 (diff)
parent6692c1b3d36449575ae669131c782d4a48aa8c8f (diff)
downloadboca-299167dab2835fd91ce67a84deb515fea76246a3.tar.gz
boca-299167dab2835fd91ce67a84deb515fea76246a3.zip
Merge branch 'master' of https://code.google.com/p/boca
Diffstat (limited to 'tools')
-rwxr-xr-xtools/etc/icpc/createbocajail.sh20
-rwxr-xr-xtools/installv2.sh40
2 files changed, 50 insertions, 10 deletions
diff --git a/tools/etc/icpc/createbocajail.sh b/tools/etc/icpc/createbocajail.sh
index bd8bd5d..75d39ec 100755
--- a/tools/etc/icpc/createbocajail.sh
+++ b/tools/etc/icpc/createbocajail.sh
@@ -59,7 +59,6 @@ rm -rf /bocajail
mkdir -p $homejail/tmp
chmod 1777 $homejail/tmp
ln -s $homejail /bocajail
-[ -x /usr/bin/safeexec ] && cp -a /usr/bin/safeexec /bocajail/usr/bin/
#for i in usr lib var bin sbin etc dev; do
# [ -d $homejail/$i ] && rm -rf $homejail/$i
# cp -ar /$i $homejail
@@ -114,9 +113,28 @@ cat <<EOF > /home/bocajail/tmp/populate.sh
#!/bin/bash
mount -t proc proc /proc
apt-get -y update
+apt-get -y install python-software-properties
+add-apt-repository -y ppa:ubuntu-toolchain-r/test
+apt-get -y update
+apt-get -y upgrade
apt-get -y install g++ gcc libstdc++6 sharutils default-jdk default-jre
+apt-get -y install gcc-4.8 g++-4.8
+apt-get -y install openjdk-7-jdk openjdk-7-jre
+apt-get -y clean
+
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
+
+update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-6-openjdk-*/jre/bin/java 10
+update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-6-openjdk-*/bin/javac 10
+update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/java-6-openjdk-*/bin/javadoc 10
+update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/java-6-openjdk-*/bin/javap 10
+update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java-6-openjdk-*/bin/javah 10
+
umount /proc
EOF
+mkdir -p /bocajail/usr/bin
+[ -x /usr/bin/safeexec ] && cp -a /usr/bin/safeexec /bocajail/usr/bin/
cp -f /etc/apt/sources.list $homejail/etc/apt/
chmod 755 /home/bocajail/tmp/populate.sh
cd / ; chroot $homejail /tmp/populate.sh
diff --git a/tools/installv2.sh b/tools/installv2.sh
index 0223636..69131bf 100755
--- a/tools/installv2.sh
+++ b/tools/installv2.sh
@@ -15,10 +15,11 @@
# // You should have received a copy of the GNU General Public License
# // along with this program. If not, see <http://www.gnu.org/licenses/>.
# ////////////////////////////////////////////////////////////////////////////////
-# // Last modified 21/Aug/2014 by cassio@ime.usp.br
+# // Last modified 27/Oct/2014 by cassio@ime.usp.br
+# // inclusion of gcc-4.8 and update to Java 7
#///////////////////////////////////////////////////////////////////////////////////////////
echo "#############################################################"
-echo "### installv2.sh of 21/Aug/2014 (A) by cassio@ime.usp.br ###"
+echo "### installv2.sh of 27/Oct/2014 (A) by cassio@ime.usp.br ###"
echo "#############################################################"
if [ "`id -u`" != "0" ]; then
@@ -89,15 +90,19 @@ if [ $? != 0 ]; then
fi
fi
-echo "====================================================================="
-echo "============== CHECKING FOR canonical.com APT SERVER ==============="
-echo "====================================================================="
-
+echo "=============================================================="
+echo "============== CHECKING FOR OTHER APT SERVERS ==============="
+echo "=============================================================="
+echo "============== CHECKING FOR canonical.com APT SERVER ========"
cd
grep -q "^[^\#]*deb http://archive.canonical.com.* $DISTRIB_CODENAME .*partner" /etc/apt/sources.list
if [ $? != 0 ]; then
add-apt-repository "deb http://archive.canonical.com/ubuntu $DISTRIB_CODENAME partner"
fi
+echo "=============================================================="
+echo "============== ADDING extra rep for C++11 ===================="
+add-apt-repository ppa:ubuntu-toolchain-r/test
+
apt-get -y update
apt-get -y upgrade
@@ -128,8 +133,8 @@ echo "================= installing packages needed by BOCA ==============="
echo "====================================================================="
apt-get -y install zenity apache2 eclipse-pde eclipse-rcp eclipse-platform eclipse-jdt eclipse-cdt eclipse emacs \
- evince g++ gcc gedit scite libstdc++6 makepasswd manpages-dev php5-cli php5-mcrypt openjdk-6-dbg \
- php5 php5-pgsql postgresql postgresql-client postgresql-contrib quota sharutils default-jdk openjdk-6-doc \
+ evince g++ gcc gedit scite libstdc++6 makepasswd manpages-dev php5-cli php5-mcrypt openjdk-7-dbg openjdk-7-jdk \
+ php5 php5-pgsql postgresql postgresql-client postgresql-contrib quota sharutils default-jdk openjdk-7-doc \
vim-gnome geany geany-plugin-addons geany-plugins geany-plugin-${geanydeb} default-jre sysstat \
vim xfce4 $libCppdev $libCppdoc $libCppdbg php5-gd stl-manual gcc-doc debootstrap schroot c++-annotations
if [ $? != 0 ]; then
@@ -137,6 +142,23 @@ if [ $? != 0 ]; then
echo "ERROR running the apt-get -- must check if all needed packages are available"
exit 1
fi
+apt-get -y install gcc-4.8 g++-4.8
+if [ $? != 0 ]; then
+ echo ""
+ echo "ERROR running the apt-get for gcc 4.8 -- must check if all needed packages are available"
+ exit 1
+fi
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
+
+update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-6-openjdk-*/jre/bin/java 10
+update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-6-openjdk-*/bin/javac 10
+update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/java-6-openjdk-*/bin/javadoc 10
+update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/java-6-openjdk-*/bin/javap 10
+update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java-6-openjdk-*/bin/javah 10
+
+apt-get -y autoremove
+apt-get -y clean
for i in makepasswd useradd update-rc.d; do
p=`which $i`
@@ -159,7 +181,7 @@ cat <<EOF > /etc/skel/Desktop/javadoc.desktop
Version=1.5.1
Name=Java API
Comment=Java API
-Exec=firefox /usr/share/doc/openjdk-6-jre-headless/api/index.html
+Exec=firefox /usr/share/doc/openjdk-7-jre-headless/api/index.html
Terminal=false
Type=Application
EOF