Skip to content

Commit 7c95b97

Browse files
sync Linux distro package release documentation (#921)
Co-authored-by: Kevin Albertson <[email protected]>
1 parent 3dec577 commit 7c95b97

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

etc/releasing.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,33 @@ git push --set-upstream origin releases/v3.8
150150
```
151151

152152
The new branch should be continuously tested on Evergreen. Create a BUILD ticket to request the build team create new Evergreen project to track the `releases/vx.y` branch (see BUILD-5666 for an example).
153+
154+
## Handle Linux Distribution Packages
155+
156+
Note: updates to these instructions should be synced to the corresponding C driver process documentation Google doc.
157+
158+
### Debian
159+
160+
- For the first Debian package release on a new release branch, edit `debian/gbp.conf` and update the `upstream-branch` and `debian-branch` variables to match the name of the new release branch (e.g., `releases/v3.x`); both variables will have the same value
161+
- The Debian package release is made after the upstream release has been tagged
162+
- Create a new changelog entry (use the command ‘dch -i’ to ensure proper formatting, then adjust the version number on the top line of the changelog as appropriate
163+
- Make any other necessary changes to the Debian packaging components (e.g., update to standards version, dependencies, descriptions, etc.) and make relevant entries in `debian/changelog` as needed
164+
- Use `git add` to stage the changed files for commit (only files in the `debian/` directory should be committed), then commit them (the `debcommit` utility is helpful here)
165+
- Build the package with `gbp buildpackage` and inspect the resulting package files (at a minimum use `debc` on the `.changes` file in order to confirm files are installed to the proper locations by the proper packages and also use `lintian` on the `.changes` file in order to confirm that there are no unexpected errors or warnings; the `lintian` used for this check should always be the latest version as it is found in the unstable distribution)
166+
- If any changes are needed, make them, commit them, and rebuild the package
167+
- It may be desirable to squash multiple commits down to a single commit before building the final packages
168+
- Once the final packages are built, they can be signed and uploaded and the version can be tagged using the `--git-tag` option of `gbp buildpackage`
169+
- After the commit has been tagged, switch from the release branch to the `master` branch and cherry-pick the commit(s) made on the release branch that touch only the Debian packaging (this will ensure that the packaging and especially the changelog on the master remain up to date)
170+
- The final steps are to sign and upload the package, push the commits on the release branch and the master branch to the remote, and push the Debian package tag
171+
172+
### Fedora
173+
174+
- After CXX-2226, the RPM spec file has been vendored into the project; it needs to be updated periodically
175+
- Starting in the project root directory, retrieve the latest spec file: `curl -L -o .evergreen/mongo-cxx-driver.spec https://src.fedoraproject.org/rpms/mongo-cxx-driver/raw/rawhide/f/mongo-cxx-driver.spec`
176+
- Confirm that our spec patch applies to the new downstream spec: `patch --dry-run -d .evergreen -p0 -i spec.patch`
177+
- If the patch command fails, rebase the patch
178+
- For a new major release (e.g., 3.6.0, 3.7.0, etc.), then ensure that the patch updates the `up_version` to be the NEXT major version (e.g., when releasing 3.7.0, the spec patch should update `up_version` to 3.8.0); this is necessary to ensure that the spec file matches the tarball created by the dist target; if this is wrong, then the `rpm-package-build` task will fail in the next step
179+
- Additionally, ensure that any changes made on the release branch vis-a-vis the spec file are also replicated on the `master` or `main` branch
180+
- Test the build with something like this: `evergreen patch -p cxx-driver -v packaging -t rpm-package-build -f`
181+
- There is no package upload step, since the downstream maintainer handles that and we only have the Evergreen task to ensure that we do not break the package build
182+
- The same steps need to be executed on active release branches (e.g., `releases/v3.6`), which can usually be accomplished via `git cherry-pick` and then resolving any minor conflicts

0 commit comments

Comments
 (0)