Kaydet (Commit) c20b16a8 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

documentation of inary have been added

The old documentation didn't consist of an universial style
üst d8b6cb43
.. -*- coding: utf-8 -*-
%%%%%%%%%%%%%%%%%%%%
About Inary Software
%%%%%%%%%%%%%%%%%%%%
`PiSi` fork: Copyright (C) 2005 - 2011, Tubitak / UEKAE
          Licensed with GNU / General Public License version 2.
Inary fork and enhancements: Copyright (C) 2016 - 2018 Suleyman POYRAZ (Zaryob)
          License has been upgraded to version 3 of the GNU / General Public License.
.. _Pisi: https://github.com/Pardus-Linux/pisi
Bifurcated from https://github.com/Pardus-Linux/pisi
Inary package management system started to work on the pisi fork on 21-12-2016 in order \
to repair the deficiencies and errors of the existing pisi package manager and to port it \
to python3 to catch up with the latest developments in Python Programming language;
The first pisi fork (spam) was separated from the fork in terms of coding method and additional \
modules used and turned into a unique one. The name of the library has been changed from \
pisi to inary. The reason for this is to avoid conflicts with linux distributions that \
use similar infrastructure, such as `Solus`_ and `PisiLinux`_.
.. _Solus: https://dev.sol.us/
.. _PisiLinux: https://www.pisilinux.org
The software was called inary and was made available to the public through the `gitlab`_ and `github`_ \
when it provided the appropriate conditions for the end users.
.. _github: https://github.com/SulinOS
.. _gitlab: https://gitlab.com/SulinOS
What distinguishes it from other package management systems:
* Has dynamic file database. It is easy to follow up whether there is a change in the installed files.
* Compared to other package managers coded with Python, it is quite fast.
* Since all the installation script consists of python script. Since the other data of the package is stored in xml files, package building steps can be done without without entering tons of code.
* Post-package and post-package operations (postinstall) do not cause any process confusion by separate software.
Other features:
* It is robust and fast because it works with a database embedded in python.
* Because it uses LZMA and XZ compression methods, it has smaller packages.
* Simple and high-level operations with the same determination
* It includes an API suitable for designing forend applications.
* Terminal interface is very understandable and user-friendly.
.. -*- coding: utf-8 -*-
===========
inary blame
===========
`inary blame` gives information of packager name and email from :term:`installdb` or package file.
`blame` operation gives information under history tag rather than giving detailed information
**Using**
---------
.. code-block:: shell
sh ~$ inary blame <package-name or package-file>
sh ~$ inary bl <package-name or package-file>
**Options**
--------------
blame options:
-r, --release Blame for the given release
-a, --all Blame for the given release
**Example Runtime**
-----------------------------
.. code-block:: shell
$ inary blame expat
Name: expat, version: 2.2.6, release: 1
Package Maintainer: Süleyman POYRAZ <zaryob.dev@gmail.com>
Release Updater: Süleyman POYRAZ <zaryob.dev@gmail.com>
Update Date: 2018-12-23
First release
.. -*- coding: utf-8 -*-
===========
inary build
===========
`inary build` command is used to build binary packages from source files. \
Building operation can be made with giving :term:`pspec.xml` path or source name \
whether any source repository have been added.
**Using**
---------
Build command can be used two ways.
.. code-block:: shell
sh ~$ inary build <pspec-file>
sh ~$ inary bi <package-file>
and also used with giving source name (unlike emerge, only the package creations happens)
.. code-block:: shell
sh ~$ inary build <source-package-name>
sh ~$ inary bi <source-package-name>
**Options**
--------------
build options:
-q, --quiet Run inary build operation without printing extra debug information.
--ignore-dependency Do not take dependency information into account.
-O, --output-dir Output directory for produced packages.
--ignore-action-errors Bypass errors from ActionsAPI.
--ignore-safety Bypass safety switch.
--ignore-check Bypass testing step.
--create-static Create a static package with ar files.
-F, --package-format Create the binary package using the given format. Use '-F help' to see a list of supported formats.
--use-quilt Use quilt patch management system instead of GNU patch.
--ignore-sandbox Do not constrain build process inside the build folder.
The inary package manager allows you to do the building step by step (each step is specified in the :term:`actions.py` script as a function.) \
If an error occurs in any of these steps, the construction can be resumed from the step left. These step specifications is also given to build \
command as parameters.
Build Steps:
--fetch Break build after fetching the source archive.
--unpack Break build after unpacking the source archive, checking sha1sum and applying patches.
--setup Break build after running configure step.
--build Break build after running compile step.
--check Break build after running check step.
--install Break build after running install step.
--package Create INARY package.
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~$ inary build
Building source package: "expat"
expat-2.2.6.tar.bz2 [cached]
>>> Unpacking archive(s)...
-> (/var/inary/expat-2.2.6-1/work) unpacked.
>>> Setting up source...
GNU Config Update Finished.
GNU Config Update Finished.
[Running Command]: ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/libexec --disable-static
>>> Build source...
[Running Command]: make -j5
>>> Installing...
[Running Command]: make DESTDIR=/var/inary/expat-2.2.6-1/install man1dir=/usr/share/man/man1 install
[Running Command]: install -m 0644 "doc/expat.png" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/valid-xhtml10.png" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/reference.html" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/style.css" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "Changes" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat
[Running Command]: install -m 0644 "README.md" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat
Removing special "libtool", file: "/var/inary/expat-2.2.6-1/install/usr/lib/libexpat.la"...
Building package: "expat"
Creating "expat-2.2.6-1-s19-x86_64.inary"...
Building package: "expat-devel"
Creating "expat-devel-2.2.6-1-s19-x86_64.inary"...
Building package: "expat-docs"
Creating "expat-docs-2.2.6-1-s19-x86_64.inary"...
Building package: "expat-pages"
Creating "expat-pages-2.2.6-1-s19-x86_64.inary"...
Keeping build directory
*** 0 error, 1 warning
.. -*- coding: utf-8 -*-
===========
inary check
===========
`inary check` command performs a detailed analysis of the packages installed in the system. \
If there is content that is broken or deleted, or a modified config file, it allows us to see.
**Using**
---------
`check` command analyze only the named package if the argument is given...
.. code-block:: shell
sh ~$ inary check <package-name>
...but analyzes all system if no argument is given.
.. code-block:: shell
sh ~$ inary check
**Options**
--------------
check options:
-c, --component Check installed packages under given component.
--config Checks only changed config files of the packages.
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~$ inary check
Checking integrity of "acl" OK
Checking integrity of "bash" OK
Checking integrity of "unzip" OK
Checking integrity of "tar" OK
sh ~$ inary check acl
Checking integrity of "acl" OK
.. -*- coding: utf-8 -*-
=======================
inary configure-pending
=======================
`inary configure-pending` is used to complete the post-install scripts of packages installed on the system, \
but did not process the scripts after installation
.. note:: This operation needs privileges and can be allowed by only super user.
**Using**
---------
`configure-pending` operation configures only the named package if the argument is given...
.. code-block:: shell
sh ~# inary configure-pending <package-name>
sh ~# inary cp <package-name>
...but executes post-install scripts for all pending packages if no argument is given
.. code-block:: shell
sh ~# inary configure-pending
sh ~# inary cp
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~# inary configure-pending acl bash unzip gcc binutils tar
Configuring "acl".
Configuring "acl" package.
Configured "acl".
Configuring "bash".
Configuring "bash" package.
Configured "bash".
Configuring "unzip".
Configuring "unzip" package.
Configured "unzip".
Configuring "tar".
Configuring "tar" package.
Configured "tar".
.. -*- coding: utf-8 -*-
==================
inary delete-cache
==================
`inary delete-cache` allows to clean inary's temporary files package and source code archives. It does not take any other argument, or parameter.
.. note:: This operation needs privileges and can be allowed by only super user.
**Using**
---------
.. code-block:: shell
sh ~# inary dc
sh ~# inary delete-cache
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~# inary delete-cache
Cleaning package cache "/var/cache/inary/packages"...
Cleaning source archive cache "/var/cache/inary/archives"...
Cleaning temporary directory "/var/inary"...
Removing cache file "/var/cache/inary/packagedb.cache"...
Removing cache file "/var/cache/inary/sourcedb.cache"...
Removing cache file "/var/cache/inary/componentdb.cache"...
Removing cache file "/var/cache/inary/groupdb.cache"...
.. -*- coding: utf-8 -*-
===========
inary delta
===========
The `inary delta` command is used to create delta packages from two different release of packages.
It creates a delta package of only the changed files.
This allows us to minimize updates and reduce the data network less regularly.
allows us to use.
.. note:: delta packets are recommended only for packages created from the same version source.
**Using**
---------
.. code-block:: shell
sh ~$ inary delta <older-release-of-package> <newer-release-of-package>
.. note: Creating `delta` packages are only available with same source packages' different releases.
**Options**
-----------
delta options:
-t, --newest-package Use arg as the new package and treat other arguments as old packages.
-O, --output-dir Output directory for produced packages.
-F, --package-format Create the binary package using the given format. Use '-F help' to see a list of supported formats.
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~$ inary delta expat-2.2.6-1-s19-x86_64.inary expat-2.2.6-2-s19-x86_64.inary
Creating delta package: "expat-1-2-s19-x86_64.delta.inary"...
.. -*- coding: utf-8 -*-
============
inary emerge
============
`inary emerge` command is used to build a source package from the source repository and to install the system.
.. note:: This operation needs privileges and can be allowed by only super user.
**Using**
---------
`emerge` operation takes an argument which is source package name.
.. code-block:: shell
sh ~# inary emerge <package-name>
sh ~# inary em <package-name>
**Options**
-----------
emerge options:
-c, --component Emerge available packages under given component
--ignore-file-conflicts Ignore file conflicts.
--ignore-package-conflicts Ignore package conflicts.
--ignore-scom Bypass scom configuration agent.
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~$ inary emerge expat
Building source package: "expat"
expat-2.2.6.tar.bz2 [cached]
>>> Unpacking archive(s)...
-> (/var/inary/expat-2.2.6-1/work) unpacked.
>>> Setting up source...
GNU Config Update Finished.
GNU Config Update Finished.
[Running Command]: ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/libexec --disable-static
>>> Build source...
[Running Command]: make -j5
>>> Installing...
[Running Command]: make DESTDIR=/var/inary/expat-2.2.6-1/install man1dir=/usr/share/man/man1 install
[Running Command]: install -m 0644 "doc/expat.png" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/valid-xhtml10.png" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/reference.html" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/style.css" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "Changes" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat
[Running Command]: install -m 0644 "README.md" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat
Removing special "libtool", file: "/var/inary/expat-2.2.6-1/install/usr/lib/libexpat.la"...
Building package: "expat"
Creating "expat-2.2.6-1-s19-x86_64.inary"...
Building package: "expat-devel"
Creating "expat-devel-2.2.6-1-s19-x86_64.inary"...
Building package: "expat-docs"
Creating "expat-docs-2.2.6-1-s19-x86_64.inary"...
Building package: "expat-pages"
Creating "expat-pages-2.2.6-1-s19-x86_64.inary"...
Keeping build directory
Installing package "expat" version 2.2.6 release 1
Extracting files of "expat" package.
Adding files of "expat" to database...
Installing "expat".
.. -*- coding: utf-8 -*-
==============
inary emergeup
==============
`inary emergeup` command analyzes the upgraded source packages and it is used to build \
a source package from the source repository and to install the system. So it supplies \
to upgrade packages with building in your system.
.. note:: This operation needs privileges and can be allowed by only super user.
**Using**
---------
`emergeup` operation builds an upgrades one specific package if the argument is given...
.. code-block:: shell
sh ~# inary emergeup <package-name>
sh ~# inary emup <package-name>
...but upgrades all waiting source packages if no argument is given.
.. code-block:: shell
sh ~# inary emergeup
sh ~# inary emup
**Options**
-----------
emerge options:
-c, --component Emerge available packages under given component
--ignore-file-conflicts Ignore file conflicts.
--ignore-package-conflicts Ignore package conflicts.
--ignore-scom Bypass scom configuration agent.
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~$ inary emergeup expat
Building source package: "expat"
expat-2.2.6.tar.bz2 [cached]
>>> Unpacking archive(s)...
-> (/var/inary/expat-2.2.6-1/work) unpacked.
>>> Setting up source...
GNU Config Update Finished.
GNU Config Update Finished.
[Running Command]: ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/libexec --disable-static
>>> Build source...
[Running Command]: make -j5
>>> Installing...
[Running Command]: make DESTDIR=/var/inary/expat-2.2.6-1/install man1dir=/usr/share/man/man1 install
[Running Command]: install -m 0644 "doc/expat.png" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/valid-xhtml10.png" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/reference.html" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "doc/style.css" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat/html
[Running Command]: install -m 0644 "Changes" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat
[Running Command]: install -m 0644 "README.md" /var/inary/expat-2.2.6-1/install/usr/share/doc/expat
Removing special "libtool", file: "/var/inary/expat-2.2.6-1/install/usr/lib/libexpat.la"...
Building package: "expat"
Creating "expat-2.2.6-2-s19-x86_64.inary"...
Building package: "expat-devel"
Creating "expat-devel-2.2.6-2-s19-x86_64.inary"...
Building package: "expat-docs"
Creating "expat-docs-2.2.6-2-s19-x86_64.inary"...
Building package: "expat-pages"
Creating "expat-pages-2.2.6-2-s19-x86_64.inary"...
Keeping build directory
Installing package "expat" version 2.2.6 release 2
Extracting files of "expat" package.
Adding files of "expat" to database...
Installing "expat".
.. -*- coding: utf-8 -*-
===========
inary fetch
===========
`inary fetch` is used to download packages from the repository. It fetchs binary packages to
working directory
**Using**
---------
.. code-block:: shell
sh ~$ inary fetch <package-name>
sh ~$ inary fc <package-name>
**Options**
--------------
fetch options:
-o, --output-dir Output directory for the fetched packages
--runtime-deps Download with runtime dependencies.
**Example Runtime**
-----------------------------
.. code-block:: shell
sh ~$ inary fc expat
"expat" package found in "core" repository.
expat-2.2.7-2-s19-x86_64.inary (194.0 KB)
.. -*- coding: utf-8 -*-
===========
inary graph
===========
`inary graph` command draws the dependency graphic between the repositories attached to the system and creates an dot file.
**Output**
----------
graph options:
-r, --repository Specify a particular repository.
-i, --installed Graph of installed packages
--ignore-installed Do not show installed packages.
-R, --reverse Draw reverse dependency graph.
-o, --output Dot output file
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~$ inary graph
Plotting a graph of relations among all repository packages.
.. -*- coding: utf-8 -*-
==========
inary help
==========
`inary help` comand gives information about all inary commands and options.
**Using**
---------
.. code-block::
sh ~$ inary help
sh ~$ inary ?
**Output**
---------------
.. code-block::
sh ~$ inary help
usage: inary [options] <command> [arguments]
where <command> is one of:
add-repo (ar) - Add a repository
blame (bl) - Information about the package owner and release
build (bi) - Build INARY packages
check - Verify installation
config-manager (cm) - Inary Config file manager.
configure-pending (cp) - Configure pending packages
delete-cache (dc) - Delete cache files
delta (dt) - Creates delta packages
disable-repo (dr) - Disable repository
emerge (em) - Build and install INARY source packages from repository
emergeup (emup) - Build and upgrade INARY source packages from repository
enable-repo (er) - Enable repository
fetch (fc) - Fetch a package
graph - Graph package relations
help (?) - Prints help for given commands
history (hs) - History of inary operations
index (ix) - Index INARY files in a given directory
info - Display package information
install (it) - Install INARY packages
list-available (la) - List available packages in the repositories
list-components (lc) - List available components
list-installed (li) - Print the list of all installed packages
list-newest (ln) - List newest packages in the repositories
list-orphaned (lo) - List orphaned packages
list-pending (lp) - List pending packages
list-repo (lr) - List repositories
list-sources (ls) - List available sources
list-upgrades (lu) - List packages to be upgraded
rebuild-db (rdb) - Rebuild Databases
remove (rm) - Remove INARY packages
remove-orphaned (ro) - Remove orphaned packages
remove-repo (rr) - Remove repositories
search (sr) - Search packages
search-file (sf) - Search for a file
update-repo (ur) - Update repository databases
upgrade (up) - Upgrade INARY packages
Use "inary help <command>" for help on a specific command.
Options:
--version : show program's version number and exit
-h [--help] : show this help message and exit
general options:
-D [--destdir] arg : Change the system root for INARY commands.
-y [--yes-all] : Assume yes in all yes/no queries.
-u [--username] arg
-p [--password] arg
-L [--bandwidth-limit] arg : Keep bandwidth usage under specified KB's.
-v [--verbose] : Detailed output
-d [--debug] : Show debugging information.
-N [--no-color] : Suppresses all coloring of INARY's output.
.. -*- coding: utf-8 -*-
=============
inary history
=============
`inary history` command allows us to list the commands made in the past, undo \
changes made after a certain time (takeback), and create a system restore \
point (snapshot).
Basically it is inary's transactional history manager.
**Using**
---------
.. code-block:: shell
sh ~$ inary hs
sh ~$ inary history
**Options**
-----------
history options:
-l, --last Output only the last 'n' operations.
-s, --snapshot Take snapshot of the current system.
-t, --takeback Takeback to the state after the given operation finished.
**Hints**
---------
`history` operation is not used to display only historical operations. This allows \
us to roll back operations or create a restore point at a time whenever user want.
.. note: Transactinal process will be specified in package processes.
.. note:: snapshot and takeback operations needs privileges and can be allowed by only super user.
**Example Runtime Output**
--------------------------
.. code-block:: shell
sh ~$ inary history
Inary Transactional History:
Operation #1: repository update:
Date: 2019-10-06 14:10
* trykl
.. -*- coding: utf-8 -*-
%%%%%%%%%%%%%%
Inary Commands
%%%%%%%%%%%%%%
.. toctree::
:maxdepth: 0
./blame.rst
./build.rst
./check.rst
./configure-pending.rst
./delete-cache.rst
./delta.rst
./emerge.rst
./emergeup.rst
./fetch.rst
./graph.rst
./info.rst
./install.rst
./help.rst
./history.rst
./index_cmd.rst
./rebuild-db.rst
./remove.rst
./remove-orphaned.rst
./search.rst
./search-file.rst
./upgrade.rst
./repo-commands.rst
./list-commands.rst
.. -*- coding: utf-8 -*-
===========
inary index
===========
`inary index` command creates an index file of repository. This command collects \
all informations in :term:`pspec.xml` and :term:`metadata.xml` from binary packages \
then accumulates this informations as an index file.
`index` operation creates index files from both of source packages and binary packages. \
But filtering is also possible.
**Using**
---------
`index` operation creates index from one directory if the argument is given...
.. code-block:: shell
sh ~$ inary index <directory>
sh ~$ inary ix <directory>