Hello snapcrafters! The snapcraft team is pleased to announce that version 2.40 of snapcraft.
Contributions
This release saw some excellent contributions from outside the snapcraft core team, and we want to give a shout out to those folks. A team thank you to:
New in this release
Core
Base support
Initial support for bases has been added. To use this feature for example targeting the new-to-be core18
base snap, Just add this entry to your snapcraft.yaml
:
base: core18
You should ideally be running snapcraft from 18.04 to test this feature. Keep in mind that there is still no transparent cleanbuild or project container support for this, it was quickly enabled to get the feature rolling end to end for eager developers wanting to target this new core base.
Improved elf mangling
This functionality is triggered when the build environment is newer than a given base (experimental) or when confinement
is set to classic
. Most of the improvements are related to the underpinnings of snapcraft to make this a joyful and unsurprising experience as a developer.
This version introduces better detection of DT_NEEDED
and snapcraft's lifecycle execution for their discovery. It is now also optimized to only handle these scenarios when creating a snap of type app
(the implicit default). There's proper architecture detection of elf files and error handling of non-elf files. The list of RPATH
has improved so elf files make use of $ORIGIN
for easier relocation (a rather important feature when creating snaps). The extraction of the correct linker has also been optimized.
patchelf
has also been SRUed into 16.04 LTS to enable the full extent of architectures out of the box.
execstack
Many binaries that made their way into a snap from pre-built binaries have been making their way in with the execstack bit set on binaries, which caused unexpected behaviors. Given that execstack is not a common thing binaries would need enabled, snapcraft now strips the execstack bit from binaries after going through the files in prime
.
This feature can be disabled per part, as the warning for when it happens mentions, by setting:
parts:
part-name:
build-attributes: [keep-execstack]
appstream
Better appstream integration, now by making use of common-id
under an apps
entry, if the information is extracted using the information extraction feature introduced in 2.39, the desktop file and icon is provisioned automatically.
This common-id is also indexed by the Snap Store for proper deduplication of apps on store fronts. Read more about the feature on the new docs site
Plugins
catkin
ROS Kinetic recently released an update that caused Kinetic-based snaps to start failing due to a hard-coded path to Python. This release sees that fixed by the Catkin plugin dynamically rewriting these files to use Python from the PATH instead.
This release also sees the addition of support for recursive rosinstall files. If you have a rosinstall file that resolves to another repository with rosinstall files you also would like to satisfy, simply set recursive-rosinstall: true
and Catkin will recursively handle rosinstall files until it has handled them all.
CLI
version
You can now run snapcraft version
just as well as snapcraft --version
bash completion
The bash completion script snapcraft has provided has been hooked up to work with the snap.
Final notes
To get the source for this release, check it out on github. For the full extent of changes, take a glance at https://github.com/snapcore/snapcraft/milestone/16?closed=1
A great place to collaborate and discuss features, bugs and ideas on snapcraft are the forums. Please also feel free to file a bug.
Happy snapcrafting!
-- Sergio and the team