]> Git repositories of Nishi - koakuma.git/commitdiff
stuff
authorNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 00:56:50 +0000 (00:56 +0000)
committerNishi <nishi@nishi.boats>
Wed, 2 Oct 2024 00:56:50 +0000 (00:56 +0000)
git-svn-id: file:///raid/svn-personal/koakuma/trunk@11 219d0f9c-2d94-d447-890a-813e76b88fe9

Makefile
README
Tool/create-project.in
Utility/rpc.tcl
koakuma.cgi.in

index f0c60d5810ddde6528217eaed221aa2ce45aa65c..fb06220f4ee30ddf6a8ca1cb435c89d1491ce75e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ install: Component/* Tool/* Utility/* koakuma.cgi.in apache.conf.in
        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/
@@ -27,5 +28,7 @@ install: Component/* Tool/* Utility/* koakuma.cgi.in apache.conf.in
        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.
diff --git a/README b/README
index e82c27aa5203023bc56d659fb5c836a21e0c7c05..f3323157d0ec951ff89b51f39f56c95a945982ea 100644 (file)
--- a/README
+++ b/README
@@ -4,3 +4,4 @@ Requires:
  - Tcllib
  - tDOM: https://wiki.tcl-lang.org/page/tDOM
  - tcl-tls if you want HTTPs for RPC.
+ - TclX
index 5c6577c9a433251566ce2e5d2b944a77967b0bc8..a464d25d2fa31d803f5f1e32b3a30c2ad95be283 100644 (file)
@@ -14,20 +14,8 @@ foreach arg $argv {
 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
@@ -48,6 +36,8 @@ proc ask_for {show var} {
 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 {
index 5168b6d4c6c77a9ba4c3cd9beeec0546fcef8701..7fff1b82e5a7cc7a7fb8469172e6c1fab77dd62b 100644 (file)
@@ -73,4 +73,20 @@ namespace eval rpc {
                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"
+               }
+       }
 }
index 0f54d99876603b41acc4dc3f4bec6334535a4e62..e7ee481ea59853f8125cf5639b17a01057ba10c3 100644 (file)
@@ -370,6 +370,7 @@ if { [catch {
                                                        }
                                                }
                                                write_db "[$xmldoc asXML]"
+                                               file mkdir "@@PREFIX@@/lib/koakuma/db/data/$projname"
                                                close_projects
                                        }
                                }
@@ -393,6 +394,21 @@ if { [catch {
                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