cScm Configuration Daemon

cScm – is a tool to convert SCM configuration files into binary format and store its in shared memory for reading by cSvn-ui and cGit-ui CGI scripts

2 Commits   0 Branches   1 Tag
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   1) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   2) # [cScm Daemon](https://csvn.radix.pro/cscm/trunk/doc/cscmd.8.md)
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   3) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   4) **cscmd** – a daemon for monitoring changes in SCM configuration files.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   5) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   6) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   7) ## Table of Contents
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   8) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300   9) * [Options](#options)
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  10) * [Grammar](#grammar)
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  11) * [See Also](#see-also)
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  12) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  13) <br/>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  14) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  15) In order to not load the **cSvn-ui** and **cGit-ui** CGI scripts with unnecessary functionality and speed up
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  16) its work, information about the list of repositories is transmitted to it in binary form through
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  17) shared memory (see: */dev/shm/csvn.bcf*, */dev/shm/cgit.bcf*).
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  18) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  19) Binary Config File (**BCF**) format is similar to the simplified implementation of the **COFF**
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  20) and is described in the header file [*/usr/include/cscm/bcf.h*](https://csvn.radix.pro/cscm/trunk/cscm/bcf.h).
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  21) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  22) On startup, the daemon parses the */etc/csvn-ui.rc* or */etc/csvn-ui.rc* configuration files
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  23) (depends on **--scm=[svn|git]** option) and stores its binary forms in shared memory. In addition, the binary
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  24) form is saved in the daemon's home directory, by default it is the file */var/lib/csvn/csvn.bcf* or
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  25) */var/lib/cgit/cgit.bcf*.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  26) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  27) **cscmd(8)** daemon rereads SCM configuration files upon arrival of the **-HUP** signal and, in addition,
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  28) can be configured to monitor changes in the configuration files using the `--inotify` option. If the `--inotify`
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  29) option is specified, then after editing the file */ets/csvn-ui.rc* or */ets/cgit-ui.rc* and saving it to disk,
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  30) the **cscmd** daemon will reread file */etc/csvn-ui.rc* or */etc/cgit-ui.rc* as if it received the **-HUP** signal.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  31) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  32) The work of the **cscmd(8)** daemon's can be monitored by the log, which it leaves in the file
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  33) */var/log/csvnd.log* or the file */var/log/cgitd.log* (depends on **--scm=[svn|git]** option). There you can also
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  34) observe messages about errors that are detected in */ets/csvn-ui.rc* or */ets/cgit-ui.rc* files, if any.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  35) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  36) To start the **cScm** daemon during system boot, can be used the start/stop script */etc/rc.d/rc.csvnd* or
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  37) */etc/rc.d/rc.cgitd*.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  38) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  39) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  40) ## Options
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  41) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  42) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  43) ### -h, --help
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  44) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  45) Display help information.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  46) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  47) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  48) ### -v, --version
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  49) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  50) Display the version of **cScm** daemon.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  51) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  52) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  53) ### -d, --daemonize
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  54) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  55) Run in background as a daemon.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  56) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  57) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  58) ### -i, --inotify
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  59) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  60) Notify about configuration changes. If this option is set then **cscmd(8)** daemon selects changes
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  61) made in */etc/csvn-ui.rc* or */etc/cgit-ui.rc* configuration file and reread configuration when changes
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  62) is done. Without this option rereading configuration file can be done by sending **-HUP** to the **cscmd(8)**
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  63) process.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  64) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  65) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  66) ### -b, --bcf=<BCF_FILE>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  67) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  68) Binary config file (depends on **--scm=[svn|git]** option). Default: */var/lib/csvn/csvn.bcf*.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  69) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  70) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  71) ### -c, --config=<CONFIG_FILE>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  72) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  73) Config file (depends on **--scm=[svn|git]** option). Default: */etc/csvn-ui.rc*.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  74) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  75) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  76) ### -l, --log=<LOG_FILE>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  77) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  78) Log file (depends on **--scm=[svn|git]** option). Default: */var/log/csvnd.log*.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  79) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  80) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  81) ### -p, --pid=<PID_FILE>
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  82) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  83) Log file (depends on **--scm=[svn|git]** option). Default: */var/run/csvnd.pid*.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  84) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  85) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  86) ### -s, --scm=[svn|git]
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  87) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  88) SCM engine name: **svn** or **git**. Default: **svn**.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  89) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  90) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  91) ### -t, --test
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  92) Test the config file and exit.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  93) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  94) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  95) ## Grammar
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  96) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  97) The grammar of the language describing the **cScm** congfiguration is simple
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  98) ([**parse.y**](https://csvn.radix.pro/cscm/trunk/cscmd/parse.y)). File */etc/csvn-ui.rc*
12c7b1c5 (kx 2023-03-24 02:53:04 +0300  99) allows you to set variable values and create repository lists as named structures.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 100) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 101) Any variables can be defined in the */etc/csvn-ui.rc* file, but only variables with
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 102) reserved names will be used by the **cSvn** or **cGit** CGI script.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 103) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 104) In addition, if a variable already defined at the global level is specified in the
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 105) description of a repository, then within this repository this variable will have a local
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 106) value. In other words, within the repository, global variables can be overridden.
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 107) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 108) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 109) ## See Also
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 110) 
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 111) > [**README**](https://csvn.radix.pro/cscm/trunk/README.md)
12c7b1c5 (kx 2023-03-24 02:53:04 +0300 112)