This Handbook is for Dragora (version 3.0, initial revision, 02 Mar 2024).
Copyright © 2020-2024 The Dragora Team.
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.
Dragora is an independent GNU/Linux distribution project which was created from scratch with the intention of providing a reliable operating system with maximum respect for the user by including entirely free software. Dragora is based on the concepts of simplicity and elegance, it offers a user-friendly Unix-like environment with emphasis on stability and security for long-term durability.
To put it in a nutshell, Dragora is...
Some of the features of Dragora are:
We cannot and do not intend to decide for you, we can only cite what we believe to be Dragora’s main strengths:
Development of Dragora started in 2007 by Matias Andres Fonzo from Santiago del Estero, Argentina. After one year of hard work, the first beta of Dragora was released on June 13, 2008, which contained the basic GNU toolset, boot scripts, package system, and an installer. Whereas the intention was to achieve a 100% "free" as in freedom GNU/Linux distribution from the beginning, this very first version was not fully free (or libre) since all parts were free software, except for the Linux Kernel due to blobs or non-free parts. Fortunately, the Linux-Libre project appears that same year, which removes or cleans the non-free parts of the official versions of the Linux Kernel. This led to the second beta of Dragora on September 18, 2008; completing distribution’s freedom by replacing the Kernel, and becoming the first one available to the public. Ongoing work to provide a more complete distribution would result in the stable release of Dragora 1.0, achieved on March 13, 2009. The series ends with the massive update plus fixes and added software for version 1.1 released on October 8, 2009.
Design of this series was based on a traditional GNU/Linux scheme with SysVinit as the init system but using BSD-style boot scripts. The package system, the installer, the text menu-mode tools and the boot scripts were all written using the syntax and the features offered by GNU Bash. Initially the binary packages were provided in .tbz2 format (files compressed with bzip2 and packaged using GNU Tar) which later migrated to the .tlz format (files compressed with lzip for a higher compression plus very safe integrity checking). Dragora’s installer offered the option of several languages (translations produced by the community) to choose between English, Galician, Italian, and Spanish. A second CD included the packages for the K Desktop Environment (KDE) 3 series.
Below are the dates and code names used for all the Dragora releases:
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.
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 and safer variant of POSIX pax archive compressed in lzip format.
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.
This chapter describes the synopsis for invoking Qi.
Usage: qi COMMAND [OPTION...] [FILE]...
One mandatory command specifies the operation that ‘qi’ should perform, options are meant to detail how this operation should be performed during or after the process.
Qi supports the following commands:
warn
Warn about files that will be installed.
install
Install packages.
remove
Remove packages.
upgrade
Upgrade packages.
extract
Extract packages for debugging purposes.
create
Create a .tlz package from directory.
build
Build packages using recipe names.
order
Resolve build order through .order files
Options when installing, removing, or upgrading software packages:
-f
--force
Force upgrade of pre-existing packages.
-k
--keep
Keep directories when build/remove/upgrade.
Keep (don’t delete) the package directory when using remove/upgrade command.
This will also try to preserve the directories ‘${srcdir}’ and ‘${destdir}’ when using build command. Its effect is available in recipes as ‘${keep_srcdir}’ and ‘${keep_destdir}’. See Special variables for details.
-p
--prune
Prune conflicts.
-P
--packagedir=<dir>
Set directory for package installations.
-t
--targetdir=<dir>
Set target directory for symbolic links.
-r
--rootdir=<dir>
Use the fully qualified named directory as the root directory for all qi operations.
Note: the target directory and the package directory will be relative to the specified directory, excepting the graft log file.
Options when building software packages using recipes:
-a
--architecture
Set architecture name for the package.
-j
--jobs
Parallel jobs for the compiler.
This option sets the variable ‘${jobs}’. If not specified, default sets to 1.
-S
--skip-questions
Skip questions on completed recipes.
-1
--increment
Increment release number (‘${release}’ + 1).
The effect of this option will be omitted if –no-package is being used.
-n
--no-package
Do not create a .tlz package.
-i
--install
Install package after the build.
-u
--upgrade
Upgrade package after the build.
-o
--outdir=<dir>
Where the packages produced will be written.
This option sets the variable ‘${outdir}’.
-w
--worktree=<dir>
Where archives, patches, recipes are expected.
This option sets the variable ‘${worktree}’.
-s
--sourcedir=<dir>
Where compressed sources will be found.
This option sets the variable ‘${tardir}’.
Other options:
-v
--verbose
Be verbose (an extra -v gives more).
It sets the verbosity level, default sets to 0.
The value 1 is used for more verbosity while the value 2 is too detailed. Although at the moment it is limited to graft(1) verbosity.
-N
--no-rc
Do not read the configuration file.
This will ignore reading the qirc file.
-L
--show-location
Print default directory locations and exit.
This will print the target directory, package directory, working tree, the directory for sources, and the output directory for the packages produced. The output will appear on STDOUT as follows:
QI_TARGETDIR=/usr/local QI_PACKAGEDIR=/usr/local/pkgs QI_WORKTREE=/usr/src/qi QI_TARDIR=/usr/src/qi/sources QI_OUTDIR=/var/cache/qi/packages
You can set these environment variables using one of the following methods:
eval "$(qi -L)"
This will display the default locations taking into account the values set from the qirc configuration file. You can deny the influence of the configuration file by setting the option ‘-N’.
eval "$(qi -N -L)"
Or you can adjust the new locations using the command-line options, e.g:
eval "$(qi -N --targetdir=/directory -L)"
-h
--help
Display the usage and exit.
-V
--version
This will print the (short) version information and then exit.
The same can be achieved if Qi is invoked as ‘qi version’.
When FILE is -, qi can read from the standard input. See examples from the Packages section.
Exit status: 0 for a normal exit, 1 for minor common errors (help usage, support not available, etc), 2 to indicate a command execution error; 3 for integrity check error on compressed files, 4 for empty, not regular, or expected files, 5 for empty or not defined variables, 6 when a package already exist, 10 for network manager errors. For more details, see the Qi exit status section.
The global qirc 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.
Variables and their possible values must be declared as any other variable in the shell.
The command line options related to the package directory and target directory and some of the command line options used for the build command, have the power to override the values declared on qirc. See Invoking qi.
The order in which qi looks for this file is:
${HOME}/.qirc
Effective user.
If you intend to run qi as effective user, the file
‘${sysconfdir}/qirc’ could be copied to ${HOME}/.qirc
setting the paths for ‘${packagedir}’ and ‘${targetdir}’
according to the $HOME
.
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.
The package format used by qi is a simplified POSIX pax archive compressed using lzip1. The file extension for packages ends in ‘.tlz’.
Both package installation and package de-installation are managed using two important (internal) variables: ‘${packagedir}’ and ‘${targetdir}’, these values can be changed in the configuration file or via options.
‘${packagedir}’ is a common directory tree where the package contents will be decompressed (will reside).
‘${targetdir}’ is a target directory where the links will be made by graft(1) taking ‘${packagedir}/package_name’ into account.
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.
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.
graft2 defines a CONFLICT as one of the following conditions:
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 –prune option is given.
To install a single package, simply type:
qi install coreutils_8.30_i586-1@tools.tlz
To install multiple packages at once, type:
qi install gcc_8.3.0_i586-1@devel.tlz rafaela_2.2_i586-1@legacy.tlz ...
Warn about the files that will be linked:
qi warn bash_5.0_i586-1@shells.tlz
This is to verify the content of a package before installing it.
See the process of an installation:
qi install --verbose mariana_3.0_i586-1@woman.tlz
A second –verbose or -v option gives more (very verbose).
Installing package in a different location:
qi install --rootdir=/media/floppy lzip_1.21_i586-1@compressors.tlz
Important: the –rootdir option assumes ‘${targetdir}’ and ‘${packagedir}’. See the following example:
qi install --rootdir=/home/selk lzip_1.21_i586-1@compressors.tlz
The content of "lzip_1.21_i586-1@compressors.tlz" will be decompressed
into ‘/home/selk/pkgs/lzip_1.21_i586-1@compressors’.
Assuming that the main binary for lzip is under
‘/home/selk/pkgs/lzip_1.21_i586-1@compressors/usr/bin/’
the target for "usr/bin" will be created at ‘/home/selk’. Considering
that you have exported the PATH
as ‘${HOME}/usr/bin’, now the
system is able to see the recent lzip command.
Installing from a list of packages using standard input:
qi install - < PACKAGELIST.txt
Or in combination with another tool:
sort -u PACKAGELIST.txt | qi install -
The sort command will read and sorts the list of declared packages, while trying to have unique entries for each statement. The output produced is captured by Qi to install each package.
An example of a list containing package names is:
/var/cache/qi/packages/amd64/tcl_8.6.9_amd64-1@devel.tlz /var/cache/qi/packages/amd64/tk_8.6.9.1_amd64-1@devel.tlz /var/cache/qi/packages/amd64/vala_0.42.3_amd64-1@devel.tlz
To remove a package, simply type:
qi remove xz_5.2.4_i586-1@compressors.tlz
Remove command will match the package name using ‘${packagedir}’ as prefix. For example, if the value of ‘${packagedir}’ has been set to /usr/pkg, this will be equal to:
qi remove /usr/pkg/xz_5.2.4_i586-1@compressors
Detailed output:
qi remove --verbose /usr/pkg/xz_5.2.4_i586-1@compressors
A second –verbose or -v option gives more (very verbose).
By default the remove command does not preserve a package directory after removing its links from ‘${targetdir}’, but this behavior can be changed if the –keep option is passed:
qi remove --keep /usr/pkg/lzip_1.21_i586-1@compressors
This means that the links to the package can be reactivated, later:
cd /usr/pkg && graft -i lzip_1.21_i586-1@compressors
Removing package from a different location:
qi remove --rootdir=/home/cthulhu xz_5.2.4_i586-1@compressors
Removing a package using standard input:
echo vala_0.42.3_amd64-1@devel | qi remove -
This will match with the package directory.
The upgrade command 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 ‘${packagedir}’ 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.
Since updating a package can be crucial and so to perform a successful upgrade, from start to finish, you will want to ignore some important system signals during the upgrade process, those signals are SIGHUP, SIGINT, SIGQUIT, SIGABRT, and SIGTERM.
To upgrade a package, just type:
qi upgrade gcc_9.0.1_i586-1@devel.tlz
This will proceed to upgrade "gcc_9.0.1_i586-1@devel" removing any other version of "gcc" (if any).
If you want to keep the package directories of versions found during the upgrade process, just pass:
qi upgrade --keep gcc_9.0.1_i586-1@devel.tlz
To see the upgrade process:
qi upgrade --verbose gcc_9.0.1_i586-1@devel.tlz
A second –verbose or -v option gives more (very verbose).
To force the upgrade of an existing package:
qi upgrade --force gcc_9.0.1_i586-1@devel.tlz
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) by default:
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, especially when transitioning an incoming package into its final location during an upgrade.
A blacklist of package names has been devised for the case where a user decides to upgrade all the packages in the system, or just the crucial ones, such as the C library.
The blacklist is related to the upgrade command 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 ‘${packagedir}’, while the existing links from ‘${targetdir}’ 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.
Package names for the blacklist to be declared must be set from the configuration file. By default, it is declared using the package name, which is more than enough for critical system packages, but if you want to be more specific, you can declare a package using: ‘${pkgname}_${pkgversion}_${arch}-${release}’ where the package category is avoided for common matching. See Special variables for a description of these variables.
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.
A recipe has two parts: a list of variable definitions and a list of sections. By convention, the syntax of a section is:
section_name() { section lines }
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 ‘build’.
The ‘build’ section (or shell function) is an augmented shell script that contains the main instructions to build software from source.
If there are other functions defined by the packager, Qi detects them for later execution.
A "variable" is a shell variable defined either in qirc 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.
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.
Definitions of variables in qi have four levels of precedence. Options which define variables from the command-line override those specified in the qirc file, while variables defined in the recipe override those specified in qirc, taking priority over those variables set by command-line options. Finally, the variables have default values if they are not defined anywhere.
Options that set variables through the command-line can only reference variables defined in qirc and variables with default values.
Definitions of variables in qirc can only reference variables previously defined in qirc and variables with default values.
Definitions of variables in the recipe can only reference variables set by the command-line, variables previously defined in the recipe, variables defined in qirc, and variables with default values.
There are variables which can only be set using the command line options or via qirc, there are other special variables which can be defined or redefined in a recipe. See the following definitions:
‘outdir’ is the directory where the packages produced are written. This variable can be redefined per-recipe. Default sets to ‘/var/cache/qi/packages’.
‘worktree’ is the working tree where archives, patches, and recipes are expected. This variable can not be redefined in the recipe. Default sets to ‘/usr/src/qi’.
‘tardir’ 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 ‘${tardir}/$tarname’. Its value is available in the recipe as ‘${tardir}’; a value of . for ‘tardir’ sets it to the value of CWD (Current Working Directory), this is where the recipe lives.
‘arch’ is the architecture to compose the package name. Its value is available in the recipe as ‘${arch}’. Default value is the one that was set in the Qi configuration.
‘jobs’ is the number of parallel jobs to pass to the compiler. Its value is available in the recipe as ‘${jobs}’. The default value is 1.
The two variables ‘${srcdir}’ and ‘${destdir}’ 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.
‘srcdir’ contains the source code to be compiled, and defaults to ‘${program}-${version}’. ‘destdir’ is the place where the built package will be installed, and defaults to ‘${TMPDIR}/package-${program}’.
If ‘pkgname’ is left undefined, the special variable ‘program’ is assigned by default. If ‘pkgversion’ is left undefined, the special variable ‘version’ is assigned by default.
‘pkgname’ and ‘pkgversion’ along with: ‘version’, ‘arch’, ‘release’, and (optionally) ‘pkgcategory’ are used to produce the package name in the form: ‘${pkgname}_${pkgversion}_${arch}-${release}[@${pkgcategory}].tlz’
‘pkgcategory’ is an optional special variable that can be defined on the recipe to categorize the package name. If it is defined, then the package output will be composed as ‘${pkgname}_${pkgversion}_${arch}-${release}[@${pkgcategory}.tlz’. Automatically, the value of ‘pkgcategory’ will be prefixed using the ‘@’ (at) symbol which will be added to the last part of the package name.
A special variable called ‘replace’ can be used to declare package names that will be replaced at installation time.
The special variables ‘keep_srcdir’ and ‘keep_destdir’ are provided in order to preserve the directories ‘${srcdir}’ or ‘${destdir}’, if those exists as such. Note: The declaration of these variables are subject to manual deactivation; its purpose in recipes is to preserve the directories that relate to the package’s build (source) and destination directory, that is so that another recipe can get a new package (or meta package) from there. For example, the declarations can be done as:
keep_srcdir=keep_srcdir keep_destdir=keep_destdir
Then from another recipe you would proceed to copy the necessary files that will compose the meta package, from the main function you must deactivate the variables at the end:
unset -v keep_srcdir keep_destdir
This will leave the ’keep_srcdir’ and ’keep_destdir’ variables blank to continue with the rest of the recipes.
The special variable ‘opt_skiprecipe’ is available when you need to ignore a recipe cleanly, continuing with the next recipe. May you add a conditional test then set it as ‘opt_skiprecipe=opt_skiprecipe’.
The variable ‘tarlz_compression_options’ can be used to change the default compression options in tarlz(1), default sets to ‘-9 --solid’. For example if the variable is declared as:
tarlz_compression_options="-0 --bsolid"
It will change the granularity of tarlz(1) by using the ‘--bsolid’ option 3, as well as increasing the compression speed by lowering the compression level with ‘-0’.
This is only recommended for recipes where testing, or faster processing is desired to create the packaged file more quickly. It is not recommended for production or general distribution of binary packages.
A typical recipe contains the following variables:
It matches the source name. It is also used to compose the name of the package if ‘${pkgname}’ is not specified.
It matches the source name. It is also used to compose the version of the package if ‘${pkgversion}’ is not specified.
It is used to compose the architecture of the package in which it is build.
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.
Optional but recommended variable to categorize the package name when it is created.
Obtaining sources over the network must be declared in the recipe using the ‘fetch’ variable.
The variables ‘netget’ and ‘rsync’ can be defined in qirc to establish a network downloader in order to get the sources. If they are not defined, qi uses default values:
‘netget’ is the general network downloader tool, defaults sets to ‘wget2 -c -w1 -t3 --no-check-certificate’.
‘rsync’ is the network tool for sources containing the prefix for the RSYNC protocol, default sets to ‘rsync -v -a -L -z -i --progress’.
The variable ‘description’ is used to print the package description when a package is installed.
A description has two parts: a brief description, and a long description. By convention, the syntax of ‘description’ is:
description=" Brief description. Long description. "
The first line of the value represented is a brief description of the software (called "blurb"). A blank line separates the brief description from the long description, which should contain a more descriptive description of the software.
An example looks like:
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. "
Please consider a length limit of 78 characters as maximum, because the same one would be used on the meta file creation. See The meta file section.
The ‘homepage’ variable is used to declare the main site or home page:
homepage=https://www.gnu.org/software/gcc
The variable ‘license’ is used for license information4. 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 | for a disjunction, & 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.
license="LGPL, GPL | Artistic - added permission"
Originally, Qi was designed for the series of Dragora GNU/Linux-Libre 3; this doesn’t mean you can’t use it in another distribution, just that if you do, you’ll have to try it out for yourself. To help with this, here are some references to well-written recipes:
A recipe is any valid regular file. Qi sets priorities for reading a recipe, the order in which qi looks for a recipe is:
To build a single package, type:
qi build x-apps/xterm
Multiple jobs can be passed to the compiler to speed up the build process:
qi build --jobs 3 x-apps/xterm
Update or install the produced package (if not already installed) when the build command ends:
qi build -j3 --upgrade x-apps/xterm
Only process a recipe but do not create the binary package:
qi build --no-package dict/aspell
The options –install or –upgrade have no effect when –no-package is given.
This is useful to inspect the build process of the above recipe:
qi build –keep –no-package dict/aspell 2>&1 | tee aspell-log.txt
The –keep 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).
Qi has environment variables which can be used at build time:
The variable TMPDIR
sets the temporary directory for sources, which is
used for package extractions (see Examining packages) and is
prepended to the value of ‘${srcdir}’ and ‘${destdir}’ in
build command. By convention its default value is equal to
‘/usr/src/qi/build’.
The variables QICFLAGS
, QICXXFLAGS
, QILDFLAGS
, and
QICPPFLAGS
have no effect by default. The environment variables
such as CFLAGS
, CXXFLAGS
, LDFLAGS
, and CPPFLAGS
are unset at compile time:
Recommended practice is to set variables in the command line of ‘configure’ or make(1) instead of exporting to the environment. As follows:
https://www.gnu.org/software/make/manual/html_node/Environment.html
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.
Setting environment variables for configure is deprecated because running configure in varying environments can be dangerous.
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 ‘VAR=value’. For example:
./configure CC=/usr/local2/bin/gcc
If for instance the user runs ‘CC=bizarre-cc ./configure’, then the cache, config.h, and many other output files depend upon bizarre-cc being the C compiler. If for some reason the user runs ./configure again, or if it is run via ‘./config.status --recheck’, (See Automatic Remaking, and see config.status Invocation), then the configuration can be inconsistent, composed of results depending upon two different compilers. [...] Indeed, while configure can notice the definition of CC in ‘./configure CC=bizarre-cc’, it is impossible to notice it in ‘CC=bizarre-cc ./configure’, which, unfortunately, is what most users do. [...] configure: error: changes in the environment can compromise the build.
If the SOURCE_DATE_EPOCH
environment variable is set to a UNIX timestamp
(defined as the number of seconds, excluding leap seconds, since 01 Jan 1970
00:00:00 UTC.); then the given timestamp will be used to overwrite any newer
timestamps on the package contents (when it is created). More information
about this can be found at
https://reproducible-builds.org/specs/source-date-epoch/.
The "meta file" is a regular file created during the build process, 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 ‘${full_pkgname}.tlz.txt’, 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 used by other scripts or by common Unix tools.
The content of a meta file looks like:
# # Pattern scanning and processing language. # # The awk utility interprets a special-purpose programming language # that makes it possible to handle simple data-reformatting jobs # with just a few lines of code. It is a free version of 'awk'. # # GNU awk implements the AWK utility which is part of # IEEE Std 1003.1 Shell and Utilities (XCU). # QICFLAGS="-O2" QICXXFLAGS="-O2" QILDFLAGS="" QICPPFLAGS="" pkgname=gawk pkgversion=5.0.1 arch=amd64 release=1 pkgcategory="tools" full_pkgname=gawk_5.0.1_amd64-1@tools blurb="Pattern scanning and processing language." homepage="https://www.gnu.org/software/gawk" license="GPLv3+" fetch="https://ftp.gnu.org/gnu/gawk/gawk-5.0.1.tar.lz" replace=""
A package descriptions is extracted from the variable ‘description’ where each line is interpreted literally and pre-formatted to fit in (exactly) 80 columns, plus the character ‘#’ and a blank space is prefixed to every line (shell comments).
In addition to the Special variables, there are implicit variables such as ‘blurb’:
The ‘blurb’ variable is related to the special variable ‘description’. Its value is made from the first (substantial) line of ‘description’, mentioned as the "brief description".
The build flags such as ‘QICFLAGS’, ‘QICXXFLAGS’, ‘QILDFLAGS’, and ‘QICPPFLAGS’ are only added to the meta file if the declared variable ‘arch’ is not equal to the "noarch" value.
The order command 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 a depends on b and c, and c depends on b as well, the file might look like:
a: c b b: c: b
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:
OUTPUT
b c a
Blank lines, colons and parentheses are simply ignored. Comment lines beginning with ‘#’ are allowed.
An order file could be used to build a series of packages, for example, if the content is:
# Image handling libraries libs/libjpeg-turbo: devel/nasm x-libs/jasper: libs/libjpeg-turbo libs/tiff: libs/libjpeg-turbo
To proceed with each recipe, we can type:
qi order imglibs.order | qi build --install -
The output of ‘qi order imglibs.order’ tells to qi in which order it should build the recipes:
devel/nasm libs/libjpeg-turbo x-libs/jasper libs/tiff
The creation command is an internal function of qi to make new Qi compatible packages. A package is produced using the contents of the Current Working Directory and the package file is written out.
Usage: qi create [Output/PackageName.tlz]...
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[@pkgcategory].tlz
EXAMPLE
cd /usr/pkg cd claws-mail_3.17.1_amd64-1@x-apps qi create /var/cache/qi/packages/claws-mail_3.17.1_amd64-1@x-apps
In this case, the package "claws-mail_3.17.1_amd64-1@x-apps" will be written into ‘/var/cache/qi/packages/’.
All packages produced are complemented by a checksum file (.sha256).
The extraction command serves to examine binary packages for debugging purposes. It decompresses a package into a single directory, verifying its integrity and preserving all of its properties (owner and permissions).
Usage: qi extract [packagename.tlz]...
EXAMPLE
qi extract mksh_R56c_amd64-1@shells.tlz
This action will put the content of "mksh_R56c_amd64-1@shells.tlz" into a single directory, this is a private directory for the user who requested the action, creation operation will be equal to u=rwx,g=,o= (0700). The package content will reside on this location, default mask to deploy the content will be equal to u=rwx,g=rwx,o=rwx (0000).
Note: the creation of the custom directory is influenced by the value
of the TMPDIR
variable.
All the exit codes are described in this chapter.
Successful completion (no errors).
Minor common errors:
Command execution error:
This code is used to return the evaluation of an external command or shell arguments in case of failure.
Integrity check error for compressed files.
Compressed files means:
File empty, not regular, or expected.
It’s commonly expected:
Empty or not defined variable:
This code is used to report empty or undefined variables (usually variables coming from a recipe or assigned arrays that are tested).
Package already installed:
The package directory for an incoming .tlz package already exists.
Network manager error:
This code is used if the network downloader tool fails for some reason.
Dragora’s home page can be found at https://www.dragora.org. Bug reports or suggestions can be sent to dragora-users@nongnu.org.
TODO (introductory text here).
If there’s no Dragora mirror near you, you’re welcome to contribute one.
First, for users or downloaders, the address rsync://rsync.dragora.org/ contains ISO images and source code (in various formats) taken from the original sites and distributed by Dragora.
Mirroring the Dragora server requires approximately 13GB of disk space (as of January 2022). You can hit rsync directly from rsync.dragora.org as:
rsync -rltpHS --delete-excluded rsync://rsync.dragora.org/dragora /your/dir/
Also, consider mirroring from another site in order to reduce load on the Dragora server. The listed sites at https://www.dragora.org/en/get/mirrors/index.html provide access to all the material on rsync.dragora.org. They update from us nightly (at least), and you may access them via rsync with the same options as above.
Note:
We keep a file called "timestamp" under the main tree after each synchronization. This file can be used to verify, instead of synchronizing all the content at once, you can check if this file has been updated and then continue with the full synchronization.
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. https://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The purpose of this License is to make a manual, textbook, or other functional and useful document free 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.
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.
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.
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.
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.
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.
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.
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.
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”.
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.
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.
The “publisher” means any person or entity that distributes copies of the Document to the public.
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.
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.
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.
You may also lend copies, under the same conditions stated above, and you may publicly display copies.
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.
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.
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.
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.
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:
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.
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.
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.
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.
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.
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.
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.”
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 https://www.gnu.org/licenses/.
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.
“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.
“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.
“Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document.
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.
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.
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:
Copyright (C) year your name. 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''.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with…Texts.” line with this:
with the Invariant Sections being list their titles, with the Front-Cover Texts being list, and with the Back-Cover Texts being list.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.
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.
Jump to: | A B C E F G H I L M P R S T U V W |
---|
Jump to: | A B C E F G H I L M P R S T U V W |
---|
For more details about tarlz and the lzip format, visit https://lzip.nongnu.org/tarlz.html.
The official guide for Graft can be found at https://peters.gormand.com.au/Home/tools/graft/graft.html.
About the ‘--bsolid’ granularity option of tarlz(1), https://www.nongnu.org/lzip/manual/tarlz_manual.html#g_t_002d_002dbsolid.
The proposal for ‘license’ was made by Richard M. Stallman at https://lists.gnu.org/archive/html/gnu-linux-libre/2016-05/msg00003.html.