# HG changeset patch # User David Demelier # Date 1625045634 -7200 # Node ID 67348ec46425a15c10c861047e13f19d0da338b8 # Parent be3ec0e6bb8fed21e20f062b033c3c6c4851378a man: add manual pages diff -r be3ec0e6bb8f -r 67348ec46425 .hgignore --- a/.hgignore Tue Jun 29 21:24:16 2021 +0200 +++ b/.hgignore Wed Jun 30 11:33:54 2021 +0200 @@ -5,6 +5,9 @@ \.o$ ^sql/.*\.h$ +# generated manpages. +^man/.*\.[1-9]$ + # vim/emacs specific. ^tags$ ^tags.lock$ diff -r be3ec0e6bb8f -r 67348ec46425 Makefile --- a/Makefile Tue Jun 29 21:24:16 2021 +0200 +++ b/Makefile Wed Jun 30 11:33:54 2021 +0200 @@ -63,6 +63,12 @@ SCIWEBD_OBJS= ${SCIWEBD_SRCS:.c=.o} SCIWEBD_DEPS= ${SCIWEBD_SRCS:.c=.d} +MAN7= man/sci.7 +MAN8= man/scictl.8 \ + man/scid.8 \ + man/sciwebd.8 \ + man/sciworkerd.8 + TESTS= tests/test-db.c TESTS_OBJS= ${TESTS:.c=} TESTS_DEPS= ${TESTS:.c=.d} @@ -90,10 +96,11 @@ DEFS= -DVARDIR=\"${VARDIR}\" \ -DTMPDIR=\"${TMPDIR}\" + .SUFFIXES: -.SUFFIXES: .c .o .sql .h +.SUFFIXES: .c .o .sql .h .in -all: scid scictl sciwebd sciworkerd +all: scid scictl sciwebd sciworkerd ${MAN7} ${MAN8} # for unit tests. .c: @@ -104,6 +111,10 @@ ${CC} ${INCS} ${DEFS} ${LIBBSD_INCS} ${KCGI_INCS} ${JANSSON_INCS} \ ${CFLAGS} -MMD -c $< -o $@ +.in: + sed -e "s,@VARDIR@,${VARDIR},g" \ + -e "s,@SHAREDIR@,${SHAREDIR},g" < $< > $@ + .sql.h: ./bcc -sc0 $< $< > $@ @@ -146,8 +157,16 @@ ${CC} ${CFLAGS} -o $@ ${SCIWEBD_OBJS} libsci.a ${LIBBSD_LIBS} \ ${KCGI_LIBS} ${JANSSON_LIBS} ${LDFLAGS} +install: + mkdir -p ${DESTDIR}${BINDIR} + cp scid scictl sciwebd sciworkerd ${DESTDIR}${BINDIR} + mkdir -p ${DESTDIR}${MANDIR}/man7 + cp ${MAN7} ${DESTDIR}${MANDIR}/man7 + mkdir -p ${DESTDIR}${MANDIR}/man8 + cp ${MAN8} ${DESTDIR}${MANDIR}/man8 + clean: - rm -f bcc config.h tags cscope.out + rm -f bcc config.h tags cscope.out ${MAN7} ${MAN8} rm -f libsci.a ${LIBSCI_OBJS} ${LIBSCI_DATA} ${LIBSCI_DEPS} rm -f scid ${SCID_OBJS} ${SCID_DEPS} rm -f scictl ${SCICTL_OBJS} ${SCICTL_DEPS} @@ -160,4 +179,4 @@ tests: ${TESTS_OBJS} for t in ${TESTS_OBJS}; do $$t -v; done -.PHONY: all clean tests +.PHONY: all clean install tests diff -r be3ec0e6bb8f -r 67348ec46425 config.mk --- a/config.mk Tue Jun 29 21:24:16 2021 +0200 +++ b/config.mk Wed Jun 30 11:33:54 2021 +0200 @@ -4,5 +4,8 @@ #LDFLAGS= -fsanitize=address,undefined PREFIX= /usr/local +BINDIR= ${PREFIX}/bin +MANDIR= ${PREFIX}/share/man +SHAREDIR= ${PREFIX}/share +TMPDIR= ${PREFIX}/tmp VARDIR= ${PREFIX}/var -TMPDIR= /tmp diff -r be3ec0e6bb8f -r 67348ec46425 man/sci.7.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/sci.7.in Wed Jun 30 11:33:54 2021 +0200 @@ -0,0 +1,113 @@ +.\" +.\" Copyright (c) 2021 David Demelier +.\" +.\" Permission to use, copy, modify, and/or distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd June 30, 2021 +.Dt SCI 7 +.Os +.\" NAME +.Sh NAME +.Nm sci +.Nd simple continuous integration framework +.\" DESCRIPTION +.Sh DESCRIPTION +The +.Nm +framework is a set of utilities to run automated tasks similarly to alternatives +such as jenkins or buildbot. +.Pp +In contrast to those, +.Nm sci +does not know how to build project nor how to retrieve information when to build +them. It only works by user user project script to be executed upon addition of +jobs. +.Pp +It is designed in mind to be as simple as possible to improve flexibility and +simple documentation. +.\" OVERVIEW +.Sh OVERVIEW +The +.Nm +framework is split into four individual programs that are used independently. +The communication workflow is: +.Bd -literal +scid <-- (UNIX socket) --> scictl + ^-- (UNIX socket) --> sciwebd <-- (HTTP with JSON) --> sciworkerd +.Ed +.Pp +The +.Nm scid +daemon is the unique access to the SQLite database and simply take requests over +a UNIX socket to retrieve and set results into it. +.Pp +The +.Nm scictl +is the administrative utility to update the database using a command line +interface. It can also be used to create jobs and their result manually if +wanted. +.Pp +The +.Nm sciwebd +is a CGI/FastCGI utility daemon that parse HTTP requests and dispatch them to +.Nm scid +using a JSON API. As it is written using CGI it does not involve SSL nor +authentication and must be done using a HTTP web server proxy if needed. +.Pp +The +.Nm sciworkerd +is a daemon executing jobs on a host machine. It access the jobs listing by +querying +.Nm sciwebd +and output their result. By this way, it can run on remotes machine while both +.Nm scid +and +.Nm sciwebd +can run on a different machine. +.\" ENTITIES +.Sh ENTITIES +The process handle different kind of entities in the database. +.\" PROJECTS +.Ss PROJECTS +A project is an user description of what to be automated and tested. It has a +name, description, project URL and a script to execute. They can be created +using the +.Cm project-add +command from +.Nm scictl . +.\" JOBS +.Ss JOBS +Jobs are tasks to be performed by any worker for a given project. It has an user +arbitrary tag that will be passed to the project script as sole argument. In +contrats to many CI system, the sci framework has no information about how to +build and access a project and as such the job tag can be anything up to the +user (a SCM repo revision, date, simple id, etc). +.\" WORKERS +.Ss WORKERS +A worker is a host system that connects to +.Nm sciwebd +using HTTP protocol to get acces to jobs to perform, execute them and finally +send the result back. They have been designed to use HTTP to allow remote usage. +.\" JOB RESULTS +.Ss JOB RESULTS +A job result is the detail about a job ran by a worker for a specific project. +If a job exists for one project and there are four workers on the user +installation, there will be four job results. It has an exit code (got from the +user script), a log console (capture from standard output and error) and a +timestamp when it was started. +.\" SEE ALSO +.Sh SEE ALSO +.Xr scid 8 , +.Xr scictl 8 , +.Xr sciwebd 8 , +.Xr sciworkerd 8 diff -r be3ec0e6bb8f -r 67348ec46425 man/scictl.8.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/scictl.8.in Wed Jun 30 11:33:54 2021 +0200 @@ -0,0 +1,182 @@ +.\" +.\" Copyright (c) 2021 David Demelier +.\" +.\" Permission to use, copy, modify, and/or distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd June 30, 2021 +.Dt SCICTL 8 +.Os +.\" NAME +.Sh NAME +.Nm scictl +.Nd command line client to scid +.\" SYNOPSIS +.Sh SYNOPSIS +.\" job-add +.Nm +.Cm job-add +.Ar project +.Ar tag +.\" job-todo +.Nm +.Cm job-todo +.Ar worker +.\" jobresult-add +.Nm +.Cm jobresult-add +.Ar jobid +.Ar worker +.Ar exitcode +.Ar console +.\" project-add +.Nm +.Cm project-add +.Ar name +.Ar desc +.Ar url +.Ar script +.\" project-info +.Nm +.Cm project-info +.Ar name +.\" project-list +.Nm +.Cm project-list +.\" project-update +.Nm +.Cm project-update +.Ar name +.Ar key +.Ar value +.\" worker-add +.Nm +.Cm worker-add +.Ar name +.Ar desc +.\" worker-list +.Nm +.Cm worker-list +.\" DESCRIPTION +.Sh DESCRIPTION +The +.Nm +utility is a command line client that connects to +.Xr scid 8 +daemon. It is best used in conjunction with automated programs (such as cron) +and SCM integration to add new jobs to execute. It is also used as +administrative utility to create projects and workers. +.Pp +It is part of the +.Xr sci 7 +continuous integration framework. +.Pp +The following options are available +.Em before +the command name: +.Bl -tag +.It Fl s Ar path +Connect to the UNIX local socket specified by +.Ar path . +.El +.\" COMMANDS +.Sh COMMANDS +All commands are designed to return a human readable format but is guaranteed to +stay compatible across new versions. It can be used in scripts as well. +.Bl -tag -width project-update +.\" job-add +.It Cm job-add +Create a new job for the given +.Ar project +using the user arbitrary +.Ar tag +identifier. +.\" job-todo +.It Cm job-todo +List jobs that must be performed by the given +.Ar worker . +Jobs that were created earlier than the worker will not be listed to avoid +evaluating a possible high number of jobs. +.\" jobresult-add +.It Cm jobresult-add +Add a job result manually for the job id specified by +.Ar jobid +that was executed by the given +.Ar worker +The +.Ar exitcode +argument should be the project script exit status. The +.Ar console +argument should point to a file with the script's standard output and error. If +specified to +.Dq - +the standard input is read instead. +.\" project-add +.It Cm project-add +Create a new project with +.Ar name , +an user description set with +.Ar desc , +a website arbitrary +.Ar url , +and a script code to execute specified by file +.Ar script . +If the +.Ar script +argument is set to +.Dq - +the standard input is read instead. +.\" project-info +.It Cm project-info +Get the detailed information, including the script code from +.Ar project . +.\" project-list +.It Cm project-list +List all projects, excluding the script code. +.\" project-update +.It Cm project-update +Update an existing +.Ar project +by setting its new fields. The +.Ar key +argument should be one of the argument specified in the +.Cm project-add +command. For example, to update the description of a project one should +specify +.Dq desc +as +.Ar name +argument and a new description as +.Ar key . +.Pp +Example: +.Bd -literal -offset indent +scictl project-update example desc "New description" +.Ed +.\" worker-add +.It Cm worker-add +Create a new worker with +.Ar name +user identifier and an arbirary +.Ar desc +description. +.\" worker-list +.It Cm worker-list +List all workers present on the system. It does not indicate if those workers +are actually running. +.El +.\" SEE ALSO +.Sh SEE ALSO +.Xr sci 7 , +.Xr scid 8 , +.Xr sciwebd 8 , +.Xr sciworkerd 8 diff -r be3ec0e6bb8f -r 67348ec46425 man/scid.8.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/scid.8.in Wed Jun 30 11:33:54 2021 +0200 @@ -0,0 +1,59 @@ +.\" +.\" Copyright (c) 2021 David Demelier +.\" +.\" Permission to use, copy, modify, and/or distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd June 30, 2021 +.Dt SCID 8 +.Os +.\" NAME +.Sh NAME +.Nm scid +.Nd main sci controller daemon +.\" SYNOPSIS +.Sh SYNOPSIS +.Nm +.Op Fl d Ar database-file +.Op Fl s Ar socket-file +.\" DESCRIPTION +.Sh DESCRIPTION +The +.Nm +program is the main controller daemon responsible of the database access. It +opens it, creates if does not exist and then update its content. +.Pp +It is part of the +.Xr sci 7 +continuous integration framework. +.Pp +It also opens a UNIX socket connection on +.Pa @VARDIR@/run/sci.sock +by default unless option +.Fl s +has been specified, it will opens it on +.Ar database-file +argument. +.Pp +Clients connect to +.Nm +and make requests to create, update or list projects, workers and jobs. This can +either be done using +.Nm scictl +utility or the HTTP interface using +.Nm sciwebd . +.\" SEE ALSO +.Sh SEE ALSO +.Xr sci 7 , +.Xr scictl 8 , +.Xr sciwebd 8 , +.Xr sciworkerd 8 diff -r be3ec0e6bb8f -r 67348ec46425 man/sciwebd.8.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/sciwebd.8.in Wed Jun 30 11:33:54 2021 +0200 @@ -0,0 +1,151 @@ +.\" +.\" Copyright (c) 2021 David Demelier +.\" +.\" Permission to use, copy, modify, and/or distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd June 30, 2021 +.Dt SCIWEBD 8 +.Os +.\" NAME +.Sh NAME +.Nm sciwebd +.Nd CGI/FastCGI interface for sci +.\" SYNOPSIS +.Sh SYNOPSIS +.Nm +.Op Fl f +.Op Fl s Ar socket-file +.Op Fl t Ar theme +.\" DESCRIPTION +.Sh DESCRIPTION +The +.Nm +daemon is a +.Xr kcgi 3 +based application to expose an HTTP interface for user statistics and a JSON API +for +.Xr sciworkerd 8 +daemons. It requires a HTTP server running as proxy to handle +requests into it. See below for example of configuration. +.Pp +It is part of the +.Xr sci 7 +continuous integration framework. +.Pp +The following options are available: +.Bl -tag -width "-s path" +.It Fl f +Runs as a FastCGI daemon. +.It Fl s Ar path +Connect to the UNIX local socket specified by +.Ar path . +.It Fl t Ar theme +Use +.Ar theme +as directory path for HTML pages. +.El +.\" CONFIGURATION +.Sh CONFIGURATION +The recommended way to use +.Nm +is to deploy using FastCGI. You can use the +.Xr kfcgi 8 +helper to spawn the process for you. +.Pp +Example: +.Bd -literal -offset Ds +kfcgi -p /var/www/sci -- scid -f -d sci.db -t siimple +.Ed +.Pp +Note: kfcgi chroot to the directory given, you must either statically link +scid at build time or deploy all required libraries. Also, themes directory +will need to be available in the chroot directory. In the above example, this +will effectively create a database +.Pa /var/www/sci/sci.db +and use the theme +.Pa /var/www/sci/siimple . +.Pp +Then, simply copy the desired theme into the directory. +.Bd -literal -offset Ds +cp -R @SHAREDIR@/sci/themes/siimple /var/www/sci +.Ed +.Pp +As an +.Em insecure +alternative, you can chroot to +.Pa / +to avoid static-linking and copying themes, using: +.Bd -literal -offset Ds +kfcgi -p / -- scid -f \e + -d /var/www/sci/sci.db \e + -t @SHAREDIR@/sci/themes/siimple +.Ed +.Pp +Both kfcgi invocations will create +.Pa /var/www/run/http.sock +with current user and group. Configure the web server to talk to that socket +and make sure it has appropriate file permissions otherwise see +.Fl u +option in +.Nm kfcgi . +See also the +.Xr kfcgi 8 +manual for more information. +.Pp +Next, configure the web server. +.Pp +Warning: at this moment, +.Nm +requires its own virtual host and can +.Em not +use a url. +.\" Server: nginx +.Ss Server: nginx +The nginx web server requires several parameters to run +.Nm . +.Bd -literal +server { + server_name sci.example.org; + listen 80; + + location / { + fastcgi_param QUERY_STRING query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + fastcgi_param PATH_INFO $document_uri; + fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; + fastcgi_param REQUEST_URI $request_uri; + fastcgi_param DOCUMENT_URI $document_uri; + fastcgi_param DOCUMENT_ROOT $document_root; + fastcgi_param SERVER_PROTOCOL $server_protocol; + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + fastcgi_param REMOTE_ADDR $remote_addr; + fastcgi_param REMOTE_PORT $remote_port; + fastcgi_param SERVER_ADDR $server_addr; + fastcgi_param SERVER_PORT $server_port; + fastcgi_param SERVER_NAME $server_name; + fastcgi_param HTTPS $https; + fastcgi_pass unix:/var/www/run/httpd.sock; + } +} +.Ed +.\" SEE ALSO +.Sh SEE ALSO +.Xr sci 7 , +.Xr scictl 8 , +.Xr scid 8 , +.Xr sciworkerd 8 diff -r be3ec0e6bb8f -r 67348ec46425 man/sciworkerd.8.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/sciworkerd.8.in Wed Jun 30 11:33:54 2021 +0200 @@ -0,0 +1,72 @@ +.\" +.\" Copyright (c) 2021 David Demelier +.\" +.\" Permission to use, copy, modify, and/or distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd June 30, 2021 +.Dt SCIWORKERD 8 +.Os +.\" NAME +.Sh NAME +.Nm sciworkerd +.Nd sci worker daemon +.\" SYNOPSIS +.Sh SYNOPSIS +.Nm +.Op Fl m Ar maxbuilds +.Op Fl u Ar url +.Op Fl w Ar workername +.\" DESCRIPTION +.Sh DESCRIPTION +The +.Nm +daemon waits indefinitely for jobs to execute and send back their result. It +requires an access to +.Xr sciwebd 8 +running and transitively a +.Xr scid 8 +daemon running as well. +.Pp +It is part of the +.Xr sci 7 +continuous integration framework. +.Pp +The following options are available: +.Bl -tag +.It Fl m +Set the maximum number of parallel builds allowed to +.Ar maxbuilds . +Defaults: 4. +.It Fl u +Set the +.Ar url +for connecting to +.Xr sciwebd 8 . +You can specify a scheme using +.Dq http:// +or +.Dq https:// . +Default: +.Dq localhost . +.It Fl w +Specify which worker this daemon should refer to using +.Ar worker +as worker name. Default: +.Dq default +.El +.\" SEE ALSO +.Sh SEE ALSO +.Xr sci 7 , +.Xr scictl 8 , +.Xr scid 8 , +.Xr sciwebd 8 , diff -r be3ec0e6bb8f -r 67348ec46425 scictl.c --- a/scictl.c Tue Jun 29 21:24:16 2021 +0200 +++ b/scictl.c Wed Jun 30 11:33:54 2021 +0200 @@ -24,8 +24,9 @@ fprintf(stderr, " %s job-todo worker\n", getprogname()); fprintf(stderr, " %s jobresult-add id worker exitcode console\n", getprogname()); fprintf(stderr, " %s project-add name desc url script\n", getprogname()); + fprintf(stderr, " %s project-info name\n", getprogname()); + fprintf(stderr, " %s project-list\n", getprogname()); fprintf(stderr, " %s project-update name key value\n", getprogname()); - fprintf(stderr, " %s project-list\n", getprogname()); fprintf(stderr, " %s worker-add name desc\n", getprogname()); fprintf(stderr, " %s worker-list\n", getprogname()); exit(0); @@ -207,7 +208,7 @@ } static struct req -cmd_project_find(int argc, char **argv) +cmd_project_info(int argc, char **argv) { struct project project = {0}; struct req req; @@ -300,7 +301,7 @@ { "job-todo", cmd_job_todo }, { "jobresult-add", cmd_jobresult_add }, { "project-add", cmd_project_add }, - { "project-find", cmd_project_find }, + { "project-info", cmd_project_info }, { "project-list", cmd_project_list }, { "project-update", cmd_project_update }, { "worker-add", cmd_worker_add },