xref: /titanic_52/usr/src/tools/depcheck/examples.txt (revision 263f549e5da8b32c4922f586afb365b8ae388a6c)
1
2CDDL HEADER START
3
4The contents of this file are subject to the terms of the
5Common Development and Distribution License (the "License").
6You may not use this file except in compliance with the License.
7
8You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9or http://www.opensolaris.org/os/licensing.
10See the License for the specific language governing permissions
11and limitations under the License.
12
13When distributing Covered Code, include this CDDL HEADER in each
14file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15If applicable, add the following below this CDDL HEADER, with the
16fields enclosed by brackets "[]" replaced with your own identifying
17information: Portions Copyright [yyyy] [name of copyright owner]
18
19CDDL HEADER END
20
21Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22Use is subject to license terms.
23
24The first step in doing any kind of dependency checking - setting up the
25database.
26
27In this example, I use my SampleLinks file to help resolve some defficiencies
28in the pkg database.  The "OVERRIDDEN" line refer to information that was
29provided by the SampleLinks file.  The "CANNOT FIND" file refers to files
30which are links but cannot be resolved to an executable.  The "README" file
31has a more in-depth explanation.
32======================================================================
33
34
35euphoria>./make_pkg_db -dbdir DBM -ifiles SampleLinks
36...initializing the databases
37Creating directory DBM
38...making the FTYPE MODE and PKGS databases
39...opening SampleLinks
40...opening /var/sadm/install/contents
41...OVERRIDDEN: /usr/bin/appletviewer=../java/bin/appletviewer s none SUNWj2dev.2
42...OVERRIDDEN: /usr/bin/extcheck=../java/bin/extcheck s none SUNWj2dev.2
43...OVERRIDDEN: /usr/bin/jar=../java/bin/jar s none SUNWj2dev.2
44...OVERRIDDEN: /usr/bin/jarsigner=../java/bin/jarsigner s none SUNWj2dev.2
45...OVERRIDDEN: /usr/bin/java=../java/bin/java s none SUNWj2rt.2
46...OVERRIDDEN: /usr/bin/javac=../java/bin/javac s none SUNWj2dev.2
47...OVERRIDDEN: /usr/bin/javadoc=../java/bin/javadoc s none SUNWj2dev.2
48...OVERRIDDEN: /usr/bin/javah=../java/bin/javah s none SUNWj2dev.2
49...OVERRIDDEN: /usr/bin/javald=../java/bin/javald s none SUNWj2dev.2
50...OVERRIDDEN: /usr/bin/javap=../java/bin/javap s none SUNWj2dev.2
51...OVERRIDDEN: /usr/bin/jdb=../java/bin/jdb s none SUNWj2dev.2
52...OVERRIDDEN: /usr/bin/keytool=../java/bin/keytool s none SUNWj2rt.2
53...OVERRIDDEN: /usr/bin/native2ascii=../java/bin/native2ascii s none SUNWj2dev.2
54...OVERRIDDEN: /usr/bin/oldjava=../java/bin/oldjava s none SUNWj2dev.2
55...OVERRIDDEN: /usr/bin/policytool=../java/bin/policytool s none SUNWj2rt.2
56...OVERRIDDEN: /usr/bin/rmic=../java/bin/rmic s none SUNWj2dev.2
57...OVERRIDDEN: /usr/bin/rmid=../java/bin/rmid s none SUNWj2rt.2
58...OVERRIDDEN: /usr/bin/rmiregistry=../java/bin/rmiregistry s none SUNWj2rt.2
59...OVERRIDDEN: /usr/bin/serialver=../java/bin/serialver s none SUNWj2dev.2
60...OVERRIDDEN: /usr/bin/tnameserv=../java/bin/tnameserv s none SUNWj2rt.2
61...OVERRIDDEN: /usr/include/Mrm=../dt/include/Mrm s none SUNWxwhl
62...OVERRIDDEN: /usr/include/X11=../openwin/include/X11 s none SUNWxwhl
63...OVERRIDDEN: /usr/include/Xm=../dt/include/Xm s none SUNWxwhl
64...OVERRIDDEN: /usr/include/kcms=../openwin/include/kcms s none SUNWxwhl
65...OVERRIDDEN: /usr/include/uil=../dt/include/uil s none SUNWxwhl
66...OVERRIDDEN: /usr/include/xil=../openwin/include/xil s none SUNWxwhl
67...making the ABSLINK database
68***CANNOT FIND ABSOLUTE PATH /usr/dt/config/C/bookmarks FOR ENTRY: /usr/dt/config/C/wsmenu/Links/Personal_Bookmarks=../../bookmarks
69***CANNOT FIND ABSOLUTE PATH /usr/dt/config/en_US.UTF-8/bookmarks FOR ENTRY: /usr/dt/config/en_US.UTF-8/wsmenu/Links/Personal_Bookmarks=../../bookmarks
70***CANNOT FIND ABSOLUTE PATH /usr/lib/locale/fr/LC_MESSAGES FOR ENTRY: /usr/lib/locale/fr_CA.ISO8859-1/LC_MESSAGES=../fr/LC_MESSAGES
71...DONE
72
73The default dependency check on /usr/bin/sh.  This analysis uses
74"/usr/bin/stings" and "/usr/bin/ldd" to glean information about
75file being analysed.
76
77The default format of a dependency is "filename:pkgname".
78=======================================================================
79
80euphoria>./get_depend_info -dbdir DBM /usr/bin/sh
81
82
83Analyzing /usr/bin/sh:
84/usr/lib/libgen.so.1:SUNWcsl
85/usr/lib/libsecdb.so.1:SUNWcsl
86/usr/lib/libnsl.so.1:SUNWcsl
87/usr/lib/libc.so.1:SUNWcsl
88/usr/lib/libcmd.so.1:SUNWcsl
89/usr/lib/libdl.so.1:SUNWcsl
90/usr/lib/libmp.so.2:SUNWcsl
91/bin:SUNWcsr
92/dev/null:SUNWcsd
93/etc/profile:SUNWcsr
94/usr/5bin:SUNWscpu
95/usr/bin/pfexec:SUNWcsu
96
97A conservative analysis of the executable which only yields guaranteed
98dependencies..  This analysis does not use "/usr/bin/strings" and only
99uses "/usr/bin/ldd".
100===================================================================
101
102euphoria>get_depend_info -dbdir DBM -cons /usr/bin/sh
103
104
105Analyzing /usr/bin/sh:
106/usr/lib/libgen.so.1:SUNWcsl
107/usr/lib/libsecdb.so.1:SUNWcsl
108/usr/lib/libnsl.so.1:SUNWcsl
109/usr/lib/libc.so.1:SUNWcsl
110/usr/lib/libcmd.so.1:SUNWcsl
111/usr/lib/libdl.so.1:SUNWcsl
112/usr/lib/libmp.so.2:SUNWcsl
113
114A pkg level anaysis on the executable.  In this format, only pkg dependencies
115are listed and file dependencies are dropped from the output.
116
117======================================================================
118euphoria>get_depend_info -dbdir DBM -p /usr/bin/ls
119
120
121Analyzing /usr/bin/ls:
122P SUNWcsl       Core Solaris, (Shared Libs)
123The default dependency check on /usr/bin/sh.  This analysis uses
124"/usr/bin/stings" and "/usr/bin/ldd" to glean information about
125file being analysed.
126
127The default format of a dependency is "filename:pkgname".
128=======================================================================
129
130euphoria>./get_depend_info -dbdir DBM /usr/bin/sh
131
132
133Analyzing /usr/bin/sh:
134/usr/lib/libgen.so.1:SUNWcsl
135/usr/lib/libsecdb.so.1:SUNWcsl
136/usr/lib/libnsl.so.1:SUNWcsl
137/usr/lib/libc.so.1:SUNWcsl
138/usr/lib/libcmd.so.1:SUNWcsl
139/usr/lib/libdl.so.1:SUNWcsl
140/usr/lib/libmp.so.2:SUNWcsl
141/bin:SUNWcsr
142/dev/null:SUNWcsd
143/etc/profile:SUNWcsr
144/usr/5bin:SUNWscpu
145/usr/bin/pfexec:SUNWcsu
146
147This is a dependency check on a pkg.  All the files within the pkg are analysed
148and a report is generated.  Note at the end of the listing is a summarized
149listing of pkg dependencies.
150
151=============================================================================
152euphoria>get_depend_info -dbdir DBM -pkg SUNWnisu
153
154
155Analyzing /usr:
156Input file is a directory
157
158
159Analyzing /usr/bin:
160Input file is a directory
161
162
163Analyzing /usr/bin/aliasadm:
164/usr/lib/libsocket.so.1:SUNWcsl
165/usr/lib/libnsl.so.1:SUNWcsl
166/usr/lib/libc.so.1:SUNWcsl
167/usr/lib/libdl.so.1:SUNWcsl
168/usr/lib/libmp.so.2:SUNWcsl
169/usr/bin/vi:SUNWcsu
170
171
172Analyzing /usr/bin/chkey:
173/usr/lib/librpcsvc.so.1:SUNWcsl
174/usr/lib/libnsl.so.1:SUNWcsl
175/usr/lib/libmp.so.2:SUNWcsl
176/usr/lib/libsldap.so.1:SUNWcsl
177/usr/lib/libc.so.1:SUNWcsl
178/usr/lib/libdl.so.1:SUNWcsl
179/usr/lib/libldap.so.4:SUNWcsl
180/usr/lib/libdoor.so.1:SUNWcsl
181/usr/lib/libsocket.so.1:SUNWcsl
182/usr/lib/libresolv.so.2:SUNWcsl
183/etc/nsswitch.conf:SUNWcsr
184/etc/publickey:SUNWnisr
185/usr/ccs/bin/make:SUNWsprot
186
187
188Analyzing /usr/bin/getent:
189/usr/lib/libsocket.so.1:SUNWcsl
190/usr/lib/libnsl.so.1:SUNWcsl
191/usr/lib/libc.so.1:SUNWcsl
192/usr/lib/libdl.so.1:SUNWcsl
193/usr/lib/libmp.so.2:SUNWcsl
194
195
196Analyzing /usr/bin/ldaplist:
197/usr/lib/libldap.so.4:SUNWcsl
198/usr/lib/libsocket.so.1:SUNWcsl
199/usr/lib/libsldap.so.1:SUNWcsl
200/usr/lib/libc.so.1:SUNWcsl
201/usr/lib/libnsl.so.1:SUNWcsl
202/usr/lib/libresolv.so.2:SUNWcsl
203/usr/lib/libdoor.so.1:SUNWcsl
204/usr/lib/libdl.so.1:SUNWcsl
205/usr/lib/libmp.so.2:SUNWcsl
206
207
208Analyzing /usr/bin/newaliases:
209/usr/lib/libresolv.so.2:SUNWcsl
210/usr/lib/libsocket.so.1:SUNWcsl
211/usr/lib/libnsl.so.1:SUNWcsl
212/usr/lib/libldap.so.4:SUNWcsl
213/usr/lib/libsldap.so.1:SUNWcsl
214/usr/lib/libc.so.1:SUNWcsl
215/usr/lib/libdl.so.1:SUNWcsl
216/usr/lib/libmp.so.2:SUNWcsl
217/usr/lib/libdoor.so.1:SUNWcsl
218/dev/ksyms:SUNWcsd
219/dev/null:SUNWcsd
220/etc/hosts:SUNWcsr
221/etc/mail/sendmail.cf:SUNWsndmr
222/etc/mnttab:SUNWcsr
223/usr/tmp:SUNWcsu
224
225
226Analyzing /usr/bin/ypcat:
227/usr/lib/libnsl.so.1:SUNWcsl
228/usr/lib/libdl.so.1:SUNWcsl
229/usr/lib/libc.so.1:SUNWcsl
230/usr/lib/libmp.so.2:SUNWcsl
231/var/yp/nicknames:SUNWnisr
232
233
234Analyzing /usr/bin/ypmatch:
235/usr/lib/libnsl.so.1:SUNWcsl
236/usr/lib/libdl.so.1:SUNWcsl
237/usr/lib/libc.so.1:SUNWcsl
238/usr/lib/libmp.so.2:SUNWcsl
239/var/yp/nicknames:SUNWnisr
240
241
242Analyzing /usr/bin/ypwhich:
243/usr/lib/libnsl.so.1:SUNWcsl
244/usr/lib/libdl.so.1:SUNWcsl
245/usr/lib/libc.so.1:SUNWcsl
246/usr/lib/libmp.so.2:SUNWcsl
247/var/yp/nicknames:SUNWnisr
248
249
250Analyzing /usr/lib:
251Input file is a directory
252
253
254Analyzing /usr/lib/ldap:
255Input file is a directory
256
257
258Analyzing /usr/lib/ldap/ldap_cachemgr:
259/usr/lib/libdoor.so.1:SUNWcsl
260/usr/lib/libnsl.so.1:SUNWcsl
261/usr/lib/libsldap.so.1:SUNWcsl
262/usr/lib/libthread.so.1:SUNWcsl
263/usr/lib/libc.so.1:SUNWcsl
264/usr/lib/libdl.so.1:SUNWcsl
265/usr/lib/libmp.so.2:SUNWcsl
266/usr/lib/libldap.so.4:SUNWcsl
267/usr/lib/libsocket.so.1:SUNWcsl
268/usr/lib/libresolv.so.2:SUNWcsl
269/dev/null:SUNWcsd
270
271
272Analyzing /usr/lib/libnisdb.so:
273/usr/lib/libnsl.so.1:SUNWcsl
274/usr/lib/libdl.so.1:SUNWcsl
275/usr/lib/libc.so.1:SUNWcsl
276/usr/lib/libmp.so.2:SUNWcsl
277
278
279Analyzing /usr/lib/libnisdb.so.2:
280/usr/lib/libnsl.so.1:SUNWcsl
281/usr/lib/libdl.so.1:SUNWcsl
282/usr/lib/libc.so.1:SUNWcsl
283/usr/lib/libmp.so.2:SUNWcsl
284
285
286Analyzing /usr/lib/netsvc:
287Input file is a directory
288
289
290Analyzing /usr/lib/netsvc/nis:
291Input file is a directory
292
293
294Analyzing /usr/lib/netsvc/yp:
295Input file is a directory
296
297
298Analyzing /usr/lib/netsvc/yp/ypbind:
299/usr/lib/libnsl.so.1:SUNWcsl
300/usr/lib/libdl.so.1:SUNWcsl
301/usr/lib/libc.so.1:SUNWcsl
302/usr/lib/libmp.so.2:SUNWcsl
303/dev/null:SUNWcsd
304/etc/hosts:SUNWcsr
305/etc/inet/ipnodes:SUNWcsr
306
307
308Analyzing /usr/lib/netsvc/yp/ypstart:
309/dev/null:SUNWcsd
310/usr/bin/ps:SUNWcsu
311/usr/sbin/fnsypd:SUNWfns
312/usr/sbin/makedbm:SUNWcsu
313/var/yp/Makefile:SUNWypr
314/var/yp/updaters:SUNWypr
315
316
317Analyzing /usr/lib/netsvc/yp/ypstop:
318/usr/bin/ps:SUNWcsu
319
320
321Analyzing /usr/lib/netsvc/yp/ypxfr:
322/usr/lib/libnsl.so.1:SUNWcsl
323/usr/lib/libdl.so.1:SUNWcsl
324/usr/lib/libc.so.1:SUNWcsl
325/usr/lib/libmp.so.2:SUNWcsl
326/dev/null:SUNWcsd
327
328
329Analyzing /usr/sbin:
330Input file is a directory
331
332
333Analyzing /usr/sbin/gettable:
334/usr/lib/libsocket.so.1:SUNWcsl
335/usr/lib/libnsl.so.1:SUNWcsl
336/usr/lib/libdl.so.1:SUNWcsl
337/usr/lib/libc.so.1:SUNWcsl
338/usr/lib/libmp.so.2:SUNWcsl
339
340
341Analyzing /usr/sbin/htable:
342/usr/lib/libsocket.so.1:SUNWcsl
343/usr/lib/libnsl.so.1:SUNWcsl
344/usr/lib/libc.so.1:SUNWcsl
345/usr/lib/libdl.so.1:SUNWcsl
346/usr/lib/libmp.so.2:SUNWcsl
347
348
349Analyzing /usr/sbin/ldap_gen_profile:
350/usr/lib/libldap.so.4:SUNWcsl
351/usr/lib/libsocket.so.1:SUNWcsl
352/usr/lib/libsldap.so.1:SUNWcsl
353/usr/lib/libc.so.1:SUNWcsl
354/usr/lib/libnsl.so.1:SUNWcsl
355/usr/lib/libresolv.so.2:SUNWcsl
356/usr/lib/libdoor.so.1:SUNWcsl
357/usr/lib/libdl.so.1:SUNWcsl
358/usr/lib/libmp.so.2:SUNWcsl
359/etc/nsswitch.conf:SUNWcsr
360/etc/nsswitch.ldap:SUNWcsr
361
362
363Analyzing /usr/sbin/ldapclient:
364/usr/lib/libldap.so.4:SUNWcsl
365/usr/lib/libsocket.so.1:SUNWcsl
366/usr/lib/libsldap.so.1:SUNWcsl
367/usr/lib/libc.so.1:SUNWcsl
368/usr/lib/libnsl.so.1:SUNWcsl
369/usr/lib/libresolv.so.2:SUNWcsl
370/usr/lib/libdoor.so.1:SUNWcsl
371/usr/lib/libdl.so.1:SUNWcsl
372/usr/lib/libmp.so.2:SUNWcsl
373/etc/nsswitch.conf:SUNWcsr
374/etc/nsswitch.ldap:SUNWcsr
375
376
377Analyzing /usr/sbin/newkey:
378/usr/lib/librpcsvc.so.1:SUNWcsl
379/usr/lib/libnsl.so.1:SUNWcsl
380/usr/lib/libmp.so.2:SUNWcsl
381/usr/lib/libsldap.so.1:SUNWcsl
382/usr/lib/libsocket.so.1:SUNWcsl
383/usr/lib/libc.so.1:SUNWcsl
384/usr/lib/libdl.so.1:SUNWcsl
385/usr/lib/libldap.so.4:SUNWcsl
386/usr/lib/libdoor.so.1:SUNWcsl
387/usr/lib/libresolv.so.2:SUNWcsl
388/etc/nsswitch.conf:SUNWcsr
389/etc/publickey:SUNWnisr
390/usr/ccs/bin/make:SUNWsprot
391
392
393Analyzing /usr/sbin/rpc.rexd:
394/usr/lib/libsocket.so.1:SUNWcsl
395/usr/lib/librpcsvc.so.1:SUNWcsl
396/usr/lib/libnsl.so.1:SUNWcsl
397/usr/lib/libbsm.so.1:SUNWcsl
398/usr/lib/libpam.so.1:SUNWcsl
399/usr/lib/libdl.so.1:SUNWcsl
400/usr/lib/libc.so.1:SUNWcsl
401/usr/lib/libmp.so.2:SUNWcsl
402/dev/console:SUNWcsd
403/etc/mnttab:SUNWcsr
404/var/adm/wtmpx:SUNWcsr
405
406
407Analyzing /usr/sbin/ypalias:
408/usr/lib/libnsl.so.1:SUNWcsl
409/usr/lib/libdl.so.1:SUNWcsl
410/usr/lib/libc.so.1:SUNWcsl
411/usr/lib/libmp.so.2:SUNWcsl
412
413
414Analyzing /usr/sbin/ypinit:
415/dev/null:SUNWcsd
416/etc/hosts:SUNWcsr
417/etc/inet/ipnodes:SUNWcsr
418/usr/lib/netsvc/yp/ypxfr:SUNWnisu
419
420
421Analyzing /usr/sbin/yppoll:
422/usr/lib/libnsl.so.1:SUNWcsl
423/usr/lib/libdl.so.1:SUNWcsl
424/usr/lib/libc.so.1:SUNWcsl
425/usr/lib/libmp.so.2:SUNWcsl
426
427
428Analyzing /usr/sbin/ypset:
429/usr/lib/libnsl.so.1:SUNWcsl
430/usr/lib/libdl.so.1:SUNWcsl
431/usr/lib/libc.so.1:SUNWcsl
432/usr/lib/libmp.so.2:SUNWcsl
433
434
435Package dependencies for SUNWnisu:
436P SUNWcsd       Core Solaris Devices
437P SUNWcsl       Core Solaris, (Shared Libs)
438P SUNWcsr       Core Solaris, (Root)
439P SUNWcsu       Core Solaris, (Usr)
440P SUNWfns       Federated Naming System
441P SUNWlibC      Sun Workshop Compilers Bundled libC
442P SUNWlibms     Sun WorkShop Bundled shared libm
443P SUNWnisr      Network Information System, (Root)
444P SUNWnisu      Network Information System, (Usr)
445P SUNWsndmr     Sendmail root
446P SUNWsprot     Solaris Bundled tools
447P SUNWypr       NIS Server for Solaris (root)
448