/[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 - (show annotations) (download) (as text)
Mon Dec 27 20:32:02 2004 UTC (9 years, 10 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 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoolkit.xml,v 1.17 2004/10/24 22:48:37 neysx Exp $ -->
3 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
5 <guide link="/doc/en/gentoolkit.xml">
6 <title>Gentoolkit</title>
7
8 <author title="Author">
9 <mail link="mbutcher@aleph-null.tv">Matt Butcher</mail>
10 </author>
11 <author title="Editor">
12 <!-- zhen@gentoo.org -->John P. Davis
13 </author>
14 <author title="Editor">
15 <mail link="erwin@gentoo.org">Erwin</mail>
16 </author>
17 <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
24 <!-- Licensed under GFDL -->
25
26 <abstract>
27 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 </abstract>
30
31 <version>1.5</version>
32 <date>2004-12-27</date>
33
34 <chapter>
35 <title>Introduction</title>
36 <section>
37 <title>What is Gentoolkit?</title>
38 <body>
39
40 <p>
41 Gentoo is a unique distribution and presents some complexities that simply
42 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 the Gentoo project and are included in the package
46 <c>app-portage/gentoolkit</c>.
47 </p>
48
49 <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 <p>
57 Gentoolkit contains a whole bunch of useful tools to help manage your packages
58 and keep track of what is going on in your system. Most users --&nbsp;particularly
59 those who update systems often&nbsp;-- will benefit from having gentoolkit
60 installed.
61 </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 <pre caption="Getting gentoolkit">
74 # <i>emerge gentoolkit</i>
75 </pre>
76
77 <note>
78 Many of the tools in gentoolkit reveal important information about your system
79 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 </note>
82
83 </body>
84 </section>
85 <section>
86 <title>Finding Documentation</title>
87 <body>
88
89 <p>
90 Any documentation that a program might have (other than man pages) is stored in
91 <path>/usr/doc/gentoolkit-[version]/[program-name]/</path>.
92 </p>
93
94 </body>
95 </section>
96 </chapter>
97
98 <chapter>
99 <title>equery</title>
100 <section>
101 <title>Introduction</title>
102 <body>
103
104 <p>
105 <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 </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
116 </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 </p>
140
141 </body>
142 </section>
143 <section>
144 <title>Package-wise list of USE Flags</title>
145 <body>
146
147 <p>
148 <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 </p>
152
153 <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
159 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 - - 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 </pre>
169
170 <p>
171 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 link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>
175 chapter of the <uri link="/doc/en/handbook/">Gentoo Handbook</uri>.
176 </p>
177
178 </body>
179 </section>
180 <section>
181 <title>Where's the ebuild?</title>
182 <body>
183
184 <p>
185 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 </p>
189
190 <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
195 </body>
196 </section>
197 <section>
198 <title>Dependency Graphs</title>
199 <body>
200
201 <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
207 <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 </pre>
226
227 <p>
228 For example, while glibc may be a direct dependency for cdrtools, the linux-headers
229 are an indirect dependency for cdrtools.
230 </p>
231
232 </body>
233 </section>
234 </chapter>
235
236 <chapter>
237 <title>euse</title>
238 <section>
239 <title>Introduction</title>
240 <body>
241
242 <p>
243 <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 link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">USE Flags</uri>.
246 <c>euse -i</c> lists all USE flags.
247 </p>
248
249 </body>
250 </section>
251 <section>
252 <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
290 <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 </pre>
299
300 <note>
301 <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 </note>
305
306 </body>
307 </section>
308 </chapter>
309
310 <chapter>
311 <title>Other tools</title>
312 <section>
313 <title>revdep-rebuild</title>
314 <body>
315
316 <p>
317 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 dependencies, in which case you should upgrade the broken package to a more
322 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 </p>
326
327 <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
334 Collecting system binaries and libraries... done.
335 (/root/.revdep-rebuild.1_files)
336
337 Collecting complete LD_LIBRARY_PATH... done.
338 (/root/.revdep-rebuild.2_ldpath)
339
340 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
359 Assigning files to ebuilds... done.
360 (/root/.revdep-rebuild.4_ebuilds)
361
362 Evaluating package order... done.
363 (/root/.revdep-rebuild.5_order)
364
365 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
370 These are the packages that I would merge, in order:
371
372 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
384 Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.
385 </pre>
386
387 <p>
388 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 </p>
391
392 </body>
393 </section>
394
395 <section>
396 <title>glsa-check</title>
397 <body>
398
399 <p>
400 <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 link="/proj/en/portage/glsa-integration.xml">Portage GLSA Integration
404 Page</uri>.
405 </p>
406
407 </body>
408 </section>
409 </chapter>
410
411 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20