Auditing Licenses in KDE Frameworks FreeBSD Packaging

FreeBSD is getting more serious about license metadata in the packages produced by the project — that is, the binary distribution of software produced from licensed source code. A lot of software in FreeBSD “proper” is (naturally) BSD-licensed, and a lot of Free Software packaged by FreeBSD is (also naturally) GPL licensed. But the different licenses carry different obligations, so it’s good to keep track of the exact licensing applied to each bit of software.

To this end, there’s the LICENSE= line in each port’s Makefile. Its meaning is “this software has such-and-such a license”. For conciseness, SPDX identifiers are used, so that you can write

LICENSE=LGPL21

and we know what you mean. Because licenses can carry textual obligations (e.g. the GPL expects you to receive a copy, and the BSD licenses generally require you to include the copyright notice with distributions), there’s
an additional setting to include the actual text, called LICENSE_FILES:

LICENSE_FILES=COPYING.LIB

There’s a third source of license information, and that is the headers of the sources themselves. Usually you put a copyright-and-license header at the top of each file; some licenses such as the MPL even require some administration in there. The reuse.software site (by the FSFE) provides good guidance and best-practices information for providing licensing metadata in software packages.

Anyway, for KDE Frameworks 5 I was going through the ports Makefiles and adding LICENSE information. The KDE Licensing Policy tells me that frameworks should be licensed LGPL21+, with a few variants allowed; an interesting one is (at your option) “LGPL21 or LGPL3 or any later version approved by KDE e.V.” Right now, in 2017, this choice is the same as LGPL21+ because no later versions exist, but it is not always-in-the-future-same, so I hesitate to write

LICENSE=LGPL21+

for KDE Frameworks until I’ve checked the files. The license text is usually included, but it’s not quite consistently named, so I need to look into the tarballs anyway. And as a double-check, I read a couple of source headers to see if the license named in the code, matches the license text elsewhere (e.g. some files say LGPL 2.1 only).

It’s a bit of a slow process — one which upstream (that is, the source code) could support a little better with consistent naming. It’s also a process that needs to be monitored continually, to ensure that the whole body of software remains properly and consistently licensed — hopefully following best practices, too.

Anyway, as of today only ten of the KDE Frameworks 5 ports in the official FreeBSD ports repository  have all their licensing information set, to the best of my ability to check their accuracy. As an ongoing project in keeping-license-info up-to-date it’s not very high-priority but something that gets done in-between other things.

Retrospectacle

At the beginning of 2017, I was a programmer (mostly Python, and a little bit of C++) and spent most of my day at my desk, with an IDE open and a cup of coffee at hand. At the end of 2017, I’m a programmer (mostly C++, and a little bit of Python) and spend most of my day at my desk, with an IDE open and a cup of espresso at hand.

At some level of abstraction, not much has changed this year.

Of course, now I spend my entire day working on Free Software, in three different but partly-overlapping communities: KDE, FreeBSD, and Calamares. Basically you can track everything I do each day by looking in the relevant repositories on GitHub (read-only mirrors in the case of FreeBSD and KDE). Inspired by Michael, Krita, Matthieu Gallien (with the this-week-in-Elisa series) and Dominik Haumann, I’ve collected a list of things I did this year, in no particular order:

  • Released two versions of the proprietary application I worked on previously, and quit my job. Started working for BlueSystems and other organizations as a free-lance yet full-time programmer.
  • Updated Nethack in FreeBSD, and discovered I no longer have the Nethack chops to ascend half of the games I start. Updated Unnethack on FreeBSD, and fixed a clang-related bug upstream. Yay for roguelikes.
  • Released a dozen Calamares versions with regular bugfixes and small features. Worked together with the KDE VDG, Jens in particular, to figure out some of the UI choices — thanks for plying me with ideas.
  • Updated CMake a couple of times in FreeBSD and chased lots of weird CMakeLists code in unrelated applications.
  • Massaged KDE on FreeBSD under the expert guidance of Tobias and Raphael.
  • Attended three weeks of KDE-related sprints or meetings and a week of Akademy.

Here’s to a productive year, and looking forward to the same in 2018. You can see more of what happened in KDE in 2017 on the KDE year-end fundraiser page.

Sayonara

Not goodbye, but hello to a new music player on my desktop. It is already packaged for FreeBSD and has a long development history.

Music players stand or fall per individual user whether they satisfy the user’s needs — no duh there, but it means I should note what my use cases are before enthusing about some music player in particular. I would be fine with playing music from the command-line, most of the time: mpg123 --shuffle /mnt/music/*/*/* is just about right (except it fails with an argument list too long error in the shell). This is for music-while-I-hack, so I don’t listen too closely, it’s not hi-fi at all, basically I want “play in a genre until I switch it off“. Tagging is largely done when ripping my CDs (I still buy physical media!) and I don’t care for album art (I can look in the jewel case if I want that, and they’re all stacked in boxes upstairs). So play, pause, stop .. and if it can avoid mixing Mahler with Morrissey and Mötorhead, that’s a bonus.

Screenshot of Sayonara main windowOff to the left here is Sayonara, which describes itself as:

Sayonara is a small, clear and fast audio player for Linux written in C++, supported by the Qt framework. It uses GStreamer as audio backend. Sayonara is open source and uses the GPLv3 license. One of Sayonara’s goals is intuitive and easy usablility. Currently, it is only available for Linux.

Clearly that’s not true, because it’s available for FreeBSD as well 🙂 . I forget how I configured it; there’s a File > Open Directory entry and I probably filled in /mnt/music and it went and found everything that gstreamer will sensibly play. The screenshot is of the minimal playlist-only view. It can be broadened to include a library view which is a bit chaotic, but which searches reasonably well (e.g. for Mudhoney). Sayonara is actually where I discovered the luxury of stay-on-genre autoplay: when I started on some Dutch punk and it kept pretty close to that, wandering off to de Kift occasionally — but no Drs.P.

I contributed a few small fixes to get Sayonara building on FreeBSD, cleaning up the CMakeLists for newer CMake, that kind of thing. Now that it runs on my Plasma desktop all day, I can spot some more  minor issues — the system tray media player control doesn’t interact with Sayonara at all, for instance. For my use-case, that’s not so important, since the fire-and-forget genre play does it for me until I hit pause in the main UI.

I’m looking forward to KDE music players Elisa and Babe, for comparison purposes: maybe they tick my requirements-boxes just as well, or better. Certainly Elisa seems to be fairly playing-music-focused. I’ve even got a FreeBSD port for Elisa ready, just waiting for Qt 5.9 to show up on my doorstep (I can get it to compile against 5.7, but it won’t run due to QML runtime thingies).

CMake 3.10 on FreeBSD

The CMake port on FreeBSD is in the hands of the KDE-FreeBSD folks (since KDE was an early adopter), and generally it falls to me to do the CMake update while Tobias is still wrestling with Plasma and Raphael massages Qt 5.9 into our way of building. 3.10 was released five weeks ago, and it took a while to update the port.

It doesn’t take long because of CMake — they’re great, the code builds flawlessly, and there has been a real effort on the part of the KitWare folks recently to absorb our downstream patches so that we have less work in future (During the delay packaging CMake 3.10.0 Kitware even put out 3.10.1, which re-started some processes). It doesn’t take long because of new FreeBSD-specific features in CMake — you can now use CPack to create native FreeBSD packages, just in case you don’t want to go through the ports system or poudriere.

Nope, the problem is the 2000-odd ports using CMake. These generally behave, but every CMake update brings with it some ports that suddenly don’t build. So I spent a day on things like openvsp and scalapack, which fall over with 3.10 (and didn’t with 3.9). The causes of these failures is diverse; sometimes bad local CMake modules that don’t add all the right linking flags, sometimes bad C++ code, sometime stuff that has nothing to do with CMake at all but just happens to be newly triggered, and therefore my problem.

CMake 3.10.1 landed in the official ports tree with r457041, just before Christmas.

Naturally, there are some cases that fall out after an update, that are not caught before the update is committed. I’m told that FreeBSD on PowerPC doesn’t have a C++11-capable compiler installed by default, so I’ll need to massage that a little. Boost 1.66 came out very shortly after CMake 3.10.1, and that leads to new kinds of breakage. I’ve spent a half day compiling and re-compiling ceph, a distributed filesystem, trying to get that to work. It’s amazing sometimes how shifting one brick can bring down a whole house, and how we ever built the house in the first place.

Switching Distro’s

Obviously I still use FreeBSD on the desktop; with the packages from area51 I have a full and modern KDE Plasma environment. We (as in, the KDE-FreeBSD team) are still wrestling with getting the full Plasma 5 into the official ports tree (stalled, as so often it has been, on concerns of backwards compatibility), but things like CMake 3.10.1 and Qt 5.9 are sliding into place. Slowly, like brontosauruses driving a ’57 Cadillac.

In the meantime, I do most of my Calamares development work — it is a Linux installer, after all — in VMs with some Linux distro installed. Invariably — and especially when working on tools that do the most terrible things to the disks attached to a system — I totally break the system, the VM no longer starts at all, and my development environment is interrupted for a bit.

That’s always a good moment to switch distro’s .. since I’m going to spend an hour or so re-invigorating the VM anyway, reminding myself that this time I’ll make a clone and keep snapshots and whatnot, I may as well see what others use Calamares for. I’ve left a dusty and broken KDE Neon and a Manjaro behind me, and today I’m starting on Kaos.

For the very reason that Calamares can break stuff, and because new Calamares versions need to be tested on (older) live ISO images, there’s a deploycala Python3 script that helps install all the (development) dependencies needed. This is a bit of a drag, since it’s tied to a whole bunch of distro’s specific package names, but it gets the job done. I update it whenever I hit a new distro.

Kaos Linux Logo
Kaos Linux Logo

Kaos is a KDE-leading-edge distro, and daaannnggg is it ever slick in the first 10 minutes of use. The customization of Calamares is some of the nicest I’ve seen. The release-notes page could use some work (on my part) .. if only because I could read that stuff during unsquashfs, instead of before it. First-time startup with Kaptan is a hardly-intrusive way of configuring a bunch of separate things that would require a careful trip through systemsettings.

Look for the next few Calamares releases (in particular 3.2) to emerge from the Kaos, then.

More Calamares Releases

Another month passed, just like that. I spent last week holed up with some KDE people in the hills, watching the snow come down. While they did impressive things to the KDE codebase, I hacked on Calamares. Since my last post on the topic, I’ve been running a roughly every-other-week release schedule for the Calamares 3.1-stable branch. We’ve just reached 3.1.10. The reason for these stable releases is small bugfixes, minor polishing, and occasional non-interfering features.

Each release is announced on the Calamares site, and can be found on the Calamares GitHub page.

Calamares isn’t a KDE project, and aims to support whatever Linux distro wants to use it, and to configure the stuff that is needed for that distro. But when feature requests show up for KDE integration, there’s no special reason for me to reject them — as long as things can remain modular, the SKIP_MODULES mechanism in Calamares can avoid unwanted KDE Frameworks dependencies.

One new module in development is called “Plasma Look-and-Feel” (plasmalnf) and the purpose there is to configure the look-and-feel of Plasma. No surprise there, but ther point is that this can be done during installation, before Plasma is started by the (new) user on the target system. So kind of like the Look-and-Feel KCM, but entirely outside of the target environment. The UI is more primitive, more limited, but that’s the use-case that was asked for. I’d like to thank the Plasma developers for helping out with tooling and guiding me through some of the Plasma code, and deployers of Calamares (that is, distro’s) can look forward to this feature in the 3.2 series.

Speaking of Calamares 3.2, I’m intending to put out an RC fairly soon, with the features as developed so far. There will probably be a few RCs each of which integrates a new feature branch (e.g. a giant requirements-checking rewrite) with 3.2.0 showing up for real in the new year.

Calamares releases

It’s been a quiet month for me for blogging, but one filled with unexpected and weird and not-really-bloggable things. There was a trip to Berlin, where I had the pleasure of meeing up with a bunch of KDE people whom I hadn’t seen for over a month. Long time. There was also an accident with maple syrup, I’m sure.

Anyway, there have been four (!) Calamares releases since I last wrote about it on august 23rd (two months ago). These mix various bugfixes with various regression-fixes. This illustrates that I need a better set of acceptance tests before releasing — which take a surprisingly long time to set up, since the regressions are things like “Installing Chakra with network packages fails”, not simple stuff that is OS-, hardware- and installation-independent.

The latest release fixes that Chakra (or, rather, Calamares netinstall) problem. I’m happy to report that there’s a few new Linuxen evaluating Calamares as a system installer.

Plans for the near future include a 3.2 with some new features and much nicer support from new KPMCore releases, and ongoing care for the 3.1.x series. When and how, is in the hands of the vagaries of inspiration and long sessions with pen and paper figuring out just how things should work.

Switched to Plasma 5

I’ve switched to using Plasma 5 as my daily (work) desktop. “So what?” you say, since Plasma 5 has been available since July 15th, 2014. Yep, more than three years on the desktop — see Sebas’s blog for some history. So I’ve finally switched my FreeBSD desktop machine, as a sign that Plasma 5 really is coming closer to the official FreeBSD ports tree.

KDE Applications are starting to trickle in to the official ports tree. The first (I think) was FileLight, which gave a good illustration of the gotcha’s involved with the update:

  • Anything that touches baloo requires a radical update to Plasma 5 as a whole. Baloo 4 and baloo 5 are not happy side-by side, and we don’t intend to put serious effort into installing them in separate places.
  • Translations are tricky, because they have moved from (KDE 4 times) a separate i18n package, to the application package. This means that the new KF5-based application package conflicts with the old KDE4 application, but also with the entire translation package (for, say, Russian) for KDE4.

For people who want the whole thing now, and who understand that KDE4 co-existence with Plasma 5 and modern KDE Applications can be problematic, the official ports tree can be avoided, and Area51 is the repository or ports tree to use.

On my desktop, on 10.3-STABLE and with nVidia drivers, Plasma 5 is more stable than on 12-CURRENT with tricksy Intel IGP drivers on the laptop. That’s a good thing, for the desktop I spend all week in writing code.

KMail and Akonadi have decided that my local maildirs are not accessible, so I’m using mutt for the time being to look at those. All my IMAP (knock on wood) is fine, so there’s still an intriguing bug there. In Randa I showed the effect and the messages to Dan and Volker, who were likewise intrigued. In the
end, though, it needs to be debugged and fixed here, locally, and then upstreamed.

At some point, the KDE-FreeBSD team had in mind to have Plasma 5 in the official ports tree in 2017Q2. It’s looking like 2017Q4, now (with just 5 days to go in Q3), basically because the upgrade path is annoying (from a ports perspective). Not for any functional reason, which is why it’s worth repeating that Plasma 5 from Area51 is a fine, fully functional, and fully up-to-date KDE desktop.

[[ Edit 2017-09-27 14:18 because Phoronix manages to get everything wrong, all the time: Tobias has been using Plasma 5 as his FreeBSD desktop of choice for years, dogfooding the ports much better than I ever have. And while I might be the noisiest blogger of our lot, that’s .. not necessarily a position of leadership. ]]

New FreeBSD Committer

I’ve been part of the KDE Community for over 15 years .. maybe 20. I started with Red Hat Linux, and then ran Yellow Dog Linux with KDE on my work desktop; probably KDE 1.1.2. But mostly I was one of the FreeBSD and Solaris people. I packaged KDE for Solaris on big Sun iron like the E10k, and then for FreeBSD around 2005 (I know this because of at least one wonderfully descriptive commit message Add boogers on July 26th, 2005 in Area51), and then for OpenSolaris for a while, and moved back to FreeBSD when OpenSolaris went away.

So in a sense I have been part-time part of the FreeBSD Community for nearly 15 years as well. FreeBSD has reached Tier-1 status within KDE now, with the KDE FreeBSD CI, which much stronger upstreaming happening, and with Tobias and Raphael following new releases pretty closely. I’ve been pushing and prodding at our ports tree a lot, and chasing CMake releases (and reporting bugs), and trying to get some KDE KF5-based applications into the official ports tree. So I’m happy to now receive a FreeBSD ports commit bit, with Tobias and Raphael acting as mentors. I won’t pretend this will immediately lead to Qt 5.9 and KDE Applications 17.latest in the official FreeBSD ports tree, but it increases the (direct) effort we can expend on it.

For my FreeBSD hat, I can be reached at adridg@, like my KDE hat is groot@ .

Randa-progress post-hoc

So, back in Randa I was splitting my energies and attentions in many pieces. Some attention went to making pancakes and running the kitchen in the morning — which is stuff I take credit for, but it is really Grace, and Scarlett, and Thomas who did the heavy lifting, and Christian and Mario who make sure the whole thing can happen. And the attendees of the Randa meeting who pitch in for the dishes after lunch and dinner. The Randa meetings are more like a campground than a 5-star hotel, and we work together to make the experience enjoyable. So thanks to everyone who pitched in.

Part of a good sprint is keeping the attendees healthy and attentive — otherwise those 16-hour hacking days really get to you, in spite of the fresh Swiss air.

Frederik encouraged us to touch the floor and the ceiling with his acro-yoga sessions; it is good to get out of the hacking room and get into shape. These sessions also teach us all trust and cooperation. And between sessions, he fixed a Qt bug that probably affects Calamares accessibility.

Calamares had some more bugs squashed, its accessibility improved — although I need to test that again and again on different setups now that I’m home, since it needs time to re-build Qt and all. Even with this fix, the goal to reduce Calamares’ root-needs remains.

You can read more of what the attendees in Randa achieved on planet KDE (e.g. kdenlive, snappy, kmymoney, marble, kube, Plasma mobile, kdepim, and kwin). I’d like to give a special shout out to Manuel, who taught me one gesture in Italian Sign Langauage — which is different from American or Dutch Sign Language, reminding me that there’s localization everywhere.

For me, being back home means sitting back at my big FreeBSD box, hacking on Calamares and ARPA and CMake and stuff again, with a renewed sense of purpose and team thanks to having worked together in Randa. If you like what KDE achieves in Randa, consider still supporting the fundraiser so that we can return to the mountains next year.