Wiki

A universe of ideas

User Tools

Site Tools


computer:gentoo

This is an old revision of the document!


Gentoo

Don't use this for your own gentoo setup. This is not a good reference!

https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 ←- this is a good one

Kernel config

kergen -g

Funtoo overlay fix

sudo wget -O /var/lib/layman/funtoo-overlay/eclass/python.eclass  http://gentoo-progress.googlecode.com/svn/overlays/progress/eclass/python.eclass

Update

Gentoo

eix-sync && \
PORTAGE_NICENESS=19 PORTAGE_IONICE_COMMAND="ionice -c3 -p \${PID}" emerge --update --deep --with-bdeps=y --newuse --ask @world && \
emerge @preserved-rebuild && \
emerge -a --depclean

Kernel

eselect kernel set 1
cd /usr/src/linux
cp $(ls -vr /usr/src/linux-*-hardened/.config | head -1) /usr/src/linux/
make olddefconfig
 
make -j8 && make -j8 modules_install && make -j8 install && touch /boot/* && emerge -1 @module-rebuild

Python

eselect python set xxx ## Nicht umbedingt die neuste Version (wie es update tun würde)
python-updater
perl-cleaner --all
eclean-dist -d
ls  /var/{log,tmp}/portage

PostgreSQL

## Temporally install the old version 
emerge -1  dev-db/postgresql:9.3
 
## Create database and config for the new version
emerge --config dev-db/postgresql:9.5
 
## Manually merge config
d /etc/postgresql-9.{3,5}/pg_hba.conf
#...
 
## Migrate
cd /tmp
sudo -u postgres -- pg_upgrade -d /var/lib/postgresql/9.3/data/ -D /var/lib/postgresql/9.5/data/ -b /usr/lib/postgresql-9.3/bin/ -B /usr/lib/postgresql-9.5/bin/
systemctl start postgresql-9.5.service
sudo -u postgres /var/lib/postgresql/analyze_new_cluster.sh
rm -R /etc/postgresql-9.3 /var/lib/postgresql/9.3

In some old instructions, steps can be found, which are not necessary anymore:

  • Copy config files from /etc/postgresql-*/ to /var/lib/postgresql/*/data/ (they are now symlinked)
  • Add local all all trust to /etc/postgresql-*/pg_hba.conf (it it there by default)

Haushalten

Konfiguration in /etc/portage/ überprüfen

eix -t
eix -T
eix-test-obsolete
portpeek -a

Keywords, die nicht in world sind

cat /etc/portage/package.accept_keywords/{imp,exp}-* | grep -vE '^#' | xargs qatom | cut -d ' ' -f 1-2 | tr ' ' '/' | sort -u | grep -vF '(null)' | grep -Ev "$(tr '\n' '|' </var/lib/portage/world | rev | cut -c 2- | rev)"

Finde doppelte useflags in /etc/portage/make.conf

source /etc/portage/make.conf
tr ' ' '\n' <<<$USE | sort | uniq -d

Finde package use flags in /etc/portage/make.conf

source /etc/portage/make.conf
for u in $(tr ' ' '\n' <<<$USE | sed 's/^-//' | sort -u) ; do
    grep -Eq '^{} - ' /usr/portage/profiles/use.desc || equery h $u
done

Pakete mit “kaputen” files

qcheck --all --nomtime | grep -vE "files are good|file are good" | grep -B 1 -E '^ '

Finde Dateien, die zu keinem Paket gehören

find /usr -path /usr/local -prune -o -path /usr/lib64 -prune -o -path /usr/portage -prune -o -type f -print0 | xargs -0 qfile -o

Pakete die ausmerksamkeit wollen

emerge --update --deep --with-bdeps=y --newuse --ask -pe @world | grep -vF '[ebuild   R   '

Alle Pakete aus fremden Overlays auflisten

(for pkg in /var/db/pkg/*/*; do if ! grep gentoo $pkg/repository >/dev/null; then printf '%15s %s\n' "`cat $pkg/repository`" "`basename $pkg`"; fi; done)|sort

Cross Compiler

AVR Compiler bauen

USE="multilib cxx -openmp -sanitize -hardened" crossdev -S -t avr

Paketieren

ebuild *.ebuild manifest
ebuild *.ebuild merge

GTK

Find all themes supporting GTK2 and GTK3

for d in /usr/share/themes/* ; do
    if [ -e "$d/gtk-3.0" -a -e "$d/gtk-2.0" ] ; then
        printf "%20s %s\n" "$(basename "$d")" "$(equery b "$d")"
    fi
done

For some Themes, the engine to be used is defined in gtk-2.0/gtkrc or gtk-3.0/gtk.css.

Some engines (like x11-themes/gtk-engines-xfce) have their themes included (no further package is required). Some themes depend on their engine (like x11-themes/light-themes depends on x11-themes/gtk-engines-murrine and x11-themes/gtk-engines-unico).

computer/gentoo.1465528558.txt.gz · Last modified: 2020-11-18 18:10 (external edit)