Difference between revisions of "Sisyphus"

From Redcore Linux Project Wiki
Jump to navigationJump to search
Line 36: Line 36:
  update: Update the Portage tree, the Redcore...
  update: Update the Portage tree, the Redcore...
  upgrade: Upgrade the system using binary and/or ebuild...
  upgrade: Upgrade the system using binary and/or ebuild...
*Help :
root # sisyphus --help


=====sisyphus autoremove=====
=====sisyphus autoremove=====
Line 175: Line 178:
  list: List available binary package repository...
  list: List available binary package repository...
  set: Change the binary package repository to the...
  set: Change the binary package repository to the...
*Help :
root # sisyphus mirror --help


======sisyphus mirror list======
======sisyphus mirror list======
Line 185: Line 191:
*Options :
*Options :
  --help: Show this message and exit.
  --help: Show this message and exit.
*Help :
root # sisyphus mirror list --help


*Examples :
*Examples :
Line 196: Line 205:
  7  http://mirror.yandex.ru/mirrors/redcorelinux/packages/
  7  http://mirror.yandex.ru/mirrors/redcorelinux/packages/
  8  http://mirror.yandex.ru/mirrors/redcorelinux/packages-next/
  8  http://mirror.yandex.ru/mirrors/redcorelinux/packages-next/
root # sisyphus mirror list --help


*Portage equivalent :
*Portage equivalent :
Line 215: Line 222:
*Options :
*Options :
  --help: Show this message and exit.
  --help: Show this message and exit.
*Help :
root # sisyphus mirror set --help


*Examples :
*Examples :
Line 238: Line 248:
  7  http://mirror.yandex.ru/mirrors/redcorelinux/packages/
  7  http://mirror.yandex.ru/mirrors/redcorelinux/packages/
  8  http://mirror.yandex.ru/mirrors/redcorelinux/packages-next/
  8  http://mirror.yandex.ru/mirrors/redcorelinux/packages-next/
root # sisyphus mirror set --help


*Portage equivalent :
*Portage equivalent :

Revision as of 23:49, 3 July 2021

Sisyphus is one of the package managers available in Redcore Linux, alongside Portage and Flatpak. It is the recommended package manager to use, and it was developed by Redcore Linux developers for Redcore Linux. In it's essence Sisyphus is a simple wrapper around portage which provides an apt-get/yum-alike interface to it, to assist newcomer people transitioning from Debian/Redhat-based systems to Gentoo.

Note: Not every aspect of Portage is wrapped or exposed. Sisyphus is under active development, so things may be added, changed or removed in the future.

Development

Sisyphus is written in python3 (backend and cli frontend) and PyQt5 (gui frontend) and is divided in 3 parts :

 * A backend
 * A cli client
 * A gui client

Backend

The backend is fairly simple and is comprised of a collection of python3 function libraries which wrap around parts of Portage and implement Sisyphus specific aspects (branches, database recovery, advanced package search and filtering). To avoid potential breakages it does NOT use Portage API and, in order to stay compatible with Portage, the wrapped parts follow it closely, and use identical methods. Some Portage methods have been replaced over time with Sisyphus specific methods (binary package downloader) while still maintaining compatibility. Am experimental method to install binary packages is under development, but it is currently unfortunately stalled due to lack of time (early tests show a 2000% speed increase, while still maintaining Portage compatibility).

CLI client

  • Usage :
root # sisyphus [OPTIONS] COMMAND [ARGS]
  • Options :
--install-completion: Install completion for the current shell.
--show-completion: Show completion for the current shell, to copy it or customize the installation.
--help: Show this message and exit.
  • Commands :
autoremove: Uninstall packages that are no longer needed.
branch: Pull the selected branch of the Portage tree,...
install: Install binary and/or ebuild(source)...
mirror: List/Set the active binhost (binary repository) mirror.
rescue: Resurrect Sisyphus's package database if lost...
search: Search for binary and/or ebuild (source)...
spmsync: Sync Sisyphus's package database with...
sysinfo: Display information about installed core...
uninstall: Uninstall packages *SAFELY* by checking for...
update: Update the Portage tree, the Redcore...
upgrade: Upgrade the system using binary and/or ebuild...
  • Help :
root # sisyphus --help
sisyphus autoremove

Uninstall packages that are no longer needed. When you uninstall a package, it's dependencies will become orphans if nothing else requires them. In addition, a package may no longer depend on another one, so that other package becomes orphan as well if nothing else requires it. Use this command to check the whole dependency chain for such packages, and uninstall them.

  • Usage :
root # sisyphus autoremove [OPTIONS]
  • Options :
--help : Show this message and exit.
  • Help :
root # sisyphus autoremove --help
  • Examples :
root # sisyphus autoremove
  • Portage equivalent :
root # emerge --depclean --verbose --ask
sisyphus branch

Pull the selected branch of the Portage tree, Redcore overlay and Portage configs. The remote can be selected by using the --remote option.

'BRANCH' can be one of the following : master, next. 'REMOTE' can be one of the following : gitlab, pagure (default is pagure).

  • Usage :
root # sisyphus branch [OPTIONS] [master|next]
  • Options :
-r, --remote [gitlab|pagure]
-help: Show this message and exit.
  • Help :
root # sisyphus branch --help
  • Examples :
root # sisyphus branch master --remote=gitlab (pull the branch 'master' from gitlab.com)
root # sisyphus branch next --remote=next (pull the branch 'next' from pagure.io)
  • Note :

Once you changed the branch, you must pair it with the correct binhost (binary repository).

Branch 'master' must be paired with the stable binhost (binary repository) (odd numbers in 'sisyphus mirror list').

  • Examples :
root # sisyphus mirror set 1
root # sisyphus mirror set 5

Branch 'next' must be paired with the testing binhost (binary repository) (even numbers in 'sisyphus mirror list').

  • Examples :
root # sisyphus mirror set 4
root # sisyphus mirror set 8

Sisyphus will refuse to install any package or upgrade the system if the branch and the binhost are not paired, as various package configuration options may be different between branches. This is to avoid user confusion, potential downgrades or system breakages.

sisyphus install google-chrome
fetching updates..       
Current branch: 'next' (testing)
Current binhost: 'http://mirrors.redcorelinux.org/redcorelinux/packages/' (stable)
Invalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting.
  • Portage equivalent :
none, you must change branches manually
  • Warning :

Portage will bypass the protections in Sisyphus, and offer you a solution. Most of the time this solution will include a recompilation or downgrade of packages with different configuration options between branches.


sisyphus install

Install binary and/or ebuild(source) packages. By default, only binary packages will be installed. Use the --ebuild option to install ebuild(source) packages.

  • Usage :
root # sisyphus install [OPTIONS] PKGNAME
  • Options :
-e, --ebuild
--help: Show this message and exit
  • Help :
root # sisyphus install --help
  • Examples :
root # sisyphus install pidgin

Will install pidgin binary package (if available); if there is none, but the ebuild(source) package for pidgin is found, it will stop and suggest the --ebuild option.

root # sisyphus install pidgin

Source package(s) found in the mix; Use 'sisyphus install pidgin --ebuild'; Quitting.
root # sisyphus install pidgin --ebuild

These are the source packages that would be merged, in order:

net-libs/gssdp-1.2.3  dev-libs/libgnt-2.14.1  net-libs/libsrtp-2.3.0-r1  media-plugins/gst-plugins-srtp-1.16.3  net-libs/gupnp-1.2.7  net-libs/gupnp-igd-0.2.5-r10  net-libs/libnice-0.1.15  media-plugins/gst-plugins-libnice-0.1.15-r100  net-libs/farstream-0.2.9  net-im/pidgin-2.14.5

Total: 10 source package(s)

Would you like to proceed? [y/N] 

Will ask Portage to compile and install pidgin and its dependencies from source.

  • Note :

The --ebuild option will preffer to reuse binary packages(if available) to satisfy the dependencies for the ebuild(source) package, speeding up the installation. You can use the --ebuild option all the time even if you don't want to install any ebuild(source) packages; It will fall back to binary packages only (if found).

  • Portage equivalent :
root # emerge --getbinpkgonly --verbose --ask pidgin (install pidgin binary package, fail if not found, even if the ebuild(source) package is found)
root # emerge --getbinpkg --verbose --ask pidgin (install pidgin binary package if found, compile it from source if not)
root # emerge --verbose --ask pidgin (compile pidgin from source, ignoring the binary package)

Sisyphus wraps Portage methods in a slightly different way. It doesn't fail if the binary package is not found, but suggests the '--ebuild' option if the ebuild(source) package is found. If you would rather prefer to use Portage all the time :

root # emerge --sync
root # emerge --getbinpkg --verbose --ask --with-bdeps=y --rebuilt-binaries PKGNAME
root # sisyphus spmsync

will achieve the same result as if running

root # sisyphus install PKGNAME --ebuild

all the time. Portage --getbinpkg option will preffer to reuse binary packages(if available) to satisfy the dependencies for the ebuild(source) package, speeding up the installation.

sisyphus mirror

List/Set the active binhost (binary repository) mirror.

  • Usage :
root # sisyphus mirror [OPTIONS] COMMAND [ARGS]
  • Options :
--help: Show this message and exit.
  • Commands :
list: List available binary package repository...
set: Change the binary package repository to the...
  • Help :
root # sisyphus mirror --help
sisyphus mirror list

List available binary package repository mirrors (the active one is marked with *).

  • Usage :
root # sisyphus mirror list [OPTIONS]
  • Options :
--help: Show this message and exit.
  • Help :
root # sisyphus mirror list --help
  • Examples :
root # sisyphus mirror list
1   http://mirrors.redcorelinux.org/redcorelinux/packages/
2 * http://mirrors.redcorelinux.org/redcorelinux/packages-next/
3   http://mirror.math.princeton.edu/pub/redcorelinux/packages/
4   http://mirror.math.princeton.edu/pub/redcorelinux/packages-next/
5   http://mirror.alpix.eu/redcorelinux/packages/
6   http://mirror.alpix.eu/redcorelinux/packages-next/
7   http://mirror.yandex.ru/mirrors/redcorelinux/packages/
8   http://mirror.yandex.ru/mirrors/redcorelinux/packages-next/
  • Portage equivalent :
root # emerge --info --verbose|grep BINHOST
PORTAGE_BINHOST="http://mirrors.redcorelinux.org/redcorelinux/packages-next/"
  • Note :

Support for multiple binary repositories is somewhat incomplete, only one can be activate at a time, and Portage only lists the active one. Read more at https://wiki.gentoo.org/wiki/Binary_package_guide

sisyphus mirror set

Change the binary package repository to the selected mirror.

  • Usage :
sisyphus mirror set [OPTIONS] INDEX
  • Options :
--help: Show this message and exit.
  • Help :
root # sisyphus mirror set --help
  • Examples :
root # sisyphus mirror set 6
root # sisyphus mirror list
1   http://mirrors.redcorelinux.org/redcorelinux/packages/
2   http://mirrors.redcorelinux.org/redcorelinux/packages-next/
3   http://mirror.math.princeton.edu/pub/redcorelinux/packages/
4   http://mirror.math.princeton.edu/pub/redcorelinux/packages-next/
5   http://mirror.alpix.eu/redcorelinux/packages/
6 * http://mirror.alpix.eu/redcorelinux/packages-next/
7   http://mirror.yandex.ru/mirrors/redcorelinux/packages/
8   http://mirror.yandex.ru/mirrors/redcorelinux/packages-next/
root # sisyphus mirror set 2
root # sisyphus mirror list
1   http://mirrors.redcorelinux.org/redcorelinux/packages/
2 * http://mirrors.redcorelinux.org/redcorelinux/packages-next/
3   http://mirror.math.princeton.edu/pub/redcorelinux/packages/
4   http://mirror.math.princeton.edu/pub/redcorelinux/packages-next/
5   http://mirror.alpix.eu/redcorelinux/packages/
6   http://mirror.alpix.eu/redcorelinux/packages-next/
7   http://mirror.yandex.ru/mirrors/redcorelinux/packages/
8   http://mirror.yandex.ru/mirrors/redcorelinux/packages-next/
  • Portage equivalent :

Read https://wiki.gentoo.org/wiki/Binary_package_guide to learn how to set up a binary package repository on Gentoo Linux systems and how to configure your systems to use it.

sisyphus rescue

Resurrect Sisyphus's package database if lost or corrupted. If for some reason Sisyphus's package database is lost or corrupted, it can be resurrected using Portage's package database. If Portage's package database is corrupted (in this case you're screwed anyway :D), only a partial resurrection will be possible. If Portage's package database is intact, full resurrection will be possible.

  • Usage :
root # sisyphus rescue [OPTIONS]
  • Options :
--help: Show this message and exit.
  • Examples :
root # sisyphus rescue
root # sisyphus rescue --help
sisyphus search
sisyphus spmsync
sisyphus sysinfo
sisyphus uninstall
sisyphus update
sisyphus upgrade