summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Giniewicz2015-08-12 20:37:05 +0200
committerAndrzej Giniewicz2015-08-12 20:37:05 +0200
commitce19e904a4176f00dd13c350c3c71c10aed46fe7 (patch)
tree5098b5670e139e33d6e86e230b24375e134708b5
parente4edee30940af0f9d95442adf1fa027b5fbbb983 (diff)
downloadaur-ce19e904a4176f00dd13c350c3c71c10aed46fe7.tar.gz
First try at update, still needs some testing
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD31
-rw-r--r--domjudge-submitd.service13
-rw-r--r--domjudge.install18
-rw-r--r--genpass.patch11
-rw-r--r--jsoncpp.patch25
6 files changed, 61 insertions, 63 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 47f0128b2fe6..90209cc527ed 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,32 +1,28 @@
pkgbase = domjudge
pkgdesc = programming contest jury system
- pkgver = 3.4.2
+ pkgver = 5.0.0
pkgrel = 1
url = http://domjudge.sourceforge.net/
install = domjudge.install
arch = i686
arch = x86_64
license = GPL
- license = LGPL
- license = MIT
- license = BSD
makedepends = boost
- makedepends = sharutils
- depends = sudo
- depends = apache
- depends = php
depends = php-apache
depends = mysql
+ depends = texlive-core
+ depends = libcgroup
depends = curl
- depends = libxslt
- source = http://www.domjudge.org/releases/domjudge-3.4.2.tar.gz
- source = domjudge-submitd.service
+ depends = jsoncpp
+ optdepends = phpmyadmin: to access database in an emergency
+ optdepends = ntp: to keep judgehosts clocks in sync
+ optdepends = beep: for notification of errors
+ source = http://www.domjudge.org/releases/domjudge-5.0.0.tar.gz
source = domjudge-judgehostd.service
- source = genpass.patch
- md5sums = 0685323b0067280d9ad6b51396a7d7ec
- md5sums = 669e8f1b19875fae04cb0d6077d4fba2
+ source = jsoncpp.patch
+ md5sums = 0a1b8b3556494eeccb359635a180d68a
md5sums = 93cd5b10fc2636b664f2c17b4f34436f
- md5sums = b5367f9669746ec3804aa4da9ae988ba
+ md5sums = 69e8aef0a5f9394fd0a4f42785d0732e
pkgname = domjudge
diff --git a/PKGBUILD b/PKGBUILD
index 65ef769c9fcf..415f2871417f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,42 @@
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
pkgname=domjudge
-pkgver=3.4.2
+pkgver=5.0.0
pkgrel=1
pkgdesc="programming contest jury system"
arch=('i686' 'x86_64')
url="http://domjudge.sourceforge.net/"
-license=('GPL' 'LGPL' 'MIT' 'BSD')
-depends=('sudo' 'apache' 'php' 'php-apache' 'mysql' 'curl' 'libxslt')
-makedepends=('boost' 'sharutils')
+license=('GPL')
+depends=('php-apache' 'mysql' 'texlive-core' 'libcgroup' 'curl' 'jsoncpp')
+makedepends=('boost')
+optdepends=('phpmyadmin: to access database in an emergency'
+ 'ntp: to keep judgehosts clocks in sync'
+ 'beep: for notification of errors')
install='domjudge.install'
source=(http://www.domjudge.org/releases/domjudge-$pkgver.tar.gz
- domjudge-submitd.service domjudge-judgehostd.service genpass.patch)
-md5sums=('0685323b0067280d9ad6b51396a7d7ec'
- '669e8f1b19875fae04cb0d6077d4fba2'
+ domjudge-judgehostd.service jsoncpp.patch)
+md5sums=('0a1b8b3556494eeccb359635a180d68a'
'93cd5b10fc2636b664f2c17b4f34436f'
- 'b5367f9669746ec3804aa4da9ae988ba')
+ '69e8aef0a5f9394fd0a4f42785d0732e')
build() {
cd "$srcdir"/domjudge-$pkgver
- patch -p0 < ../genpass.patch
- ./configure --enable-fhs --prefix=/usr \
+ patch -p0 < ../jsoncpp.patch
+ ./configure --enable-fhs --enable-cgroups --prefix=/usr \
--sysconfdir=/etc --localstatedir=/var \
--enable-submitclient=http,dolstra \
--with-domjudge-user=root --with-webserver-group=http
- make domserver judgehost
+ make all
}
package() {
cd "$srcdir"/domjudge-$pkgver
- make install-domserver install-judgehost DESTDIR="$pkgdir"/
+ make install-{domserver,judgehost,docs} DESTDIR="$pkgdir"/
rm -rf "$pkgdir"/tmp
- install -D -m 750 "$pkgdir"/etc/domjudge/sudoers-domjudge "$pkgdir"/etc/sudoers.d/domjudge
+ install -D -m 440 "$pkgdir"/etc/domjudge/sudoers-domjudge "$pkgdir"/etc/sudoers.d/domjudge
sed -s "s/^root/domjudge/g" -i "$pkgdir"/etc/sudoers.d/domjudge
- rm "$pkgdir"/etc/domjudge/{htpasswd-jury,sudoers-domjudge,dbpasswords.secret}
- install -D "$srcdir"/domjudge-submitd.service "$pkgdir"/etc/systemd/system/domjudge-submitd.service
+ rm "$pkgdir"/etc/domjudge/{restapi.secret,sudoers-domjudge,dbpasswords.secret}
install -D "$srcdir"/domjudge-judgehostd.service "$pkgdir"/etc/systemd/system/domjudge-judgehostd.service
}
diff --git a/domjudge-submitd.service b/domjudge-submitd.service
deleted file mode 100644
index b73969dbae14..000000000000
--- a/domjudge-submitd.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Domjudge submit daemon
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/submitdaemon
-Restart=on-failure
-KillSignal=SIGINT
-SendSIGKILL=no
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/domjudge.install b/domjudge.install
index a8bff8e7e675..34bc31407e2d 100644
--- a/domjudge.install
+++ b/domjudge.install
@@ -13,9 +13,9 @@ post_install() {
then
/etc/domjudge/gendbpasswords > /etc/domjudge/dbpasswords.secret
fi
- if [ ! -f /etc/domjudge/htpasswd-jury ];
+ if [ ! -f /etc/domjudge/restapi.secret ];
then
- htpasswd -b -c /etc/domjudge/htpasswd-jury domjudge_jury `grep '^dummy:' /etc/domjudge/dbpasswords.secret | cut -d : -f 5`
+ /etc/domjudge/genrestapicredentials > /etc/domjudge/restapi.secret
fi
chown domjudge /var/lib/domjudge/judgings
@@ -27,8 +27,8 @@ post_install() {
chown domjudge:http /var/lib/domjudge/submissions
chmod 0770 /var/lib/domjudge/submissions
- chown domjudge:http /etc/domjudge/{dbpasswords.secret,htpasswd-jury}
- chmod 0640 /etc/domjudge/{dbpasswords.secret,htpasswd-jury}
+ chown domjudge:http /etc/domjudge/{dbpasswords.secret,restapi.secret}
+ chmod 0640 /etc/domjudge/{dbpasswords.secret,restapi.secret}
chown domjudge /etc/domjudge/{domserver-config.php,judgehost-config.php,common-config.php}
@@ -45,14 +45,14 @@ post_upgrade() {
}
post_remove() {
- if getent passwd domjudge >/dev/null; then
- userdel domjudge
- fi
if getent passwd domjudge-run >/dev/null; then
userdel domjudge-run
fi
- if getent group domjudge-run >/dev/null; then
- groupdel domjudge-run
+ if getent passwd domjudge >/dev/null; then
+ userdel domjudge
+ fi
+ if getent group domjudge >/dev/null; then
+ groupdel domjudge
fi
}
diff --git a/genpass.patch b/genpass.patch
deleted file mode 100644
index cac2e718e880..000000000000
--- a/genpass.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- etc/gendbpasswordsorig 2014-02-14 19:41:50.000000000 +0100
-+++ etc/gendbpasswords 2014-02-14 19:42:16.000000000 +0100
-@@ -6,8 +6,6 @@
- # Exit on any error:
- set -e
-
--echo "# Format: 'dummy:<db_host>:<db_name>:<user>:<password>'"
--
- printf "dummy:localhost:domjudge:domjudge:"
- head -c12 /dev/urandom | base64 | head -c16 | tr '/+' 'Aa'
- echo
diff --git a/jsoncpp.patch b/jsoncpp.patch
new file mode 100644
index 000000000000..2cdd754c1b42
--- /dev/null
+++ b/jsoncpp.patch
@@ -0,0 +1,25 @@
+--- configure.orig 2015-08-12 20:07:13.946754173 +0200
++++ configure 2015-08-12 20:07:28.439986151 +0200
+@@ -6442,9 +6442,9 @@
+
+
+
+-for ac_header in jsoncpp/json/json.h
++for ac_header in json/json.h
+ do :
+- ac_fn_cxx_check_header_mongrel "$LINENO" "jsoncpp/json/json.h" "ac_cv_header_jsoncpp_json_json_h" "$ac_includes_default"
++ ac_fn_cxx_check_header_mongrel "$LINENO" "json/json.h" "ac_cv_header_jsoncpp_json_json_h" "$ac_includes_default"
+ if test "x$ac_cv_header_jsoncpp_json_json_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_JSONCPP_JSON_JSON_H 1
+--- submit/submit.cc.orig 2015-08-12 20:28:45.377704085 +0200
++++ submit/submit.cc 2015-08-12 20:28:56.307629469 +0200
+@@ -27,7 +27,7 @@
+ #include <termios.h>
+ #include <curl/curl.h>
+ #include <curl/easy.h>
+-#include <jsoncpp/json/json.h>
++#include <json/json.h>
+ #ifdef HAVE_MAGIC_H
+ #include <magic.h>
+ #endif