Change from core24 to core26¶
This is a guide for migrating a snap that uses core24 as its base to core26.
Core26 is built from Ubuntu 26.04 LTS. For most snaps, the migration consists of checking dependencies and extensions. If your snap has strict confinement and runs Python code, you need to add a Python runtime.
Stability and workarounds¶
In the wake of a new core, some of the updated features and packages your snap relies on will be unstable for a time.
This is to be expected with complex software. A short-term fix or workaround in your
snap’s parts, packages, and scriptlets might be needed. But sometimes, a temporary fix
becomes permanent. It’s a good practice to explain your workarounds with comments in
your project’s snapcraft.yaml.
Update the base¶
Start by updating the base key:
- base: core24
+ base: core26
Check extension support¶
Not all extensions are compatible with core26 at its launch. If your snap uses an
extension, run snapcraft extensions to see if it’s available for core26. If your
snap uses an extension that does not yet support core26, it’s best to wait to upgrade.
GNOME extension¶
The GNOME extension supports core26, but no
longer adds the gsettings plug automatically. If an app in your snap used GSettings to
store its configuration on core24, or is a settings manager that reads or
modifies host settings, declare the plug manually by adding gsettings to the app’s
plugs key. Keep any existing plugs in the list. This preserves access to existing
settings instead of switching to a private database. The GSettings guidance describes when the plug is needed
and the behavior without it.
On core26, the extension also adds automatic library cleanup, which removes bundled libraries provided by the content snaps. If your snap was relying on a different version of a GNOME library that is also provided in the GNOME content snap, it will no longer be allowed to do so under the same library SONAME.
Update part names¶
If you update a snap to use core26, then you must also verify its part names. Part names on core26 and later bases can’t contain any forward slashes (/). We recommend replacing them with a hyphen (-):
base: core26
# ...
parts:
- my/part:
+ my-part:
Update the packages¶
Package names and versions change between Ubuntu releases. If you have parts that declare build-packages or stage-packages, you might need to update those packages in your project file.
Build your snap and note any dependent packages that fail to resolve. Search the
Ubuntu package archive for the equivalent on Ubuntu
26.04, and update build-packages and stage-packages accordingly.
A package may have been split, merged, or renamed:
stage-packages:
- libexample3t64 # renamed from libexample3 in core26
Repackage Python¶
Core26 has updated its Python support commitment, and doesn’t ship with Python. Going forward, all strictly-confined snaps that run Python must pack a separate Python binary.
The optimal solution is to define a separate part, and stage the Python runtime inside it:
parts:
python-runtime:
plugin: nil
stage-packages:
- libpython3.14-minimal
- libpython3.14-stdlib
- python3-minimal # for the "python3" symlink
- python3.14-minimal
- python3.14-venv
my-app:
after: [python-runtime]
source: .
plugin: python
Replace snapcraftctl¶
With core26, snapcraftctl is replaced with craftctl.
In your project file’s scriptlets, find and replace all instances of snapcraftctl with
craftctl. For example:
- snapcraftctl pull
+ craftctl default
- snapcraftctl set-grade stable
+ craftctl set grade=stable
Update Spread test systems¶
Snaps should behave the same regardless of the host operating system, but testing on Ubuntu 26.04 may expose failures, such as classically-confined snaps incorrectly accessing host packages.
If your project uses the test command for integration
testing, it’s recommended to test your snap with Ubuntu 26.04. Add it to the list of
systems in your project’s spread.yaml:
systems:
- ubuntu-24.04
- ubuntu-26.04
Retaining older releases in the Spread configuration is recommended.