aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile15
-rw-r--r--debian/boca-autojudge.postinst10
-rw-r--r--debian/boca-common.postinst10
-rw-r--r--debian/boca-db.postinst8
-rw-r--r--debian/boca-submission-tools.postinst16
-rw-r--r--debian/boca-web.postinst52
-rw-r--r--debian/changelog39
-rw-r--r--debian/compat1
-rw-r--r--debian/control83
-rw-r--r--debian/copyright17
-rw-r--r--debian/source/format1
12 files changed, 175 insertions, 79 deletions
diff --git a/.gitignore b/.gitignore
index a78607f..688aa05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,5 @@ debian/boca.substvars
debian/boca/
debian/debhelper-build-stamp
debian/files
+
+*.swp
diff --git a/Makefile b/Makefile
index 6ec0a69..172b8cb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
tools/safeexec: tools/safeexec.c
- gcc tools/safeexec.c -o tools/safeexec
+ gcc -g -O2 $^ -o $@
tools/boca-submit-run-root-wrapper: tools/boca-submit-run-root-wrapper.c
- gcc $^ -o $@
+ gcc -g -O2 $^ -o $@
install-bocawww:
mkdir -p $(DESTDIR)/usr/sbin $(DESTDIR)/etc/cron.d $(DESTDIR)/var/www/boca/
@@ -14,11 +14,8 @@ install-bocawww:
chmod 700 $(DESTDIR)/usr/sbin/boca-fixssh
install-bocaapache:
- mkdir -p $(DESTDIR)/etc/apache2/sites-enabled/
- cp tools/000-boca.conf $(DESTDIR)/etc/apache2/sites-enabled/000-boca.conf
- a2ensite default-ssl || echo a2ensite default-ssl FAILED
- a2enmod ssl || echo a2enmod ssl FAILED
- a2enmod socache_shmcb || echo a2enmod socache_shmcb FAILED
+ mkdir -p $(DESTDIR)/etc/apache2/sites-available/
+ cp tools/000-boca.conf $(DESTDIR)/etc/apache2/sites-available/000-boca.conf
install-scripts:
mkdir -p $(DESTDIR)/usr/sbin/
@@ -52,6 +49,10 @@ install-bocaautojudge: tools/safeexec
install: install-bocawww install-bocaapache install-bocadb install-bocacommon install-bocaautojudge install-scripts
+clean:
+ $(RM) tools/safeexec
+ $(RM) tools/boca-submit-run-root-wrapper
+
install-submission-tools: tools/boca-submit-run-root-wrapper
mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin $(DESTDIR)/etc/cron.d
install tools/boca-auth-runs $(DESTDIR)/usr/sbin/
diff --git a/debian/boca-autojudge.postinst b/debian/boca-autojudge.postinst
index 06fa222..274e73b 100644
--- a/debian/boca-autojudge.postinst
+++ b/debian/boca-autojudge.postinst
@@ -1,7 +1,13 @@
#!/bin/bash
+set -e
-chmod 4555 /usr/bin/safeexec
-chmod 700 /usr/sbin/boca-createjail
+chmod 4555 /usr/bin/safeexec
+chmod 700 /usr/sbin/boca-createjail
chmod 700 /usr/sbin/boca-autojudge
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
exit 0
diff --git a/debian/boca-common.postinst b/debian/boca-common.postinst
index 0a35a35..3ff74f1 100644
--- a/debian/boca-common.postinst
+++ b/debian/boca-common.postinst
@@ -1,10 +1,9 @@
#!/bin/bash
+set -e
chmod 700 /usr/sbin/boca-config-dbhost
chmod 700 /usr/sbin/boca-fixssh
-set -e
-
. /usr/share/debconf/confmodule
priority=high
@@ -48,6 +47,11 @@ case "$1" in
esac
chmod 600 /var/www/boca/src/private/conf.php
-chown www-data.www-data /var/www/boca/src/private/conf.php
+chown www-data:www-data /var/www/boca/src/private/conf.php
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
exit 0
diff --git a/debian/boca-db.postinst b/debian/boca-db.postinst
index c1ad606..6154b81 100644
--- a/debian/boca-db.postinst
+++ b/debian/boca-db.postinst
@@ -1,9 +1,8 @@
#!/bin/bash
+set -e
chmod 700 /usr/sbin/boca-createdb
-set -e
-
. /usr/share/debconf/confmodule
priority=high
@@ -74,4 +73,9 @@ esac
service postgresql restart || true
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
exit 0
diff --git a/debian/boca-submission-tools.postinst b/debian/boca-submission-tools.postinst
index 21cfdd9..6b6e15c 100644
--- a/debian/boca-submission-tools.postinst
+++ b/debian/boca-submission-tools.postinst
@@ -1,14 +1,22 @@
#!/bin/bash
+set -e
#Make sure wrapper is suid and others are not readable
chmod 700 /usr/sbin/boca-fixes
-chmod 700 /usr/sbin/boca-auth-runs
-chmod 700 /usr/sbin/boca-outmanage
-chmod 700 /usr/sbin/boca-submit-log
+chmod 700 /usr/sbin/boca-auth-runs
+chmod 700 /usr/sbin/boca-outmanage
+chmod 700 /usr/sbin/boca-submit-log
chmod 700 /usr/bin/boca-submit-run-*
-chmod 4555 /usr/bin/boca-submit-run-root-wrapper
+chmod 4555 /usr/bin/boca-submit-run-root-wrapper
for i in boca-submit-list boca-submit-oldlist; do
rm -f /usr/bin/$i || true
ln -s /usr/bin/boca-submit-run /usr/bin/$i
done
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/boca-web.postinst b/debian/boca-web.postinst
index 2006bff..091905b 100644
--- a/debian/boca-web.postinst
+++ b/debian/boca-web.postinst
@@ -1,22 +1,56 @@
#!/bin/bash
+set -e
. /usr/share/debconf/confmodule
-chown -R www-data.www-data /var/www/boca
+chown -R www-data:www-data /var/www/boca
chmod -R go-rwx /var/www/boca/src/private
+# Stop the apache2 server before changing enabled modules
+systemctl stop apache2
+
+# Configure HTTPS in Apache
+# See https://www.arubacloud.com/tutorial/how-to-enable-https-protocol-with-apache-2-on-ubuntu-20-04.aspx
+# Enable SSL module
+a2enmod ssl
+
+# Enable default SSL Virtual Host
+a2ensite default-ssl
+
+# Enable boca HTTP Virtual Host
+a2ensite 000-boca.conf
+
+# Enable apache's shared object cache provider that uses a high-performance
+# cyclic buffer inside a shared memory segment
+# See https://httpd.apache.org/docs/2.4/socache.html
a2enmod socache_shmcb
-a2enmod proxy_fcgi
-# Make sure embedded apache php module is not loaded
-a2dismod php7.4 || true
+# Recommended setup before enabling the php-fpm with apache httpd 2.4: enable
+# fast CGI and set its environment variables
+# Older tutorials recommended disabling the mpm_prefork module and enabling the
+# mpm_event one before setting Fast CGI up, e.g.
+# https://askubuntu.com/questions/1319861/how-to-configure-apache-http-to-php-fpm-on-ubuntu-20-10
+# Fortunately, Apache HTTPD version 2.4 already enables the mpm_event by default
+# according the project's documentation
+# https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
+a2enmod proxy_fcgi setenvif
+
+# Enable php-fpm module for apache
+a2enconf php8.1-fpm
+
+# Check the syntax of apache2's configuration file
+# This DOES NOT CATCH ALL ERRORS
+apache2ctl configtest
+
+# Restart apache2 with the new configuration
+systemctl start apache2
-#enable php fpm instead
-a2enconf php7.4-fpm
+# Remember to reset possible stored password from debconf
+db_reset boca-common/dbpassword
-service apache2 restart || true
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
-#remember to reset possible stored password from debconf
-db_reset boca-common/dbpassword || true
+#DEBHELPER#
exit 0
diff --git a/debian/changelog b/debian/changelog
index 0268731..a837589 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,42 @@
+boca (1.5.16-2) jammy; urgency=medium
+
+ * Enable boca's virtual host on HTTP (web interface)
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Sat, 04 Mar 2023 00:37:58 -0300
+
+boca (1.5.16-1) jammy; urgency=medium
+
+ [ Bruno Ribas ]
+ * webcast.php: Add lock to avoid sending corrupted files
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Fri, 03 Mar 2023 22:27:44 -0300
+
+boca (1.5.15-1) jammy; urgency=medium
+
+ * Add vim .swp files to .gitignore
+ * Move project to the new debhelper dependency
+ * Drop build dependency on build-essential
+ * Update and change package type to '3.0 (quilt)'
+ * Correct data and remove dh_make boilerplate
+ * Fix descriptions' syntax
+ * Use debhelper to find missing dependencies
+ * Add required field Standards-Version
+ * Drop unversioned dependencies on essential package
+ * Fix packages' short and long descriptions
+ * Populate dbgsym packages with debug symbols
+ * Fix chown usage in maintainer scripts
+ * Abort maintainer scripts on failure
+ * Enable debhelper automatic generation of shell code
+ * Migrate dependencies and maintainer scripts to PHP 8.1
+ * Remove Apache HTTPD commands from Makefile
+ * Use automatic variables to compile tools/safeexec
+ * Enable compiler optimisations
+ * Conflict with mod_php instead of disabling it
+ * Add clean rule to the Makefile
+ * Do not overwrite Apache's configuration directory
+
+ -- Davi Antônio da Silva Santos <antoniossdavi@gmail.com> Fri, 03 Mar 2023 20:51:38 -0300
+
boca (1.5.14-8ubuntu4.2) focal; urgency=medium
* unglysalt workaround.
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index f599e28..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/debian/control b/debian/control
index 62135f4..7ea2089 100644
--- a/debian/control
+++ b/debian/control
@@ -3,67 +3,68 @@ Section: misc
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, build-essential
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.6.0.1
Package: boca
Architecture: all
-Depends: boca-common, boca-web, boca-db, boca-autojudge
+Depends: ${misc:Depends}, ${shlibs:Depends}, boca-common, boca-web, boca-db, boca-autojudge
Provides: maratona-boca
-Description: BOCA is a software created to control a contest with the ACM ICPC rules.
- 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
- interaction between judges and the system is done through a web browser.
- .
- This package install all boca related packages to run everything in one
- single machine.
+Description: manage a contest with the ACM ICPC rules
+ 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
+ interaction between judges and the system is done through a web browser.
+ .
+ This metapackage install all boca related packages to run everything in a
+ single machine.
Package: boca-db
Architecture: all
Pre-depends: postgresql
-Depends: boca-common
+Depends: ${misc:Depends}, ${shlibs:Depends}, boca-common
Description: BOCA - database
- 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
- interaction between judges and the system is done through a web browser.
- .
- This package provides a full database to run a contest on.
+ 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
+ interaction between judges and the system is done through a web browser.
+ .
+ This package provides a full database to run a contest on.
Package: boca-web
Architecture: all
-Depends: boca-common, apache2, php-fpm, php
+Depends: ${misc:Depends}, ${shlibs:Depends}, boca-common, apache2, php8.1-fpm, php8.1
+Conflicts: libapache2-mod-php
Description: BOCA - WEB 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
- interaction between judges and the system is done through a web browser.
- .
- This package provides only web contents.
+ 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
+ interaction between judges and the system is done through a web browser.
+ .
+ This package provides only web contents.
Package: boca-common
Architecture: all
-Pre-Depends: debconf, makepasswd, coreutils, sharutils
-Depends: php-zip, wget, php-cli, php-pgsql, php-gd, postgresql-client, php-xml, openssl, libany-uri-escape-perl
+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
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
- interaction between judges and the system is done through a web browser.
- .
- This package contains shared files with all BOCA packages.
+ 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
+ interaction between judges and the system is done through a web browser.
+ .
+ This package contains shared files with all BOCA packages.
Package: boca-autojudge
Architecture: amd64
-Depends: boca-common, debootstrap, schroot, quotatool, makepasswd
-Description: BOCA - AutoJudge
- 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
- interaction between judges and the system is done through a web browser.
- .
- This package contains files to generate and run the autojudge system for
- BOCA.
+Depends: ${misc:Depends}, ${shlibs:Depends}, boca-common, debootstrap, schroot, quotatool, makepasswd
+Description: automatic judge system for BOCA
+ 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
+ interaction between judges and the system is done through a web browser.
+ .
+ This package contains files to generate and run the autojudge system for
+ BOCA.
Package: boca-submission-tools
Architecture: amd64
-Depends: sharutils, wget, coreutils, libany-uri-escape-perl, openssl, openssh-server, logkeys
-Description: BOCA submission tools.
- This package provides tools to submit codes to a running boca server
- without using the web interface.
-
+Depends: ${misc:Depends}, ${shlibs:Depends}, sharutils, wget, libany-uri-escape-perl, openssl, openssh-server, logkeys
+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 a51c332..82c29f7 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,14 +1,16 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: maratona-background
-Source: <url://example.com>
+Upstream-Name: boca
+Upstream-Contact: BOCA Development Team <bocasystem@gmail.com>
+Source: <https://github.com/cassiopc/boca>
Files: *
-Copyright: <years> <put author's name and email here>
- <years> <likewise for another author>
+Copyright: 2012-2023 BOCA Development Team <bocasystem@gmail.com>
License: GPL-2.0+
Files: debian/*
-Copyright: 2016 Bruno Ribas <brunoribas@utfpr.edu.br>
+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>
License: GPL-2.0+
License: GPL-2.0+
@@ -27,8 +29,3 @@ License: GPL-2.0+
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
-# Please avoid picking licenses with terms that are more restrictive than the
-# packaged work, as it may make Debian's contributions unacceptable upstream.
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)