123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884 |
- <html lang="en">
- <head>
- <title>Qi manual</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="description" content="Qi manual">
- <meta name="generator" content="makeinfo 4.13">
- <link title="Top" rel="top" href="#Top">
- <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
- <!--
- This manual is for Qi (version 1.0-rc4,
- 30 Jan 2017), which is a simple source builder and package manager.
- Copyright (C) 2015, 2016, 2017 Matias A. Fonzo, Argentina,
- Santiago del Estero.
- 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".
- -->
- <meta http-equiv="Content-Style-Type" content="text/css">
- <style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family:serif; font-weight:normal; }
- span.sansserif { font-family:sans-serif; font-weight:normal; }
- --></style>
- <link rel="stylesheet" type="text/css" href="document-1.0.1.css">
- </head>
- <body>
- <h1 class="settitle">Qi manual</h1>
- <div class="contents">
- <h2>Table of Contents</h2>
- <ul>
- <li><a name="toc_Top" href="#Top">Qi manual</a>
- <li><a name="toc_Introduction" href="#Introduction">1 Introduction</a>
- <li><a name="toc_Invocation" href="#Invocation">2 Invocation</a>
- <ul>
- <li><a href="#Invocation">2.1 Environment</a>
- <li><a href="#Invocation">2.2 Notes</a>
- </li></ul>
- <li><a name="toc_The-qirc-file" href="#The-qirc-file">3 The qirc file</a>
- <li><a name="toc_Packages" href="#Packages">4 Packages</a>
- <ul>
- <li><a href="#Packages">4.1 Adding packages</a>
- <li><a href="#Packages">4.2 Removing packages</a>
- <li><a href="#Packages">4.3 Upgrading packages</a>
- <li><a href="#Packages">4.4 Notes</a>
- </li></ul>
- <li><a name="toc_Recipes" href="#Recipes">5 Recipes</a>
- <ul>
- <li><a href="#Recipes">5.1 Variables</a>
- <ul>
- <li><a href="#Recipes">5.1.1 Special variables</a>
- <li><a href="#Recipes">5.1.2 Variables from the environment</a>
- </li></ul>
- <li><a href="#Recipes">5.2 The meta file</a>
- <li><a href="#Recipes">5.3 Building packages</a>
- <li><a href="#Recipes">5.4 Writing recipes</a>
- <ul>
- <li><a href="#Recipes">5.4.1 Internal functions</a>
- </li></ul>
- </li></ul>
- <li><a name="toc_Order-files" href="#Order-files">6 Order files</a>
- <ul>
- <li><a href="#Order-files">6.1 The depends file</a>
- </li></ul>
- <li><a name="toc_Examine-packages" href="#Examine-packages">7 Examine packages</a>
- <li><a name="toc_Messages" href="#Messages">8 Messages</a>
- <li><a name="toc_Exit-status" href="#Exit-status">9 Exit status</a>
- <li><a name="toc_GNU-Free-Documentation-License" href="#GNU-Free-Documentation-License">Appendix A GNU Free Documentation License</a>
- <li><a name="toc_Index" href="#Index">Index</a>
- </li></ul>
- </div>
- <div class="node">
- <a name="Top"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Introduction">Introduction</a>,
- Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
- </div>
- <h2 class="unnumbered">Qi manual</h2>
- <p>This manual is for Qi (version 1.0-rc4,
- 30 Jan 2017).
- <ul class="menu">
- <li><a accesskey="1" href="#Introduction">Introduction</a>: Purpose, description
- <li><a accesskey="2" href="#Invocation">Invocation</a>: Command-line interface
- <li><a accesskey="3" href="#The-qirc-file">The qirc file</a>: Configuration file
- <li><a accesskey="4" href="#Packages">Packages</a>: Managing packages
- <li><a accesskey="5" href="#Recipes">Recipes</a>: Building packages
- <li><a accesskey="6" href="#Order-files">Order files</a>: Handling the build order
- <li><a accesskey="7" href="#Examine-packages">Examine packages</a>: Debugging purposes
- <li><a accesskey="8" href="#Messages">Messages</a>: Output messages
- <li><a accesskey="9" href="#Exit-status">Exit status</a>: Exit codes
- <li><a href="#GNU-Free-Documentation-License">GNU Free Documentation License</a>
- <li><a href="#Index">Index</a>
- </ul>
- <pre class="sp">
- </pre>
- Copyright © 2015-2017 Matias A. Fonzo, Argentina, Santiago
- del Estero.
- <p>The Qi 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">dragora-users@nongnu.org</a>.<!-- /@w -->
- <div class="node">
- <a name="Introduction"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Invocation">Invocation</a>,
- Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">1 Introduction</h2>
- <p><a name="index-introduction-1"></a>
- Qi is a source builder and a package manager:
- <p>It contains a set of (individual) tools to build, install, remove, and
- upgrade software packages. It follows the philosophy of simplicity
- without adding too many features, such as those that can be found in
- popular package managers. Basically it does two things: builds
- packages and manages them.
- <p>Qi constructs the sources using recipe names, files that contain
- specific instructions to build every source. As result, a binary
- package is obtained which can be installed, removed, upgraded, or
- inspected in the system.
- <p>The packages are managed thanks to an external tool called
- <em>graft(1)</em>, which provides a mechanism for managing multiple
- packages under a single directory hierarchy, it was inspired by both
- Depot (Carnegie Mellon University) and Stow (Bob Glickstein). In this
- aspect, Qi complements Graft: it can work with packages, check them,
- solve conflicts, and more...
- <div class="node">
- <a name="Invocation"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#The-qirc-file">The qirc file</a>,
- Previous: <a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">2 Invocation</h2>
- <p><a name="index-invocation-2"></a>
- The synopsis to invoke Qi is:
- <pre class="example"> pkg<action> [options] [package|recipe|order] ...
- </pre>
- <p class="noindent">The following commands or actions are supported by Qi:
- <dl>
- <dt>‘<samp><span class="samp">pkghelp</span></samp>’<dd>Shows the help.
- <br><dt>‘<samp><span class="samp">pkgadd</span></samp>’<dd>Add the packages to the system using <em>graft(1)</em> for linking.
- <br><dt>‘<samp><span class="samp">pkgremove</span></samp>’<dd>Remove the packages from the system.
- <br><dt>‘<samp><span class="samp">pkgupgrade</span></samp>’<dd>Upgrade software packages.
- <br><dt>‘<samp><span class="samp">pkgbuild</span></samp>’<dd>Build packages using recipe files.
- <br><dt>‘<samp><span class="samp">pkgorder</span></samp>’<dd>Resolves the build order through .order files.
- <br><dt>‘<samp><span class="samp">pkgerupt</span></samp>’<dd>Examine packages for debugging purposes.
- <pre class="sp">
-
- </pre>
- <strong>Global options</strong>
- <p>There are global or common options for the commands, as well as specific to each one.
- <br><dt>‘<samp><span class="samp">-h</span></samp>’<dd>Show options for the given command and exit.
- <pre class="sp">
-
- </pre>
- <strong>Options for command ‘</strong><samp><span class="samp">pkgadd</span></samp><strong>’:</strong>
- <br><dt>‘<samp><span class="samp">-f</span></samp>’<dd>Force package installation (implies -p).
- <br><dt>‘<samp><span class="samp">-P</span></samp>’<dd>Extract package on an installation tree.
- <p>This option sets ‘<samp><span class="samp">${packagedir}</span></samp>’.
- <p>Default value: <em>PREFIX/pkg</em>
- <br><dt>‘<samp><span class="samp">-p</span></samp>’<dd>Prune conflicts.
- <br><dt>‘<samp><span class="samp">-t</span></samp>’<dd>Target directory for linking.
- <p>This option sets ‘<samp><span class="samp">${targetdir}</span></samp>’.
- <p>Default value: <em>/</em>
- <br><dt>‘<samp><span class="samp">-V</span></samp>’<dd><em>graft(1)</em> very verbose.
- <br><dt>‘<samp><span class="samp">-w</span></samp>’<dd>Warn about the files that will be linked.
- <pre class="sp">
-
- </pre>
- <strong>Options for command ‘</strong><samp><span class="samp">pkgremove</span></samp><strong>’:</strong>
- <br><dt>‘<samp><span class="samp">-k</span></samp>’<dd>Keep (don't delete) package directory.
- <br><dt>‘<samp><span class="samp">-P</span></samp>’<dd>Remove from an installation tree.
- <p>This option sets ‘<samp><span class="samp">${packagedir}</span></samp>’.
- <p>Default value: <em>PREFIX/pkg</em>
- <br><dt>‘<samp><span class="samp">-p</span></samp>’<dd>Prune conflicts.
- <br><dt>‘<samp><span class="samp">-t</span></samp>’<dd>Target directory for unlinking.
- <p>This option sets ‘<samp><span class="samp">${targetdir}</span></samp>’.
- <p>Default value: <em>/</em>
- <br><dt>‘<samp><span class="samp">-V</span></samp>’<dd><em>graft(1)</em> very verbose.
- <pre class="sp">
-
- </pre>
- <strong>Options for command ‘</strong><samp><span class="samp">pkgupgrade</span></samp><strong>’:</strong>
- <br><dt>‘<samp><span class="samp">-k</span></samp>’<dd>Keep (don't delete) package directory.
- <br><dt>‘<samp><span class="samp">-P</span></samp>’<dd>Package installation tree.
- <p>This option sets ‘<samp><span class="samp">${packagedir}</span></samp>’.
- <p>Default value: <em>PREFIX/pkg</em>
- <br><dt>‘<samp><span class="samp">-t</span></samp>’<dd>Target directory.
- <p>This option sets ‘<samp><span class="samp">${targetdir}</span></samp>’.
- <p>Default value: <em>/</em>
- <br><dt>‘<samp><span class="samp">-V</span></samp>’<dd>Enable (very) verbose mode.
- <br><dt>‘<samp><span class="samp">-w</span></samp>’<dd>Warn about packages that will be upgraded.
- <pre class="sp">
-
- </pre>
- <strong>Options for command ‘</strong><samp><span class="samp">pkgbuild</span></samp><strong>’:</strong>
- <br><dt>‘<samp><span class="samp">-a</span></samp>’<dd>Architecture to use.
- <p>This option sets ‘<samp><span class="samp">${arch}</span></samp>’.
- <p>Default value is obtained via <em>uname(1)</em> as ‘<samp><span class="samp">uname -m</span></samp>’.
- <br><dt>‘<samp><span class="samp">-i</span></samp>’<dd>Increment release number.
- <p>This option increment the release number when a package is produced.
- <br><dt>‘<samp><span class="samp">-j</span></samp>’<dd>Parallel jobs for the compiler
- <p>This option sets ‘<samp><span class="samp">${jobs}</span></samp>’.
- <p>Default value: <em>1</em>
- <br><dt>‘<samp><span class="samp">-k</span></samp>’<dd>Keep (don't delete) ‘<samp><span class="samp">${srcdir}</span></samp>’ and ‘<samp><span class="samp">${destdir}</span></samp>’.
- <br><dt>‘<samp><span class="samp">-n</span></samp>’<dd>Don't create a .tlz package.
- <br><dt>‘<samp><span class="samp">-o</span></samp>’<dd>Where the produced packages are written.
- <p>This option sets ‘<samp><span class="samp">${outdir}</span></samp>’.
- <p>Default value: <em>/var/cache/qi/packages</em>
- <br><dt>‘<samp><span class="samp">-U</span></samp>’<dd>Perform package upgrade after build.
- <p>This option calls to <samp><span class="command">pkgupgrade</span></samp>.
- <pre class="sp">
-
- </pre>
- <strong>Options for command ‘</strong><samp><span class="samp">pkgorder</span></samp><strong>’:</strong>
- <br><dt>‘<samp><span class="samp">-x</span></samp>’<dd>Exclude depends file.
- <h3 class="section">2.1 Environment</h3>
- <p><a name="index-environment-3"></a>
- Some influential environment variables:
- <br><dt>‘<samp><span class="samp">QICFLAGS</span></samp>’<dd>C compiler flags for building packages.
- <p>Default value: <em>"-g0 -Os"</em>
- <br><dt>‘<samp><span class="samp">QICXXFLAGS</span></samp>’<dd>C++ compiler flags for building packages.
- <p>Default value: <em>"-g0 -Os"</em>
- <br><dt>‘<samp><span class="samp">QILDFLAGS</span></samp>’<dd>Linker flags for building packages.
- <p>Default value: <em>-s</em>
- <br><dt>‘<samp><span class="samp">DOPOST</span></samp>’<dd>post-install script control variable.
- <p>The <samp><span class="env">DOPOST</span></samp> variable is currently used for <samp><span class="command">pkgadd</span></samp>,
- <samp><span class="command">pkgupgrade</span></samp>, <samp><span class="command">pkgbuild</span></samp> (when option -U is given).
- <p>A different value than "DOPOST" omits the execution of the post-install
- script (if any).
- <br><dt>‘<samp><span class="samp">RC</span></samp>’<dd>Runtime configuration file.
- <p>A different value than "RC" overrides the configuration file.
- <p>This is used by: <samp><span class="command">pkgadd</span></samp>, <samp><span class="command">pkgremove</span></samp>,
- <samp><span class="command">pkgupgrade</span></samp>, <samp><span class="command">pkgbuild</span></samp>.
- <br><dt>‘<samp><span class="samp">TMPDIR</span></samp>’<dd>Temporary directory (by default <em>/tmp</em>).
- <p><samp><span class="env">TMPDIR</span></samp> is expanded with random numbers for major security.
- <p>This is used by: <samp><span class="command">pkgbuild</span></samp>, <samp><span class="command">pkgerupt</span></samp>.
- </dl>
- <h3 class="section">2.2 Notes</h3>
- <p><a name="index-notes-4"></a>
- <ul>
- <li>Command names has been prefixed with ‘<samp><span class="samp">pkg</span></samp>’ to facilitate the
- set in relation to its purpose.
- <li>The <em>PREFIX</em> reference is related with the installation
- prefix of Qi.
- <li>All the options can be mixed. Options specified in the
- command-line have priority over the config file <samp><span class="file">qirc</span></samp>.
- If there are no options, and if <samp><span class="file">qirc</span></samp> is not present,
- default (internal) values will be used instead.
- </ul>
- <div class="node">
- <a name="The-qirc-file"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Packages">Packages</a>,
- Previous: <a rel="previous" accesskey="p" href="#Invocation">Invocation</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">3 The qirc file</h2>
- <p><a name="index-the-qirc-file-5"></a>
- <samp><span class="file">qirc</span></samp> is the configuration file for Qi used at runtime during the
- installation, removal of a package or when a recipe is built. This
- file is optional, and it can be useful to define variables and
- configure external tools (such as a download manager) for default use.
- <ul>
- <li>Variables are declared as ‘<samp><span class="samp">name=value</span></samp>’.
- <li>Declaration of values should only take one line, no line break.
- <li>Assignments like ‘<samp><span class="samp">name=$var</span></samp>’ are only interpreted as
- literal.
- </ul>
- <p class="noindent">The options specified in the command-line can override the values
- specified in the configuration file. For more information, see
- <a href="#Invocation">Invocation</a>.
- <p class="noindent">The order in which Qi looks for this file is:
- <ol type=1 start=1>
- <li><samp><span class="env">${HOME}/.qirc</span></samp>
- Effective user.
- <li>‘<samp><span class="samp">${sysconfdir}/qirc</span></samp>’
- System-wide.
- </ol>
- <p>If you intend to run Qi for a specific user, you should copy the file
- ‘<samp><span class="samp">${sysconfdir}/qirc</span></samp>’ to <samp><span class="env">${HOME}/.qirc</span></samp> setting
- ‘<samp><span class="samp">${packagedir}</span></samp>’ and ‘<samp><span class="samp">${targetdir}</span></samp>’ for your <samp><span class="env">$HOME</span></samp>.
- <div class="node">
- <a name="Packages"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Recipes">Recipes</a>,
- Previous: <a rel="previous" accesskey="p" href="#The-qirc-file">The qirc file</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">4 Packages</h2>
- <p><a name="index-packages-6"></a>
- 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>The Qi package format is a simple redistributable <em>tar(1)</em> archive
- compressed with <em>lzip(1)</em>. The package extension ends in ".tlz".
- <p class="noindent">Both package installation and package deinstallation are managed using
- ‘<samp><span class="samp">${packagedir}</span></samp>’ and ‘<samp><span class="samp">${targetdir}</span></samp>’:
- <p>‘<samp><span class="samp">${packagedir}</span></samp>’ is a common directory tree where the package contents
- is decompressed (resides). By default the tree is located at
- <em>PREFIX/pkg</em>.
- <p>‘<samp><span class="samp">${targetdir}</span></samp>’ is a target directory where the links will be
- made taking ‘<samp><span class="samp">${packagedir}/package_name</span></samp>’ into account.
- <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 co-exist on the one system.
- <p>All the links to install or to remove a package are managed using
- <em>graft(1)</em>. Since multiple packages can be installed or removed
- at the same time, certain conflicts may arise between the packages.
- <p>According to the User's Guide of Graft<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>,
- a conflict is defined as one of the following conditions:
- <ul>
- <li>If the package object is a directory and the target object exists
- but is not a directory.
- <li>If the package object is not a directory and the target object
- exists and is not a symbolic link.
- <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.
- </ul>
- <p class="noindent">Qi's default behavior is to not proceed with the installation when a
- conflict occurs. But when a package that is going to be removed is in
- conflict with another package, <em>graft(1)</em> removes those parts that
- are not in conflict, leaving the links belonging to the original
- package. This behavior can be changed if the option -p is specified
- (see the examples below).
- <h3 class="section">4.1 Adding packages</h3>
- <p><a name="index-adding-packages-7"></a>
- This sort order is particularly useful just before the actual package
- installation, because it helps to understand how the package
- installation works:
- <ol type=1 start=1>
- <li>Detects and reports if the package is already installed.
- <li>Ignores some signals up to completing the installation:
- HUP INT QUIT ABRT TERM.
- <li>The integrity of the file (package) is checked.
- <li>Creates required directory for the package as
- ‘<samp><span class="samp">${packagedir}/package_name</span></samp>’.
- <li>Decompress the content of the package in
- ‘<samp><span class="samp">${packagedir}/package_name</span></samp>’.
- <li>A test of the package is performed before completing the
- installation to see if there are no conflicts with another package.
- This is the default behavior if -p is not supplied.
- <li><em>graft(1)</em> is invoked to install symbolic links from
- the package installation directory to the target directory.
- <li>If the meta file is readable, the description will be shown for
- the package.
- <li>Run post install instructions from <samp><span class="file">post-install</span></samp>, if any.
- </ol>
- <p class="noindent"><em>Usage:</em> pkgadd [-hfpVw] [-P <DIR>] [-t <DIR>] [package.tlz ...]
- <p>To install a single package, simply type:
- <pre class="example"> pkgadd coreutils-8.24-x86_64+1.tlz
- </pre>
- <p>To install multiple packages at once:
- <pre class="example"> pkgadd gcc-4.9.3-x86_64+1.tlz rafaela-2.2-i586+1.tlz ...
- </pre>
- <p>Warn about the files that will be linked:
- <pre class="example"> pkgadd -w gcc-4.9.3-x86_64+1.tlz
- </pre>
- <ul>
- <li>This is to verify the content of a package before installing it.
- </ul>
- <p>See what happens when a package is installed (very verbose):
- <pre class="example"> pkgadd -V mariana-3.0-x86_64+1.tlz
- </pre>
- <ul>
- <li>This is for a detailed (long) output.
- </ul>
- <p>Installing in a different directory tree and target:
- <pre class="example"> pkgadd -P /tmp/pkgdir -T /tmp/targetdir lzip-1.17-i586+1.tlz
- </pre>
- <p>When a package is already installed, <samp><span class="command">pkgadd</span></samp> refuses to
- continue. This is to keep some control over the database of your
- packages, if you really want to force the installation of a package,
- you can use the -f option (which implies -p). See below.
- <p><strong>Pruning conflicts</strong>
- <p>Remove objects (files, links or directories) from the target
- directory that are in conflict with the package directory:
- <pre class="example"> pkgadd -p zutils-1.4-x86_64+1.tlz
- </pre>
- <p>When the -p option is used, it proceeds to install the package
- normally, but first will try to remove any conflict. Use it with care,
- combine this option with -V.
- <h3 class="section">4.2 Removing packages</h3>
- <p><a name="index-removing-packages-8"></a>
- This sort order is particularly useful just before the actual package
- deinstallation, because it helps to understand how the package
- deinstallation works:
- <ol type=1 start=1>
- <li>Look for a package name to remove inside of
- ‘<samp><span class="samp">${packagedir}</span></samp>’. Package names must be specified using the full
- package name, such as "name-version-arch+release.tlz" or specifying the
- package name directory.
- <li>Ignores some signals up to completing the deinstallation:
- HUP INT QUIT ABRT TERM.
- <li><em>graft(1)</em> is invoked to remove symbolic links from
- the package installation directory to the target directory:
- <p>If a conflict exists with another package, those links that are not in
- conflict will be preserved. It's possible to prune all the conflicts
- using the -p option.
- <li>Remove directories made empty by package deletion. This has
- effect on ‘<samp><span class="samp">${targetdir}</span></samp>’ but not for ‘<samp><span class="samp">${packagedir}</span></samp>’.
- <li>The package directory is deleted if the option -k is not
- supplied.
- </ol>
- <p class="noindent"><em>Usage:</em> pkgremove [-hkpV] [-P <DIR>] [-t <DIR>] [package_name ...]
- <p>To remove a package, just execute the command:
- <pre class="example"> pkgremove xz-5.2.2-x86_64+1
- </pre>
- <p>To remove multiple versions of the same package:
- <pre class="example"> pkgremove xz*
- </pre>
- <p>To remove multiple packages at once:
- <pre class="example"> pkgremove foo bar baz ...
- </pre>
- <p>Detailed output (very verbose):
- <pre class="example"> pkgremove -V xz-5.2.2-x86_64+1
- </pre>
- <p>Removing from a different directory tree and target:
- <pre class="example"> pkgremove -P /tmp/pkgdir -T /tmp/targetdir lzip-1.17-x86_64+1
- </pre>
- <p>Pruning conflicts:
- <pre class="example"> pkgremove -p -V hunter
- </pre>
- <h3 class="section">4.3 Upgrading packages</h3>
- <p><a name="index-upgrading-packages-9"></a>
- This sort order is particularly useful just before the actual package
- upgrade, because it helps to understand how the package upgrade works:
- <ol type=1 start=1>
- <li>Prepare temporary location for the incoming package.
- <li>Pre-install incoming package into the temporary location.
- <li>Remove packages under the same name: this is considered
- as the old packages. (Default behaviour if -k is not supplied).
- <li>Upgrade or install the package calling to <samp><span class="command">pkgadd</span></samp>.
- <li>Delete temporary location of the package.
- </ol>
- <p class="noindent"><em>Usage:</em> pkgupgrade [-hkVw] [-P <DIR>] [-t <DIR>] [package.tlz ...]
- <p>Upgrading a package is simple as:
- <pre class="example"> pkgupgrade coreutils-8.25-x86_64+1.tlz
- </pre>
- <p class="noindent">‘<samp><span class="samp">pkgupgrade</span></samp>’ uses <samp><span class="command">pkgadd</span></samp> and <samp><span class="command">pkgremove</span></samp> to
- upgrade software packages. So it inherits the properties of each
- utility, except here, only the essential options are provided. For
- example, the option -V (for a detailed output) belongs to when these
- utilities are invoked. The options -P and -t work in the same way as
- the previous examples for <samp><span class="command">pkgadd</span></samp>, <samp><span class="command">pkgremove</span></samp>.
- ‘<samp><span class="samp">pkgupgrade</span></samp>’ will try to update the package or to install it
- (in case it has not been installed).
- <p>To see what packages will be updated (if any), always type:
- <pre class="example"> pkgupgrade -w coreutils-8.25-x86_64+1.tlz
- </pre>
- <h3 class="section">4.4 Notes</h3>
- <p><a name="index-notes-10"></a>
- <ul>
- <li>Some signals like HUP INT QUIT ABRT TERM are ignored on the
- package installation or deinstallation. The intention is to ignore
- the cancellation while the package is being installed or removed (e.g.
- Ctrl+C, terminal window closed, etc.). The installation or removal
- of a package can be crucial for the proper functioning of the system.
- <li>The meta file is read from the directory where the package is
- found.
- <li>A post-install script is read from
- ‘<samp><span class="samp">${packagedir}/package_name/var/lib/qi/post-install/name.install</span></samp>’.
- <li>Default behavior is to upgrade or install a package removing old
- packages, this is "packages found under the same name". If you want to
- preserve the multiple versions of the same package, you must pass the
- -k option.
- </ul>
- <div class="node">
- <a name="Recipes"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Order-files">Order files</a>,
- Previous: <a rel="previous" accesskey="p" href="#Packages">Packages</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">5 Recipes</h2>
- <p><a name="index-recipes-11"></a>
- 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>A recipe has two parts: a list of variable definitions and a list of
- sections. By convention, the syntax of a section is:
- <pre class="example"> section_name() {
- section lines
- }
- </pre>
- <p>The section name is followed by parentheses, one space 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><span class="samp">build</span></samp>’.
- <p>The ‘<samp><span class="samp">build</span></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.
- <h3 class="section">5.1 Variables</h3>
- <p><a name="index-variables-12"></a>
- A "variable" is a <strong>shell variable</strong> defined either in <samp><span class="file">qirc</span></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>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 in, or anything else you can imagine.
- <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><span class="file">qirc</span></samp> file, while variables defined in the recipe
- override those specified in <samp><span class="file">qirc</span></samp>, taking priority over those
- variables settled by options via command-line. Finally, some variables
- (arch, jobs, outdir, worktree, tardir, netget, rsync) have default
- values if they are not defined anywhere.
- <p>Options that set variables through the command-line can only reference
- variables defined in <samp><span class="file">qirc</span></samp> and variables with default values.
- <p>Definitions of variables in <samp><span class="file">qirc</span></samp> can only reference variables
- previously defined in <samp><span class="file">qirc</span></samp> and variables with default values.
- <p>Definitions of variables in the recipe can only reference variables
- settled by command-line, variables previously defined in the recipe,
- variables defined in <samp><span class="file">qirc</span></samp>, and variables with default values.
- <h4 class="subsection">5.1.1 Special variables</h4>
- <p><a name="index-special-variables-13"></a>
- The three variables ‘<samp><span class="samp">arch</span></samp>’, ‘<samp><span class="samp">jobs</span></samp>’, and ‘<samp><span class="samp">outdir</span></samp>’ can
- only be set using command line options or in <samp><span class="file">qirc</span></samp>. If not
- specified, they have default values.
- <p>‘<samp><span class="samp">arch</span></samp>’ is the architecture to compose the package name. Its
- value is available in the recipe as ‘<samp><span class="samp">${arch}</span></samp>’. Default value is
- the output of ‘<samp><span class="samp">uname -m</span></samp>’.
- <p>‘<samp><span class="samp">jobs</span></samp>’ is the number of jobs to pass to the compiler. Its
- default value is available in the recipe as ‘<samp><span class="samp">${jobs}</span></samp>’. Defaults
- to ‘<samp><span class="samp">1</span></samp>’.
- <p>‘<samp><span class="samp">outdir</span></samp>’ is the directory where the produced packages are
- written. This variable cannot be redefined in the recipe. Defaults to
- ‘<samp><span class="samp">/var/cache/qi/packages</span></samp>’.
- <p>‘<samp><span class="samp">worktree</span></samp>’ is the working tree where archives, patches, and
- recipes are expected. This variable cannot be redefined in the
- recipe. Defaults to ‘<samp><span class="samp">/usr/src/qi</span></samp>’.
- <p>The variable ‘<samp><span class="samp">tardir</span></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 commonly used as ‘<samp><span class="samp">${tardir}/$tarname</span></samp>’. A value
- of ‘<samp><span class="samp">.</span></samp>’ for ‘<samp><span class="samp">tardir</span></samp>’ sets it to the value of the CWD (Current
- Working Directory), this means, from where the recipe is located.
- <p>The two variables ‘<samp><span class="samp">srcdir</span></samp>’ and ‘<samp><span class="samp">destdir</span></samp>’ can be defined in
- the recipe, as any other variable, but if they are not, Qi uses default
- values for them when building the package.
- <p>‘<samp><span class="samp">srcdir</span></samp>’ contains the source code to be compiled, and defaults to
- ‘<samp><span class="samp">${program}-${version}</span></samp>’.
- <p>‘<samp><span class="samp">destdir</span></samp>’ is the place where the built package will be installed,
- and defaults to ‘<samp><span class="samp">${TMPDIR}/package-${program}</span></samp>’.
- <p>If ‘<samp><span class="samp">pkgname</span></samp>’ is left undefined, the special variable
- ‘<samp><span class="samp">program</span></samp>’ is assigned by default. If ‘<samp><span class="samp">pkgversion</span></samp>’ is left
- undefined, the special variable ‘<samp><span class="samp">version</span></samp>’ is assigned by default.
- <p>‘<samp><span class="samp">pkgname</span></samp>’, ‘<samp><span class="samp">pkgversion</span></samp>’, along with ‘<samp><span class="samp">version</span></samp>’,
- ‘<samp><span class="samp">arch</span></samp>’, and ‘<samp><span class="samp">release</span></samp>’, are used to produce the name of the
- package in the form
- ‘<samp><span class="samp">${pkgname}-${pkgversion}-${arch}+${release}.tlz</span></samp>’. All of
- them must be defined in the recipe, excepting ‘<samp><span class="samp">arch</span></samp>’, which is
- optional.
- <ul>
- <li>‘<samp><span class="samp">program</span></samp>’: name of the package.
- <li>‘<samp><span class="samp">version</span></samp>’: version of the package.
- <li>‘<samp><span class="samp">arch</span></samp>’: architecture of the package.
- <li>‘<samp><span class="samp">release</span></samp>’: release number of the package. It is recommended to
- increase this number after any significant change in the recipe is made.
- </ul>
- <p class="noindent">Obtaining sources over the network must be declared in the recipe using
- the ‘<samp><span class="samp">fetch</span></samp>’ variable. Use double quotes for separated values.
- <p>The variables ‘<samp><span class="samp">netget</span></samp>’ and ‘<samp><span class="samp">rsync</span></samp>’ can be defined in
- <samp><span class="file">qirc</span></samp> to establish a network downloader in order to get the
- sources. If they are not defined, qi uses default values:
- <p>‘<samp><span class="samp">netget</span></samp>’ is the general network downloader tool for use, and
- defaults to ‘<samp><span class="samp">wget -c -w1 -t3 --no-check-certificate</span></samp>’.
- <p>‘<samp><span class="samp">rsync</span></samp>’ is the network tool for sources containing the prefix for
- the RSYNC protocol, and defaults to
- ‘<samp><span class="samp">rsync -v -a -L -z -i --progress</span></samp>’.
- <p class="noindent">There are three important variables to produce meta information of the
- package: ‘<samp><span class="samp">description</span></samp>’, ‘<samp><span class="samp">homepage</span></samp>’, ‘<samp><span class="samp">license</span></samp>’.
- <p>The variable ‘<samp><span class="samp">description</span></samp>’ is special to write the description of the
- package, which will be shown when installed.
- <p>A description has two parts: a brief description and a long
- description. By convention, the syntax of a description is:
- <pre class="example"> description="
- Brief description.
-
- Long description.
- "
- </pre>
- <p class="noindent">The first (substantial) line of the value is a brief description of the
- software (called the "blurb"). A new (blank) line is followed to
- separate the brief description from the long description.
- <p>An example looks like:
- <pre class="example"> description="
- A source builder and a package manager.
-
- Qi is a source builder and a package manager. It contains a set of
- tools to build, install, remove, and upgrade software packages.
-
- Qi follows the philosophy of the simplicity without adding too many
- features, such as those that can be found in popular package managers.
- Basically it does two things: builds packages and manages them.
- "
- </pre>
- <ul>
- <li>Consider a length limit of 78 characters as maximum.
- See <a href="#Recipes">The meta file</a>.
- </ul>
- <p class="noindent">The ‘<samp><span class="samp">homepage</span></samp>’ variable is used simply to declare the main site or
- home of the source, thus:
- <pre class="example"> homepage=http://www.dragora.org
- </pre>
- <p class="noindent">The variable ‘<samp><span class="samp">license</span></samp>’ is used for license information<a rel="footnote" href="#fn-2" name="fnd-2"><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.
- <pre class="example"> license="LGPL, GPL | Artistic, GPL + added permission"
- </pre>
- <h4 class="subsection">5.1.2 Variables from the environment</h4>
- <p><a name="index-variables-from-the-environment-14"></a>
- The variables <samp><span class="env">QICFLAGS</span></samp>, <samp><span class="env">QICXXFLAGS</span></samp>, and <samp><span class="env">QILDFLAGS</span></samp> have
- no effect by default. The environment variables such as <samp><span class="env">CFLAGS</span></samp>,
- <samp><span class="env">CXXFLAGS</span></samp>, and <samp><span class="env">LDFLAGS</span></samp> are unset at compile time.
- <p>Recommended practices is to set variables in front of ‘<samp><span class="samp">configure</span></samp>’
- or in front of <em>make(1)</em> instead of exporting to the environment.
- As follows:
- <blockquote>
- 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><span class="samp">VAR=value</span></samp>’. For
- example:
- <p><code>./configure CC=/usr/local2/bin/gcc</code>
- <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>
- </blockquote>
- <blockquote>
- Indeed, while configure can notice the definition of CC in ‘<samp><span class="samp">./configure
- CC=bizarre-cc</span></samp>’, it is impossible to notice it in ‘<samp><span class="samp">CC=bizarre-cc
- ./configure</span></samp>’, which, unfortunately, is what most users do.
- <p>[...]
- <p>configure: error: changes in the environment can compromise the build.
- <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>
- </blockquote>
- <blockquote>
- 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><a href="http://gnu.org/software/make/manual/make.html#Environment">http://gnu.org/software/make/manual/make.html#Environment</a>
- </blockquote>
- <h3 class="section">5.2 The meta file</h3>
- <p><a name="index-the-meta-file-15"></a>
- The "meta file" is an external file created by <samp><span class="command">pkgbuild</span></samp> when
- a recipe is processed and when a package is produced. The file is
- generated as ‘<samp><span class="samp">${full_pkgname}.tlz.txt</span></samp>’ which contains
- information about the package such as ‘<samp><span class="samp">program</span></samp>’, ‘<samp><span class="samp">version</span></samp>’,
- ‘<samp><span class="samp">release</span></samp>’. Also definitions of the special variables
- ‘<samp><span class="samp">fetch</span></samp>’, ‘<samp><span class="samp">description</span></samp>’, ‘<samp><span class="samp">homepage</span></samp>’, ‘<samp><span class="samp">license</span></samp>’.
- <p>A meta file has the purpose to extract information and the purpose to
- reflect essential information to the user without having to check
- inside the package itself.
- <p>The meta file is basically composed as:
- <pre class="example"> # Description
-
- variable=value
- ...
- </pre>
- <p class="noindent">The description is extracted from the declared variable
- ‘<samp><span class="samp">description</span></samp>’, where each line is interpreted literally and where
- the description is pre-formatted to fit in (exactly) 80 columns. Plus
- ‘<samp><span class="samp"># </span></samp>’ is prepend to each line.
- <p>Followed by new line, the rest is composed by variables; the inclusion
- of its values, may vary. For example, in addition to the special
- variables, there are implicit variables such as ‘<samp><span class="samp">blurb</span></samp>’,
- ‘<samp><span class="samp">depends</span></samp>’.
- <p>The ‘<samp><span class="samp">blurb</span></samp>’ variable is related to the special variable
- ‘<samp><span class="samp">description</span></samp>’. Always taking the first (substantial) line
- or "brief description".
- <p>The value of ‘<samp><span class="samp">depends</span></samp>’ only will be included if the
- <samp><span class="file">depends</span></samp> file is a regular file. See <a href="#Order-files">The depends file</a>.
- <p class="noindent">Now let's take a look on a real example of a meta file:
- <pre class="example"> # A lossless data compressor based on the LZMA algorithm.
- #
- # Clzip is a lossless data compressor with a user interface similar to
- # the one of gzip or bzip2. Clzip is about as fast as gzip, compresses
- # most files more than bzip2, and is better than both from a data
- # recovery perspective.
- #
- # Clzip uses the lzip file format; the files produced by clzip are fully
- # compatible with lzip-1.4 or newer, and can be rescued with lziprecover.
- #
- # Clzip is in fact a C language version of lzip, intended for embedded
- # devices or systems lacking a C++ compiler.
-
- QICFLAGS="-g0 -Os"
- QICXXFLAGS="-g0 -Os"
- QILDFLAGS="-s"
- program=clzip
- version=1.8
- release=1
- blurb="A lossless data compressor based on the LZMA algorithm."
- homepage="http://lzip.nongnu.org/clzip.html"
- license="GPLv2+"
- fetch="http://download.savannah.gnu.org/releases/lzip/clzip/clzip-1.8.tar.gz"
- depends=" "
-
- </pre>
- <p>Creation of the meta file is made in ‘<samp><span class="samp">${outdir}</span></samp>’.
- <h3 class="section">5.3 Building packages</h3>
- <p><a name="index-building-packages-16"></a>
- This sort order is particularly useful just before the actual package
- build, because it helps to understand how a package is being built:
- <ol type=1 start=1>
- <li>A recipe is read from the current directory, if not, it will be
- looked in ‘<samp><span class="samp">${worktree}/recipes</span></samp>’. Names of recipes can be
- invoked relative to ‘<samp><span class="samp">${worktree}/recipes</span></samp>’. The recipe must be
- a regular file and must be readable by the user who is running the
- command.
- <li>Checks are made when the recipe is imported (included), essential
- variable names cannot be empty: ‘<samp><span class="samp">program</span></samp>’, ‘<samp><span class="samp">version</span></samp>’,
- ‘<samp><span class="samp">release</span></samp>’. Also the main function ‘<samp><span class="samp">build()</span></samp>’ must be present.
- <li><samp><span class="command">pkgbuild</span></samp> tries to obtain the sources remotely if it
- does not exist locally (‘<samp><span class="samp">${tardir}</span></samp>’). Once the source is
- already in place, its timestamp is updated, creating or updating the
- SHA1 sum.
- <li>Required directories are created: ‘<samp><span class="samp">${TMPDIR}/$srcdir</span></samp>’,
- ‘<samp><span class="samp">${outdir}</span></samp>’, ‘<samp><span class="samp">${destdir}/var/lib/qi/recipes</span></samp>’.
- <li>Sane ownerships and permissions are applied to the full source
- directory: ‘<samp><span class="samp">${TMPDIR}/$srcdir</span></samp>’.
- <li>The main function ‘<samp><span class="samp">build()</span></samp>’ is called. Exits immediately if
- a command exits with a non-zero status.
- <li>A package is going to be created under the following conditions:
- <ul>
- <li>If ‘<samp><span class="samp">${destdir}</span></samp>’ is not empty.
- <li>If the option -n was not given.
- </ul>
- <p>A copy of the recipe (file) is included on
- ‘<samp><span class="samp">${destdir}/var/lib/qi/recipes</span></samp>’ as ‘<samp><span class="samp">${full_pkgname}.recipe</span></samp>’.
- <p>If the <samp><span class="file">post-install</span></samp> script is in the current working directory
- or from where the recipe name resides, it will be added as
- ‘<samp><span class="samp">${destdir}/var/lib/qi/post-install/${full_pkgname}.install</span></samp>’.
- <p>The package is produced from the content of ‘<samp><span class="samp">${destdir}</span></samp>’. First,
- creating a tarball, and then compressing it using the maximum level of
- compression of <em>lzip(1)</em>.
- <li>By default, directories like ‘<samp><span class="samp">${TMPDIR}/$srcdir</span></samp>’ and
- ‘<samp><span class="samp">${destdir}</span></samp>’ are deleted.
- <li>If the option -U is given, <samp><span class="command">pkgupgrade</span></samp> is invoked to
- install or upgrade the package.
- </ol>
- <p class="noindent"><em>Usage:</em> pkgbuild [-hiknU] [-a <ARCH>] [-j <JOBS>] [-o <DIR>] [recipe ...]
- <p>To build a single package, simply type:
- <pre class="example"> pkgbuild clzip.recipe
- </pre>
- <p>Compile passing parallel jobs to the compiler for speed up the process:
- <pre class="example"> pkgbuild -j4 clzip.recipe
- </pre>
- <p>To build and install or upgrade multiple packages at once:
- <pre class="example"> pkgbuild -U clzip.recipe zutils.recipe matias.recipe
- </pre>
- <p>Reading recipes and building from the output of a command:
- <pre class="example"> cat depends | pkgbuild -
- </pre>
- <p>Incrementing the release number after a significant change in a recipe:
- <pre class="example"> pkgbuild -i stargazer.recipe
- </pre>
- <p class="noindent">If the recipe name cannot be read from the current directory or from
- a specific path name, ‘<samp><span class="samp">${worktree}/recipes</span></samp>’ is used for the
- search:
- <p>There is a special case for the names of recipes ‘<samp><span class="samp">recipe</span></samp>’.
- <samp><span class="command">pkgbuild</span></samp> can complete the recipe name without being required
- to be specified in the command-line, only if the name of the recipe is
- ‘<samp><span class="samp">recipe</span></samp>’. For example:
- <pre class="example"> pkgbuild devel/gcc
- </pre>
- <p>Will complete the search as ‘<samp><span class="samp">${worktree}/recipes/devel/gcc/recipe</span></samp>’.
- <h3 class="section">5.4 Writing recipes</h3>
- <p><a name="index-writing-recipes-17"></a>
- <h4 class="subsection">5.4.1 Internal functions</h4>
- <p><a name="index-internal-functions-18"></a>
- Some internal functions are available to be applied on the recipe:
- <dl>
- <dt>‘<samp><span class="samp">unpack()</span></samp>’<dd>The unpack function can decompress multiple (compressed) files while
- verifies the integrity. Depending on where the function is called,
- the decompression occurs in the current working directory.
- <p>Usage: <code>unpack file(s) ...</code>
- <p>The cases supported for the special extensions are: *.tar, *.tar.*,
- *.tgz*, *.tbz*, *.tlz*, *.txz*, *.zip, *.ZIP, *.gz, *.bz2, *.lz.
- </dl>
- <div class="node">
- <a name="Order-files"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Examine-packages">Examine packages</a>,
- Previous: <a rel="previous" accesskey="p" href="#Recipes">Recipes</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">6 Order files</h2>
- <p><a name="index-g_t_002eorder-files-19"></a>
- <samp><span class="command">pkgorder</span></samp> has the purpose to resolve the build order through
- .order files. In other words, is a good complement for
- <samp><span class="command">pkgbuild</span></samp>.
- <p class="noindent"><em>Usage:</em> pkgorder [-x] [file_name.order ...]
- <p class="noindent">Basically, <samp><span class="command">pkgorder</span></samp> reads from a declared file which ends in
- ".order". The output is an ordered list of recipe names which can be
- passed to <samp><span class="command">pkgbuild</span></samp> (via a pipe) to build a number or a series
- of packages.
- <p><span class="sc">Declaration</span>
- <p>If 'a' depends on 'b' and 'c', and 'c' depends on 'b' as well, the file
- might look like:
- <pre class="example"> a.recipe: c.recipe b.recipe
- b.recipe:
- c.recipe: b.recipe
- </pre>
- <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><span class="sc">Output</span>
- <pre class="example"> b.recipe
- c.recipe
- a.recipe
- </pre>
- <ul>
- <li>Commented lines starting with a '#' are allowed. Blank lines,
- colons, parentheses, and end of line are removed.
- </ul>
- <h3 class="section">6.1 The depends file</h3>
- <p><a name="index-the-depends-file-20"></a>
- When <samp><span class="command">pkgorder</span></samp> read from an order file; by default, it will
- proceed to read the dependencies of each recipe. This behavior can be
- omitted if the -x option is given.
- <p>The procedure for reading the dependencies of each recipe is
- extracting the directory location where the order file resides. Then
- it iterates over the declared items extracting its location in search
- of the special file <samp><span class="file">depends</span></samp>.
- <ul>
- <li>The <samp><span class="file">depends</span></samp> file only is read (sequentially) if it is
- a regular file and is not empty.
- </ul>
- <p class="noindent">The special file <samp><span class="file">depends</span></samp> must contain a list of prerequisites
- for the recipe. Prerequisites are names of valid recipes, including
- its location. The location must be relative to ‘<samp><span class="samp">${worktree}</span></samp>’
- (variable described in <a href="#Recipes">Recipes</a>).
- <p>Example of a <samp><span class="file">depends</span></samp> file declared for <em>bash.recipe</em>:
- <pre class="example"> libs/readline/readline.recipe
- </pre>
- <p>Then, if <em>core/bash/bash.recipe</em> has been declared on
- <em>core.order</em>, the output would be:
- <pre class="example"> ...
- libs/readline/readline.recipe
- core/bash/bash.recipe
- ...
- </pre>
- <p>Combined in a pipe, <em>readline</em> represents the first dependency
- of <em>bash</em>:
- <pre class="example"> <code>pkgorder core.order | pkgbuild -U -</code>
- </pre>
- <div class="node">
- <a name="Examine-packages"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Messages">Messages</a>,
- Previous: <a rel="previous" accesskey="p" href="#Order-files">Order files</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">7 Examine packages</h2>
- <p><a name="index-examine-packages-21"></a>
- <samp><span class="command">pkgerupt</span></samp> is a special command to examine packages for
- debugging purposes.
- <p class="noindent"><em>Usage:</em> pkgerupt [-h] [package.tlz ...]
- <p>When a package name is given <samp><span class="command">pkgerupt</span></samp> will create a random
- directory for the package. The prefix directory where the random
- directory is created is controlled by the <samp><span class="env">TMPDIR</span></samp> variable,
- by default <samp><span class="env">TMPDIR</span></samp> is assigned to <em>/tmp</em>. Creation mode
- is "u=,g=rwx,o=rwx" (0700).
- <p>The extraction to inspecting a package is equivalent to the shell
- instruction:
- <pre class="example"> <code>( umask 000 && cd -- $PRVDIR && lzip -cd - | tar -xf - ) < $file</code>
- </pre>
- <p>The package content is decompressed in the random (private) directory
- via pipe. Creation mode is "u=rwx,g=rwx,o=rwx" (0777).
- <p>If there is any substantial change, consider increasing the build
- number when repackaging: edit the value of the ‘<samp><span class="samp">release</span></samp>’ variable
- (recipe), compose the output file using the new number.
- <div class="node">
- <a name="Messages"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Exit-status">Exit status</a>,
- Previous: <a rel="previous" accesskey="p" href="#Examine-packages">Examine packages</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">8 Messages</h2>
- <p><a name="index-output-messages-22"></a>
- Some symbols are used for output messages to help to identify
- the messages shown by the tools in Qi. There are four simple
- categories where the symbols are represented:
- <pre class="sp">
- </pre>
- <strong>Specifics</strong>
- <p>This symbols are unique to identify the running tool:
- <dl>
- <dt>‘<samp><span class="samp">+</span></samp>’<dd>This symbol belongs to the <samp><span class="command">pkgadd</span></samp> tool.
- <br><dt>‘<samp><span class="samp">-</span></samp>’<dd>This symbol belongs to the <samp><span class="command">pkgremove</span></samp> tool.
- <br><dt>‘<samp><span class="samp">~</span></samp>’<dd>This symbol belongs to the <samp><span class="command">pkgupgrade</span></samp> tool.
- <br><dt>‘<samp><span class="samp">#</span></samp>’<dd>This symbol belongs to the <samp><span class="command">pkgbuild</span></samp> tool.
- <br><dt>‘<samp><span class="samp">=</span></samp>’<dd>This symbol belongs to the <samp><span class="command">pkgerupt</span></samp> tool.
- <br><dt>‘<samp><span class="samp">%</span></samp>’<dd>This symbol is used to scan a package or to warn when
- the option is used.
- <p>Specific symbols are enclosed between ‘<samp><span class="samp">( )</span></samp>’.
- </dl>
- <dl>
- <strong>Preventive</strong>
- <p>Preventive symbols are intended to alert the user about unforeseen
- or important situations, and to meet requirements before proceeding:
- <dt>‘<samp><span class="samp">*</span></samp>’<dd>Normally used for testing compressed sources, obtain remote sources,
- or set system permissions.
- <p>Preventive symbols are enclosed between ‘<samp><span class="samp">[ ]</span></samp>’.
- </dl>
- <dl>
- <strong>Informative</strong>
- <p>Informative symbols are intended to inform users the most essential
- tasks during the execution:
- <dt>‘<samp><span class="samp">i</span></samp>’<dd>Symbol used when a task is going to be performed or when a task has
- been completed.
- <br><dt>‘<samp><span class="samp">!</span></samp>’<dd>This symbol informs about deleting files.
- <p>Informative symbols are enclosed between ‘<samp><span class="samp">[ ]</span></samp>’.
- </dl>
- <p><strong>Transitory</strong>
- <p>Transitory symbols are part for occasional changes (‘<samp><span class="samp">@</span></samp>’) but no
- less important. Also to invoke Qi tools externally (‘<samp><span class="samp">^</span></samp>’).
- <p>Transitory symbols are enclosed between ‘<samp><span class="samp">{ }</span></samp>’.
- <div class="node">
- <a name="Exit-status"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#GNU-Free-Documentation-License">GNU Free Documentation License</a>,
- Previous: <a rel="previous" accesskey="p" href="#Messages">Messages</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="chapter">9 Exit status</h2>
- <p><a name="index-exit-codes-23"></a>
- All the conditions of exit codes are described in this chapter.
- <dl>
- <dt>‘<samp><span class="samp">0</span></samp>’<dd>Successful completion (no errors).
- <br><dt>‘<samp><span class="samp">1</span></samp>’<dd><strong>Minor common errors:</strong>
- <ul>
- <li>Illegal option.
- <li>Option requires an argument.
- <li>Internal function to load not found.
- <li>Program (prerequisite) is not available.
- </ul>
- <br><dt>‘<samp><span class="samp">2</span></samp>’<dd><strong>Command execution error</strong>
- <p>Evaluation of external commands or shell arguments. If it fails,
- returns 2.
- <br><dt>‘<samp><span class="samp">3</span></samp>’<dd><strong>Integrity check error for compressed files</strong>
- <p>Compressed files means:
- <ul>
- <li>All the tarballs supported by <em>tar(1)</em>.
- <li>Zip files supported by <em>unzip(1)</em>.
- <li>Gzip files supported by <em>gzip(1)</em>.
- <li>Bzip2 files supported by <em>bzip2(1)</em>.
- <li>Lzip files supported by <em>lzip(1)</em>.
- </ul>
- <br><dt>‘<samp><span class="samp">4</span></samp>’<dd><strong>File empty, not regular, or expected</strong>
- <p>Commonly, it is expected:
- <ul>
- <li>A binary package (.tlz).
- <li>An installed package to remove.
- <li>A recipe file.
- <li>A file of order (.order).
- </ul>
- <br><dt>‘<samp><span class="samp">5</span></samp>’<dd><strong>Empty or not defined variable</strong>
- <p>This exit code is used for reporting about empty or undefined variables.
- Usually, variables of the recipe or assigned arrays that are tested.
- <br><dt>‘<samp><span class="samp">6</span></samp>’<dd><strong>Package already installed</strong>
- <p>The package directory for an incoming package already exists.
- <br><dt>‘<samp><span class="samp">10</span></samp>’<dd><strong>Network manager error</strong>
- <p>Exit status from the execution of the network manager tool and its
- arguments.
- </dl>
- <p class="noindent"><p><table class="cartouche" summary="cartouche" border="1"><tr><td>
- Error messages are reported to the standard error.
- </td></tr></table>
- <div class="node">
- <a name="GNU-Free-Documentation-License"></a>
- <p><hr>
- Next: <a rel="next" accesskey="n" href="#Index">Index</a>,
- Previous: <a rel="previous" accesskey="p" href="#Exit-status">Exit status</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="appendix">Appendix A GNU Free Documentation License</h2>
- <!-- The GNU Free Documentation License. -->
- <div align="center">Version 1.3, 3 November 2008</div>
- <!-- This file is intended to be included within another document, -->
- <!-- hence no sectioning command or @node. -->
- <pre class="display"> Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
- <a href="http://fsf.org/">http://fsf.org/</a>
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
- </pre>
- <ol type=1 start=0>
- <li>PREAMBLE
- <p>The purpose of this License is to make a manual, textbook, or other
- functional and useful document <dfn>free</dfn> in the sense of freedom: to
- assure everyone the effective freedom to copy and redistribute it,
- with or without modifying it, either commercially or noncommercially.
- Secondarily, this License preserves for the author and publisher a way
- to get credit for their work, while not being considered responsible
- for modifications made by others.
- <p>This License is a kind of “copyleft”, which means that derivative
- works of the document must themselves be free in the same sense. It
- complements the GNU General Public License, which is a copyleft
- license designed for free software.
- <p>We have designed this License in order to use it for manuals for free
- software, because free software needs free documentation: a free
- program should come with manuals providing the same freedoms that the
- software does. But this License is not limited to software manuals;
- it can be used for any textual work, regardless of subject matter or
- whether it is published as a printed book. We recommend this License
- principally for works whose purpose is instruction or reference.
- <li>APPLICABILITY AND DEFINITIONS
- <p>This License applies to any manual or other work, in any medium, that
- contains a notice placed by the copyright holder saying it can be
- distributed under the terms of this License. Such a notice grants a
- world-wide, royalty-free license, unlimited in duration, to use that
- work under the conditions stated herein. The “Document”, below,
- refers to any such manual or work. Any member of the public is a
- licensee, and is addressed as “you”. You accept the license if you
- copy, modify or distribute the work in a way requiring permission
- under copyright law.
- <p>A “Modified Version” of the Document means any work containing the
- Document or a portion of it, either copied verbatim, or with
- modifications and/or translated into another language.
- <p>A “Secondary Section” is a named appendix or a front-matter section
- of the Document that deals exclusively with the relationship of the
- publishers or authors of the Document to the Document's overall
- subject (or to related matters) and contains nothing that could fall
- directly within that overall subject. (Thus, if the Document is in
- part a textbook of mathematics, a Secondary Section may not explain
- any mathematics.) The relationship could be a matter of historical
- connection with the subject or with related matters, or of legal,
- commercial, philosophical, ethical or political position regarding
- them.
- <p>The “Invariant Sections” are certain Secondary Sections whose titles
- are designated, as being those of Invariant Sections, in the notice
- that says that the Document is released under this License. If a
- section does not fit the above definition of Secondary then it is not
- allowed to be designated as Invariant. The Document may contain zero
- Invariant Sections. If the Document does not identify any Invariant
- Sections then there are none.
- <p>The “Cover Texts” are certain short passages of text that are listed,
- as Front-Cover Texts or Back-Cover Texts, in the notice that says that
- the Document is released under this License. A Front-Cover Text may
- be at most 5 words, and a Back-Cover Text may be at most 25 words.
- <p>A “Transparent” copy of the Document means a machine-readable copy,
- represented in a format whose specification is available to the
- general public, that is suitable for revising the document
- straightforwardly with generic text editors or (for images composed of
- pixels) generic paint programs or (for drawings) some widely available
- drawing editor, and that is suitable for input to text formatters or
- for automatic translation to a variety of formats suitable for input
- to text formatters. A copy made in an otherwise Transparent file
- format whose markup, or absence of markup, has been arranged to thwart
- or discourage subsequent modification by readers is not Transparent.
- An image format is not Transparent if used for any substantial amount
- of text. A copy that is not “Transparent” is called “Opaque”.
- <p>Examples of suitable formats for Transparent copies include plain
- ASCII without markup, Texinfo input format, LaTeX input
- format, SGML or XML using a publicly available
- DTD, and standard-conforming simple HTML,
- PostScript or PDF designed for human modification. Examples
- of transparent image formats include PNG, XCF and
- JPG. Opaque formats include proprietary formats that can be
- read and edited only by proprietary word processors, SGML or
- XML for which the DTD and/or processing tools are
- not generally available, and the machine-generated HTML,
- PostScript or PDF produced by some word processors for
- output purposes only.
- <p>The “Title Page” means, for a printed book, the title page itself,
- plus such following pages as are needed to hold, legibly, the material
- this License requires to appear in the title page. For works in
- formats which do not have any title page as such, “Title Page” means
- the text near the most prominent appearance of the work's title,
- preceding the beginning of the body of the text.
- <p>The “publisher” means any person or entity that distributes copies
- of the Document to the public.
- <p>A section “Entitled XYZ” means a named subunit of the Document whose
- title either is precisely XYZ or contains XYZ in parentheses following
- text that translates XYZ in another language. (Here XYZ stands for a
- specific section name mentioned below, such as “Acknowledgements”,
- “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
- of such a section when you modify the Document means that it remains a
- section “Entitled XYZ” according to this definition.
- <p>The Document may include Warranty Disclaimers next to the notice which
- states that this License applies to the Document. These Warranty
- Disclaimers are considered to be included by reference in this
- License, but only as regards disclaiming warranties: any other
- implication that these Warranty Disclaimers may have is void and has
- no effect on the meaning of this License.
- <li>VERBATIM COPYING
- <p>You may copy and distribute the Document in any medium, either
- commercially or noncommercially, provided that this License, the
- copyright notices, and the license notice saying this License applies
- to the Document are reproduced in all copies, and that you add no other
- conditions whatsoever to those of this License. You may not use
- technical measures to obstruct or control the reading or further
- copying of the copies you make or distribute. However, you may accept
- compensation in exchange for copies. If you distribute a large enough
- number of copies you must also follow the conditions in section 3.
- <p>You may also lend copies, under the same conditions stated above, and
- you may publicly display copies.
- <li>COPYING IN QUANTITY
- <p>If you publish printed copies (or copies in media that commonly have
- printed covers) of the Document, numbering more than 100, and the
- Document's license notice requires Cover Texts, you must enclose the
- copies in covers that carry, clearly and legibly, all these Cover
- Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
- the back cover. Both covers must also clearly and legibly identify
- you as the publisher of these copies. The front cover must present
- the full title with all words of the title equally prominent and
- visible. You may add other material on the covers in addition.
- Copying with changes limited to the covers, as long as they preserve
- the title of the Document and satisfy these conditions, can be treated
- as verbatim copying in other respects.
- <p>If the required texts for either cover are too voluminous to fit
- legibly, you should put the first ones listed (as many as fit
- reasonably) on the actual cover, and continue the rest onto adjacent
- pages.
- <p>If you publish or distribute Opaque copies of the Document numbering
- more than 100, you must either include a machine-readable Transparent
- copy along with each Opaque copy, or state in or with each Opaque copy
- a computer-network location from which the general network-using
- public has access to download using public-standard network protocols
- a complete Transparent copy of the Document, free of added material.
- If you use the latter option, you must take reasonably prudent steps,
- when you begin distribution of Opaque copies in quantity, to ensure
- that this Transparent copy will remain thus accessible at the stated
- location until at least one year after the last time you distribute an
- Opaque copy (directly or through your agents or retailers) of that
- edition to the public.
- <p>It is requested, but not required, that you contact the authors of the
- Document well before redistributing any large number of copies, to give
- them a chance to provide you with an updated version of the Document.
- <li>MODIFICATIONS
- <p>You may copy and distribute a Modified Version of the Document under
- the conditions of sections 2 and 3 above, provided that you release
- the Modified Version under precisely this License, with the Modified
- Version filling the role of the Document, thus licensing distribution
- and modification of the Modified Version to whoever possesses a copy
- of it. In addition, you must do these things in the Modified Version:
- <ol type=A start=1>
- <li>Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.
- <li>List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has fewer than five),
- unless they release you from this requirement.
- <li>State on the Title page the name of the publisher of the
- Modified Version, as the publisher.
- <li>Preserve all the copyright notices of the Document.
- <li>Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.
- <li>Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.
- <li>Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.
- <li>Include an unaltered copy of this License.
- <li>Preserve the section Entitled “History”, Preserve its Title, and add
- to it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section Entitled “History” in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.
- <li>Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the “History” section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.
- <li>For any section Entitled “Acknowledgements” or “Dedications”, Preserve
- the Title of the section, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements and/or
- dedications given therein.
- <li>Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.
- <li>Delete any section Entitled “Endorsements”. Such a section
- may not be included in the Modified Version.
- <li>Do not retitle any existing section to be Entitled “Endorsements” or
- to conflict in title with any Invariant Section.
- <li>Preserve any Warranty Disclaimers.
- </ol>
- <p>If the Modified Version includes new front-matter sections or
- appendices that qualify as Secondary Sections and contain no material
- copied from the Document, you may at your option designate some or all
- of these sections as invariant. To do this, add their titles to the
- list of Invariant Sections in the Modified Version's license notice.
- These titles must be distinct from any other section titles.
- <p>You may add a section Entitled “Endorsements”, provided it contains
- nothing but endorsements of your Modified Version by various
- parties—for example, statements of peer review or that the text has
- been approved by an organization as the authoritative definition of a
- standard.
- <p>You may add a passage of up to five words as a Front-Cover Text, and a
- passage of up to 25 words as a Back-Cover Text, to the end of the list
- of Cover Texts in the Modified Version. Only one passage of
- Front-Cover Text and one of Back-Cover Text may be added by (or
- through arrangements made by) any one entity. If the Document already
- includes a cover text for the same cover, previously added by you or
- by arrangement made by the same entity you are acting on behalf of,
- you may not add another; but you may replace the old one, on explicit
- permission from the previous publisher that added the old one.
- <p>The author(s) and publisher(s) of the Document do not by this License
- give permission to use their names for publicity for or to assert or
- imply endorsement of any Modified Version.
- <li>COMBINING DOCUMENTS
- <p>You may combine the Document with other documents released under this
- License, under the terms defined in section 4 above for modified
- versions, provided that you include in the combination all of the
- Invariant Sections of all of the original documents, unmodified, and
- list them all as Invariant Sections of your combined work in its
- license notice, and that you preserve all their Warranty Disclaimers.
- <p>The combined work need only contain one copy of this License, and
- multiple identical Invariant Sections may be replaced with a single
- copy. If there are multiple Invariant Sections with the same name but
- different contents, make the title of each such section unique by
- adding at the end of it, in parentheses, the name of the original
- author or publisher of that section if known, or else a unique number.
- Make the same adjustment to the section titles in the list of
- Invariant Sections in the license notice of the combined work.
- <p>In the combination, you must combine any sections Entitled “History”
- in the various original documents, forming one section Entitled
- “History”; likewise combine any sections Entitled “Acknowledgements”,
- and any sections Entitled “Dedications”. You must delete all
- sections Entitled “Endorsements.”
- <li>COLLECTIONS OF DOCUMENTS
- <p>You may make a collection consisting of the Document and other documents
- released under this License, and replace the individual copies of this
- License in the various documents with a single copy that is included in
- the collection, provided that you follow the rules of this License for
- verbatim copying of each of the documents in all other respects.
- <p>You may extract a single document from such a collection, and distribute
- it individually under this License, provided you insert a copy of this
- License into the extracted document, and follow this License in all
- other respects regarding verbatim copying of that document.
- <li>AGGREGATION WITH INDEPENDENT WORKS
- <p>A compilation of the Document or its derivatives with other separate
- and independent documents or works, in or on a volume of a storage or
- distribution medium, is called an “aggregate” if the copyright
- resulting from the compilation is not used to limit the legal rights
- of the compilation's users beyond what the individual works permit.
- When the Document is included in an aggregate, this License does not
- apply to the other works in the aggregate which are not themselves
- derivative works of the Document.
- <p>If the Cover Text requirement of section 3 is applicable to these
- copies of the Document, then if the Document is less than one half of
- the entire aggregate, the Document's Cover Texts may be placed on
- covers that bracket the Document within the aggregate, or the
- electronic equivalent of covers if the Document is in electronic form.
- Otherwise they must appear on printed covers that bracket the whole
- aggregate.
- <li>TRANSLATION
- <p>Translation is considered a kind of modification, so you may
- distribute translations of the Document under the terms of section 4.
- Replacing Invariant Sections with translations requires special
- permission from their copyright holders, but you may include
- translations of some or all Invariant Sections in addition to the
- original versions of these Invariant Sections. You may include a
- translation of this License, and all the license notices in the
- Document, and any Warranty Disclaimers, provided that you also include
- the original English version of this License and the original versions
- of those notices and disclaimers. In case of a disagreement between
- the translation and the original version of this License or a notice
- or disclaimer, the original version will prevail.
- <p>If a section in the Document is Entitled “Acknowledgements”,
- “Dedications”, or “History”, the requirement (section 4) to Preserve
- its Title (section 1) will typically require changing the actual
- title.
- <li>TERMINATION
- <p>You may not copy, modify, sublicense, or distribute the Document
- except as expressly provided under this License. Any attempt
- otherwise to copy, modify, sublicense, or distribute it is void, and
- will automatically terminate your rights under this License.
- <p>However, if you cease all violation of this License, then your license
- from a particular copyright holder is reinstated (a) provisionally,
- unless and until the copyright holder explicitly and finally
- terminates your license, and (b) permanently, if the copyright holder
- fails to notify you of the violation by some reasonable means prior to
- 60 days after the cessation.
- <p>Moreover, your license from a particular copyright holder is
- reinstated permanently if the copyright holder notifies you of the
- violation by some reasonable means, this is the first time you have
- received notice of violation of this License (for any work) from that
- copyright holder, and you cure the violation prior to 30 days after
- your receipt of the notice.
- <p>Termination of your rights under this section does not terminate the
- licenses of parties who have received copies or rights from you under
- this License. If your rights have been terminated and not permanently
- reinstated, receipt of a copy of some or all of the same material does
- not give you any rights to use it.
- <li>FUTURE REVISIONS OF THIS LICENSE
- <p>The Free Software Foundation may publish new, revised versions
- of the GNU Free Documentation License from time to time. Such new
- versions will be similar in spirit to the present version, but may
- differ in detail to address new problems or concerns. See
- <a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
- <p>Each version of the License is given a distinguishing version number.
- If the Document specifies that a particular numbered version of this
- License “or any later version” applies to it, you have the option of
- following the terms and conditions either of that specified version or
- of any later version that has been published (not as a draft) by the
- Free Software Foundation. If the Document does not specify a version
- number of this License, you may choose any version ever published (not
- as a draft) by the Free Software Foundation. If the Document
- specifies that a proxy can decide which future versions of this
- License can be used, that proxy's public statement of acceptance of a
- version permanently authorizes you to choose that version for the
- Document.
- <li>RELICENSING
- <p>“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
- World Wide Web server that publishes copyrightable works and also
- provides prominent facilities for anybody to edit those works. A
- public wiki that anybody can edit is an example of such a server. A
- “Massive Multiauthor Collaboration” (or “MMC”) contained in the
- site means any set of copyrightable works thus published on the MMC
- site.
- <p>“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
- license published by Creative Commons Corporation, a not-for-profit
- corporation with a principal place of business in San Francisco,
- California, as well as future copyleft versions of that license
- published by that same organization.
- <p>“Incorporate” means to publish or republish a Document, in whole or
- in part, as part of another Document.
- <p>An MMC is “eligible for relicensing” if it is licensed under this
- License, and if all works that were first published under this License
- somewhere other than this MMC, and subsequently incorporated in whole
- or in part into the MMC, (1) had no cover texts or invariant sections,
- and (2) were thus incorporated prior to November 1, 2008.
- <p>The operator of an MMC Site may republish an MMC contained in the site
- under CC-BY-SA on the same site at any time before August 1, 2009,
- provided the MMC is eligible for relicensing.
- </ol>
- <h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
- <p>To use this License in a document you have written, include a copy of
- the License in the document and put the following copyright and
- license notices just after the title page:
- <pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
- 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, no Front-Cover Texts, and no Back-Cover
- Texts. A copy of the license is included in the section entitled ``GNU
- Free Documentation License''.
- </pre>
- <p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
- replace the “with<small class="dots">...</small>Texts.” line with this:
- <pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
- the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
- being <var>list</var>.
- </pre>
- <p>If you have Invariant Sections without Cover Texts, or some other
- combination of the three, merge those two alternatives to suit the
- situation.
- <p>If your document contains nontrivial examples of program code, we
- recommend releasing these examples in parallel under your choice of
- free software license, such as the GNU General Public License,
- to permit their use in free software.
- <!-- Local Variables: -->
- <!-- ispell-local-pdict: "ispell-dict" -->
- <!-- End: -->
- <div class="node">
- <a name="Index"></a>
- <p><hr>
- Previous: <a rel="previous" accesskey="p" href="#GNU-Free-Documentation-License">GNU Free Documentation License</a>,
- Up: <a rel="up" accesskey="u" href="#Top">Top</a>
- </div>
- <h2 class="unnumbered">Index</h2>
- <ul class="index-cp" compact>
- <li><a href="#index-g_t_002eorder-files-19">.order files</a>: <a href="#Order-files">Order files</a></li>
- <li><a href="#index-adding-packages-7">adding packages</a>: <a href="#Packages">Packages</a></li>
- <li><a href="#index-building-packages-16">building packages</a>: <a href="#Recipes">Recipes</a></li>
- <li><a href="#index-environment-3">environment</a>: <a href="#Invocation">Invocation</a></li>
- <li><a href="#index-examine-packages-21">examine packages</a>: <a href="#Examine-packages">Examine packages</a></li>
- <li><a href="#index-exit-codes-23">exit codes</a>: <a href="#Exit-status">Exit status</a></li>
- <li><a href="#index-internal-functions-18">internal functions</a>: <a href="#Recipes">Recipes</a></li>
- <li><a href="#index-introduction-1">introduction</a>: <a href="#Introduction">Introduction</a></li>
- <li><a href="#index-invocation-2">invocation</a>: <a href="#Invocation">Invocation</a></li>
- <li><a href="#index-notes-10">notes</a>: <a href="#Packages">Packages</a></li>
- <li><a href="#index-notes-4">notes</a>: <a href="#Invocation">Invocation</a></li>
- <li><a href="#index-output-messages-22">output messages</a>: <a href="#Messages">Messages</a></li>
- <li><a href="#index-packages-6">packages</a>: <a href="#Packages">Packages</a></li>
- <li><a href="#index-recipes-11">recipes</a>: <a href="#Recipes">Recipes</a></li>
- <li><a href="#index-removing-packages-8">removing packages</a>: <a href="#Packages">Packages</a></li>
- <li><a href="#index-special-variables-13">special variables</a>: <a href="#Recipes">Recipes</a></li>
- <li><a href="#index-the-depends-file-20">the depends file</a>: <a href="#Order-files">Order files</a></li>
- <li><a href="#index-the-meta-file-15">the meta file</a>: <a href="#Recipes">Recipes</a></li>
- <li><a href="#index-the-qirc-file-5">the qirc file</a>: <a href="#The-qirc-file">The qirc file</a></li>
- <li><a href="#index-upgrading-packages-9">upgrading packages</a>: <a href="#Packages">Packages</a></li>
- <li><a href="#index-variables-12">variables</a>: <a href="#Recipes">Recipes</a></li>
- <li><a href="#index-variables-from-the-environment-14">variables from the environment</a>: <a href="#Recipes">Recipes</a></li>
- <li><a href="#index-writing-recipes-17">writing recipes</a>: <a href="#Recipes">Recipes</a></li>
- </ul><div class="footnote">
- <hr>
- <a name="texinfo-footnotes-in-document"></a><h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> 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>
- <p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small>
- The proposal for ‘<samp><span class="samp">license</span></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>
- <hr></div>
- </body></html>
- <!--
- Local Variables:
- coding: iso-8859-1
- End:
- -->
|