mkdir -p $(PREFIX)/lib/koakuma/cgi-bin/
mkdir -p $(PREFIX)/bin/
mkdir -p $(PREFIX)/lib/koakuma/db
+ mkdir -p $(PREFIX)/lib/koakuma/db/data
if [ ! -e "$(PREFIX)/lib/koakuma/db/projects.db" ] ; then echo "<projects></projects>" > $(PREFIX)/lib/koakuma/db/projects.db ; fi
cp -rf Component/* $(PREFIX)/lib/koakuma/component/
cp -rf Utility/* $(PREFIX)/lib/koakuma/utility/
chmod +x $(PREFIX)/bin/launch-job
@echo
@echo Make sure $(PREFIX)/lib/koakuma/db is writable by your HTTPd user.
+ @echo Assuming your HTTPd user is www, just run: chmod -R www $(PREFIX)/lib/koakuma/db
+ @echo
@echo By default, Koakuma stock Apache config uses $(PREFIX)/etc/koakuma/passwd
@echo for RPC authentication.
- Tcllib
- tDOM: https://wiki.tcl-lang.org/page/tDOM
- tcl-tls if you want HTTPs for RPC.
+ - TclX
foreach path [glob "@@PREFIX@@/lib/koakuma/utility/*.tcl"] {
source $path
}
-puts -nonewline "Authentication: "
-set status [::rpc::require-auth]
-if { $status == 1 } {
- puts "Required"
- if { ![::rpc::ask-auth] } {
- puts "Authentication failure"
- exit 1
- }
-} elseif { $status < 0 } {
- puts "Got forbidden, cannot continue"
- exit 1
-} else {
- puts "Not required"
-}
+
+::rpc::init
dom createNodeCmd -tagName "name" -jsonType NONE elementNode keyName
dom createNodeCmd -tagName "description" -jsonType NONE elementNode keyDescription
ask_for "Name" name
ask_for "Description" description
ask_for "VCS" vcs
+puts "Example URL for CVS: pserver://anon:@cvs.nishi.boats/cvs/nishi@tewi"
+puts "Example URL for CVS: ssh://anoncvs:anoncvs@cvs.nishi.boats/cvs/nishi@tewi"
ask_for "VCS URL" url
$doc appendFromScript {
lappend result "$body"
return $result
}
+ proc init {} {
+ puts -nonewline "Authentication: "
+ set status [::rpc::require-auth]
+ if { $status == 1 } {
+ puts "Required"
+ if { ![::rpc::ask-auth] } {
+ puts "Authentication failure"
+ exit 1
+ }
+ } elseif { $status < 0 } {
+ puts "Got forbidden, cannot continue"
+ exit 1
+ } else {
+ puts "Not required"
+ }
+ }
}
}
}
write_db "[$xmldoc asXML]"
+ file mkdir "@@PREFIX@@/lib/koakuma/db/data/$projname"
close_projects
}
}
if { "$has_project" != "" } {
add_toc "Description"
tputs "[html_escape "$has_project"]"
+ add_toc "Details"
+ tputs "<table border=\"0\">"
+ tputs " <tr>"
+ tputs " <th>"
+ tputs " Last run"
+ tputs " </th>"
+ tputs " <td>"
+ if { [file exists "@@PREFIX@@/lib/koakuma/db/data/$projname/lastrun"] } {
+ } else {
+ tputs "Was never ran"
+ }
+ tputs " "
+ tputs " </td>"
+ tputs " </tr>"
+ tputs "</table>"
rputs ""
start_html "Project: $projname" 1