dragora-handbook.txt 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885
  1. 1 About this handbook
  2. 1.1 Typographic conventions
  3. Revision history (ChangeLog)
  4. 2 What is Dragora?
  5. 2.1 Free software
  6. 2.2 GNU
  7. 2.3 Linux and Linux-libre
  8. 3 Why should I use Dragora?
  9. 4 History
  10. 4.1 Releases
  11. 5 Maintainers
  12. 6 A quick glance at Dragora
  13. 7 Boot options from live medium
  14. 8 Using dragora-installer
  15. 9 Installing the system manually (as an alternative)
  16. 10 Introduction to package management in Dragora
  17. 11 Package management in a nutshell
  18. Using third-party free software
  19. 12 Introduction to Qi
  20. 13 Invoking qi
  21. 14 The qirc file
  22. 15 Packages
  23. 15.1 Package conflicts
  24. 15.2 Installing packages
  25. 15.3 Removing packages
  26. 15.4 Upgrading packages
  27. 15.4.1 Package blacklist
  28. 16 Recipes
  29. 16.1 Variables
  30. 16.2 Special variables
  31. 16.3 Writing recipes
  32. 16.4 Building packages
  33. 16.5 Variables from the environment
  34. 16.6 The meta file
  35. 17 Order files
  36. 18 Creating packages
  37. 19 Examining packages
  38. 20 Qi exit status
  39. 21 Getting support
  40. 22 Contributing to Dragora
  41. 22.1 How to place a mirror
  42. Appendix A GNU Free Documentation License
  43. Index
  44. Dragora 3.0 Handbook
  45. ********************
  46. This Handbook is for Dragora (version 3.0, initial revision, 26 Apr
  47. 2023).
  48. Copyright © 2020-2023 The Dragora Team.
  49. Permission is granted to copy, distribute and/or modify this document
  50. under the terms of the GNU Free Documentation License, Version 1.3 or
  51. any later version published by the Free Software Foundation; with no
  52. Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  53. 1 About this handbook
  54. *********************
  55. TODO (Add intro + versioning scheme paragraph).
  56. 1.1 Typographic conventions
  57. ===========================
  58. TODO (appendix).
  59. Revision history (ChangeLog)
  60. ****************************
  61. TODO (appendix).
  62. 2 What is Dragora?
  63. ******************
  64. *Dragora* is an independent GNU/Linux distribution project which was
  65. created from scratch with the intention of providing a reliable
  66. operating system with maximum respect for the user by including entirely
  67. free software. *Dragora* is based on the concepts of simplicity and
  68. elegance, it offers a user-friendly Unix-like environment with emphasis
  69. on stability and security for long-term durability.
  70. To put it in a nutshell, *Dragora* is...
  71. * Minimalist.
  72. * Free as in freedom.
  73. * Getting better by the day.
  74. * A whole lot of fun (not suitable for old vinegars).
  75. Some of the features of Dragora are:
  76. * SysV init as the classic, documented initialization program (PID
  77. 1).
  78. * Perp to reliably start, monitor, log and control "critical" system
  79. daemons.
  80. * Lightweight alternatives to popular free software; i.e, musl libc,
  81. libressl, mksh, scron, pkgconf.
  82. * The Trinity Desktop Environment (TDE).
  83. * Window managers such as TWM, DWM.
  84. * Graft for managing multiple packages under a single directory
  85. hierarchy using symbolic links mechanisms.
  86. * Qi as a simple local package manager that complements Graft to
  87. create, install, remove and upgrade software packages.
  88. 2.1 Free software
  89. =================
  90. TODO.
  91. 2.2 GNU
  92. =======
  93. TODO.
  94. 2.3 Linux and Linux-libre
  95. =========================
  96. TODO.
  97. 3 Why should I use Dragora?
  98. ***************************
  99. We cannot and do not intend to decide for you, we can only cite what we
  100. believe to be Dragora's main strengths:
  101. * *Independent*: As mentioned before, Dragora is an independent
  102. project, this means that it is based on a voluntary basis where one
  103. or more people share the same direction or intentions for the sake
  104. of the project and in benefit of the free software community. But
  105. above all, it is not a purely commercial project or one that is
  106. made by a company, where they have commercial interests, and where
  107. many times they will do anything to catch you and see your face for
  108. their selfish business.
  109. * *Simple:* The underlying concept of Dragora's design philosophy is
  110. simplicity: KISS, "Keep It Simple, Stupid!". This principle, which
  111. derives from what is known as "Ockham's razor," was developed by
  112. the first modern critical philosopher: William of Ockham. We
  113. believe this concept represents the traditional UNIX philosophy -
  114. so we don't add functionality unnecessarily, nor do we duplicate
  115. information.
  116. * *Ethical:* We try to ensure that the included software is
  117. completely free and allows you to legally run, copy, distribute,
  118. study, change and improve the software.
  119. * *Language:* Native support.
  120. * *Community:* Dragora is not a closed project. On the contrary,
  121. anyone person with good intentions is welcome - and encouraged! -
  122. to join and help.
  123. 4 History
  124. *********
  125. Development of Dragora started in 2007 by Matias Andres Fonzo from
  126. Santiago del Estero, Argentina. After one year of hard work, the first
  127. beta of Dragora was released on June 13, 2008, which contained the basic
  128. GNU toolset, boot scripts, package system, and an installer. Whereas
  129. the intention was to achieve a 100% "free" as in freedom GNU/Linux
  130. distribution from the beginning, this very first version was not fully
  131. free (or libre) since all parts were free software, except for the Linux
  132. Kernel due to blobs or non-free parts. Fortunately, the Linux-Libre
  133. project appears that same year, which removes or cleans the non-free
  134. parts of the official versions of the Linux Kernel. This led to the
  135. second beta of Dragora on September 18, 2008; completing distribution's
  136. freedom by replacing the Kernel, and becoming the first one available to
  137. the public. Ongoing work to provide a more complete distribution would
  138. result in the stable release of Dragora 1.0, achieved on March 13, 2009.
  139. The series ends with the massive update plus fixes and added software
  140. for version 1.1 released on October 8, 2009.
  141. Design of this series was based on a traditional GNU/Linux scheme
  142. with SysVinit as the init system but using BSD-style boot scripts. The
  143. package system, the installer, the text menu-mode tools and the boot
  144. scripts were all written using the syntax and the features offered by
  145. GNU Bash. Initially the binary packages were provided in .tbz2 format
  146. (files compressed with bzip2 and packaged using GNU Tar) which later
  147. migrated to the .tlz format (files compressed with lzip for a higher
  148. compression plus very safe integrity checking). Dragora's installer
  149. offered the option of several languages (translations produced by the
  150. community) to choose between English, Galician, Italian, and Spanish. A
  151. second CD included the packages for the K Desktop Environment (KDE) 3
  152. series.
  153. 4.1 Releases
  154. ============
  155. Below are the dates and code names used for all the Dragora releases:
  156. * _*Dragora 1.0 Beta 1:* June 13th, 2008 - "hell"._
  157. * _*Dragora 1.0 Beta 2:* September 18th, 2008._
  158. * _*Dragora 1.0 Release Candidate 1:* February 12th, 2009._
  159. * _*Dragora 1.0 Stable:* March 13th, 2009 - "starlight"._
  160. * _*Dragora 1.1 Release Candidate 1:* August 25th, 2009._
  161. * _*Dragora 1.1 Stable:* October 8th, 2009 - "stargazer"._
  162. * _*Dragora 2.0 Release Candidate 1:* January 24th, 2010._
  163. * _*Dragora 2.0 Release Candidate 2:* March 28th, 2010._
  164. * _*Dragora 2.0 Stable:* April 13th, 2010 - "ardi"._
  165. * _*Dragora 2.1 Release Candidate 1:* December 4th, 2010._
  166. * _*Dragora 2.1 Stable:* December 31st, 2010 - "dio"._
  167. * _*Dragora 2.2 Release Candidate 1:* March 2nd, 2012._
  168. * _*Dragora 2.2 Stable:* April 21st, 2012 - "rafaela"._
  169. * _*Dragora 3.0 Alpha 1:* December 31st, 2017._
  170. * _*Dragora 3.0 Alpha 2:* September 28th, 2018._
  171. * _*Dragora 3.0 Beta 1:* October 16th, 2019._
  172. 5 Maintainers
  173. *************
  174. TODO.
  175. 6 A quick glance at Dragora
  176. ***************************
  177. TODO.
  178. 7 Boot options from live medium
  179. *******************************
  180. TODO.
  181. 8 Using dragora-installer
  182. *************************
  183. TODO.
  184. 9 Installing the system manually (as an alternative)
  185. ****************************************************
  186. TODO.
  187. 10 Introduction to package management in Dragora
  188. ************************************************
  189. TODO.
  190. 11 Package management in a nutshell
  191. ***********************************
  192. TODO.
  193. Using third-party free software
  194. *******************************
  195. TODO (appendix).
  196. 12 Introduction to Qi
  197. *********************
  198. Qi is a simple but well-integrated package manager. It can create,
  199. install, remove, and upgrade software packages. Qi produces binary
  200. packages using recipes, which are files containing specific instructions
  201. to build each package from source. Qi can manage multiple packages
  202. under a single directory hierarchy. This method allows to maintain a
  203. set of packages and multiple versions of them. This means that Qi could
  204. be used as the main package manager or complement the existing one.
  205. Qi offers a friendly command line interface, a global configuration
  206. file, a simple recipe layout to deploy software packages; also works
  207. with binary packages in parallel, speeding up installations and packages
  208. in production. The format used for packages is a simplified and safer
  209. variant of POSIX pax archive compressed in lzip format.
  210. Qi is a modern (POSIX-compliant) shell script released under the
  211. terms of the GNU General Public License. There are only two major
  212. dependencies for the magic: graft(1) and tarlz(1), the rest is expected
  213. to be found in any Unix-like system.
  214. 13 Invoking qi
  215. **************
  216. This chapter describes the synopsis for invoking Qi.
  217. Usage: qi COMMAND [OPTION...] [FILE]...
  218. One mandatory command specifies the operation that 'qi' should perform,
  219. options are meant to detail how this operation should be performed
  220. during or after the process.
  221. Qi supports the following commands:
  222. 'warn'
  223. Warn about files that will be installed.
  224. 'install'
  225. Install packages.
  226. 'remove'
  227. Remove packages.
  228. 'upgrade'
  229. Upgrade packages.
  230. 'extract'
  231. Extract packages for debugging purposes.
  232. 'create'
  233. Create a .tlz package from directory.
  234. 'build'
  235. Build packages using recipe names.
  236. 'order'
  237. Resolve build order through .order files
  238. Options when installing, removing, or upgrading software packages:
  239. '-f'
  240. '--force'
  241. Force upgrade of pre-existing packages.
  242. '-k'
  243. '--keep'
  244. Keep directories when build/remove/upgrade.
  245. Keep (don't delete) the package directory when using remove/upgrade
  246. command.
  247. This will also try to preserve the directories '${srcdir}' and
  248. '${destdir}' when using build command. Its effect is available in
  249. recipes as '${keep_srcdir}' and '${keep_destdir}'. See *note
  250. Special variables: Recipes. for details.
  251. '-p'
  252. '--prune'
  253. Prune conflicts.
  254. '-P'
  255. '--packagedir=<dir>'
  256. Set directory for package installations.
  257. '-t'
  258. '--targetdir=<dir>'
  259. Set target directory for symbolic links.
  260. '-r'
  261. '--rootdir=<dir>'
  262. Use the fully qualified named directory as the root directory for
  263. all qi operations.
  264. Note: the target directory and the package directory will be
  265. relative to the specified directory, excepting the graft log file.
  266. Options when building software packages using recipes:
  267. '-a'
  268. '--architecture'
  269. Set architecture name for the package.
  270. '-j'
  271. '--jobs'
  272. Parallel jobs for the compiler.
  273. This option sets the variable '${jobs}'. If not specified, default
  274. sets to 1.
  275. '-S'
  276. '--skip-questions'
  277. Skip questions on completed recipes.
  278. '-1'
  279. '--increment'
  280. Increment release number ('${release}' + 1).
  281. The effect of this option will be omitted if -no-package is being
  282. used.
  283. '-n'
  284. '--no-package'
  285. Do not create a .tlz package.
  286. '-i'
  287. '--install'
  288. Install package after the build.
  289. '-u'
  290. '--upgrade'
  291. Upgrade package after the build.
  292. '-o'
  293. '--outdir=<dir>'
  294. Where the packages produced will be written.
  295. This option sets the variable '${outdir}'.
  296. '-w'
  297. '--worktree=<dir>'
  298. Where archives, patches, recipes are expected.
  299. This option sets the variable '${worktree}'.
  300. '-s'
  301. '--sourcedir=<dir>'
  302. Where compressed sources will be found.
  303. This option sets the variable '${tardir}'.
  304. Other options:
  305. '-v'
  306. '--verbose'
  307. Be verbose (an extra -v gives more).
  308. It sets the verbosity level, default sets to 0.
  309. The value 1 is used for more verbosity while the value 2 is too
  310. detailed. Although at the moment it is limited to graft(1)
  311. verbosity.
  312. '-N'
  313. '--no-rc'
  314. Do not read the configuration file.
  315. This will ignore reading the qirc file.
  316. '-L'
  317. '--show-location'
  318. Print default directory locations and exit.
  319. This will print the target directory, package directory, working
  320. tree, the directory for sources, and the output directory for the
  321. packages produced. The output will appear on STDOUT as follows:
  322. QI_TARGETDIR=/usr/local
  323. QI_PACKAGEDIR=/usr/local/pkgs
  324. QI_WORKTREE=/usr/src/qi
  325. QI_TARDIR=/usr/src/qi/sources
  326. QI_OUTDIR=/var/cache/qi/packages
  327. You can set these environment variables using one of the following
  328. methods:
  329. 'eval "$(qi -L)"'
  330. This will display the default locations taking into account the
  331. values set from the qirc configuration file. You can deny the
  332. influence of the configuration file by setting the option '-N'.
  333. 'eval "$(qi -N -L)"'
  334. Or you can adjust the new locations using the command-line options,
  335. e.g:
  336. 'eval "$(qi -N --targetdir=/directory -L)"'
  337. '-h'
  338. '--help'
  339. Display the usage and exit.
  340. '-V'
  341. '--version'
  342. This will print the (short) version information and then exit.
  343. The same can be achieved if Qi is invoked as 'qi version'.
  344. When FILE is -, qi can read from the standard input. See examples
  345. from the *note Packages:: section.
  346. Exit status: 0 for a normal exit, 1 for minor common errors (help
  347. usage, support not available, etc), 2 to indicate a command execution
  348. error; 3 for integrity check error on compressed files, 4 for empty, not
  349. regular, or expected files, 5 for empty or not defined variables, 6 when
  350. a package already exist, 10 for network manager errors. For more
  351. details, see the *note Qi exit status:: section.
  352. 14 The qirc file
  353. ****************
  354. The global 'qirc' file offers a way to define variables and tools (such
  355. as a download manager) for default use. This file is used by qi at
  356. runtime, e.g., to build, install, remove or upgrade packages.
  357. Variables and their possible values must be declared as any other
  358. variable in the shell.
  359. The command line options related to the package directory and target
  360. directory and some of the command line options used for the build
  361. command, have the power to override the values declared on 'qirc'. See
  362. *note Invoking qi::.
  363. The order in which qi looks for this file is:
  364. 1. '${HOME}/.qirc' Effective user.
  365. 2. '${sysconfdir}/qirc' System-wide.
  366. If you intend to run qi as effective user, the file
  367. '${sysconfdir}/qirc' could be copied to '${HOME}/.qirc' setting the
  368. paths for '${packagedir}' and '${targetdir}' according to the '$HOME'.
  369. 15 Packages
  370. ***********
  371. A package is a suite of programs usually distributed in binary form
  372. which may also contain manual pages, documentation, or any other file
  373. associated to a specific software.
  374. The package format used by qi is a simplified POSIX pax archive
  375. compressed using lzip(1). The file extension for packages ends in
  376. '.tlz'.
  377. Both package installation and package de-installation are managed using
  378. two important (internal) variables: '${packagedir}' and '${targetdir}',
  379. these values can be changed in the configuration file or via options.
  380. '${packagedir}' is a common directory tree where the package contents
  381. will be decompressed (will reside).
  382. '${targetdir}' is a target directory where the links will be made by
  383. graft(1) taking '${packagedir}/package_name' into account.
  384. Packages are installed in self-contained directory trees and symbolic
  385. links from a common area are made to the package files. This allows
  386. multiple versions of the same package to coexist on the same system.
  387. 15.1 Package conflicts
  388. ======================
  389. All the links to install or remove a package are handled by graft(1).
  390. Since multiple packages can be installed or removed at the same time,
  391. certain conflicts may arise between the packages.
  392. graft(2) defines a CONFLICT as one of the following conditions:
  393. * If the package object is a directory and the target object exists
  394. but is not a directory.
  395. * If the package object is not a directory and the target object
  396. exists and is not a symbolic link.
  397. * If the package object is not a directory and the target object
  398. exists and is a symbolic link to something other than the package
  399. object.
  400. The default behavior of qi for an incoming package is to ABORT if a
  401. conflict arises. When a package is going to be deleted, qi tells to
  402. graft(1) to remove those parts that are not in conflict, leaving the
  403. links to the belonging package. This behavior can be forced if the
  404. -prune option is given.
  405. 15.2 Installing packages
  406. ========================
  407. To install a single package, simply type:
  408. qi install coreutils_8.30_i586-1@tools.tlz
  409. To install multiple packages at once, type:
  410. qi install gcc_8.3.0_i586-1@devel.tlz rafaela_2.2_i586-1@legacy.tlz ...
  411. Warn about the files that will be linked:
  412. qi warn bash_5.0_i586-1@shells.tlz
  413. This is to verify the content of a package before installing it.
  414. See the process of an installation:
  415. qi install --verbose mariana_3.0_i586-1@woman.tlz
  416. A second -verbose or -v option gives more (very verbose).
  417. Installing package in a different location:
  418. qi install --rootdir=/media/floppy lzip_1.21_i586-1@compressors.tlz
  419. Important: the -rootdir option assumes '${targetdir}' and
  420. '${packagedir}'. See the following example:
  421. qi install --rootdir=/home/selk lzip_1.21_i586-1@compressors.tlz
  422. The content of "lzip_1.21_i586-1@compressors.tlz" will be
  423. decompressed into '/home/selk/pkgs/lzip_1.21_i586-1@compressors'.
  424. Assuming that the main binary for lzip is under
  425. '/home/selk/pkgs/lzip_1.21_i586-1@compressors/usr/bin/' the target for
  426. "usr/bin" will be created at '/home/selk'. Considering that you have
  427. exported the 'PATH' as '${HOME}/usr/bin', now the system is able to see
  428. the recent lzip command.
  429. Installing from a list of packages using standard input:
  430. qi install - < PACKAGELIST.txt
  431. Or in combination with another tool:
  432. sort -u PACKAGELIST.txt | qi install -
  433. The sort command will read and sorts the list of declared packages,
  434. while trying to have unique entries for each statement. The output
  435. produced is captured by Qi to install each package.
  436. An example of a list containing package names is:
  437. /var/cache/qi/packages/amd64/tcl_8.6.9_amd64-1@devel.tlz
  438. /var/cache/qi/packages/amd64/tk_8.6.9.1_amd64-1@devel.tlz
  439. /var/cache/qi/packages/amd64/vala_0.42.3_amd64-1@devel.tlz
  440. 15.3 Removing packages
  441. ======================
  442. To remove a package, simply type:
  443. qi remove xz_5.2.4_i586-1@compressors.tlz
  444. Remove command will match the package name using '${packagedir}' as
  445. prefix. For example, if the value of '${packagedir}' has been set to
  446. /usr/pkg, this will be equal to:
  447. qi remove /usr/pkg/xz_5.2.4_i586-1@compressors
  448. Detailed output:
  449. qi remove --verbose /usr/pkg/xz_5.2.4_i586-1@compressors
  450. A second -verbose or -v option gives more (very verbose).
  451. By default the remove command does not preserve a package directory
  452. after removing its links from '${targetdir}', but this behavior can be
  453. changed if the -keep option is passed:
  454. qi remove --keep /usr/pkg/lzip_1.21_i586-1@compressors
  455. This means that the links to the package can be reactivated, later:
  456. cd /usr/pkg && graft -i lzip_1.21_i586-1@compressors
  457. Removing package from a different location:
  458. qi remove --rootdir=/home/cthulhu xz_5.2.4_i586-1@compressors
  459. Removing a package using standard input:
  460. echo vala_0.42.3_amd64-1@devel | qi remove -
  461. This will match with the package directory.
  462. 15.4 Upgrading packages
  463. =======================
  464. The upgrade command inherits the properties of the installation and
  465. removal process. To make sure that a package is updated, the package is
  466. installed in a temporary directory taking '${packagedir}' into account.
  467. Once the incoming package is pre-installed, qi can proceed to search and
  468. delete packages that have the same name (considered as previous ones).
  469. Finally, the package is re-installed at its final location and the
  470. temporary directory is removed.
  471. Since updating a package can be crucial and so to perform a
  472. successful upgrade, from start to finish, you will want to ignore some
  473. important system signals during the upgrade process, those signals are
  474. SIGHUP, SIGINT, SIGQUIT, SIGABRT, and SIGTERM.
  475. To upgrade a package, just type:
  476. qi upgrade gcc_9.0.1_i586-1@devel.tlz
  477. This will proceed to upgrade "gcc_9.0.1_i586-1@devel" removing any
  478. other version of "gcc" (if any).
  479. If you want to keep the package directories of versions found during the
  480. upgrade process, just pass:
  481. qi upgrade --keep gcc_9.0.1_i586-1@devel.tlz
  482. To see the upgrade process:
  483. qi upgrade --verbose gcc_9.0.1_i586-1@devel.tlz
  484. A second -verbose or -v option gives more (very verbose).
  485. To force the upgrade of an existing package:
  486. qi upgrade --force gcc_9.0.1_i586-1@devel.tlz
  487. 15.4.1 Package blacklist
  488. ------------------------
  489. To implement general package facilities, either to install, remove or
  490. maintain the hierarchy of packages in a clean manner, qi makes use of
  491. the pruning operation via graft(1) by default:
  492. There is a risk if those are crucial packages for the proper
  493. functioning of the system, because it implies the deactivation of
  494. symbolic from the target directory, _especially_ when transitioning an
  495. incoming package into its final location during an upgrade.
  496. A blacklist of package names has been devised for the case where a user
  497. decides to upgrade all the packages in the system, or just the crucial
  498. ones, such as the C library.
  499. The blacklist is related to the upgrade command only, consists in
  500. installing a package instead of updating it or removing previous
  501. versions of it; the content of the package will be updated over the
  502. existing content at '${packagedir}', while the existing links from
  503. '${targetdir}' will be preserved. A pruning of links will be carried
  504. out in order to re-link possible differences with the recent content,
  505. this helps to avoid leaving dead links in the target directory.
  506. Package names for the blacklist to be declared must be set from the
  507. configuration file. By default, it is declared using the package name,
  508. which is more than enough for critical system packages, but if you want
  509. to be more specific, you can declare a package using:
  510. '${pkgname}_${pkgversion}_${arch}-${release}' where the package category
  511. is avoided for common matching. See *note Special variables: Recipes.
  512. for a description of these variables.
  513. ---------- Footnotes ----------
  514. (1) For more details about tarlz and the lzip format, visit
  515. <https://lzip.nongnu.org/tarlz.html>.
  516. (2) The official guide for Graft can be found at
  517. <https://peters.gormand.com.au/Home/tools/graft/graft.html>.
  518. 16 Recipes
  519. **********
  520. A recipe is a file telling qi what to do. Most often, the recipe tells
  521. qi how to build a binary package from a source tarball.
  522. A recipe has two parts: a list of variable definitions and a list of
  523. sections. By convention, the syntax of a section is:
  524. section_name()
  525. {
  526. section lines
  527. }
  528. The section name is followed by parentheses, one newline and an
  529. opening brace. The line finishing the section contains just a closing
  530. brace. The section names or the function names currently recognized are
  531. 'build'.
  532. The 'build' section (or *shell function*) is an augmented shell
  533. script that contains the main instructions to build software from
  534. source.
  535. If there are other functions defined by the packager, Qi detects them
  536. for later execution.
  537. 16.1 Variables
  538. ==============
  539. A "variable" is a *shell variable* defined either in 'qirc' or in a
  540. recipe to represent a string of text, called the variable's "value".
  541. These values are substituted by explicit request in the definitions of
  542. other variables or in calls to external commands.
  543. Variables can represent lists of file names, options to pass to
  544. compilers, programs to run, directories to look in for source files,
  545. directories to write output to, or anything else you can imagine.
  546. Definitions of variables in qi have four levels of precedence.
  547. Options which define variables from the command-line override those
  548. specified in the 'qirc' file, while variables defined in the recipe
  549. override those specified in 'qirc', taking priority over those variables
  550. set by command-line options. Finally, the variables have default values
  551. if they are not defined anywhere.
  552. Options that set variables through the command-line can only
  553. reference variables defined in 'qirc' and variables with default values.
  554. Definitions of variables in 'qirc' can only reference variables
  555. previously defined in 'qirc' and variables with default values.
  556. Definitions of variables in the recipe can only reference variables
  557. set by the command-line, variables previously defined in the recipe,
  558. variables defined in 'qirc', and variables with default values.
  559. 16.2 Special variables
  560. ======================
  561. There are variables which can only be set using the command line options
  562. or via 'qirc', there are other special variables which can be defined or
  563. redefined in a recipe. See the following definitions:
  564. 'outdir' is the directory where the packages produced are written.
  565. This variable can be redefined per-recipe. Default sets to
  566. '/var/cache/qi/packages'.
  567. 'worktree' is the working tree where archives, patches, and recipes
  568. are expected. This variable can not be redefined in the recipe.
  569. Default sets to '/usr/src/qi'.
  570. 'tardir' is defined in the recipe to the directory where the tarball
  571. containing the source can be found. The full name of the tarball is
  572. composed as '${tardir}/$tarname'. Its value is available in the recipe
  573. as '${tardir}'; a value of . for 'tardir' sets it to the value of CWD
  574. (Current Working Directory), this is where the recipe lives.
  575. 'arch' is the architecture to compose the package name. Its value is
  576. available in the recipe as '${arch}'. Default value is the one that was
  577. set in the Qi configuration.
  578. 'jobs' is the number of parallel jobs to pass to the compiler. Its
  579. value is available in the recipe as '${jobs}'. The default value is 1.
  580. The two variables '${srcdir}' and '${destdir}' can be set in the
  581. recipe, as any other variable, but if they are not, qi uses default
  582. values for them when building a package.
  583. 'srcdir' contains the source code to be compiled, and defaults to
  584. '${program}-${version}'. 'destdir' is the place where the built package
  585. will be installed, and defaults to '${TMPDIR}/package-${program}'.
  586. If 'pkgname' is left undefined, the special variable 'program' is
  587. assigned by default. If 'pkgversion' is left undefined, the special
  588. variable 'version' is assigned by default.
  589. 'pkgname' and 'pkgversion' along with: 'version', 'arch', 'release',
  590. and (optionally) 'pkgcategory' are used to produce the package name in
  591. the form:
  592. '${pkgname}_${pkgversion}_${arch}-${release}[@${pkgcategory}].tlz'
  593. 'pkgcategory' is an optional special variable that can be defined on
  594. the recipe to categorize the package name. If it is defined, then the
  595. package output will be composed as
  596. '${pkgname}_${pkgversion}_${arch}-${release}[@${pkgcategory}.tlz'.
  597. Automatically, the value of 'pkgcategory' will be prefixed using the '@'
  598. (at) symbol which will be added to the last part of the package name.
  599. A special variable called 'replace' can be used to declare package
  600. names that will be replaced at installation time.
  601. The special variables 'keep_srcdir' and 'keep_destdir' are provided
  602. in order to preserve the directories '${srcdir}' or '${destdir}', if
  603. those exists as such. Note: The declaration of these variables are
  604. subject to manual deactivation; its purpose in recipes is to preserve
  605. the directories that relate to the package's build (source) and
  606. destination directory, that is so that another recipe can get a new
  607. package (or meta package) from there. For example, the declarations can
  608. be done as:
  609. keep_srcdir=keep_srcdir
  610. keep_destdir=keep_destdir
  611. Then from another recipe you would proceed to copy the necessary
  612. files that will compose the meta package, from the main function you
  613. must deactivate the variables at the end:
  614. unset -v keep_srcdir keep_destdir
  615. This will leave the 'keep_srcdir' and 'keep_destdir' variables blank
  616. to continue with the rest of the recipes.
  617. The special variable 'opt_skiprecipe' is available when you need to
  618. ignore a recipe cleanly, continuing with the next recipe. May you add a
  619. conditional test then set it as 'opt_skiprecipe=opt_skiprecipe'.
  620. The variable 'tarlz_compression_options' can be used to change the
  621. default compression options in tarlz(1), default sets to '-9 --solid'.
  622. For example if the variable is declared as:
  623. tarlz_compression_options="-0 --bsolid"
  624. It will change the granularity of tarlz(1) by using the '--bsolid'
  625. option (1), as well as increasing the compression speed by lowering the
  626. compression level with '-0'.
  627. This is only recommended for recipes where testing, or faster
  628. processing is desired to create the packaged file more quickly. It is
  629. not recommended for production or general distribution of binary
  630. packages.
  631. A typical recipe contains the following variables:
  632. * 'program': Software name.
  633. It matches the source name. It is also used to compose the name of
  634. the package if '${pkgname}' is not specified.
  635. * 'version': Software version.
  636. It matches the source name. It is also used to compose the version
  637. of the package if '${pkgversion}' is not specified.
  638. * 'arch': Software architecture.
  639. It is used to compose the architecture of the package in which it
  640. is build.
  641. * 'release': Release number.
  642. This is used to reflect the release number of the package. It is
  643. recommended to increase this number after any significant change in
  644. the recipe or post-install script.
  645. * 'pkgcategory': Package category.
  646. Optional but recommended variable to categorize the package name
  647. when it is created.
  648. Obtaining sources over the network must be declared in the recipe using
  649. the 'fetch' variable.
  650. The variables 'netget' and 'rsync' can be defined in 'qirc' to
  651. establish a network downloader in order to get the sources. If they are
  652. not defined, qi uses default values:
  653. 'netget' is the general network downloader tool, defaults sets to
  654. 'wget2 -c -w1 -t3 --no-check-certificate'.
  655. 'rsync' is the network tool for sources containing the prefix for the
  656. RSYNC protocol, default sets to 'rsync -v -a -L -z -i --progress'.
  657. The variable 'description' is used to print the package description
  658. when a package is installed.
  659. A description has two parts: a brief description, and a long
  660. description. By convention, the syntax of 'description' is:
  661. description="
  662. Brief description.
  663. Long description.
  664. "
  665. The first line of the value represented is a brief description of the
  666. software (called "blurb"). A blank line separates the _brief
  667. description_ from the _long description_, which should contain a more
  668. descriptive description of the software.
  669. An example looks like:
  670. description="
  671. The GNU core utilities.
  672. The GNU core utilities are the basic file, shell and text manipulation
  673. utilities of the GNU operating system. These are the core utilities
  674. which are expected to exist on every operating system.
  675. "
  676. Please consider a length limit of 78 characters as maximum, because
  677. the same one would be used on the meta file creation. See *note The
  678. meta file: Recipes. section.
  679. The 'homepage' variable is used to declare the main site or home
  680. page:
  681. homepage=https://www.gnu.org/software/gcc
  682. The variable 'license' is used for license information(2). Some code
  683. in the program can be covered by license A, license B, or license C. For
  684. "separate licensing" or "heterogeneous licensing", we suggest using *|*
  685. for a disjunction, *&* for a conjunction (if that ever happens in a
  686. significant way), and comma for heterogeneous licensing. Comma would
  687. have lower precedence, plus added special terms.
  688. license="LGPL, GPL | Artistic - added permission"
  689. 16.3 Writing recipes
  690. ====================
  691. Originally, Qi was designed for the series of Dragora GNU/Linux-Libre 3;
  692. this doesn't mean you can't use it in another distribution, just that if
  693. you do, you'll have to try it out for yourself. To help with this, here
  694. are some references to well-written recipes:
  695. * <https://git.savannah.nongnu.org/cgit/dragora.git/tree/recipes>
  696. * <https://notabug.org/dragora/dragora/src/master/recipes>
  697. * <https://notabug.org/dragora/dragora-extras/src/master/recipes>
  698. *
  699. <https://git.savannah.nongnu.org/cgit/dragora/dragora-extras.git/tree/recipes>
  700. 16.4 Building packages
  701. ======================
  702. A recipe is any valid regular file. Qi sets priorities for reading a
  703. recipe, the order in which qi looks for a recipe is:
  704. 1. Current working directory.
  705. 2. If the specified path name does not contain "recipe" as the last
  706. component. Qi will complete it by adding "recipe" to the path
  707. name.
  708. 3. If the recipe is not in the current working directory, it will be
  709. searched under '${worktree}/recipes'. The last component will be
  710. completed adding "recipe" to the specified path name.
  711. To build a single package, type:
  712. qi build x-apps/xterm
  713. Multiple jobs can be passed to the compiler to speed up the build
  714. process:
  715. qi build --jobs 3 x-apps/xterm
  716. Update or install the produced package (if not already installed) when
  717. the build command ends:
  718. qi build -j3 --upgrade x-apps/xterm
  719. Only process a recipe but do not create the binary package:
  720. qi build --no-package dict/aspell
  721. The options -install or -upgrade have no effect when -no-package is
  722. given.
  723. This is useful to inspect the build process of the above recipe:
  724. qi build -keep -no-package dict/aspell 2>&1 | tee aspell-log.txt
  725. The -keep option could preserve the source directory and the
  726. destination directory for later inspection. A log file of the build
  727. process will be created redirecting both, standard error and standard
  728. output to tee(1).
  729. 16.5 Variables from the environment
  730. ===================================
  731. Qi has environment variables which can be used at build time:
  732. The variable 'TMPDIR' sets the temporary directory for sources, which
  733. is used for package extractions (see *note Examining packages::) and is
  734. prepended to the value of '${srcdir}' and '${destdir}' in build command.
  735. By convention its default value is equal to '/usr/src/qi/build'.
  736. The variables 'QICFLAGS', 'QICXXFLAGS', 'QILDFLAGS', and 'QICPPFLAGS'
  737. have no effect by default. The environment variables such as 'CFLAGS',
  738. 'CXXFLAGS', 'LDFLAGS', and 'CPPFLAGS' are unset at compile time:
  739. Recommended practice is to set variables in the command line of
  740. 'configure' or _make(1)_ instead of exporting to the environment. As
  741. follows:
  742. <https://www.gnu.org/software/make/manual/html_node/Environment.html>
  743. It is not wise for makefiles to depend for their functioning on
  744. environment variables set up outside their control, since this
  745. would cause different users to get different results from the same
  746. makefile. This is against the whole purpose of most makefiles.
  747. Setting environment variables for configure is deprecated because
  748. running configure in varying environments can be dangerous.
  749. <https://gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Defining-Variables.html>
  750. Variables not defined in a site shell script can be set in the
  751. environment passed to configure. However, some packages may run
  752. configure again during the build, and the customized values of
  753. these variables may be lost. In order to avoid this problem, you
  754. should set them in the configure command line, using 'VAR=value'.
  755. For example:
  756. './configure CC=/usr/local2/bin/gcc'
  757. <https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Setting-Output-Variables.html>
  758. If for instance the user runs 'CC=bizarre-cc ./configure', then the
  759. cache, config.h, and many other output files depend upon bizarre-cc
  760. being the C compiler. If for some reason the user runs ./configure
  761. again, or if it is run via './config.status --recheck', (See
  762. Automatic Remaking, and see config.status Invocation), then the
  763. configuration can be inconsistent, composed of results depending
  764. upon two different compilers. [...] Indeed, while configure can
  765. notice the definition of CC in './configure CC=bizarre-cc', it is
  766. impossible to notice it in 'CC=bizarre-cc ./configure', which,
  767. unfortunately, is what most users do. [...] configure: error:
  768. changes in the environment can compromise the build.
  769. If the 'SOURCE_DATE_EPOCH' environment variable is set to a UNIX
  770. timestamp (defined as the number of seconds, excluding leap seconds,
  771. since 01 Jan 1970 00:00:00 UTC.); then the given timestamp will be used
  772. to overwrite any newer timestamps on the package contents (when it is
  773. created). More information about this can be found at
  774. <https://reproducible-builds.org/specs/source-date-epoch/>.
  775. 16.6 The meta file
  776. ==================
  777. The "meta file" is a regular file created during the build process, it
  778. contains information about the package such as package name, package
  779. version, architecture, release, fetch address, description, and other
  780. minor data extracted from processed recipes. The name of the file is
  781. generated as '${full_pkgname}.tlz.txt', and its purpose is to reflect
  782. essential information to the user without having to look inside the
  783. package content. The file format is also intended to be used by other
  784. scripts or by common Unix tools.
  785. The content of a meta file looks like:
  786. #
  787. # Pattern scanning and processing language.
  788. #
  789. # The awk utility interprets a special-purpose programming language
  790. # that makes it possible to handle simple data-reformatting jobs
  791. # with just a few lines of code. It is a free version of 'awk'.
  792. #
  793. # GNU awk implements the AWK utility which is part of
  794. # IEEE Std 1003.1 Shell and Utilities (XCU).
  795. #
  796. QICFLAGS="-O2"
  797. QICXXFLAGS="-O2"
  798. QILDFLAGS=""
  799. QICPPFLAGS=""
  800. pkgname=gawk
  801. pkgversion=5.0.1
  802. arch=amd64
  803. release=1
  804. pkgcategory="tools"
  805. full_pkgname=gawk_5.0.1_amd64-1@tools
  806. blurb="Pattern scanning and processing language."
  807. homepage="https://www.gnu.org/software/gawk"
  808. license="GPLv3+"
  809. fetch="https://ftp.gnu.org/gnu/gawk/gawk-5.0.1.tar.lz"
  810. replace=""
  811. A package descriptions is extracted from the variable 'description'
  812. where each line is interpreted literally and pre-formatted to fit in
  813. (exactly) *80 columns*, plus the character '#' and a blank space is
  814. prefixed to every line (shell comments).
  815. In addition to the Special variables, there are implicit variables such
  816. as 'blurb':
  817. The 'blurb' variable is related to the special variable
  818. 'description'. Its value is made from the first (substantial) line of
  819. 'description', mentioned as the "brief description".
  820. The build flags such as 'QICFLAGS', 'QICXXFLAGS', 'QILDFLAGS', and
  821. 'QICPPFLAGS' are only added to the meta file if the declared variable
  822. 'arch' is not equal to the "noarch" value.
  823. ---------- Footnotes ----------
  824. (1) About the '--bsolid' granularity option of tarlz(1),
  825. <https://www.nongnu.org/lzip/manual/tarlz_manual.html#g_t_002d_002dbsolid>.
  826. (2) The proposal for 'license' was made by Richard M. Stallman at
  827. <https://lists.gnu.org/archive/html/gnu-linux-libre/2016-05/msg00003.html>.
  828. 17 Order files
  829. **************
  830. The order command has the purpose of resolving the build order through
  831. .order files. An order file contains a list of recipe names, by default
  832. does not perform any action other than to print a resolved list in
  833. descending order. For example, if *a* depends on *b* and *c*, and *c*
  834. depends on *b* as well, the file might look like:
  835. a: c b
  836. b:
  837. c: b
  838. Each letter represents a recipe name, complete dependencies for the
  839. first recipe name are listed in descending order, which is printed from
  840. right to left, and removed from left to right:
  841. OUTPUT
  842. b
  843. c
  844. a
  845. Blank lines, colons and parentheses are simply ignored. Comment
  846. lines beginning with '#' are allowed.
  847. An order file could be used to build a series of packages, for example,
  848. if the content is:
  849. # Image handling libraries
  850. libs/libjpeg-turbo: devel/nasm
  851. x-libs/jasper: libs/libjpeg-turbo
  852. libs/tiff: libs/libjpeg-turbo
  853. To proceed with each recipe, we can type:
  854. qi order imglibs.order | qi build --install -
  855. The output of 'qi order imglibs.order' tells to qi in which order it
  856. should build the recipes:
  857. devel/nasm
  858. libs/libjpeg-turbo
  859. x-libs/jasper
  860. libs/tiff
  861. 18 Creating packages
  862. ********************
  863. The creation command is an internal function of qi to make new Qi
  864. compatible packages. A package is produced using the contents of the
  865. Current Working Directory and the package file is written out.
  866. Usage: qi create [OUTPUT/PACKAGENAME.TLZ]...
  867. The argument for the file name to be written must contain a fully
  868. qualified named directory as the output directory where the package
  869. produced will be written. The file name should be composed using the
  870. full name: name-version-architecture-release[@pkgcategory].tlz
  871. EXAMPLE
  872. cd /usr/pkg
  873. cd claws-mail_3.17.1_amd64-1@x-apps
  874. qi create /var/cache/qi/packages/claws-mail_3.17.1_amd64-1@x-apps
  875. In this case, the package "claws-mail_3.17.1_amd64-1@x-apps" will be
  876. written into '/var/cache/qi/packages/'.
  877. All packages produced are complemented by a checksum file (.sha256).
  878. 19 Examining packages
  879. *********************
  880. The extraction command serves to examine binary packages for debugging
  881. purposes. It decompresses a package into a single directory, verifying
  882. its integrity and preserving all of its properties (owner and
  883. permissions).
  884. Usage: qi extract [PACKAGENAME.TLZ]...
  885. EXAMPLE
  886. qi extract mksh_R56c_amd64-1@shells.tlz
  887. This action will put the content of "mksh_R56c_amd64-1@shells.tlz"
  888. into a single directory, this is a private directory for the user who
  889. requested the action, creation operation will be equal to *u=rwx,g=,o=
  890. (0700)*. The package content will reside on this location, default mask
  891. to deploy the content will be equal to *u=rwx,g=rwx,o=rwx (0000)*.
  892. Note: the creation of the custom directory is influenced by the value of
  893. the 'TMPDIR' variable.
  894. 20 Qi exit status
  895. *****************
  896. All the exit codes are described in this chapter.
  897. '0'
  898. Successful completion (no errors).
  899. '1'
  900. Minor common errors:
  901. * Help usage on invalid options or required arguments.
  902. * Program needed by qi (prerequisite) is not available.
  903. '2'
  904. Command execution error:
  905. This code is used to return the evaluation of an external command
  906. or shell arguments in case of failure.
  907. '3'
  908. Integrity check error for compressed files.
  909. Compressed files means:
  910. * A tarball file from tar(1), typically handled by the GNU tar
  911. implementation. Supported extensions: .tar, .tar.gz, .tgz,
  912. .tar.Z, .tar.bz2, .tbz2, .tbz, .tar.xz, .txz, .tar.zst, .tzst
  913. * A tarball file from tarlz(1). Supported extensions: .tar.lz,
  914. .tlz
  915. * Zip files from unzip(1). Supported extensions: .zip, .ZIP
  916. * Gzip files from gzip(1). Supported extensions: .gz, .Z
  917. * Bzip2 files from bzip2(1). Supported extension: .bz2
  918. * Lzip files from lzip(1). Supported extension: .lz
  919. * Xz files from xz(1). Supported extension: .xz
  920. * Zstd files from zstd(1). Supported extension: .zst
  921. '4'
  922. File empty, not regular, or expected.
  923. It's commonly expected:
  924. * An argument for giving commands.
  925. * A regular file or readable directory.
  926. * An expected extension: .tlz, .sha256, .order.
  927. * A protocol supported by the network downloader tool.
  928. '5'
  929. Empty or not defined variable:
  930. This code is used to report empty or undefined variables (usually
  931. variables coming from a recipe or assigned arrays that are tested).
  932. '6'
  933. Package already installed:
  934. The package directory for an incoming .tlz package already exists.
  935. '10'
  936. Network manager error:
  937. This code is used if the network downloader tool fails for some
  938. reason.
  939. 21 Getting support
  940. ******************
  941. Dragora's home page can be found at <https://www.dragora.org>. Bug
  942. reports or suggestions can be sent to <dragora-users@nongnu.org>.
  943. 22 Contributing to Dragora
  944. **************************
  945. TODO (introductory text here).
  946. 22.1 How to place a mirror
  947. ==========================
  948. If there's no Dragora mirror near you, you're welcome to contribute one.
  949. First, for users or downloaders, the address
  950. _rsync://rsync.dragora.org/_ contains ISO images and source code (in
  951. various formats) taken from the original sites and distributed by
  952. Dragora.
  953. Mirroring the Dragora server requires approximately 13GB of disk
  954. space (as of January 2022). You can hit rsync directly from
  955. _rsync.dragora.org_ as:
  956. 'rsync -rltpHS --delete-excluded rsync://rsync.dragora.org/dragora
  957. /your/dir/'
  958. Also, consider mirroring from another site in order to reduce load on
  959. the Dragora server. The listed sites at
  960. <https://www.dragora.org/en/get/mirrors/index.html> provide access to
  961. all the material on rsync.dragora.org. They update from us nightly (at
  962. least), and you may access them via rsync with the same options as
  963. above.
  964. Note:
  965. We keep a file called "timestamp" under the main tree after each
  966. synchronization. This file can be used to verify, instead of
  967. synchronizing all the content at once, you can check if this file has
  968. been updated and then continue with the full synchronization.
  969. Appendix A GNU Free Documentation License
  970. *****************************************
  971. Version 1.3, 3 November 2008
  972. Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
  973. <https://fsf.org/>
  974. Everyone is permitted to copy and distribute verbatim copies
  975. of this license document, but changing it is not allowed.
  976. 0. PREAMBLE
  977. The purpose of this License is to make a manual, textbook, or other
  978. functional and useful document "free" in the sense of freedom: to
  979. assure everyone the effective freedom to copy and redistribute it,
  980. with or without modifying it, either commercially or
  981. noncommercially. Secondarily, this License preserves for the
  982. author and publisher a way to get credit for their work, while not
  983. being considered responsible for modifications made by others.
  984. This License is a kind of "copyleft", which means that derivative
  985. works of the document must themselves be free in the same sense.
  986. It complements the GNU General Public License, which is a copyleft
  987. license designed for free software.
  988. We have designed this License in order to use it for manuals for
  989. free software, because free software needs free documentation: a
  990. free program should come with manuals providing the same freedoms
  991. that the software does. But this License is not limited to
  992. software manuals; it can be used for any textual work, regardless
  993. of subject matter or whether it is published as a printed book. We
  994. recommend this License principally for works whose purpose is
  995. instruction or reference.
  996. 1. APPLICABILITY AND DEFINITIONS
  997. This License applies to any manual or other work, in any medium,
  998. that contains a notice placed by the copyright holder saying it can
  999. be distributed under the terms of this License. Such a notice
  1000. grants a world-wide, royalty-free license, unlimited in duration,
  1001. to use that work under the conditions stated herein. The
  1002. "Document", below, refers to any such manual or work. Any member
  1003. of the public is a licensee, and is addressed as "you". You accept
  1004. the license if you copy, modify or distribute the work in a way
  1005. requiring permission under copyright law.
  1006. A "Modified Version" of the Document means any work containing the
  1007. Document or a portion of it, either copied verbatim, or with
  1008. modifications and/or translated into another language.
  1009. A "Secondary Section" is a named appendix or a front-matter section
  1010. of the Document that deals exclusively with the relationship of the
  1011. publishers or authors of the Document to the Document's overall
  1012. subject (or to related matters) and contains nothing that could
  1013. fall directly within that overall subject. (Thus, if the Document
  1014. is in part a textbook of mathematics, a Secondary Section may not
  1015. explain any mathematics.) The relationship could be a matter of
  1016. historical connection with the subject or with related matters, or
  1017. of legal, commercial, philosophical, ethical or political position
  1018. regarding them.
  1019. The "Invariant Sections" are certain Secondary Sections whose
  1020. titles are designated, as being those of Invariant Sections, in the
  1021. notice that says that the Document is released under this License.
  1022. If a section does not fit the above definition of Secondary then it
  1023. is not allowed to be designated as Invariant. The Document may
  1024. contain zero Invariant Sections. If the Document does not identify
  1025. any Invariant Sections then there are none.
  1026. The "Cover Texts" are certain short passages of text that are
  1027. listed, as Front-Cover Texts or Back-Cover Texts, in the notice
  1028. that says that the Document is released under this License. A
  1029. Front-Cover Text may be at most 5 words, and a Back-Cover Text may
  1030. be at most 25 words.
  1031. A "Transparent" copy of the Document means a machine-readable copy,
  1032. represented in a format whose specification is available to the
  1033. general public, that is suitable for revising the document
  1034. straightforwardly with generic text editors or (for images composed
  1035. of pixels) generic paint programs or (for drawings) some widely
  1036. available drawing editor, and that is suitable for input to text
  1037. formatters or for automatic translation to a variety of formats
  1038. suitable for input to text formatters. A copy made in an otherwise
  1039. Transparent file format whose markup, or absence of markup, has
  1040. been arranged to thwart or discourage subsequent modification by
  1041. readers is not Transparent. An image format is not Transparent if
  1042. used for any substantial amount of text. A copy that is not
  1043. "Transparent" is called "Opaque".
  1044. Examples of suitable formats for Transparent copies include plain
  1045. ASCII without markup, Texinfo input format, LaTeX input format,
  1046. SGML or XML using a publicly available DTD, and standard-conforming
  1047. simple HTML, PostScript or PDF designed for human modification.
  1048. Examples of transparent image formats include PNG, XCF and JPG.
  1049. Opaque formats include proprietary formats that can be read and
  1050. edited only by proprietary word processors, SGML or XML for which
  1051. the DTD and/or processing tools are not generally available, and
  1052. the machine-generated HTML, PostScript or PDF produced by some word
  1053. processors for output purposes only.
  1054. The "Title Page" means, for a printed book, the title page itself,
  1055. plus such following pages as are needed to hold, legibly, the
  1056. material this License requires to appear in the title page. For
  1057. works in formats which do not have any title page as such, "Title
  1058. Page" means the text near the most prominent appearance of the
  1059. work's title, preceding the beginning of the body of the text.
  1060. The "publisher" means any person or entity that distributes copies
  1061. of the Document to the public.
  1062. A section "Entitled XYZ" means a named subunit of the Document
  1063. whose title either is precisely XYZ or contains XYZ in parentheses
  1064. following text that translates XYZ in another language. (Here XYZ
  1065. stands for a specific section name mentioned below, such as
  1066. "Acknowledgements", "Dedications", "Endorsements", or "History".)
  1067. To "Preserve the Title" of such a section when you modify the
  1068. Document means that it remains a section "Entitled XYZ" according
  1069. to this definition.
  1070. The Document may include Warranty Disclaimers next to the notice
  1071. which states that this License applies to the Document. These
  1072. Warranty Disclaimers are considered to be included by reference in
  1073. this License, but only as regards disclaiming warranties: any other
  1074. implication that these Warranty Disclaimers may have is void and
  1075. has no effect on the meaning of this License.
  1076. 2. VERBATIM COPYING
  1077. You may copy and distribute the Document in any medium, either
  1078. commercially or noncommercially, provided that this License, the
  1079. copyright notices, and the license notice saying this License
  1080. applies to the Document are reproduced in all copies, and that you
  1081. add no other conditions whatsoever to those of this License. You
  1082. may not use technical measures to obstruct or control the reading
  1083. or further copying of the copies you make or distribute. However,
  1084. you may accept compensation in exchange for copies. If you
  1085. distribute a large enough number of copies you must also follow the
  1086. conditions in section 3.
  1087. You may also lend copies, under the same conditions stated above,
  1088. and you may publicly display copies.
  1089. 3. COPYING IN QUANTITY
  1090. If you publish printed copies (or copies in media that commonly
  1091. have printed covers) of the Document, numbering more than 100, and
  1092. the Document's license notice requires Cover Texts, you must
  1093. enclose the copies in covers that carry, clearly and legibly, all
  1094. these Cover Texts: Front-Cover Texts on the front cover, and
  1095. Back-Cover Texts on the back cover. Both covers must also clearly
  1096. and legibly identify you as the publisher of these copies. The
  1097. front cover must present the full title with all words of the title
  1098. equally prominent and visible. You may add other material on the
  1099. covers in addition. Copying with changes limited to the covers, as
  1100. long as they preserve the title of the Document and satisfy these
  1101. conditions, can be treated as verbatim copying in other respects.
  1102. If the required texts for either cover are too voluminous to fit
  1103. legibly, you should put the first ones listed (as many as fit
  1104. reasonably) on the actual cover, and continue the rest onto
  1105. adjacent pages.
  1106. If you publish or distribute Opaque copies of the Document
  1107. numbering more than 100, you must either include a machine-readable
  1108. Transparent copy along with each Opaque copy, or state in or with
  1109. each Opaque copy a computer-network location from which the general
  1110. network-using public has access to download using public-standard
  1111. network protocols a complete Transparent copy of the Document, free
  1112. of added material. If you use the latter option, you must take
  1113. reasonably prudent steps, when you begin distribution of Opaque
  1114. copies in quantity, to ensure that this Transparent copy will
  1115. remain thus accessible at the stated location until at least one
  1116. year after the last time you distribute an Opaque copy (directly or
  1117. through your agents or retailers) of that edition to the public.
  1118. It is requested, but not required, that you contact the authors of
  1119. the Document well before redistributing any large number of copies,
  1120. to give them a chance to provide you with an updated version of the
  1121. Document.
  1122. 4. MODIFICATIONS
  1123. You may copy and distribute a Modified Version of the Document
  1124. under the conditions of sections 2 and 3 above, provided that you
  1125. release the Modified Version under precisely this License, with the
  1126. Modified Version filling the role of the Document, thus licensing
  1127. distribution and modification of the Modified Version to whoever
  1128. possesses a copy of it. In addition, you must do these things in
  1129. the Modified Version:
  1130. A. Use in the Title Page (and on the covers, if any) a title
  1131. distinct from that of the Document, and from those of previous
  1132. versions (which should, if there were any, be listed in the
  1133. History section of the Document). You may use the same title
  1134. as a previous version if the original publisher of that
  1135. version gives permission.
  1136. B. List on the Title Page, as authors, one or more persons or
  1137. entities responsible for authorship of the modifications in
  1138. the Modified Version, together with at least five of the
  1139. principal authors of the Document (all of its principal
  1140. authors, if it has fewer than five), unless they release you
  1141. from this requirement.
  1142. C. State on the Title page the name of the publisher of the
  1143. Modified Version, as the publisher.
  1144. D. Preserve all the copyright notices of the Document.
  1145. E. Add an appropriate copyright notice for your modifications
  1146. adjacent to the other copyright notices.
  1147. F. Include, immediately after the copyright notices, a license
  1148. notice giving the public permission to use the Modified
  1149. Version under the terms of this License, in the form shown in
  1150. the Addendum below.
  1151. G. Preserve in that license notice the full lists of Invariant
  1152. Sections and required Cover Texts given in the Document's
  1153. license notice.
  1154. H. Include an unaltered copy of this License.
  1155. I. Preserve the section Entitled "History", Preserve its Title,
  1156. and add to it an item stating at least the title, year, new
  1157. authors, and publisher of the Modified Version as given on the
  1158. Title Page. If there is no section Entitled "History" in the
  1159. Document, create one stating the title, year, authors, and
  1160. publisher of the Document as given on its Title Page, then add
  1161. an item describing the Modified Version as stated in the
  1162. previous sentence.
  1163. J. Preserve the network location, if any, given in the Document
  1164. for public access to a Transparent copy of the Document, and
  1165. likewise the network locations given in the Document for
  1166. previous versions it was based on. These may be placed in the
  1167. "History" section. You may omit a network location for a work
  1168. that was published at least four years before the Document
  1169. itself, or if the original publisher of the version it refers
  1170. to gives permission.
  1171. K. For any section Entitled "Acknowledgements" or "Dedications",
  1172. Preserve the Title of the section, and preserve in the section
  1173. all the substance and tone of each of the contributor
  1174. acknowledgements and/or dedications given therein.
  1175. L. Preserve all the Invariant Sections of the Document, unaltered
  1176. in their text and in their titles. Section numbers or the
  1177. equivalent are not considered part of the section titles.
  1178. M. Delete any section Entitled "Endorsements". Such a section
  1179. may not be included in the Modified Version.
  1180. N. Do not retitle any existing section to be Entitled
  1181. "Endorsements" or to conflict in title with any Invariant
  1182. Section.
  1183. O. Preserve any Warranty Disclaimers.
  1184. If the Modified Version includes new front-matter sections or
  1185. appendices that qualify as Secondary Sections and contain no
  1186. material copied from the Document, you may at your option designate
  1187. some or all of these sections as invariant. To do this, add their
  1188. titles to the list of Invariant Sections in the Modified Version's
  1189. license notice. These titles must be distinct from any other
  1190. section titles.
  1191. You may add a section Entitled "Endorsements", provided it contains
  1192. nothing but endorsements of your Modified Version by various
  1193. parties--for example, statements of peer review or that the text
  1194. has been approved by an organization as the authoritative
  1195. definition of a standard.
  1196. You may add a passage of up to five words as a Front-Cover Text,
  1197. and a passage of up to 25 words as a Back-Cover Text, to the end of
  1198. the list of Cover Texts in the Modified Version. Only one passage
  1199. of Front-Cover Text and one of Back-Cover Text may be added by (or
  1200. through arrangements made by) any one entity. If the Document
  1201. already includes a cover text for the same cover, previously added
  1202. by you or by arrangement made by the same entity you are acting on
  1203. behalf of, you may not add another; but you may replace the old
  1204. one, on explicit permission from the previous publisher that added
  1205. the old one.
  1206. The author(s) and publisher(s) of the Document do not by this
  1207. License give permission to use their names for publicity for or to
  1208. assert or imply endorsement of any Modified Version.
  1209. 5. COMBINING DOCUMENTS
  1210. You may combine the Document with other documents released under
  1211. this License, under the terms defined in section 4 above for
  1212. modified versions, provided that you include in the combination all
  1213. of the Invariant Sections of all of the original documents,
  1214. unmodified, and list them all as Invariant Sections of your
  1215. combined work in its license notice, and that you preserve all
  1216. their Warranty Disclaimers.
  1217. The combined work need only contain one copy of this License, and
  1218. multiple identical Invariant Sections may be replaced with a single
  1219. copy. If there are multiple Invariant Sections with the same name
  1220. but different contents, make the title of each such section unique
  1221. by adding at the end of it, in parentheses, the name of the
  1222. original author or publisher of that section if known, or else a
  1223. unique number. Make the same adjustment to the section titles in
  1224. the list of Invariant Sections in the license notice of the
  1225. combined work.
  1226. In the combination, you must combine any sections Entitled
  1227. "History" in the various original documents, forming one section
  1228. Entitled "History"; likewise combine any sections Entitled
  1229. "Acknowledgements", and any sections Entitled "Dedications". You
  1230. must delete all sections Entitled "Endorsements."
  1231. 6. COLLECTIONS OF DOCUMENTS
  1232. You may make a collection consisting of the Document and other
  1233. documents released under this License, and replace the individual
  1234. copies of this License in the various documents with a single copy
  1235. that is included in the collection, provided that you follow the
  1236. rules of this License for verbatim copying of each of the documents
  1237. in all other respects.
  1238. You may extract a single document from such a collection, and
  1239. distribute it individually under this License, provided you insert
  1240. a copy of this License into the extracted document, and follow this
  1241. License in all other respects regarding verbatim copying of that
  1242. document.
  1243. 7. AGGREGATION WITH INDEPENDENT WORKS
  1244. A compilation of the Document or its derivatives with other
  1245. separate and independent documents or works, in or on a volume of a
  1246. storage or distribution medium, is called an "aggregate" if the
  1247. copyright resulting from the compilation is not used to limit the
  1248. legal rights of the compilation's users beyond what the individual
  1249. works permit. When the Document is included in an aggregate, this
  1250. License does not apply to the other works in the aggregate which
  1251. are not themselves derivative works of the Document.
  1252. If the Cover Text requirement of section 3 is applicable to these
  1253. copies of the Document, then if the Document is less than one half
  1254. of the entire aggregate, the Document's Cover Texts may be placed
  1255. on covers that bracket the Document within the aggregate, or the
  1256. electronic equivalent of covers if the Document is in electronic
  1257. form. Otherwise they must appear on printed covers that bracket
  1258. the whole aggregate.
  1259. 8. TRANSLATION
  1260. Translation is considered a kind of modification, so you may
  1261. distribute translations of the Document under the terms of section
  1262. 4. Replacing Invariant Sections with translations requires special
  1263. permission from their copyright holders, but you may include
  1264. translations of some or all Invariant Sections in addition to the
  1265. original versions of these Invariant Sections. You may include a
  1266. translation of this License, and all the license notices in the
  1267. Document, and any Warranty Disclaimers, provided that you also
  1268. include the original English version of this License and the
  1269. original versions of those notices and disclaimers. In case of a
  1270. disagreement between the translation and the original version of
  1271. this License or a notice or disclaimer, the original version will
  1272. prevail.
  1273. If a section in the Document is Entitled "Acknowledgements",
  1274. "Dedications", or "History", the requirement (section 4) to
  1275. Preserve its Title (section 1) will typically require changing the
  1276. actual title.
  1277. 9. TERMINATION
  1278. You may not copy, modify, sublicense, or distribute the Document
  1279. except as expressly provided under this License. Any attempt
  1280. otherwise to copy, modify, sublicense, or distribute it is void,
  1281. and will automatically terminate your rights under this License.
  1282. However, if you cease all violation of this License, then your
  1283. license from a particular copyright holder is reinstated (a)
  1284. provisionally, unless and until the copyright holder explicitly and
  1285. finally terminates your license, and (b) permanently, if the
  1286. copyright holder fails to notify you of the violation by some
  1287. reasonable means prior to 60 days after the cessation.
  1288. Moreover, your license from a particular copyright holder is
  1289. reinstated permanently if the copyright holder notifies you of the
  1290. violation by some reasonable means, this is the first time you have
  1291. received notice of violation of this License (for any work) from
  1292. that copyright holder, and you cure the violation prior to 30 days
  1293. after your receipt of the notice.
  1294. Termination of your rights under this section does not terminate
  1295. the licenses of parties who have received copies or rights from you
  1296. under this License. If your rights have been terminated and not
  1297. permanently reinstated, receipt of a copy of some or all of the
  1298. same material does not give you any rights to use it.
  1299. 10. FUTURE REVISIONS OF THIS LICENSE
  1300. The Free Software Foundation may publish new, revised versions of
  1301. the GNU Free Documentation License from time to time. Such new
  1302. versions will be similar in spirit to the present version, but may
  1303. differ in detail to address new problems or concerns. See
  1304. <https://www.gnu.org/licenses/>.
  1305. Each version of the License is given a distinguishing version
  1306. number. If the Document specifies that a particular numbered
  1307. version of this License "or any later version" applies to it, you
  1308. have the option of following the terms and conditions either of
  1309. that specified version or of any later version that has been
  1310. published (not as a draft) by the Free Software Foundation. If the
  1311. Document does not specify a version number of this License, you may
  1312. choose any version ever published (not as a draft) by the Free
  1313. Software Foundation. If the Document specifies that a proxy can
  1314. decide which future versions of this License can be used, that
  1315. proxy's public statement of acceptance of a version permanently
  1316. authorizes you to choose that version for the Document.
  1317. 11. RELICENSING
  1318. "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
  1319. World Wide Web server that publishes copyrightable works and also
  1320. provides prominent facilities for anybody to edit those works. A
  1321. public wiki that anybody can edit is an example of such a server.
  1322. A "Massive Multiauthor Collaboration" (or "MMC") contained in the
  1323. site means any set of copyrightable works thus published on the MMC
  1324. site.
  1325. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
  1326. license published by Creative Commons Corporation, a not-for-profit
  1327. corporation with a principal place of business in San Francisco,
  1328. California, as well as future copyleft versions of that license
  1329. published by that same organization.
  1330. "Incorporate" means to publish or republish a Document, in whole or
  1331. in part, as part of another Document.
  1332. An MMC is "eligible for relicensing" if it is licensed under this
  1333. License, and if all works that were first published under this
  1334. License somewhere other than this MMC, and subsequently
  1335. incorporated in whole or in part into the MMC, (1) had no cover
  1336. texts or invariant sections, and (2) were thus incorporated prior
  1337. to November 1, 2008.
  1338. The operator of an MMC Site may republish an MMC contained in the
  1339. site under CC-BY-SA on the same site at any time before August 1,
  1340. 2009, provided the MMC is eligible for relicensing.
  1341. ADDENDUM: How to use this License for your documents
  1342. ====================================================
  1343. To use this License in a document you have written, include a copy of
  1344. the License in the document and put the following copyright and license
  1345. notices just after the title page:
  1346. Copyright (C) YEAR YOUR NAME.
  1347. Permission is granted to copy, distribute and/or modify this document
  1348. under the terms of the GNU Free Documentation License, Version 1.3
  1349. or any later version published by the Free Software Foundation;
  1350. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  1351. Texts. A copy of the license is included in the section entitled ``GNU
  1352. Free Documentation License''.
  1353. If you have Invariant Sections, Front-Cover Texts and Back-Cover
  1354. Texts, replace the "with...Texts." line with this:
  1355. with the Invariant Sections being LIST THEIR TITLES, with
  1356. the Front-Cover Texts being LIST, and with the Back-Cover Texts
  1357. being LIST.
  1358. If you have Invariant Sections without Cover Texts, or some other
  1359. combination of the three, merge those two alternatives to suit the
  1360. situation.
  1361. If your document contains nontrivial examples of program code, we
  1362. recommend releasing these examples in parallel under your choice of free
  1363. software license, such as the GNU General Public License, to permit
  1364. their use in free software.
  1365. Index
  1366. *****
  1367. * Menu:
  1368. * a quick glance at dragora: A quick glance at Dragora.
  1369. (line 215)
  1370. * about this handbook: About this handbook.
  1371. (line 61)
  1372. * boot options from live medium: Boot options from live medium.
  1373. (line 220)
  1374. * configuration file: The qirc file. (line 470)
  1375. * contributing to dragora: Contributing to Dragora.
  1376. (line 1312)
  1377. * environment variables: Recipes. (line 1014)
  1378. * exit codes: Qi exit status. (line 1231)
  1379. * free software: What is Dragora?. (line 107)
  1380. * getting support: Getting support. (line 1306)
  1381. * gnu: What is Dragora?. (line 112)
  1382. * handling build order: Order files. (line 1136)
  1383. * history: History. (line 155)
  1384. * how to place a mirror: Contributing to Dragora.
  1385. (line 1317)
  1386. * installing the system manually (as an alternative): Installing the system manually (as an alternative).
  1387. (line 230)
  1388. * introduction to qi: Introduction to Qi. (line 250)
  1389. * invocation: Invoking qi. (line 272)
  1390. * linux or linux-libre: What is Dragora?. (line 117)
  1391. * maintainers: Maintainers. (line 210)
  1392. * managing packages: Packages. (line 495)
  1393. * package blacklist: Packages. (line 678)
  1394. * package build: Recipes. (line 968)
  1395. * package conflicts: Packages. (line 520)
  1396. * package creation: Creating packages. (line 1183)
  1397. * package de-installation: Packages. (line 601)
  1398. * package examination: Examining packages. (line 1208)
  1399. * package installation: Packages. (line 545)
  1400. * package management in a nutshell: Package management in a nutshell.
  1401. (line 240)
  1402. * package management in dragora: Introduction to package management in Dragora.
  1403. (line 235)
  1404. * package upgrade: Packages. (line 640)
  1405. * recipes: Recipes. (line 718)
  1406. * releases: History. (line 188)
  1407. * revision history (changelog): Revision history (ChangeLog).
  1408. (line 71)
  1409. * special variables: Recipes. (line 773)
  1410. * the meta file: Recipes. (line 1071)
  1411. * typographic conventions: About this handbook.
  1412. (line 66)
  1413. * using dragora-installer: Using dragora-installer.
  1414. (line 225)
  1415. * using third-party free software: Using third-party free software.
  1416. (line 245)
  1417. * variables: Recipes. (line 744)
  1418. * what is dragora?: What is Dragora?. (line 76)
  1419. * why should I use dragora?: Why should I use Dragora?.
  1420. (line 122)
  1421. * writing recipes: Recipes. (line 954)