HOWTO: Paludis

Paludis is source-based package manager written in C++, used in Exherbo as default one or in Gentoo-based distributives on demand.

At first you should install paludis using your current package manager (i.e. portage).

# emerge paludis

After installation you should configure it correctly. You’ll need to create these directories (“-p” creates parent directory as well, if needed):

# mkdir /etc/paludis/repositories -p
# mkdir/var/db/paludis/repositories -p


Configuration

Next step – creating config files:

/etc/paludis/general.conf

world=”/var/db/pkg/world”

/etc/paludis/bashrc

Content of this file is similar to part of make.conf, which contains compile-time variables; choose arch and flags:

CHOST=”x86_64-pc-linux-gnu”
CFLAGS=”-march=native -O2 -pipe”
CXXFLAGS=”${CFLAGS}”
LDFLAGS=”-Wl,-O1 -Wl,–as-needed”

/etc/paludis/keywords.conf

Similar to /etc/portage/package.keywords. */* means global option for all packages.

*/* amd64
app-misc/screenfetch *
app-admin/conky ~amd64

/etc/paludis/licenses.conf

Describes accepted licenses. If you don’t care just write:

*/* *

/etc/paludis/mirrors.conf

Pick here.

* http://mirror.yandex.ru/gentoo-distfiles//distfiles ftp://mirror.yandex.ru/gentoo-distfiles//distfiles

/etc/paludis/package_mask.conf, /etc/paludis/package_unmask.conf

Syntax like in package.mask and package.unmask.

=media-video/mpv-0.7.2
>net-p2p/deluge-1.3.6
sys-fs/udev

/etc/paludis/use.conf

Works like package.use. */* means every package (in portage – USE variable in make.conf).

*/* acpi alsa -systemd -pulseaudio
*/* ALSA_CARDS: -* hda-intel
*/* GRUB_PLATFORMS: -* pc
*/* LINGUAS: -* en
*/* VIDEO_CARDS: -* intel i965
*/* RUBY_TARGETS -ruby19

www-client/firefox alsa jit minimal -bindist -dbus system-gmps
=media-libs/sdl-image-1.2.12 png jpeg


Repositories

Paludis doesn’t differ terms portage tree and overlay. Everything here is repository.

So, for every repository you should create .conf file.

/etc/paludis/repositories/gentoo.conf

Paludis can use usual portage tree as repository directory. Moreover, in this case portage will stay fresh and working – for recovery purpose. In example below portage is placed in /usr/portage.

location = /usr/portage
sync = rsync://rsync.europe.gentoo.org/gentoo-portage/
profiles = /usr/portage/profiles/default/linux/amd64/13.0
distdir = /usr/portage/distfiles
format = e
names_cache = ${location}/.cache/names
write_cache = /var/cache/paludis/metadata

Also, make sure that your names_cache dir exists.

Tip: if you wanna try, you can use git instead of rsync for portage tree. For this you should replace rsync source with git://github.com/portage/portage.git, create new dir for it and replace paths in config. After it you’ll need only patience for downloading pretty big bunch of data.

/etc/paludis/repositories/octopus.conf

Almost every Gentoo overlay uses Git as sync method. This is example of typical overlay, for creating another one you’ll just need to change paths.

location = /var/db/paludis/repositories/octopus
sync = git://github.com/Bfgeshka/octopus.git
format = e
names_cache = ${location}/.cache/names
write_cache = /var/cache/paludis/metadata

/etc/paludis/repositories/installed.conf

Every installed package belongs to repository installed.

location = /var/db/pkg/
format = vdb
names_cache = ${location}/.cache/names
provides_cache = ${location}/.cache/provides


Usage

Mostly often used features:

Syncing repositories with current state:

# cave sync

Install package ZZZ:

# cave resolve -x zzz

Pretend to  install package ZZZ:

$ cave resolve zzz

Uninstall package ZZZ:

# cave uninstall -x zzz

Pretend to uninstall package ZZZ:

$ cave uninstall zzz

Show info about current Paludis state:

$ cave info

Information about package ZZZ (available versions, USE flags, brief description):

$ cave show zzz

Updating installed packages in set world (in this example: including rebuild of git-versions older than 1 week, without stop on installation errors, showing recommendations):

# cave resolve -c -x –reinstall-scm weekly –follow-installed-build-dependencies –suggestions display –recommendations display –continue-on-failure if-satisfied world

Common sence advices to create shell aliases. For example, my aliases for fish:

function cem ; cave resolve $argv; notify-send “Installation done!” ; end
function cun ; cave uninstall $argv ; end
function csync ; cave sync; eix-update; notify-send “Sync done!” ; end
function csyncf ; cave sync; end
function cupd ; cave resolve $argv -c –reinstall-scm weekly –follow-installed-build-dependencies –suggestions display –recommendations display –continue-on-failure if-satisfied world ; end

In that case everyday usage is very simple: cem -x for installation, cupd for pretend world update, etc.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: