https://github.com/cantera/cantera-ubuntu
Docker-based system for preparing and testing builds of Cantera packages for the Ubuntu PPA
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 1 committers (100.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Repository
Docker-based system for preparing and testing builds of Cantera packages for the Ubuntu PPA
Basic Info
- Host: GitHub
- Owner: Cantera
- Language: Shell
- Default Branch: main
- Size: 35.2 KB
Statistics
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
Cantera Ubuntu Packages
This repository contains a Docker-based system for preparing and testing builds of Cantera packages for the Ubuntu PPA.
Prerequisites
- Check out a copy of the
canterarepository that includes the Debian packaging info in~/src/cantera - Make sure you have created a GPG key and registered it with
Launchpad, that you have membership in the
cantera-team, that the key is not expired, and that it is stored in~/.gnupg.- Check for key expiration by running
gpg --list-keys - If you have an expired key, the exiration date can be updated by running
gpg --quick-set-expire KEYID PERIOD, wherePERIODcan be something like2y. - Launchpad requires that your key is registered with
keyserver.ubuntu.com. If you have not previously registered the key, or you have updated its expiration date, you will need to send it using the command:gpg --keyserver keyserver.ubuntu.com --send-keys <yourkeyID> - Then go through the process of updating the key on Launchpad.
- Check for key expiration by running
- Check out a copy of this repository in
~/src/cantera-ubuntu - Install Docker in "rootless" mode, or otherwise set it up so your user can run the
docker buildcommand
Preparing branches to build Ubuntu packages
General ideas
- Keep a branch for each Ubuntu series and Cantera version that we currently support,
e.g.
ubuntu20.04-ct2.6. This branch contains the contents of thedebiansubdirectory, where all of the package-specific files live. - For each new Ubuntu series, create new branches from the preceding series.
- For each new Cantera release, create new branches from the tagged commits for the
last release that was along the
mainbranch, i.e. not on a maintenance branch like2.4. - Tag the commits for the versions that get uploaded to Launchpad and actually work (knowing that there will be failures)
- Delete the old branches when we stop publishing packages for a particular series or Cantera version - we'll still have the tagged commits to track the history.
Steps for a new Cantera release branch
Using Cantera 2.6.0 release as an example
- Use the "pristine" release tar file that includes the contents of both the
Cantera/canteraandCantera/cantera-example-datarepositories (see instructions in the release checklist). For stable and beta releases, this should be the tar file uploaded to the GitHub release.- Rename this file according to the pattern
cantera_2.6.0~b2.orig.tar.gz - Once this file has been uploaded to Launchpad for a particular version, that exact file must be used for all subsequent uploads (for example, for builds targeting different Ubuntu releases). If you lose this file, download it again from a different Launchpad build rather than trying to recreate it.
- Rename this file according to the pattern
- Check out the branch for the most recent Ubuntu release supported by the previous
Cantera release, e.g.
git checkout ubuntu20.04-ct2.6 - Create a new branch for the new Cantera version, e.g.
git checkout -b ubuntu20.04-ct2.6. - Merge the release commit, e.g.
git merge v2.6.0 - Add a new entry to
debian/changelogdch -ican be used to automatically generate a template for the Changelog message- replace
UNRELEASEDwith the correct Ubuntu series name (e.g.bionic) - Delete the suffix
ubuntu1in the version. The version should look like2.5.0-1+focal0, where: 2.5.0is the Cantera release-1is an Ubuntu package version number, which should be incremented for any changes that affect the packages for any Ubuntu seriesfocal0names the series, with a suffix that is incremented for each build for that series. This number must be incremented each time the package is uploaded to Launchpad, even if the build fails.- For alpha/beta releases, a
~needs to be inserted before the alpha/beta suffix so they will be seen as coming before the stable release, for example2.5.0~b2-1+focal0. - Add a message, e.g.
New upstream release - If you create the Changelog entry manually, running
date --rfc-2822will give you a correctly formatted date string.
- Update the library package names in
debian/controlto correspond to the Cantera minor release version, for examplelibcantera2.6andlibcatnera-fortran2.6. - Likewise, update
SO_VERSIONindebian/rules. - Commit all changes
- Create additional branches starting from the merge commit for each supported Ubuntu
release. You may need to remove some
changelogentries to make sure the versions are strictly increasing.
Steps for adding a new Ubuntu version
- Update the list of Ubuntu versions in
build_images.sh - Create a new branch, starting from the branch for the latest Cantera & Ubuntu release,
with the naming pattern
ubuntuYY.MM-ctX.Z - Create a new entry in
debian/changelogfollowing the above guidelines
Deal with any patches needed
- Install
sudo apt install git-buildpackage - Create
.git/gbp.confwith contents that look like the following:ini [DEFAULT] upstream-branch = main upstream-tag = v%(version)s debian-branch = ubuntu20.04-ct2.6 - Run
gbp pq importto convert the existing patches into a new "patch queue" branch- If the patch queue branch already exists, run
gbp pq rebaseinstead.
- If the patch queue branch already exists, run
- Make any changes desired and commit them to this branch. This can include cherry-picking commits onto this branch.
- Run
gbp pq export. This will create the patch files and return you to thedebian-branch - Run
git add debian/patchesandgit commit.
Create Docker images for each supported Ubuntu version
- Run
build_images.sh
Build & test packages
- Update
vars.shto specify the correct values forSHORT_VERSION,FULL_VERSION,BASE_REFandPPA_TARGET.- For stable releases,
PPA_TARGET=cantera-team/Cantera - For alpha/beta releases,
PPA_TARGET=cantera-team/cantera-unstable. - Also, remember that alpha/beta versions must include a tilde to maintain correct
version order, for example
3.0.0~b1.
- For stable releases,
- Launch a Docker container for an Ubuntu version, e.g.
./run.sh 21.10 - To test the package build, run
./build.shfrom inside the container. Fix any errors by making additional commits in thecanterarepo on the host system. Changes made at this stage do not require incrementing the build number. - To install the generated packages locally and run some tests, run:
./test-python-local.sh./run-samples-local.sh
- To just install the packages without running the tests directly, run
./install-python-local.shand/or./install-dev-local.sh - You can check the dependencies and other package metadata by running the command
dpkg-deb -I ./packaging/<package-name>.deb
Upload to Launchpad
- If the test build succeeds, upload to Launchpad by running
./put.sh. This should prompt you for the passphrase on your GPG key in order to sign the package. - If the Launchpad build succeeds, test installing and using the resulting package by running:
./test-python-ppa.sh./run-samples-ppa.sh- Check that
ck2yamland any other binaries are available as expected
- To just install the packages without running the tests directly, run
./install-ppa.sh - If the build works, tag the relevant commit using the Ubuntu version string, e.g.
ubuntu-2.5.0-1+focal1. - Repeat this process for each supported Ubuntu series.
Backporting dependencies
Note: these instructions have not been updated for the Docker-based process
We may need to backport some of our dependencies for older Ubuntu releases, and upload them to the PPA as well. The approximate process for this is as follows:
apt install devscripts
export DEBEMAIL="you@somewhere.com"
export DEBFULLNAME="Your Name"
mkdir -p ~/src/somepackage-backport
cd ~/src/somepackage-backport
Go to the page for the version of the package you want on https://packages.ubuntu.com,
and get the url for the 'dsc' file. Then, run:
dget -u http://archive.ubuntu.com/ubuntu/pool/main/blahblahblah.dsc
The -u flag is needed because I haven't figured out yet how to get it to verify
signatures correctly.
cd into the package directory, then run:
dch -i
And complete the new Changelog message.
- replace
UNRELEASEDwith the correct Ubuntu release name (e.g.bionic) - replace the suffix
ubuntu1in the version with a correctly sequenced name including the release, likebionic2. This version should be greater than any version previously uploaded to the PPA. - Add a message, e.g. "Backport to Bionic"
Save and close, then run:
debuild -S
Install any missing build dependencies that it yells about, if necessary. Cross fingers and hope for the best. Finally, run:
cd ..
dput ppa:launchpad_username/ppa_name somepackage......._source.changes
Owner
- Name: Cantera
- Login: Cantera
- Kind: organization
- Website: https://cantera.org
- Twitter: CanteraSoftware
- Repositories: 36
- Profile: https://github.com/Cantera
A suite of object-oriented software tools for problems involving chemical kinetics, thermodynamics, and/or transport processes.
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ray Speth | s****h@m****u | 31 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 2
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- speth (2)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- ubuntu $ubuntu_release build