123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- This user guide is for Qi (version 1.3,
- 10 Sep 2019), which is a simple but well-integrated package manager.
- Copyright (C) 2019 Matias Andres Fonzo, Santiago del Estero,
- Argentina.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with no
- Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
- Texts. A copy of the license is included in the section entitled
- "GNU Free Documentation License". -->
- <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Qi user guide</title>
- <meta name="description" content="Qi user guide">
- <meta name="keywords" content="Qi user guide">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <link href="#Top" rel="start" title="Top">
- <link href="#Index" rel="index" title="Index">
- <link href="#SEC_Contents" rel="contents" title="Table of Contents">
- <link href="dir.html#Top" rel="up" title="(dir)">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- div.smalllisp {margin-left: 3.2em}
- kbd {font-style: oblique}
- pre.display {font-family: inherit}
- pre.format {font-family: inherit}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: inherit; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: inherit; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
- </head>
- <body lang="en">
- <h1 class="settitle" align="center">Qi user guide</h1>
- <a name="SEC_Contents"></a>
- <h2 class="contents-heading">Table of Contents</h2>
- <div class="contents">
- <ul class="no-bullet">
- <li><a name="toc-Introduction-1" href="#Introduction">1 Introduction</a></li>
- <li><a name="toc-Invoking-qi-1" href="#Invoking-qi">2 Invoking qi</a></li>
- <li><a name="toc-The-qirc-file-1" href="#The-qirc-file">3 The qirc file</a></li>
- <li><a name="toc-Packages-1" href="#Packages">4 Packages</a>
- <ul class="no-bullet">
- <li><a name="toc-Package-conflicts" href="#Package-conflicts">4.1 Package conflicts</a></li>
- <li><a name="toc-Installing-packages" href="#Installing-packages">4.2 Installing packages</a></li>
- <li><a name="toc-Removing-packages" href="#Removing-packages">4.3 Removing packages</a></li>
- <li><a name="toc-Upgrading-packages" href="#Upgrading-packages">4.4 Upgrading packages</a>
- <ul class="no-bullet">
- <li><a name="toc-Package-blacklist" href="#Package-blacklist">4.4.1 Package blacklist</a></li>
- </ul></li>
- </ul></li>
- <li><a name="toc-Recipes-1" href="#Recipes">5 Recipes</a>
- <ul class="no-bullet">
- <li><a name="toc-Variables" href="#Variables">5.1 Variables</a></li>
- <li><a name="toc-Special-variables" href="#Special-variables">5.2 Special variables</a></li>
- <li><a name="toc-Writing-recipes" href="#Writing-recipes">5.3 Writing recipes</a></li>
- <li><a name="toc-Building-packages" href="#Building-packages">5.4 Building packages</a></li>
- <li><a name="toc-Variables-from-the-environment" href="#Variables-from-the-environment">5.5 Variables from the environment</a></li>
- <li><a name="toc-The-meta-file" href="#The-meta-file">5.6 The meta file</a></li>
- </ul></li>
- <li><a name="toc-Order-files-1" href="#Order-files">6 Order files</a></li>
- <li><a name="toc-Creating-packages-1" href="#Creating-packages">7 Creating packages</a></li>
- <li><a name="toc-Examining-packages-1" href="#Examining-packages">8 Examining packages</a></li>
- <li><a name="toc-Exit-status-1" href="#Exit-status">9 Exit status</a></li>
- <li><a name="toc-Index-1" href="#Index">Index</a></li>
- </ul>
- </div>
- <a name="Top"></a>
- <div class="header">
- <p>
- Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="SEC_Top"></a>
- <p>This user guide is for Qi (version 1.3,
- 10 Sep 2019).
- </p>
- <table class="menu" border="0" cellspacing="0">
- <tr><td align="left" valign="top">• <a href="#Introduction" accesskey="1">Introduction</a>:</td><td> </td><td align="left" valign="top">Description and features of qi
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Invoking-qi" accesskey="2">Invoking qi</a>:</td><td> </td><td align="left" valign="top">Command-line options
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#The-qirc-file" accesskey="3">The qirc file</a>:</td><td> </td><td align="left" valign="top">Configuration file
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Packages" accesskey="4">Packages</a>:</td><td> </td><td align="left" valign="top">Managing packages
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Recipes" accesskey="5">Recipes</a>:</td><td> </td><td align="left" valign="top">Building packages
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Order-files" accesskey="6">Order files</a>:</td><td> </td><td align="left" valign="top">Handling build order
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Creating-packages" accesskey="7">Creating packages</a>:</td><td> </td><td align="left" valign="top">Making Qi packages
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Examining-packages" accesskey="8">Examining packages</a>:</td><td> </td><td align="left" valign="top">Debugging purposes
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Exit-status" accesskey="9">Exit status</a>:</td><td> </td><td align="left" valign="top">Exit codes
- </td></tr>
- <tr><td align="left" valign="top">• <a href="#Index">Index</a>:</td><td> </td><td align="left" valign="top">
- </td></tr>
- </table>
- <br>
- <p>Copyright (C) 2019 Matias Fonzo.
- </p>
- <p>Qi’s home page can be found at <a href="http://www.dragora.org">http://www.dragora.org</a>.
- Send bug reports or suggestions to <a href="mailto:dragora-users@nongnu.org"><span class="nolinebreak">dragora-users</span>@nongnu.org</a>.<!-- /@w -->
- </p>
- <hr>
- <a name="Introduction"></a>
- <div class="header">
- <p>
- Next: <a href="#Invoking-qi" accesskey="n" rel="next">Invoking qi</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Introduction-1"></a>
- <h2 class="chapter">1 Introduction</h2>
- <a name="index-introduction"></a>
- <p>Qi is a simple but well-integrated package manager. It can create,
- install, remove, and upgrade software packages. Qi produces binary
- packages using recipes, which are files containing specific instructions
- to build each package from source. Qi can manage multiple packages
- under a single directory hierarchy. This method allows to maintain a set
- of packages and multiple versions of them. This means that Qi could be
- used as the main package manager or complement the existing one.
- </p>
- <p>Qi offers a friendly command line interface, a global configuration
- file, a simple recipe layout to deploy software packages; also works
- with binary packages in parallel, speeding up installations and packages
- in production. The format used for packages is a simplified but safe
- POSIX pax archive compressed with lzip.
- </p>
- <p>Qi is a modern (POSIX-compliant) shell script released under the
- terms of the GNU General Public License. There are only two major
- dependencies for the magic: graft(1) and tarlz(1), the rest is expected
- to be found in any Unix-like system.
- </p>
- <hr>
- <a name="Invoking-qi"></a>
- <div class="header">
- <p>
- Next: <a href="#The-qirc-file" accesskey="n" rel="next">The qirc file</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Invoking-qi-1"></a>
- <h2 class="chapter">2 Invoking qi</h2>
- <a name="index-invocation"></a>
- <p>This chapter describes the synopsis and command line options for
- invoke Qi.
- </p>
- <div class="example">
- <pre class="example">Usage: qi [<var>OPTION</var>]... [<var>FILE</var>]...
- </pre></div>
- <p>One mandatory option specifies the operation that ‘<samp>qi</samp>’ should
- perform, other options are meant to detail how this operation should be
- performed.
- </p>
- <p>qi supports the following options to operate:
- </p>
- <dl compact="compact">
- <dt><code>-b</code></dt>
- <dd><p>Build package using recipe names.
- </p>
- </dd>
- <dt><code>-c</code></dt>
- <dd><p>Create .tlz package from directory.
- </p>
- </dd>
- <dt><code>-d</code></dt>
- <dd><p>Delete packages.
- </p>
- </dd>
- <dt><code>-i</code></dt>
- <dd><p>Install packages.
- </p>
- </dd>
- <dt><code>-o</code></dt>
- <dd><p>Resolve build order through .order files.
- </p>
- </dd>
- <dt><code>-u</code></dt>
- <dd><p>Update packages (implies -i, -d and -p options).
- </p>
- </dd>
- <dt><code>-w</code></dt>
- <dd><p>Warn about files that will be linked.
- </p>
- </dd>
- <dt><code>-x</code></dt>
- <dd><p>Extract a package for debugging purposes.
- </p></dd>
- </dl>
- <p>There are common options between modes:
- </p>
- <dl compact="compact">
- <dt><code>-N</code></dt>
- <dd><p>Do not read the configuration file.
- </p>
- <p>This will ignore any value in the qirc file.
- </p>
- </dd>
- <dt><code>-P <DIR></code></dt>
- <dd><p>Package directory for installations.
- </p>
- <p>This option sets ‘<samp>${packagedir}</samp>’.
- </p>
- <p>Only valid for -i, -d, or -u options.
- </p>
- </dd>
- <dt><code>-f</code></dt>
- <dd><p>Force option.
- </p>
- <p>This option can force the build of a recipe, or force the update of a
- pre-existing package.
- </p>
- <p>Only valid for -b, -u options.
- </p>
- </dd>
- <dt><code>-t <DIR></code></dt>
- <dd><p>Target directory for symbolic links.
- </p>
- <p>This option sets ‘<samp>${targetdir}</samp>’.
- </p>
- <p>Only valid for -i, -d, or -u options.
- </p>
- </dd>
- <dt><code>-k</code></dt>
- <dd><p>Keep (don’t delete) ‘<samp>${srcdir}</samp>’ or ‘<samp>${destdir}</samp>’ in build
- mode, keep (don’t delete) package directory in delete mode.
- </p>
- <p>Only valid for -b, -d or -u options.
- </p>
- </dd>
- <dt><code>-p</code></dt>
- <dd><p>Prune conflicts on package installations.
- </p>
- <p>This option may proceed with the package installation if one or more
- conflicts occur.
- </p>
- </dd>
- <dt><code>-r /rootdir</code></dt>
- <dd><p>Use the fully qualified named directory as the root directory for all qi
- operations. The target directory and package directory will be relative
- to the specified directory, including the log file for graft.
- </p>
- </dd>
- <dt><code>-v</code></dt>
- <dd><p>Be verbose (a 2nd -v gives more).
- </p></dd>
- </dl>
- <p>Options for build mode (-b):
- </p>
- <dl compact="compact">
- <dt><code>-O <DIR></code></dt>
- <dd><p>Where the packages produced are written.
- </p>
- <p>This option sets ‘<samp>${outdir}</samp>’.
- </p>
- </dd>
- <dt><code>-W <DIR></code></dt>
- <dd><p>Where archives, patches, and recipes are expected.
- </p>
- <p>This option sets ‘<samp>${worktree}</samp>’.
- </p>
- </dd>
- <dt><code>-Z <DIR></code></dt>
- <dd><p>Where (compressed) sources will be found.
- </p>
- <p>This option sets ‘<samp>${tardir}</samp>’.
- </p>
- </dd>
- <dt><code>-a</code></dt>
- <dd><p>Architecture to use.
- </p>
- <p>Default value is obtained via uname(1) as ‘<samp>uname -m</samp>’.
- </p>
- </dd>
- <dt><code>-j</code></dt>
- <dd><p>Parallel jobs for the compiler.
- </p>
- <p>If not specified, default sets to 1.
- </p>
- </dd>
- <dt><code>-1</code></dt>
- <dd><p>Increment release number (‘<samp>${release}</samp>’ + 1).
- </p>
- <p>It will be omitted if the -n option is being used.
- </p>
- </dd>
- <dt><code>-n</code></dt>
- <dd><p>Don’t create a .tlz package.
- </p>
- </dd>
- <dt><code>-S</code></dt>
- <dd><p>Selects the option to skip completed recipes.
- </p>
- <p>This means, in interactive mode, when the dialog
- to summarize recipes is shown.
- </p></dd>
- </dl>
- <p>Informative options:
- </p>
- <dl compact="compact">
- <dt><code>-L</code></dt>
- <dd><p>Print default directory locations.
- </p>
- <p>This will print the target directory, package directory, working tree,
- the directory for tarballs, and the output directory for the packages
- produced.
- </p>
- </dd>
- <dt><code>-h</code></dt>
- <dd><p>Display the help describing the options and then exit.
- </p>
- </dd>
- <dt><code>-V</code></dt>
- <dd><p>Print the version number and license information.
- The version number should be included in all bug reports.
- </p></dd>
- </dl>
- <p>Expected non-option arguments are package directories and regular files:
- recipes or files ending in .tlz, .order. When FILE is -, qi can read from
- the standard input. See examples in <a href="#Packages">Packages</a>.
- </p>
- <hr>
- <a name="The-qirc-file"></a>
- <div class="header">
- <p>
- Next: <a href="#Packages" accesskey="n" rel="next">Packages</a>, Previous: <a href="#Invoking-qi" accesskey="p" rel="prev">Invoking qi</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="The-qirc-file-1"></a>
- <h2 class="chapter">3 The qirc file</h2>
- <a name="index-configuration-file"></a>
- <p>The global <samp>qirc</samp> file offers a way to define variables and tools
- (such as a download manager) for default use. This file is used by qi
- at runtime, e.g., to build, install, remove or upgrade packages.
- </p>
- <p>It has the following rules:
- </p>
- <ul>
- <li> Variables must be declared as ‘<samp>name=value</samp>’.
- </li><li> Declaration of values should only take one line, no line break.
- </li><li> For security reasons, assignments like ‘<samp>name=$var</samp>’ are only
- interpreted as literal.
- </li></ul>
- <p>The command line options related to the package directory and target
- directory plus some of the options used for the build mode can override
- some values in <samp>qirc</samp>. See <a href="#Invoking-qi">Invoking qi</a>.
- </p>
- <p>The order in which qi looks for this file is:
- </p>
- <ol>
- <li> <code>${HOME}/.qirc</code>
- Effective user.
- </li><li> ‘<samp>${sysconfdir}/qirc</samp>’
- System-wide.
- </li></ol>
- <p>If you intend to run qi as effective user, the file
- ‘<samp>${sysconfdir}/qirc</samp>’ could be copied to <code>${HOME}/.qirc</code>
- setting the paths for ‘<samp>${packagedir}</samp>’ and ‘<samp>${targetdir}</samp>’
- according to the <code>$HOME</code>.
- </p>
- <hr>
- <a name="Packages"></a>
- <div class="header">
- <p>
- Next: <a href="#Recipes" accesskey="n" rel="next">Recipes</a>, Previous: <a href="#The-qirc-file" accesskey="p" rel="prev">The qirc file</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Packages-1"></a>
- <h2 class="chapter">4 Packages</h2>
- <a name="index-managing-packages"></a>
- <p>A package is a suite of programs usually distributed in binary form
- which may also contain manual pages, documentation, or any other file
- associated to a specific software.
- </p>
- <p>The package format used by qi is a simplified POSIX pax archive
- compressed with lzip. The file extension for packages is ‘<samp>.tlz</samp>’.
- </p>
- <p>Both package installation and package de-installation are managed using
- two important (internal) variables: ‘<samp>${packagedir}</samp>’ and
- ‘<samp>${targetdir}</samp>’, these values can be changed in the
- configuration file or via options.
- </p>
- <p>‘<samp>${packagedir}</samp>’ is a common directory tree where the package
- contents will be decompressed (will reside).
- </p>
- <p>‘<samp>${targetdir}</samp>’ is a target directory where the links will be
- made by graft(1) taking ‘<samp>${packagedir}/package_name</samp>’ into account.
- </p>
- <p>Packages are installed in self-contained directory trees and symbolic
- links from a common area are made to the package files. This allows
- multiple versions of the same package to coexist on the same system.
- </p>
- <a name="Package-conflicts"></a>
- <h3 class="section">4.1 Package conflicts</h3>
- <a name="index-package-conflicts"></a>
- <p>All the links to install or remove a package are handled by graft(1).
- Since multiple packages can be installed or removed at the same time,
- certain conflicts may arise between the packages.
- </p>
- <p>graft<a name="DOCF1" href="#FOOT1"><sup>1</sup></a>
- defines a CONFLICT as one of the following conditions:
- </p>
- <ul>
- <li> If the package object is a directory and the target object exists but is
- not a directory.
- </li><li> If the package object is not a directory and the target object exists
- and is not a symbolic link.
- </li><li> If the package object is not a directory and the target object exists
- and is a symbolic link to something other than the package object.
- </li></ul>
- <p>The default behavior of qi for an incoming package is to ABORT if a
- conflict arises. When a package is going to be deleted, qi tells to
- graft(1) to remove those parts that are not in conflict, leaving the
- links to the belonging package. This behavior can be forced if the
- -p option is given.
- </p>
- <a name="Installing-packages"></a>
- <h3 class="section">4.2 Installing packages</h3>
- <a name="index-package-installation"></a>
- <p>To install a single package, simply type:
- </p>
- <div class="example">
- <pre class="example">qi -i coreutils-8.30-i586+1.tlz
- </pre></div>
- <p>To install multiple packages at once, type:
- </p>
- <div class="example">
- <pre class="example">qi -i gcc-8.3.0-i586+1.tlz rafaela-2.2-i586+1.tlz ...
- </pre></div>
- <p>Warn about the files that will be linked:
- </p>
- <div class="example">
- <pre class="example">qi -w bash-5.0-i586+1.tlz
- </pre></div>
- <p>This is to verify the content of a package before installing it.
- </p>
- <p>See the process of an installation (very verbose):
- </p>
- <div class="example">
- <pre class="example">qi -i -v mariana-3.0-i586+1.tlz
- </pre></div>
- <p>A second -v gives more.
- </p>
- <p>Installing package in a different location:
- </p>
- <div class="example">
- <pre class="example">qi -r /media/floppy -i lzip-1.21-i586+1.tlz
- </pre></div>
- <p>The -r option assumes ‘<samp>${targetdir}</samp>’ and ‘<samp>${packagedir}</samp>’.
- See:
- </p>
- <div class="example">
- <pre class="example">qi -r /home/selk -P /pkgs -t / -i lzip-1.21-i586+1.tlz
- </pre></div>
- <p>In this case the content of "lzip-1.21-i586+1.tlz" will be decompressed
- into ‘<samp>/home/selk/pkgs/lzip-1.21-i586+1</samp>’. Assuming that the main
- binary for lzip is under ‘<samp>/home/selk/pkgs/lzip-1.21-i586+1/usr/bin/</samp>’
- the target for "usr/bin" will be created at ‘<samp>/home/selk</samp>’. Considering
- that you have exported the <code>PATH</code> as ‘<samp>${HOME}/usr/bin</samp>’, now the
- system is able to see the recent lzip.
- </p>
- <p>Installing from a list of packages using standard input:
- </p>
- <div class="example">
- <pre class="example">cat FILELIST.txt | qi -i -
- </pre></div>
- <p>The list of packages must contain full path names to be passed in the
- installation, e.g.:
- /var/cache/qi/packages/x86_64/devel/tcl-8.6.9-x86_64+1.tlz
- /var/cache/qi/packages/x86_64/devel/tk-8.6.9.1-x86_64+1.tlz
- /var/cache/qi/packages/x86_64/devel/vala-0.42.3-x86_64+1.tlz
- </p>
- <a name="Removing-packages"></a>
- <h3 class="section">4.3 Removing packages</h3>
- <a name="index-package-de_002dinstallation"></a>
- <p>To remove a package, simply type:
- </p>
- <div class="example">
- <pre class="example">qi -d xz-5.2.4-i586+1.tlz
- </pre></div>
- <p>Delete mode will match the package name using ‘<samp>${packagedir}</samp>’ as
- prefix. For example, if the value of ‘<samp>${packagedir}</samp>’ is set to
- /usr/local/pkgs, this will be equal to:
- </p>
- <div class="example">
- <pre class="example">qi -d /usr/local/pkgs/xz-5.2.4-i586+1
- </pre></div>
- <p>Detailed output (very verbose):
- </p>
- <div class="example">
- <pre class="example">qi -d -v /usr/local/pkgs/xz-5.2.4-i586+1
- </pre></div>
- <p>A second -v gives more.
- </p>
- <p>By default the delete mode does not preserve a package directory after
- removing its links from ‘<samp>${targetdir}</samp>’, but this behavior can be
- changed if the -k option is passed:
- </p>
- <div class="example">
- <pre class="example">qi -d -k /usr/local/pkgs/lzip-1.21-i586+1
- </pre></div>
- <p>This means that the links to the package can be reactivated, later:
- </p>
- <div class="example">
- <pre class="example">cd /usr/local/pkgs && graft -i lzip-1.21-i586+1
- </pre></div>
- <p>Removing package from a different location:
- </p>
- <div class="example">
- <pre class="example">qi -r /home/cthulhu -P /pkgs -t / -d xz-5.2.4-i586+1
- </pre></div>
- <p>Removing a package using standard input:
- </p>
- <div class="example">
- <pre class="example">echo "vala-0.42.3-x86_64+1" | qi -d -
- </pre></div>
- <p>This will match with the package directory.
- </p>
- <a name="Upgrading-packages"></a>
- <h3 class="section">4.4 Upgrading packages</h3>
- <a name="index-package-upgrade"></a>
- <p>The upgrade mode inherits the properties of the installation and removal
- process. To make sure that a package is updated, the package is installed
- in a temporary directory taking ‘<samp>${packagedir}</samp>’ into account. Once
- the incoming package is pre-installed, qi can proceed to search and delete
- packages that have the same name (considered as previous ones). Finally,
- the package is re-installed at its final location and the temporary
- directory is removed.
- </p>
- <p>To upgrade a package, just type:
- </p>
- <div class="example">
- <pre class="example">qi -u gcc-9.0.1-i586+1.tlz
- </pre></div>
- <p>This will proceed to update "gcc-9.0.1-i586+1" removing other versions
- of "gcc" (if any).
- </p>
- <p>If you want to keep the package directories of versions found during the
- upgrade process, just pass:
- </p>
- <div class="example">
- <pre class="example">qi -u -k gcc-9.0.1-i586+1.tlz
- </pre></div>
- <p>To see the upgrade process (very verbose):
- </p>
- <div class="example">
- <pre class="example">qi -u -v gcc-9.0.1-i586+1.tlz
- </pre></div>
- <p>A second -v gives more.
- </p>
- <p>To force the upgrade of an existing package:
- </p>
- <div class="example">
- <pre class="example">qi -u -f gcc-9.0.1-i586+1.tlz
- </pre></div>
- <a name="Package-blacklist"></a>
- <h4 class="subsection">4.4.1 Package blacklist</h4>
- <a name="index-package-blacklist"></a>
- <p>To implement general package facilities, either to install, remove or
- maintain the hierarchy of packages in a clean manner, qi makes use of the
- pruning operation via graft(1):
- </p>
- <p>There is a risk if those are crucial packages for the proper functioning
- of the system, because it implies the deactivation of symbolic from the
- target directory, <em>especially</em> when transitioning an incoming package
- into its final location during upgrade.
- </p>
- <p>A blacklist of package names has been devised for the case where
- a user decides to upgrade all packages in the system, or
- just the crucial ones, such as the C library.
- </p>
- <p>The blacklist is related to the upgrade mode only, consists in installing
- a package instead of updating it or removing previous versions of it;
- the content of the package will be updated over the existing content at
- ‘<samp>${packagedir}</samp>’, while the existing links from
- ‘<samp>${targetdir}</samp>’ will be preserved. A pruning of links will be
- carried out in order to re-link possible differences with the recent
- content, this helps to avoid leaving dead links in the target directory.
- </p>
- <p>Since the upgrade mode is also used to install a new package, the mechanism
- for blacklist is to install a declared package if it does not already
- exist. If it already exists, it is verified that the binary package is
- newer than the package directory in order to perform an update.
- </p>
- <p>Package names for the blacklist can be set from the configuration file.
- </p>
- <hr>
- <a name="Recipes"></a>
- <div class="header">
- <p>
- Next: <a href="#Order-files" accesskey="n" rel="next">Order files</a>, Previous: <a href="#Packages" accesskey="p" rel="prev">Packages</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Recipes-1"></a>
- <h2 class="chapter">5 Recipes</h2>
- <a name="index-recipes"></a>
- <p>A recipe is a file telling qi what to do. Most often, the recipe tells
- qi how to build a binary package from a source tarball.
- </p>
- <p>A recipe has two parts: a list of variable definitions and a list of
- sections. By convention, the syntax of a section is:
- </p>
- <div class="example">
- <pre class="example">section_name()
- {
- section lines
- }
- </pre></div>
- <p>The section name is followed by parentheses, one newline and an opening
- brace. The line finishing the section contains just a closing brace.
- The section names or the function names currently recognized are
- ‘<samp>build</samp>’.
- </p>
- <p>The ‘<samp>build</samp>’ section is an augmented shell script. This is the main
- section (or <strong>shell function</strong>) which contains the instructions to
- build and produce a package.
- </p>
- <a name="Variables"></a>
- <h3 class="section">5.1 Variables</h3>
- <a name="index-variables"></a>
- <p>A "variable" is a <strong>shell variable</strong> defined either in <samp>qirc</samp>
- or in a recipe to represent a string of text, called the variable’s
- "value". These values are substituted by explicit request in the
- definitions of other variables or in calls to external commands.
- </p>
- <p>Variables can represent lists of file names, options to pass to
- compilers, programs to run, directories to look in for source files,
- directories to write output to, or anything else you can imagine.
- </p>
- <p>Definitions of variables in qi have four levels of precedence.
- Options which define variables from the command-line override those
- specified in the <samp>qirc</samp> file, while variables defined in the recipe
- override those specified in <samp>qirc</samp>, taking priority over those
- variables set by command-line options. Finally, the variables have
- default values if they are not defined anywhere.
- </p>
- <p>Options that set variables through the command-line can only reference
- variables defined in <samp>qirc</samp> and variables with default values.
- </p>
- <p>Definitions of variables in <samp>qirc</samp> can only reference variables
- previously defined in <samp>qirc</samp> and variables with default values.
- </p>
- <p>Definitions of variables in the recipe can only reference variables
- set by the command-line, variables previously defined in the recipe,
- variables defined in <samp>qirc</samp>, and variables with default values.
- </p>
- <a name="Special-variables"></a>
- <h3 class="section">5.2 Special variables</h3>
- <a name="index-special-variables"></a>
- <p>There are variables which can only be set using the command line options or
- via <samp>qirc</samp>, there are other special variables which can be defined or
- redefined in a recipe. See the following definitions:
- </p>
- <p>‘<samp>outdir</samp>’ is the directory where the packages produced are written.
- This variable can not be redefined in the recipe. Default sets to
- ‘<samp>/var/cache/qi/packages</samp>’.
- </p>
- <p>‘<samp>worktree</samp>’ is the working tree where archives, patches, and recipes
- are expected. This variable can not be redefined in the recipe. Default
- sets to ‘<samp>/usr/src/qi</samp>’.
- </p>
- <p>‘<samp>tardir</samp>’ is defined in the recipe to the directory where the tarball
- containing the source can be found. The full name of the tarball is
- composed as ‘<samp>${tardir}/$tarname</samp>’. Its value is available in the
- recipe as ‘<samp>${tardir}</samp>’; a value of . for ‘<samp>tardir</samp>’ sets it to
- the value of CWD (Current Working Directory), this is where the recipe
- lives.
- </p>
- <p>‘<samp>arch</samp>’ is the architecture to compose the package name. Its value is
- available in the recipe as ‘<samp>${arch}</samp>’. Default value is the output
- of ‘<samp>uname -m</samp>’.
- </p>
- <p>‘<samp>jobs</samp>’ is the number of parallel jobs to pass to the compiler. Its
- value is available in the recipe as ‘<samp>${jobs}</samp>’. The default value
- is 1.
- </p>
- <p>The two variables ‘<samp>${srcdir}</samp>’ and ‘<samp>${destdir}</samp>’ can be
- set in the recipe, as any other variable, but if they are not, qi uses
- default values for them when building a package.
- </p>
- <p>‘<samp>srcdir</samp>’ contains the source code to be compiled, and defaults to
- ‘<samp>${program}-${version}</samp>’. ‘<samp>destdir</samp>’ is the place where the
- built package will be installed, and defaults to
- ‘<samp>${TMPDIR}/package-${program}</samp>’.
- </p>
- <p>If ‘<samp>pkgname</samp>’ is left undefined, the special variable ‘<samp>program</samp>’
- is assigned by default. If ‘<samp>pkgversion</samp>’ is left undefined, the
- special variable ‘<samp>version</samp>’ is assigned by default.
- </p>
- <p>‘<samp>pkgname</samp>’ and ‘<samp>pkgversion</samp>’ along with: ‘<samp>version</samp>’, ‘<samp>arch</samp>’,
- and ‘<samp>release</samp>’ are used to produce the name of the package in the form:
- ‘<samp>${pkgname}-${pkgversion}-${arch}+${release}.tlz</samp>’
- </p>
- <p>A special variable called ‘<samp>replace</samp>’ can be used to declare package
- names that will be replaced at the time of installation.
- </p>
- <p>A typical recipe contains the following variables:
- </p>
- <ul>
- <li> ‘<samp>program</samp>’: software name.
- <p>It matches the source name. It is also used to compose the name of the
- package if ‘<samp>${pkgname}</samp>’ is not specified.
- </p>
- </li><li> ‘<samp>version</samp>’: software version.
- <p>It matches the source name. It is also used to compose the version of the
- package if ‘<samp>${pkgversion}</samp>’ is not specified.
- </p>
- </li><li> ‘<samp>arch</samp>’: software architecture.
- <p>It is used to compose the architecture of the package in which it is
- build.
- </p>
- </li><li> ‘<samp>release</samp>’: release number.
- <p>This is used to reflect the release number of the package. It is
- recommended to increase this number after any significant change in
- the recipe or post-install script.
- </p></li></ul>
- <p>Obtaining sources over the network must be declared in the recipe using
- the ‘<samp>fetch</samp>’ variable. Use double quotes for separated values.
- </p>
- <p>The variables ‘<samp>netget</samp>’ and ‘<samp>rsync</samp>’ can be defined in <samp>qirc</samp>
- to establish a network downloader in order to get the sources. If they
- are not defined, qi uses default values:
- </p>
- <p>‘<samp>netget</samp>’ is the general network downloader tool, defaults sets to
- ‘<samp>wget -c -w1 -t3 --no-check-certificate</samp>’.
- </p>
- <p>‘<samp>rsync</samp>’ is the network tool for sources containing the prefix for
- the RSYNC protocol, default sets to
- ‘<samp>rsync -v -a -L -z -i --progress</samp>’.
- </p>
- <p>The variable ‘<samp>description</samp>’ is used to print the package description
- when a package is installed.
- </p>
- <p>A description has two parts: a brief description, and a long description.
- By convention, the syntax of ‘<samp>description</samp>’ is:
- </p>
- <div class="example">
- <pre class="example">description="
- Brief description.
- Long description.
- "
- </pre></div>
- <p>The first line of the value represented is a brief description of the
- software (called "blurb"). A blank line separates the <em>brief
- description</em> from the <em>long description</em>, which should contain a more
- descriptive description of the software.
- </p>
- <p>An example looks like:
- </p>
- <div class="example">
- <pre class="example">description="
- The GNU core utilities.
- The GNU core utilities are the basic file, shell and text manipulation
- utilities of the GNU operating system. These are the core utilities
- which are expected to exist on every operating system.
- "
- </pre></div>
- <p>Please consider a length limit of 78 characters as maximum, because the same
- one would be used on the meta file creation. See
- <a href="#Recipes">The meta file</a> section.
- </p>
- <p>The ‘<samp>homepage</samp>’ variable is used to declare the main site or home page:
- </p>
- <div class="example">
- <pre class="example">homepage=http://www.gnu.org/software/gcc
- </pre></div>
- <p>The variable ‘<samp>license</samp>’ is used for license information<a name="DOCF2" href="#FOOT2"><sup>2</sup></a>.
- Some code in the program can be covered by license A, license B, or
- license C. For "separate licensing" or "heterogeneous licensing", we
- suggest using <strong>|</strong> for a disjunction, <strong>&</strong> for a conjunction
- (if that ever happens in a significant way), and comma for heterogeneous
- licensing. Comma would have lower precedence, plus added special terms.
- </p>
- <div class="example">
- <pre class="example">license="LGPL, GPL | Artistic + added permission"
- </pre></div>
- <a name="Writing-recipes"></a>
- <h3 class="section">5.3 Writing recipes</h3>
- <a name="index-writing-recipes"></a>
- <p>Originally, qi was designed for the version 3 of Dragora GNU/Linux (this
- does not mean that you can’t use it in another distribution, just that
- if you do you will need to test it for your selves). To aid this here
- are some references to well written recipes:
- </p>
- <p><a href="http://git.savannah.nongnu.org/cgit/dragora.git/tree/recipes">http://git.savannah.nongnu.org/cgit/dragora.git/tree/recipes</a>.
- <a href="http://notabug.org/dragora/dragora/src/master/recipes">http://notabug.org/dragora/dragora/src/master/recipes</a>.
- </p>
- <p>You can also check the "doc" directory in the distribution sources of qi
- for some examples.
- </p>
- <a name="Building-packages"></a>
- <h3 class="section">5.4 Building packages</h3>
- <a name="index-package-build"></a>
- <p>A recipe is any valid regular file. Qi sets priorities for reading a
- recipe, the order in which qi looks for a recipe is:
- </p>
- <ol>
- <li> Current working directory.
- </li><li> If the specified path name does not contain "recipe" as the last
- component. Qi will complete it by adding "recipe" to the path name.
- </li><li> If the recipe is not in the current working directory, it will be
- searched under ‘<samp>${worktree}/recipes</samp>’. The last component will be
- completed adding "recipe" to the specified path name.
- </li></ol>
- <p>To build a single package, type:
- </p>
- <div class="example">
- <pre class="example">qi -b x-apps/xterm
- </pre></div>
- <p>Multiple jobs can be passed to the compiler to speed up the build process:
- </p>
- <div class="example">
- <pre class="example">qi -b -j3 x-apps/xterm
- </pre></div>
- <p>Update or install the package produced (if it is not already installed)
- when finish:
- </p>
- <div class="example">
- <pre class="example">qi -b -j3 -u x-apps/xterm
- </pre></div>
- <p>Only process a recipe but do not create the binary package:
- </p>
- <div class="example">
- <pre class="example">qi -b -n dict/aspell
- </pre></div>
- <p>The options -i or -u have no effect when -n is given.
- </p>
- <p>This can be useful to inspect the build process of recipe:
- </p>
- <p>qi -b -k -n dict/aspell 2>&1 | tee aspell-buildlog.txt
- </p>
- <p>The -k option could preserve the source directory and the destination
- directory for later inspection. A log file of the build process will be
- created redirecting both, standard error and standard output to tee(1).
- </p>
- <a name="Variables-from-the-environment"></a>
- <h3 class="section">5.5 Variables from the environment</h3>
- <a name="index-environment-variables"></a>
- <p>Qi has environment variables which can be used at build time:
- </p>
- <p>The variable <code>TMPDIR</code> sets the temporary directory for sources, which is
- used for package extractions (see <a href="#Examining-packages">Examining packages</a>) and is
- prepended to the value of ‘<samp>${srcdir}</samp>’ and ‘<samp>${destdir}</samp>’ in
- build mode. By convention its default value is equal to
- ‘<samp>/usr/src/qi/build</samp>’.
- </p>
- <p>The variables <code>QICFLAGS</code>, <code>QICXXFLAGS</code>, and <code>QILDFLAGS</code> have
- no effect by default. The environment variables such as <code>CFLAGS</code>,
- <code>CXXFLAGS</code>, and <code>LDFLAGS</code> are unset at compile time:
- </p>
- <p>Recommended practice is to set variables in the command line of
- ‘<samp>configure</samp>’ or <em>make(1)</em> instead of exporting to the
- environment. As follows:
- </p>
- <blockquote>
- <p>Variables not defined in a site shell script can be set in the environment
- passed to configure. However, some packages may run configure again
- during the build, and the customized values of these variables may be
- lost. In order to avoid this problem, you should set them in the
- configure command line, using ‘<samp>VAR=value</samp>’. For example:
- </p>
- <p><code>./configure CC=/usr/local2/bin/gcc</code>
- </p>
- <p><a href="http://gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Defining-Variables.html">http://gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Defining-Variables.html</a>
- </p></blockquote>
- <blockquote>
- <p>Indeed, while configure can notice the definition of CC in
- ‘<samp>./configure CC=bizarre-cc</samp>’, it is impossible to notice it in
- ‘<samp>CC=bizarre-cc ./configure</samp>’, which, unfortunately, is what most
- users do.
- </p>
- <p>[...]
- </p>
- <p>configure: error: changes in the environment can compromise the build.
- </p>
- <p><a href="http://gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Setting-Output-Variables.html">http://gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Setting-Output-Variables.html</a>
- </p></blockquote>
- <blockquote>
- <p>It is not wise for makefiles to depend for their functioning on
- environment variables set up outside their control, since this would cause
- different users to get different results from the same makefile. This is
- against the whole purpose of most makefiles.
- </p>
- <p><a href="http://gnu.org/software/make/manual/make.html#Environment">http://gnu.org/software/make/manual/make.html#Environment</a>
- </p></blockquote>
- <a name="The-meta-file"></a>
- <h3 class="section">5.6 The meta file</h3>
- <a name="index-the-meta-file"></a>
- <p>The "meta file" is a regular file created during the build mode, it
- contains information about the package such as package name, package
- version, architecture, release, fetch address, description, and other
- minor data extracted from processed recipes. The name of the file is
- generated as ‘<samp>${full_pkgname}.tlz.txt</samp>’, and its purpose is to
- reflect essential information to the user without having to look inside
- the package content. The file format is also intended to be imported
- from other scripts.
- </p>
- <p>The content of a meta file looks like:
- </p>
- <div class="example">
- <pre class="example">#
- # The Bourne Again SHell.
- #
- # Bash is an sh-compatible shell that incorporates useful features from
- # the Korn shell (ksh) and C shell (csh). It is intended to conform to
- # the IEEE POSIX P1003.2/ISO 9945.2 shell and tools standard.
- #
- # It offers functional improvements over sh for both programming and
- # interactive use.
- #
- QICFLAGS="-g0 -Os -mtune=generic -pipe"
- QICXXFLAGS="-g0 -Os -mtune=generic -pipe"
- QILDFLAGS="-s"
- pkgname=bash
- pkgversion=5.0
- arch=x86_64
- release=1
- blurb="The Bourne Again SHell."
- homepage="http://www.gnu.org/software/bash"
- license="GPLv3+"
- fetch="ftp://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz"
- replace=""
- </pre></div>
- <p>Package descriptions are extracted from the variable ‘<samp>description</samp>’
- where each line is interpreted literally and pre-formatted to fit in
- (exactly) <strong>80 columns</strong>, plus the character ‘<samp>#</samp>’ and a space
- is prefixed to every line.
- </p>
- <p>In addition to the Special variables, there are implicit variables such as
- ‘<samp>blurb</samp>’:
- </p>
- <p>The ‘<samp>blurb</samp>’ variable is related to the special variable
- ‘<samp>description</samp>’. Its value is composed using the first (substantial)
- line of ‘<samp>description</samp>’, mentioned as the "brief description".
- </p>
- <hr>
- <a name="Order-files"></a>
- <div class="header">
- <p>
- Next: <a href="#Creating-packages" accesskey="n" rel="next">Creating packages</a>, Previous: <a href="#Recipes" accesskey="p" rel="prev">Recipes</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Order-files-1"></a>
- <h2 class="chapter">6 Order files</h2>
- <a name="index-handling-build-order"></a>
- <p>The order mode has the purpose of resolving the build order through
- .order files. An order file contains a list of recipe names, by default
- does not perform any action other than to print a resolved list in
- descending order. For example, if <strong>a</strong> depends on <strong>b</strong> and
- <strong>c</strong>, and <strong>c</strong> depends on <strong>b</strong> as well, the file might
- look like:
- </p>
- <div class="example">
- <pre class="example">a: c b
- b:
- c: b
- </pre></div>
- <p>Each letter represents a recipe name, complete dependencies for
- the first recipe name are listed in descending order, which is
- printed from right to left, and removed from left to right:
- </p>
- <p><small>OUTPUT</small>
- </p>
- <div class="example">
- <pre class="example">b
- c
- a
- </pre></div>
- <p>Blank lines, colons and parentheses are simply ignored. Comment lines
- beginning with ‘<samp>#</samp>’ are allowed.
- </p>
- <p>An order file could be used to build a series of packages, for example,
- if the content is:
- </p>
- <div class="example">
- <pre class="example"># Image handling libraries
- libs/libjpeg-turbo: devel/nasm
- x-libs/jasper: libs/libjpeg-turbo
- libs/tiff: libs/libjpeg-turbo
- </pre></div>
- <p>To proceed with each recipe, we can type:
- </p>
- <div class="example">
- <pre class="example">qi -o imglibs.order | qi -b -i -
- </pre></div>
- <p>The output of ‘<samp>qi -o imglibs.order</samp>’ tells to qi in which order it
- should build the recipes:
- </p>
- <div class="example">
- <pre class="example">devel/nasm
- libs/libjpeg-turbo
- x-libs/jasper
- libs/tiff
- </pre></div>
- <hr>
- <a name="Creating-packages"></a>
- <div class="header">
- <p>
- Next: <a href="#Examining-packages" accesskey="n" rel="next">Examining packages</a>, Previous: <a href="#Order-files" accesskey="p" rel="prev">Order files</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Creating-packages-1"></a>
- <h2 class="chapter">7 Creating packages</h2>
- <a name="index-package-creation"></a>
- <p>The "creation mode" is an internal function of qi to make new Qi compatible
- compatible packages, the creation mode is selected by the -c option.
- A package is produced using the contents of the Current Directory, and
- the package file is written out.
- </p>
- <div class="example">
- <pre class="example">Usage: qi -c [<var>OUTPUT/packagename.tlz</var>]...
- </pre></div>
- <p>The argument for the file name to be written must contain a fully
- qualified named directory as the output directory where the package
- produced will be written. The file name should be composed using the
- full name: name-version-architecture+release.tlz
- </p>
- <p><small>EXAMPLE</small>
- </p>
- <div class="example">
- <pre class="example">cd /usr/local/pkgs
- cd claws-mail-3.17.1-x86_64+1
- qi -c /var/cache/qi/packages/x86_64/local/claws-mail-3.17.1-x86_64+1.tlz
- </pre></div>
- <p>In this case, the package "claws-mail-3.17.1-x86_64+1.tlz" will be written
- into ‘<samp>/var/cache/qi/packages/x86_64/local/</samp>’.
- </p>
- <p>All packages produced are complemented by a checksum file (.sha256).
- </p>
- <hr>
- <a name="Examining-packages"></a>
- <div class="header">
- <p>
- Next: <a href="#Exit-status" accesskey="n" rel="next">Exit status</a>, Previous: <a href="#Creating-packages" accesskey="p" rel="prev">Creating packages</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Examining-packages-1"></a>
- <h2 class="chapter">8 Examining packages</h2>
- <a name="index-package-examination"></a>
- <p>The "extraction mode" serves to examine binary packages for debugging
- purposes. The extraction mode is selected by the -x option. It
- decompresses a package into a single directory, verifying its integrity
- and preserving its properties.
- </p>
- <div class="example">
- <pre class="example">Usage: qi -x [<var>packagename.tlz</var>]...
- </pre></div>
- <p><small>EXAMPLE</small>
- </p>
- <div class="example">
- <pre class="example">qi -x mksh-R56c-x86_64+1.tlz
- </pre></div>
- <p>This action will put the content of "mksh-R56c-x86_64+1.tlz" into a
- single directory, this will be a private directory for the user who
- </p>
- <p>requested the action, creation mode will be equal to <strong>u=rwx,g=,o=
- (0700)</strong>. The package content will reside on this location, default
- mask to deploy the content will be equal to
- <strong>u=rwx,g=rwx,o=rwx (0000)</strong>.
- </p>
- <p>The creation of the custom directory is influenced by the value of the
- <code>TMPDIR</code> variable.
- </p>
- <hr>
- <a name="Exit-status"></a>
- <div class="header">
- <p>
- Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#Examining-packages" accesskey="p" rel="prev">Examining packages</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Exit-status-1"></a>
- <h2 class="chapter">9 Exit status</h2>
- <a name="index-exit-codes"></a>
- <p>All the exit codes are described in this chapter.
- </p>
- <dl compact="compact">
- <dt>‘<samp>0</samp>’</dt>
- <dd><p>Successful completion (no errors).
- </p>
- </dd>
- <dt>‘<samp>1</samp>’</dt>
- <dd><p>Minor common errors:
- </p>
- <ul class="no-bullet">
- <li>- Help usage on illegal options or required arguments.
- </li><li>- Program needed by qi (prerequisite) is not available.
- </li></ul>
- </dd>
- <dt>‘<samp>2</samp>’</dt>
- <dd><p>Command execution error:
- </p>
- <p>This code is used to return the evaluation of external commands and shell
- arguments in case of error.
- </p>
- </dd>
- <dt>‘<samp>3</samp>’</dt>
- <dd><p>Integrity check error for compressed files.
- </p>
- <p>Compressed files means:
- </p>
- <ul class="no-bullet">
- <li>- Tarball files from tar(1).
- Supported extensions: .tar, .tar.gz, .tgz, .tar.Z, .tar.bz2, .tbz2, .tbz,
- .tar.xz, .txz
- </li><li>- Tarball files from tarlz(1).
- Supported extensions: .tar.lz, .tlz
- </li><li>- Zip files from unzip(1).
- Supported extensions: .zip, .ZIP
- </li><li>- Gzip files from gzip(1).
- Supported extensions: .gz, .Z
- </li><li>- Bzip2 files from bzip2(1).
- Supported extensions: .bz2
- </li><li>- Lzip files from lzip(1).
- Supported extensions: .lz
- </li><li>- Xz files from xz(1).
- Supported extensions: .xz
- </li></ul>
- </dd>
- <dt>‘<samp>4</samp>’</dt>
- <dd><p>File empty, not regular, or expected.
- </p>
- <p>Commonly, it is expected:
- </p>
- <ul class="no-bullet">
- <li>- An argument for the mode of operation.
- </li><li>- A readable file or directory.
- </li><li>- A binary package (.tlz).
- </li><li>- A valid recipe.
- </li><li>- An order file (.order).
- </li><li>- A protocol supported by the network downloader tool.
- </li><li>- A checksum file (.sha256).
- </li></ul>
- </dd>
- <dt>‘<samp>5</samp>’</dt>
- <dd><p>Empty or not defined variable:
- </p>
- <p>This code is used to report empty or undefined variables; usually,
- variables coming from a recipe or assigned arrays that are tested.
- </p>
- </dd>
- <dt>‘<samp>6</samp>’</dt>
- <dd><p>Package already installed:
- </p>
- <p>The package directory for an incoming .tlz package already exists.
- </p>
- </dd>
- <dt>‘<samp>10</samp>’</dt>
- <dd><p>Network manager error:
- </p>
- <p>This code is used if the network downloader tool fails for some reason.
- </p></dd>
- </dl>
- <hr>
- <a name="Index"></a>
- <div class="header">
- <p>
- Previous: <a href="#Exit-status" accesskey="p" rel="prev">Exit status</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <a name="Index-1"></a>
- <h2 class="unnumbered">Index</h2>
- <table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
- </td></tr></table>
- <table class="index-cp" border="0">
- <tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-configuration-file">configuration file</a>:</td><td> </td><td valign="top"><a href="#The-qirc-file">The qirc file</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-E">E</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-environment-variables">environment variables</a>:</td><td> </td><td valign="top"><a href="#Recipes">Recipes</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-exit-codes">exit codes</a>:</td><td> </td><td valign="top"><a href="#Exit-status">Exit status</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-H">H</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-handling-build-order">handling build order</a>:</td><td> </td><td valign="top"><a href="#Order-files">Order files</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-I">I</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-introduction">introduction</a>:</td><td> </td><td valign="top"><a href="#Introduction">Introduction</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-invocation">invocation</a>:</td><td> </td><td valign="top"><a href="#Invoking-qi">Invoking qi</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-M">M</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-managing-packages">managing packages</a>:</td><td> </td><td valign="top"><a href="#Packages">Packages</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-P">P</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-blacklist">package blacklist</a>:</td><td> </td><td valign="top"><a href="#Packages">Packages</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-build">package build</a>:</td><td> </td><td valign="top"><a href="#Recipes">Recipes</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-conflicts">package conflicts</a>:</td><td> </td><td valign="top"><a href="#Packages">Packages</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-creation">package creation</a>:</td><td> </td><td valign="top"><a href="#Creating-packages">Creating packages</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-de_002dinstallation">package de-installation</a>:</td><td> </td><td valign="top"><a href="#Packages">Packages</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-examination">package examination</a>:</td><td> </td><td valign="top"><a href="#Examining-packages">Examining packages</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-installation">package installation</a>:</td><td> </td><td valign="top"><a href="#Packages">Packages</a></td></tr>
- <tr><td></td><td valign="top"><a href="#index-package-upgrade">package upgrade</a>:</td><td> </td><td valign="top"><a href="#Packages">Packages</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-R">R</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-recipes">recipes</a>:</td><td> </td><td valign="top"><a href="#Recipes">Recipes</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-S">S</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-special-variables">special variables</a>:</td><td> </td><td valign="top"><a href="#Recipes">Recipes</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-T">T</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-the-meta-file">the meta file</a>:</td><td> </td><td valign="top"><a href="#Recipes">Recipes</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-V">V</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-variables">variables</a>:</td><td> </td><td valign="top"><a href="#Recipes">Recipes</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- <tr><th><a name="Index_cp_letter-W">W</a></th><td></td><td></td></tr>
- <tr><td></td><td valign="top"><a href="#index-writing-recipes">writing recipes</a>:</td><td> </td><td valign="top"><a href="#Recipes">Recipes</a></td></tr>
- <tr><td colspan="4"> <hr></td></tr>
- </table>
- <table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Index_cp_letter-C"><b>C</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-E"><b>E</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-H"><b>H</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-I"><b>I</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-M"><b>M</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-P"><b>P</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-R"><b>R</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-S"><b>S</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-T"><b>T</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-V"><b>V</b></a>
-
- <a class="summary-letter" href="#Index_cp_letter-W"><b>W</b></a>
-
- </td></tr></table>
- <div class="footnote">
- <hr>
- <h4 class="footnotes-heading">Footnotes</h4>
- <h3><a name="FOOT1" href="#DOCF1">(1)</a></h3>
- <p>The official guide for Graft can be found at
- <a href="http://peters.gormand.com.au/Home/tools/graft/graft.html">http://peters.gormand.com.au/Home/tools/graft/graft.html</a>.</p>
- <h3><a name="FOOT2" href="#DOCF2">(2)</a></h3>
- <p>The proposal for ‘<samp>license</samp>’ was made by Richard M. Stallman at
- <a href="http://lists.gnu.org/archive/html/gnu-linux-libre/2016-05/msg00003.html">http://lists.gnu.org/archive/html/gnu-linux-libre/2016-05/msg00003.html</a>.</p>
- </div>
- <hr>
- </body>
- </html>
|