4 The contents of this file are subject to the terms of the
5 Common Development and Distribution License (the "License").
6 You may not use this file except in compliance with the License.
8 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 or http://www.opensolaris.org/os/licensing.
10 See the License for the specific language governing permissions
11 and limitations under the License.
13 When distributing Covered Code, include this CDDL HEADER in each
14 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 If applicable, add the following below this CDDL HEADER, with the
16 fields enclosed by brackets "[]" replaced with your own identifying
17 information: Portions Copyright [yyyy] [name of copyright owner]
21 Copyright 2009 Sun Microsystems, Inc. All rights reserved.
22 Use is subject to license terms.
24 The first step in doing any kind of dependency checking - setting up the
27 In this example, I use my SampleLinks file to help resolve some defficiencies
28 in the pkg database. The "OVERRIDDEN" line refer to information that was
29 provided by the SampleLinks file. The "CANNOT FIND" file refers to files
30 which are links but cannot be resolved to an executable. The "README" file
31 has a more in-depth explanation.
32 ======================================================================
35 euphoria>./make_pkg_db -dbdir DBM -ifiles SampleLinks
36 ...initializing the databases
37 Creating 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
73 The default dependency check on /usr/bin/sh. This analysis uses
74 "/usr/bin/stings" and "/usr/bin/ldd" to glean information about
77 The default format of a dependency is "filename:pkgname".
78 =======================================================================
80 euphoria>./get_depend_info -dbdir DBM /usr/bin/sh
83 Analyzing /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
95 /usr/bin/pfexec:SUNWcsu
97 A conservative analysis of the executable which only yields guaranteed
98 dependencies.. This analysis does not use "/usr/bin/strings" and only
100 ===================================================================
102 euphoria>get_depend_info -dbdir DBM -cons /usr/bin/sh
105 Analyzing /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
114 A pkg level anaysis on the executable. In this format, only pkg dependencies
115 are listed and file dependencies are dropped from the output.
117 ======================================================================
118 euphoria>get_depend_info -dbdir DBM -p /usr/bin/ls
121 Analyzing /usr/bin/ls:
122 P SUNWcsl Core Solaris, (Shared Libs)
123 The default dependency check on /usr/bin/sh. This analysis uses
124 "/usr/bin/stings" and "/usr/bin/ldd" to glean information about
127 The default format of a dependency is "filename:pkgname".
128 =======================================================================
130 euphoria>./get_depend_info -dbdir DBM /usr/bin/sh
133 Analyzing /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
145 /usr/bin/pfexec:SUNWcsu
147 This is a dependency check on a pkg. All the files within the pkg are analysed
148 and a report is generated. Note at the end of the listing is a summarized
149 listing of pkg dependencies.
151 =============================================================================
152 euphoria>get_depend_info -dbdir DBM -pkg SUNWnisu
156 Input file is a directory
160 Input file is a directory
163 Analyzing /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
172 Analyzing /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
188 Analyzing /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
196 Analyzing /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
208 Analyzing /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
221 /etc/mail/sendmail.cf:SUNWsndmr
226 Analyzing /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
234 Analyzing /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
242 Analyzing /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
251 Input file is a directory
254 Analyzing /usr/lib/ldap:
255 Input file is a directory
258 Analyzing /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
272 Analyzing /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
279 Analyzing /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
286 Analyzing /usr/lib/netsvc:
287 Input file is a directory
290 Analyzing /usr/lib/netsvc/nis:
291 Input file is a directory
294 Analyzing /usr/lib/netsvc/yp:
295 Input file is a directory
298 Analyzing /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
305 /etc/inet/ipnodes:SUNWcsr
308 Analyzing /usr/lib/netsvc/yp/ypstart:
311 /usr/sbin/fnsypd:SUNWfns
312 /usr/sbin/makedbm:SUNWcsu
313 /var/yp/Makefile:SUNWypr
314 /var/yp/updaters:SUNWypr
317 Analyzing /usr/lib/netsvc/yp/ypstop:
321 Analyzing /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
330 Input file is a directory
333 Analyzing /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
341 Analyzing /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
349 Analyzing /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
363 Analyzing /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
377 Analyzing /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
393 Analyzing /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
404 /var/adm/wtmpx:SUNWcsr
407 Analyzing /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
414 Analyzing /usr/sbin/ypinit:
417 /etc/inet/ipnodes:SUNWcsr
418 /usr/lib/netsvc/yp/ypxfr:SUNWnisu
421 Analyzing /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
428 Analyzing /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
435 Package dependencies for SUNWnisu:
436 P SUNWcsd Core Solaris Devices
437 P SUNWcsl Core Solaris, (Shared Libs)
438 P SUNWcsr Core Solaris, (Root)
439 P SUNWcsu Core Solaris, (Usr)
440 P SUNWfns Federated Naming System
441 P SUNWlibC Sun Workshop Compilers Bundled libC
442 P SUNWlibms Sun WorkShop Bundled shared libm
443 P SUNWnisr Network Information System, (Root)
444 P SUNWnisu Network Information System, (Usr)
445 P SUNWsndmr Sendmail root
446 P SUNWsprot Solaris Bundled tools
447 P SUNWypr NIS Server for Solaris (root)