diff --git a/README.md b/README.md
index d45c5a62..bc6ac73a 100644
--- a/README.md
+++ b/README.md
@@ -9,4 +9,4 @@ The following subdirectories contain:
* `website` the HTML code for www.domjudge.org
* `icpc-wf` scripts used at the ICPC World Finals
* `contest-api` a script to validate an implementation of the
- [ICPC contest API](https://clics.ecs.baylor.edu/index.php/Contest_API)
+ [ICPC contest API](https://ccs-specs.icpc.io/contest_api)
diff --git a/contest-api/check-api.sh b/contest-api/check-api.sh
index 12321229..9ec85b97 100755
--- a/contest-api/check-api.sh
+++ b/contest-api/check-api.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# Checks whether a Contest API conforms to the specification
-# https://clics.ecs.baylor.edu/index.php/Contest_API
+# https://ccs-specs.icpc.io/contest_api
# Set path to json-validate binary if it's not in PATH:
#VALIDATE_JSON=/path/to/validate-json
@@ -71,7 +71,7 @@ $(basename $0) - Validate a Contest API implementation with JSON schema.
Usage: $(basename $0) [option]... URL
This program validates a Contest API implementation against the
-specification: https://clics.ecs.baylor.edu/index.php/Contest_API
+specification: https://ccs-specs.icpc.io/contest_api
The URL must point to the base of the API, for example:
diff --git a/cron_tag_release.sh b/cron_tag_release.sh
new file mode 100755
index 00000000..12108893
--- /dev/null
+++ b/cron_tag_release.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+set -eu
+
+. ~/.tagrelease
+
+main=master
+
+RELEASE_DIR="/srv/http/domjudge/releases"
+
+notify_channel () {
+ # Local debug
+ echo "$1"
+ # When cron is run often one should have time to
+ # fix the issue.
+ if [ ! -f /tmp/$2 ]; then
+ # Write to syslog on server
+ logger "$1"
+ DATA='{"text":"'"$1"'"}'
+ # Notify DOMjudge Slack channel (github-notifications)
+ # SLACK_URL should be exported in the .bashrc (it should be secret)
+ curl -X POST -H 'Content-type: application/json' --data "$DATA" "$SLACK_URL"
+ touch /tmp/$2
+ fi
+}
+
+process_tag () {
+ TAG="$1"
+ NUMB="[0-9]+"
+ DOT="\."
+ RELEASE="$NUMB$DOT$NUMB$DOT$NUMB"
+ OPTRC="((RC|rc)[0-9])?"
+ if [[ $TAG =~ ^$RELEASE$OPTRC$ ]]; then
+ # TODO: check if the file already exists
+ if [ -f "$RELEASE_DIR/domjudge-$TAG.tar.gz" ]; then
+ # Tag is already handled
+ return 0
+ fi
+ # To find the signer key of a earlier tag:
+ # gpg --search 780355B5EA6BFC8235A99C4B56F61A79401DAC04
+ # And if one trusts the internet to be correct
+ # gpg --recv-keys 780355B5EA6BFC8235A99C4B56F61A79401DAC04
+ if git verify-tag $TAG; then
+ # At this point the tarball should already be locally tested
+ ~/domjudge-scripts/make_release.sh "$TAG"
+ mv domjudge-$TAG.* $RELEASE_DIR/
+ notify_channel "Tarball finished ($TAG).\nURL: https://www.domjudge.org/releases/domjudge-$TAG.tar.gz" "$TAG"
+ else
+ notify_channel "Untrusted tag ($TAG)" "$TAG"
+ fi
+ fi
+}
+
+# Reset to main branch
+cd ~domjudge/git/domjudge
+git checkout $main
+
+while read -r tag; do
+ process_tag "$tag"
+done <<< "$(git tag)"
+
diff --git a/icpc-wf/ansible/admin.yml b/icpc-wf/ansible/admin.yml
index 94bb426a..a9051bae 100644
--- a/icpc-wf/ansible/admin.yml
+++ b/icpc-wf/ansible/admin.yml
@@ -9,7 +9,7 @@
- name: restart nginx
service: name=nginx state=restarted
- name: restart PHP FPM
- service: name=php7.2-fpm state=restarted
+ service: name=php7.4-fpm state=restarted
- name: update-ca-certificates
command: update-ca-certificates
- name: restart rsyslog
@@ -49,7 +49,7 @@
- mariadb-server
- nginx
- php-fpm
- - python-mysqldb
+ - python3-mysqldb
- php-intl
- mycli
- mmv
@@ -59,7 +59,7 @@
- name: set PHP timezone for FPM
lineinfile:
- dest: /etc/php/7.2/fpm/php.ini
+ dest: /etc/php/7.4/fpm/php.ini
state: present
regexp: 'date\.timezone\s*='
line: 'date.timezone = {{TIMEZONE}}'
@@ -67,7 +67,7 @@
- name: enable php modules
command: phpenmod {{item}}
args:
- creates: /etc/php/7.2/fpm/conf.d/20-{{item}}.ini
+ creates: /etc/php/7.4/fpm/conf.d/20-{{item}}.ini
with_items:
- zip
- intl
diff --git a/icpc-wf/ansible/common_tasks_all.yml b/icpc-wf/ansible/common_tasks_all.yml
index 3d4e63df..0a74df74 100644
--- a/icpc-wf/ansible/common_tasks_all.yml
+++ b/icpc-wf/ansible/common_tasks_all.yml
@@ -6,11 +6,19 @@
- include: common_tasks_packages_icpc-wf.yml
+ - name: Update and upgrade apt packages
+ become: true
+ apt:
+ upgrade: yes
+ update_cache: yes
+ cache_valid_time: 86400 #One day
+
- name: install common required/useful packages
tags: packages
apt:
state: present
pkg:
+ - acl
- ack-grep
- git
- htop
@@ -51,7 +59,7 @@
- name: set PHP timezone for CLI
lineinfile:
- dest: /etc/php/7.2/cli/php.ini
+ dest: /etc/php/7.4/cli/php.ini
state: present
regexp: 'date\.timezone\s*='
line: 'date.timezone = {{TIMEZONE}}'
@@ -94,17 +102,6 @@
mode: 0600
when: DJ_GIT_SSH_KEY is defined
- - name: Create SSH config
- template: src=files/ssh-config-domjudge.j2 dest=/home/domjudge/.ssh/config owner=domjudge group=domjudge mode=0600
- when: DJ_GIT_HOST is defined
-
- - name: add all hosts to hosts file
- lineinfile:
- dest: /etc/hosts
- regexp: '{{ item }}$'
- line: "{{ hostvars[item].ansible_host }} {{ item }}"
- loop: "{{ groups['all'] }}"
-
- name: configure domjudge logging
copy: src=files/rsyslog.domjudge.conf dest=/etc/rsyslog.d/domjudge.conf
notify: restart rsyslog
diff --git a/icpc-wf/ansible/common_tasks_packages_icpc-wf.yml b/icpc-wf/ansible/common_tasks_packages_icpc-wf.yml
index b63e86fb..55a99ec1 100644
--- a/icpc-wf/ansible/common_tasks_packages_icpc-wf.yml
+++ b/icpc-wf/ansible/common_tasks_packages_icpc-wf.yml
@@ -1,31 +1,10 @@
# Common packaging stuff during ICPC World Finals.
---
- - name: fix apt sources list
- tags: packages
- replace:
- dest: /etc/apt/sources.list
- regexp: 'pc2cancer\.ecs\.csus\.edu'
- replace: 'packages'
-
- - name: remove pycharm repo
- tags: packages
- replace:
- dest: /etc/apt/sources.list
- regexp: '^([^#].*pycharm.*)$'
- replace: '# \1'
-
- - name: add packages to hosts file
- tags: packages
- lineinfile:
- dest: /etc/hosts
- regexp: '^10\.3\.3\.209'
- line: "10.3.3.209 packages"
-
- - name: remove some packages
- tags: packages
- apt:
- pkg: ntp
- state: absent
+# - name: remove some packages
+# tags: packages
+# apt:
+# pkg: ntp
+# state: absent
- meta: flush_handlers
tags: packages
diff --git a/icpc-wf/ansible/common_tasks_prebuild.yml b/icpc-wf/ansible/common_tasks_prebuild.yml
index e2bf1a8d..36945a42 100644
--- a/icpc-wf/ansible/common_tasks_prebuild.yml
+++ b/icpc-wf/ansible/common_tasks_prebuild.yml
@@ -87,27 +87,6 @@
- COLLECTD_MYSQL_PASSWORD is defined
- "'domjudge' == ansible_hostname or 'domjudge-laptop' in ansible_hostname or 'domjudge-backup' in ansible_hostname"
- - name: copy DOMjudge logo binary
- copy: src=files/domlogo dest=/home/domjudge/domlogo owner=domjudge group=domjudge mode=0755
-
- - name: enable GDM autologin
- lineinfile:
- path: /etc/gdm3/custom.conf
- regexp: 'AutomaticLoginEnable'
- line: 'AutomaticLoginEnable=true'
- notify: restart gdm
-
- - name: Automatically login domjudge user
- lineinfile:
- path: /etc/gdm3/custom.conf
- regexp: 'AutomaticLogin'
- line: 'AutomaticLogin=domjudge'
- notify: restart gdm
-
- - name: make sure autostart directory exists
- file: dest=/home/domjudge/.config/autostart state=directory owner=domjudge group=domjudge
- tags: fix_autostart
-
- name: install SSL server certificates
copy:
src: "{{ item }}"
diff --git a/icpc-wf/ansible/domserver-only-code.yml b/icpc-wf/ansible/domserver-only-code.yml
index 44893e08..ccb1fd3e 100644
--- a/icpc-wf/ansible/domserver-only-code.yml
+++ b/icpc-wf/ansible/domserver-only-code.yml
@@ -11,7 +11,7 @@
- name: restart nginx
service: name=nginx state=restarted
- name: restart PHP FPM
- service: name=php7.2-fpm state=restarted
+ service: name=php7.4-fpm state=restarted
- name: update-ca-certificates
command: update-ca-certificates
- name: restart collectd
diff --git a/icpc-wf/ansible/domserver.yml b/icpc-wf/ansible/domserver.yml
index a19a51a1..7e81575c 100644
--- a/icpc-wf/ansible/domserver.yml
+++ b/icpc-wf/ansible/domserver.yml
@@ -11,7 +11,7 @@
- name: restart nginx
service: name=nginx state=restarted
- name: restart PHP FPM
- service: name=php7.2-fpm state=restarted
+ service: name=php7.4-fpm state=restarted
- name: update-ca-certificates
command: update-ca-certificates
- name: restart collectd
@@ -35,17 +35,18 @@
- mariadb-server
- nginx
- php-fpm
- - python-mysqldb
+ - python3-mysqldb
- php-intl
- mycli
- macchanger
+ - acl
- name: copy in MySQL config
copy: src=files/my.cnf dest=/root/.my.cnf
- name: set PHP timezone for FPM
lineinfile:
- dest: /etc/php/7.2/fpm/php.ini
+ dest: /etc/php/7.4/fpm/php.ini
state: present
regexp: 'date\.timezone\s*='
line: 'date.timezone = {{TIMEZONE}}'
@@ -53,7 +54,7 @@
- name: enable php modules
command: phpenmod {{item}}
args:
- creates: /etc/php/7.2/fpm/conf.d/20-{{item}}.ini
+ creates: /etc/php/7.4/fpm/conf.d/20-{{item}}.ini
with_items:
- zip
- intl
@@ -69,32 +70,6 @@
copy: src=files/mysql.domjudge.cnf dest=/etc/mysql/mariadb.conf.d/zz_domjudge.cnf
notify: restart mysql
- - name: add mysql config snippet for replication
- template: src=files/mysql.replication.cnf.j2 dest=/etc/mysql/mariadb.conf.d/zzz_replication.cnf
- notify: restart mysql
- when: REPLICATION_PASSWORD is defined
-
- - name: disable mysql listen on localhost only
- replace:
- path: /etc/mysql/mariadb.conf.d/50-server.cnf
- regexp: '^bind-address\s*='
- replace: '#bind-address ='
- when: REPLICATION_PASSWORD is defined
-
- - name: copy script to setup replication
- template: src=files/setup-replication.sh.j2 dest=/usr/local/sbin/setup-replication.sh mode=0755
- when: REPLICATION_PASSWORD is defined
-
- - name: create mysql replication user
- mysql_user:
- name: replication
- host: '%'
- password: "{{REPLICATION_PASSWORD}}"
- append_privs: true
- priv: '*.*:REPLICATION SLAVE'
- state: present
- when: REPLICATION_PASSWORD is defined
-
- name: make sure mysql is restarted
meta: flush_handlers
@@ -119,14 +94,6 @@
command: "{{DJ_DIR}}/bin/dj_setup_database -u root bare-install"
when: "'failed' in db_status.stdout"
- - name: fix background color
- lineinfile:
- regexp: '^(\s*background-color):\s+white\s*;'
- line: '\1: {{BACKGROUND_COLOR}};'
- backrefs: yes
- dest: "{{DJ_DIR}}/webapp/web/style.css"
- when: BACKGROUND_COLOR is defined
-
- name: disable developer mode
lineinfile:
regexp: '^APP_ENV=dev'
@@ -134,10 +101,3 @@
dest: "{{DJ_DIR}}/webapp/.env.local"
- include: nginx-setup.yml
-
- - name: add autostart shortcuts
- copy: src=files/{{item}}.desktop dest=/home/domjudge/.config/autostart/ owner=domjudge group=domjudge mode=0755
- with_items:
- - htop
- - taillog-domserver-nginx-error
- - taillog-domserver-symfony-error
diff --git a/icpc-wf/ansible/files/setup-replication.sh.j2 b/icpc-wf/ansible/files/setup-replication.sh.j2
index fabed150..a42fc131 100755
--- a/icpc-wf/ansible/files/setup-replication.sh.j2
+++ b/icpc-wf/ansible/files/setup-replication.sh.j2
@@ -24,7 +24,7 @@ echo "Recreating empty database..."
mysql -e 'STOP SLAVE; DROP DATABASE domjudge;'
{{DJ_DIR}}/sql/dj_setup_database create-db-users
-ssh "$MASTER" "service php7.2-fpm stop"
+ssh "$MASTER" "service php7.4-fpm stop"
MASTER_STATUS=$(ssh "$MASTER" "mysql -e 'SHOW MASTER STATUS;'" | tail -n1)
MASTER_BINLOG=$(echo "$MASTER_STATUS" | cut -f 1)
@@ -48,7 +48,7 @@ CHANGE MASTER TO MASTER_HOST='10.3.3.${MASTER_SERVER_ID}',
MASTER_LOG_POS=${MASTER_LOGPOS};
START SLAVE;"
-ssh "$MASTER" "service php7.2-fpm start"
+ssh "$MASTER" "service php7.4-fpm start"
if ! mysql -e 'SHOW SLAVE STATUS\G' | grep 'Slave_SQL_Running: Yes' ; then
echo "Error: slave SQL replication not running."
diff --git a/icpc-wf/ansible/files/taillog-domserver-symfony-error.desktop b/icpc-wf/ansible/files/taillog-domserver-symfony-error.desktop
index 645dbad9..cf728673 100644
--- a/icpc-wf/ansible/files/taillog-domserver-symfony-error.desktop
+++ b/icpc-wf/ansible/files/taillog-domserver-symfony-error.desktop
@@ -1,4 +1,4 @@
[Desktop Entry]
Name=taillog-domserver-symfony-error
Type=Application
-Exec=gnome-terminal --window --geometry 74x17+1000+400 -e 'bash -c "tail -F /opt/domjudge/webapp/var/logs/prod.log"'
+Exec=gnome-terminal --window --geometry 74x17+1000+400 -e 'bash -c "tail -F /opt/domjudge/webapp/var/log/prod.log"'
diff --git a/icpc-wf/ansible/files/tune_cpu.service b/icpc-wf/ansible/files/tune_cpu.service
index f7dec9d6..263f337b 100644
--- a/icpc-wf/ansible/files/tune_cpu.service
+++ b/icpc-wf/ansible/files/tune_cpu.service
@@ -5,3 +5,6 @@ Description=Tune CPU cores: disable turboboost, downclocking, etc.
Type=oneshot
ExecStart=/usr/local/sbin/disable-turboboost_ht
RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/icpc-wf/ansible/hosts b/icpc-wf/ansible/hosts
index 1807c917..b20e312f 100644
--- a/icpc-wf/ansible/hosts
+++ b/icpc-wf/ansible/hosts
@@ -1,27 +1,9 @@
[all:vars]
-ansible_user=root
+ansible_user=vmcj
ansible_python_interpreter=/usr/bin/python3
[domserver]
-domjudge ansible_host=10.3.3.215
-domjudge-backup ansible_host=10.3.3.216
-domjudge-laptop ansible_host=10.3.3.200
+domjudge-vm ansible_host=192.168.122.28
[judgehost]
-domjudge-judgehost1 ansible_host=10.2.2.192
-domjudge-judgehost2 ansible_host=10.2.2.193
-domjudge-judgehost3 ansible_host=10.2.2.194
-domjudge-judgehost4 ansible_host=10.2.2.195
-domjudge-judgehost5 ansible_host=10.2.2.196
-domjudge-judgehost6 ansible_host=10.2.2.197
-domjudge-judgehost7 ansible_host=10.2.2.198
-domjudge-judgehost8 ansible_host=10.2.2.199
-domjudge-judgehost9 ansible_host=10.2.2.200
-domjudge-judgehost10 ansible_host=10.2.2.201
-
-[admin]
-domjudge-ccsadmin1 ansible_host=10.3.3.223
-domjudge-ccsadmin2 ansible_host=10.3.3.224
-domjudge-ccsadmin3 ansible_host=10.3.3.225
-domjudge-ccsadmin4 ansible_host=10.3.3.226
-domjudge-ccsadmin5 ansible_host=10.3.3.227
+judgehost-vm ansible_host=192.168.122.78
diff --git a/icpc-wf/ansible/judgehost-only-code.yml b/icpc-wf/ansible/judgehost-only-code.yml
index 092b6e20..79a2febf 100644
--- a/icpc-wf/ansible/judgehost-only-code.yml
+++ b/icpc-wf/ansible/judgehost-only-code.yml
@@ -11,7 +11,7 @@
- name: restart nginx
service: name=nginx state=restarted
- name: restart PHP FPM
- service: name=php7.2-fpm state=restarted
+ service: name=php7.4-fpm state=restarted
- name: update-ca-certificates
command: update-ca-certificates
- name: restart collectd
@@ -78,4 +78,4 @@
- name: enable and restart the services we just copied
service: name={{item}} enabled=yes state=restarted
with_items:
- - judgedaemon
+ - domjudge-judgehost
diff --git a/icpc-wf/ansible/judgehost.yml b/icpc-wf/ansible/judgehost.yml
index a3e23130..d4b5949f 100644
--- a/icpc-wf/ansible/judgehost.yml
+++ b/icpc-wf/ansible/judgehost.yml
@@ -24,9 +24,9 @@
user: name={{item}} createhome=no home=/nonexistent group=nogroup shell=/bin/false
with_items:
- domjudge-run-0
- - domjudge-run-1
- - domjudge-run-2
- - domjudge-run-3
+ #- domjudge-run-1
+ #- domjudge-run-2
+ #- domjudge-run-3
- name: create domjudge-run group
group: name=domjudge-run state=present
@@ -38,7 +38,7 @@
- name: disable clearing Symfony cache when building
lineinfile:
dest: "{{DJ_DIR}}/Makefile"
- regexp: "^(.*-C webapp clear-cache)$"
+ regexp: "^(.*composer auto-scripts)$"
line: '#\1'
backrefs: yes
@@ -47,16 +47,16 @@
- name: re-enable clearing Symfony cache when building
lineinfile:
dest: "{{DJ_DIR}}/Makefile"
- regexp: "^#(.*-C webapp clear-cache)$"
+ regexp: "^#(.*composer auto-scripts)$"
line: '\1'
backrefs: yes
- - name: enable internal monitor
- file: path=/usr/share/X11/xorg.conf.d/22-icpc.conf state=absent
+ #- name: enable internal monitor
+ # file: path=/usr/share/X11/xorg.conf.d/22-icpc.conf state=absent
- - name: remove apt-transport-https from bionic debootstrap file
+ - name: remove apt-transport-https from focal debootstrap file
lineinfile:
- path: /usr/share/debootstrap/scripts/bionic
+ path: /usr/share/debootstrap/scripts/focal
regexp: 'ca-certificates'
line: ' base="$base ca-certificates"'
@@ -106,12 +106,20 @@
notify: restart systemctl
- name: copy create-cgroups systemd unit file
- copy: src={{DJ_DIR}}/misc-tools/create-cgroups.service dest=/etc/systemd/system/ remote_src=yes
+ copy: src={{DJ_DIR}}/lib/judge/create-cgroups.service dest=/etc/systemd/system/ remote_src=yes
tags: updateservice
notify: restart systemctl
+ - name: Change path of create_cgroups file
+ lineinfile:
+ dest: /etc/systemd/system/create-cgroups.service
+ state: present
+ regexp: 'ExecStart'
+ line: 'ExecStart={{DJ_DIR}}/judge/create_cgroups'
+ notify: restart systemctl
+
- name: copy judgedaemon systemd unit file
- copy: src={{DJ_DIR}}/judge/domjudge-judgehost.service dest=/etc/systemd/system/ remote_src=yes
+ copy: src={{DJ_DIR}}/lib/judge/domjudge-judgehost.service dest=/etc/systemd/system/ remote_src=yes
tags: updateservice
notify: restart systemctl
@@ -125,18 +133,9 @@
- tune_cpu
- domjudge-judgehost
- - name: add autostart shortcuts
- copy: src=files/{{item}}.desktop dest=/home/domjudge/.config/autostart/ owner=domjudge group=domjudge mode=0755
- with_items:
- - taillog
- - rotate
- - domjudgelogo
+ - name: disable apport service
+ service:
+ name: apport
+ enabled: no
+ state: stopped
- - name: disable systemd timers
- command: systemctl mask {{item}}
- args:
- creates: /etc/systemd/system/{{item}}
- with_items:
- - apt-daily-upgrade.timer
- - apt-daily.timer
- - systemd-tmpfiles-clean.timer
diff --git a/icpc-wf/ansible/nginx-setup.yml b/icpc-wf/ansible/nginx-setup.yml
index a780000b..d3ef1ef5 100644
--- a/icpc-wf/ansible/nginx-setup.yml
+++ b/icpc-wf/ansible/nginx-setup.yml
@@ -12,7 +12,7 @@
notify: update-ca-certificates
- name: copy in domjudge FPM conf
- copy: src={{DJ_DIR}}/etc/domjudge-fpm.conf remote_src=yes dest=/etc/php/7.2/fpm/pool.d/domjudge.conf
+ copy: src={{DJ_DIR}}/etc/domjudge-fpm.conf remote_src=yes dest=/etc/php/7.4/fpm/pool.d/domjudge.conf
notify: restart PHP FPM
- name: copy in domjudge nginx conf
@@ -101,7 +101,7 @@
- name: Set PHP settings
lineinfile:
- dest: /etc/php/7.2/fpm/pool.d/domjudge.conf
+ dest: /etc/php/7.4/fpm/pool.d/domjudge.conf
regexp: "{{item.regexp}}"
line: "{{item.key}} = {{item.value}}"
with_items:
diff --git a/icpc-wf/ansible/variables.yml b/icpc-wf/ansible/variables.yml
index 37802e89..45fd850a 100644
--- a/icpc-wf/ansible/variables.yml
+++ b/icpc-wf/ansible/variables.yml
@@ -9,13 +9,13 @@ DJ_BRANCH: master
# URL and IP of domserver from judgehosts. A hostname 'domserver' with
# DOMSERVER_IP will be added to the judgehost /etc/hosts file.
-DOMSERVER: https://domjudge
-DOMSERVER_IP: 10.3.3.215
+DOMSERVER: https://dj.storm.vu
+DOMSERVER_IP: 130.37.193.150
DOMSERVER_URL: "{{DOMSERVER}}"
-DOMSERVER_SSL_CERT: /etc/ssl/certs/domserver.crt
-DOMSERVER_SSL_KEY: /etc/ssl/private/domserver.key
+DOMSERVER_SSL_CERT: /etc/ssl/certs/localhost.crt
+DOMSERVER_SSL_KEY: /etc/ssl/private/localhost.key
-TIMEZONE: "Europe/Moscow"
+TIMEZONE: "Europe/Amsterdam"
PHP_FPM_MAX_CHILDREN: 400
PHP_FPM_MAX_REQUESTS: 500
@@ -26,7 +26,7 @@ PHP_MAX_FILE_UPLOADS: 101
# Password for the MySQL replication user.
# Set this to enable master-master replication between two domservers.
-REPLICATION_PASSWORD: some-replication-password
+#REPLICATION_PASSWORD: some-replication-password
# Password for the collectd MySQL status user.
# Set this to enable collectd for system statistics collection.
@@ -46,15 +46,15 @@ ADMIN_PASSWORD: some-admin-password
#DJ_SHELL_USER_PW: some-hashed-password
# Git repo URL
-DJ_GIT_REPO: domjudge@10.3.3.223:domjudge
+DJ_GIT_REPO: https://github.com/DOMjudge/domjudge.git
# If using a Git repo which requires a SSH key, set the host and key here
-DJ_GIT_HOST: 10.3.3.223
-DJ_GIT_SSH_KEY: |
- -----BEGIN OPENSSH PRIVATE KEY-----
- ENTER SSH PRIVATE KEY HERE
- -----END OPENSSH PRIVATE KEY-----
+DJ_GIT_HOST: github.com
+#DJ_GIT_SSH_KEY: |
+# -----BEGIN OPENSSH PRIVATE KEY-----
+# ENTER SSH PRIVATE KEY HERE
+# -----END OPENSSH PRIVATE KEY-----
# Key for domjudge user
-DJ_SSH_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsTOPgh8QYBudu7IOLETq4ek13RBB+pM/spOboCK1wO domjudge@domjudge-ccsadmin1
+DJ_SSH_KEY: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAe/eK/AmBHx4cEvvmb+HBg/h9aptCvHfv9sxkdvTr07 vmcj@lenovo
\ No newline at end of file
diff --git a/make_release.sh b/make_release.sh
index a4678d4e..5f5c5d51 100755
--- a/make_release.sh
+++ b/make_release.sh
@@ -3,26 +3,40 @@
# Script to create a DOMjudge release package. Release file is
# generated in the current directory.
-set -e
+CI_USAGE=${CI+x}
+if [ -z "$CI_USAGE" ]; then
+ set -e
+else
+ set -eux
+ export PS4='(${0}:): - [$?] $ '
+fi
GITURL="https://github.com/DOMjudge/domjudge.git"
-TEMPDIR=`mktemp -d /tmp/domjudge-make_release-XXXXXX`
+TEMPDIR=$(mktemp -d /tmp/domjudge-make_release-XXXXXX)
if [ -z "$1" ]; then
- echo "Error: missing required release tag argument."
- exit 1
+ echo "Error: missing required release tag argument."
+ exit 1
+fi
+
+if [ -n "$CI_USAGE" ]; then
+ set +x
fi
TAG="$1" ; shift
+if [ -n "$CI_USAGE" ]; then
+ set -x
+fi
-if [ -n "$1" ]; then
- GITURL="$1" ; shift
+if [ -n "${1+x}" ]; then
+ GITURL="$1" ; shift
fi
OWD="$PWD"
-cd $TEMPDIR
+cd "$TEMPDIR"
-git clone -q --no-checkout --depth 1 --single-branch --branch "$TAG" "$GITURL" dj-clone
+git clone -q --no-checkout --depth 1 --single-branch \
+ --branch "$TAG" "$GITURL" dj-clone
( cd dj-clone && git archive --prefix=domjudge/ --format=tar "$TAG" ) | tar x
@@ -33,12 +47,17 @@ CHLOG="$(grep ^Version ChangeLog | head -n 1)"
# Check for non-release version
if [ "${VERSION%DEV}" != "${VERSION}" ]; then
- echo "WARNING: version string contains 'DEV', should probably be changed!"
+ echo "WARNING: version string contains 'DEV', should probably be changed!"
fi
-CHLOG_VERSION="$(echo $CHLOG | sed -r 's/^Version ([0-9\.]+) .*$/\1/')"
+CHLOG_VERSION="$(echo "$CHLOG" | sed -r 's/^Version ([0-9\.]+) .*$/\1/')"
if [ "$VERSION" != "$CHLOG_VERSION" ]; then
- echo "WARNING: version strings in README* and ChangeLog differ: '$VERSION' != '$CHLOG_VERSION'"
+ echo "WARNING: version strings in README* and ChangeLog differ:"
+ echo "'$VERSION' != '$CHLOG_VERSION'"
+ if [ ! -t 1 && -z ${CI+x} ] ; then
+ # In the cronjob this would be reason to not release
+ exit 1
+ fi
fi
# Add released tag for revision information:
@@ -48,16 +67,26 @@ make QUIET=1 dist
cd ..
-mv domjudge domjudge-$VERSION
+mv domjudge "domjudge-$VERSION"
-tar -cf "domjudge-$VERSION.tar" "domjudge-$VERSION"
-gzip -9 "domjudge-$VERSION.tar"
+tar -cf "domjudge-$TAG.tar" "domjudge-$VERSION"
+gzip -9 "domjudge-$TAG.tar"
cd "$OWD"
-mv $TEMPDIR/domjudge-$VERSION.tar.gz .
+mv "$TEMPDIR/domjudge-$TAG.tar.gz" .
rm -rf "$TEMPDIR"
+sha256sum "domjudge-$TAG.tar.gz" > "domjudge-$TAG.tar.gz.sha256sum"
+
+#GPG_ARGS="-a --detach-sign --digest-algo SHA256 domjudge-$TAG.tar.gz"
+#if [ -t 1 ] ; then
+# # Explicit not quoted!
+# gpg $GPG_ARGS
+#else
+# gpg --pinentry-mode=loopback --batch --passphrase-file ~domjudge/sign_key_pass $GPG_ARGS
+#fi
+
echo "Release file: 'domjudge-$VERSION.tar.gz'"
echo "ChangeLog version: '$CHLOG'"
diff --git a/make_snapshot.sh b/make_snapshot.sh
index d7f244ed..ba11ab62 100755
--- a/make_snapshot.sh
+++ b/make_snapshot.sh
@@ -45,9 +45,9 @@ gzip -9 $DJDIR.tar
if [ -n "$PUBDIR" ]; then
rm -rf $PUBDIR/*
mkdir -p $PUBDIR/manual
- cp -r $DJDIR/doc/manual/build/html/* $PUBDIR/manual/
- cp $DJDIR/doc/team/team-manual.pdf $PUBDIR/
- cp $DJDIR.tar.gz $DJDIR/ChangeLog $PUBDIR/
+ cp -r $DJDIR/doc/manual/build/html/* $PUBDIR/manual/
+ cp $DJDIR/doc/manual/build/team/domjudge-team-manual.pdf $PUBDIR/
+ cp $DJDIR.tar.gz $DJDIR/ChangeLog $PUBDIR/
cd /
fi
diff --git a/new_release_howto.md b/new_release_howto.md
new file mode 100644
index 00000000..309b580b
--- /dev/null
+++ b/new_release_howto.md
@@ -0,0 +1,42 @@
+A new release can be created by one of the main DOMjudge developers.
+The following steps should be taken (local directories refer to those
+on the account `domjudge@vm-domjudge`):
+
+ 1. Test everything. (duh...)
+ 1. Commit the correct version number in the `ChangeLog` and `README` files.
+ 1. Create a release version `$TAG` in Git with `$TAG` the version number
+ x.y.z:
+ git tag -s -m "Tag release version $TAG." $TAG
+ See `git tag --help` for more details on how to tag with(out) a
+ GPG signature.
+ 1. Create the release tarball by running
+ make_release.sh $TAG
+ Optionally add a git-repo-url as second parameter (defaults to
+ `https://github.com/DOMjudge/domjudge.git`) to point it to your local
+ repository, before committing to the central repository.
+
+ The tarball is placed in the current dir; check that it looks correct,
+ test e.g. by unpacking it and running
+ ./configure && make build
+ 1. Don't forget to push everything to the central Git repository
+ (especially the release tags, since these are not pushed by default),
+ e.g. with
+ `git push origin ${TAG%.?} refs/tags/$TAG`
+ 1. On the server the tarball will be rebuild and signed.
+ 1. If releasing from the master branch, create a new version branch:
+ ```{sh}
+ git checkout -b x.y
+ git push --set-upstream origin x.y
+ git checkout master
+ ```
+ 1. Update files above to `{version+1}DEV` and commit.
+ 1. Copy domjudge-$TAG.tar.gz* to `/srv/http/domjudge/releases/`
+ 1. Update the DOMjudge homepage: commit changes in the `domjudge-scripts`
+ repository under `website/` and run `make install` as domjudge@domjudge
+ 1. If this is a new major or minor version, update the release documentation
+ under `/srv/http/domjudge/docs/manual` by adding a new version to the
+ file `versions.json` and updating the redirect destination in `index.html`.
+ The documentation is regenerated once every hour.
+ 1. Bump the docker containers and build Debian packages (or make someone
+ do this).
+ 1. Send an email to `domjudge-announce@domjudge.org`.
diff --git a/new_release_howto.txt b/new_release_howto.txt
deleted file mode 100644
index 817e7d2f..00000000
--- a/new_release_howto.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-A new release can be created by one of the main DOMjudge developers.
-The following steps should be taken (local directories refer to those
-on the account `domjudge@vm-domjudge`):
-
- 1. Test everything. (duh...)
- 1. Commit the correct version number in the `ChangeLog` and `README` files,
- set `DEBUG=0` in `etc/common-config.php` (if releasing from the `master`
- branch).
- 1. Create a release version `$TAG` in Git with `$TAG` the version number
- x.y.z:
- git tag [-a|-s|-u
The DOMjudge API is an implementation of the ICPC
-Contest API
+Contest API
(except that it does not (yet) implement the optional team-members
endpoint). It also has some extensions, see the
internal API documentation.
We also have the +DOMjudge wiki +which collects other pieces of information about specific configurations +or integrations.
+ diff --git a/website/download.shtml b/website/download.shtml index af3aa67a..85613bda 100644 --- a/website/download.shtml +++ b/website/download.shtml @@ -35,13 +35,19 @@ dated . announcements mailing list. +Official Docker images for both the domserver and judgehost are also available. +See the Docker Hub +repository for the DOMserver to get started. +
+There are also Debian GNU/Linux packages +
There are Debian packages available for the amd64 architecture; other architectures might be buildable from the source packages. -The packages work on Stretch and newer, and also on the various versions -of Ubuntu.
+The packages are built and tested on Debian stable, but also on newer versions and the various versions of Ubuntu.To install these packages, add our repository GPG key directly to APT with
@@ -64,13 +70,6 @@ See Docker Hub -repository for the DOMserver to get started. - -Also available are the
diff --git a/website/header.shtml b/website/header.shtml
index 0d16cbc1..29a731af 100644
--- a/website/header.shtml
+++ b/website/header.shtml
@@ -1,6 +1,6 @@
-
@@ -53,8 +53,8 @@
-
+