/[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.18 - (hide annotations) (download) (as text)
Mon Dec 27 20:32:02 2004 UTC (9 years, 6 months ago) by swift
Branch: MAIN
Changes since 1.17: +7 -282 lines
File MIME type: application/xml
#75802 - qpkg is deprecated, unmaintained and unsupported; removing chapter from guide (patch by so|gentoo)

1 vapier 1.11 <?xml version="1.0" encoding="UTF-8"?>
2 swift 1.18 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.17 2004/10/24 22:48:37 neysx 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.18 <version>1.5</version>
32     <date>2004-12-27</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 cam 1.9 <p>
243 neysx 1.13 <c>euse</c> is a tool to see, set and unset USE flags at various places. For
244     more information on USE flags, please refer to the <uri
245 neysx 1.17 link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>.
246 neysx 1.15 <c>euse -i</c> lists all USE flags.
247 cam 1.9 </p>
248 cam 1.10
249 cam 1.9 </body>
250     </section>
251     <section>
252 neysx 1.13 <title>Reading, Setting and Unsetting USE Flags</title>
253     <body>
254    
255     <p>
256     The <c>euse --conf</c> command reads the current USE flags set/unset from
257     make.conf.
258     </p>
259    
260     <pre caption="Viewing Current flags from make.conf">
261     # <i> euse --conf</i>
262     USE setting in make.conf:
263     alsa acpi apache2 cups cdr crypt cscope -doc ethereal fbcon gif gimpprint gnome
264     gpm gstreamer gtk2 gtkhtml imlib imlib2 innodb -java javascript jpeg libg++ libwww
265     mad md5sum mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses oggvorbis odbc
266     offensive opengl pam pdflib perl png python quicktime readline sdl spell sse ssl
267     svga tcltk tiff truetype usb vanilla X xml2 xmms xosd xv xvid x86 zlib
268     </pre>
269    
270     <p>
271     Setting a USE flag is done with the help of the <c>euse --enable</c> command
272     which requires a mandatory flag name argument. If the flag is not already set,
273     <c>euse</c> appends the USE flag to the end of the current USE flag settings.
274     In case the USE flag is invalid, there is a warning. Removing a USE flag is
275     done using the <c>euse --disable</c> command. If an invalid flag is specified,
276     the user is warned suitably. If the flag is present, it is unset with a -flag
277     in make.conf
278     </p>
279    
280     <pre caption="Setting a USE Flag, 3dfx">
281     # <i>euse --enable 3dfx</i>
282     USE setting in make.conf after enabling:
283     alsa acpi apache2 cups cdr crypt cscope -doc ethereal fbcon gif gimpprint gnome
284     gpm gstreamer gtk2 gtkhtml imlib imlib2 innodb -java javascript jpeg libg++ libwww
285     mad md5sum mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses oggvorbis odbc
286     offensive opengl pam pdflib perl png python quicktime readline sdl spell sse ssl
287     svga tcltk tiff truetype usb vanilla X xml2 xmms xosd xv xvid x86 zlib 3dfx
288     </pre>
289 cam 1.9
290 neysx 1.13 <pre caption="Unsetting a USE Flag, 3dfx">
291     # <i>euse --disable 3dfx</i>
292     USE setting in make.conf after disabling:
293     alsa acpi apache2 cups cdr crypt cscope -doc ethereal fbcon gif gimpprint gnome
294     gpm gstreamer gtk2 gtkhtml imlib imlib2 innodb -java javascript jpeg libg++ libwww
295     mad md5sum mikmod mmx motif mozilla mpeg mpeg4 mysql ncurses oggvorbis odbc
296     offensive opengl pam pdflib perl png python quicktime readline sdl spell sse ssl
297     svga tcltk tiff truetype usb vanilla X xml2 xmms xosd xv xvid x86 zlib -3dfx
298 cam 1.10 </pre>
299    
300 cam 1.9 <note>
301 neysx 1.13 <c>euse</c> does not physically remove the flag from make.conf. It just adds a
302     - (minus) before the flag to unset it. You may have to manually clean up your
303     make.conf to avoid unwanted variables.
304 cam 1.9 </note>
305 cam 1.10
306 cam 1.9 </body>
307     </section>
308 drobbins 1.1 </chapter>
309    
310     <chapter>
311 neysx 1.13 <title>Other tools</title>
312 cam 1.9 <section>
313 neysx 1.13 <title>revdep-rebuild</title>
314 cam 1.9 <body>
315 cam 1.10
316 cam 1.9 <p>
317 neysx 1.13 This tool is Gentoo's Reverse Dependency rebuilder. It will scan your installed
318     ebuilds to find packages that have become broken as a result of an upgrade of a
319     package they depend on. It can emerge those packages for you but it can also
320     happen that a given package does not work anymore with the currently installed
321 neysx 1.16 dependencies, in which case you should upgrade the broken package to a more
322 neysx 1.13 recent version. revdep-rebuild will pass flags to emerge which lets you use the
323     <c>--pretend</c> flag to see what is going to be emerged again before you go any
324     further.
325 cam 1.9 </p>
326    
327 neysx 1.13 <pre caption="Running revdep-rebuild in pretend mode">
328     # <i>revdep-rebuild -p</i>
329    
330     Checking reverse dependencies...
331     Packages containing binaries and libraries broken by any package update,
332     will be recompiled.
333 cam 1.10
334 neysx 1.13 Collecting system binaries and libraries... done.
335     (/root/.revdep-rebuild.1_files)
336 cam 1.10
337 neysx 1.13 Collecting complete LD_LIBRARY_PATH... done.
338     (/root/.revdep-rebuild.2_ldpath)
339 cam 1.10
340 neysx 1.13 Checking dynamic linking consistency...
341     broken /usr/lib/ao/plugins-2/libarts.so (requires libartsc.so.0)
342     broken /usr/lib/kde3/libkpresenterpart.so (requires libartskde.so.1 libqtmcop.so.1
343     libsoundserver_idl.so.1 libkmedia2_idl.so.1 libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
344     broken /usr/lib/ruby/site_ruby/1.8/i686-linux/fox.so (requires libFOX-1.0.so.0)
345     broken /usr/lib/xine/plugins/1.0.0/xineplug_ao_out_arts.so (requires libartsc.so.0)
346     broken /usr/lib/perl5/vendor_perl/5.8.0/i686-linux/auto/SDL_perl/SDL_perl.so (requires libSDL_gfx.so.0)
347     broken /usr/lib/libloudmouth-1.so.0.0.0 (requires libgnutls.so.10)
348     broken /usr/bin/k3b (requires libartskde.so.1 libqtmcop.so.1 libsoundserver_idl.so.1 libkmedia2_idl.so.1
349     libartsflow.so.1 libartsflow_idl.so.1 libmcop.so.1)
350     broken /usr/bin/lua (requires libhistory.so.4)
351     broken /usr/bin/lyx (requires libAiksaurus-1.0.so.0)
352     broken /usr/bin/luac (requires libhistory.so.4)
353     broken /usr/bin/avidemux2 (requires libartsc.so.0)
354     broken /usr/bin/pptout (requires libxml++-0.1.so.11)
355     broken /usr/bin/xml2ps (requires libxml++-0.1.so.11)
356     done.
357     (/root/.revdep-rebuild.3_rebuild)
358 cam 1.9
359 neysx 1.13 Assigning files to ebuilds... done.
360     (/root/.revdep-rebuild.4_ebuilds)
361 cam 1.10
362 neysx 1.13 Evaluating package order... done.
363     (/root/.revdep-rebuild.5_order)
364 cam 1.10
365 neysx 1.13 All prepared. Starting rebuild...
366     emerge --oneshot --nodeps -p =app-cdr/k3b-0.11.14 =app-office/koffice-1.3.2 =app-office/lyx-1.3.4 \
367     =app-office/passepartout-0.2 =dev-lang/lua-5.0.2 =dev-ruby/fxruby-1.0.29 =media-libs/libao-0.8.5 \
368     =media-libs/xine-lib-1_rc5-r3 =media-video/avidemux-2.0.26 =net-libs/loudmouth-0.16
369 cam 1.10
370 neysx 1.13 These are the packages that I would merge, in order:
371 drobbins 1.1
372 neysx 1.13 Calculating dependencies ...done!
373     [ebuild R ] app-cdr/k3b-0.11.14
374     [ebuild R ] app-office/koffice-1.3.2
375     [ebuild R ] app-office/lyx-1.3.4
376     [ebuild R ] app-office/passepartout-0.2
377     [ebuild R ] dev-lang/lua-5.0.2
378     [ebuild R ] dev-ruby/fxruby-1.0.29
379     [ebuild R ] media-libs/libao-0.8.5
380     [ebuild R ] media-libs/xine-lib-1_rc5-r3
381     [ebuild R ] media-video/avidemux-2.0.26
382     [ebuild R ] net-libs/loudmouth-0.16
383 cam 1.10
384 neysx 1.13 Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
385     </pre>
386 cam 1.10
387     <p>
388 neysx 1.13 If you need to rebuild some packages, you may run <c>revdep-rebuild</c> without
389     the <c>-p</c> flag and the listed packages will be emerged again.
390 cam 1.9 </p>
391    
392     </body>
393     </section>
394 cam 1.10
395 cam 1.9 <section>
396 neysx 1.13 <title>glsa-check</title>
397 cam 1.9 <body>
398 cam 1.10
399     <p>
400 neysx 1.13 <c>glsa-check</c> is mainly a test tool that keeps track of the various GLSA's
401     (Gentoo Linux Security Advisory) and will eventually be integrated into
402     <c>emerge</c> and <c>equery</c>. For more information, please visit the <uri
403 neysx 1.15 link="/proj/en/portage/glsa-integration.xml">Portage GLSA Integration
404     Page</uri>.
405 neysx 1.13 </p>
406 cam 1.10
407 cam 1.9 </body>
408     </section>
409 drobbins 1.1 </chapter>
410 neysx 1.13
411 vapier 1.11 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20