You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org
Portal:Toolforge/Admin/Packaging
This page is currently a draft. More information and discussion about changes to this draft on the talk page. |
This page contains information on the various packaging situations we do related to Toolforge. This refers specifically to Debian packages (.deb).
packages
Approximate list of .deb packages we handle for Toolforge:
- tools-webservice https://gerrit.wikimedia.org/r/operations/software/tools-webservice
- jobutils
- TODO
sbuild
The sbuild
tool is a simple and powerful tool to build debian packages.
Our packaging building hosts have sbuild ready to use. The first time you try to use sbuild you should add yourself to the sbuild unix group:
user@tools-package-builder-02:~$ sudo sbuild-adduser $LOGNAME
[..]
user@tools-package-builder-02:~$ newgrp sbuild
There should be environments to build packages for the most common distros: jessie, stretch, buster.
You can switch between them easily:
user@tools-package-builder-02:mypackage/$ sbuild -d jessie
[..]
user@tools-package-builder-02:mypackage/$ sbuild -d stretch
[..]
user@tools-package-builder-02:mypackage/$ sbuild -d buster
[..]
Sometimes the build-deps required to clean the source tree are not installed outside the chroot. To workardound this, use the --no-clean-source
switch when calling sbuild.
Adding extra repos and packages is super easy, check the --extra-repository
option in the sbuild manpage.
Additional upstream documentation: https://wiki.debian.org/sbuild
old methods
TODO perhaps put here yuvi's method and bryan's method from Portal:Toolforge/Admin#Bd808's_method_(pdebuild).
wmcs-package-build
This is a script to automate most of the build & publish steps of the process.
See wmcs-package-build section in the admin scripts page.
For the toolsbeta project
Try first in the toolsbeta project for testing purposes before releasing in the tools project.
For that, build the package and upload it to the -toolsbeta variants of the aptly repos:
user@laptop:~$ wmcs-package-build.py --git-repo https://gerrit.wikimedia.org/r/operations/software/tools-webservice -a stretch-toolsbeta
[..]
Then you can install the package in toolsbeta servers for testing.
For the tools project
Once testing is done and you are confident with a given package version, you can just run the script again and have the package upload to the final destination:
user@laptop:~$ wmcs-package-build.py --git-repo https://gerrit.wikimedia.org/r/operations/software/tools-webservice -a stretch-tool
[..]
packaging good practices
Some good practices, advises and hints about our packaging workflows:
- use the
sbuild
tool to build the packages. - when a new package is released (i.e, uploaded to a repository and/or distributed to clients) a git tag should be created in the git repository with the format debian/version.
- use the
gbp dch
tool to generate debian/changelog file. This reads the git log to generate changelog entries. Make changes to d/changelog in a separate commit. - TODO.
See also
TODO.