/[gentoo]/xml/htdocs/doc/en/gentoolkit.xml
Gentoo

Contents of /xml/htdocs/doc/en/gentoolkit.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.19 - (hide annotations) (download) (as text)
Thu Apr 7 17:58:39 2005 UTC (9 years, 5 months ago) by swift
Branch: MAIN
Changes since 1.18: +178 -42 lines
File MIME type: application/xml
#86937 - euse updates + warning about brokenness

1 vapier 1.11 <?xml version="1.0" encoding="UTF-8"?>
2 swift 1.19 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.18 2004/12/27 20:32:02 swift Exp $ -->
3 drobbins 1.1 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4    
5 cam 1.9 <guide link="/doc/en/gentoolkit.xml">
6 drobbins 1.1 <title>Gentoolkit</title>
7 cam 1.9
8     <author title="Author">
9     <mail link="mbutcher@aleph-null.tv">Matt Butcher</mail>
10 drobbins 1.1 </author>
11 cam 1.9 <author title="Editor">
12     <!-- zhen@gentoo.org -->John P. Davis
13 swift 1.5 </author>
14 erwin 1.7 <author title="Editor">
15     <mail link="erwin@gentoo.org">Erwin</mail>
16     </author>
17 neysx 1.13 <author title="Editor">
18     <mail link="fox2mike@gmail.com">Shyam Mani</mail>
19     </author>
20     <author title="Editor">
21     <mail link="neysx@gentoo.org">Xavier Neys</mail>
22     </author>
23 cam 1.9
24 drobbins 1.1 <!-- Licensed under GFDL -->
25    
26     <abstract>
27 cam 1.9 Gentoolkit is a suite of tools to ease the administration of a Gentoo system.
28     This document covers the basics of some of the tools present in Gentoolkit.
29 drobbins 1.1 </abstract>
30    
31 swift 1.19 <version>1.6</version>
32     <date>2005-04-07</date>
33 drobbins 1.1
34     <chapter>
35 cam 1.9 <title>Introduction</title>
36     <section>
37     <title>What is Gentoolkit?</title>
38     <body>
39    
40     <p>
41 neysx 1.13 Gentoo is a unique distribution and presents some complexities that simply
42 cam 1.9 don't exist for other distributions. As Gentoo developers and contributors
43     discovered some of these complexities, they also wrote tools to help users and
44     administrators work around them. Many of these tools have been contributed to
45 neysx 1.13 the Gentoo project and are included in the package
46 cam 1.9 <c>app-portage/gentoolkit</c>.
47     </p>
48    
49 neysx 1.13 <note>
50     As of now, there are two versions of gentoolkit: <c>app-portage/gentoolkit</c>
51     and <c>app-portage/gentoolkit-dev</c>. While the former contains administration
52     scripts, the latter contains scripts specific to help development on Gentoo.
53     This document discusses gentoolkit only.
54     </note>
55    
56 cam 1.9 <p>
57 neysx 1.13 Gentoolkit contains a whole bunch of useful tools to help manage your packages
58 neysx 1.15 and keep track of what is going on in your system. Most users --&nbsp;particularly
59 neysx 1.13 those who update systems often&nbsp;-- will benefit from having gentoolkit
60     installed.
61 cam 1.9 </p>
62    
63     </body>
64     </section>
65     <section>
66     <title>Installation</title>
67     <body>
68    
69     <p>
70     Just as with any Gentoo package, installation is just a simple emerge.
71     </p>
72    
73 neysx 1.13 <pre caption="Getting gentoolkit">
74 cam 1.10 # <i>emerge gentoolkit</i>
75 cam 1.9 </pre>
76    
77     <note>
78     Many of the tools in gentoolkit reveal important information about your system
79 neysx 1.13 or require root privilege. For that reason, some of the programs may only be
80     executed (or only function properly) if run by a user with root permission.
81 cam 1.9 </note>
82    
83     </body>
84     </section>
85     <section>
86     <title>Finding Documentation</title>
87     <body>
88    
89     <p>
90 neysx 1.13 Any documentation that a program might have (other than man pages) is stored in
91 cam 1.9 <path>/usr/doc/gentoolkit-[version]/[program-name]/</path>.
92     </p>
93 cam 1.10
94 cam 1.9 </body>
95     </section>
96 drobbins 1.1 </chapter>
97 cam 1.10
98 drobbins 1.1 <chapter>
99 neysx 1.13 <title>equery</title>
100 cam 1.9 <section>
101     <title>Introduction</title>
102     <body>
103 cam 1.10
104 cam 1.9 <p>
105 swift 1.18 <c>equery</c> is a tool that supports features that <c>epm</c> (and the
106     deprecated <c>qpkg</c>) has but has its own set of features that make it
107     really useful. <c>equery --help</c> gives you the full set of options.
108     <c>equery</c> will eventually replace <c>etcat</c> at some point of time.
109 neysx 1.13 </p>
110    
111     <note>
112     Not all features listed by <c>equery --help</c> have been implemented yet.
113     Those that have not been, are mentioned clearly.
114     </note>
115 cam 1.9
116 neysx 1.13 </body>
117     </section>
118     <section>
119     <title>Finding out Package Sizes</title>
120     <body>
121    
122     <p>
123     Ever been curious to find out how much space a specific package is occupying?
124     Since a package could have its files over a number of directories, the usual
125     <c>du -hc</c> might not give you the correct figure. Not to worry, here comes
126     <c>equery</c> to the rescue!
127     </p>
128    
129     <pre caption="Package Size">
130     # <i>equery size openoffice-bin</i>
131     * app-office/openoffice-bin-1.1.2
132     Total Files : 2908
133     Total Size : 223353.31 KiB
134     </pre>
135    
136     <p>
137     As you can see, <c>equery</c> prints the total space used in kilobytes and also
138     lists the total number of files the package has.
139 cam 1.9 </p>
140 cam 1.10
141 cam 1.9 </body>
142     </section>
143     <section>
144 neysx 1.13 <title>Package-wise list of USE Flags</title>
145 cam 1.10 <body>
146 cam 1.9
147     <p>
148 neysx 1.13 <c>equery</c> can be used to give us information about what USE flags are being
149     used by a specific package. It tells us what our current USE flags are for a
150     package and what USE flags are available for the package.
151 cam 1.9 </p>
152 cam 1.10
153 neysx 1.13 <pre caption="Set and Unset USE Flags">
154     # <i>equery uses ethereal</i>
155     [ Colour Code : set unset ]
156     [ Legend : (U) Col 1 - Current USE flags ]
157     [ : (I) Col 2 - Installed With USE flags ]
158 drobbins 1.1
159 neysx 1.13 U I [ Found these USE variables in : net-analyzer/ethereal-0.10.6 ]
160     - - adns : Adds support for the adns DNS client library
161     + + gtk : Adds support for x11-libs/gtk+ (The GIMP Toolkit)
162     - - ipv6 : Adds support for IP version 6
163     - - snmp : Adds support for the Simple Network Management Protocol if available
164     + + ssl : Adds support for Secure Socket Layer connections
165     + + gtk2 : Use gtk+-2.0.0 over gtk+-1.2 in cases where a program supports both.
166 neysx 1.14 - - debug : Tells configure and the makefiles to build for debugging. Effects vary across packages,
167     but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too
168 cam 1.10 </pre>
169    
170 cam 1.9 <p>
171 neysx 1.13 I have installed ethereal with only the gtk, ssl and gtk2 flags set, but the
172     other USE flags for ethereal are adns, ipv6, snmp and debug. For more
173     information on USE flags, please refer to the <uri
174 neysx 1.17 link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>
175 neysx 1.15 chapter of the <uri link="/doc/en/handbook/">Gentoo Handbook</uri>.
176 cam 1.9 </p>
177    
178 neysx 1.13 </body>
179     </section>
180     <section>
181     <title>Where's the ebuild?</title>
182     <body>
183    
184 cam 1.9 <p>
185 neysx 1.13 We can also find out which ebuild is being used for a specific package using
186     <c>equery</c>. This is done my using the <c>equery which</c> command which
187     displays the full path to the ebuild.
188 cam 1.9 </p>
189 cam 1.10
190 neysx 1.13 <pre caption="Displaying the ebuild path">
191     # <i>equery which cdrtools</i>
192     /usr/portage/app-cdr/cdrtools/cdrtools-2.01_alpha37.ebuild
193     </pre>
194 cam 1.10
195 neysx 1.13 </body>
196     </section>
197     <section>
198     <title>Dependency Graphs</title>
199     <body>
200 drobbins 1.1
201 neysx 1.13 <p>
202     <c>equery</c> is capable of giving us a dependency graph for a specified package.
203     The dependency graph gives a listing of all the packages that have direct and
204     indirect dependencies on the package in question.
205     </p>
206 drobbins 1.1
207 neysx 1.13 <pre caption="Dependency Graph for cdrtools">
208     # <i>equery depgraph cdrtools</i>
209     Displaying dependencies for app-cdr/cdrtools-2.01_alpha37
210     `-- app-cdr/cdrtools-2.01_alpha37
211     `-- sys-libs/glibc-2.3.4.20040808 (virtual/libc)
212     `-- sys-kernel/linux-headers-2.4.22 (virtual/os-headers)
213     `-- sys-apps/baselayout-1.10.4
214     `-- sys-apps/sysvinit-2.85-r1
215     `-- sys-apps/gawk-3.1.3-r1
216     `-- sys-apps/util-linux-2.12-r4
217     `-- sys-apps/sed-4.0.9
218     `-- sys-libs/ncurses-5.4-r4
219     `-- sys-apps/pam-login-3.14
220     `-- sys-libs/pam-0.77-r1
221     `-- sys-libs/cracklib-2.7-r10
222     `-- sys-apps/miscfiles-1.3-r1
223     `-- app-arch/gzip-1.3.5-r1
224     `-- sys-apps/portage-2.0.50-r10
225 cam 1.10 </pre>
226    
227     <p>
228 neysx 1.13 For example, while glibc may be a direct dependency for cdrtools, the linux-headers
229     are an indirect dependency for cdrtools.
230 cam 1.10 </p>
231 drobbins 1.1
232 cam 1.9 </body>
233     </section>
234 drobbins 1.1 </chapter>
235 cam 1.10
236 drobbins 1.1 <chapter>
237 neysx 1.13 <title>euse</title>
238 cam 1.9 <section>
239     <title>Introduction</title>
240     <body>
241 cam 1.10
242 swift 1.19 <warn>
243     <c>euse</c> is currently broken as it does not support cascading profiles well.
244     </warn>
245    
246 cam 1.9 <p>
247 neysx 1.13 <c>euse</c> is a tool to see, set and unset USE flags at various places. For
248     more information on USE flags, please refer to the <uri
249 swift 1.19 link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>.
250     Please see <c>euse -h</c> for complete help and all options.
251 cam 1.9 </p>
252 cam 1.10
253 cam 1.9 </body>
254     </section>
255     <section>
256 swift 1.19 <title>Viewing, Setting and Unsetting USE Flags</title>
257 neysx 1.13 <body>
258    
259     <p>
260 swift 1.19 The <c>euse -a</c> command reads the current active USE flags and displays
261     them.
262 neysx 1.13 </p>
263    
264 swift 1.19 <note>
265     There are 5 &quot;columns&quot; that <c>euse</c> now uses to show whether a
266     flag is set/unset and where all the flag has been set. The columns are as
267     follows -- +/-, set in the Environment, set in make.Conf, set in make.Defaults,
268     and set in make.Globals. The output looks like [+ECDG].
269     </note>
270    
271     <pre caption="Viewing all active USE flags">
272     # <i> euse -a</i>
273     X [+ CD ]
274     aalib [+ ]
275     acpi [+ C ]
276     alsa [+ C ]
277     apache2 [+ C ]
278     apm [+ D ]
279     avi [+ D ]
280     berkdb [+ D ]
281     bitmap-fonts [+ D ]
282     bonobo [+ ]
283     cdr [+ C ]
284     crypt [+ CD ]
285     cscope [+ C ]
286     cups [+ CD ]
287     curl [+ ]
288     emboss [+ D ]
289     encode [+ D ]
290     esd [+ ]
291     ethereal [+ C ]
292     fam [+ ]
293     fbcon [+ C ]
294     font-server [+ D ]
295     foomaticdb [+ D ]
296     fortran [+ D ]
297     gd [+ C ]
298     gdbm [+ D ]
299     gif [+ CD ]
300     gimpprint [+ C ]
301     gnome [+ CD ]
302     gphoto2 [+ ]
303     gpm [+ CD ]
304     gstreamer [+ C ]
305     gtk [+ D ]
306     gtk2 [+ CD ]
307     gtkhtml [+ C ]
308     guile [+ ]
309     imagemagick [+ ]
310     imlib [+ CD ]
311     imlib2 [+ ]
312     innodb [+ ]
313     ipv6 [+ D ]
314     javascript [+ C ]
315     jpeg [+ CD ]
316     kde [+ D ]
317     ldap [+ ]
318     libg++ [+ CD ]
319     libwww [+ CD ]
320     mad [+ CD ]
321     mbox [+ C ]
322     md5sum [+ C ]
323     mikmod [+ CD ]
324     mmx [+ C ]
325     motif [+ CD ]
326     mozilla [+ C ]
327     mp3 [+ ]
328     mpeg [+ CD ]
329     mpeg4 [+ C ]
330     mysql [+ C ]
331     ncurses [+ CD ]
332     nls [+ D ]
333     nvidia [+ C ]
334     odbc [+ ]
335     offensive [+ ]
336     oggvorbis [+ CD ]
337     opengl [+ CD ]
338     oss [+ D ]
339     pam [+ CD ]
340     pdflib [+ CD ]
341     perl [+ CD ]
342     png [+ CD ]
343     python [+ CD ]
344     qt [+ D ]
345     quicktime [+ CD ]
346     readline [+ CD ]
347     ruby [+ ]
348     sdl [+ CD ]
349     slang [+ D ]
350     spell [+ CD ]
351     sse [+ C ]
352     ssl [+ CD ]
353     svga [+ CD ]
354     tcltk [+ C ]
355     tcpd [+ D ]
356     tiff [+ C ]
357     truetype [+ CD ]
358     truetype-fonts [+ D ]
359     type1-fonts [+ D ]
360     usb [+ C ]
361     vanilla [+ C ]
362     x86 [+ C ]
363     xml [+ ]
364     xml2 [+ D ]
365     xmms [+ D ]
366     xosd [+ C ]
367     xv [+ CD ]
368     xvid [+ C ]
369     zlib [+ CD ]
370 neysx 1.13 </pre>
371    
372     <p>
373 swift 1.19 Similarly you can use the <c>euse -a -g</c> command to only view active global
374     USE flags. The <c>euse -a -l</c> command does the same for active local USE
375     flags.<c>-g</c> &amp; <c>-l</c> are suboptions to <c>euse</c> and need an
376     option before them (like <c>-a</c>) to function correctly.
377     </p>
378    
379     <pre caption="Viewing active local USE flags">
380     # <i>euse -a -l</i>
381     bitmap-fonts [+ D ]
382     font-server [+ D ]
383     fortran [+ D ]
384     gimpprint [+ C ]
385     imlib2 [+ ]
386     md5sum [+ C ]
387     mpeg4 [+ C ]
388     nvidia [+ C ]
389     offensive [+ ]
390     truetype [+ CD ]
391     truetype-fonts [+ D ]
392     type1-fonts [+ D ]
393 neysx 1.13 </pre>
394 cam 1.9
395 swift 1.19 <p>
396     We can also use <c>euse</c> to set or unset use flags. The commands used for
397     this are <c>euse -E flagname</c> (enable a flag) and <c>euse -D flagname</c>
398     (disable a flag).
399     </p>
400    
401     <warn>
402     Do not use the <c>euse -E</c> or <c>euse -D</c> commands by themselves (without
403     a flag). It will set/unset ALL USE flags in <c>/etc/make.conf</c>. Although a
404     backup is kept at <path>/etc/make.conf.euse_backup</path>, please be careful
405     while using <c>euse -E</c> or <c>euse -D</c>.
406     </warn>
407    
408     <pre caption="Setting and Unsetting USE flags">
409     <comment>(Enabling a USE Flag)</comment>
410     # <i> euse -E 3dfx</i>
411     /etc/make.conf was modified, a backup copy has been placed at /etc/make.conf.euse_backup
412    
413     <comment>(/etc/make.conf after the command)</comment>
414     USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc ethereal fbcon gd \
415     gif gimpprint gnome gpm gstreamer gtk2 gtkhtml imlib imlib2 \
416     innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
417     mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses nvidia \
418     oggvorbis odbc offensive opengl pam pdflib perl png python \
419     quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
420     vanilla X xml2 xmms xosd xv xvid x86 zlib 3dfx"
421    
422     <comment>(Disabling the USE Flag)</comment>
423     # <i> euse -D 3dfx</i>
424     /etc/make.conf was modified, a backup copy has been placed at /etc/make.conf.euse_backup
425    
426     <comment>(/etc/make.conf after the command)</comment>
427     USE="alsa acpi apache2 -arts cups cdr crypt cscope -doc ethereal fbcon gd \
428     gif gimpprint gnome gpm gstreamer gtk2 gtkhtml imlib imlib2 \
429     innodb -java javascript jpeg libg++ libwww mad mbox md5sum \
430     mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses nvidia \
431     oggvorbis odbc offensive opengl pam pdflib perl png python \
432     quicktime readline sdl spell sse ssl svga tcltk tiff truetype usb \
433     vanilla X xml2 xmms xosd xv xvid x86 zlib -3dfx"
434 cam 1.10 </pre>
435    
436 cam 1.9 <note>
437 neysx 1.13 <c>euse</c> does not physically remove the flag from make.conf. It just adds a
438     - (minus) before the flag to unset it. You may have to manually clean up your
439     make.conf to avoid unwanted variables.
440 cam 1.9 </note>
441 cam 1.10
442 cam 1.9 </body>
443     </section>
444 drobbins 1.1 </chapter>
445    
446     <chapter>
447 neysx 1.13 <title>Other tools</title>
448 cam 1.9 <section>
449 neysx 1.13 <title>revdep-rebuild</title>
450 cam 1.9 <body>
451 cam 1.10
452 cam 1.9 <p>
453 neysx 1.13 This tool is Gentoo's Reverse Dependency rebuilder. It will scan your installed
454     ebuilds to find packages that have become broken as a result of an upgrade of a
455     package they depend on. It can emerge those packages for you but it can also
456     happen that a given package does not work anymore with the currently installed
457 neysx 1.16 dependencies, in which case you should upgrade the broken package to a more
458 neysx 1.13 recent version. revdep-rebuild will pass flags to emerge which lets you use the
459     <c>--pretend</c> flag to see what is going to be emerged again before you go any
460     further.
461 cam 1.9 </p>
462    
463 neysx 1.13 <pre caption="Running revdep-rebuild in pretend mode">
464     # <i>revdep-rebuild -p</i>
465    
466     Checking reverse dependencies...
467     Packages containing binaries and libraries broken by any package update,
468     will be recompiled.
469 cam 1.10
470 neysx 1.13 Collecting system binaries and libraries... done.
471     (/root/.revdep-rebuild.1_files)
472 cam 1.10
473 neysx 1.13 Collecting complete LD_LIBRARY_PATH... done.
474     (/root/.revdep-rebuild.2_ldpath)
475 cam 1.10
476 neysx 1.13 Checking dynamic linking consistency...
477     broken /usr/lib/ao/plugins-2/libarts.so (requires libartsc.so.0)
478     broken /usr/lib/kde3/libkpresenterpart.so (requires libartskde.so.1 libqtmcop.so.1
479     libsoundserver_idl.so.1 libkmedia2_idl.so.1 libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
480     broken /usr/lib/ruby/site_ruby/1.8/i686-linux/fox.so (requires libFOX-1.0.so.0)
481     broken /usr/lib/xine/plugins/1.0.0/xineplug_ao_out_arts.so (requires libartsc.so.0)
482     broken /usr/lib/perl5/vendor_perl/5.8.0/i686-linux/auto/SDL_perl/SDL_perl.so (requires libSDL_gfx.so.0)
483     broken /usr/lib/libloudmouth-1.so.0.0.0 (requires libgnutls.so.10)
484     broken /usr/bin/k3b (requires libartskde.so.1 libqtmcop.so.1 libsoundserver_idl.so.1 libkmedia2_idl.so.1
485     libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
486     broken /usr/bin/lua (requires libhistory.so.4)
487     broken /usr/bin/lyx (requires libAiksaurus-1.0.so.0)
488     broken /usr/bin/luac (requires libhistory.so.4)
489     broken /usr/bin/avidemux2 (requires libartsc.so.0)
490     broken /usr/bin/pptout (requires libxml++-0.1.so.11)
491     broken /usr/bin/xml2ps (requires libxml++-0.1.so.11)
492     done.
493     (/root/.revdep-rebuild.3_rebuild)
494 cam 1.9
495 neysx 1.13 Assigning files to ebuilds... done.
496     (/root/.revdep-rebuild.4_ebuilds)
497 cam 1.10
498 neysx 1.13 Evaluating package order... done.
499     (/root/.revdep-rebuild.5_order)
500 cam 1.10
501 neysx 1.13 All prepared. Starting rebuild...
502     emerge --oneshot --nodeps -p =app-cdr/k3b-0.11.14 =app-office/koffice-1.3.2 =app-office/lyx-1.3.4 \
503     =app-office/passepartout-0.2 =dev-lang/lua-5.0.2 =dev-ruby/fxruby-1.0.29 =media-libs/libao-0.8.5 \
504     =media-libs/xine-lib-1_rc5-r3 =media-video/avidemux-2.0.26 =net-libs/loudmouth-0.16
505 cam 1.10
506 neysx 1.13 These are the packages that I would merge, in order:
507 drobbins 1.1
508 neysx 1.13 Calculating dependencies ...done!
509     [ebuild R ] app-cdr/k3b-0.11.14
510     [ebuild R ] app-office/koffice-1.3.2
511     [ebuild R ] app-office/lyx-1.3.4
512     [ebuild R ] app-office/passepartout-0.2
513     [ebuild R ] dev-lang/lua-5.0.2
514     [ebuild R ] dev-ruby/fxruby-1.0.29
515     [ebuild R ] media-libs/libao-0.8.5
516     [ebuild R ] media-libs/xine-lib-1_rc5-r3
517     [ebuild R ] media-video/avidemux-2.0.26
518     [ebuild R ] net-libs/loudmouth-0.16
519 cam 1.10
520 neysx 1.13 Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
521     </pre>
522 cam 1.10
523     <p>
524 neysx 1.13 If you need to rebuild some packages, you may run <c>revdep-rebuild</c> without
525     the <c>-p</c> flag and the listed packages will be emerged again.
526 cam 1.9 </p>
527    
528     </body>
529     </section>
530 cam 1.10
531 cam 1.9 <section>
532 neysx 1.13 <title>glsa-check</title>
533 cam 1.9 <body>
534 cam 1.10
535     <p>
536 neysx 1.13 <c>glsa-check</c> is mainly a test tool that keeps track of the various GLSA's
537     (Gentoo Linux Security Advisory) and will eventually be integrated into
538     <c>emerge</c> and <c>equery</c>. For more information, please visit the <uri
539 neysx 1.15 link="/proj/en/portage/glsa-integration.xml">Portage GLSA Integration
540     Page</uri>.
541 swift 1.19 </p>
542 cam 1.10
543 cam 1.9 </body>
544     </section>
545 drobbins 1.1 </chapter>
546 neysx 1.13
547 vapier 1.11 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20