Skip to content

Commit a7629ca

Browse files
authored
Polish Fedora release doc (#26)
Fix sha512sum extension (tar.bz2), replace EOL f39/f40 with an <active-fedora> placeholder, sweep smart quotes, parameterize the changelog header version, clarify the lib389 PyPI trigger (pushed tag, not Bodhi), note Rawhide skips fedpkg update, and explain SKIP_AUDIT_CI=1. Assisted by: Cursor
1 parent 241c98c commit a7629ca

2 files changed

Lines changed: 69 additions & 35 deletions

File tree

docs/389ds/howto/howto-fedora-release-process.md

Lines changed: 65 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ title: "Fedora Release Process"
66
------------------------
77
{% include toc.md %}
88

9+
> **Note on examples:** the commands below use `2.4.4` as the example version and `<active-fedora>` as a placeholder for the Fedora branch (e.g. `f42`, `f43`, `rawhide`). Substitute the version you are releasing and the branch you are targeting.
10+
11+
> **Release order — read first.** The canonical sequence is:
12+
> 1. Tag and generate the source tarball locally (DS section below).
13+
> 2. Push the tag upstream (see *DS - Push the updates and the tag*).
14+
> 3. **Create the GitHub release** and attach the tarball as a release asset (see *DS - GitHub release*).
15+
> 4. **Build Fedora Rawhide using the tarball downloaded from the GitHub release** — do not regenerate a fresh tarball at this point. The GH release artifact is the canonical source for everything downstream (Fedora and lib389), so all consumers install the same bytes.
16+
> 5. Repeat the Fedora build on each stable branch (`f43`, `f42`, ...) using the same GH release tarball, then submit Bodhi updates.
17+
> 6. Publish lib389 to PyPI ([howto](howto-lib389-pypi-release.html)) once the GH release exists and Fedora Rawhide is in.
18+
919
### Prerequisites
1020

1121
- A FAS account at https://accounts.fedoraproject.org/
@@ -38,45 +48,61 @@ title: "Fedora Release Process"
3848
git checkout 389-ds-base-2.4
3949

4050
- Commit any fixes that have not yet been applied
41-
- Update **VERSION.sh** and set the new version string
51+
- Update **VERSION.sh** and set the new version string. Then run `python3 src/lib389/validate_version.py --update` to sync `src/lib389/pyproject.toml` before you tag or run **`make -f rpm.mk dist-bz2`**: the tarball you upload to Fedora (Rawhide first) includes `src/lib389/`, and a mismatch here only surfaces at the eventual PyPI release.
4252

43-
git commit -a -m Bump version to 2.4.4"
53+
git commit -a -m "Bump version to 2.4.4"
4454

4555

46-
- Apply tag / Generate the source tarball / Generate changelog file
56+
- Apply tag / Generate the source tarball / Generate changelog file (`SKIP_AUDIT_CI=1` skips the npm audit step during the dist build)
4757

4858
rm -rf src/cockpit/389-console/dist src/cockpit/389-console/cockpit_dist
4959

50-
TAG=389-ds-base-1.3.9.1 ; git tag $TAG ; git archive --prefix=$TAG $TAG | bzip2 > $TAG.tar.bz2 ; git log --oneline 389-ds-base-1.3.9.0.. > /tmp/cl-info
5160
TAG=389-ds-base-2.4.4 ; git tag $TAG ; export TAG ; SKIP_AUDIT_CI=1 make -f rpm.mk dist-bz2 ; git log --oneline 389-ds-base-2.4.3.. > /tmp/cl-info
5261

5362
- Notes:
5463
- Changelog file (**/tmp/cl-info**) is used for updating the specfile changelog section and release notes. Remove the hash prefix value for all bugzilla and github issues. Leave the hash for coverity/misc updates.
5564
- All commits must be done before **git tag**, otherwise you might need to use **git tag -f \$TAG**
56-
- Dont forget the revision range notation
65+
- Do not forget the revision range notation
66+
67+
68+
### **DS** - GitHub release
69+
70+
Once the tag has been pushed upstream, publish the GitHub release **before** uploading anything to Fedora dist-git. The tarball attached here is the canonical source artifact: Fedora Rawhide, the stable Fedora branches, and lib389 on PyPI all consume **the same bytes** from this GH release.
71+
72+
- Draft a new release at <https://github.com/389ds/389-ds-base/releases/new> against the pushed tag (e.g. `389-ds-base-2.4.4`).
73+
- Attach the source tarball generated above (`389-ds-base-2.4.4.tar.bz2`) and, when applicable, `jemalloc-5.3.0.tar.bz2` as release assets.
74+
- Publish the release.
75+
76+
Then download the published tarball locally — the rest of this document assumes the Fedora `fedpkg new-sources` / `fedpkg upload` step uses **this file**, not a freshly regenerated one. Re-download `jemalloc-*.tar.bz2` the same way only if it was refreshed for this release; otherwise the existing copy in the lookaside cache is reused.
77+
78+
GH_TAG=389-ds-base-2.4.4
79+
cd /home/$USER/source/ds389/389-ds-base
80+
curl -L -O https://github.com/389ds/389-ds-base/releases/download/$GH_TAG/$GH_TAG.tar.bz2
5781

5882

5983
### **Fedora** - Dist-Git - New release
60-
In general, when we do a new build, we push changes to rawhide first, so that the development branch has the newest bits, then to active Fedora releases ( f39, f40)
84+
In general, when we do a new build, we push changes to rawhide first, so that the development branch has the newest bits, then to currently supported Fedora releases. The fedpkg commands below use `<active-fedora>` as a placeholder for the target branch (`rawhide`, `f42`, `f43`, ...); start with `rawhide`, then repeat the same steps on each stable branch you need to update.
85+
86+
> **Use the GH release tarball.** Both `fedpkg new-sources` and `fedpkg upload` below must point at the tarball downloaded from the GitHub release in the previous section, not a locally regenerated one. This is what guarantees Fedora and PyPI ship matching artifacts.
6187
6288
- Checkout the source
6389

6490
cd /home/$USER/source/fedora/389-ds-base
65-
git checkout f39
91+
git checkout <active-fedora>
6692

6793
- Go back to the DS source directory, which should be uncleaned after the tarball creation
6894

6995
cd /home/$USER/source/ds389/389-ds-base
7096

71-
- Update Fedora spec file with Rust packages data
97+
- Update Fedora spec file with Rust packages data
7298

7399
DS_SPECFILE=/home/$USER/source/fedora/389-ds-base/389-ds-base.spec make -f rpm.mk bundle-rust
74-
100+
75101
- On 1.4.3:
76102

77103
FEDORA_SPECFILE=/home/$USER/source/fedora/389-ds-base/389-ds-base.spec make -f rpm.mk bundle-rust-on-fedora
78104

79-
- Go back to Fedora repo directory
105+
- Go back to Fedora repo directory
80106

81107
cd /home/$USER/source/fedora/389-ds-base
82108

@@ -88,38 +114,38 @@ In general, when we do a new build, we push changes to rawhide first, so that th
88114

89115
- Update version
90116

91-
- Update new changelog entry header (Paste the line generated)
92-
117+
- Update new changelog entry header (Paste the line generated). `$VERSION` should be set to the release version, e.g. `VERSION=2.4.4`.
118+
93119
cd /home/$USER/source/ds389/389-ds-base
94-
git log -n 1 --pretty=format:'* %ad %an <%ae> - 2.4.4' --date=format:"%a %b %d %Y"
120+
git log -n 1 --pretty=format:"* %ad %an <%ae> - $VERSION" --date=format:"%a %b %d %Y"
95121
cd /home/$USER/source/fedora/389-ds-base
96122

97123

98124
- Update new changelog entry commits from the changelog (/tmp/cl-info), paste from clipboard into spec file
99125

100126
sed 's/^[^ ]*/-/' /tmp/cl-info | xclip
101127

102-
- Config kerb / Confirm version / Upload tar file
128+
- Config kerb / Confirm version / Upload tar file. The `389-ds-base-*.tar.bz2` referenced below is the **tarball downloaded from the GitHub release**, not a freshly regenerated one (see *DS - GitHub release*).
103129

104130
kinit <FAS_USERNAME>@FEDORAPROJECT.ORG
105131
fedpkg verrel
106132
fedpkg new-sources /home/$USER/source/ds389/389-ds-base/389-ds-base-2.4.4.tar.bz2 /home/$USER/source/ds389/389-ds-base/jemalloc-5.3.0.tar.bz2
107133

108-
- Add tar ball created by git archive cmd from above, and always include **jemalloc**. Another option is just **uploading** the recent tarball (lookaside cache)
134+
- Re-upload **jemalloc** only if it changed since the previous release; otherwise the source tarball alone is enough. If the sources entry already exists in lookaside, use `fedpkg upload` instead:
109135

110-
fedpkg upload /home/$USER/source/ds389/389-ds-base/389-ds-base-2.4.4.tar.bz2**
136+
fedpkg upload /home/$USER/source/ds389/389-ds-base/389-ds-base-2.4.4.tar.bz2
111137

112138
- **git status** - Should show the "sources" and ".gitignore" are staged
113139

114140
- Remove any useless tarballs from the **sources** file
115141

116-
- Create a “*.src.rpm” file
117-
118-
fedpkg --release f39 srpm
142+
- Create a "*.src.rpm" file
119143

120-
- Do a scratch build to make sure everything is working
144+
fedpkg --release <active-fedora> srpm
121145

122-
fedpkg --release f39 scratch-build --srpm=389-ds-base-2.4.4-1.fc39.src.rpm --arches=x86_64
146+
- Do a scratch build to make sure everything is working. Use the exact `.src.rpm` filename produced by the previous step — fedpkg names it with the actual Fedora version (`fc42`, `fc43`, ...), which for `rawhide` is whatever Rawhide currently maps to:
147+
148+
fedpkg --release <active-fedora> scratch-build --srpm=389-ds-base-2.4.4-1.fcNN.src.rpm --arches=x86_64
123149

124150
- If the build is successful generate a clog (change log file)
125151

@@ -131,31 +157,38 @@ In general, when we do a new build, we push changes to rawhide first, so that th
131157

132158
- Push the changes
133159

134-
git push origin f39
160+
git push origin <active-fedora>
135161

136162
- Do the official Koji build, save the resulting URL for later
137163

138-
fedpkg --release f39 build --nowait
164+
fedpkg --release <active-fedora> build --nowait
139165

140166
- An email will be sent from Koji telling you if the build was successful, or can just monitor the build link
141167

142-
- Do **fedpkg update** for each branch you did a build for. This will submit this build to "bohdi" for the final Fedora release. Save the resulting URL for later
168+
- Do **fedpkg update** for each stable branch you did a build for. This will submit the build to Bodhi for the final Fedora release. Save the resulting URL for later. Skip this step for **rawhide** — Rawhide builds do not go through Bodhi.
143169

144170
fedpkg update
145-
171+
146172
- And edit as follows:
147173

148174
type=bugfix
149175
request=testing
150-
bugs= <leave blank if there are no Fedora OS specific bugs included in the release>
176+
bugs= <leave blank if there are no "Fedora OS" specific bugs included in the release>
151177
autokarma=True
152178
stable_karma=1
153179
unstable_karma=-1
154180

155181

182+
### lib389 PyPI (after the GH release and Fedora Rawhide)
183+
184+
Publish **lib389** to PyPI **after** the GitHub release exists and the Fedora **Rawhide** build has gone in. The order matters: the GH release defines the canonical tarball, Fedora Rawhide is the first downstream consumer of those bytes, and lib389 is the third — releasing PyPI first or skipping ahead of Rawhide breaks the "everyone installs the same artifact" guarantee.
185+
186+
You do **not** need to wait for Bodhi to reach stable, or for the rebuilds on stable Fedora branches — the trigger is "GH release published + Rawhide built". See [How to lib389 PyPI release](howto-lib389-pypi-release.html) for the full procedure.
187+
188+
156189
### **Fedora** - Dist-Git Option 2 - Test build with patches
157190

158-
Let assume rawhide branch contains some fixes that are partial (or broken) and you want to do a rawhide build with a crafted list of patches
191+
Assume the rawhide branch contains some fixes that are partial (or broken) and you want to do a rawhide build with a crafted list of patches
159192

160193
- Prepare the source with selected list of patches on top of **2.0.4** for example
161194

@@ -218,7 +251,7 @@ Let assume rawhide branch contains some fixes that are partial (or broken) and y
218251

219252
- Do scratch build. commit and push changes
220253

221-
fedpkg scratch-build --srpm=389-ds-base-2.0.4-3.xxxxx.src.rpm** **--arches=x86_64
254+
fedpkg scratch-build --srpm=389-ds-base-2.0.4-3.xxxxx.src.rpm --arches=x86_64
222255
fedpkg clog
223256
git commit -a -F clog
224257
git push origin rawhide
@@ -232,18 +265,18 @@ Let assume rawhide branch contains some fixes that are partial (or broken) and y
232265

233266
### **DS** - Push the updates and the tag
234267

235-
NOTE: Do not push the tags until you are sure the builds were successful! Once you push a tag, you cannot change it - if you need to make a change to fix a build problem, you will essentially have to repeat all of the steps again, since this will involve a new source version.
268+
NOTE: Do not push the tag until the local `make -f rpm.mk dist-bz2` build has completed successfully (per the release-order overview, the tag push happens before the GitHub release and the Koji builds). Once you push a tag, you cannot change it - if you need to make a change to fix a build problem, you will essentially have to repeat all of the steps again, since this will involve a new source version.
236269

237270
NOTE: Do not git push -\\\-tags - you may inadvertently push tags you did not intend - push tags specifically by name
238271

239-
cd /home/source/ds389/ds
272+
cd /home/$USER/source/ds389/389-ds-base
240273
git push origin 389-ds-base-2.2
241274
git push origin refs/tags/389-ds-base-2.2.2
242275

243276

244277
### Update The Wiki (internal use only)
245278

246-
I found ghostwriter useful for displayig the markdown file changes.
279+
Ghostwriter is useful for previewing markdown file changes.
247280

248281
- Checkout the wiki source code
249282

@@ -264,7 +297,7 @@ I found ghostwriter useful for displayig the markdown file changes.
264297

265298
- Update the sources page
266299

267-
sha512sum 389-ds-base-2.4.4.tar.gz
300+
sha512sum 389-ds-base-2.4.4.tar.bz2
268301
/home/$USER/source/dswiki/389ds.github.io/docs/389ds/development/source.md
269302

270303
- Push your updates

docs/389ds/howto/howto-lib389-pypi-release.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ title: "How to lib389 PyPI Release"
88

99
### Important Notes
1010

11-
- lib389 should be released **AFTER** the Fedora release process is complete
12-
- lib389 version **MUST** match the 389-ds-base version that was released to Fedora
13-
- Ideally, release lib389 in the same state it was released in Fedora packages
11+
- **Release order:** GitHub release -> Fedora Rawhide build -> **then** lib389 PyPI. Publishing lib389 before the GH release exists, or before Fedora Rawhide has been built from that GH release tarball, breaks the guarantee that `pip install lib389` and `dnf install 389-ds-base` ship the same `src/lib389/` bytes.
12+
- lib389 should be released **AFTER** the Fedora Rawhide build has landed (you do not need to wait for Bodhi to reach stable on the older Fedora branches).
13+
- lib389 version **MUST** match the 389-ds-base version of the GitHub release / Fedora Rawhide build.
14+
- Ideally, release lib389 from the same source tree state that produced the GH release tarball — see the *DS - GitHub release* step in [Fedora Release Process](howto-fedora-release-process.html).
1415

1516
### Prerequisites
1617

0 commit comments

Comments
 (0)