UDB.tools 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. UDB TOOLS
  2. ---------
  3. The udb tools are located in the shared source tree in:
  4. /x/cdesrc/admin/IntegTools/dbTools
  5. The basic tools for manipulating "udb" databases are:
  6. udbParseLib.awk -- the awk parser for "udb" files.
  7. This awk file contains functions which read the udb
  8. databases into memory and set up awk-style
  9. associative arrays of keyword value pairs
  10. for all the file entries. This "library"
  11. also contains the default set of print
  12. routines that allow the database information
  13. to be printed in a number of different
  14. formats.
  15. Custom print routines can easily
  16. be written by following the conventions used
  17. in the default print routines.
  18. This parser is used by "udbToAny.ksh" and other
  19. scripts which manipulate the ".udb" databases.
  20. udbToAny.ksh -- A ksh front end which allows the contents of the
  21. "udb" file to be transformed into a number of different
  22. formats. It also accepts the name of "custom" awk print
  23. routine which can do new and mysterious things. The
  24. most useful output at present is the "-toLst" option which
  25. produces output suitable for the "mkProd" script.
  26. NOTE: This script accepts more than one "udb" file
  27. as input but only the Release Definitions from the first
  28. udb file will be applied.
  29. mkProd -- a ksh script which will create a product tree from the
  30. files in a build tree based on the contents of its input.
  31. This script takes a one-line format (.lst format) as input.
  32. This one-line format can be generated from a "udb" file by
  33. using the "-toLst" option in "udbToAny.ksh".
  34. This script calls two other ksh scripts "uncomment"
  35. and "linksLast". They do very simple tasks and should
  36. probably be rewritten as simple ksh functions in mkProd.
  37. NOTE: There is shell code to do automatic stripping of
  38. executables and compression of man pages etc. but
  39. most of that is turned off.
  40. There are other more complicated tools that act on "udb" databases,
  41. but they are hp-ux specific.
  42. Example 1
  43. ---------
  44. Suppose /x/cde_hpux is a build tree containing a successful hpux build.
  45. Suppose COE-RUN.udb and COE-RUN-ADMIN.udb are databases defining the
  46. COE-RUN product.
  47. To create a product tree at: "/prod/hpux/COE-RUN"
  48. run the following two commands (as root):
  49. 1) udbToAny.ksh -ReleaseStream hp-ux -toLst COE-RUN.udb COE-RUN-ADMIN.udb > COE-RUN.lst
  50. 2) mkProd -D /prod/hpux/COE-RUN -S /x/cde_hpux COE-RUN.lst
  51. NOTE: mkProd -f COE-RUN -D /prod/hpux -S /x/cde_hpux COE-RUN.lst
  52. would produce essentially the same results as 2) above.
  53. Example 2
  54. ---------
  55. Suppose we wanted to install the above bits on a test system. Then
  56. as root:
  57. 1) udbToAny.ksh -ReleaseStream hp-ux -toLst COE-RUN.udb COE-RUN-ADMIN.udb
  58. | mkProd -D / -S /x/cde_hpux
  59. will install the bits on your root file system.