KDE neon CMake Package Validation

In KDE neon‘s constant quest of raising the quality bar of KDE software and neon itself, I added a new tool to our set of quality assurance tools. CMake Package QA is meant to ensure that find_package() calls on CMake packages provided by config files (e.g. FooConfig.cmake files) do actually work.

The way this works is fairly simple. For just about every bit of KDE software we have packaged, we install the individual deb packages including dependencies one after the other and run a dummy CMakeLists.txt on any *Config.cmake file in that package.

As an example, we have libkproperty3-dev as a deb package. It contains KPropertyWidgetsConfig.cmake. We install the package and its dependencies, construct a dummy file, and run cmake on it during our cmake linting.

cmake_minimum_required(VERSION 3.0)
find_package(KPropertyWidgets REQUIRED)

This tests that running KPropertyWidgetsConfig.cmake works, ensuring that the cmake code itself is valid (bad syntax, missing includes, what have you…) and that our package is sound and including all dependencies it needs (to for example meet find_dependency macro calls).

As it turns out libkproperty3-dev is of insufficient quality. What a shame.

ReleaseMe CI States, Help, Git

Since we recently wired up the KDE release tool releaseme with KDE neon’s git-build technology I had the opportunity to spend some quality time on the code and managed to sneak in a load of both quality and speed improvements as well as some new features.

CI States

For quite a while I’ve been considering to pull CI data into releaseme. It makes all sorts of sense. You want to release high-quality software, so whenever possible you’d want to make sure CI is green. But to do that you’d have to open a browser, navigate to build.kde.org, and find the right jobs. Yet, there is absolutely no reason why a human would have to do that. So now releaseme does it for you before getting started on assembling the sources.

Help

Unfortunately, the release process itself is often a bit convoluted and it is not clear what to do once you have a tarball. To help people with publishing their new tarball releaseme will now print a handy help suggesting common steps to take once you have a tarball. It also points to the relevant location for publishing tarballs on KDE infrastructure and even gives you a handy link with a sysadmin ticket template to quickly file a publishing request.

Git Builds

Aleix Pol worked on adding a cool new feature to the extra-cmake-modules frameworks, enabling everyone who builds from git to fetch translations as well. This is currently slated to release with KDE Frameworks 5.34. Once landed you’ll be able to run make fetch-translations with just about any git clone of KDE software and grab the latest translations into your build directory.

KDE neon With Testing Translations

For the longest time, the plan was to equip KDE neon’s Developer Editions with translations. As the Developer Editions are built directly from our Git repositories and we do not maintain translations alongside the source code, there is a bit of a problem as the build somehow needs to bridge the gap between code and translations.

It’s fortunate that I also happen to work on ReleaseMe, a KDE tarball release application, and rebuilt it from scratch years ago already, so it supports third party usage of some of its functionality.

At this year’s FOSDEM, Plasma developer David Edmundson asked for translations in the Developer Editions. And, so, here we are. Both KDE neon Developer Editions now include translations live from our Subversion repository. They also include our x-test language allowing you to easily find improperly internationalized strings. Coverage is currently limited to KDE Frameworks and Plasma software.

The majority of tech to accomplish this is hidden in the internals of ReleaseMe itself. On the high-level this entails nothing more than resolving the KDE project and then getting its translations into the Git tree.

projects = ReleaseMe::Project.from_repo_url(url)
unless projects.size == 1
  raise "failed to resolve project #{repo_name} :: #{projects}"
end
project = projects[0]

l10n = ReleaseMe::L10n.new(l10n_origin, project.identifier,
project.i18n_path)
l10n.default_excluded_languages = [] # Include even x-test.
l10n.get(Dir.pwd)

(Underneath there’s, of course, lots of fiddly nonsense going on ;))

Enjoy!