Happy Pi Day folks!
Today we’re releasing the first beta release of Charmcraft 3.0. It’s currently building and will be in the latest/beta
and 3.x/beta
snap channels soon!
New Features
- In this release, you can start using Ubuntu 24.04 for your charms. (Please see below)
Breaking changes!
We’ve got a few breaking changes, mostly to align charmcraft with other craft apps like snapcraft and rockcraft. The highlights are:
- The
prime
keyword no longer adds extra files to a charm. If you need this functionality, please use the dump plugin instead. - The
bases
keyword is deprecated. All bases that were supported in Charmcraft 2.x (Ubuntu LTS up to 22.04, CentOS 7, AlmaLinux 9) still accept these, but new bases will all use theplatforms
keyword incharmcraft.yaml
(details below). - The
--bases-index
parameter is deprecated. Please start using the new--platform
parameter instead
platforms
The good news: Your current charms using the bases
keyword should continue to build as expected!
The bad news: If you want to use Ubuntu 24.04 for your charm, you’ll need to change your charm.
The short version: Here’s an example replacement for bases
in an Ubuntu 24.04 charm:
base: ubuntu@24.04
build-base: ubuntu@24.04 # Optional
platforms:
amd64:
This will build and run your charm on Ubuntu 24.04 for amd64. Full documentation is incoming before the final release, but it works roughly the same way as Rockcraft, so you can probably reference their documentation in the meantime.
Please note that this does mean that from Ubuntu 24.04 and on, we don’t support a single charmcraft.yaml
building charms for multiple bases.
Feedback
As usual, please feel free to file bug reports or open PRs.