]> mj.ucw.cz Git - eval.git/commitdiff
Install the configuration file of submitd at the right location.
authorMartin Mares <mj@ucw.cz>
Thu, 15 May 2008 10:37:16 +0000 (12:37 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 15 May 2008 10:37:16 +0000 (12:37 +0200)
Makefile
TODO
submit/Makefile
submit/config [deleted file]
submit/submitd.c
submit/submitd.cf [new file with mode: 0644]

index e183f4c8be3b89bb2f60ba4320091b3ea1bec947..226437e9869a679280442dff27583c17a39e1bb0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 VERSION=1.0.99-20080220
 
 # The default target
-all: runtree programs datafiles
+all: runtree programs datafiles configs
 
 # Include configuration
 s=.
diff --git a/TODO b/TODO
index f709cdfe8768aec8806685395978d86b1c1b903c..ec8d4473590f0cc48f0ac3e1b523b6f3690b7f10 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,6 @@
+New directory layout
+~~~~~~~~~~~~~~~~~~~~
+public/ is broken
 Convert md5crypt to use MD5 from libucw
 
 Evaluator
index fe9f0bd43f8a1699a75f7ec8a18bdcf5757d99e0..9e7e0a6f8cc8a9bac374271a9cd170f8d07c4dcc 100644 (file)
@@ -26,6 +26,9 @@ $(SDIR)/privkey: $(SDIR)/privkey.o $(LIBUCW)
 $(SDIR)/privkey: CFLAGS+=$(TLSCF) $(GCRCF)
 $(SDIR)/privkey: LIBS+=$(TLSLF)
 
+CONFIGS+=submitd
+run/cf/submitd: $(SDIR)/submitd.cf
+
 ### Submitter perl module ###
 
 EXTRA_RUNDIRS+=lib/perl5/MO
diff --git a/submit/config b/submit/config
deleted file mode 100644 (file)
index 85d2669..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-# Configuration file for the submit server
-
-SubmitD {
-
-# Log file (optional)
-LogFile                        log/submitd
-
-# Port number
-Port                   8888
-
-# Maximum number of connections allowed
-MaxConn                        60
-
-# Time in seconds after which inactive connections are closed (0=none)
-SessionTimeout         300
-
-# Maximum size of a request
-MaxRequestSize         4K
-
-# Maximum size of an attachment (i.e., a submitted solution)
-# This is a default, which can be overriden in task definitions.
-MaxAttachSize          256K
-
-# Maximum number of versions of a single task part a contestant is allowed
-# to submit (0=unlimited)
-MaxVersions            50
-
-# Number of bits for the Diffie-Hellman key exchange
-DHBits                 1024
-
-# Certificate of our internal CA which is used to validate all contestants
-CACert                 certs/ca-cert.pem
-
-# The certificate (issued by our CA) and secret key for this server
-ServerCert             certs/server-cert.pem
-ServerKey              certs/server-key.pem
-
-# Keep history of all submitted files in files of a given name prefix
-# (formatted by strftime; default: no history kept)
-History                        history/%H%M%S-
-
-# Rules for accepting connections (first matching rule is used)
-Access {
-       # IP address ranges matched by this rule
-       IP              127.0.0.1
-
-       # Administrator access allowed (does not do anything yet)
-       Admin           1
-
-       # Plain-text connections without any user authentication allowed
-       PlainText       0
-
-       # Maximum number of connections per IP address allowed
-       MaxConn         16
-}
-
-Access {
-       IP              195.113.18.125
-       IP              10.10.8.0/24
-       Admin           0
-       PlainText       0
-       MaxConn         2
-}
-
-# Trace TLS parameters
-TraceTLS               1
-
-# Trace command and their results
-TraceCommands          2
-
-}
-
-# Competition tasks
-
-Tasks {
-#      Task plans
-       Task { Name world; OpenData 10; MaxSize 1M; }
-
-       Task            asteroids
-       Task            cards
-       Task            lines
-
-       Extension       c cpp pas
-       OpenDataExt     out
-}
-
-# Library configuration
-
-# Need to put temporary files locally to make sure they are on the same device
-# as the submission directories, so that we can rename the files to their final
-# locations.
-Tempfiles.Prefix       tmp/temp
index 6baf999027d07e93cf50215d0969f60d94a64b5a..d062815b46cd6ab8014ab6f4396c6b5b97e63732 100644 (file)
@@ -538,7 +538,7 @@ reject2: ;
 int main(int argc, char **argv)
 {
   setproctitle_init(argc, argv);
-  cf_def_file = "submit/config";
+  cf_def_file = "cf/submitd";
   cf_declare_section("SubmitD", &submitd_conf, 0);
   cf_declare_section("Tasks", &tasks_conf, 0);
 
diff --git a/submit/submitd.cf b/submit/submitd.cf
new file mode 100644 (file)
index 0000000..778b208
--- /dev/null
@@ -0,0 +1,94 @@
+# Configuration file for the submit server
+
+include cf/library
+
+SubmitD {
+
+# Log file (optional)
+LogFile                        log/submitd
+
+# Port number
+Port                   8888
+
+# Maximum number of connections allowed
+MaxConn                        60
+
+# Time in seconds after which inactive connections are closed (0=none)
+SessionTimeout         300
+
+# Maximum size of a request
+MaxRequestSize         4K
+
+# Maximum size of an attachment (i.e., a submitted solution)
+# This is a default, which can be overriden in task definitions.
+MaxAttachSize          256K
+
+# Maximum number of versions of a single task part a contestant is allowed
+# to submit (0=unlimited)
+MaxVersions            50
+
+# Number of bits for the Diffie-Hellman key exchange
+DHBits                 1024
+
+# Certificate of our internal CA which is used to validate all contestants
+CACert                 certs/ca-cert.pem
+
+# The certificate (issued by our CA) and secret key for this server
+ServerCert             certs/server-cert.pem
+ServerKey              certs/server-key.pem
+
+# Keep history of all submitted files in files of a given name prefix
+# (formatted by strftime; default: no history kept)
+History                        history/%H%M%S-
+
+# Rules for accepting connections (first matching rule is used)
+Access {
+       # IP address ranges matched by this rule
+       IP              127.0.0.1
+
+       # Administrator access allowed (does not do anything yet)
+       Admin           1
+
+       # Plain-text connections without any user authentication allowed
+       PlainText       0
+
+       # Maximum number of connections per IP address allowed
+       MaxConn         16
+}
+
+Access {
+       IP              195.113.18.125
+       IP              10.10.8.0/24
+       Admin           0
+       PlainText       0
+       MaxConn         2
+}
+
+# Trace TLS parameters
+TraceTLS               1
+
+# Trace command and their results
+TraceCommands          2
+
+}
+
+# Competition tasks
+
+Tasks {
+#      Task plans
+       Task { Name world; OpenData 10; MaxSize 1M; }
+
+       Task            asteroids
+       Task            cards
+       Task            lines
+
+       Extension       c cpp pas
+       OpenDataExt     out
+}
+
+# Library configuration
+
+# Need to put temporary files locally to make sure they are on the same device
+# as the submission directories, so that we can rename the files to their final
+# locations.
+Tempfiles.Prefix       tmp/temp