diff -r 71503088f51b -r f880f219c566 openpkg/register.8 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/register.8 Tue Jul 31 12:23:42 2012 +0200 @@ -0,0 +1,441 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` +. ds C' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "REGISTER 8" +.TH REGISTER 8 "OpenPKG" "REGISTER(8)" "OpenPKG" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +openpkg register \- OpenPKG Registry Command\-Line Client +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBregister\fR [\-u|\-\-user=] [\-l|\-\-link=] [\fI\-d|\-\-desc=] + [\-m|\-\-mode=fake|post|wipe] [\fI\-a|\-\-args=] + [\fI\-\-plat=] [\fI\-\-orel=] [\fI\-\-uuid=] + [\fI\-\-conf=] [\fI\-\-prep=] [\fI\-\-tran=] + [\fI\-\-util=] [\-\-data=[,...]] + [\fI\-P|\-\-preparation\fR] [\fI\-T|\-\-transaction\fR] + [\fI\-U|\-\-utilization\fR] [\fI\-C|\-\-convenience\fR] + [\fI\-I|\-\-interaction\fR] + [\fI\-v|\-\-verbose\fR] [\fI\-h|\-\-help\fR] +.PP +\&\fBregister\fR \-S|\-\-printstatus +.PP +\&\fBregister\fR \-R|\-\-rewriteurls [\fIurl\fR ...] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBopenpkg register\fR is the Command-Line Client the OpenPKG Registry. It is +used by administrators to register an instance with the OpenPKG Registry for +later association. +.PP +After association, \fBopenpkg register\fR can be used for repetitive +reregistrations which update the heartbeat of the instance on the Registry +server, avoiding premature depature from the database. It is assumed that +every instance will be reregistered daily. Dormant +instances might be discarded from the Registry, revoking their access to +additional resources. +.SH "PRIMARY OPERATIONS" +.IX Header "PRIMARY OPERATIONS" +The following primary operations are available: +.IP "\fB\-h\fR, \fB\-\-help\fR" 4 +.IX Item "-h, --help" +Display brief usage message. +.IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 +.IX Item "-v, --verbose" +Display progress information during data posting. +.IP "\fB\-P\fR, \fB\-\-preparation\fR" 4 +.IX Item "-P, --preparation" +Execute the primary operation \*(L"preparation\*(R". +Creates registry data for one request and dumps it stdout +in \s-1XML\s0 format. That request can be filtered and piped into +the transaction phase or it can be copied and pasted into the +XMLdump \s-1CGI\s0 facility manually. +A copy of the output of the last run is also saved to the \f(CW\*(C`${REGISTRY_PREP}\*(C'\fR file. +.IP "\fB\-T\fR, \fB\-\-transaction\fR" 4 +.IX Item "-T, --transaction" +Execute the primary operation \*(L"transaction\*(R". +Reads registry data with one request from stdin, executes +the transaction and writes registry data with one or more +responses to stdout in \s-1XML\s0 format. +Depending on the mode of operation, the transaction might be an actual +transport to the XMLdump \s-1CGI\s0 facility or a fake activity which complements the +manual preparation. +A copy of the output of the last run is also saved to the \f(CW\*(C`${REGISTRY_TRAN}\*(C'\fR file. +.IP "\fB\-U\fR, \fB\-\-utilization\fR" 4 +.IX Item "-U, --utilization" +Execute the primary operation \*(L"utilization\*(R". +Reads registry data with one response from stdin and updates the local +registry information. +Depending on the mode of operation, the utilization might be an actual +processing of a transaction response or a fake activity which complements the +manual transaction. +Anyway, this step finalizes the registration process and makes the instance +assume it has been properly registered. This status can be printed. \s-1URL\s0 +rewriting is activated. +A copy of the output of the last run is also saved to the \f(CW\*(C`${REGISTRY_UTIL}\*(C'\fR file. +.IP "\fB\-C\fR, \fB\-\-convenience\fR" 4 +.IX Item "-C, --convenience" +Execute the primary operation \*(L"convenience\*(R". +This executes the three primary operations \*(L"preparation\*(R", \*(L"transaction\*(R" and +\&\*(L"utilization\*(R" in that order and pipes data through this chain. +.IP "\fB\-I\fR, \fB\-\-interaction\fR" 4 +.IX Item "-I, --interaction" +Execute the primary operation \*(L"interaction\*(R". +Like \*(L"convenience\*(R" but user is interactively asked for information. This is +the easiest way to do registration but it is not meat to be automated. +.IP "\fB\-S\fR, \fB\-\-printstatus\fR" 4 +.IX Item "-S, --printstatus" +If the instance has been registered, information about the registration is printed in a +format suitable for shell evaluation and return code is true. +Otherwise nothing is printed and return code is false. +.IP "\fB\-R\fR, \fB\-\-rewriteurls\fR [\fIurl\fR ...]" 4 +.IX Item "-R, --rewriteurls [url ...]" +If the instance has been registered, the given URLs are rewritten to prepend +user:pass information before hostnames below the openpkg.(org|net|com) +domains. Note the username is is \s-1UUID_REGISTRY\s0 and the password is the +concatenation of \s-1UUID_INSTANCE\s0 and \s-1UUID_PLATFORM\s0 from the +PREFIX/etc/openpkg/uuid file. Both informations are not meant to be used for +traditional authentication, they are merly statistical information. +Otherwise the URLs are returned verbatim. +.SH "STANDARD OPTIONS" +.IX Header "STANDARD OPTIONS" +Standard options are typically used to automate registration (not +association). +.IP "\fB\-m\fR, \fB\-\-mode\fR fake|post|wipe" 4 +.IX Item "-m, --mode fake|post|wipe" +Overrides \f(CW\*(C`${REGISTRY_MODE}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Has no default and is a manadatory setting. +.Sp +In \fBpost\fR mode, transactions are carried out using real network connectivity. +The \*(L"preparation\*(R" step creates a XMLdump and writes it into the +\&\f(CW\*(C`${REGISTRY_PREP}\*(C'\fR file. The \*(L"transaction\*(R" step posts it to the DropXML form +using a \s-1HTTP\s0 request. The response coming back from Registration server is +also in \s-1XML\s0 format and is saved to \f(CW\*(C`${REGISTRY_TRAN}\*(C'\fR file. The +\&\*(L"utilization\*(R" step processes this response and writes the final results to the +\&\f(CW\*(C`${REGISTRY_UTIL}\*(C'\fR file. +.Sp +In \fBfake\fR mode, no network connectivity takes place. +The \*(L"prepararation\*(R" step creates a XMLdump and writes it into the +\&\f(CW\*(C`${REGISTRY_PREP}\*(C'\fR file. The \*(L"transaction\*(R" step is a fake only. It assumes a +successful response from the Registration server and saves it to +\&\f(CW\*(C`${REGISTRY_TRAN}\*(C'\fR file. The \*(L"utilization\*(R" step processes this response and +writes the final results to the \f(CW\*(C`${REGISTRY_UTIL}\*(C'\fR file. +\&\fINote\fR: fake mode is meant as a way to register instances which cannot or must +not post data directly to the Registration server. +.Sp +In \fBwipe\fR mode, the registration is wiped out locally. The status is reset +and \s-1URL\s0 rewriting is disabled. +\&\fINote\fR: the registration server is not contacted, the instace must be removed +manually using the web interface. +\&\fINote\fR: wiping registration is highly recommended as a precursor action of +cloning activities. +.ie n .IP "\fB\-a\fR, \fB\-\-args\fR ""arg [arg ...]""" 4 +.el .IP "\fB\-a\fR, \fB\-\-args\fR ``arg [arg ...]''" 4 +.IX Item "-a, --args arg [arg ...]" +Overrides \f(CW\*(C`${REGISTRY_ARGS}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Complements the mode and is specific to it. +Defaults to \*(L"http://registry.openpkg.org/register\*(R" which is the official registry of the OpenPKG Project. +This default is useful for \*(L"post\*(R" mode. +.IP "\fB\-u\fR, \fB\-\-user\fR \fIuser|token\fR" 4 +.IX Item "-u, --user user|token" +Overrides \f(CW\*(C`${REGISTRY_USER}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Indicates the registry user which will find this registration in his arrival queue. +The user can also specified as a token which is enabled for use as \*(L"user\*(R". +If the token is also enabled for \*(L"assoc\*(R" the registered instance is immediately associated +to the user with no need for the user to visit the web interface. +This information in submitted via the \*(L"registry_user\*(R" attribute of the \s-1XML\s0 request. +Retrieves default online from http://openpkg.org/go/autoregister and is a manadatory setting. +.IP "\fB\-l\fR, \fB\-\-link\fR \fItoken\fR" 4 +.IX Item "-l, --link token" +Overrides \f(CW\*(C`${REGISTRY_LINK}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Indicates the registry user which will find this registration linked to his token. +The link must be specified as a token which is enabled for use as \*(L"link\*(R". +If a user token is used and the link token is also enabled for \*(L"assoc\*(R" then the registered instance +is immediately associated to the user with no need for the user to visit the web interface. +This information in submitted via the \*(L"registry_link\*(R" attribute of the \s-1XML\s0 request. +Has no default and is an optional setting. +Be aware that linked users see the same information about an instance as the associated user +can find on his \*(L"association\*(R" page but they cannot alter or delete information. +.IP "\fB\-d\fR, \fB\-\-desc\fR \fIdescription\fR" 4 +.IX Item "-d, --desc description" +Overrides \f(CW\*(C`${REGISTRY_DESC}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Indicates a human readable description of the instance. +This information in submitted via the \*(L"registry_desc\*(R" attribute of the \s-1XML\s0 request. +It appears in the \*(L"description\*(R" column on the \*(L"association\*(R" page of the web form and can be edited on the server side. +Defaults to \*(L"openpkg://${\s-1FQDN\s0}${\s-1PREFIX\s0}\*(R" +.SH "ADVANCED OPTIONS" +.IX Header "ADVANCED OPTIONS" +Advanced options can be enganged to tailor and fully automate a registration +(not association). +.IP "\fB\-\-plat\fR" 4 +.IX Item "--plat" +Overrides \f(CW\*(C`${REGISTRY_PLAT}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Indicates the platform. Concatenated information from \s-1CPU\s0 architecture (arch) and Operating System (os). +This information in submitted via the \*(L"registry_plat\*(R" attribute of the \s-1XML\s0 request. +Defaults to \*(L"%{l_platform \-p}\*(R", e.g. \*(L"ix86\-freebsd6.1\*(R" +.IP "\fB\-\-orel\fR" 4 +.IX Item "--orel" +Overrides \f(CW\*(C`${REGISTRY_VERS}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Indicates the OpenPKG release. +This information in submitted via the \*(L"registry_orel\*(R" attribute of the \s-1XML\s0 request. +Defaults to \*(L"%{l_openpkg_release}\*(R", e.g. \*(L"OpenPKG-CURRENT\*(R", \*(L"OpenPKG\-2\-STABLE\*(R", \*(L"OpenPKG\-2.5\*(R", +.IP "\fB\-\-uuid\fR" 4 +.IX Item "--uuid" +Overrides \f(CW\*(C`${REGISTRY_UUID}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Indicates the \s-1UUID\s0 file of the instance. +This information in submitted via the \*(L"uuid_registry\*(R", \*(L"uuid_instance\*(R" and \*(L"uuid_platform\*(R" attributes of the \s-1XML\s0 request. +Defaults to \fI${\s-1PREFIX\s0}/etc/openpkg/uuid\fR +.IP "\fB\-\-conf\fR" 4 +.IX Item "--conf" +Overrides \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR variable from previous \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. Processing +of the current configuration file is aborted immediately with all variables +read so far kept. THe new configuration file is read in immediately and +processing continues there. This works similar to an include but is more +primitive as it does not allow nesting, only chaining. +Defaults to \fI${\s-1PREFIX\s0}/etc/openpkg/register.conf\fR +.IP "\fB\-\-prep\fR" 4 +.IX Item "--prep" +Overrides \f(CW\*(C`${REGISTRY_PREP}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +File to save a copy of the output from the \*(L"preparation\*(R" step. +Defaults to \fI${\s-1PREFIX\s0}/etc/openpkg/register.prep\fR +.IP "\fB\-\-tran\fR" 4 +.IX Item "--tran" +Overrides \f(CW\*(C`${REGISTRY_TRAN}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +File to save a copy of the output from the \*(L"transaction\*(R" step. +Defaults to \fI${\s-1PREFIX\s0}/etc/openpkg/register.tran\fR +.IP "\fB\-\-util\fR" 4 +.IX Item "--util" +Overrides \f(CW\*(C`${REGISTRY_UTIL}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +File to save a copy of the output from the \*(L"utilization\*(R" step. +Defaults to \fI${\s-1PREFIX\s0}/etc/openpkg/register.util\fR +.IP "\fB\-\-data\fR" 4 +.IX Item "--data" +Overrides \f(CW\*(C`${REGISTRY_DATA}\*(C'\fR variable in \f(CW\*(C`${REGISTRY_CONF}\*(C'\fR file. +Comma separated list of tags to prepare. Available tags are \*(L"request\*(R", +\&\*(L"package\*(R" and \*(L"provides\*(R". The \*(L"request\*(R" refers to the whole thing and +is mandatory. The \*(L"package\*(R" includes name-version-release information +for all installed packages and \*(L"provides\*(R" adds more details required to +capture package options. For details see \s-1OPENPKG_PREP\s0 below. +Defaults to \*(L"request,package,provides\*(R" +.SH "FILES" +.IX Header "FILES" +The following files are used by \fBopenpkg register\fR: +.IP "OPENPKG_UUID=\fI${\s-1PREFIX\s0}/etc/openpkg/uuid\fR" 4 +.IX Item "OPENPKG_UUID=${PREFIX}/etc/openpkg/uuid" +.Vb 3 +\& UUID_REGISTRY="..." +\& UUID_INSTANCE="..." +\& UUID_PLATFORM="..." +.Ve +.IP "OPENPKG_CONF=\fI${\s-1PREFIX\s0}/etc/openpkg/register.conf\fR" 4 +.IX Item "OPENPKG_CONF=${PREFIX}/etc/openpkg/register.conf" +Format suitable for shell evaluation. Interactive mode appends remarked date +and current settings for reuse as new defaults for future runs. Can be preset +to customize or automate registration. +.IP "OPENPKG_PREP=\fI${\s-1PREFIX\s0}/etc/openpkg/register.prep\fR" 4 +.IX Item "OPENPKG_PREP=${PREFIX}/etc/openpkg/register.prep" +.Vb 10 +\& +\& +\& +\& +\& +\& +\& +\& +\& +\& +.Ve +.Sp +The \s-1XML\s0 request starts with and +headers followed by a container. The request is inside a +tag. Successful submission into the XMLdump form requires the headers and +exactly one container. It is possible to merge multiple requests into a single +container manually or otherwise and submit them all at once. +.IP "OPENPKG_TRAN=\fI${\s-1PREFIX\s0}/etc/openpkg/register.tran\fR" 4 +.IX Item "OPENPKG_TRAN=${PREFIX}/etc/openpkg/register.tran" +.Vb 7 +\& +\& +\& +\& openpkg://rm0.openpkg.net/openpkg\-dev +\& +.Ve +.Sp +The \s-1XML\s0 response starts with and +headers followed by a container. The response is inside a +tag. The data carried in the tag comes from the \*(L"description\*(R" column on the +\&\*(L"association\*(R" page of the web form and can be edited on the server side. +.IP "OPENPKG_UTIL=\fI${\s-1PREFIX\s0}/etc/openpkg/register.util\fR" 4 +.IX Item "OPENPKG_UTIL=${PREFIX}/etc/openpkg/register.util" +.Vb 3 +\& REGISTRY_DBID="..." +\& REGISTRY_DONE="yes" +\& REGISTRY_RESP="openpkg://foo.example.com/my/openpkg/prefix" +.Ve +.SH "EXAMPLES" +.IX Header "EXAMPLES" +.Vb 10 +\& # su \- openpkg\-mop +\& $ openpkg register \-\-printstatus +\& REGISTRY_DBID="..." +\& REGISTRY_DONE="yes" +\& REGISTRY_RESP="openpkg://foo.example.com/my/openpkg/prefix" +\& $ openpkg register \-\-printstatus >/dev/null && echo "Yup" +\& Yup +\& $ eval \`openpkg register \-\-printstatus\`; echo DONE=$REGISTRY_DONE +\& DONE=yes +\& $ openpkg register \-\-mode=wipe +\& $ openpkg register \-\-printstatus || echo "Nope" +\& Nope +\& $ openpkg register \-\-user=thl@openpkg.net \-\-mode=post +\& REGISTRY_DBID="...." +\& REGISTRY_DONE="yes" +\& REGISTRY_RESP="openpkg://foo.example.com/my/openpkg/prefix" +\& $ openpkg register \-\-printstatus >/dev/null && echo "Yup" +\& Yup +\& $ openpkg register \-\-rewriteurls http://download.openpkg.org/foo/bar +\& ftp://...:...@download.openpkg.org/foo/bar +.Ve +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIbash\fR\|(1), \f(CW\*(C`openpkg man uuid\*(C'\fR, \f(CW\*(C`http://registry.openpkg.org/\*(C'\fR +.SH "AUTHOR" +.IX Header "AUTHOR" +Thomas Lotterer