diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-07 19:14:01 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-10 17:04:39 +0300 |
commit | 026377d0c145277b24b3af5fdcf707222e854bd3 (patch) | |
tree | 7ebfc0f7d3e92c8a0d23ac2d9d176a08ea509407 /mod/options.cli | |
parent | 2aa02defe392a209fe9f11231c82d607813389b9 (diff) |
Spec submit logic
Diffstat (limited to 'mod/options.cli')
-rw-r--r-- | mod/options.cli | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/mod/options.cli b/mod/options.cli index 7fff334..e6b0840 100644 --- a/mod/options.cli +++ b/mod/options.cli @@ -388,6 +388,78 @@ namespace brep } }; + class submit: page, module + { + dir_path submit-data + { + "<dir>", + "The directory to save final submission data to. If unspecified, the + package submission functionality will be disabled. If specified, + then \cb{submit-temp} must be specified as well. See \l{brep The + \cb{build2} Repository Interface Manual} for more information on + package submission. + + Note that the directory path must be absolute and the directory + itself must exist and have read, write, and execute permissions + granted to the user that runs the web server." + } + + dir_path submit-temp + { + "<dir>", + "The directory to save temporary submission data to. Must be specified + if the package submission functionality is enabled. + + Note that this directory must be on the same filesystem and satisfy + the same requirements as \cb{submit-data}. Its contents are + automatically cleaned up on each web server startup." + } + + size_t submit-max-size = 10485760 + { + "<bytes>", + "The maximum size of the submission data accepted. Note that currently + the entire submission request is read into memory. The default is + 10M." + } + + path submit-form + { + "<file>", + "The package submission form fragment. If specified, then its contents + are treated as an XHTML5 fragment that is inserted into the <body> + element of the submission page. If unspecified, then no submission + page will be displayed. Note that the file path must be absolute." + } + + string submit-email + { + "<email>", + "The package submission email. If specified, the submission request + and result manifests will be sent to this address. See \l{brep The + \cb{build2} Repository Interface Manual} for more information." + } + + path submit-handler + { + "<path>", + "The handler program to be executed on package submission. The handler + is executed as part of the submission request and is passed additional + arguments that can be specified with \cb{submit-handler-argument} + followed by the absolute path to the submission directory. See + \l{brep The \cb{build2} Repository Interface Manual} for more + information. Note that the program path must be absolute." + } + + strings submit-handler-argument + { + "<arg>", + "Additional arguments to be passed to the submission handler program + (see \cb{submit-handler} for details). Repeat this option to specify + multiple arguments." + } + }; + class repository_root: module { }; @@ -536,5 +608,26 @@ namespace brep // string result | rs = "*"; }; + + // Parameters must either be all present (actual submission) or absent + // (submission form request). + // + // Note also that besides these parameters there can be others. We don't + // recognize their semantics and just save them to the submission request + // manifest. + // + class submit + { + // Package archive file name. Must be <input type="file"/>. + // + // Note that it can potentially be not just a name but a file path and + // in the client's form (e.g., Windows). + // + string archive; + + // Package archive file SHA256 checksum. + // + string sha256sum; + }; } } |