Gentoolkit

From Gentoo Wiki
Jump to: navigation, search
This page is a translated version of the page Gentoolkit and the translation is 60% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎日本語 • ‎한국어 • ‎русский

Not to be confused with Genkernel.


Resources

Gentoolkit ist eine Suite von Werkzeugen zur Erleichterung der Administration eines Gentoo Systems. Dieses Dokument beschreibt die Grundlagen einiger dieser in Gentoolkit vorhandenen Tools.

Einleitung

Was ist Gentoolkit?

Gentoo ist eine einzigartige Distribution und zeigt einige Komplexitäten, die es bei anderen Distributionen einfach so nicht gibt. Als Gentoo-Entwickler und Mitwirkende einige dieser Komplexitäten aufdeckten, schrieben Sie Tools um den Benutzern und Administratoren zu helfen diese zu umgehen. Viele dieser Tools wurden dem Gentoo-Projekt beigesteuert und sind im Paket app-portage/gentoolkit enthalten.

Hinweis
Ab sofort gibt es zwei Versionen von Gentoolkit: app-portage/gentoolkit und app-portage/gentoolkit-dev. Während das erstere Administrations-Scripte enthält, befinden sich im letzteren Scripte zur Hilfe für die Entwicklung auf Gentoo. Gentoo Entwickler können Ihre eigenen Scripte in app-portage/gentoolkit-dev durch Kontaktaufnahme mit dem Gentoolkit Betreuer einbinden lassen. Der Rest dieses Dokuments behandelt ausschließlich das Paket app-portage/gentoolkit.
Notiz
app-portage/gentoolkit-dev has been merged into app-portage/gentoolkit as of version 0.4.0.

Gentoolkit enthält eine ganze Reihe nützlicher Tools die den Benutzern helfen, Ihre Pakete zu verwalten und im Auge zu behalten was auf Ihren Systemen los ist. Die meisten Nutzer - insbesondere jene, die Systeme oft aktualisieren - werden von der Gentoolkit-Installation profitieren.

Installation

Emerge

As with most other Gentoo packages, installation is as simple as an emerge:

root #emerge --ask app-portage/gentoolkit
Hinweis
Viele Werkzeuge in Gentoolkit enthüllen wichtige Informationen über das System auf dem Sie installiert sind, oder benötigen root-Rechte. Aus diesem Grund können einige der Programme nur von Benutzern mit root-Rechten ausgeführt werden. (Andernfalls können sie möglicherweise nicht richtig funktionieren.)

Dokumentation finden

Jegliche Dokumentation die ein Programm haben könnte (außer den Manpages), ist abgelegt in /usr/share/doc/gentoolkit-[version]/[programmname]/.

euse

euse is a tool to see, set and unset USE flags at various places. For more information on USE flags, please refer to the USE Flags. See euse -h for complete help and all options.

Anzeige, Setzen und nicht Setzen von USE Flags

The euse -a command reads the current active USE flags and displays them.

Notiz
There are 5 "columns" that euse now uses to show whether a flag is set/unset and where all the flag has been set. The columns are as follows -- +/-, set in the Environment, set in make.Conf, set in make.Defaults, and set in make.Globals. The output looks like [+ECDG].
root #euse -a
X                   [+ CD ]
aalib               [+    ]
acpi                [+ C  ]
alsa                [+ C  ]
apache2             [+ C  ]
apm                 [+  D ]
avi                 [+  D ]
berkdb              [+  D ]
bitmap-fonts        [+  D ]
bonobo              [+    ]
cdr                 [+ C  ]
crypt               [+ CD ]
cscope              [+ C  ]
cups                [+ CD ]
curl                [+    ]
emboss              [+  D ]
encode              [+  D ]
esd                 [+    ]
fam                 [+    ]
fbcon               [+ C  ]
firefox             [+ C  ]
font-server         [+  D ]
foomaticdb          [+  D ]
fortran             [+  D ]
gd                  [+ C  ]
gdbm                [+  D ]
gif                 [+ CD ]
gimpprint           [+ C  ]
gnome               [+ CD ]
gphoto2             [+    ]
gpm                 [+ CD ]
gstreamer           [+ C  ]
gtk                 [+  D ]
gtkhtml             [+ C  ]
guile               [+    ]
imagemagick         [+    ]
imlib               [+ CD ]
innodb              [+    ]
ipv6                [+  D ]
javascript          [+ C  ]
jpeg                [+ CD ]
kde                 [+  D ]
ldap                [+    ]
libg++              [+ CD ]
libwww              [+ CD ]
mad                 [+ CD ]
mbox                [+ C  ]
md5sum              [+ C  ]
mikmod              [+ CD ]
mmx                 [+ C  ]
motif               [+ CD ]
mp3                 [+    ]
mpeg                [+ CD ]
mpeg4               [+ C  ]
mysql               [+ C  ]
ncurses             [+ CD ]
nls                 [+  D ]
nvidia              [+ C  ]
odbc                [+    ]
offensive           [+    ]
ogg                 [+ CD ]
opengl              [+ CD ]
oss                 [+  D ]
pam                 [+ CD ]
pdflib              [+ CD ]
perl                [+ CD ]
png                 [+ CD ]
python              [+ CD ]
qt                  [+  D ]
quicktime           [+ CD ]
readline            [+ CD ]
ruby                [+    ]
sdl                 [+ CD ]
slang               [+  D ]
spell               [+ CD ]
sse                 [+ C  ]
ssl                 [+ CD ]
svga                [+ CD ]
tcltk               [+ C  ]
tcpd                [+  D ]
tiff                [+ C  ]
truetype            [+ CD ]
usb                 [+ C  ]
vanilla             [+ C  ]
x86                 [+ C  ]
xml                 [+    ]
xosd                [+ C  ]
xv                  [+ CD ]
xvid                [+ C  ]
zlib                [+ CD ]

Similarly the euse -a -g command is used to view active global USE flags. The euse -a -l command does the same for active local USE flags. -g and -l are sub-options to euse and need an option before them (like -a) to function correctly.

root #euse -a -l
bitmap-fonts        [+  D ]
font-server         [+  D ]
fortran             [+  D ]
gimpprint           [+ C  ]
md5sum              [+ C  ]
mpeg4               [+ C  ]
nvidia              [+ C  ]
offensive           [+    ]
truetype            [+ CD ]

euse is able to set or unset USE flags. The commands used for this are euse -E flagname (enable a flag) and euse -D flagname (disable a flag).

Warnung
Do not use the euse -E or euse -D commands by themselves (without a flag). It will set/unset ALL USE flags in /etc/portage/make.conf. Although a backup is kept at /etc/portage/make.conf.euse_backup, please be careful while using euse -E or euse -D!

USE Flag aktivieren:

root #euse -E 3dfx
/etc/portage/make.conf was modified, a backup copy has been placed at /etc/portage/make.conf.euse_backup

Die Datei /etc/portage/make.conf sieht folgendermaßen aus nachdem der Befehl ausgeführt wurde:

DATEI make.confNach Aktivierung des USE Flag 3dfx
USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc fbcon \
     firefox gd gif gimpprint gnome gpm gstreamer gtkhtml imlib \
     innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
     mikmod mmx motif mpeg mpeg4 mysql ncurses nvidia \
     ogg odbc offensive opengl pam pdflib perl png python \
     quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
     vanilla X xosd xv xvid x86 zlib 3dfx"

USE Flag deaktivieren:

root #euse -D 3dfx
/etc/portage/make.conf was modified, a backup copy has been placed at /etc/portage/make.conf.euse_backup

Nochmals die Datei /etc/portage/make.conf nach Ausführung des Befehls:

DATEI make.confNach Deaktivierung des USE Flag 3dfx
USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc fbcon \
     firefox gd gif gimpprint gnome gpm gstreamer gtkhtml imlib \
     innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
     mikmod mmx motif mpeg mpeg4 mysql ncurses nvidia \
     ogg odbc offensive opengl pam pdflib perl png python \
     quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
     vanilla X xosd xv xvid x86 zlib -3dfx"
Notiz
euse does not physically remove the flag from /etc/portage/make.conf. It adds a - (minus) before the flag to unset it. A manual clean up of the /etc/portage/make.conf might be needed to avoid unwanted variables. Otherwise use the -P (purge) option to remove the flag. euse -P 3dfx for example would remove the 3dfx flag.

Weitere Tools

revdep-rebuild

This tool is Gentoo's Reverse Dependency rebuilder. It will scan the installed ebuilds to find packages that have become broken as a result of an upgrade of a package they depend on. It can emerge those packages for users automatically but it can also happen that a given package does not work with the currently installed dependencies, in which case you should upgrade the broken package to a more recent version. revdep-rebuild will pass flags to emerge which lets you use the --pretend flag to see what is going to be emerged again before going any further.

root #revdep-rebuild -p
 * Configuring search environment for revdep-rebuild
  
 * Checking reverse dependencies
 * Packages containing binaries and libraries broken by a package update
 * will be emerged.
  
 * Collecting system binaries and libraries
 * Generated new 1_files.rr
 * Collecting complete LD_LIBRARY_PATH
 * Generated new 2_ldpath.rr
 * Checking dynamic linking consistency
[ 48% ]  *   broken /usr/lib/gstreamer-0.10/libgsttaglib.la (requires /usr/lib/libtag.la)
[ 64% ]  *   broken /usr/lib/libgdkglext-x11-1.0.la (requires /usr/lib/libGLU.la)
[ 67% ]  *   broken /usr/lib/libgtkglext-x11-1.0.la (requires /usr/lib/libGLU.la)
[ 85% ]  *   broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la (requires /usr/lib/libGLU.la)
 *   broken /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la (requires /usr/lib/libGLU.la)
[ 97% ]  *   broken /usr/qt/3/lib/libqt-mt.la (requires -lpng)
[ 100% ]
 * Generated new 3_broken.rr
 * Assigning files to packages
 *   /usr/lib/gstreamer-0.10/libgsttaglib.la -> media-plugins/gst-plugins-taglib
 *   /usr/lib/libgdkglext-x11-1.0.la -> x11-libs/gtkglext
 *   /usr/lib/libgtkglext-x11-1.0.la -> x11-libs/gtkglext
 *   /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gdkgl/_gdkgl.la -> dev-python/pygtkglext
 *   /usr/lib/python2.6/site-packages/gtk-2.0/gtk/gtkgl/_gtkgl.la -> dev-python/pygtkglext
 *   /usr/qt/3/lib/libqt-mt.la -> x11-libs/qt
 * Generated new 4_raw.rr and 4_owners.rr
 * Cleaning list of packages to rebuild
 * Generated new 4_pkgs.rr
 * Assigning packages to ebuilds
 * Generated new 4_ebuilds.rr
 * Evaluating package order
 * Generated new 5_order.rr
 * All prepared. Starting rebuild
emerge --oneshot --pretend  dev-python/pygtkglext:0
media-plugins/gst-plugins-taglib:0.10
x11-libs/gtkglext:0
x11-libs/qt:3
  
These are the packages that would be merged, in order:
  
Calculating dependencies... done!
[ebuild   R   ] media-plugins/gst-plugins-taglib-0.10.17
[ebuild   R   ] x11-libs/gtkglext-1.2.0
[ebuild   R   ] x11-libs/qt-3.3.8b-r2
[ebuild   R   ] dev-python/pygtkglext-1.1.0
 * Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.

To rebuild some packages run revdep-rebuild without the -p flag and the listed packages will be emerged again.

glsa-check

glsa-check is mainly a test tool that keeps track of the various GLSA's (Gentoo Linux Security Advisory) and will eventually be integrated into emerge and equery.

eread

eread is a simple utility to display elog files produced by Portage since version 2.1. The saving of elog files can be enabled by setting a couple of variables in /etc/portage/make.conf:

DATEI make.confelog aktivieren
PORTAGE_ELOG_CLASSES="log"
PORTAGE_ELOG_SYSTEM="save"
Notiz
Dies ist nur eine Art elog Meldungen zu speichern. Weitere Informationen wie das elog System von Portage arbeitet entnehmen Sie bitte der entsprechenden Seite im Portage Handbuch.

Once elog has been set up to satisfaction, run eread to view the log files.

user $eread
This is a list of portage log items. Choose a number to view that file or type
q to quit.
  
1) app-portage:gentoolkit-0.2.4_pre2:20070320-000256.log
2) app-portage:gentoolkit-0.2.4_pre2:20070320-000258.log
3) app-portage:gentoolkit-0.2.4_pre2:20070320-000319.log
4) app-portage:gentoolkit-0.2.3:20070320-000408.log
Choice?

Select a number and the file will be displayed using the paging program specified in the PAGER environment variable. If PAGER is not set, it will use less. The PAGER environmental variable can be set using eselect (module pager).

Nach der Anzeige des elog Elements werden sie gefragt, ob sie die Datei löschen wollen.

eclean

eclean is a tool to remove old source files and old binary packages from the system.

When building and installing packages, the source files are downloaded and preserved in DISTDIR, usually /usr/portage/distfiles. This can accumulate several gigabytes of material over time if it is not cleaned periodically. Users should run eclean-dist to clean source files from DISTDIR.

It is possible to create archives of installed packages by using quickpkg or FEATURES="buildpkg". These archived packages are kept in PKGDIR, usually /usr/portage/packages. When they are no longer needed, or if they are too old, eclean-pkg can be ran to remove them from PKGDIR. It is a good way to ensure that any binary packages on the system are only the latest versions.

For more information on eclean and tips on maintaining a cruft-free system, please read man eclean or check the eclean article.

Siehe auch


This article is based on a document formerly found on our main website gentoo.org.
The following people contributed to the original document: Matt Butcher, John P. Davis, Erwin, Shyam Mani, Xavier Neys, Karl Trygve, José Luis Rivero, Joshua Saddler, Douglas Anderson
They are listed here as the Wiki history does not allow for any external attribution. If you edit the Wiki article, please do not add yourself here; your contributions are recorded on the history page.