From 97066d6d8659d55b098fa20a3b30f4c16eff88b3 Mon Sep 17 00:00:00 2001 From: cassio Date: Sun, 26 Oct 2014 19:53:21 +0000 Subject: inclusion of gcc-4.8 and java 7 --- tools/installv2.sh | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/installv2.sh b/tools/installv2.sh index 0223636..f9160fc 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 . # //////////////////////////////////////////////////////////////////////////////// -# // Last modified 21/Aug/2014 by cassio@ime.usp.br +# // Last modified 26/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 26/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,16 @@ 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 +apt-get -y autoremove +apt-get -y clean for i in makepasswd useradd update-rc.d; do p=`which $i` @@ -159,7 +174,7 @@ cat < /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 -- cgit v1.2.3 From 02534a4eed885f65abb3fdead6bf490e8f104aa6 Mon Sep 17 00:00:00 2001 From: cassio Date: Mon, 27 Oct 2014 08:21:44 +0000 Subject: update alternatives for java 7 in installv2 --- tools/installv2.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools') diff --git a/tools/installv2.sh b/tools/installv2.sh index f9160fc..dfab961 100755 --- a/tools/installv2.sh +++ b/tools/installv2.sh @@ -150,6 +150,13 @@ if [ $? != 0 ]; then 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 -- cgit v1.2.3 From 8936a9c3153432df75590b26038e363d1c3bf6b7 Mon Sep 17 00:00:00 2001 From: cassio Date: Mon, 27 Oct 2014 09:40:41 +0000 Subject: update version date --- tools/installv2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/installv2.sh b/tools/installv2.sh index dfab961..69131bf 100755 --- a/tools/installv2.sh +++ b/tools/installv2.sh @@ -15,11 +15,11 @@ # // You should have received a copy of the GNU General Public License # // along with this program. If not, see . # //////////////////////////////////////////////////////////////////////////////// -# // Last modified 26/Oct/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 26/Oct/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 -- cgit v1.2.3 From c590b7034c5125e6d450cd5161036680bd64defe Mon Sep 17 00:00:00 2001 From: cassio Date: Mon, 27 Oct 2014 18:06:30 +0000 Subject: update gcc and java of the jail --- tools/etc/icpc/createbocajail.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tools') diff --git a/tools/etc/icpc/createbocajail.sh b/tools/etc/icpc/createbocajail.sh index bd8bd5d..1a99ca5 100755 --- a/tools/etc/icpc/createbocajail.sh +++ b/tools/etc/icpc/createbocajail.sh @@ -115,6 +115,20 @@ cat < /home/bocajail/tmp/populate.sh mount -t proc proc /proc apt-get -y update 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 autoremove +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 cp -f /etc/apt/sources.list $homejail/etc/apt/ -- cgit v1.2.3 From 28cd3675fe162d1ca62eb492654c698613e6c0ce Mon Sep 17 00:00:00 2001 From: cassio Date: Mon, 27 Oct 2014 18:39:11 +0000 Subject: bug fix --- tools/etc/icpc/createbocajail.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/etc/icpc/createbocajail.sh b/tools/etc/icpc/createbocajail.sh index 1a99ca5..d8a5ad2 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 @@ -113,7 +112,9 @@ echo "*** Populating $homejail" cat < /home/bocajail/tmp/populate.sh #!/bin/bash mount -t proc proc /proc +add-apt-repository 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 @@ -131,6 +132,8 @@ update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java-6-openjdk-* 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 -- cgit v1.2.3 From 6692c1b3d36449575ae669131c782d4a48aa8c8f Mon Sep 17 00:00:00 2001 From: cassio Date: Mon, 27 Oct 2014 19:47:10 +0000 Subject: yet another bug --- tools/etc/icpc/createbocajail.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/etc/icpc/createbocajail.sh b/tools/etc/icpc/createbocajail.sh index d8a5ad2..75d39ec 100755 --- a/tools/etc/icpc/createbocajail.sh +++ b/tools/etc/icpc/createbocajail.sh @@ -112,13 +112,14 @@ echo "*** Populating $homejail" cat < /home/bocajail/tmp/populate.sh #!/bin/bash mount -t proc proc /proc -add-apt-repository ppa:ubuntu-toolchain-r/test +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 autoremove 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 -- cgit v1.2.3