|
| 1 | +Organization of the repository |
| 2 | +============================== |
| 3 | + |
| 4 | +The debian package for each LLVM point release is maintained as a git branch. |
| 5 | +For example, the 10 release lives at in the "10" branch. |
| 6 | + |
| 7 | +The current snapshot release is maintained in the "snapshot" branch. |
| 8 | + |
| 9 | +The easiest way to get all branches is probably to have one |
| 10 | +clone per version: |
| 11 | + |
| 12 | +for f in 14 15 16 17 snapshot; do |
| 13 | + git clone [email protected]:pkg-llvm-team/llvm-toolchain.git -b $f $f |
| 14 | +done |
| 15 | + |
| 16 | +debian/control is generated from debian/control.in by running: |
| 17 | + |
| 18 | +debian/rules preconfigure |
| 19 | + |
| 20 | + |
| 21 | +Steps for manually building a snapshot release |
| 22 | +============================================== |
| 23 | + |
| 24 | +1) Retrieve the latest snapshot and create original tarballs. |
| 25 | + |
| 26 | + Run the orig-tar.sh script, |
| 27 | + |
| 28 | + $ sh snapshot/debian/orig-tar.sh |
| 29 | + |
| 30 | + which will retrieve the latest version for each LLVM subproject (llvm, |
| 31 | + clang, lldb, etc.) from the main development (upstream github). and repack it |
| 32 | + as a set of tarballs. |
| 33 | + |
| 34 | +2) Unpack the original tarballs and apply quilt debian patches. |
| 35 | + |
| 36 | + From the branches/ directory run the unpack.sh script, |
| 37 | + |
| 38 | + $ sh unpack.sh |
| 39 | + |
| 40 | + which will unpack the source tree inside a new directory such as |
| 41 | + branches/llvm-toolchain-snapshot_3.9~+20191018225217+3b123a2be6d. |
| 42 | + (date+hour+short git hash). |
| 43 | + Depending on the current snapshot version number and git release, |
| 44 | + the directory name will be |
| 45 | + different. |
| 46 | + |
| 47 | + Quilt patches will then be applied. |
| 48 | + |
| 49 | +3) Build the binary packages using, |
| 50 | + |
| 51 | + $ fakeroot debian/rules binary |
| 52 | + |
| 53 | +When debugging, successive builds can be recompiled faster by using tools such |
| 54 | +as ccache (PATH=/usr/lib/ccache:$PATH fakeroot debian/rules binary). |
| 55 | + |
| 56 | +Retrieving a specific branch or release candidate with orig-tar.sh |
| 57 | +================================================================== |
| 58 | + |
| 59 | +When using orig-tar.sh, if you need to retrieve a specific branch, you can pass |
| 60 | +the branch name as the first argument. For example, to get the 10 release |
| 61 | +branch at |
| 62 | + https://github.com/llvm/llvm-project/branches |
| 63 | +you should use, |
| 64 | + |
| 65 | + $ sh 10/debian/orig-tar.sh release/10.x |
| 66 | + |
| 67 | +To retrieve a specific release candidate, you can pass the branch name as the |
| 68 | +first argument, and the tag rc number as the second argument. For example, to |
| 69 | +get the 9.0.1 release candidate rc3 at |
| 70 | + https://github.com/llvm/llvm-project/tags |
| 71 | +you should use, |
| 72 | + |
| 73 | + $ sh 10/debian/orig-tar.sh 10.0.1 rc3 |
| 74 | + |
| 75 | +For a stable release, the syntax is: |
| 76 | + |
| 77 | + $ sh 10/debian/orig-tar.sh 10.0.0 |
| 78 | + |
| 79 | + |
| 80 | +Additional maintainer scripts |
| 81 | +============================= |
| 82 | + |
| 83 | +The script qualify-clang.sh that is found at the git debian/ directory |
| 84 | +should be used to quickly test a newly built package. It runs a short |
| 85 | +set of sanity-check tests and regression tests. |
| 86 | +It is executed in autopkgtest. |
| 87 | + |
| 88 | +The script releases/snapshot/debian/prepare-new-release.sh is used when |
| 89 | +preparing a new point release. It automatically replaces version numbers |
| 90 | +in various files of the package. |
| 91 | + |
| 92 | +Making a change to all versions |
| 93 | +=============================== |
| 94 | + |
| 95 | +Sometimes, we want to make a change on all branches. |
| 96 | +In that case, start to make the change from the older |
| 97 | +version (example: 8), then, change branch (example: 9) and |
| 98 | +$ git merge origin/8 |
| 99 | +to retrieve the changes |
| 100 | + |
| 101 | + |
| 102 | +Change in major upstream version |
| 103 | +================================ |
| 104 | +TODO update with the git commands |
| 105 | + |
| 106 | +$ svn copy snapshot VERSION |
| 107 | +$ svn commit -m "VERSION branched" VERSION |
| 108 | +$ cd VERSION |
| 109 | +$ sed -i -e '0,/llvm-toolchain-snapshot/s/llvm-toolchain-snapshot/llvm-toolchain-VERSION/' debian/changelog debian/control |
| 110 | +$ svn commit -m "snapshot => VERSION" |
| 111 | +$ cd ../snapshot |
| 112 | +$ emacs debian/prepare-new-release.sh |
| 113 | +# Change the version |
| 114 | +$ bash debian/prepare-new-release.sh |
| 115 | +$ svn commit -m "new snapshot release" |
| 116 | + |
| 117 | +Now, try build build it. |
0 commit comments