diff -r 71503088f51b -r f880f219c566 openpkg/stack.pod --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/stack.pod Tue Jul 31 12:23:42 2012 +0200 @@ -0,0 +1,341 @@ +## +## OpenPKG Software Stack Generation Utility +## Copyright (c) 2012 OpenPKG GmbH +## +## This software is property of the OpenPKG GmbH, DE MUC HRB 160208. +## All rights reserved. Licenses which grant limited permission to use, +## copy, modify and distribute this software are available from the +## OpenPKG GmbH. +## +## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +=pod + +=head1 NAME + +B - B + +=head1 SYNOPSIS + +B +[B<-h>|B<--help>] +[B<-v>|B<--verbose> I] +[B<-o>|B<--output> I] +[B<-D>|B<--define> I=I ...] +[B<-u>|B<--unversioned>] +[B<-q>|B<--query>] +F.stk> + +=head1 DESCRIPTION + +The B command reads a OpenPKG software stack definition +F.stk>, generates a OpenPKG software stack deployment script +F[-I-I].sh>, determines, downloads and +stores all required corresponding OpenPKG source packages under +F[-I-I].src.d/*.src.{sh,rpm}>. + +On executing the generated OpenPKG software stack deployment +script F[-I-I].sh>, an OpenPKG +instance is created (or reused if existing), all packages +built and installed in topologically correct dependency order +and the resulting OpenPKG binary packages stored as +F[-I-I].I-I.d/*.{sh,rpm}>. + +The main design decisions and intentions of OpenPKG software stacks are: + +=over 4 + +=item 1. + +OpenPKG software stacks can be centrally defined in a single file +F.stk>, similar to the definition of OpenPKG software packages in +F.spec> files. This definition includes both OpenPKG framework +bootstrap parameters, OpenPKG package build parameters and OpenPKG +software stack specific deployment-time prolog and epilog scripts. + +=item 2. + +OpenPKG software stacks depend on particular OpenPKG software packages +(and perhaps even their particular versions) and by downloading and +locally storing all relevant OpenPKG software packages an OpenPKG +software stack remains stable and self-contained -- even if new versions +of OpenPKG software packages are released. + +=item 3. + +For generating the OpenPKG software stack files, an OpenPKG instance +and its B command is required, but executing the OpenPKG +software stack deployment script does NOT require any pre-existing +OpenPKG instances. + +=item 4. + +By wrapping F[-I-I].sh> and +F[-I-I].src.d/> into a I F[-I-I].src.sh> with the B command, you can provide a single self-contained file for building +and installing an OpenPKG software stack from OpenPKG source packages. + +=item 5. + +By wrapping F[-I-I].sh> and +F[-I-I].I-I.d/> +into a I +F[-I-I].I-I.sh> with the +B command, you can provide a single self-contained file for +installing an OpenPKG software stack from OpenPKG binary packages. + +=back + +=head1 COMMAND-LINE OPTIONS AND ARGUMENTS + +=over 4 + +=item B<-h>|B<--help> + +Just shows a short usage information for the B command. + +=item B<-v>|B<--verbose> I + +Sets the verbosity level for outputs, from C<0> (no output at all) to 4 +(all possible outputs). The default is C<4>. + +=item B<-o>|B<--output> I + +The output directory for the OpenPKG software stack files. +The default is the current directory (F<.>). + +=item [B<-D>|B<--define> I=I ...] + +On-the-fly overrides the value of option macro C<%{I}> with +I. Use this to generate a variant of an OpenPKG software stack +without modifying the software stack definition file. + +=item [B<-u>|B<--unversioned>] + +By default B creates the file +C-I-I.sh> (deployment script) and the +directory C-I-I.src.d/> (source packages). +With this option the names are C.sh> and C.src.d/> only. + +=item [B<-q>|B<--query>] + +Forces a different operation mode where a shell script is output +on F containing variable definitions in the format +C="I";> with information about the software stack +definition. The provided variable names are C, C, +C, C and C for the corresponding headers, +plus variables for all defined software stack options (see C<%option> +section below). + +=item IF<.stk> + +The mandatory OpenPKG software stack definition file. +See below under B for details. + +=back + +=head1 SOFTWARE STACK DEFINITION + +An OpenPKG software stack is defined by a configuration file +containing headers (C) and sections (<%foo>). + +=head2 Configuration Headers + +=over 4 + +=item B + +The name of the OpenPKG software stack. Also used as a prefix for many +files. Should match the regular expression C<^[a-z][a-zA-Z0-9]+>, +although this is not enforced. Example: C. + +=item B + +A single line, shortly summarizing the purpose of the OpenPKG software +stack. Example: C. + +=item B + +Name of the packager of the OpenPKG software software stack. +Example: C. + +=item B + +Version identifier of the OpenPKG software stack. Describes the +I revision of the software stack definition. Should match the +regular expression C<^[0-9]+\.[0-9]\.[0-9]+$>, although this is not +enforced. Example: C. + +=item B + +Release identifier of the OpenPKG software stack. Describes the +I revision of the stack definition. Should be in the format +C and hence match the regular expression C<^[0-9]{8}$>, +although this is not enforced. Example: C. + +=back + +=head2 Configuration Sections + +=over 4 + +=item B<%options> + +Zero or more options for the OpenPKG software stack, one per line, in +the format "I I". Options can be overridden on +the command-line with B<-D>I=I. Example: C. +Option values can be expanded in all headers and sections through the +following constructs: + +=over 4 + +=item C<%{I}> + +Expand to the value of option I. + +=item C<%{?I:I}> + +Expand to I if option I is defined. + +=item C<%{!?I:I}> + +Expand to I if option I is NOT defined. + +=back + +=item B<%description> + +A single textual paragraph describing the purpose of the OpenPKG +software stack in more detail than header C. + +=item B<%framework> + +The command-line parameters passed to the OpenPKG framework +bootstrap source shell package F. Usually at +least the parameters B<--prefix=>I, B<--user=>I, +B<--group=>I and B<--tag=>I are given here. In order +to allow an OpenPKG software stack to be easily reused one creates +the options (see C<%option> above) named C, C, C +and C and then use C<--prefix=%{prefix}>, C<--user=%{user}>, +C<--group=%{group}> and C<--tag=%{tag}> in this C<%framework> section. + +=item B<%packages> + +The packages to build and install for the OpenPKG software stack, in +the format of "B<-DI::I