1 
   2 CDDL HEADER START
   3 
   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.
   7 
   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.
  12 
  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]
  18 
  19 CDDL HEADER END
  20 
  21 Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  22 Use is subject to license terms.
  23 
  24 The first step in doing any kind of dependency checking - setting up the
  25 database.
  26 
  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 ======================================================================
  33 
  34 
  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
  71 ...DONE
  72 
  73 The default dependency check on /usr/bin/sh.  This analysis uses
  74 "/usr/bin/stings" and "/usr/bin/ldd" to glean information about 
  75 file being analysed.
  76 
  77 The default format of a dependency is "filename:pkgname".
  78 =======================================================================
  79 
  80 euphoria>./get_depend_info -dbdir DBM /usr/bin/sh   
  81 
  82 
  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
  91 /bin:SUNWcsr
  92 /dev/null:SUNWcsd
  93 /etc/profile:SUNWcsr
  94 /usr/5bin:SUNWscpu
  95 /usr/bin/pfexec:SUNWcsu
  96 
  97 A conservative analysis of the executable which only yields guaranteed
  98 dependencies..  This analysis does not use "/usr/bin/strings" and only
  99 uses "/usr/bin/ldd".
 100 ===================================================================
 101 
 102 euphoria>get_depend_info -dbdir DBM -cons /usr/bin/sh
 103 
 104 
 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
 113 
 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.
 116 
 117 ======================================================================
 118 euphoria>get_depend_info -dbdir DBM -p /usr/bin/ls
 119 
 120 
 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 
 125 file being analysed.
 126 
 127 The default format of a dependency is "filename:pkgname".
 128 =======================================================================
 129 
 130 euphoria>./get_depend_info -dbdir DBM /usr/bin/sh   
 131 
 132 
 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
 141 /bin:SUNWcsr
 142 /dev/null:SUNWcsd
 143 /etc/profile:SUNWcsr
 144 /usr/5bin:SUNWscpu
 145 /usr/bin/pfexec:SUNWcsu
 146 
 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.
 150 
 151 =============================================================================
 152 euphoria>get_depend_info -dbdir DBM -pkg SUNWnisu    
 153 
 154 
 155 Analyzing /usr:
 156 Input file is a directory
 157 
 158 
 159 Analyzing /usr/bin:
 160 Input file is a directory
 161 
 162 
 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
 169 /usr/bin/vi:SUNWcsu
 170 
 171 
 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
 186 
 187 
 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
 194 
 195 
 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
 206 
 207 
 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
 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 
 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
 232 
 233 
 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
 240 
 241 
 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
 248 
 249 
 250 Analyzing /usr/lib:
 251 Input file is a directory
 252 
 253 
 254 Analyzing /usr/lib/ldap:
 255 Input file is a directory
 256 
 257 
 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
 269 /dev/null:SUNWcsd
 270 
 271 
 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
 277 
 278 
 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
 284 
 285 
 286 Analyzing /usr/lib/netsvc:
 287 Input file is a directory
 288 
 289 
 290 Analyzing /usr/lib/netsvc/nis:
 291 Input file is a directory
 292 
 293 
 294 Analyzing /usr/lib/netsvc/yp:
 295 Input file is a directory
 296 
 297 
 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
 303 /dev/null:SUNWcsd
 304 /etc/hosts:SUNWcsr
 305 /etc/inet/ipnodes:SUNWcsr
 306 
 307 
 308 Analyzing /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 
 317 Analyzing /usr/lib/netsvc/yp/ypstop:
 318 /usr/bin/ps:SUNWcsu
 319 
 320 
 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
 326 /dev/null:SUNWcsd
 327 
 328 
 329 Analyzing /usr/sbin:
 330 Input file is a directory
 331 
 332 
 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
 339 
 340 
 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
 347 
 348 
 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
 361 
 362 
 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
 375 
 376 
 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
 391 
 392 
 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
 402 /dev/console:SUNWcsd
 403 /etc/mnttab:SUNWcsr
 404 /var/adm/wtmpx:SUNWcsr
 405 
 406 
 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
 412 
 413 
 414 Analyzing /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 
 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
 426 
 427 
 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
 433 
 434 
 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)