SYNCING 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. Preamble
  2. ========
  3. Tmux portable relies on repositories "tmux" and "tmux-openbsd".
  4. Here's a description of them:
  5. * "tmux" is the portable version, the one which contains code for other
  6. operating systems, and autotools, etc., which isn't found or needed in the
  7. OpenBSD base system.
  8. * "tmux-openbsd" is the version of tmux in OpenBSD base system which provides
  9. the basis of the portable tmux version.
  10. Note: The "tmux-openbsd" repository is actually handled by "git cvsimport"
  11. running at 15 minute intervals, so a commit made to OpenBSD's tmux CVS
  12. repository will take at least that long to appear in this git repository.
  13. (It might take longer, depending on the CVS mirror used to import the
  14. OpenBSD code).
  15. If you've never used git before, git tracks meta-data about the committer
  16. and the author, as part of a commit, hence:
  17. % git config [--global] user.name "Your name"
  18. % git config [--global] user.email "you@yourdomain.com"
  19. Note that, if you already have this in the global ~/.gitconfig option, then
  20. this will be used. Setting this per-repository would involve not using the
  21. "--global" flag above. If you wish to use the same credentials always,
  22. pass the "--global" option, as shown.
  23. This is a one-off operation once the repository has been cloned, assuming
  24. this information has ever been set before.
  25. Cloning repositories
  26. ====================
  27. This involves having both tmux and tmux-openbsd cloned, as in:
  28. % cd /some/where/useful
  29. % git clone https://github.com/tmux/tmux.git
  30. % git clone https://github.com/ThomasAdam/tmux-openbsd.git
  31. Note that you do not need additional checkouts to manage the sync -- an
  32. existing clone of either repositories will suffice. So if you already have
  33. these checkouts existing, skip that.
  34. Adding in git-remotes
  35. =====================
  36. Because the portable "tmux" git repository and the "tmux-openbsd"
  37. repository do not inherently share any history between each other, the
  38. history has been faked between them. This "faking of history" is something
  39. which has to be told to git for the purposes of comparing the "tmux" and
  40. "tmux-openbsd" repositories for syncing. To do this, we must reference the
  41. clone of the "tmux-openbsd" repository from the "tmux" repository, as
  42. shown by the following command:
  43. % cd /path/to/tmux
  44. % git remote add obsd-tmux file:///path/to/tmux-openbsd
  45. So that now, the remote "obsd-tmux" can be used to reference branches and
  46. commits from the "tmux-openbsd" repository, but from the context of the
  47. portable "tmux" repository, which makes sense because it's the "tmux"
  48. repository which will have the updates applied to them.
  49. Fetching updates
  50. ================
  51. To ensure the latest commits from "tmux-openbsd" can be found from within
  52. "tmux", we have to ensure the "master" branch from "tmux-openbsd" is
  53. up-to-date first, and then reference that update in "tmux", as in:
  54. % cd /path/to/tmux-openbsd
  55. % git checkout master
  56. % git pull
  57. Then back in "tmux":
  58. % cd /path/to/tmux
  59. % git fetch obsd-tmux
  60. Creating the necessary branches
  61. ===============================
  62. Now that "tmux" can see commits and branches from "tmux-openbsd" by way
  63. of the remote name "obsd-tmux", we can now create the master branch from
  64. "tmux-openbsd" in the "tmux" repository:
  65. % git checkout -b obsd-master obsd-tmux/master
  66. Adding in the fake history points
  67. =================================
  68. To tie both the "master" branch from "tmux" and the "obsd-master"
  69. branch from "tmux-openbsd" together, the fake history points added to the
  70. "tmux" repository need to be added. To do this, we must add an
  71. additional refspec line, as in:
  72. % cd /path/to/tmux
  73. % git config --add remote.origin.fetch '+refs/replace/*:refs/replace/*'
  74. % git fetch origin
  75. Performing the Sync
  76. ===================
  77. Make sure the "master" branch is checked out:
  78. % git checkout master
  79. The following will show commits on OpenBSD not yet synched with "tmux":
  80. % git log master..obsd-master
  81. From there, merge the result in, fixing up any conflicts which might arise.
  82. % git merge obsd-master
  83. Then ensure things look correct by BULDING the result of that sync:
  84. % make clean && ./autogen.sh && ./configure && make
  85. Compare the git merge result with what's on origin/master -- that is, check
  86. which commits you're about to push:
  87. % git log origin/master..master
  88. And if happy:
  89. % git push origin master
  90. Keeping an eye on libutil in OpenBSD
  91. ====================================
  92. A lot of the compat/ code in tmux comes from libutil, especially imsg.
  93. Sometimes the API can change, etc., which might cause interesting problems
  94. trying to run the portable version of tmux. It's worth checking
  95. periodically for any changes to libutil in OpenBSD and syncing those files
  96. to compat/ as and when appropriate.
  97. Release tmux for next version
  98. =============================
  99. 1. Comment the "found_debug=yes" line in configure.ac, since releases
  100. don't have debugging enabled, otherwise make(1) aborts when
  101. preparing the distribution.
  102. 2. Update and commit README and CHANGES. The former should be checked for
  103. anything outdated and updated with a list of things that might break
  104. upgrades and the latter should mention all the major changes since
  105. the last version.
  106. 3. Tag with:
  107. % git tag -a 2.X
  108. Where "2.X" is the next version.
  109. Push the tag out with:
  110. % git push 2.X
  111. 4. Build the tarball with 'make dist'.
  112. 5. Check the tarball. If it's good, go here to select the tag just pushed:
  113. https://github.com/tmux/tmux/tags
  114. Click the "Add release notes", upload the tarball and add a link in the
  115. description field to the CHANGES file.
  116. 7. Clone the tmux.github.io repository, and change the RELEASE version in
  117. the Makefile. Commit it, and run 'make' to replace %%VERSION%%. Push
  118. the result out.
  119. 8. Bump version in tmu/tmux.git configure.ac and uncomment "found_debug=yes" to
  120. create a debug build by default.