tazpkg annotate doc/tazpkg.en.html @ rev 828

Add modules "info", "list" with extended functions; update documentations and translations
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Aug 11 01:09:15 2015 +0300 (2015-08-11)
parents a73c9918a5de
children f1c82b2d20aa
rev   line source
pankso@467 1 <!DOCTYPE html>
al@811 2 <html lang="en">
pankso@302 3 <head>
pankso@467 4 <meta charset="utf-8" />
al@828 5 <title>TazPkg Manual</title>
al@811 6 <meta name="viewport" content="width=device-width,initial-scale=1"/>
al@633 7 <link rel="stylesheet" type="text/css" href="../slitaz-doc.css" />
al@633 8 <script type="text/javascript" src="../slitaz-doc.js"></script>
pankso@302 9 </head>
pankso@467 10 <body>
pankso@467 11
al@811 12 <header>
al@633 13 <h1>TazPkg Manual</h1>
al@811 14 </header>
pankso@467 15
pankso@302 16 <!-- Start content -->
pankso@302 17 <div id="content">
pankso@302 18
al@571 19
al@828 20 <h2>Name</h2>
al@571 21
al@811 22 <p>TazPkg — Tiny autonomous zone package manager</p>
pankso@302 23
al@571 24
al@828 25 <h2>Syntax</h2>
al@571 26
pankso@302 27 <pre>
al@811 28 tazpkg [command] [options...]
pankso@302 29 </pre>
pankso@302 30
al@571 31
al@828 32 <h2>Description</h2>
al@571 33
al@811 34 <p>TazPkg is a lightweight package manager to install, list, download, update or
al@811 35 remove precompiled packages on a GNU/Linux system. TazPkg offers commands for
al@811 36 searching and creating packages and was created independently for the project.
al@811 37 The format of the packages using the *.tazpkg extension is a cpio archive
al@811 38 containing a filesystem compressed with gzip, a receipt and an optional
al@811 39 description. TazPkg also manages dependencies based on package receipts. Each
al@811 40 receipt contains all the information about a package and can also include pre-
al@811 41 and post-installation functions. The same receipt is used by Cookutils to
al@811 42 compile sources and generate a .tazpkg package.</p>
al@811 43
al@811 44 <p>TazPkg is entirely built from scratch using Shell script, compatible with
al@811 45 Bash; it runs under Ash — part of the Busybox project. TazPkg is distributed
al@828 46 under the free GNU license <a href="file:///usr/share/licenses/gpl.txt"
al@828 47 target="_blank">GPL V3</a>.</p>
pankso@302 48
al@571 49
al@828 50 <h2>Environment</h2>
al@828 51
al@828 52 <p>TazPkg uses some environment variables:</p>
al@828 53
al@828 54 <ul>
al@828 55 <li><tt>LANGUAGE</tt>: define the language of output and user
al@828 56 confirmations. <x-details>Note, <tt>LANG</tt> and <tt>LC_ALL</tt>
al@828 57 environment variables also affect output language</x-details></li>
al@828 58 <li><tt>LC_TIME</tt>: define the date format in the <a
al@828 59 href="#activity">activity</a> command</li>
al@828 60 <!-- li><tt>TAZPKG_ROOT</tt>: if defined it points to the root of file system
al@828 61 where TazPkg should work. Note, value defined using <tt>--root=</tt>
al@828 62 option has precedence over this environment variable</li -->
al@828 63 </ul>
al@828 64
al@828 65
al@828 66 <h2>Files</h2>
al@828 67
al@828 68
al@828 69 <h3>Configuration files</h3>
al@828 70
al@828 71 <ul>
al@828 72 <li><tt><a href="file:///etc/slitaz/slitaz.conf"
al@828 73 target="_blank">/etc/slitaz/slitaz.conf</a></tt></li>
al@828 74 <li><tt><a href="file:///etc/slitaz/tazpkg.conf"
al@828 75 target="_blank">/etc/slitaz/tazpkg.conf</a></tt></li>
al@828 76 </ul>
al@828 77
al@828 78
al@828 79 <h3>Package database files</h3>
al@828 80
al@828 81 <p>Default placement of the package database is <tt>/var/lib/tazpkg</tt>.</p>
al@828 82
al@828 83 <ul>
al@828 84 <li><tt><a href="file:///var/lib/tazpkg/ID" target="_blank">ID</a></tt>
al@828 85 (deprecated): identifier of current SliTaz repository state.
al@828 86 <x-details>The value change when new or updated packages appear in the
al@828 87 repository.</x-details></li>
al@828 88 <li><tt><a href="file:///var/lib/tazpkg/IDs" target="_blank">IDs</a></tt>:
al@828 89 identifier of current SliTaz repository state and the UNIX time stamp.
al@828 90 <x-details>The ID value change when new or updated packages appear in
al@828 91 the repository. Time stamp allows to track how long a change is made in
al@828 92 the repository, and allows to track the freshness of repository mirrors.
al@828 93 (To convert UNIX time stamp to the date:
al@828 94 <code>date -d@<em>timestamp</em></code>)</x-details></li>
al@828 95 <li><tt><a href="file:///var/lib/tazpkg/mirror"
al@828 96 target="_blank">mirror</a></tt>: URL of the current repository mirror in
al@828 97 use. <x-details>URL points to the remote folder contains packages and
al@828 98 database files.</x-details></li>
al@828 99 <li><tt><a href="file:///var/lib/tazpkg/mirrors"
al@828 100 target="_blank">mirrors</a></tt>: list of URLs of available repository
al@828 101 mirrors. <x-details>Note the difference between URLs from these two
al@828 102 files: you should append URL from this file by
al@828 103 <tt>packages/<em>cooking</em>/</tt> (for <tt><em>cooking</em></tt>-based
al@828 104 Slitaz version).</x-details></li>
al@828 105 <li><tt><a href="file:///var/lib/tazpkg/packages.list"
al@828 106 target="_blank">packages.list</a></tt> (deprecated): list of package
al@828 107 names with version numbers available in the repository.</li>
al@828 108 <li><tt><a href="file:///var/lib/tazpkg/packages.desc"
al@828 109 target="_blank">packages.desc</a></tt> (deprecated): list contained
al@828 110 package name, version, short description, category, and upstream
al@828 111 URL.</li>
al@828 112 <li><tt><a href="file:///var/lib/tazpkg/packages.txt"
al@828 113 target="_blank">packages.txt</a></tt> (deprecated): list contained
al@828 114 package name, version, short description, and two package sizes
al@828 115 <x-details>(first — traffic to download package, second — HDD size for
al@828 116 installed package)</x-details>.</li>
al@828 117 <li><tt><a href="file:///var/lib/tazpkg/packages.md5"
al@828 118 target="_blank">packages.md5</a></tt> (deprecated): list contained MD5
al@828 119 checksum with package file name.</li>
al@828 120 <li><tt><a href="file:///var/lib/tazpkg/packages.info"
al@828 121 target="_blank">packages.info</a></tt>: list was build to replace and
al@828 122 extend above lists. <x-details>For every package available in the
al@828 123 repository it contains: package name, version, category, short
al@828 124 description, upstream URL, tags, package sizes, depends, and MD5
al@828 125 checksum. Development continues, and the list can be extended by other
al@828 126 fields, if necessary.</x-details></li>
al@828 127 <li><tt><a href="file:///var/lib/tazpkg/packages.equiv"
al@828 128 target="_blank">packages.equiv</a></tt>: list of equivalent packages
al@828 129 available in the repository. <x-details>Format of the list item:
al@828 130 <tt><em>package</em>=<em>rule rule…</em></tt>.<br>
al@828 131 Format of the rule: <tt><em>alternative:newname</em></tt> — if
al@828 132 <tt><em>alternative</em></tt> is installed then
al@828 133 <tt><em>newname</em></tt> will be installed instead of the
al@828 134 <tt><em>package</em></tt>.<br>
al@828 135 In the second format of the rule <tt><em>alternative:</em></tt> part is
al@828 136 omitted — in this case <tt><em>newname</em></tt> <em>can be</em>
al@828 137 installed insted of the <tt><em>package</em></tt> (in the user
al@828 138 choice).</x-details></li>
al@828 139 <li><tt><a href="file:///var/lib/tazpkg/packages.diff"
al@828 140 target="_blank">packages.diff</a></tt>: list created when you run
al@828 141 <tt><a href="#recharge">recharge</a></tt> command. <x-details>List
al@828 142 contains package names with versions of the new packages available in
al@828 143 the repository with the last recharging.</x-details></li>
al@828 144 <li><tt><a href="file:///var/lib/tazpkg/packages.up"
al@828 145 target="_blank">packages.up</a></tt>: list created when you run
al@828 146 <tt><a href="#upgrade">upgrade</a></tt> command. <x-details>List
al@828 147 contains package names you can upgrade with the last
al@828 148 recharging.</x-details></li>
al@828 149 <li><tt><a href="file:///var/lib/tazpkg/descriptions.txt"
al@828 150 target="_blank">descriptions.txt</a></tt>: list of the “long”
al@828 151 descriptions of the all packages available on the repository.</li>
al@828 152 <li><tt>packages-desc.<em>language</em></tt> — optional list of the packages
al@828 153 translated short descriptions <x-details>(see the package
al@828 154 tazpkg-desc-ru)</x-details>.</li>
al@828 155 <li><tt>descriptions.<em>language</em>.txt</tt> — optional list of the
al@828 156 packages translated “long” descriptions <x-details>(see the package
al@828 157 tazpkg-desc-ru)</x-details>.</li>
al@828 158 <li><tt>packages.icons</tt> — optional list of the packages icons for
al@828 159 TazPanel.</li>
al@828 160 <li><tt><a href="file:///var/lib/tazpkg/blocked-packages.list"
al@828 161 target="_blank">blocked-packages.list</a></tt>: optional list of the
al@828 162 packages blocked for update.</li>
al@828 163 <li><tt><a href="file:///var/lib/tazpkg/extra.list"
al@828 164 target="_blank">extra.list</a></tt>: list of the extra packages
al@828 165 <x-details>(non-free packages; free packages but not compiled from
al@828 166 sources). List contains package name, short description, upstream URL,
al@828 167 category, version, license.</x-details></li>
al@828 168 <li><tt>files.list.lzma</tt>: very large compressed list which contains all
al@828 169 the files of all the packages available in the repository
al@828 170 <x-details>(nearly 5,000 packages and nearly 0.7 million
al@828 171 files now)</x-details>.</li>
al@828 172 <li><tt>files-list.md5</tt>: MD5 checksum of the
al@828 173 <tt>files.list.lzma</tt>.</li>
al@828 174 <li><tt><a href="file:///var/lib/tazpkg/installed.info"
al@828 175 target="_blank">installed.info</a></tt>: list of the installed packages
al@828 176 with the exact format of the <tt>packages.info</tt> list.
al@828 177 <x-details>Idea is just to copy list item from <tt>packages.info</tt> to
al@828 178 the <tt>installed.info</tt> while package installation.</x-details></li>
al@828 179 <li><tt><a href="file:///var/lib/tazpkg/installed.md5"
al@828 180 target="_blank">installed.md5</a></tt> (deprecated): list contained MD5
al@828 181 checksum with file names of all installed packages.</li>
al@828 182 </ul>
al@828 183
al@828 184 <p>All the deprecated files will be deleted after we verify that the programs do
al@828 185 not use them (and modify the programs as necessary).</p>
al@828 186
al@828 187 <p>In addition to the common package database files there is also individual
al@828 188 folders for all installed packages placed by default in the
al@828 189 <tt>/var/lib/tazpkg/installed/<em>package</em></tt>. Every folder here may
al@828 190 contain next files:</p>
al@828 191
al@828 192 <ul>
al@828 193 <li><tt>receipt</tt> (mandatory) — the package recipe</li>
al@828 194 <li><tt>files.list</tt> (mandatory) — list of package files</li>
al@828 195 <li><tt>md5sum</tt> (mandatory) — checksums of package files (other checksum
al@828 196 file can be specified in the settings: <tt>cksum</tt> (CRC32),
al@828 197 <tt>md5sum</tt> (MD5), <tt>sha1sum</tt> (SHA1), <tt>sha256sum</tt>
al@828 198 (SHA256), <tt>sha512sum</tt> (SHA512), <tt>sha3sum</tt> (SHA3-512))</li>
al@828 199 <li><tt>description.txt</tt> (optional) — “long” description</li>
al@828 200 <li><tt>modifiers</tt> (optional) — list of packages that have replaced some
al@828 201 of the files of this package</li>
al@828 202 <li><tt>volatile.cpio.gz</tt> (optional) — archive of “official”
al@828 203 configuration files</li>
al@828 204 </ul>
al@828 205
al@828 206
al@828 207 <h3>Cache</h3>
al@828 208
al@828 209 <p>Default placement of the packages cache is <tt>/var/cache/tazpkg</tt> with
al@828 210 sub-folders for the different repositories. <x-details>It is exactly
al@828 211 <tt>/var/cache/tazpkg/<em>cooking</em>/packages</tt> for the
al@828 212 <tt><em>cooking</em></tt>-based SliTaz version.</x-details></p>
al@828 213
al@828 214
al@828 215 <h3>Misc files</h3>
al@828 216
al@828 217 <p>File with default placement <tt><a href="file:///var/log/slitaz/tazpkg.log"
al@828 218 target="_blank">/var/log/slitaz/tazpkg.log</a></tt> stores TazPkg activity log.
al@828 219 <x-details>Log stores five types of actions: installing, uninstalling, blocking,
al@828 220 unblocking, reconfiguring packages.</x-details></p>
al@828 221
al@828 222 <p>Shared MIME information which allows to “guess” SliTaz package files, package
al@828 223 receipts, and SliTaz flavor files. <x-details>File placed here: <tt><a
al@828 224 href="file:///usr/share/mime/packages/tazpkg.xml"
al@828 225 target="_blank">/usr/share/mime/packages/tazpkg.xml</a></tt>.</x-details></p>
al@828 226
al@828 227 <p>Plug-in for the TazPanel (SliTaz administration and configuration panel)
al@828 228 <tt>/var/www/tazpanel/pkgs.cgi</tt> allows you to manage SliTaz packages in the
al@828 229 <a href="http://127.0.0.1:82/pkgs.cgi" target="_blank">web application</a>.</p>
al@828 230
al@828 231 <p>TazPkg documentation you read placed in the <tt>/usr/share/doc/tazpkg</tt>
al@828 232 folder.</p>
al@828 233
al@828 234
al@828 235
al@828 236
al@828 237 <h2>Commands</h2>
al@828 238
al@828 239 <p>The first <tt>tazpkg</tt> parameter is a command followed by other mandatory
al@828 240 and optional parameters as will be described hereinafter. Options begin with
al@828 241 double dashes.<!-- , you can arrange them in any order and in any place, even before
al@828 242 the command. Unknown and inappropriate options are ignored. The following
al@828 243 commands are equivalent: --></p>
al@828 244
al@828 245 <!-- pre>
al@828 246 $ tazpkg info nano --root=<em>/mnt/sda6</em>
al@828 247 $ tazpkg --root=<em>/mnt/sda6</em> info nano
al@828 248 $ tazpkg info --root=<em>/mnt/sda6</em> nano <em>--color</em>
al@828 249 </pre -->
al@828 250
al@828 251 <!-- p>You can add global option <tt>--root=…</tt> to any TazPkg command. This
al@828 252 option allows to work with other SliTaz installations. Option points to the root
al@828 253 of mounted file system from other SliTaz installation. <x-details>By the way,
al@828 254 using this option allows to install SliTaz to the other file system “from
al@828 255 scratch”, and upgrade SliTaz packages remotely.</x-details></p -->
al@571 256
al@571 257
al@811 258 <h3>Service commands</h3>
al@811 259
al@811 260 <ul>
al@811 261 <li><a href="#usage">usage</a>: print short usage</li>
al@811 262 <li><a href="#help">help</a>: show help on the TazPkg commands</li>
al@811 263 <li><a href="#activity">activity</a>: show TazPkg activity log</li>
al@811 264 <li><a href="#clean-cache">clean-cache</a>: clean all packages downloaded in
al@811 265 cache directory</li>
al@811 266 <li><a href="#shell">shell</a>: run interactive TazPkg shell</li>
al@811 267 </ul>
al@811 268
al@811 269
al@811 270 <h3>Working with lists</h3>
al@811 271
al@811 272 <ul>
al@811 273 <li><a href="#list">list</a>: list installed packages on the system</li>
al@811 274 <li><a href="#list-mirror">list-mirror</a>: list all available packages on
al@811 275 the mirror</li>
al@811 276 <li><a href="#list-config">list-config</a>: list the configuration
al@811 277 files</li>
al@811 278 </ul>
al@811 279
al@811 280
al@811 281 <h3>Search</h3>
al@811 282
al@811 283 <ul>
al@811 284 <li><a href="#search">search</a>: search for a package by pattern or
al@811 285 name</li>
al@811 286 <li><a href="#search-pkgname">search-pkgname</a>: search on mirror for
al@811 287 package having a particular file</li>
al@811 288 <li><a href="#search-file">search-file</a>: search for file in all installed
al@811 289 packages files</li>
al@811 290 </ul>
al@811 291
al@811 292
al@811 293 <h3>Installing and removing packages</h3>
al@811 294
al@811 295 <ul>
al@811 296 <li><a href="#get">get</a>: download a package into the current
al@811 297 directory</li>
al@811 298 <li><a href="#install">install</a>: install a local package</li>
al@811 299 <li><a href="#get-install">get-install</a>: download and install a package
al@811 300 from the mirror</li>
al@811 301 <li><a href="#install-list">install-list</a>: install all packages from a
al@811 302 list of packages</li>
al@811 303 <li><a href="#install-list">get-install-list</a>: download and install a
al@811 304 list of packages from the mirror</li>
al@811 305 <li><a href="#remove">remove</a>: remove the specified package and all
al@811 306 installed files</li>
al@811 307 <li><a href="#reconfigure">reconfigure</a>: replay post install script from
al@811 308 package</li>
al@811 309 <li><a href="#link">link</a>: link a package from another SliTaz
al@811 310 installation</li>
al@811 311 <li><a href="#set-release">set-release</a>: change release and update
al@811 312 packages</li>
al@811 313 <li><a href="#add-flavor">add-flavor</a>: install the flavor list of
al@811 314 packages</li>
al@811 315 <li><a href="#add-flavor">install-flavor</a>: install the flavor list of
al@811 316 packages and remove other ones</li>
al@811 317 </ul>
al@811 318
al@811 319
al@811 320 <h3>Working with packages</h3>
al@811 321
al@811 322 <ul>
al@811 323 <li><a href="#info">info</a>: print information about a package</li>
al@811 324 <li><a href="#desc">desc</a>: print description of a package</li>
al@811 325 <li><a href="#list-files">list-files</a>: list the files installed with a
al@811 326 package</li>
al@811 327 <li><a href="#block">block, unblock</a>: block an installed package version
al@811 328 or unblock it for upgrade</li>
al@811 329 <li><a href="#check">check</a>: verify consistency of installed
al@811 330 packages</li>
al@811 331 <li><a href="#bugs">bugs</a>: show known bugs in packages</li>
al@811 332 <li><a href="#depends">depends</a>: display dependencies tree</li>
al@811 333 <li><a href="#depends">rdepends</a>: display reverse dependencies tree</li>
al@811 334 <li><a href="#extract">extract</a>: extract a (*.tazpkg) package into a
al@811 335 directory</li>
al@811 336 <li><a href="#pack">pack</a>: pack an unpacked or prepared package tree</li>
al@811 337 <li><a href="#repack">repack</a>: create a package archive from an installed
al@811 338 package</li>
al@811 339 <li><a href="#repack-config">repack-config</a>: create a package archive
al@811 340 with configuration files</li>
al@811 341 <li><a href="#recompress">recompress</a>: rebuild a package with a better
al@811 342 compression ratio</li>
al@811 343 <li><a href="#convert">convert</a>: convert alien package to tazpkg</li>
al@811 344 <li><a href="#list-suggested">list-suggested</a>: print list of suggested
al@811 345 packages</li>
al@811 346 </ul>
al@811 347
al@811 348
al@811 349 <h3>Working with repositories</h3>
al@811 350
al@811 351 <ul>
al@811 352 <li><a href="#recharge">recharge</a>: recharge your packages database from
al@811 353 the mirror</li>
al@811 354 <li><a href="#upgrade">upgrade</a>: check packages, list and install latest
al@811 355 upgrades</li>
al@811 356 <li><a href="#setup-mirror">setup-mirror</a>: change the mirror URL
al@811 357 configuration</li>
al@811 358 <li><a href="#add-undigest">setup-undigest</a>: update an undigest
al@811 359 mirror</li>
al@811 360 <li><a href="#list-undigest">list-undigest</a>: list undigest mirrors</li>
al@811 361 <li><a href="#add-undigest">add-undigest</a>: add an undigest mirror</li>
al@811 362 <li><a href="#remove-undigest">remove-undigest</a>: remove an undigest
al@811 363 mirror</li>
al@811 364 </ul>
al@811 365
al@811 366
al@811 367
al@811 368
al@811 369 <h2>Service commands</h2>
al@811 370
al@811 371
al@811 372 <h3 id="usage">usage</h3>
al@811 373
al@811 374 <p>Show the full list of the TazPkg commands with a brief description.</p>
al@811 375
al@811 376 <pre>
al@811 377 $ tazpkg usage
al@811 378 $ tazpkg
al@811 379 </pre>
al@811 380
al@811 381
al@811 382 <h3 id="help">help</h3>
al@811 383
al@811 384 <p>Display help for the selected command (<tt>help</tt> or <tt>-h</tt>). You can
al@811 385 enter a short name of the command, the full name or a part of the full name. You
al@811 386 can ignore hyphens at the beginning of the short name. If the requested part of
al@811 387 the full name match the several commands, you will be asked to clarify the
al@811 388 request.</p>
al@811 389
al@811 390 <pre>
al@811 391 $ tazpkg help <em>-gi</em>
al@811 392 $ tazpkg -h <em>us</em>
al@811 393 </pre>
al@811 394
al@811 395
al@811 396 <h3 id="activity">activity</h3>
al@811 397
al@811 398 <p>Display TazPkg activity log (<tt>activity</tt> or <tt>log</tt> or
al@811 399 <tt>-a</tt>). Optional parameter <tt>--nb=</tt> lets you set number of displayed
al@811 400 lines.</p>
al@811 401
al@811 402 <pre>
al@811 403 $ tazpkg activity
al@811 404 $ tazpkg -a --nb=<em>20</em>
al@811 405 </pre>
al@811 406
al@811 407
al@811 408 <h3 id="clean-cache">clean-cache</h3>
al@811 409
al@811 410 <p>Remove *.tazpkg packages downloaded to the cache (<tt>clean-cache</tt> or
al@811 411 <tt>-cc</tt>). During installation, TazPkg keeps a copy of packages downloaded
al@811 412 from the Web. This is done to save bandwidth in case of reinstallation, but you
al@811 413 may want to free up space on the hard drive or re-download the packages.</p>
al@811 414
al@811 415 <pre>
al@811 416 # tazpkg clean-cache
al@811 417 # tazpkg -cc
al@811 418 </pre>
al@811 419
al@811 420
al@811 421 <h3 id="shell">shell</h3>
al@811 422
al@811 423 <p>Run interactive TazPkg shell. Here you can enter all the TazPkg commands
al@811 424 listed above.</p>
al@811 425
al@811 426 <pre>
al@811 427 $ tazpkg shell
al@811 428 # tazpkg shell
al@811 429 </pre>
al@811 430
al@811 431
al@811 432
al@811 433
al@811 434 <h2>Working with lists</h2>
al@811 435
al@811 436
al@571 437 <h3 id="list">list</h3>
al@571 438
al@811 439 <p>List packages installed on the system (<tt>list</tt> or <tt>-l</tt>). This
al@811 440 command displays a column list of all installed packages. It also allows you to
al@811 441 list the categories (<tt>c</tt> or <tt>cat</tt> or <tt>categories</tt>),
al@811 442 packages based on category and packages placed on hold (<tt>b</tt> or
al@811 443 <tt>blocked</tt>). You can also use the <tt><a href="#search">search</a></tt>
al@811 444 command for a list based on a term or package name.</p>
al@811 445
pankso@302 446 <pre>
al@811 447 $ tazpkg list
al@811 448 $ tazpkg list cat
al@811 449 $ tazpkg list <em>games</em>
al@811 450 $ tazpkg list blocked
pankso@302 451 </pre>
pankso@467 452
al@571 453
al@571 454 <h3 id="list-mirror">list-mirror</h3>
al@571 455
al@811 456 <p>List packages available on the mirror (<tt>list-mirror</tt> or <tt>-lm</tt>).
al@811 457 This command will display the packages list recharged from the mirror. If it
al@811 458 doesn't exist, you will be asked to launch <code>tazpkg
al@811 459 <a href="#recharge">recharge</a></code> as administrator (root) for a list of
al@811 460 available packages. The <tt>--diff</tt> option is used to display the
al@811 461 differences between the last and current list of packages.</p>
al@811 462
pankso@302 463 <pre>
al@811 464 $ tazpkg list-mirror
al@811 465 $ tazpkg -lm --diff
pankso@302 466 </pre>
pankso@467 467
al@571 468
al@571 469 <h3 id="list-config">list-config</h3>
al@571 470
al@811 471 <p>Lists the system configuration files. The <tt>--box</tt> option displays in
al@811 472 table form. You can specify package name to display configuration files only for
al@811 473 this package.</p>
al@811 474
al@633 475 <pre>
al@811 476 $ tazpkg list-config
al@811 477 $ tazpkg list-config --box
al@811 478 $ tazpkg list-config <em>slim</em>
al@811 479 $ tazpkg list-config --box <em>slim</em>
pankso@302 480 </pre>
pankso@467 481
al@571 482
al@571 483
al@811 484
al@811 485 <h2>Search</h2>
pankso@467 486
al@571 487
al@571 488 <h3 id="search">search</h3>
al@571 489
al@811 490 <p>Search for packages by owner or package name (<tt>search</tt> or
al@811 491 <tt>-s</tt>). This command will search for the term wanted in the installed
al@811 492 packages (<tt>-i</tt> or <tt>--installed</tt>) and the list of available
al@811 493 packages on the mirror (<tt>-l</tt> or <tt>--list</tt>).</p>
al@811 494
al@811 495 <p>To obtain the latest list of installable packages on the mirror, just run
al@811 496 <code>tazpkg recharge</code> before conducting a search.</p>
al@811 497
pankso@302 498 <pre>
al@811 499 $ tazpkg search <em>gcc</em>
al@811 500 $ tazpkg search <em>mt</em> -i
al@811 501 $ tazpkg search <em>bit</em> -l
al@811 502 </pre>
al@811 503
al@811 504
al@811 505 <h3 id="search-pkgname">search-pkgname</h3>
al@811 506
al@811 507 <p>Search for a file on mirror and output only the packages names
al@811 508 (<tt>search-pkgname</tt> or <tt>-sp</tt>).</p>
al@811 509
al@811 510 <pre>
al@811 511 $ tazpkg search-pkgname <em>libnss</em>
al@811 512 $ tazpkg -sp <em>/usr/share/fonts</em>
pankso@302 513 </pre>
pankso@467 514
al@571 515
al@571 516 <h3 id="search-file">search-file</h3>
al@571 517
al@811 518 <p>Search for a file among the files installed by the packages
al@811 519 (<tt>search-file</tt> or <tt>-sf</tt>). This command is very useful to find the
al@811 520 full path to a file and determine if a file is present on the system. Option
al@811 521 <tt>--mirror</tt> allows to search for a file among all the files available on
al@811 522 the mirror.</p>
al@811 523
pankso@302 524 <pre>
al@633 525 $ tazpkg search-file <em>libnss</em>
al@811 526 $ tazpkg -sf <em>/usr/share/fonts</em> --mirror
al@811 527 </pre>
al@811 528
al@811 529
al@811 530
al@811 531
al@811 532 <h2>Installing and removing packages</h2>
al@811 533
al@811 534
al@811 535 <h3 id="get">get</h3>
al@811 536
al@811 537 <p>Get a package from the mirror (<tt>get</tt> or <tt>-g</tt>). The downloaded
al@811 538 package is stored in the current directory. To find the path you can use
al@811 539 <code>pwd</code>.</p>
al@811 540
al@811 541 <pre>
al@811 542 # tazpkg get <em>grub</em>
al@811 543 # tazpkg get <em>nano</em> --root=<em>/mnt/sda6</em>
pankso@302 544 </pre>
pankso@467 545
al@571 546
al@571 547 <h3 id="install">install</h3>
al@571 548
al@811 549 <p>This command allows the installation of a local package with the
al@811 550 <tt>.tazpkg</tt> extension (<tt>install</tt> or <tt>-i</tt>). See
al@811 551 <tt><a href="#get-install">get-install</a></tt> to install a package from the
al@811 552 internet. Note that you can force the installation via the <tt>--forced</tt>
al@828 553 option. Option <tt>--newconf</tt> allow to rewrite all user configuration files
al@828 554 using the new files from package. Option <tt>--nodeps</tt> allow to install only
al@828 555 specified package without its dependencies.</p>
al@811 556
pankso@302 557 <pre>
al@571 558 # tazpkg install <em>package-1.0.tazpkg</em>
al@811 559 # tazpkg -i <em>path/to/package-1.0.tazpkg</em> --forced
al@811 560 # tazpkg -i <em>path/to/package-1.0.tazpkg</em> --root=<em>/mnt/rootfs</em>
pankso@302 561 </pre>
pankso@467 562
al@571 563
al@811 564 <h3 id="get-install">get-install</h3>
al@811 565
al@811 566 <p>Get and install a package from a mirror on the internet (<tt>get-install</tt>
al@811 567 or <tt>-gi</tt>). Command begins by checking whether the package exists on the
al@811 568 mirror and if it has been already downloaded. For a list of packages on the
al@811 569 mirror, we must use the <tt><a href="#list-mirror">list-mirror</a></tt>
al@828 570 command. Note that you can force the installation via the <tt>--forced</tt>
al@828 571 option. Option <tt>--newconf</tt> allow to rewrite all user configuration files
al@828 572 using the new files from package. Option <tt>--nodeps</tt> allow to install only
al@828 573 specified package without its dependencies.</p>
al@811 574
al@828 575 <p>Option <tt>--forced</tt> allow update already installed package.</p>
al@811 576
al@811 577 <pre>
al@811 578 # tazpkg get-install <em>grub</em>
al@811 579 # tazpkg -gi <em>grub</em> --forced
al@811 580 # tazpkg -gi <em>nano</em> --root=<em>/mnt/sda6</em>
al@811 581 </pre>
al@811 582
al@811 583
al@811 584 <h3 id="install-list">install-list, get-install-list</h3>
al@811 585
al@811 586 <p>Install a set of packages listed in a file. This command allows you to
al@811 587 (download and) install several packages with a single command and can also be
al@811 588 forced.</p>
al@811 589
al@633 590 <pre>
al@633 591 # tazpkg install-list <em>my-packages.list</em>
al@571 592 # tazpkg get-install-list <em>my-packages.list</em> --forced
pankso@302 593 </pre>
pankso@467 594
al@571 595
al@811 596 <h3 id="remove">remove</h3>
al@811 597
al@811 598 <p>Remove a package (<tt>remove</tt> or <tt>-r</tt>). You will be asked for
al@811 599 confirmation (y/N) of removing the package, as well as for removing packages
al@811 600 depending on this package, and for reinstalling packages modified by this
al@811 601 package. This command will delete all files installed with the package.</p>
al@811 602
al@828 603 <p>Option <tt>--auto</tt> removes and reinstall packages without your
al@811 604 confirmation.</p>
al@811 605
al@811 606 <pre>
al@811 607 # tazpkg remove <em>bc</em>
al@811 608 # tazpkg -r <em>gtk+-3</em> --root=<em>/mnt/sda6</em>
al@811 609 # tazpkg -r <em>nano</em> --auto
al@811 610 </pre>
al@811 611
al@811 612
al@811 613 <h3 id="reconfigure">reconfigure</h3>
al@811 614
al@811 615 <p>Replays the post-install script from the package.</p>
al@811 616
al@811 617 <pre>
al@811 618 # tazpkg reconfigure <em>gcc</em>
al@811 619 # tazpkg reconfigure <em>gcc</em> --root=<em>/mnt/sda6</em>
al@811 620 </pre>
al@811 621
al@811 622
al@571 623 <h3 id="link">link</h3>
al@571 624
al@811 625 <p>This command allows the installation of a package from another media device.
al@811 626 The set up is done through symbolic links and consumes very little memory. It is
al@811 627 generally used within the system RAM to install add-ons from an USB key.</p>
al@811 628
pankso@302 629 <pre>
al@571 630 # tazpkg link <em>openoffice /media/usbdisk</em>
pankso@302 631 </pre>
pankso@467 632
al@571 633
al@811 634 <h3 id="set-release">set-release</h3>
al@571 635
al@811 636 <p>The <tt>set-release</tt> command changes the current version and upgrades all
al@811 637 of the packages to the latest release.</p>
al@811 638
pankso@302 639 <pre>
al@811 640 # tazpkg set-release <em>cooking</em>
pankso@302 641 </pre>
pankso@467 642
al@571 643
al@811 644 <h3 id="add-flavor">add-flavor, install-flavor</h3>
al@571 645
al@811 646 <p>Install a set of packages from a flavor. In addition, <tt>install-flavor</tt>
al@811 647 purges other installed packages.</p>
al@811 648
pankso@302 649 <pre>
al@811 650 # tazpkg add-flavor <em>gtkonly</em>
al@811 651 # tazpkg install-flavor <em>justx</em>
pankso@302 652 </pre>
pankso@467 653
al@571 654
al@571 655
al@811 656
al@811 657 <h2>Working with packages</h2>
al@811 658
al@811 659
al@811 660 <h3 id="info">info</h3>
al@811 661
al@828 662 <p>Show all the available information related to your package. You can specify
al@828 663 the name of the installed package or a package that is not yet installed, but
al@828 664 available in the repository. You can also get information about local file
al@828 665 package by entering an absolute or relative path to the file <tt>.tazpkg</tt>.
al@828 666 The information contained in the TazPkg database and in the package recipe —
al@828 667 its version, category, maintainer, Web site and all the dependencies (see also
al@828 668 Cookutils for more information on recipes).</p>
al@811 669
pankso@302 670 <pre>
al@811 671 $ tazpkg info <em>busybox</em>
al@828 672 $ tazpkg info <em>minitube</em>
al@828 673 $ tazpkg info <em>packages/comix-4.0.4.tazpkg</em>
pankso@302 674 </pre>
pankso@467 675
al@571 676
al@811 677 <h3 id="desc">desc</h3>
al@571 678
al@811 679 <p>Description of the package (if it exists) (<tt>desc</tt> or <tt>-d</tt>).
al@811 680 This command displays the <tt>description.txt</tt> file of each package (a
al@811 681 simple text file, justified to 80 characters to fit in a standard terminal).</p>
al@811 682
pankso@302 683 <pre>
al@811 684 $ tazpkg desc <em>busybox</em>
pankso@302 685 </pre>
pankso@467 686
al@571 687
al@811 688 <h3 id="list-files">list-files</h3>
al@571 689
al@811 690 <p>List all files installed with a package (<tt>list-files</tt> or
al@811 691 <tt>-lf</tt>). This command will simply read and display the <tt>files.list</tt>
al@811 692 of each package which is automatically generated when the package is created and
al@811 693 is also used to remove files when uninstalling a package.</p>
al@811 694
pankso@467 695 <pre>
al@811 696 $ tazpkg list-files <em>bc</em>
pankso@302 697 </pre>
pankso@467 698
al@571 699
al@811 700 <h3 id="block">block, unblock, chblock</h3>
al@571 701
al@811 702 <p>The <tt>block</tt> (or <tt>-b</tt>) and <tt>unblock</tt> (or <tt>-u</tt>)
al@811 703 commands permit you to block installed package versions so that they are not
al@811 704 maintained by an <tt><a href="#upgrade">upgrade</a></tt>. Command
al@811 705 <tt>chblock</tt> changes blocking state of the package. The list of packages on
al@811 706 hold are contained in the <tt>/var/lib/tazpkg/blocked-packages.list</tt>. This
al@811 707 file can also be edited by hand.</p>
al@811 708
pankso@302 709 <pre>
al@811 710 # tazpkg block <em>grub</em>
al@811 711 # tazpkg unblock <em>grub</em>
al@811 712 # tazpkg chblock <em>grub</em>
pankso@302 713 </pre>
pankso@467 714
al@571 715
al@571 716 <h3 id="check">check</h3>
al@571 717
al@811 718 <p>The <tt>check</tt> command can check dependencies on installed packages and
al@811 719 determine whether all the files needed for the repacking of packages are
al@811 720 present.</p>
al@811 721
pankso@302 722 <pre>
al@811 723 $ tazpkg check
al@811 724 $ tazpkg check --full
al@811 725 $ tazpkg check <em>nano</em>
al@811 726 $ tazpkg check <em>sakura</em> --full
pankso@302 727 </pre>
pankso@467 728
al@571 729
al@811 730 <h3 id="bugs">bugs</h3>
al@571 731
al@811 732 <p>Generates a list of known bugs in the packages. You can specify a single
al@811 733 package to show bugs.</p>
al@811 734
pankso@302 735 <pre>
al@811 736 $ tazpkg bugs
al@811 737 $ tazpkg bugs <em>my_package</em>
pankso@302 738 </pre>
pankso@467 739
al@571 740
al@811 741 <h3 id="depends">depends, rdepends</h3>
al@571 742
al@811 743 <p>Displays a dependency tree or reverse dependency tree for a package.</p>
pankso@467 744
al@828 745 <p>For <code>depends</code> command: option <tt>--mark</tt> marks installed
al@828 746 packages with plus sign, and not installed with minus/dash. Option
al@828 747 <tt>--total</tt> calculates number of displayed packages and its size. Also,
al@828 748 with both options at a time you'll get number and size of packages to be
al@828 749 installed.</p>
al@828 750
al@828 751 <p>For <code>rdepends</code> command: without <tt>--all</tt> option you'll get
al@828 752 the list of only installed reverse dependency packages, with this option — list
al@828 753 of all available packages. Option <tt>--mark</tt> marks packages as in the
al@828 754 <code>depends</code> command.</p>
al@828 755
pankso@467 756 <pre>
al@571 757 # tazpkg depends <em>mpd</em>
al@571 758 # tazpkg rdepends <em>mpd</em>
pankso@302 759 </pre>
al@571 760
al@571 761
al@811 762 <h3 id="extract">extract</h3>
al@571 763
al@811 764 <p>Extract a package into a directory (<tt>extract</tt> or <tt>-e</tt>). If you
al@811 765 do not specify the destination directory, the package will be extracted in the
al@811 766 current directory using the name <tt><em>package-version</em></tt>.</p>
al@811 767
al@811 768 <pre>
al@811 769 $ tazpkg extract <em>package.tazpkg</em>
al@811 770 $ tazpkg extract <em>package.tazpkg target/dir</em>
al@811 771 </pre>
al@811 772
al@811 773
al@811 774 <h3 id="pack">pack</h3>
al@811 775
al@811 776 <p>The <tt>pack</tt> command will create a package from a directory prepared in
al@811 777 advance or from an unpacked package. It can also manually create a .tazpkg
al@811 778 package (see the Cookutils documentation for the automatic creation of
al@811 779 packages).</p>
al@811 780
al@811 781 <pre>
al@811 782 # tazpkg pack <em>package-version</em>
al@811 783 </pre>
al@811 784
al@811 785
al@811 786 <h3 id="repack">repack</h3>
al@811 787
al@811 788 <p>The <tt>repack</tt> command allows you to recreate a package from the files
al@811 789 on a system where it was previously installed.</p>
al@811 790
al@811 791 <pre>
al@811 792 $ tazpkg repack <em>package</em>
al@811 793 </pre>
al@811 794
al@811 795
al@811 796 <h3 id="repack-config">repack-config</h3>
al@811 797
al@811 798 <p>The <tt>repack-config</tt> command recreates a package of the system
al@811 799 configuration files (see <tt><a href="#list-config">list-config</a></tt>). It is
al@811 800 enough to install the package to find the current configuration.</p>
al@811 801
al@811 802 <pre>
al@811 803 # tazpkg repack-config
al@811 804 </pre>
al@811 805
al@811 806
al@811 807 <h3 id="recompress">recompress</h3>
al@811 808
al@811 809 <p>Recompress .tazpkg cpio archive with lzma.</p>
al@811 810
al@811 811 <pre>
al@811 812 $ tazpkg recompress <em>package.tazpkg</em>
al@811 813 </pre>
al@811 814
al@811 815
al@811 816 <h3 id="convert">convert</h3>
al@811 817
al@811 818 <p>Converts an "alien" package into a SliTaz package (.tazpkg) (<tt>convert</tt>
al@811 819 or <tt>-c</tt>.</p>
al@811 820
al@811 821 <p>Supported packages formats:</p>
al@811 822
al@811 823 <ul>
al@811 824 <li><a href="https://packages.debian.org/search" target="_blank">Debian
al@811 825 packages</a> (<tt>*.deb</tt>, <tt>*.udeb</tt>)</li>
al@811 826 <li><a href="http://rpmfind.net/linux/rpm2html/search.php"
al@811 827 target="_blank">RPM packages</a> (<tt>*.rpm</tt>)</li>
al@811 828 <li><a href="http://www.slax.org/" target="_blank">Slax packages</a>
al@811 829 (<tt>*.sb</tt>)</li>
al@811 830 <li><a href="http://puppylinux.org/" target="_blank">Puppy packages</a>
al@811 831 (<tt>*.sfs</tt>, <tt>*.pet</tt>)</li>
al@811 832 <li><a href="http://www.slackware.com/packages/" target="_blank">Slackware
al@811 833 packages</a> (<tt>*.tgz</tt>)</li>
al@811 834 <li><a href="http://www.nutyx.org/" target="_blank">NuTyX packages</a>
al@811 835 (<tt>*.cards.tar.xz</tt>)</li>
al@811 836 <li><a href="https://www.archlinux.org/packages/" target="_blank">Arch
al@811 837 Linux</a> / <a href="http://pkgs.alpinelinux.org/packages"
al@811 838 target="_blank">Alpine Linux packages</a> (<tt>*.apk</tt>,
al@811 839 <tt>*.pkg.tar.gz</tt>, <tt>*.pkg.tar.xz</tt>)</li>
al@811 840 <li><a href="http://wiki.openwrt.org/doc/packages" target="_blank">OpenWrt
al@811 841 packages</a> (<tt>*.ipk</tt>, <tt>*.opk</tt>)</li>
al@811 842 <li><a href="http://0.tuxfamily.org/doku.php/paquets/start"
al@811 843 target="_blank">0Linux packages</a> (<tt>*.spack</tt>)</li>
al@811 844 <li><a href="http://www.paldo.org/index-section-packages.html"
al@811 845 target="_blank">paldo packages</a> (<tt>*.tar.bz2</tt>)</li>
al@811 846 <li><a href="http://www.voidlinux.eu/packages/" target="_blank">Void
al@811 847 packages</a> (<tt>*.xbps</tt>)</li>
al@811 848 <li><a href="http://tinycorelinux.net/" target="_blank">Tinycore
al@811 849 packages</a> (<tt>*.tce</tt>, <tt>*.tcel</tt>, <tt>*.tcem</tt>,
al@811 850 <tt>*.tcz</tt>)</li>
al@811 851 </ul>
al@811 852
al@811 853 <pre>
al@811 854 # tazpkg convert <em>alien-package-file</em>
al@811 855 </pre>
al@811 856
al@811 857
al@811 858 <h3 id="list-suggested">list-suggested</h3>
al@811 859
al@811 860 <p>List suggested packages for each of your installed packages. With option
al@811 861 <tt>--all</tt> it shows all suggested packages, and without option it shows only
al@811 862 not installed suggested packages.</p>
al@811 863
al@811 864 <pre>
al@811 865 $ tazpkg list-suggested
al@811 866 $ tazpkg list-suggested --all
al@811 867 </pre>
al@811 868
al@811 869
al@811 870
al@811 871
al@811 872 <h2>Working with repositories</h2>
al@811 873
al@811 874
al@811 875 <h3 id="recharge">recharge</h3>
al@811 876
al@811 877 <p>Recharge the list of available packages on the mirror. This command will
al@811 878 download the most recent packages database of installable packages on the mirror
al@811 879 and before starting will save the old database. Once the DB is updated, you can
al@811 880 then use the <tt><a href="#list">list</a></tt> and
al@811 881 <tt><a href="#search">search</a></tt> commands. To view and list the
al@811 882 differences, you can use <code>list-mirror --diff</code>; and to view and update
al@811 883 packages, you can simply <tt><a href="#upgrade">upgrade</a></tt>.</p>
al@811 884
al@811 885 <p>Command without options will recharge databases of all your repositories. You
al@811 886 can specify repository to be recharged: "main" for main repo, or undigest
al@811 887 repository name. Option <tt>--root=</tt> allow you to specify root of filesystem
al@811 888 where you want to recharge DB.</p>
al@811 889
al@811 890 <pre>
al@811 891 # tazpkg recharge
al@811 892 # tazpkg recharge main
al@811 893 # tazpkg recharge <em>My_Undigest</em>
al@811 894 # tazpkg recharge --root=<em>/mnt/sda6</em>
al@811 895 </pre>
al@811 896
al@811 897
al@811 898 <h3 id="upgrade">upgrade</h3>
al@811 899
al@811 900 <p>Upgrade allows you to update all installed packages available on the current
al@811 901 mirror (<tt>upgrade</tt> or <tt>up</tt>). Upgrading packages is an important
al@811 902 part of system security, it helps to keep you secure with the latest updates and
al@811 903 fixes. The SliTaz project, although tiny, provides regular updates on security
al@811 904 and generally offers the latest versions of software. Note that this function is
al@811 905 aimed at people with SliTaz installed on a hard drive. Updated packages in
al@811 906 Live CD mode will be lost on system shutdown.</p>
al@811 907
al@828 908 <p>At the beginning the packages database is updated automatically (<tt><a
al@828 909 href="#recharge">recharge</a></tt>) in order to provide you with the current
al@828 910 list of packages that you can update.</p>
al@828 911
al@811 912 <p>Without options run in interactive mode and ask before install. You can
al@828 913 specify one of the next options: <tt>-c</tt> or <tt>--check</tt> to check only
al@828 914 for available upgrades; <tt>-i</tt> or <tt>--install</tt> to check for upgrades
al@828 915 and install them all.</p>
al@811 916
al@811 917 <pre>
al@811 918 # tazpkg upgrade
al@828 919 # tazpkg up --check
al@828 920 # tazpkg up -i
al@811 921 </pre>
al@811 922
al@811 923
al@811 924 <h3 id="setup-mirror">setup-mirror</h3>
al@811 925
al@811 926 <p>Setup the URL for the mirror. The <tt>setup-mirror</tt> (or <tt>-sm</tt>)
al@811 927 command will ask for the URL of the new mirror. Note that you can also modify
al@811 928 the main <tt>/var/lib/tazpkg/mirror</tt> file. The URL must point to the
al@811 929 directory containing the <tt>packages.info</tt> and packages.</p>
al@811 930
al@811 931 <pre>
al@811 932 # tazpkg setup-mirror
al@811 933 </pre>
al@811 934
al@811 935
al@811 936 <h3 id="add-undigest">add-undigest, setup-undigest</h3>
al@811 937
al@811 938 <p>Set the URL of an additional unofficial mirror to test packages that are not
al@811 939 yet present on the official mirrors. Note, you can also manually edit the file
al@811 940 in <tt>/var/lib/tazpkg/undigest/<em>repository</em></tt>. The URL must point to
al@811 941 the directory containing the packages and <tt>packages.info</tt>.</p>
al@811 942
pankso@302 943 <pre>
al@571 944 # tazpkg add-undigest <em>public-repository http://my.home.org/slitaz</em>
al@571 945 # tazpkg setup-undigest <em>local-repository /home/slitaz/packages</em>
pankso@302 946 </pre>
pankso@467 947
al@571 948
al@811 949 <h3 id="list-undigest">list-undigest</h3>
al@811 950
al@811 951 <p>Lists additional undigest mirrors. Option <tt>--box</tt> will output list in
al@811 952 the table form.</p>
al@811 953
al@811 954 <pre>
al@811 955 # tazpkg list-undigest
al@811 956 # tazpkg list-undigest --box
al@811 957 </pre>
al@811 958
al@811 959
al@571 960 <h3 id="remove-undigest">remove-undigest</h3>
al@571 961
al@811 962 <p>Removes the URL of an undigest mirror. You will be asked for
al@811 963 confirmation.</p>
al@811 964
pankso@302 965 <pre>
al@571 966 # tazpkg remove-undigest <em>my-repository</em>
pankso@302 967 </pre>
pankso@467 968
al@571 969
al@571 970
pankso@302 971
al@828 972 <h2>Maintainer</h2>
al@811 973
al@811 974 <p>Christophe Lincoln &lt;pankso at slitaz.org&gt;</p>
pankso@302 975
pankso@302 976 </div>
pankso@302 977 <!-- End content -->
al@828 978
al@828 979 <footer>
al@828 980 Copyright © 2015 <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
al@828 981 </footer>
al@828 982
pankso@302 983 </body>
pankso@302 984 </html>