diff options
| author | cassio <cassiopc@gmail.com> | 2014-08-26 07:33:49 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2014-08-26 07:33:49 +0000 |
| commit | 6a532dd4e6b853ea3c8e5694f57295e8a3b191f7 (patch) | |
| tree | ce63caeeb60be6ac7027665d19a0232bc5a8e31a /doc | |
| parent | a36325e95bfd75af9c37b9e0eac6dcf1028a6f61 (diff) | |
| download | boca-6a532dd4e6b853ea3c8e5694f57295e8a3b191f7.tar.gz boca-6a532dd4e6b853ea3c8e5694f57295e8a3b191f7.zip | |
few minor fixes and possibility of having a hotstandby bkp
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/acknowledgments.txt | 8 | ||||
| -rwxr-xr-x | doc/dump.sh | 27 | ||||
| -rw-r--r-- | doc/problemexamples/problemtemplate/compile/c | 10 | ||||
| -rw-r--r-- | doc/problemexamples/problemtemplate/compile/cpp | 10 | ||||
| -rw-r--r-- | doc/problemexamples/problemtemplate/compile/java | 2 | ||||
| -rwxr-xr-x | doc/problemexamples/problemtemplate/run/c | 8 | ||||
| -rwxr-xr-x | doc/problemexamples/problemtemplate/run/cpp | 8 | ||||
| -rwxr-xr-x | doc/problemexamples/problemtemplate/run/java | 14 |
8 files changed, 30 insertions, 57 deletions
diff --git a/doc/acknowledgments.txt b/doc/acknowledgments.txt index c939d15..8ce2782 100644 --- a/doc/acknowledgments.txt +++ b/doc/acknowledgments.txt @@ -1,6 +1,6 @@ BOCA Acknowledgments ------------------- -(last updated 25/October/2012) +(last updated 21/August/2014) This is a very important file of BOCA. It gives a list of people we must acknowledge for having in a way or another helping BOCA reach its current development situation. @@ -11,7 +11,7 @@ created much after the begining of BOCA, so there will be many many missing name do not be shine and do help us to fill this list! Also if you see some incoherency on the lists, let us know! Thanks! -I will divide the list into two section: those who effectively contributed in ideas for the +The list is divided into two section: those who effectively contributed in ideas for the code, and those who found bugs and/or suggested modifications. Names are given in no particular order. @@ -25,7 +25,7 @@ CODE - Alejandro Sazo - Jorge Luis R. Alvarez - Vinicius K. Ruoso - +- Mario Sanchez REPORTERS/COMMENTATORS - Guillermo Solis @@ -37,4 +37,4 @@ REPORTERS/COMMENTATORS - Juan Pablo G. Ibarra - Ricardo Dahab - Liliane Salgado - +- Diego Rubert diff --git a/doc/dump.sh b/doc/dump.sh deleted file mode 100755 index f3f3282..0000000 --- a/doc/dump.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -if [ "`id -u`" != "0" ]; then - echo "Must be run as root" - exit 1 -fi -bocadir=/var/www/boca -[ -r /etc/boca.conf ] && . /etc/boca.conf - -for i in pg_dump grep cut gzip date; do - if [ "`which $i`" == "" ]; then - echo "$i executable is not in the PATH. Aborting" - exit 1 - fi -done -da=`date +%d%b%Y-%Hh%Mmin` -echo "I will create the file `pwd`/bocadb.$da.tar.gz" -f=$bocadir/src/private/conf.php -[ -r $f ] || f=$bocadir/src/private/conf.php -if [ -r $f ]; then - echo I believe the password is `grep "\$conf\[\"dbpass\"\]=" $bocadir/src/private/conf.php | cut -d'"' -f4` -else - echo "The password can be found in private/conf.php of the boca directory" -fi -pg_dump -f bocadb.$da.tar -Ft -b -h 127.0.0.1 -U bocauser bocadb -gzip -9 bocadb.$da.tar - -exit 0 diff --git a/doc/problemexamples/problemtemplate/compile/c b/doc/problemexamples/problemtemplate/compile/c index 5376708..77631ec 100644 --- a/doc/problemexamples/problemtemplate/compile/c +++ b/doc/problemexamples/problemtemplate/compile/c @@ -1,7 +1,7 @@ #!/bin/bash # //////////////////////////////////////////////////////////////////////////////// # //BOCA Online Contest Administrator -# // Copyright (C) 2003-2012 by BOCA System (bocasystem@gmail.com) +# // Copyright (C) 2003-2014 by BOCA System (bocasystem@gmail.com) # // # // This program is free software: you can redistribute it and/or modify # // it under the terms of the GNU General Public License as published by @@ -15,12 +15,12 @@ # // 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/july/2012 by cassio@ime.usp.br +#Last modified: 21/august/2014 by cassio@ime.usp.br # # parameters are: # $1 source_file # $2 exe_file (default run.exe) -# $3 timelimit (optional, limit to run all the repetitions, by default only one repetition) +# $3 timelimit # $4 maximum allowed memory (in MBytes, default 512M) # # the output of the submission should be directed to the standard output @@ -105,7 +105,7 @@ else exe=$2 fi -rm -f $exe compileit.retcode runit.retcode 2>/dev/null +rm -f "$exe" compileit.retcode runit.retcode 2>/dev/null cat <<EOF > compileit.sh #!/bin/bash cc=\`which gcc\` @@ -115,7 +115,7 @@ if [ ! -x "\$cc" ]; then exit 47 fi cd src -"\$cc" -static -O2 -o ../$exe $name -lm +"\$cc" -static -O2 -o "../$exe" "$name" -lm echo \$? > ../compileit.retcode exit 0 EOF diff --git a/doc/problemexamples/problemtemplate/compile/cpp b/doc/problemexamples/problemtemplate/compile/cpp index 6a61bc1..2da3e4a 100644 --- a/doc/problemexamples/problemtemplate/compile/cpp +++ b/doc/problemexamples/problemtemplate/compile/cpp @@ -1,7 +1,7 @@ #!/bin/bash # //////////////////////////////////////////////////////////////////////////////// # //BOCA Online Contest Administrator -# // Copyright (C) 2003-2012 by BOCA System (bocasystem@gmail.com) +# // Copyright (C) 2003-2014 by BOCA System (bocasystem@gmail.com) # // # // This program is free software: you can redistribute it and/or modify # // it under the terms of the GNU General Public License as published by @@ -15,12 +15,12 @@ # // 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/july/2012 by cassio@ime.usp.br +#Last modified: 21/august/2014 by cassio@ime.usp.br # # parameters are: # $1 source_file # $2 exe_file (default run.exe) -# $3 timelimit (optional, limit to run all the repetitions, by default only one repetition) +# $3 timelimit # $4 maximum allowed memory (in MBytes) # # the output of the submission should be directed to the standard output @@ -105,7 +105,7 @@ else exe=$2 fi -rm -f $exe compileit.retcode runit.retcode 2>/dev/null +rm -f "$exe" compileit.retcode runit.retcode 2>/dev/null cat <<EOF > compileit.sh #!/bin/bash cc=\`which g++\` @@ -115,7 +115,7 @@ if [ ! -x "\$cc" ]; then exit 47 fi cd src -"\$cc" -static -O2 -o ../$exe $name -lm +"\$cc" -static -O2 -o "../$exe" "$name" -lm echo \$? > ../compileit.retcode exit 0 EOF diff --git a/doc/problemexamples/problemtemplate/compile/java b/doc/problemexamples/problemtemplate/compile/java index bab8a88..3d3f88e 100644 --- a/doc/problemexamples/problemtemplate/compile/java +++ b/doc/problemexamples/problemtemplate/compile/java @@ -73,7 +73,7 @@ if [ "${name##*.}" == "zip" -a "${name##*.}" == "ZIP" ]; then name=`basename $name .ZIP` fi else - cp $name src + cp "$name" src fi chown -R $bocau src chmod -R 700 src diff --git a/doc/problemexamples/problemtemplate/run/c b/doc/problemexamples/problemtemplate/run/c index b46e5f9..b283366 100755 --- a/doc/problemexamples/problemtemplate/run/c +++ b/doc/problemexamples/problemtemplate/run/c @@ -1,7 +1,7 @@ #!/bin/bash # //////////////////////////////////////////////////////////////////////////////// # //BOCA Online Contest Administrator -# // Copyright (C) 2003-2012 by BOCA System (bocasystem@gmail.com) +# // Copyright (C) 2003-2014 by BOCA System (bocasystem@gmail.com) # // # // This program is free software: you can redistribute it and/or modify # // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # // 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: 22/aug/2012 by cassio@ime.usp.br +#Last modified: 21/aug/2014 by cassio@ime.usp.br # # parameters are: # $1 exe_file @@ -74,7 +74,7 @@ if [ ! -r "$2" ]; then echo "$2 not found (or is not in the current dir) or it's not readable" exit 45 fi -if [ ! -x $sf ]; then +if [ ! -x "$sf" ]; then echo "$sf not found or it's not executable" exit 46 fi @@ -117,7 +117,7 @@ fi cdir=`pwd` echo "Current directory is $cdir -- chrooting on it" >&2 -$sf -F10 -f$maxf -r$nruns -n1 -R$cdir -C. -U$bocau -G$bocag -ostdout0 -estderr0 -d$maxm -m$maxm -t$time -T$ttime -istdin0 ./run.exe +"$sf" -F10 -f$maxf -r$nruns -n1 -R$cdir -C. -U$bocau -G$bocag -ostdout0 -estderr0 -d$maxm -m$maxm -t$time -T$ttime -istdin0 ./run.exe ret=$? if [ $ret -gt 10 ]; then ret=0 diff --git a/doc/problemexamples/problemtemplate/run/cpp b/doc/problemexamples/problemtemplate/run/cpp index b46e5f9..b283366 100755 --- a/doc/problemexamples/problemtemplate/run/cpp +++ b/doc/problemexamples/problemtemplate/run/cpp @@ -1,7 +1,7 @@ #!/bin/bash # //////////////////////////////////////////////////////////////////////////////// # //BOCA Online Contest Administrator -# // Copyright (C) 2003-2012 by BOCA System (bocasystem@gmail.com) +# // Copyright (C) 2003-2014 by BOCA System (bocasystem@gmail.com) # // # // This program is free software: you can redistribute it and/or modify # // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # // 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: 22/aug/2012 by cassio@ime.usp.br +#Last modified: 21/aug/2014 by cassio@ime.usp.br # # parameters are: # $1 exe_file @@ -74,7 +74,7 @@ if [ ! -r "$2" ]; then echo "$2 not found (or is not in the current dir) or it's not readable" exit 45 fi -if [ ! -x $sf ]; then +if [ ! -x "$sf" ]; then echo "$sf not found or it's not executable" exit 46 fi @@ -117,7 +117,7 @@ fi cdir=`pwd` echo "Current directory is $cdir -- chrooting on it" >&2 -$sf -F10 -f$maxf -r$nruns -n1 -R$cdir -C. -U$bocau -G$bocag -ostdout0 -estderr0 -d$maxm -m$maxm -t$time -T$ttime -istdin0 ./run.exe +"$sf" -F10 -f$maxf -r$nruns -n1 -R$cdir -C. -U$bocau -G$bocag -ostdout0 -estderr0 -d$maxm -m$maxm -t$time -T$ttime -istdin0 ./run.exe ret=$? if [ $ret -gt 10 ]; then ret=0 diff --git a/doc/problemexamples/problemtemplate/run/java b/doc/problemexamples/problemtemplate/run/java index cdaef98..e8e8c7a 100755 --- a/doc/problemexamples/problemtemplate/run/java +++ b/doc/problemexamples/problemtemplate/run/java @@ -1,7 +1,7 @@ #!/bin/bash # //////////////////////////////////////////////////////////////////////////////// # //BOCA Online Contest Administrator -# // Copyright (C) 2003-2013 by BOCA System (bocasystem@gmail.com) +# // Copyright (C) 2003-2014 by BOCA System (bocasystem@gmail.com) # // # // This program is free software: you can redistribute it and/or modify # // it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # // 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: 14/sept/2013 by cassio@ime.usp.br +#Last modified: 21/aug/2014 by cassio@ime.usp.br # # parameters are: # $1 main_class @@ -92,7 +92,7 @@ if [ ! -r "$2" ]; then echo "$2 not found (or is not in the current dir) or it's not readable" exit 45 fi -if [ ! -x $sf ]; then +if [ ! -x "$sf" ]; then echo "$sf not found or it's not executable" exit 46 fi @@ -140,12 +140,12 @@ cd "$cdir" [ -d /sys/kernel ] || /bin/mount -t sysfs sysfs /sys java=`which java` [ -x "\$java" ] || java=/usr/bin/java -if [ ! -x \$java ]; then +if [ ! -x "\$java" ]; then echo "\$java not found or it's not executable" exit 47 fi export CLASSPATH=.:./run.jar:$CLASSPATH -$sf -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -ostdout0 -estderr0 -U$bocau -G$bocag -n0 -C. -f20000 -d20000000 -m20000000 -- \$java -Xmx${maxm}K -Xms${maxm}K "$name" +"$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -ostdout0 -estderr0 -U$bocau -G$bocag -n0 -C. -f20000 -d20000000 -m20000000 -- "\$java" -Xmx${maxm}K -Xms${maxm}K "$name" retval=\$? echo \$retval > runit.retcode if [ ! -d /bocajail ]; then @@ -169,11 +169,11 @@ else echo "CODE NOT BEING CHROOTED. DO NOT RUN THIS ON THE MAIN SERVER" >&2 java=`which java` [ -x "$java" ] || java=/usr/bin/java - if [ ! -x $java ]; then + if [ ! -x "$java" ]; then echo "$java not found or it's not executable" exit 47 fi - $sf -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d20000000 -m20000000 -- $java -cp run.jar -Xmx${maxm}K -Xms${maxm}K "$name" + "$sf" -r$nruns -t$time -T$ttime -istdin0 -F256 -u256 -U$bocau -G$bocag -ostdout0 -estderr0 -n0 -C. -d20000000 -m20000000 -- "$java" -cp run.jar -Xmx${maxm}K -Xms${maxm}K "$name" ret=$? fi if [ $ret -gt 10 ]; then |