README.Linden 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. 0. Pre-Checkin Checklist
  2. Performed from top of repo, default branch, head:
  3. [ ] Is tag 'current' at or near head of 'vendor'?
  4. hg heads
  5. hg tags
  6. [ ] Expected differences between vendor and default? Very
  7. little of the original source should be modified.
  8. hg diff -rcurrent libxml2
  9. [ ] Are the 'vendor' and 'default' branch source directories
  10. 'libxml2' and not 'libxml2-<version>'?
  11. [ ] Have you reverted/blocked checkin of files modified by
  12. configure or nmake such as
  13. libxml2/include/libxml/xmlversion.h?
  14. [ ] On Linux and Mac, confirm Zlib and ICU detection working
  15. as expected. That will typically mean these showing up
  16. during the builds:
  17. Checking zlib
  18. checking zlib.h usability... yes
  19. checking zlib.h presence... yes
  20. checking for zlib.h... yes
  21. checking for gzread in -lz... yes
  22. ...
  23. Disabling ICU support
  24. (We'll revisit ICU support in the future...)
  25. [ ] Did the libraries pick up the correct version of zlib?
  26. Xmllint? Run strings over them:
  27. $ strings stage/lib/debug/lib* | grep 1\\.[0-9]\\.
  28. 1.2.8
  29. 1.2.8
  30. $ strings stage/lib/release/lib* | grep 1\\.[0-9]\\.
  31. 1.2.8
  32. 1.2.8
  33. $ strings stage/bin/xmllint | grep 1\\.[0-9]\\.
  34. 1.2.8
  35. deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler
  36. inflate 1.2.8 Copyright 1995-2013 Mark Adler
  37. [ ] Does the xmllint program (stage/bin/openssl) run as expected?
  38. Are the library bindings (ldd/otool/depends.exe) as expected?
  39. 1. Introduction
  40. Simple build of libxml2 library from xmlsoft.org.
  41. With 2.9.1, repo structure follows standard conventions (see
  42. section at end).
  43. 2. Modifications
  44. Unit test 'test/errors/name2.xml' appears to be sensitive to
  45. running environment. Supplied version doesn't work on my pdp
  46. (pdp14) but modified version doesn't work on Squeeze build host.
  47. Both detect an error, just differently. So, it is being disabled
  48. by being renamed. Some later version may handle this more
  49. consistently.
  50. EBCDIC unit test fails on Windows and Mac due to source conversion
  51. problems in platform libraries. Test has been disabled by 'hg mv'
  52. command moving it into a 'test/disabled_tests' subdirectory.
  53. API unit test in the debug build takes an enormous amount of time
  54. to run on Windows. Be patient.
  55. Windows makefile (win32/Makefile.msvc) is modified to work with
  56. Linden zlib artifacts and is hardened against finding bash
  57. commands that look like cmd.exe commands.
  58. There's a second Windows build scheme based on project files but
  59. it wasn't used for this. It may or may not be more effective.
  60. 3. Source Origin
  61. 2.9.1:
  62. ftp://xmlsoft.org/libxml2/libxml2-2.9.1.tar.gz
  63. 4. Package Contents
  64. Common:
  65. * include/libxml2/libxml/*.h
  66. Windows (debug and release):
  67. * lib/release/libxml2_a.lib
  68. * lib/debug/libxml2_a.lib
  69. Mac OS X (debug and release):
  70. * lib/release/libxml2.a
  71. * lib/debug/libxml2.a
  72. Explicit -liconv required when linking with OS X libraries due to
  73. Unicode support.
  74. Linux (debug and release):
  75. * lib/release/libxml2.a
  76. * lib/debug/libxml2.a
  77. 5. Consumers/Dependents
  78. Packages dependent on libxml2 which will need attention
  79. (autobuild.xml) after changes. This is not authoritative, use
  80. appropriate build tools to find all dependents.
  81. * fontconfig (should we actually decide to use it)
  82. * colladadom
  83. * viewer
  84. ===================================================================
  85. Third-Party Library Repo Structure
  86. Introduction
  87. We want to have a way to capture local modifications to a third-party
  88. open-source project, such as libcurl, without needing write access to
  89. their public repository. We want to be able to carry forward such
  90. modifications to newer versions of the public project. All this
  91. should be independent of the organizational decision as to whether
  92. it's even desirable to try to submit our local modifications upstream.
  93. Fortunately, the Subversion folks articulated a process years ago that
  94. addresses this very requirement. They call it "Vendor Branches." The
  95. same tactic, suitably adapted, works with Mercurial too.
  96. The essence of the idea is that we capture and tag a particular
  97. snapshot of the open-source project. We develop our local
  98. modifications to that, and the repository tip incorporates them. But
  99. when we want to update to a newer version of the public project, we
  100. bring it into the repository in such a way that we can discover the
  101. changes from the original snapshot and the new one -- and then have
  102. Mercurial apply those deltas to the ''combined'' source.
  103. The following material is adapted from
  104. http://svnbook.red-bean.com/en/1.1/ch07s05.html, the Red Bean
  105. Subversion book, but recast for Mercurial. The Linden source for this
  106. material is an internal wiki. There may be superceding documentation
  107. on the public wiki when you read this. We recommend searching there
  108. for updates to conventions below. And note that each particular
  109. library may implement variations of this scheme.
  110. General Vendor Branch Management Procedure
  111. Managing vendor branches generally works like this. You create a
  112. named branch ("vendor") to store the vendor source snapshots. Then
  113. you import the third party code into that branch. Your modified
  114. branch (named "default") is based on "vendor". You always make your
  115. local changes to the default branch. With each new release of the
  116. code you are tracking you bring it into the "vendor" branch and merge
  117. the changes into "default", resolving whatever conflicts occur between
  118. your local changes and the upstream changes.
  119. Perhaps an example will help to clarify this algorithm. We'll use a
  120. scenario where your development team is creating a calculator program
  121. that links against a third-party complex number arithmetic library,
  122. libcomplex. We'll construct a repository specifically for our
  123. locally-modified version of that library. To begin, we must
  124. initialize our repository and create at least one file in our
  125. "default" branch.
  126. $ hg init ourcomplex
  127. $ cd ourcomplex
  128. $ touch README.txt
  129. $ hg commit README.txt
  130. Now we can create the vendor branch and do the import of the first
  131. vendor drop. We'll call our vendor branch "vendor", and each
  132. successive code drop will be tagged "current".
  133. $ hg branch vendor
  134. $ tar -xjf ../libcomplex-1.0.tar.bz2
  135. $ mv libcomplex-1.0 libcomplex
  136. $ hg addremove
  137. $ hg commit -m "1.0 source drop"
  138. $ hg tag -r tip current
  139. $ hg tag -r current 1.0
  140. We now have the current version of the libcomplex source code in
  141. branch "vendor", tagged "current" and in a non-version-specific source
  142. code subdirectory ("libcomplex"). Next, we merge it into the default
  143. branch. It is in the default branch that we will make our
  144. customizations.
  145. $ hg update default
  146. $ hg merge vendor
  147. $ hg commit -m "initial: 1.0"
  148. We get to work customizing the libcomplex code. Before we know it,
  149. our modified version of libcomplex is now completely integrated into
  150. our calculator program.
  151. A few weeks later, the developers of libcomplex release a new version
  152. of their library, version 1.1, which contains some features and
  153. functionality that we really want. We'd like to upgrade to this new
  154. version, but without losing the customizations we made to the existing
  155. version. What we essentially would like to do is to replace our
  156. current baseline version of libcomplex 1.0 with a copy of libcomplex
  157. 1.1, and then have Mercurial re-apply the custom modifications we
  158. previously made to that library to the new version. But we actually
  159. approach the problem from the other direction, applying the changes
  160. made to libcomplex between versions 1.0 and 1.1 to our modified copy
  161. of it.
  162. To perform this upgrade, we update our repository to our vendor
  163. branch, and update the "current" tag with the new libcomplex 1.1
  164. source code. We quite literally replace the existing files with the
  165. new files, clearing out the whole tree and exploding the libcomplex
  166. 1.1 release tarball in its place. The goal here is to make the tip of
  167. our vendor branch contain only the libcomplex 1.1 code, and to ensure
  168. that all that code is under version control. Oh, and we want to do
  169. this with as little version control history disturbance as possible.
  170. $ hg update vendor
  171. $ rm -rf *
  172. $ tar -xjf ../libcomplex-1.1.tar.bz2
  173. $ mv libcomplex-1.1 libcomplex
  174. $ hg addremove -s 60
  175. $ # Additional 'hg add' and 'hg rm' commands if needed
  176. $ hg commit -m "1.1 source drop"
  177. After unpacking the 1.1 tarball, hg status will show files with local
  178. modifications as well as, perhaps, some unversioned or missing files.
  179. If we did what we were supposed to do, the unversioned files are only
  180. those new files introduced in the 1.1 release of libcomplex. The
  181. missing files are files that were in 1.0 but not in 1.1. The 'hg
  182. addremove' command deals with both, and more: the '-s 60' switch
  183. directs Mercurial to compare added files to deleted files, recognizing
  184. any file at least 60% similar as a move/rename.
  185. For simple or stable libraries, the 'hg addremove' command should be
  186. reliable. For more complicated libraries subject to refactoring or
  187. large gaps of time between updates (e.g. libcurl), it can get a little
  188. lost trying to match files in the old release with files in the new
  189. release. Pay attention to the output of the command or better still,
  190. do dry runs. Files erroneously moved can be excluded with the '-X'
  191. option and then dealt with individually with 'hg add' and 'hg rm'
  192. commands after 'hg addremove'. (The readme file in the curl library
  193. should document a particularly challenging case.)
  194. The 'addremove' process doesn't have to be perfect. Recreating the
  195. evolution of the upstream source tree isn't universally practical.
  196. But we'd like to capture movement of files in the vendor branch that
  197. are modified in the default branch. If achieving that becomes too
  198. tedious, then re-implementation of the default branch edit in a new
  199. file is fine. Just note it here for the next developer.
  200. Finally, once our current working copy contains only the libcomplex
  201. 1.1 code, we commit the changes we made to get it looking that way.
  202. Our current vendor branch now contains the new vendor drop. We move
  203. the 'current' tag to the new version (in the same way we previously
  204. tagged the version 1.0 vendor drop), and then merge the differences
  205. between the version 1.0 and version 1.1 into our default branch.
  206. $ hg tag -f -r tip current
  207. $ hg tag -r current 1.1
  208. $ hg update default
  209. $ hg merge vendor
  210. # resolve all the conflicts between their changes and our changes
  211. # if you will have conflicts in .hgtags, simply take *all* lines
  212. ...
  213. $ hg commit -m "update with 1.1"
  214. Any additional work needed to get the merged library working can
  215. now be done on the default branch.
  216. Revision Tags
  217. We don't currently make use of Mercurial tags in the build and release
  218. process for 3rd-party libraries. But we would like to establish a
  219. convention to document update and release points. The tags we would
  220. like to establish are:
  221. * 'current' Points to a succession of vendor releases checked into
  222. the 'vendor' branch. Will almost always be at or close to branch
  223. head.
  224. * '<version>' Tag on the 'vendor' branch pointing to a verbatim
  225. checkin of a 3rd-party's <version> release. Example: '7.21.1' for
  226. a particular version of libcurl we have used.
  227. * Release-type tags on the default branch aren't as useful given how
  228. Mercurial handles tags and how autobuild works.
  229. Schematic of a Third-Party Repository
  230. Below is the output of the 'hg glog' command showing a library project
  231. going through an initial 1.0 release and an update from the vendor to
  232. 1.1. Significant revisions in the repository lifecycle are as
  233. follows:
  234. 0 Creation of the repo with an initial file.
  235. 1 1.0 code drop on branch 'vendor'
  236. 4 Merge of 1.0 code onto branch 'default'
  237. 5 Modifications to library we wish to keep over time. Released.
  238. 6 1.1 code drop on branch 'vendor'
  239. 9 Merge of 1.1 code onto branch 'default'
  240. 10 Fixes to merge yielding production 1.1 library. Released.
  241. @ changeset: 10:888229641f6e
  242. | tag: tip
  243. | user: Monty Brandenberg <[email protected]>
  244. | date: Wed Oct 30 13:35:51 2013 -0400
  245. | summary: Work to get 1.1 merge working. Release.
  246. |
  247. o changeset: 9:925ccdf09f50
  248. |\ parent: 5:83c5775c23dc
  249. | | parent: 8:977001a08e48
  250. | | user: Monty Brandenberg <[email protected]>
  251. | | date: Wed Oct 30 13:35:20 2013 -0400
  252. | | summary: update with 1.1
  253. | |
  254. | o changeset: 8:977001a08e48
  255. | | branch: vendor
  256. | | user: Monty Brandenberg <[email protected]>
  257. | | date: Wed Oct 30 13:33:49 2013 -0400
  258. | | summary: Added tag 1.1 for changeset 5f6cb89add91
  259. | |
  260. | o changeset: 7:59bce0f6d12f
  261. | | branch: vendor
  262. | | user: Monty Brandenberg <[email protected]>
  263. | | date: Wed Oct 30 13:33:41 2013 -0400
  264. | | summary: Added tag current for changeset 5f6cb89add91
  265. | |
  266. | o changeset: 6:5f6cb89add91
  267. | | branch: vendor
  268. | | tag: current
  269. | | tag: 1.1
  270. | | parent: 3:8525ad934ecd
  271. | | user: Monty Brandenberg <[email protected]>
  272. | | date: Wed Oct 30 13:33:29 2013 -0400
  273. | | summary: 1.1 source drop
  274. | |
  275. o | changeset: 5:83c5775c23dc
  276. | | tag: 1.0
  277. | | user: Monty Brandenberg <[email protected]>
  278. | | date: Wed Oct 30 13:32:31 2013 -0400
  279. | | summary: Linden-specific changes to the library. Release
  280. | |
  281. o | changeset: 4:bccb736585f4
  282. |\| parent: 0:400e4516c406
  283. | | parent: 3:8525ad934ecd
  284. | | user: Monty Brandenberg <[email protected]>
  285. | | date: Wed Oct 30 13:31:40 2013 -0400
  286. | | summary: initial: 1.0
  287. | |
  288. | o changeset: 3:8525ad934ecd
  289. | | branch: vendor
  290. | | user: Monty Brandenberg <[email protected]>
  291. | | date: Wed Oct 30 13:30:21 2013 -0400
  292. | | summary: Added tag 1.0 for changeset 8ac3828d03bb
  293. | |
  294. | o changeset: 2:7aa1a1cb62d9
  295. | | branch: vendor
  296. | | user: Monty Brandenberg <[email protected]>
  297. | | date: Wed Oct 30 13:30:14 2013 -0400
  298. | | summary: Added tag current for changeset 8ac3828d03bb
  299. | |
  300. | o changeset: 1:8ac3828d03bb
  301. |/ branch: vendor
  302. | tag: 1.0
  303. | user: Monty Brandenberg <[email protected]>
  304. | date: Wed Oct 30 13:30:09 2013 -0400
  305. | summary: 1.0 source drop
  306. |
  307. o changeset: 0:400e4516c406
  308. user: Monty Brandenberg <[email protected]>
  309. date: Wed Oct 30 13:29:16 2013 -0400
  310. summary: Created repo with initial readme file