UDB.format 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. UDB FILE FORMAT
  2. The udb (universal data base) format attempts to allow product delivery
  3. information for several closely related products to co-exist in the
  4. same database file. This is an HP Corvallis home-grown format which
  5. was originally created to deal with the delivery of similar products
  6. on hp-ux, domain and osf platforms.
  7. The format is meant to be more or less free form without regard to
  8. intervening newlines or whitespace. Comments violate this principle
  9. by being line oriented. Any line whose first non-whitespace character
  10. is a '#' is considered a comment. A semi-colon may be placed between
  11. two identifiers to break them up into separate tokens. If more than
  12. one keyword/value pair is placed on a line, semi-colons can be used
  13. to separate them visually. The semi-colons are ignored by the parser.
  14. The special syntax characters ( "{",":",";","=","}") may be embedded
  15. in an identifier by escaping them with a backslash.
  16. Semantic Note:
  17. The tools associated with the udb databases apply semantic meaning
  18. to seven kinds of information about a file. There are seven Special
  19. Tokens which may be used to identify the keywords with which the
  20. semantic information should be associated.
  21. Special Token description
  22. ------------ -----------
  23. <SRC> The path (relative to the top of a
  24. build tree) to the source of a
  25. product deliverable file.
  26. <DEST> The full destination path location of
  27. a deliverable file in the target
  28. machine's file system.
  29. <LNK> The full path name (in the target
  30. machine's file system) of the source
  31. file for a symbolic link. (i.e. The file
  32. pointed to).
  33. <TYPE> The kind of file object being installed.
  34. (i.e. file, sym_link, hard_link,
  35. directory, etc. )
  36. <MODE> The (numeric) permissions assigned to
  37. the new object. This value should be
  38. in the usual octal notation.
  39. <OWNER> The symbolic name of the owner of the
  40. new file.
  41. <GROUP> The symbolic name of the group of the
  42. new file.
  43. The hp-ux fileset databases have traditionally used the
  44. following keywords for these items:
  45. hpux keyword Special Token
  46. ------------ -----------
  47. a_out_location : <SRC>
  48. install_target : <DEST>
  49. link_source : <LNK>
  50. type : <TYPE>
  51. mode : <MODE>
  52. owner : <OWNER>
  53. group : <GROUP>
  54. The default for the udb databases is to associate the <SRC> semantics
  55. with the "a_out_location" keyword, the <DEST> semantics with the
  56. "install_target" keyword, etc. This behavior may be modified by
  57. assigning a special token to a keyword in the Release Definition
  58. Section of the database file.
  59. General Format:
  60. A udb file has two sections. First, a Release Definition Section,
  61. which describes the keyword pairs to be maintained for a given
  62. release stream and second, the individual file records for each
  63. file which is to be delivered.
  64. 1) Release Definition Section
  65. The Release Definition Section defines the keyword-value
  66. pairs which are to be maintained for each release. The
  67. release_id is an identifier which is used to identify the
  68. set of defaults for a particular release. The special
  69. release_id of "default" is used specify the default set
  70. of keyword/value pairs for an undefined release_id. The
  71. values associated with keywords in this section provide
  72. defaults for those keywords in later File Entries.
  73. The name and number of these pairs need not be the same for
  74. all release streams.
  75. ------------------------------
  76. For example:
  77. The following entry in the Release Definition Section
  78. { hpux : defaults
  79. src = <SRC>
  80. dest = <DEST>
  81. link_source =
  82. type = file
  83. perm = <MODE>
  84. perm = 0555
  85. owner = bin
  86. group = bin
  87. project = xwindows
  88. }
  89. defines the defaults for the "hpux" release stream. It
  90. states that we should maintain information about src, dest, link_source, type, perm, owner, group and project in the database. Furthermore
  91. the semantics of <SRC> are to be associated with the keyword "src",
  92. <DEST> with "dest", link_source is associated with <LNK> by default,
  93. and type is associated with <TYPE> by default. Note that we associate
  94. perm with <MODE> semantics and supply a default value (0555) different
  95. from the automatic 0444 default. Owner and group have their usual
  96. meaning and a field called "project" is defined with a default value
  97. of "xwindows". No semantic information is known about the "project"
  98. field but it's value will be maintained.
  99. -------------------------
  100. 2) File Entries
  101. After the Release Definition Section, come the entries for
  102. the deliverable files comprising the release. The build-tree-top
  103. relative path name of a source file is followed by one or more
  104. destination specifications which describe where in the product
  105. this file should go, as well as the ownerships/permissions etc. that
  106. should be associated with it. Any missing keyword/value pairs will
  107. be filled in by the defaults provided in the Release Definition
  108. Section.
  109. Information may differ between release
  110. streams. If there is no destination spec for a given release and
  111. there is no "default" destination spec then that souce file will
  112. not be delivered for that release. The "default" destination spec
  113. (if it exists) should come last and is applied for release streams
  114. that do not have more specific destination specs.
  115. -------------------
  116. For example The following file entry:
  117. cose/unity1/types/coe.vf
  118. { hp-ux
  119. install_target = /usr/coe/newconfig/coe.vf
  120. }
  121. { aix
  122. install_target = /usr/coe/types/coe.vf
  123. }
  124. { default
  125. install_target = /var/coe/types/coe.vf
  126. owner = sys
  127. group = admin
  128. }
  129. states that on hp-ux the file found at
  130. $(TOP)/cose/unity1/types/coe.vf in the build tree, is to be delivered
  131. to "/usr/coe/newconfig/coe.vf" on hp-ux; "/usr/coe/types/coe.vf" on
  132. aix; and "/var/coe/types/coe.vf" on all other release platforms. In
  133. addition, on all platforms other than hp-ux and aix the default
  134. owner and group (usually bin,bin) are replaced by sys,admin for this
  135. file.
  136. ------------------
  137. Pseudo-BNF:
  138. Here follows a pseudo-BNF description of the syntax of a
  139. udb file:
  140. ---------------------------------------------------------------------
  141. udbFile = release_definition_section file_records
  142. release_definition_section = release_def release_definition_section |
  143. release_def
  144. release_def = "{" release_id ":" "defaults" record_defs "}"
  145. release_id = "hp-ux" | "aix" | "sun" | "usl" | "uxp" | "default"
  146. record_defs = keyword_def "=" special_token |
  147. keyword_def "=" keyword_value
  148. special_token = "<SRC>" | "<DEST>" | "<LNK>" |
  149. "<TYPE>" | "<MODE>" | "<OWNER>" | "<GROUP>"
  150. keyword_def = identifier
  151. keyword_value = identifier
  152. file_records = file_rec file_records |
  153. file_rec
  154. file_rec = src_spec dest_specs
  155. src_spec = a_out_loc | link_path
  156. a_out_loc = < the build tree-top relative path to the source file >
  157. link_path = < the full path to the link source in the product >
  158. dest_specs = dest_spec dest_specs |
  159. dest_spec
  160. dest_spec = "{" release_id value_specs "}"
  161. value_spec = keyword "=" value
  162. keyword = identifier
  163. value = identifier
  164. identifier = < any sequence of non-whitespace characters which
  165. does not contain an unescaped instance of one of
  166. the syntax_chars >
  167. syntax_chars = "{", ":", ";", "=", "}"