aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/boca-web.postinst3
-rw-r--r--debian/changelog72
-rw-r--r--debian/control9
-rw-r--r--debian/copyright16
-rw-r--r--src/admin/header.php2
-rw-r--r--src/admin/problem.php3
-rw-r--r--src/admin/report/webcast.php2
-rw-r--r--src/fcontest.php8
-rw-r--r--src/flog.php2
-rw-r--r--src/judge/header.php2
-rw-r--r--src/score/header.php2
-rw-r--r--src/staff/header.php2
-rw-r--r--src/system/header.php2
-rw-r--r--src/team/header.php2
-rw-r--r--src/version2
-rw-r--r--src/versionnum.php4
-rwxr-xr-xtools/boca-createjail82
17 files changed, 165 insertions, 50 deletions
diff --git a/debian/boca-web.postinst b/debian/boca-web.postinst
index 091905b..460778d 100644
--- a/debian/boca-web.postinst
+++ b/debian/boca-web.postinst
@@ -36,7 +36,8 @@ a2enmod socache_shmcb
a2enmod proxy_fcgi setenvif
# Enable php-fpm module for apache
-a2enconf php8.1-fpm
+# ALWAYS check for unexpected PHP 8 point releases!!!
+a2enconf php8.3-fpm
# Check the syntax of apache2's configuration file
# This DOES NOT CATCH ALL ERRORS
diff --git a/debian/changelog b/debian/changelog
index 4cd954f..847ef1e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,75 @@
+boca (1.5.23-1+ubuntu24.04) noble; urgency=medium
+
+ * Update php dependencies to PHP 8.3
+ * Update the source code to inform version 1.5.23
+ * Update boca-web maintainer script for PHP 8.3
+ * Adds Ubuntu mirror to the standard jail
+ * Patch standard jail fixing debootstrap problems with Ubuntu noble
+ * Purge the unecessary packages in the jail
+ * Perform a dist-upgrade after updating the jail
+ * Quote shell variables o prevent suprise splitting
+ * Replace obsolete backticks with `$( )`
+ * Modernise test commands, replacing `[ ]` with `[[ ]]`
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Thu, 28 Aug 2025 23:35:45 -0300
+
+boca (1.5.22-1+ubuntu24.04) noble; urgency=medium
+
+ * Fix multiple program versions being reported
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Wed, 30 Apr 2025 00:22:59 -0300
+
+boca (1.5.21-2+ubuntu24.04) noble; urgency=medium
+
+ * Update copyright file
+ * Update the standards version to 4.7.2.0
+ * Specify that the build does not require root
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Mon, 28 Apr 2025 23:29:20 -0300
+
+boca (1.5.21-1+ubuntu22.04) jammy; urgency=medium
+
+ * Rebuild for Ubuntu 22.04 Jammy
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Thu, 26 Sep 2024 22:10:03 -0300
+
+boca (1.5.21-1+ubuntu24.04) noble; urgency=medium
+
+ [ Bruno Ribas ]
+ * tools/boca-createjail: use correct maratona-linux repo
+
+ [ Davi Antônio da Silva Santos ]
+ * Update internal version info to 1.5.21
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Thu, 26 Sep 2024 22:04:22 -0300
+
+boca (1.5.20-1+ubuntu22.04) jammy; urgency=medium
+
+ * Rebuild for Ubuntu 22.04 Jammy
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Mon, 23 Sep 2024 16:47:15 -0300
+
+boca (1.5.20-1) noble; urgency=medium
+
+ [ Daniel Saad Nogueira Nunes ]
+ * Update webcast.php (#34)
+ * webcast.php: fixing FS separador character. (#40)
+
+ [ Gatuno ]
+ * New autojudge setting on interface per problem. (#41)
+
+ [ Davi Antônio da Silva Santos ]
+ * Drop dependency on logkeys
+ * Update internal version info to 1.5.20
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Mon, 05 Aug 2024 21:24:09 -0300
+
+boca (1.5.19-1+ubuntu22.04) noble; urgency=medium
+
+ * Migrate package to Ubuntu noble 24.04
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Thu, 30 May 2024 22:40:02 -0300
+
boca (1.5.19-1) jammy; urgency=medium
[ Rodrigo Laiola Guimarães ]
diff --git a/debian/control b/debian/control
index fd6fea9..b2c160e 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,8 @@ Priority: optional
Maintainer: BOCA Development Team <bocasystem@gmail.com>
Uploaders: Cassio Polpo de Campos <cassiopc@gmail.com>, Bruno Cesar Ribas <bruno.ribas@unb.br>
Build-Depends: debhelper-compat (= 13)
-Standards-Version: 4.6.0.1
+Rules-Requires-Root: no
+Standards-Version: 4.7.2.0
Package: boca
Architecture: all
@@ -31,7 +32,7 @@ Description: BOCA - database
Package: boca-web
Architecture: all
-Depends: ${misc:Depends}, ${shlibs:Depends}, boca-common, apache2, php8.1-fpm, php8.1, python3-matplotlib
+Depends: ${misc:Depends}, ${shlibs:Depends}, boca-common, apache2, php8.3-fpm, php8.3, python3-matplotlib
Conflicts: libapache2-mod-php
Description: BOCA - WEB files
BOCA is a software created to control a contest with the ACM International
@@ -43,7 +44,7 @@ Description: BOCA - WEB files
Package: boca-common
Architecture: all
Pre-Depends: debconf, makepasswd, sharutils
-Depends: ${misc:Depends}, ${shlibs:Depends}, php8.1-zip, wget, php8.1-cli, php8.1-pgsql, php8.1-gd, postgresql-client, php8.1-xml, openssl, libany-uri-escape-perl
+Depends: ${misc:Depends}, ${shlibs:Depends}, php8.3-zip, wget, php8.3-cli, php8.3-pgsql, php8.3-gd, postgresql-client, php8.3-xml, openssl, libany-uri-escape-perl
Description: BOCA - Common files
BOCA is a software created to control a contest with the ACM International
Collegiate Programming Contest rules. It has been developed in PHP and the
@@ -64,7 +65,7 @@ Description: automatic judge system for BOCA
Package: boca-submission-tools
Architecture: amd64
-Depends: ${misc:Depends}, ${shlibs:Depends}, sharutils, wget, libany-uri-escape-perl, openssl, openssh-server, logkeys
+Depends: ${misc:Depends}, ${shlibs:Depends}, sharutils, wget, libany-uri-escape-perl, openssl, openssh-server
Description: BOCA tools for headless code submission
This package provides tools to submit codes to a running boca server
without using the web interface.
diff --git a/debian/copyright b/debian/copyright
index 82c29f7..3f5c982 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,13 +4,21 @@ Upstream-Contact: BOCA Development Team <bocasystem@gmail.com>
Source: <https://github.com/cassiopc/boca>
Files: *
-Copyright: 2012-2023 BOCA Development Team <bocasystem@gmail.com>
+Copyright: 2012-2025 BOCA Development Team <bocasystem@gmail.com>
License: GPL-2.0+
Files: debian/*
-Copyright: 2016-2022 Bruno Ribas <brunoribas@utfpr.edu.br>
- 2016-2018 Cassio de Campos <cassiopc@gmail.com>
- 2023 Davi Antônio da Silva Santos <antoniossdavi@gmail.com>
+Copyright: 2015 Alejandro Santos <alejolp@gmail.com>
+ 2019 Arthur Diniz <arthurbdiniz@gmail.com>
+ 2016-2022 Bruno Ribas <brunoribas@utfpr.edu.br>
+ 2017 Carlos Joa <cjoa@yahoo.com>
+ 2012-2018 Cassio de Campos <cassiopc@gmail.com>
+ 2023-2025 Davi Antônio da Silva Santos <antoniossdavi@gmail.com>
+ 2023-2024 Daniel Saad Nogueira Nunes <danielsaad@users.noreply.github.com>
+ 2024 Gatuno <gatuno@users.noreply.github.com>
+ 2020-2021 Emilio Wuerges <wuerges@gmail.com>
+ 2023 Rodrigo Laiola Guimarães <rlaiola@users.noreply.github.com>
+ 2018 Ronistone Junior <ronistonejunior@gmail.com>
License: GPL-2.0+
License: GPL-2.0+
diff --git a/src/admin/header.php b/src/admin/header.php
index 59a5d31..b4fc812 100644
--- a/src/admin/header.php
+++ b/src/admin/header.php
@@ -62,7 +62,7 @@ if(!isset($_POST['noflush'])) {
echo "<img src=\"../images/smallballoontransp.png\" alt=\"\">";
echo "<font color=\"#000000\">BOCA</font>";
echo "</td><td bgcolor=\"#eeee00\" width=\"99%\">\n";
- echo "Username: " . $_SESSION["usertable"]["userfullname"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
+ echo "Username: " . $_SESSION["usertable"]["username"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
list($clockstr,$clocktype)=siteclock();
echo "</td><td bgcolor=\"#eeee00\" align=center nowrap>&nbsp;".$clockstr."&nbsp;</td></tr>\n";
echo "</table>\n";
diff --git a/src/admin/problem.php b/src/admin/problem.php
index 9024544..957c9da 100644
--- a/src/admin/problem.php
+++ b/src/admin/problem.php
@@ -231,6 +231,9 @@ for ($i=0; $i<count($prob); $i++) {
$param['fake'] = 'f';
$param['colorname'] = trim($_POST["colorname" . $prob[$i]['number']]);
$param['color'] = trim($_POST["color" . $prob[$i]['number']]);
+ if (isset ($prob[$i]['autojudge'])) {
+ $param['autojudge'] = ((integer) $prob[$i]['autojudge']);
+ }
DBNewProblem ($_SESSION["usertable"]["contestnumber"], $param);
}
ForceLoad("problem.php");
diff --git a/src/admin/report/webcast.php b/src/admin/report/webcast.php
index 75030be..6f6cf7c 100644
--- a/src/admin/report/webcast.php
+++ b/src/admin/report/webcast.php
@@ -267,7 +267,7 @@ for ($i = 0; $i < $numRuns; $i++) {
} else if ($run[$i]['answer'] == 'Not answered yet') {
$runfile .= '?' . "\n";
}
- else if($run[$i]['answer'] == 'NO - Compilation error' || $run[$i]['answer'] == 'NO - Contact staff'){
+ else if($run[$i]['answer'] == 'NO - Compilation error' || $run[$i]['answer'] == 'NO - Contact staff' || $run[$i]['answer'] == 'NO - Name mismatch'){
$runfile .= 'X' . "\n";
}
else {
diff --git a/src/fcontest.php b/src/fcontest.php
index 5238438..6f091b8 100644
--- a/src/fcontest.php
+++ b/src/fcontest.php
@@ -1066,16 +1066,16 @@ function insertlanguages($n,$c=null) {
$param['extension']='c';
DBNewLanguage($n, $param, $c);
$param['number']=2;
- $param['name']='C++11';
- $param['extension']='cc';
+ $param['name']='C++20';
+ $param['extension']='cpp';
DBNewLanguage($n, $param, $c);
$param['number']=3;
$param['name']='Java';
$param['extension']='java';
DBNewLanguage($n, $param, $c);
$param['number']=4;
- $param['name']='Python2';
- $param['extension']='py2';
+ $param['name']='Kotlin';
+ $param['extension']='kt';
DBNewLanguage($n, $param, $c);
$param['number']=5;
$param['name']='Python3';
diff --git a/src/flog.php b/src/flog.php
index ca168f0..ea6805d 100644
--- a/src/flog.php
+++ b/src/flog.php
@@ -31,7 +31,7 @@ CREATE TABLE \"logtable\" (
\"contestnumber\" int4 NOT NULL, -- (id do concurso)
\"sitenumber\" int4 NOT NULL, -- (id do site local)
\"loguser\" int4, -- (usuario envolvido com o log)
- \"logip\" varchar(20) NOT NULL, -- (numero do site do usuario envolvido)
+ \"logip\" varchar(160) NOT NULL, -- (numero do site do usuario envolvido)
\"logdate\" int4 NOT NULL, -- (dia/hora da criacao deste registro)
\"logtype\" varchar(20) NOT NULL, -- (tipo de registro: error, warn, info, debug)
\"logdata\" text NOT NULL, -- (descricao do registro)
diff --git a/src/judge/header.php b/src/judge/header.php
index 2874366..21f871d 100644
--- a/src/judge/header.php
+++ b/src/judge/header.php
@@ -66,7 +66,7 @@ echo "<tr><td nowrap bgcolor=\"#$cc\" align=center>";
echo "<img src=\"../images/smallballoontransp.png\" alt=\"\">";
echo "<font color=\"#000000\">BOCA</font>";
echo "</td><td bgcolor=\"#$cc\" width=\"99%\">\n";
-echo "Username: " . $_SESSION["usertable"]["userfullname"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
+echo "Username: " . $_SESSION["usertable"]["username"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
list($clockstr,$clocktype)=siteclock();
echo "</td><td bgcolor=\"#$cc\" align=center nowrap>&nbsp;".$clockstr."&nbsp;</td></tr>\n";
echo "</table>\n";
diff --git a/src/score/header.php b/src/score/header.php
index 110e09a..2125adb 100644
--- a/src/score/header.php
+++ b/src/score/header.php
@@ -48,7 +48,7 @@ echo "<tr><td nowrap bgcolor=\"#cc9966\" align=center>";
echo "<img src=\"../images/smallballoontransp.png\" alt=\"\">";
echo "<font color=\"#000000\">BOCA</font>";
echo "</td><td bgcolor=\"#cc9966\" width=\"99%\">\n";
-echo "Username: " . $_SESSION["usertable"]["userfullname"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
+echo "Username: " . $_SESSION["usertable"]["username"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
//list($clockstr,$clocktype)=siteclock(); // THIS IS SLOW, WE NEED A BETTER OPTION
$clockstr='';
echo "</td><td bgcolor=\"#cc9966\" align=center nowrap>&nbsp;".$clockstr."&nbsp;</td></tr>\n";
diff --git a/src/staff/header.php b/src/staff/header.php
index 10b0338..5c8fd6d 100644
--- a/src/staff/header.php
+++ b/src/staff/header.php
@@ -51,7 +51,7 @@ echo "<tr><td nowrap bgcolor=\"#ffa020\" align=center>";
echo "<img src=\"../images/smallballoontransp.png\" alt=\"\">";
echo "<font color=\"#000000\">BOCA</font>";
echo "</td><td bgcolor=\"#ffa020\" width=\"99%\">\n";
-echo "Username: " . $_SESSION["usertable"]["userfullname"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
+echo "Username: " . $_SESSION["usertable"]["username"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")<br>\n";
list($clockstr,$clocktype)=siteclock();
echo "</td><td bgcolor=\"#ffa020\" align=center nowrap>&nbsp;".$clockstr."&nbsp;</td></tr>\n";
echo "</table>\n";
diff --git a/src/system/header.php b/src/system/header.php
index ab5a522..38b9938 100644
--- a/src/system/header.php
+++ b/src/system/header.php
@@ -48,7 +48,7 @@ echo "<tr><td nowrap bgcolor=\"eeee00\" align=center>";
echo "<img src=\"../images/smallballoontransp.png\" alt=\"\">";
echo "<font color=\"#000000\">BOCA</font>";
echo "</td><td bgcolor=\"#eeee00\" width=\"99%\">\n";
-echo "Username: " . $_SESSION["usertable"]["userfullname"] ."<br>\n";
+echo "Username: " . $_SESSION["usertable"]["username"] ."<br>\n";
list($clockstr,$clocktype)=siteclock();
echo "</td><td bgcolor=\"#eeee00\" align=center nowrap>&nbsp;".$clockstr."&nbsp;</td></tr>\n";
echo "</table>\n";
diff --git a/src/team/header.php b/src/team/header.php
index a7e8168..00909df 100644
--- a/src/team/header.php
+++ b/src/team/header.php
@@ -51,7 +51,7 @@ echo "<tr><td nowrap bgcolor=\"#aaaaee\" align=center>";
echo "<img src=\"../images/smallballoontransp.png\" alt=\"\">";
echo "<font color=\"#000000\">BOCA</font>";
echo "</td><td bgcolor=\"#aaaaee\" width=\"99%\">\n";
-echo "Username: " . $_SESSION["usertable"]["userfullname"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")\n";
+echo "Username: " . $_SESSION["usertable"]["username"] . " (site=".$_SESSION["usertable"]["usersitenumber"].")\n";
$ds = DIRECTORY_SEPARATOR;
if($ds=="") $ds = "/";
diff --git a/src/version b/src/version
index 0e65cc2..03f4017 100644
--- a/src/version
+++ b/src/version
@@ -1 +1 @@
-boca-1.5.19-1
+boca-1.5.23
diff --git a/src/versionnum.php b/src/versionnum.php
index 15f50f9..c0a025e 100644
--- a/src/versionnum.php
+++ b/src/versionnum.php
@@ -1,5 +1,5 @@
<?php
-$BOCAVERSION='boca-1.5.17';
-$YEAR='2023';
+$BOCAVERSION='boca-1.5.23';
+$YEAR='2025';
?>
diff --git a/tools/boca-createjail b/tools/boca-createjail
index 1340282..7e4ec5c 100755
--- a/tools/boca-createjail
+++ b/tools/boca-createjail
@@ -1,23 +1,23 @@
#!/bin/bash
homejail=/home/bocajail
-[ "$1" != "" ] && homejail=$1
+[ "$1" != "" ] && homejail="$1"
echo "================================================================================="
echo "============= CREATING $homejail (this might take some time) ==============="
echo "================================================================================="
for i in setquota ln id chown chmod dirname useradd mkdir cp rm mv apt-get dpkg uname debootstrap schroot; do
- p=`which $i`
+ p="$(which $i)"
if [ -x "$p" ]; then
echo -n ""
else
- echo command "$i" not found
+ echo "command $i not found"
exit 1
fi
done
-if [ "`id -u`" != "0" ]; then
+if [[ "$(id -u)" != "0" ]]; then
echo "Must be run as root"
exit 1
fi
-if [ ! -r /etc/lsb-release ]; then
+if [[ ! -r /etc/lsb-release ]]; then
echo "File /etc/lsb-release not found. Is this a ubuntu or debian-like distro?"
echo "If so, execute the command"
echo ""
@@ -27,23 +27,23 @@ if [ ! -r /etc/lsb-release ]; then
exit 1
fi
. /etc/lsb-release
-if [ -d /bocajail/ ]; then
+if [[ -d /bocajail/ ]]; then
echo "You seem to have already a /bocajail installed"
echo "If you want to reinstall, remove it first (e.g. rm /bocajail) and then run /etc/icpc/createbocajail.sh"
exit 1
fi
-if [ -f $homejail/proc/cpuinfo ]; then
+if [[ -f "${homejail}/proc/cpuinfo" ]]; then
echo "You seem to have already installed /bocajail and the /bocajail/proc seems to be mounted"
- chroot $homejail umount /sys >/dev/nul 2>/dev/null
- chroot $homejail umount /proc >/dev/nul 2>/dev/null
+ chroot "$homejail" umount /sys >/dev/nul 2>/dev/null
+ chroot "$homejail" umount /proc >/dev/nul 2>/dev/null
echo "Please reboot the system to remove such mounted point"
exit 1
fi
id -u bocajail >/dev/null 2>/dev/null
-if [ $? != 0 ]; then
- useradd -m -s /bin/bash -d $homejail -g users bocajail
+if [[ $? != 0 ]]; then
+ useradd -m -s /bin/bash -d "$homejail" -g users bocajail
cat <<EOF > /var/lib/AccountsService/users/bocajail
[User]
SystemAccount=true
@@ -57,9 +57,9 @@ fi
setquota -u bocajail 0 500000 0 10000 -a
rm -rf /bocajail
-mkdir -p $homejail/tmp
-chmod 1777 $homejail/tmp
-ln -s $homejail /bocajail
+mkdir -p "$homejail/tmp"
+chmod 1777 "$homejail/tmp"
+ln -s "$homejail" /bocajail
#for i in usr lib var bin sbin etc dev; do
# [ -d $homejail/$i ] && rm -rf $homejail/$i
# cp -ar /$i $homejail
@@ -69,7 +69,7 @@ ln -s $homejail /bocajail
#mkdir -p $homejail/proc
#mkdir -p $homejail/sys
uname -m | grep -q 64
-if [ $? == 0 ]; then
+if [[ $? == 0 ]]; then
archt=amd64
else
archt=i386
@@ -84,21 +84,21 @@ type=directory
users=bocajail,nobody,root
FIM
-#debootstrap --arch $archt $DISTRIB_CODENAME $homejail
-debootstrap $DISTRIB_CODENAME $homejail
-if [ $? != 0 ]; then
+#debootstrap --arch "$archt" "$DISTRIB_CODENAME" "$homejail"
+debootstrap "$DISTRIB_CODENAME" "$homejail" 'http://archive.ubuntu.com/ubuntu'
+if [[ $? != 0 ]]; then
echo "bocajail failed to debootstrap"
exit 1
else
schroot -l | grep -q bocajail
-if [ $? == 0 ]; then
+if [[ $? == 0 ]]; then
echo "bocajail successfully installed at $homejail"
else
echo "*** some error has caused bocajail not to install properly -- I will try it again with different parameters"
echo "location=$homejail" >> /etc/schroot/chroot.d/bocajail.conf
- debootstrap $DISTRIB_CODENAME $homejail
+ debootstrap "$DISTRIB_CODENAME" "$homejail" 'http://archive.ubuntu.com/ubuntu'
schroot -l | grep -q bocajail
- if [ $? == 0 ]; then
+ if [[ $? == 0 ]]; then
echo "*** bocajail successfully installed at $homejail"
else
echo "*** bocajail failed to install"
@@ -107,6 +107,35 @@ else
fi
fi
+printf "*** Patching broken repositories on Ubuntu noble\n"
+if [[ "$DISTRIB_CODENAME" == 'noble' ]]; then
+ printf '*** Ubuntu %s detected on %s\n' "$DISTRIB_CODENAME" "$homejail"
+
+ if [[ ! -f "${homejail}/etc/apt/sources.list.d/ubuntu.sources" ]]; then
+ printf "*** Sources file missing\n"
+
+cat <<EOF > "${homejail}/etc/apt/sources.list.d/ubuntu.sources"
+Types: deb
+URIs: http://archive.ubuntu.com/ubuntu
+Suites: noble noble-updates noble-backports
+Components: main restricted universe multiverse
+Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
+
+Types: deb
+URIs: http://security.ubuntu.com/ubuntu
+Suites: noble-security
+Components: main restricted universe multiverse
+Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
+EOF
+ printf '*** Patched %s for broken repositories\n' "$homejail"
+ fi
+fi
+
+# We have two PPAs:
+# add-apt-repository -y ppa:icpc-latam/maratona-linux
+# add-apt-repository -y ppa:icpc-latam/unstable
+# Please use only the STABLE one when officially releasing!
+
echo "*** Populating $homejail"
cat <<EOF > /home/bocajail/tmp/populate.sh
#!/bin/bash
@@ -117,21 +146,22 @@ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
/usr/sbin/locale-gen
/usr/sbin/update-locale
apt-get -y update
-apt-get -y install software-properties-common
+apt-get -y dist-upgrade --purge
+apt-get -y install software-properties-common --no-install-recommends
add-apt-repository -y ppa:icpc-latam/maratona-linux
apt-get -y update
-apt-get -y upgrade
apt-get -y install maratona-linguagens --no-install-recommends --allow-unauthenticated
+apt-get autoremove --purge
apt-get -y clean
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/
+[[ -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
export LC_ALL=en_US.UTF-8
-cd / ; chroot $homejail /tmp/populate.sh
+cd / ; chroot "$homejail" /tmp/populate.sh