xref: /aosp_15_r20/external/libwebsockets/READMEs/README.release-policy.md (revision 1c60b9aca93fdbc9b5f19b2d2194c91294b22281)
1*1c60b9acSAndroid Build Coastguard Worker# lws release policy
2*1c60b9acSAndroid Build Coastguard Worker
3*1c60b9acSAndroid Build Coastguard Worker## How should users consume lws?
4*1c60b9acSAndroid Build Coastguard Worker
5*1c60b9acSAndroid Build Coastguard WorkerThe one definitively wrong way to consume lws (or anything else) is "import" some
6*1c60b9acSAndroid Build Coastguard Workerversion of it into your proprietary tree and think you will stick with that
7*1c60b9acSAndroid Build Coastguard Workerforever, perhaps piling cryptic fixes or hacks on top until quite quickly,
8*1c60b9acSAndroid Build Coastguard Workernobody dare think about updating it.
9*1c60b9acSAndroid Build Coastguard Worker
10*1c60b9acSAndroid Build Coastguard WorkerThe stable releases go on to a branch like v4.0-stable as described below, over
11*1c60b9acSAndroid Build Coastguard Workertime these attract dozens or even hundreds of minor or major fix patches
12*1c60b9acSAndroid Build Coastguard Workerbackported from the development branch.  So you should not consume tags like
13*1c60b9acSAndroid Build Coastguard Workerv4.0.0 but build into your planning that you will need to follow v4.0-stable in
14*1c60b9acSAndroid Build Coastguard Workerorder to stay on top of known bugs.
15*1c60b9acSAndroid Build Coastguard Worker
16*1c60b9acSAndroid Build Coastguard WorkerAnd we only backport fixes to the last stable release, although we will make
17*1c60b9acSAndroid Build Coastguard Workerexceptions for important fixes.  So after a while, trying to stick with one
18*1c60b9acSAndroid Build Coastguard Workerold versions means nobody is providing security fixes on it any more.  So you
19*1c60b9acSAndroid Build Coastguard Workershould build into your planning that you will follow lws release upgrades.
20*1c60b9acSAndroid Build Coastguard Worker
21*1c60b9acSAndroid Build Coastguard WorkerIf you find problems and create fixes, please upstream them, simplifying your
22*1c60b9acSAndroid Build Coastguard Workerlife so you can just directly consume the upstream tree with no private changes.
23*1c60b9acSAndroid Build Coastguard Worker
24*1c60b9acSAndroid Build Coastguard Worker## Development
25*1c60b9acSAndroid Build Coastguard Worker
26*1c60b9acSAndroid Build Coastguard WorkerMaster branch is the default and all new work happens there.  It's unstable and
27*1c60b9acSAndroid Build Coastguard Workersubject to history rewrites, patches moving about and being squashed etc.  In
28*1c60b9acSAndroid Build Coastguard Workerterms of it working, it is subject to passing CI tests including a battery of
29*1c60b9acSAndroid Build Coastguard Workerruntime tests, so if it is passing CI as it usually is then it's probably in
30*1c60b9acSAndroid Build Coastguard Workerusable shape.  See "Why no history on development" below for why it's managed like
31*1c60b9acSAndroid Build Coastguard Workerthat.
32*1c60b9acSAndroid Build Coastguard Worker
33*1c60b9acSAndroid Build Coastguard Worker![all work happens on main](../doc-assets/lws-relpol-1.svg)
34*1c60b9acSAndroid Build Coastguard Worker
35*1c60b9acSAndroid Build Coastguard WorkerIf you have patches (you are a hero) they should be targeted at `main`.
36*1c60b9acSAndroid Build Coastguard Worker
37*1c60b9acSAndroid Build Coastguard WorkerTo follow such a branch, `git pull` is the wrong tool... the starting point
38*1c60b9acSAndroid Build Coastguard Workerof what you currently have may no longer exist remotely due to rearranging the
39*1c60b9acSAndroid Build Coastguard Workerpatches there.  Instead use a flow like this:
40*1c60b9acSAndroid Build Coastguard Worker
41*1c60b9acSAndroid Build Coastguard Worker```
42*1c60b9acSAndroid Build Coastguard Worker $ git fetch https://libwebsockets.org/repo/libwebsockets +main:m && git reset --hard m
43*1c60b9acSAndroid Build Coastguard Worker```
44*1c60b9acSAndroid Build Coastguard Worker
45*1c60b9acSAndroid Build Coastguard WorkerThis fetches current remote development branch into local branch `m`, and then forces your
46*1c60b9acSAndroid Build Coastguard Workerlocal checkout to exactly match `m`.  This replaces your checked-out tree
47*1c60b9acSAndroid Build Coastguard Workerincluding any of your local changes, so stash those first, or use stgit or so
48*1c60b9acSAndroid Build Coastguard Workerto pop them before updating your basis against lws development.
49*1c60b9acSAndroid Build Coastguard Worker
50*1c60b9acSAndroid Build Coastguard Worker## Stable branches
51*1c60b9acSAndroid Build Coastguard Worker
52*1c60b9acSAndroid Build Coastguard WorkerMaster is very useful for coordinating development, and integrating WIP,
53*1c60b9acSAndroid Build Coastguard Workerbut for distros or integration into large user projects some stability is often
54*1c60b9acSAndroid Build Coastguard Workermore desirable than the latest development work.
55*1c60b9acSAndroid Build Coastguard Worker
56*1c60b9acSAndroid Build Coastguard WorkerPeriodically, when development seems in good shape and various new developments seem
57*1c60b9acSAndroid Build Coastguard Workerto be working, it's copied out into a versioned stable branch, like `v4.0-stable`.
58*1c60b9acSAndroid Build Coastguard Worker
59*1c60b9acSAndroid Build Coastguard Worker![stable branches are copied from development](../doc-assets/lws-relpol-2.svg)
60*1c60b9acSAndroid Build Coastguard Worker
61*1c60b9acSAndroid Build Coastguard WorkerThe initial copy is tagged with, eg, `v4.0.0`.
62*1c60b9acSAndroid Build Coastguard Worker
63*1c60b9acSAndroid Build Coastguard Worker(At that time, development's logical version is set to "...99", eg, `v4.0.99` so
64*1c60b9acSAndroid Build Coastguard Workerversion comparisons show that development version is "later" than any other
65*1c60b9acSAndroid Build Coastguard Workerv4.0 version, which will never reach 99 point releases itself, but "earlier"
66*1c60b9acSAndroid Build Coastguard Workerthan, eg, v4.1.)
67*1c60b9acSAndroid Build Coastguard Worker
68*1c60b9acSAndroid Build Coastguard Worker## Backport policy
69*1c60b9acSAndroid Build Coastguard Worker
70*1c60b9acSAndroid Build Coastguard WorkerDevelopment continues, and as part of that usually bugs are reported and / or
71*1c60b9acSAndroid Build Coastguard Workerfixes found that may apply not just to current development, but the version of
72*1c60b9acSAndroid Build Coastguard Workerthe development branch that was copied to form the last -stable branch.
73*1c60b9acSAndroid Build Coastguard Worker
74*1c60b9acSAndroid Build Coastguard WorkerIn that case, the patch may be backported to the last stable branch to also fix
75*1c60b9acSAndroid Build Coastguard Workerthe bug there.  In the case of refactors or major internal improvements, these
76*1c60b9acSAndroid Build Coastguard Workertypically do not get backported.
77*1c60b9acSAndroid Build Coastguard Worker
78*1c60b9acSAndroid Build Coastguard WorkerThis applies only to fixes and public API-neutral internal changes to lws... if
79*1c60b9acSAndroid Build Coastguard Workernew features were backported or API changes allowed, then there would be
80*1c60b9acSAndroid Build Coastguard Workermultiple apis under the same version name and library soname, which is
81*1c60b9acSAndroid Build Coastguard Workermadness.
82*1c60b9acSAndroid Build Coastguard Worker
83*1c60b9acSAndroid Build Coastguard WorkerWhen new stable releases are made, the soname is bumped reflecting the API is
84*1c60b9acSAndroid Build Coastguard Workerdifferent than that of previous versions.
85*1c60b9acSAndroid Build Coastguard Worker
86*1c60b9acSAndroid Build Coastguard Worker![backports from main to stable](../doc-assets/lws-relpol-3.svg)
87*1c60b9acSAndroid Build Coastguard Worker
88*1c60b9acSAndroid Build Coastguard WorkerIf there is something you need in a later lws version that is not backported,
89*1c60b9acSAndroid Build Coastguard Workeryou need to either backport it yourself or use a later lws version.
90*1c60b9acSAndroid Build Coastguard WorkerUsing a more recent version of lws (and contributing fixes and changes so you
91*1c60b9acSAndroid Build Coastguard Workeryourself can get them easily as well as contributing for others) is almost
92*1c60b9acSAndroid Build Coastguard Workeralways the correct way.
93*1c60b9acSAndroid Build Coastguard Worker
94*1c60b9acSAndroid Build Coastguard Worker## Stable point releases
95*1c60b9acSAndroid Build Coastguard Worker
96*1c60b9acSAndroid Build Coastguard WorkerPeriodically fix patches pile up on the -stable branch and are tagged out as
97*1c60b9acSAndroid Build Coastguard Worker"point releases".  So if the original stable release was "v3.0.0", the point
98*1c60b9acSAndroid Build Coastguard Workerrelease may be "v3.0.1".
99*1c60b9acSAndroid Build Coastguard Worker
100*1c60b9acSAndroid Build Coastguard Worker![point releases of stable](../doc-assets/lws-relpol-4.svg)
101*1c60b9acSAndroid Build Coastguard Worker
102*1c60b9acSAndroid Build Coastguard Worker## Critical fixes
103*1c60b9acSAndroid Build Coastguard Worker
104*1c60b9acSAndroid Build Coastguard WorkerSometimes a bug is found and fixed that had been hiding for a few versions.
105*1c60b9acSAndroid Build Coastguard WorkerIf the bug has some security dimension or is otherwise important, we may
106*1c60b9acSAndroid Build Coastguard Workerbackport it to a few recent releases, not just the last one.  This is pretty
107*1c60b9acSAndroid Build Coastguard Workeruncommon though.
108*1c60b9acSAndroid Build Coastguard Worker
109*1c60b9acSAndroid Build Coastguard Worker![backport to multiple stable branches](../doc-assets/lws-relpol-5.svg)
110*1c60b9acSAndroid Build Coastguard Worker
111*1c60b9acSAndroid Build Coastguard Worker## Why no history on the development branch
112*1c60b9acSAndroid Build Coastguard Worker
113*1c60b9acSAndroid Build Coastguard WorkerGit is a wonderful tool that can be understood to have two main modes of operation,
114*1c60b9acSAndroid Build Coastguard Workermerge and rebase that are mutually exclusive.  Most devs only use merge / pull,
115*1c60b9acSAndroid Build Coastguard Workerbut rebase / fetch is much more flexible.  Developing via rebases allows me to
116*1c60b9acSAndroid Build Coastguard Workerdispense with feature branches during development and enables tracking multiple
117*1c60b9acSAndroid Build Coastguard Workerin-progress patches in-tree by updating them in place.  If this doesn't make
118*1c60b9acSAndroid Build Coastguard Workersense or seems heretical to you, it's OK I don't need devsplain'ing about it,
119*1c60b9acSAndroid Build Coastguard Workerjust sit back and enjoy the clean, rapid development results.
120*1c60b9acSAndroid Build Coastguard Worker
121*1c60b9acSAndroid Build Coastguard WorkerSince stable branches don't allow new features, they are run as traditional trees
122*1c60b9acSAndroid Build Coastguard Workerwith a history, like a one-way pile of patches on top of the original release.  If
123*1c60b9acSAndroid Build Coastguard WorkerCI shows something is messed up with the latest patch, I will edit it in-place if
124*1c60b9acSAndroid Build Coastguard Workerit has only been out for a few hours, but there is no re-ordering or other history
125*1c60b9acSAndroid Build Coastguard Workermanipulation.
126*1c60b9acSAndroid Build Coastguard Worker
127