Feeds

Paul Tagliamonte: Domo Arigato, Mr. debugfs

Planet Debian - Sat, 2024-04-13 09:27

Years ago, at what I think I remember was DebConf 15, I hacked for a while on debhelper to write build-ids to debian binary control files, so that the build-id (more specifically, the ELF note .note.gnu.build-id) wound up in the Debian apt archive metadata. I’ve always thought this was super cool, and seeing as how Michael Stapelberg blogged some great pointers around the ecosystem, including the fancy new debuginfod service, and the find-dbgsym-packages helper, which uses these same headers, I don’t think I’m the only one.

At work I’ve been using a lot of rust, specifically, async rust using tokio. To try and work on my style, and to dig deeper into the how and why of the decisions made in these frameworks, I’ve decided to hack up a project that I’ve wanted to do ever since 2015 – write a debug filesystem. Let’s get to it.

Back to the Future It shouldn't shock anyone to learn I'm a huge fan of Go, right?

Time to admit something. I really love Plan 9. It’s just so good. So many ideas from Plan 9 are just so prescient, and everything just feels right. Not just right like, feels good – like, correct. The bit that I’ve always liked the most is 9p, the network protocol for serving a filesystem over a network. This leads to all sorts of fun programs, like the Plan 9 ftp client being a 9p server – you mount the ftp server and access files like any other files. It’s kinda like if fuse were more fully a part of how the operating system worked, but fuse is all running client-side. With 9p there’s a single client, and different servers that you can connect to, which may be backed by a hard drive, remote resources over something like SFTP, FTP, HTTP or even purely synthetic.

I even triggered a weird bug in vim when writing a 9p filesystem that wound up impacting WSL -- although it seems like maybe not due to 9p (rather, SMB)

The interesting (maybe sad?) part here is that 9p wound up outliving Plan 9 in terms of adoption – 9p is in all sorts of places folks don’t usually expect. For instance, the Windows Subsystem for Linux uses the 9p protocol to share files between Windows and Linux. ChromeOS uses it to share files with Crostini, and qemu uses 9p (virtio-p9) to share files between guest and host. If you’re noticing a pattern here, you’d be right; for some reason 9p is the go-to protocol to exchange files between hypervisor and guest. Why? I have no idea, except maybe due to being designed well, simple to implement, and it’s a lot easier to validate the data being shared and validate security boundaries. Simplicity has its value.

As a result, there’s a lot of lingering 9p support kicking around. Turns out Linux can even handle mounting 9p filesystems out of the box. This means that I can deploy a filesystem to my LAN or my localhost by running a process on top of a computer that needs nothing special, and mount it over the network on an unmodified machine – unlike fuse, where you’d need client-specific software to run in order to mount the directory. For instance, let’s mount a 9p filesystem running on my localhost machine, serving requests on 127.0.0.1:564 (tcp) that goes by the name “mountpointname” to /mnt.

Unfortunately, this requires root to mount and feels very un-plan9, but it does work and the protocol is good. $ mount -t 9p \ -o trans=tcp,port=564,version=9p2000.u,aname=mountpointname \ 127.0.0.1 \ /mnt

Linux will mount away, and attach to the filesystem as the root user, and by default, attach to that mountpoint again for each local user that attempts to use it. Nifty, right? I think so. The server is able to keep track of per-user access and authorization along with the host OS.

WHEREIN I STYX WITH IT "Simple" here is intended as my highest form of praise. Writing complex things is easy. Taking your work, and simplifying it down the core is the most difficult part of our work.

Since I wanted to push myself a bit more with rust and tokio specifically, I opted to implement the whole stack myself, without third party libraries on the critical path where I could avoid it. The 9p protocol (sometimes called Styx, the original name for it) is incredibly simple. It’s a series of client to server requests, which receive a server to client response. These are, respectively, “T” messages, which transmit a request to the server, which trigger an “R” message in response (Reply messages). These messages are TLV payload with a very straight forward structure – so straight forward, in fact, that I was able to implement a working server off nothing more than a handful of man pages.

There's also a 9P2000.L 9p variant which has more Linux specific extensions. There's a good chance I port this forward when I get the chance.

Later on after the basics worked, I found a more complete spec page that contains more information about the unix specific variant that I opted to use (9P2000.u rather than 9P2000) due to the level of Linux specific support for the 9P2000.u variant over the 9P2000 protocol.

MR ROBOTO It really bothers me rust libraries that deal with I/O need to support std::io, but to add support for async runtimes, you need to implement support for tokio::io and every other runtime; but them's the breaks I guess. I really miss Go's built-in async support and io module.

The backend stack over at zoo is rust and tokio running i/o for an HTTP and WebRTC server. I figured I’d pick something fairly similar to write my filesystem with, since 9P can be implemented on basically anything with I/O. That means tokio tcp server bits, which construct and use a 9p server, which has an idiomatic Rusty API that partially abstracts the raw R and T messages, but not so much as to cause issues with hiding implementation possibilities. At each abstraction level, there’s an escape hatch – allowing someone to implement any of the layers if required. I called this framework arigato which can be found over on docs.rs and crates.io.

/// Simplified version of the arigato File trait; this isn't actually /// the same trait; there's some small cosmetic differences. The /// actual trait can be found at: /// /// https://docs.rs/arigato/latest/arigato/server/trait.File.html trait File { /// OpenFile is the type returned by this File via an Open call. type OpenFile: OpenFile; /// Return the 9p Qid for this file. A file is the same if the Qid is /// the same. A Qid contains information about the mode of the file, /// version of the file, and a unique 64 bit identifier. fn qid(&self) -> Qid; /// Construct the 9p Stat struct with metadata about a file. async fn stat(&self) -> FileResult<Stat>; /// Attempt to update the file metadata. async fn wstat(&mut self, s: &Stat) -> FileResult<()>; /// Traverse the filesystem tree. async fn walk(&self, path: &[&str]) -> FileResult<(Option<Self>, Vec<Self>)>; /// Request that a file's reference be removed from the file tree. async fn unlink(&mut self) -> FileResult<()>; /// Create a file at a specific location in the file tree. async fn create( &mut self, name: &str, perm: u16, ty: FileType, mode: OpenMode, extension: &str, ) -> FileResult<Self>; /// Open the File, returning a handle to the open file, which handles /// file i/o. This is split into a second type since it is genuinely /// unrelated -- and the fact that a file is Open or Closed can be /// handled by the `arigato` server for us. async fn open(&mut self, mode: OpenMode) -> FileResult<Self::OpenFile>; } /// Simplified version of the arigato OpenFile trait; this isn't actually /// the same trait; there's some small cosmetic differences. The /// actual trait can be found at: /// /// https://docs.rs/arigato/latest/arigato/server/trait.OpenFile.html trait OpenFile { /// iounit to report for this file. The iounit reported is used for Read /// or Write operations to signal, if non-zero, the maximum size that is /// guaranteed to be transferred atomically. fn iounit(&self) -> u32; /// Read some number of bytes up to `buf.len()` from the provided /// `offset` of the underlying file. The number of bytes read is /// returned. async fn read_at( &mut self, buf: &mut [u8], offset: u64, ) -> FileResult<u32>; /// Write some number of bytes up to `buf.len()` from the provided /// `offset` of the underlying file. The number of bytes written /// is returned. fn write_at( &mut self, buf: &mut [u8], offset: u64, ) -> FileResult<u32>; } Thanks, decade ago paultag! If this isn't my record for longest idea-to-wip-project time, it's close.

Let’s do it! Let’s use arigato to implement a 9p filesystem we’ll call debugfs that will serve all the debug files shipped according to the Packages metadata from the apt archive. We’ll fetch the Packages file and construct a filesystem based on the reported Build-Id entries. For those who don’t know much about how an apt repo works, here’s the 2-second crash course on what we’re doing. The first is to fetch the Packages file, which is specific to a binary architecture (such as amd64, arm64 or riscv64). That architecture is specific to a component (such as main, contrib or non-free). That component is specific to a suite, such as stable, unstable or any of its aliases (bullseye, bookworm, etc). Let’s take a look at the Packages.xz file for the unstable-debug suite, main component, for all amd64 binaries.

$ curl \ https://deb.debian.org/debian-debug/dists/unstable-debug/main/binary-amd64/Packages.xz \ | unxz

This will return the Debian-style rfc2822-like headers, which is an export of the metadata contained inside each .deb file which apt (or other tools that can use the apt repo format) use to fetch information about debs. Let’s take a look at the debug headers for the netlabel-tools package in unstable – which is a package named netlabel-tools-dbgsym in unstable-debug.

Package: netlabel-tools-dbgsym Source: netlabel-tools (0.30.0-1) Version: 0.30.0-1+b1 Installed-Size: 79 Maintainer: Paul Tagliamonte <paultag@debian.org> Architecture: amd64 Depends: netlabel-tools (= 0.30.0-1+b1) Description: debug symbols for netlabel-tools Auto-Built-Package: debug-symbols Build-Ids: e59f81f6573dadd5d95a6e4474d9388ab2777e2a Description-md5: a0e587a0cf730c88a4010f78562e6db7 Section: debug Priority: optional Filename: pool/main/n/netlabel-tools/netlabel-tools-dbgsym_0.30.0-1+b1_amd64.deb Size: 62776 SHA256: 0e9bdb087617f0350995a84fb9aa84541bc4df45c6cd717f2157aa83711d0c60

So here, we can parse the package headers in the Packages.xz file, and store, for each Build-Id, the Filename where we can fetch the .deb at. Each .deb contains a number of files – but we’re only really interested in the files inside the .deb located at or under /usr/lib/debug/.build-id/, which you can find in debugfs under rfc822.rs. It’s crude, and very single-purpose, but I’m feeling a bit lazy.

Who needs dpkg?! Hilariously, the fourth? fifth? non-serious time (second serious time) I've had to do this for a new language.

For folks who haven’t seen it yet, a .deb file is a special type of .ar file, that contains (usually) three files inside – debian-binary, control.tar.xz and data.tar.xz. The core of an .ar file is a fixed size (60 byte) entry header, followed by the specified size number of bytes.

[8 byte .ar file magic] [60 byte entry header] [N bytes of data] [60 byte entry header] [N bytes of data] [60 byte entry header] [N bytes of data] ... I can't believe it's already been over a decade since my NM process, and nearly 16 years since I became an Ubuntu member.

First up was to implement a basic ar parser in ar.rs. Before we get into using it to parse a deb, as a quick diversion, let’s break apart a .deb file by hand – something that is a bit of a rite of passage (or at least it used to be? I’m getting old) during the Debian nm (new member) process, to take a look at where exactly the .debug file lives inside the .deb file.

$ ar x netlabel-tools-dbgsym_0.30.0-1+b1_amd64.deb $ ls control.tar.xz debian-binary data.tar.xz netlabel-tools-dbgsym_0.30.0-1+b1_amd64.deb $ tar --list -f data.tar.xz | grep '.debug$' ./usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug

Since we know quite a bit about the structure of a .deb file, and I had to implement support from scratch anyway, I opted to implement a (very!) basic debfile parser using HTTP Range requests. HTTP Range requests, if supported by the server (denoted by a accept-ranges: bytes HTTP header in response to an HTTP HEAD request to that file) means that we can add a header such as range: bytes=8-68 to specifically request that the returned GET body be the byte range provided (in the above case, the bytes starting from byte offset 8 until byte offset 68). This means we can fetch just the ar file entry from the .deb file until we get to the file inside the .deb we are interested in (in our case, the data.tar.xz file) – at which point we can request the body of that file with a final range request. I wound up writing a struct to handle a read_at-style API surface in hrange.rs, which we can pair with ar.rs above and start to find our data in the .deb remotely without downloading and unpacking the .deb at all.

I really like HTTP Range requests a lot. I did some stats to figure out what compression dbgsym packages use these days; my LAN debug mirror contains 113459 xz compressed tarfiles, and 9 gzip compressed tarfiles at the time of writing.

After we have the body of the data.tar.xz coming back through the HTTP response, we get to pipe it through an xz decompressor (this kinda sucked in Rust, since a tokio AsyncRead is not the same as an http Body response is not the same as std::io::Read, is not the same as an async (or sync) Iterator is not the same as what the xz2 crate expects; leading me to read blocks of data to a buffer and stuff them through the decoder by looping over the buffer for each lzma2 packet in a loop), and tarfile parser (similarly troublesome). From there we get to iterate over all entries in the tarfile, stopping when we reach our file of interest. Since we can’t seek, but gdb needs to, we’ll pull it out of the stream into a Cursor<Vec<u8>> in-memory and pass a handle to it back to the user.

From here on out its a matter of gluing together a File traited struct in debugfs, and serving the filesystem over TCP using arigato. Done deal!

A quick diversion about compression

I was originally hoping to avoid transferring the whole tar file over the network (and therefore also reading the whole debug file into ram, which objectively sucks), but quickly hit issues with figuring out a way around seeking around an xz file. What’s interesting is xz has a great primitive to solve this specific problem (specifically, use a block size that allows you to seek to the block as close to your desired seek position just before it, only discarding at most block size - 1 bytes), but data.tar.xz files generated by dpkg appear to have a single mega-huge block for the whole file. I don’t know why I would have expected any different, in retrospect. That means that this now devolves into the base case of “How do I seek around an lzma2 compressed data stream”; which is a lot more complex of a question.

After going through a lot of this, I realized just how complex the xz format is -- it's a lot more than just lzma2!

Thankfully, notoriously brilliant tianon was nice enough to introduce me to Jon Johnson who did something super similar – adapted a technique to seek inside a compressed gzip file, which lets his service oci.dag.dev seek through Docker container images super fast based on some prior work such as soci-snapshotter, gztool, and zran.c. He also pulled this party trick off for apk based distros over at apk.dag.dev, which seems apropos. Jon was nice enough to publish a lot of his work on this specifically in a central place under the name “targz” on his GitHub, which has been a ton of fun to read through.

The gist is that, by dumping the decompressor’s state (window of previous bytes, in-memory data derived from the last N-1 bytes) at specific “checkpoints” along with the compressed data stream offset in bytes and decompressed offset in bytes, one can seek to that checkpoint in the compressed stream and pick up where you left off – creating a similar “block” mechanism against the wishes of gzip. It means you’d need to do an O(n) run over the file, but every request after that will be sped up according to the number of checkpoints you’ve taken.

Given the complexity of xz and lzma2, I don’t think this is possible for me at the moment – especially given most of the files I’ll be requesting will not be loaded from again – especially when I can “just” cache the debug header by Build-Id. I want to implement this (because I’m generally curious and Jon has a way of getting someone excited about compression schemes, which is not a sentence I thought I’d ever say out loud), but for now I’m going to move on without this optimization. Such a shame, since it kills a lot of the work that went into seeking around the .deb file in the first place, given the debian-binary and control.tar.gz members are so small.

The Good

First, the good news right? It works! That’s pretty cool. I’m positive my younger self would be amused and happy to see this working; as is current day paultag. Let’s take debugfs out for a spin! First, we need to mount the filesystem. It even works on an entirely unmodified, stock Debian box on my LAN, which is huge. Let’s take it for a spin:

$ mount \ -t 9p \ -o trans=tcp,version=9p2000.u,aname=unstable-debug \ 192.168.0.2 \ /usr/lib/debug/.build-id/

And, let’s prove to ourselves that this actually mounted before we go trying to use it:

$ mount | grep build-id 192.168.0.2 on /usr/lib/debug/.build-id type 9p (rw,relatime,aname=unstable-debug,access=user,trans=tcp,version=9p2000.u,port=564)

Slick. We’ve got an open connection to the server, where our host will keep a connection alive as root, attached to the filesystem provided in aname. Let’s take a look at it.

$ ls /usr/lib/debug/.build-id/ 00 0d 1a 27 34 41 4e 5b 68 75 82 8E 9b a8 b5 c2 CE db e7 f3 01 0e 1b 28 35 42 4f 5c 69 76 83 8f 9c a9 b6 c3 cf dc E7 f4 02 0f 1c 29 36 43 50 5d 6a 77 84 90 9d aa b7 c4 d0 dd e8 f5 03 10 1d 2a 37 44 51 5e 6b 78 85 91 9e ab b8 c5 d1 de e9 f6 04 11 1e 2b 38 45 52 5f 6c 79 86 92 9f ac b9 c6 d2 df ea f7 05 12 1f 2c 39 46 53 60 6d 7a 87 93 a0 ad ba c7 d3 e0 eb f8 06 13 20 2d 3a 47 54 61 6e 7b 88 94 a1 ae bb c8 d4 e1 ec f9 07 14 21 2e 3b 48 55 62 6f 7c 89 95 a2 af bc c9 d5 e2 ed fa 08 15 22 2f 3c 49 56 63 70 7d 8a 96 a3 b0 bd ca d6 e3 ee fb 09 16 23 30 3d 4a 57 64 71 7e 8b 97 a4 b1 be cb d7 e4 ef fc 0a 17 24 31 3e 4b 58 65 72 7f 8c 98 a5 b2 bf cc d8 E4 f0 fd 0b 18 25 32 3f 4c 59 66 73 80 8d 99 a6 b3 c0 cd d9 e5 f1 fe 0c 19 26 33 40 4d 5a 67 74 81 8e 9a a7 b4 c1 ce da e6 f2 ff

Outstanding. Let’s try using gdb to debug a binary that was provided by the Debian archive, and see if it’ll load the ELF by build-id from the right .deb in the unstable-debug suite:

$ gdb -q /usr/sbin/netlabelctl Reading symbols from /usr/sbin/netlabelctl... Reading symbols from /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug... (gdb)

Yes! Yes it will!

$ file /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter *empty*, BuildID[sha1]=e59f81f6573dadd5d95a6e4474d9388ab2777e2a, for GNU/Linux 3.2.0, with debug_info, not stripped The Bad

Linux’s support for 9p is mainline, which is great, but it’s not robust. Network issues or server restarts will wedge the mountpoint (Linux can’t reconnect when the tcp connection breaks), and things that work fine on local filesystems get translated in a way that causes a lot of network chatter – for instance, just due to the way the syscalls are translated, doing an ls, will result in a stat call for each file in the directory, even though linux had just got a stat entry for every file while it was resolving directory names. On top of that, Linux will serialize all I/O with the server, so there’s no concurrent requests for file information, writes, or reads pending at the same time to the server; and read and write throughput will degrade as latency increases due to increasing round-trip time, even though there are offsets included in the read and write calls. It works well enough, but is frustrating to run up against, since there’s not a lot you can do server-side to help with this beyond implementing the 9P2000.L variant (which, maybe is worth it).

The Ugly

Unfortunately, we don’t know the file size(s) until we’ve actually opened the underlying tar file and found the correct member, so for most files, we don’t know the real size to report when getting a stat. We can’t parse the tarfiles for every stat call, since that’d make ls even slower (bummer). Only hiccup is that when I report a filesize of zero, gdb throws a bit of a fit; let’s try with a size of 0 to start:

$ ls -lah /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug -r--r--r-- 1 root root 0 Dec 31 1969 /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug $ gdb -q /usr/sbin/netlabelctl Reading symbols from /usr/sbin/netlabelctl... Reading symbols from /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug... warning: Discarding section .note.gnu.build-id which has a section size (24) larger than the file size [in module /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug] [...]

This obviously won’t work since gdb will throw away all our hard work because of stat’s output, and neither will loading the real size of the underlying file. That only leaves us with hardcoding a file size and hope nothing else breaks significantly as a result. Let’s try it again:

$ ls -lah /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug -r--r--r-- 1 root root 954M Dec 31 1969 /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug $ gdb -q /usr/sbin/netlabelctl Reading symbols from /usr/sbin/netlabelctl... Reading symbols from /usr/lib/debug/.build-id/e5/9f81f6573dadd5d95a6e4474d9388ab2777e2a.debug... (gdb)

Much better. I mean, terrible but better. Better for now, anyway.

Kilroy was here

Do I think this is a particularly good idea? I mean; kinda. I’m probably going to make some fun 9p arigato-based filesystems for use around my LAN, but I don’t think I’ll be moving to use debugfs until I can figure out how to ensure the connection is more resilient to changing networks, server restarts and fixes on i/o performance. I think it was a useful exercise and is a pretty great hack, but I don’t think this’ll be shipping anywhere anytime soon.

Along with me publishing this post, I’ve pushed up all my repos; so you should be able to play along at home! There’s a lot more work to be done on arigato; but it does handshake and successfully export a working 9P2000.u filesystem. Check it out on on my github at arigato, debugfs and also on crates.io and docs.rs.

At least I can say I was here and I got it working after all these years.

Categories: FLOSS Project Planets

Russell Coker: Software Needed for Work

Planet Debian - Sat, 2024-04-13 03:08

When I first started studying computer science setting up a programming project was easy, write source code files and a Makefile and that was it. IRC was the only IM system and email was the only other communications system that was used much. Writing Makefiles is difficult but products like the Borland Turbo series of IDEs did all that for you so you could just start typing code and press a function key to compile and run (F5 from memory).

Over the years the requirements and expectations of computer use have grown significantly. The typical office worker is now doing many more things with computers than serious programmers used to do. Running an IM system, an online document editing system, and a series of web apps is standard for companies nowadays. Developers have to do all that in addition to tools for version control, continuous integration, bug reporting, and feature tracking. The development process is also more complex with extra steps for reproducible builds, automated tests, and code coverage metrics for the tests. I wonder how many programmers who started in the 90s would have done something else if faced with Github as their introduction.

How much of this is good? Having the ability to send instant messages all around the world is great. Having dozens of different ways of doing so is awful. When a company uses multiple IM systems such as MS-Teams and Slack and forces some of it’s employees to use them both it’s getting ridiculous. Having different friend groups on different IM systems is anti-social networking. In the EU the Digital Markets Act [1] forces some degree of interoperability between different IM systems and as it’s impossible to know who’s actually in the EU that will end up being world-wide.

In corporations document management often involves multiple ways of storing things, you have Google Docs, MS Office online, hosted Wikis like Confluence, and more. Large companies tend to use several such systems which means that people need to learn multiple systems to be able to work and they also need to know which systems are used by the various groups that they communicate with. Microsoft deserves some sort of award for the range of ways they have for managing documents, Sharepoint, OneDrive, Office Online, attachments to Teams rooms, and probably lots more.

During WW2 the predecessor to the CIA produced an excellent manual for simple sabotage [2]. If something like that was written today the section General Interference with Organisations and Production would surely have something about using as many incompatible programs and web sites as possible in the work flow. The proliferation of software required for work is a form of denial of service attack against corporations.

The efficiency of companies doesn’t really bother me. It sucks that companies are creating a demoralising workplace that is unpleasant for workers. But the upside is that the biggest companies are the ones doing the worst things and are also the most afflicted by these problems. It’s almost like the Bureau of Sabotage in some of Frank Herbert’s fiction [3].

The thing that concerns me is the effect of multiple standards on free software development. We have IRC the most traditional IM support system which is getting replaced by Matrix but we also have some projects using Telegram, and Jabber hasn’t gone away. I’m sure there are others too. There are also multiple options for version control (although github seems to dominate the market), forums, bug trackers, etc. Reporting bugs or getting support in free software often requires interacting with several of them. Developing free software usually involves dealing with the bug tracking and documentation systems of the distribution you use as well as the upstream developers of the software. If the problem you have is related to compatibility between two different pieces of free software then you can end up dealing with even more bug tracking systems.

There are real benefits to some of the newer programs to track bugs, write documentation, etc. There is also going to be a cost in changing which gives an incentive for the older projects to keep using what has worked well enough for them in the past,

How can we improve things? Use only the latest tools? Prioritise ease of use? Aim more for the entry level contributors?

Related posts:

  1. Source Escrow for Proprietary Software British taxpayers are paying for extra support for Windows XP...
  2. Car Drivers vs Mechanics and Free Software In a comment on my post about Designing Unsafe Cars...
  3. Advertising Free Software Projects Today I just noticed the following advert on one of...
Categories: FLOSS Project Planets

This week in KDE: Explicit Sync

Planet KDE - Sat, 2024-04-13 01:46

This week something big got merged: support for Explicit Sync on Wayland!

What does this do? In a nutshell it allows apps to tell the compositor when to display frames on the screen, reducing latency and graphical glitches. The effect should be particularly noticeable with NVIDIA GPUs, which only support this rendering style, and not having support for it on Wayland was the most common source of random graphical glitches and slowdowns.

This work was done by Xaver Hugl, and lands in Plasma 6.1. You can read more about it in a recent blog post he wrote on the topic!

In addition to that impactful but technical change, this was a week of many UI improvements and bug fixes as well:

UI Improvements

Improved the visual quality of cross-screen screenshots that Spectacle takes when using multi-screen setups where the screens have different scale factors (Noah Davis, Spectacle 24.05. Link)

Improved quality of blurs, pixelations, and shadows in Spectacle’s annotations (Noah Davis, Spectacle 24.05. Link)

KWrite now shows a hamburger menu by default instead of a traditional menu bar, and the hamburger menu has gained an assortment of curated actions on the top to speed up access to them (Nathan Garside and Christoph Cullmann, KWrite 24.05. Link 1, link 2, and link 3):

Just KWrite! Nothing has changed for Kate.

Filelight now throws fewer annoying modal dialog windows in your face: it now shows directory access errors using inline placeholder messages, and failures to add duplicate exclusion paths using small toasts/passive notifications (Han Young, Filelight 24.05. Link 1 and link 2)

In the “Get New [Thing]” dialogs, the warning shown at the top is now different and more warningy if the available content has the potential to run executable code on your system (David Edmundson and me: Nate Graham, Plasma 6.1 and Gear apps 24.05. Link 1 and link 2):

In Plasma’s traditional Task Manager widget, the threshold for showing any text is now smaller, so you’ll see text more often even at relatively narrow task widths. This is based on the idea that if you’re using this widget, it’s because you want to see text! (me: Nate Graham, Plasma 6.0.4. Link)

On Wayland, the Dialog Parent effect that dims parent windows when dialogs are active now temporarily disables the dimming when the dialog window is a color picker that’s currently picking a screen color (Ivan Tkachenko, Plasma 6.1. Link)

System Settings’ Virtual Desktops page has now adopted the common “controls on the header row” paradigm to increase the apace available for content (Jakob Petsovits, Plasma 6.1. Link):

In Plasma’s Power and Battery widget, the controls and UI for blocking sleep and screen locking have moved from the header into the view, matching the location of other interactive controls and preventing the header from becoming super chunky when multiple apps are inhibiting sleep and screen locking (Natalie Clarius, Plasma 6.1. Link):

System Monitor now shows a tooltip with the full text when you hover over an elided piece of text in one of the table views (Joshua Goins, Plasma 6.1. Link)

Made the header message on System Settings’ File Search page frameless and border-touching, making use of new API created to enable this purpose. This API was also used for the message in the “Get new [thing]” dialog shown earlier. So expect to see more of this kind of thing in the coming weeks! (me: Nate Graham, Plasma 6.1. Link 1 and link 2):

Folder popups invoked from a Plasma panel can now be resized if you’d like more space to see everything in them (Ivan Tkachenko, Plasma 6.1. Link)

If you preferred the old style of app launching in Plasma’s traditional Task Manager widget whereby an app’s pinned launcher would disappear when launched, you can now get that back (Niccolò Venerandi, Plasma 6.1. Link)

Middle-clicking a desktop in KWin’s Overview effect no longer instantly removes it, because this made it too easy to accidentally destroy your layout (me: Nate Graham, Plasma 6.1. Link)

The radius of rounded corners throughout Breeze-themed UI elements has now been standardized at 5px, much better than the previous random assortment of corner radii that ranged generally from 2-5px, with some being as high as 8 or 16px! This is an easily bikeshedded topic, so please try to restrain yourselves; check out all the other screenshots in this post, which feature the change—I bet you thought they looked pretty good before I explicitly mentioned that the corner radius had increased, right!? (Akseli Lahtinen, Plasma 6.1 and Frameworks 6.2. Link)

Bug Fixes

In Dolphin’s Details view, navigating to a subdirectory no longer resets the current sort mode (Felix Ernst, Dolphin 24.02.2. Link)

Gwenview no longer inappropriately blocks sleep and screen locking when simply viewing an image (Daniel Strnad, Gwenview 24.02.2. Link)

Fixed a nasty bug in Spectacle that could cause the rectangular region overlay to get stuck on screen when taking a rectangular region screenshot right after a screen recording without quitting and re-launching Spectacle first (Noah Davis, Spectacle 24.05. Link)

Plasma’s Night Light feature no longer unintentionally connects to Mozilla Location Services to geolocate you for the purpose of figuring out the Night Light transition time when you don’t have that setting turned on (Natalie Clarius, Plasma 5.27.12. Link)

Plasma no longer crashes when you close the notification that gives you an opportunity to undo removing an Icon widget (Nicolas Fella, Plasma 6.0.4. Link)

Modal font dialogs in Plasma 6 are now ugly, but at least they work again; our previous styling approach caused them to end up non-interactive and has been reverted for now pending a better solution (Nicolas Fella, Plasma 6.0.4. Link)

Discover once again shows you everything you have installed on its “Installed” page—not just an assortment of packages that depended on what distro you were using (Harald Sitter, Plasma 6.0.4. Link)

When scrolling down in one app category on Kickoff and then switching categories, random items from the former category no longer sometimes appear inappropriately on the new page (David Redondo, Plasma 6.0.4. Link)

On Wayland, the color picker dialog no longer returns incorrect colors when an ICC profile is applied to the display (Xaver Hugl, Plasma 6.0.4. Link)

Fixed a strange issue whereby items in Plasma’s list view mode Folder View popups on a panel could only be highlighted when moving the cursor downwards, rather than upwards (Akseli Lahtinen, Plasma 6.0.4. Link)

Fixed a bug that made it possible, under certain circumstances, to drag a window completely off the screen (Yifan Zhu, Plasma 6.0.4. Link)

On Wayland, the clipboard menu that appears when you hit Meta+V no longer goes underneath windows set to always be on top (Tino Lorenz, Plasma 6.0.4. Link)

In KWin’s Overview effect, the thumbnails for inactive virtual desktops are now live, not static (David Redondo, Plasma 6.0.4. Link)

Fixed a problem creating new Wireguard VPNs (Stephen Robinson, Plasma 6.1. Link)

Keyboards are no longer sometimes shown as mice on System Settings’ Mouse page (me: Nate Graham, Plasma 6.1. Link)

Rapidly toggling the “Floating” setting for a Plasma panel on and off no longer sometimes causes the panel to get stuck in a position where it’s not floating, but also detached from the screen edge (Vlad Zahorodnii, Plasma 6.1. Link)

Discover no longer mislabels apps that get removed from a Flatpak repo as being not installed when they are in fact still installed (Aleix Pol and Ivan Tkachenko, Plasma 6.1. Link)

Fixed a case where KDE apps could run out of memory when told to open certain types of malformed image files (Mirco Miranda, Frameworks 6.1. Link)

Fixed the most common crash in the Baloo file indexing service, with 113 duplicates as of the time of writing (Christoph Cullmann, Frameworks 6.2. Link)

Fixed a rare case where KIO could exhaust all memory while trying and failing to process HTTP requests under certain unusual circumstances (Harald Sitter, Frameworks 6.2. Link)

WebDAV files accessed through Dolphin or other KDE apps once again show the correct modification times (Fabian Vogt, Frameworks 6.2. Link)

Other bug information of note:

Performance & Technical

After Qt changes regressed this, changing color schemes is once again nearly instant, giving the “blend changes” KWin effect enough time to provide a smooth transition between the colors (Kai Uwe Broulik, Frameworks 6.2 Link)

Files and folders on the desktop that are copied or dragged are now made available via the Portals system, so dropping them into sandboxed apps now works as expected (Karol Kosek, Plasma 6.0.4. Link)

…And Everything Else

This blog only covers the tip of the iceberg! If you’re hungry for more, check out https://planet.kde.org, where you can find more news from other KDE contributors.

How You Can Help

KDE has become important in the world, and your time and labor have helped to bring it there! But as we grow, it’s going to be equally important that this stream of labor be made sustainable, which primarily means paying for it. Right now the vast majority of KDE runs on labor not paid for by KDE e.V. (the nonprofit foundation behind KDE, which I am a board member for), and that’s a problem. We’ve taken steps to change this with paid technical contractors—but those steps are small due to limited financial resources. If you’d like to help change that, consider donating today!

Otherwise, visit https://community.kde.org/Get_Involved to discover other ways to be part of a project that really matters. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to already be a programmer, either. I wasn’t when I got started. Try it, you’ll like it! We don’t bite!

Categories: FLOSS Project Planets

Hindi Translation of Cantor and KDE Connect - SoK 2024

Planet KDE - Fri, 2024-04-12 20:00
Hindi Translation of Cantor and KDE connect - Season of KDE 2024 This is the second and last blog for SoK 2024. During the second half of Season of KDE, I translated Cantor and KDE connect in hindi. Cantor and KDE connect had about 1000 and 500 lines respectively. In order to translate these softwares, I took reference from google translate and AI models to improve on my translation. Translation memory did a great job in finding duplicates and helped me to avoid translating the same words again.
Categories: FLOSS Project Planets

Kubuntu: Noble Numbat Beta available! Qt6 snaps coming soon.

Planet KDE - Fri, 2024-04-12 15:29

It has been a very busy couple of weeks as we worked against some major transitions and a security fix that required a rebuild of the $world. I am happy to report that against all odds we have a beta release! You can read all about it here: https://kubuntu.org/news/kubuntu-24-04-beta-released/ Post beta freeze I have already begun pushing our fixes for known issues today. A big one being our new branding! Very exciting times in the Kubuntu world.

In the snap world I will be using my free time to start knocking out KDE applications ( not covered by the project ). I have also recruited some help, so you should start seeing these pop up in the edge channel very soon!

Now that we are nearing the release of Noble Numbat, my contract is coming to an end with Kubuntu. If you would like to see Plasma 6 in the next release and in a PPA for Noble, please consider donating to extend my contract at https://kubuntu.org/donate !

On a personal level, I am still looking to help with my grandson and you can find that here: https://www.gofundme.com/f/in-loving-memory-of-william-billy-dean-scalf

Thanks for stopping by,

Scarlett

Categories: FLOSS Project Planets

Scarlett Gately Moore: Kubuntu: Noble Numbat Beta available! Qt6 snaps coming soon.

Planet Debian - Fri, 2024-04-12 15:29

It has been a very busy couple of weeks as we worked against some major transitions and a security fix that required a rebuild of the $world. I am happy to report that against all odds we have a beta release! You can read all about it here: https://kubuntu.org/news/kubuntu-24-04-beta-released/ Post beta freeze I have already begun pushing our fixes for known issues today. A big one being our new branding! Very exciting times in the Kubuntu world.

In the snap world I will be using my free time to start knocking out KDE applications ( not covered by the project ). I have also recruited some help, so you should start seeing these pop up in the edge channel very soon!

Now that we are nearing the release of Noble Numbat, my contract is coming to an end with Kubuntu. If you would like to see Plasma 6 in the next release and in a PPA for Noble, please consider donating to extend my contract at https://kubuntu.org/donate !

On a personal level, I am still looking to help with my grandson and you can find that here: https://www.gofundme.com/f/in-loving-memory-of-william-billy-dean-scalf

Thanks for stopping by,

Scarlett

Categories: FLOSS Project Planets

Kubuntu 24.04 Beta Released

Planet KDE - Fri, 2024-04-12 14:33
Join the Excitement: Test Kubuntu 24.04 Beta and Experience Innovation with KubuQA!

We’re thrilled to announce the availability of the Kubuntu 24.04 Beta! This release is packed with new features and enhancements, and we’re inviting you, our valued community, to join us in fine-tuning this exciting new version. Whether you’re a seasoned tester or new to software testing, your feedback is crucial to making Kubuntu 24.04 the best it can be.

To make your testing journey as easy as pie, we’re introducing a fantastic new tool: KubuQA. Designed with both new and experienced users in mind, KubuQA simplifies the testing process by automating the download, VirtualBox setup, and configuration steps. Now, everyone can participate in testing Kubuntu with ease!

This beta release also debuts our fresh new branding, artwork, and wallpapers—created and chosen by our own community through recent branding and wallpaper contests. These additions reflect the spirit and creativity of the Kubuntu family, and we can’t wait for you to see them.

Get Testing

By participating in the beta testing of Kubuntu 24.04, you’re not just helping improve the software; you’re becoming an integral part of a global community that values open collaboration and innovation. Your contributions help us identify and fix issues, ensuring Kubuntu remains a high-quality, stable, and user-friendly Linux distribution.

The benefits of joining our testing team extend beyond improving the software. You’ll gain valuable experience, meet like-minded individuals, and perhaps discover a new passion in the world of open-source software.

So why wait? Download the Kubuntu 24.04 Beta today, try out KubuQA, or follow our wiki to upgrade and help us make Kubuntu better than ever! Remember, your feedback is the key to our success.

Ready to make an impact?

Join us in this exciting phase of development and see your ideas come to life in Kubuntu. Plus, enjoy the satisfaction of knowing that you’ve contributed to a project used by millions around the world. Become a tester today and be part of something big!

Interested in more than testing?

By the way, have you thought about becoming a member of the Kubuntu Community? It’s a fantastic way to contribute more actively and help shape the future of Kubuntu. Learn more about joining the community.

Categories: FLOSS Project Planets

Web Review, Week 2024-15

Planet KDE - Fri, 2024-04-12 10:19

Turns out I managed to squeeze reading here and there and have enough content for a regular review… So let’s go for my web review for the week 2024-15.

Fairbuds are Fairphone’s proof that we really could make better tiny gadgets | Ars Technica

Tags: tech, repair, sound, hardware

Another type of devices where clearly they could be repairable and batteries could be swappable if manufacturers would put care in the design. At least, Fairphone is showing it’s doable.

https://arstechnica.com/gadgets/2024/04/fairbuds-take-the-fairphones-repairability-down-to-seemingly-impossible-size/?comments=1


The Rise and Fall of Silicon Graphics

Tags: tech, gpu, 3d, history

Interesting history behind the company which was instrumental in pushing computer graphics forward during its time.

https://www.abortretry.fail/p/the-rise-and-fall-of-silicon-graphics


Software eco-design: investigating and reducing the energy consumption of software

Tags: tech, performance, energy, ecology, java, research

More work about eco-design of software. This is definitely welcome. I found this work a bit weak on the state of the art and the interview parts (10 people in the same company). But the field is so nascent that it’s to be expected I guess, PhD students have to do with what they have access to. Unsurprisingly this shows a great lack of proper tools to tackle the measurement problem. This thesis shows interesting prospects to reduce variations in measurements though, some of the proposed guidelines might help but cannot offset the hardware heterogeneity completely… The parts focusing on practical advices around Java use and deployment are interestingly easy to apply though. You need to take into account the context of your application to make the right choices of course.

https://theses.hal.science/tel-03429300/document


The LLMentalist Effect: how chat-based Large Language Models replicate the mechanisms of a psychic’s con

Tags: tech, ai, machine-learning, gpt, cognition, criticism, scam

Interesting take on why people see more in LLM based systems than there really is. The parallels with psychics and mentalists tricks are well thought out.

https://softwarecrisis.dev/letters/llmentalist/


The Assist @ Things Of Interest

Tags: tech, ai, machine-learning, copilot, gpt, programming

All the good reasons why productivity increases with code assistants are massively overestimated. To be used why not, but with a light touch.

https://qntm.org/assist


Hello OLMo: A truly open LLM

Tags: tech, ai, machine-learning, gpt, open-access, research

This is how it should be done. This one comes with everything needed to reproduce the results. This is necessary to gain insights into how such models work internally.

https://blog.allenai.org/hello-olmo-a-truly-open-llm-43f7e7359222


The lifecycle of a code AI completion

Tags: tech, ai, machine-learning, copilot, programming, architecture

Wondering how one can design a coding assistant? Here is an in depth explanation of the choices made by one of the solutions out there. There’s quite some processing before and after actually running the inference with the LLM.

https://sourcegraph.com/blog/the-lifecycle-of-a-code-ai-completion


Results summary: 2024 Annual C++ Developer Survey “Lite” : Standard C++

Tags: tech, c++

Some interesting insights in this survey. It helps identify common concerns.

https://isocpp.org/blog/2024/04/results-summary-2024-annual-cpp-developer-survey-lite


Glory is only 11MB/sec away

Tags: tech, cloud, infrastructure, cost

When you do the math, the cloud offerings look very expensive for most workload indeed.

https://thmsmlr.com/cheap-infra


Building My First Homelab Server Rack · mtlynch.io

Tags: tech, hardware, homelab, self-hosting

Considering using a server rack for a homelab? This is a nice tutorial with plenty of advices.

https://mtlynch.io/building-first-homelab-rack/


Intro to TLS Certificates

Tags: tech, cryptography, tls, certificates, security

The title says it all. This article is a nice introduction to certificates, how they work, how the trust model is setup, etc.

https://carrickbartle.com/certificates.html


ratarmount: Access large archives as a filesystem efficiently

Tags: tech, tools, archive

Looks like a nice tool to manipulate large archives.

https://github.com/mxmlnkn/ratarmount


Hermit: A reproducible container

Tags: tech, debugging, tools, multithreading

Looks like an interesting tool to analyze hard to reproduce bugs, especially when concurrency is involved. This could be useful to find the source of flaky tests as well.

https://github.com/facebookexperimental/hermit


my deployment platform is a shell script

Tags: tech, self-hosting, deployment, complexity, shell, scripting

Keep things as simple as possible, they might turn out to be robust too.

https://j3s.sh/thought/my-deployment-platform-is-a-shell-script.html


Shell History Is Your Best Productivity Tool

Tags: tech, shell, zsh

A few interesting tips to improve history management with ZSH.

https://martinheinz.dev/blog/110


The Blessing of the Strings

Tags: tech, web, browser, javascript, reliability

Looks like an interesting mechanism to improve the reliability of web applications. Let’s see what people make with those trusted types.

https://bkardell.com/blog/blessing-strings.html


Don’t require people to change ‘source code’ to configure your programs

Tags: tech, programming, portability, craftsmanship

Hopefully nobody is handling configuration by assuming the user will modify the source code or build scripts by hand. Unfortunately I still encounter it from time to time…

https://utcc.utoronto.ca/~cks/space/blog/programming/ConfigureNoSourceCodeChanges


If Inheritance is so bad, why does everyone use it? • Buttondown

Tags: tech, object-oriented, history

Interesting look at the history of inheritance in programming languages. There’s clearly still room for improvements on this concept.

https://buttondown.email/hillelwayne/archive/if-inheritance-is-so-bad-why-does-everyone-use-it/


Thoughts on Pair Programming - DEV Community

Tags: tech, programming, pairing

Good criteria to decide to pair or not. This is still not practiced enough. Maybe knowing when it’s best to reach out to pair will help get more into it.

https://dev.to/shaharke/thoughts-on-pair-programming-1i8g


What I think about when I edit — Eva Parish

Tags: documentation, writing

Good advices to improve writing. I should apply such rules to myself more often.

https://evaparish.com/blog/how-i-edit


Simple Ways to Show Appreciation at Work

Tags: management, empathy

Plenty of good tricks in there. It has to be genuine of course, but said tricks reduce chances of unwillingly dropping the ball on the topic.

https://hbr.org/2023/10/simple-ways-to-show-appreciation-at-work


On Generating Ideas - Leadership & Work

Tags: meetings, leadership

This is indeed the best approach I’ve seen for brainstorming. It gives a chance to everyone to bring something forward, even the introverts.

https://read.perspectiveship.com/p/on-generating-ideas


Bye for now!

Categories: FLOSS Project Planets

NOKUBI Takatsugu: mailman3-web error when upgrading to bookworm

Planet Debian - Fri, 2024-04-12 09:34

I tried to upgrade bullseye machien to bookworm, so I got the following error:

File “/usr/lib/python3/dist-packages/django/contrib/auth/mixins.py”, line 5, in
from django.contrib.auth.views import redirect_to_login
File “/usr/lib/python3/dist-packages/django/contrib/auth/views.py”, line 20, in
from django.utils.http import (
ImportError: cannot import name ‘url_has_allowed_host_and_scheme’ from ‘django.utils.http’ (/usr/lib/python3/dist-packages/django/utils/http.py)

During handling of the above exception, another exception occurred:

It is similar to #1000810, but it is already closed.

My solution is:

  • apt remove mailman3-web
    • keep db and config files (do not purge)
  • apt autoremove
    • remove django related packages
  • apt install mailman3-web mailman3-full

I tried to send to the report, but it rerutns `550 Unknown or archived bug’ …

Categories: FLOSS Project Planets

Real Python: The Real Python Podcast – Episode #200: Avoiding Error Culture and Getting Help Inside Python

Planet Python - Fri, 2024-04-12 08:00

What is error culture, and how do you avoid it within your organization? How do you navigate alert and notification fatigue? Hey, it's episode #200! Real Python's editor-in-chief, Dan Bader, joins us this week to celebrate. Christopher Trudeau also returns to bring another batch of PyCoder's Weekly articles and projects.

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Gábor Hojtsy: Supporting Drupal transitions at DrupalCon Portland 2024

Planet Drupal - Fri, 2024-04-12 06:07
Supporting Drupal transitions at DrupalCon Portland 2024

DrupalCon Portland 2024 is coming up next month! The event provides good opportunities to get help with three major transitions of Drupal in 2024. Drupal 7's end of life is near, while Drupal 11 is released this year. Finally, DrupalCI testing is superceeded by much improved GitLab CI pipelines shortly after DrupalCon. Here are some highlights of related events to not miss at DrupalCon!

Gábor Hojtsy Fri, 04/12/2024 - 13:07
Categories: FLOSS Project Planets

Tellico Hindi Translation - SoK 2024

Planet KDE - Fri, 2024-04-12 05:13
This is my final blog about my experience participating in season of KDE 2024. As part of my final term, I translated tellico to hindi. Tellico contains 2070 statements spanning between messages and docmessages. I used lokalize application for the translation. I hardly faced any issues during the translation work apart from some ambiguity in the translated words. Thanks Raghavendra Kamath for helping me resolve those few issues. Overall, It was an awesome experience during the entire program.
Categories: FLOSS Project Planets

LN Webworks: How To Create Hooks Vs Event Subscribers in Drupal 9

Planet Drupal - Fri, 2024-04-12 02:45

In Drupal development, understanding the differences between hooks and event subscribers is essential for building robust and flexible modules. Hooks are a fundamental part of Drupal's architecture, allowing modules to interact with and modify various aspects of the system's behavior. Moreover, event subscribers are a more recent addition to Drupal, introduced in Drupal 8 as part of its transition to a more modern, object-oriented architecture.

Hooks in Drupal

Hooks are specially named functions that a module defines and calls at specific times to alter, add, or modify the data.

Categories: FLOSS Project Planets

Freexian Collaborators: Monthly report about Debian Long Term Support, March 2024 (by Roberto C. Sánchez)

Planet Debian - Thu, 2024-04-11 20:00

Like each month, have a look at the work funded by Freexian’s Debian LTS offering.

Debian LTS contributors

In March, 19 contributors have been paid to work on Debian LTS, their reports are available:

  • Abhijith PA did 0.0h (out of 10.0h assigned and 4.0h from previous period), thus carrying over 14.0h to the next month.
  • Adrian Bunk did 59.5h (out of 47.5h assigned and 52.5h from previous period), thus carrying over 40.5h to the next month.
  • Bastien Roucariès did 22.0h (out of 20.0h assigned and 2.0h from previous period).
  • Ben Hutchings did 9.0h (out of 2.0h assigned and 22.0h from previous period), thus carrying over 15.0h to the next month.
  • Chris Lamb did 18.0h (out of 18.0h assigned).
  • Daniel Leidert did 12.0h (out of 12.0h assigned).
  • Emilio Pozuelo Monfort did 0.0h (out of 3.0h assigned and 57.0h from previous period), thus carrying over 60.0h to the next month.
  • Guilhem Moulin did 22.5h (out of 7.25h assigned and 15.25h from previous period).
  • Holger Levsen did 0.0h (out of 0.5h assigned and 11.5h from previous period), thus carrying over 12.0h to the next month.
  • Lee Garrett did 0.0h (out of 0.0h assigned and 60.0h from previous period), thus carrying over 60.0h to the next month.
  • Markus Koschany did 40.0h (out of 40.0h assigned).
  • Ola Lundqvist did 19.5h (out of 24.0h assigned), thus carrying over 4.5h to the next month.
  • Roberto C. Sánchez did 9.25h (out of 3.5h assigned and 8.5h from previous period), thus carrying over 2.75h to the next month.
  • Santiago Ruano Rincón did 19.0h (out of 16.5h assigned and 2.5h from previous period).
  • Sean Whitton did 4.5h (out of 4.5h assigned and 1.5h from previous period), thus carrying over 1.5h to the next month.
  • Sylvain Beucler did 25.0h (out of 24.5h assigned and 35.5h from previous period), thus carrying over 35.0h to the next month.
  • Thorsten Alteholz did 14.0h (out of 14.0h assigned).
  • Tobias Frost did 12.0h (out of 12.0h assigned).
  • Utkarsh Gupta did 19.5h (out of 0.0h assigned and 48.75h from previous period), thus carrying over 29.25h to the next month.
Evolution of the situation

In March, we have released 31 DLAs.

Adrian Bunk was responsible for updating gtkwave not only in LTS, but also in unstable, stable, and old-stable as well. This update involved an upload of a new upstream release of gtkwave to each target suite to address 82 separate CVEs. Guilhem Moulin prepared an update of libvirt which was particularly notable, as it fixed multiple vulnerabilities which would lead to denial of service or information disclosure.

In addition to the normal security updates, multiple LTS contributors worked at getting various packages updated in more recent Debian releases, including gross for bullseye/bookworm (by Adrian Bunk), imlib2 for bullseye, jetty9 and tomcat9/10 for bullseye/bookworm (by Markus Koschany), samba for bullseye, py7zr for bullseye (by Santiago Ruano Rincón), cacti for bullseye/bookwork (by Sylvain Beucler), and libmicrohttpd for bullseye (by Thorsten Alteholz). Additionally, Sylvain actively coordinated with cacti upstream concerning an incomplete fix for CVE-2024-29894.

Thanks to our sponsors

Sponsors that joined recently are in bold.

Categories: FLOSS Project Planets

Ensuring KEcoLab Stability: Introducing Dedicated CI-Test

Planet KDE - Thu, 2024-04-11 20:00

KEcoLab, a tool for measuring software energy consumption, needs robust testing to ensure its functionality after every code change. This blog post presents the work I did in Season of KDE 2024 implementing dedicated test builds using Kate test scripts to achieve this goal. By implementing a dedicated "test-build" and "integration" stage within the CI/CD pipeline, we can enhance KEcoLab's reliability and maintain confidence in its results.

Figure : Setting up CI test (image from Sarthak Negi published under a CC-BY-4.0 license). Background

KEcoLab simplifies the process of analyzing KDE software's energy consumption through the CI/CD pipeline in Invent. This automation streamlines the measurement process, offering crucial insights for developers and helping projects seeking eco-certification. However, ensuring KEcoLab's continued effectiveness requires thorough testing after each code modification.

The Challenge

KEcoLab retrieves the package name from the merge request for testing purposes. However, this approach doesn't guarantee stability after code changes unrelated to specific packages. To address this, we propose a dedicated "test-build" stage within the CI/CD pipeline.

The Solution: Dedicated Test Builds

The proposed "test-build" stage leverages Kate test scripts located in the KEcoLab repository. These scripts will be instrumental in mimicking CI tests and validating KEcoLab's functionality.

Here's a breakdown of the proposed stages within the test build:

Stage: test-build
  • Tag: test-build

  • Function: This stage functions similarly to how the existing KEcoLab pipeline operates. However, instead of dynamically retrieving the package name, it will be hardcoded to org.kde.kate (as this is the specific package we're focusing on for testing).

  • Key Difference: This stage won't rely on files from the merge request. Instead, it will clone the KEcoLab repository to access the necessary Kate usage scenario files. This ensures we're testing against the latest codebase in the repository, regardless of specific merge requests.

  • Implementation: To improve code organization and maintainability, we've adopted a modular approach to CI/CD pipelines. We now have two dedicated YAML files:

    • .test-energy_measurement.yml: This file defines the stages for the CI test pipeline.
    • .energy_measurement.yml: This file contains the stages previously defined in .gitlab-ci.yml. All the code related to energy measurement testing has been shifted to this new file.

    Both YAML files reside within the same directory for easy management. The main .gitlab-ci.yml file utilizes the include keyword to incorporate the stages from these dedicated files. This promotes modularity, improves readability, and reduces redundancy in the main pipeline configuration.

# Test-build stage test-build: stage: test-build image: alpine tags: - EcoLabWorker before_script: # Hardcode the package name to org.kde.kate - PACKAGE_NAME="org.kde.kate" script: # Add flathub remote if not exists - flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo # Install the specified package (org.kde.kate) from flathub - flatpak install --user $PACKAGE_NAME -y # Clone the KEcolab repository to access usage scenario files - git clone https://invent.kde.org/teams/eco/remote-eco-lab.git # Copy the kate usage scenario files from the cloned repository to the required location - cp remote-eco-lab/scripts/test_scripts/org.kde.kate/* scripts/test_scripts/org.kde.kate/ rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' Stage: test-energy-measurement
  • This stage operates identically to the existing KEcoLab pipeline stage for energy measurement.
Stage: test-report
  • This stage also functions identically to the existing KEcoLab pipeline stage responsible for generating reports.
Future OutLook Stage: integration test

We introduce a novel integration test

  • This stage aims to compare reports generated during the test build with previous reports. By utilizing the diff command, we can identify significant discrepancies between the reports. This helps us detect potential regressions or unintended changes in how KEcoLab measures energy consumption.
# This stage is for integration tests stage: Integration test # Jobs to be executed in this stage jobs: - run: # Replace with your actual script to run integration tests name: Run integration tests script: your_test_script.sh # Diff reports job (assuming reports are stored in artifacts) - diff_reports: # Retrieve artifacts from previous job stage: Integration test artifacts: paths: - reports/ script: | # Install diff tools apk add diffutils # Get the latest reports from artifacts report1=$(ls reports/*.html | sort -r | head -n 1) report2=$(ls reports/*.html | sort -r | head -n 2) Why it matters
  • Enhanced Stability: By focusing on a specific package (org.kde.kate) and utilizing the latest codebase from the KEcoLab repository, we ensure comprehensive testing across code changes, not just those within a particular merge request.

  • Catch Bugs Early: The integration test utilizing diff allows for the early detection of regressions or deviations in energy measurement behavior. This proactive approach helps maintain consistent and reliable results from KEcoLab.

  • Confidence in Every Change: Whenever someone contributes code, passing tests ensure those changes don't disrupt existing features. This builds trust and keeps development smooth.

  • Save Time, Be Awesome: Automating tests frees up valuable time for developers to focus on innovation. We can spend less time debugging and more time making KEcoLab even better!

Figure : CI testing (image from Sarthak Negi published under a CC-BY-4.0 license). So, How Will It Work?

We have existing test scripts used for Kate, KDE's text editor. We'll first see if these can be adapted for KEcoLab. If needed, we'll create new tests specifically designed for KEcoLab's functionalities.

Here's the coolest part: these tests will become part of our CI/CD pipeline. Whenever someone submits code changes (a merge request), the pipeline will automatically run the tests. If everything passes, the changes are merged with manual approval by the maintainers. But if a test fails, it'll be like a flashing red light, prompting us to fix the issue before merging.

The proposed dedicated test build approach using Kate test scripts is a valuable addition to the KEcoLab CI/CD pipeline. This enhanced testing strategy helps ensure that KEcoLab continues to deliver accurate and reliable software energy consumption measurements, ultimately leading to more efficient and eco-friendly code.

Interested in Contributing?

By implementing dedicated CI-tests leveraging Kate's existing test scripts, we're taking a big step towards solidifying KEcoLab's stability and ensuring the accuracy of its software energy consumption measurements. This wouldn't be possible without the incredible support of the KDE community and my mentors @karan @joseph. Their dedication to open-source development is truly inspiring.

Want to See More? Head over to KEcoLab on invent.kde.org to explore the project, learn more about its development, and check out the merge request that sparked this advancement!

We're excited about this approach and would love to hear your thoughts! If you're interested in contributing to KEcoLab's development and helping make software development a more sustainable practice, you are always welcome. Together, we can make a real difference!

Categories: FLOSS Project Planets

KDE Ships Frameworks 6.1.0

Planet KDE - Thu, 2024-04-11 20:00

Friday, 12 April 2024

KDE today announces the release of KDE Frameworks 6.1.0.

KDE Frameworks are 83 addon libraries to Qt which provide a wide variety of commonly needed functionality in mature, peer reviewed and well tested libraries with friendly licensing terms. For an introduction see the KDE Frameworks release announcement.

This release is part of a series of planned monthly releases making improvements available to developers in a quick and predictable manner.

New in this version Attica
  • Do not signal an error when a job was cancelled. Commit. Fixes bug #483117
Baloo
  • [Extractor] Explicitly abort the transaction on early exit. Commit.
  • [WorkerPipe] Verify inputEnd() is signaled when parent process exits. Commit.
  • Some indexers need non-slash trailed path. Commit. Fixes bug #478854
  • Skip indexing KDE FS volumes unless user included. Commit. Fixes bug #460509. See bug #390830
  • [tests/engine/singledbtest] Allow testing multiple databases. Commit.
  • Ci: download .clang-format during CI runs. Commit.
  • [Extractor] Change to QCoreApplication. Commit.
  • Ci: check clang-format during CI. Commit.
Bluez Qt
  • Add support for manufacturer data in LE advertisements. Commit.
Breeze Icons
  • Temporarily add back kdenlive-*-video for compatibility. Commit.
  • Rename kdenlive--edit to timeline-mode-. Commit.
  • Remove kdenlive-select-tool. Commit.
  • Remove kdenlive-spacer-tool icon. Commit.
  • Fix duplicates. Commit.
  • Rename kdenlive-object-* to object-*. Commit.
  • Rename kdenlive--audiothumb to waveform-. Commit.
  • Remove kdenlive-show-videothumb icon. Commit.
  • Rename kdenlive--video to video-. Commit.
  • Rename kdenlive--audio to audio-. Commit.
  • Rename kdenlive-align-none to align-none. Commit.
  • Add Flatpak ID symlink for kwalletmanager. Commit.
  • Add system-suspend-inhibited, system-suspend-uninhibited. Commit.
  • Add rdns-style name symlink for kcolorchooser. Commit.
  • Use magnifying glass iconography for zoom icons. Commit. Fixes bug #435671
  • Remove 16px view-list-symbolic symlink. Commit.
  • Fix incorrect target icon for view-grid-symbolic. Commit.
  • Fix user-desktop-symbolic symlink. Commit.
  • Remove unsupported colorscheme entries from stylesheets. Commit.
  • Quassel_message: Replace ButtonFocus with Highlight. Commit.
  • Use Text color for konv_message icon. Commit. See bug #482645
  • Replace hardcoded blue with highlight color in OSD icons. Commit.
  • Remove unneeded dark applets icons. Commit. Fixes bug #477289
  • Software-updates-additional: Port away from ButtonFocus color. Commit.
  • Network-mobile-available: Replace ButtonFocus with Highlight. Commit.
  • Notification-progress-active: Replace ButtonFocus with Highlight. Commit.
  • Drop edit-hover and showinfo-hover icons. Commit.
  • Fix suyu color in dark theme. Commit.
  • Add suyu icon. Commit.
  • Add 48px elisa-symbolic icon used for the Android themed icon. Commit.
  • Update outdated url. Commit.
  • Fix incorrectly named network icon symlinks. Commit.
  • Make process-stop-symbolic a symlink to the base icon. Commit. Fixes bug #482556
  • Fix some 96px folder icons not using accent color. Commit. Fixes bug #478016
  • Add new icon for Skladnik. Commit. Fixes bug #458214
Extra CMake Modules
  • ECMAddQch: drop trying to set IMPORTED on targets with installed config. Commit.
  • Fix DATAROOTDIR documentation for Windows. Commit.
  • Update documentation favicon. Commit.
  • MacOS is the name of the Apple operating system. Commit.
  • Fix fetch translations tests in GitLab forks. Commit.
  • Docs: Correct escape sequence for Python 3.12 or later. Commit.
  • Map some more language codes to the IDs supported by Google Play. Commit.
  • [ECMQmlModule] Add option to enable verbose compiler output. Commit.
  • Remove extraneous docs-build CI job that is no longer needed following the switch of api.kde.org to Gitlab CI. Commit.
Framework Integration
  • Kns: Fix typo in yes / no action request. Commit.
KBookmarks
  • Fix KBookmarkManager::save triggering KDirWatch. Commit.
KCalendarCore
  • Fix check whether RRULE UNTIL datetime is UTC. Commit.
  • Fix conversion of date-only icaltimetype to UTC QDateTime. Commit. Fixes bug #483707
  • MemoryCalendar: log details about duplicate events before asserting. Commit. See bug #481031
KCMUtils
  • Better document KPluginModel. Commit.
  • Deprecate ContextualHelpButton in favor of the Kirigami version. Commit.
  • KCMLauncher: Fix up docs. Commit.
  • Port QML modules to declarative type registration. Commit.
  • ConfigModule: Fix imports and aliases in provided example. Commit.
  • SharedQmlEngine: Improve error reporting when loading main component. Commit.
  • SettingHighlighterPrivate: update highlight on target children changes. Commit.
  • Qml: set domain for i18n strings. Commit.
KConfig
  • Don't search for QtDBus on Windows/macOS/Android. Commit.
  • Register KConfigPropertyMap to QML. Commit.
  • Kconf_update: Also run .upd files if times match but done is empty. Commit. Fixes bug #483795
  • Add unittest that URL[$e] works, for bug 482889. Commit.
KConfigWidgets
  • Don't use DBus on Windows/macOS. Commit.
KCoreAddons
  • Don't search for QtDBus on Windows/macOS/Android. Commit.
  • KformatPrivate: fix deprecation enum arithmetic with float. Commit.
KCrash KDBusAddons
  • Conditionalise Qt6::GuiPrivate on HAVE_X11. Commit.
KDeclarative
  • Remove redundant QML_ELEMENT in KDeclarativeMouseEvent and WheelEvent. Commit.
  • Don't use kwidgetsaddons on Android. Commit.
  • Refactor kglobalaccel check. Commit.
  • Don't use kglobalaccel on Android. Commit.
  • Mark Android as supported. Commit.
  • Add Android CI. Commit.
  • Add dependency to QML module. Commit.
  • Kquickcontrolsaddons: Drop QML import versions from doc example. Commit.
  • Kquickcontrols: Remove superfluous no-op assignment. Commit.
  • Kquickcontrols: Replace superfluous Text item and a semi-broken expression. Commit.
  • Kquickcontrols: Reduce superfluous ternary. Commit.
  • Kquickcontrols: Declare type of __previousSequence property as a string. Commit.
  • Kquickcontrols: Uplift previousSequence property to the root component. Commit.
  • Kquickcontrols: Drop QML import versions, fix up code style. Commit.
KDocTools
  • Fixes compile problem for projects which uses older cmake versions. Commit.
  • Kdoctools_create_handbook/manpage: check INSTALL_DESTINATION for empty value. Commit.
  • Replace user.entities. Commit.
  • Upload New File bg.xml. Commit.
  • Update user.entities in bg. Commit.
KFileMetaData
  • [PopplerExtractorTest] Verify multicolumn PDF content (currently broken). Commit.
  • [PopplerExtractorTest] Make tests data driven. Commit.
  • [PopplerExtractorTest] Move class declaration to source file. Commit.
  • Plaintextextractor: autodetect encoding for text. Commit.
  • [PlainTextExtractor] Add plain text test file to coverage test. Commit.
  • [IndexerExtractorTest] Make tests data driven. Commit.
  • Add support for .mod/.s3m/.xm/.it Module Tracker formats meta data. Commit. Fixes bug #448182
  • Plaintextextractor: Read file via QFile. Commit.
  • [PropertyInfo,TypeInfo] Move static data into scope of its class. Commit.
  • [PropertyInfo,TypeInfo] Avoid lookup from id during initilization. Commit.
  • [PropertyInfo,TypeInfo] Use QStringView for name in hash. Commit.
  • [TypeInfo] Use a hash table for faster fromName TypeInfo creation. Commit.
  • Move helper class for case-insensitive QHash lookup to separate file. Commit.
  • [TypeInfo] Make set of all types introspectable. Commit.
  • [TypeInfo] Improve performance and cleanup. Commit.
  • [TypeInfo] Add unit tests and benchmarks. Commit.
  • [TypeInfo] Extend documentation for KFileMetaData::TypeInfo. Commit.
  • [PlaintextExtractor] Fix possible truncation of last character. Commit.
  • [PlaintextExtractor] Verify handling files missing newline delimiters. Commit.
  • [PlaintextExtractor] Check countint of empty lines. Commit.
  • [IndexerExtractorTest] Actually verify content extraction is skipped. Commit.
  • [IndexerExtractorTest] Move class declaration to source file. Commit.
  • [CMake] Move mentions of KF Archive dependencies over to the extractors. Commit.
  • [CMake] Remove several leftover references to KF5. Commit.
  • Fix compilation error for krita extractor when KArchive isn't found. Commit.
KGlobalAccel KGuiAddons
  • Recorder/KKeySequenceRecorderPrivate: support recording multi-key modifier-only shortcuts. Commit. See bug #470256
KHolidays KI18n
  • Fix compilation with GCC 9. Commit.
  • Main: ensure current thread is main thread. Commit.
KIconThemes
  • Fix dbus disabling. Commit.
  • Don't hang if no session bus is around. Commit.
  • Don't search for QtDBus on Windows/macOS. Commit.
  • Eliminate a frequent "Invalid Context" warning for FileSystems. Commit.
  • KIconDialog: Add filter for symbolic icons. Commit.
  • Allow creating KIconEngine with colors and overlays. Commit.
  • Add breeze-icons dependency. Commit.
  • Mark index.theme config as SimpleConfig. Commit.
KIdletime
  • Guard against invalid timeout values in KIdleTime::addTimeout(). Commit. See bug #482077
KImageformats
  • Add KF_VERSION & KF_DEP_VERSION variables. Commit.
  • XCF: testcase update for fixed Qt. Commit.
  • TGA: added options support. Commit.
  • More header checks (CCBUG: 479612). Commit.
KIO
  • Improve cppcheck. Commit.
  • Fix a compiler warning. Commit.
  • Add cppcheck / codequality run for those who care. Commit.
  • Fix a few compiler warnings. Commit.
  • Make ScopedProcessRunner hold the child until we register with systemd. Commit.
  • PreviewJob: allow to display previews of fileitem having a local targetUrl. Commit.
  • Fix authentication prompt not being shown. Commit. Fixes bug #460944
  • [kdiroperator] Only write icon size settings if non-default. Commit.
  • [kdiroperator] Drop code for reading configured icon sizes. Commit.
  • [kfilewidget] Store recent files/URLs in state config. Commit.
  • [kfileitemactions] Remove dead code. Commit.
  • KCoreDirListerCache:: make sure not to reinsert an item twice. Commit. See bug #473488
  • [workers/http] Ask user to remember ignoring SSL errors. Commit. See bug #484241
  • [workers/http] Ignore already acknowledged SSL errors. Commit. See bug #484241
  • [workers/http] Don't ask to ignore non-ignorable SSL errors. Commit.
  • [sslerrortest] Print job results. Commit.
  • [widgtesaskuseractionhandler] Remove problematic Q_UNREACHABLE. Commit.
  • Fix warnings: implicit capture of ‘this’ via ‘[=]’. Commit.
  • Slim down sslerrortest. Commit.
  • Drop unused entries from defaults-kfile.h. Commit.
  • [kfileplacesmodel] Remove wrong assert. Commit. Fixes bug #484160
  • Openwith: restore preferredTerminal reading. Commit.
  • [kprocessrunner] Unexport checkStartupNotify. Commit.
  • KFileItem: when checking access use current user. Commit. Fixes bug #483436
  • Fix webshortcuts not giving searchprovider specific icon. Commit. Fixes bug #483164
  • KFileitem: Use internal permissions as best case scenario. Commit. Fixes bug #477526. Fixes bug #483436
  • Use KUrlRequester in previewtest. Commit.
  • Fix sprintf buffer leaks on 32-bit systems. Commit.
  • Connectionbackend: improve jumbo packet handling. Commit. Fixes bug #481311
  • Drop legacy keys for m_runOnDiscreteGpuBool. Commit. Fixes bug #481538
  • Explicitly defined HAVE_DBUS. Commit.
  • Make "Create New" dialogs use the same consistent title style. Commit.
  • [kopenwithdialog] Populate m_pService in checkAccept. Commit.
  • [knewfilemenu] Add window title for new file dialog. Commit. Fixes bug #482732
  • Fix hide service menu items in context menu. Commit. Fixes bug #482216
  • [kterminallauncherjob] Inherit default process environment from parent. Commit. Fixes bug #482107
  • [knewfilemenu] Fix error handling when creating a folder that already exists. Commit. Fixes bug #482145
  • Kioexec: Use categorised logging. Commit.
  • Kioexec: Remove temporary files after the main loop has completed. Commit.
  • Use symbolic icons on buttons. Commit.
  • Kioexecd: Use KUIT and button icons for the "Upload changes?" question. Commit.
  • Openwith: extract core logic from dialog. Commit.
Kirigami
  • PromptDialog: Demote wrapper item from Control to Padding. Commit.
  • ListSectionHeader: Clean up and expand docs, add import alias for Controls. Commit.
  • PlatformTheme: Note where the disabled text color comes from. Commit.
  • ImageColors: make sure QML attached object is fetched from main thread. Commit.
  • Clarify that the default alignment for ActionToolbar is AlignLeft. Commit.
  • Fix up qualified properties access and doc examples, use appropriate enum for TextEdit. Commit.
  • ContextualHelpButton: Fix up code style and qualified property access. Commit.
  • ContextualHelpButton: Use a specific and appropriate type for a property. Commit.
  • ContextualHelpButton: Sort out imports and improve docs. Commit.
  • Padding: make sure to polish on completion. Commit. Fixes bug #477978
  • PlaceholderMessage: remove bad example using it as a loading indicator. Commit.
  • ContextualHelpButton: fix translated string usage. Commit.
  • Adopt ContextualHelpButton. Commit.
  • ApplicationItem & ApplicationWindow: Don't reserve space for overlaid vkbd. Commit.
  • ColumnView: Disable invisible (out-of-viewport) pages. Commit.
  • Make global drawer item keyboard navigable. Commit.
  • Respect QT_NO_XDG_DESKTOP_PORTAL. Commit. Fixes bug #482730
  • ColumnView: Add check args to clamp. Commit. See bug #481531
  • ColumnView: Use OutExpo for page animation. Commit.
  • Fix separator of OverlayDrawer in the header bar. Commit.
  • ScrollablePage: Workaround Qt flickable inertia being really low. Commit.
  • Add Position paramenter for InlineMessage. Commit.
  • Handle URL inputs for pushDialogLayer. Commit. Fixes bug #481623
  • InlineMessage: Fix showing close button. Commit.
  • Handle null drawer as well. Commit.
  • Fix footer in layers. Commit. Fixes bug #480428
KItemModels
  • Trivial fix for crash in buddy() when sourceModel isn't set yet. Commit.
KItemViews
  • Add missing Q_OBJECT to KCategorizedSortFilterProxyModel. Commit.
KJobWidgets
  • Tests need dbus due to KUiServerJobTracker. Commit.
  • Kjobtrackerstest needs dbus. Commit.
  • TARGET Qt6::DBus doesn't work if dependencies export it. Commit.
  • Don't search for QtDBus on Windows/macOS/Android. Commit.
  • Simplify X11 check. Commit.
KNewStuff
  • Add extra ksnrc key to indicate the safety of installation. Commit.
  • Use Continue/Cancel style of question for overwrite dialog. Commit.
  • Change default sorting of entries to "Most Downloads". Commit.
  • Resultsstream: Delay the entry loading into the event look. Commit. Fixes bug #473472
  • Resultsstream: handle query results assertively. Commit.
  • Resultsstream: Allow for the members to be constant. Commit.
  • Unify default sizes. Commit. Fixes bug #482604
  • Fix the "working..." overlay for item installation. Commit. Fixes bug #483108
  • Remove the last uses of Qt5Compat.GraphicalEffects. Commit.
  • Refresh visible entry on uninstall. Commit. Fixes bug #476152
  • [qtquick/action] Add API to set transient parent for dialog. Commit. Fixes bug #479816
  • Fix link list dialog for installation button. Commit. Fixes bug #482349
  • Set questionAsker implicit sizes, set maxWidth to dialog width. Commit. Fixes bug #480338
KNotifications
  • Port QML module to declarative type registration. Commit.
KNotifyConfig
  • Don't use DBus on Windows/macOS. Commit.
KPackage
  • Testpackage: Add a website so that the tests succeed. Commit.
  • Fix: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20. Commit.
KQuickCharts
  • Declare QML module dependencies. Commit.
  • Generate default set of GLSL shaders. Commit. Fixes bug #482988
  • Examples: Remove separator from main page list items. Commit.
  • Piechartnode: Rename updateTriangles to updateSegments. Commit.
  • Piechartnode: Remove some unused stuff. Commit.
  • Examples: Change "smooth" to "interpolate". Commit.
  • Piechart: Use the right amount of thickness for the chart. Commit.
  • Linechart: Use fwidth of the point instead of sdf to avoid conditional fwidth. Commit. Fixes bug #434462
  • Sdf: Allow specifying fwidth() to sdf_render(). Commit.
KRunner
  • Add doxygen comment to ResultsModel class. Commit.
  • Give favorites a relative boost rather than absolute sorting position. Commit.
KService
  • Fix warning: mimeType "x-scheme-handler/file" not found. Commit. Fixes bug #442721
KStatusNotifieritem
  • Improve activating associated window on Wayland. Commit.
KSVG
  • Add test for loading svgs from qrc files. Commit.
  • Support loading svg from QRC files. Commit.
KTextEditor
  • Fix argument hint placement. Commit.
  • Dont use activeView as save dialog parent. Commit. Fixes bug #484466
  • Ensure only set stuff is saved. Commit.
  • Dont write useless entries to session config. Commit.
  • All tests work offscreen in the CI. Commit.
  • Try to avoid crash in destructor. Commit.
  • Try more offscreen. Commit.
  • Ensure we don't crash if no view is active. Commit.
  • Kateviewinternal: accept surrogate category character. Commit. Fixes bug #482864
  • Use test mode with e.g. own temporary config files. Commit.
  • Avoid using QChar constructor for key codes. Commit. Fixes bug #483631
  • Remove obsolete option code. Commit.
  • Remove focus frame option. Commit. Fixes bug #483218
  • Fix duplicate folds occuring. Commit.
  • Fix support for folding in vi normal mode. Commit.
  • Adapt test to hinting change. Commit.
  • Set full hinting instead to ensure the letters are aligned properly. Commit. Fixes bug #482659
  • Try to save changes. Commit. See bug #459093
  • Optimize a mark-restoring condition after document reload. Commit.
KUnitConversion
  • Binary_data: add match strings with {upper/lower}case k for kilo- and kibi-{bits/bytes}. Commit. Fixes bug #483815
KUserFeedback
  • Flatpatk: Use actual 6.6 runtime. Commit.
KWallet
  • [kwallet-query] Create QApplication before using i18n. Commit. Fixes bug #482017
  • Ensure correct exit status by adding returns after exits in QueryDriver. Commit.
KWindowSystem
  • Port QML module to declarative type registration. Commit.
  • Kkeyserver: allow shift to modify modifier keys. Commit.
  • Kkeyserver: add support for modifier keys. Commit.
KXMLGUI
  • Kkeysequencewidget: expose modifierOnlyAllowed. Commit. See bug #470257
  • Don't search for QtDBus on Windows/macOS. Commit.
  • Make sure that actions just added to the toolbar show up in the edit dialog. Commit.
Prison
  • Add dependency to QML module. Commit.
QQC2 Desktop Style
  • CheckIndicator: use Theme.View color, dont inherit parent. Commit.
  • Delegates: Unify alignment and horizontal stretching of labels. Commit.
  • KQuickStyleItem: Replace manual loop with C++20 std::accumulate. Commit.
  • Remove unneeded CMake stuff. Commit.
  • Port away from deprecated ECMQMLModules. Commit.
  • Add type annotations to functions. Commit.
  • Qualify property lookups. Commit.
  • Use local Label component directly. Commit.
  • Use local property directly. Commit.
  • Avoid looking up non-Item properties via Item-based properties. Commit.
  • Avoid looking up non-Item properties via parent. Commit.
  • Remove unused import statements. Commit.
  • Declare dependencies on other QML modules. Commit.
  • [ToolTip] Use local Label instead of importing QQC2. Commit.
  • Completely disable animations when animations are globally disabled. Commit.
  • Localization support. Commit.
  • Add support for custom fonts in ToolButtons. Commit.
  • Autotests: test TextFieldContextMenu. Commit. See bug #481293
  • Always use values from Kirigami.Theme as control palette. Commit. Fixes bug #479015
Solid
  • Udisks2: Read CleartextDevice instead of introspection. Commit.
Sonnet
  • Improve spell check config design. Commit.
  • Remove leftover files. Commit.
Syndication Syntax Highlighting
  • Cmake-generator: refactor XML optimizations. Commit.
  • Cmake.xml: has-target-names-after-kw could be a list. Commit.
  • Cmake.xml: updates for the recently released CMake 3.29. Commit.
  • Cpp: Update Qt classes for Qt 6. Commit.
  • Initial gprbuild references. Commit.
  • Gprbuild: add license info. Commit.
  • Add small GPR test file. Commit.
  • Add GPRbuild syntax. Commit.
  • Add common alternative names used in various markdown parsers for languages. Commit.
  • Fix refs for stan. Commit.
  • Update 2 files. Commit.
  • Use (?:sub){0,2} to work with all pcre versions. Commit.
  • Alternate Names for Definitions. Commit.
  • Fix implicit size -> int conversion. Commit.
Threadweaver
  • Examples: Do not use Qt module includes. Commit.
Categories: FLOSS Project Planets

Freexian Collaborators: Debian Contributions: SSO Authentication for jitsi.debian.social, /usr-move updates, and more! (by Utkarsh Gupta)

Planet Debian - Thu, 2024-04-11 20:00

Contributing to Debian is part of Freexian’s mission. This article covers the latest achievements of Freexian and their collaborators. All of this is made possible by organizations subscribing to our Long Term Support contracts and consulting services.

P.S. We’ve completed over a year of writing these blogs. If you have any suggestions on how to make them better or what you’d like us to cover, or any other opinions/reviews you might have, et al, please let us know by dropping an email to us. We’d be happy to hear your thoughts. :)

SSO Authentication for jitsi.debian.social, by Stefano Rivera

Debian.social’s jitsi instance has been getting some abuse by (non-Debian) people sharing sexually explicit content on the service. After playing whack-a-mole with this for a month, and shutting the instance off for another month, we opened it up again and the abuse immediately re-started.

Stefano sat down and wrote an SSO Implementation that hooks into Jitsi’s existing JWT SSO support. This requires everyone using jitsi.debian.social to have a Salsa account.

With only a little bit of effort, we could change this in future, to only require an account to open a room, and allow guests to join the call.

/usr-move, by Helmut Grohne

The biggest task this month was sending mitigation patches for all of the /usr-move issues arising from package renames due to the 2038 transition. As a result, we can now say that every affected package in unstable can either be converted with dh-sequence-movetousr or has an open bug report. The package set relevant to debootstrap except for the set that has to be uploaded concurrently has been moved to /usr and is awaiting migration. The move of coreutils happened to affect piuparts which hard codes the location of /bin/sync and received multiple updates as a result.

Miscellaneous contributions
  • Stefano Rivera uploaded a stable release update to python3.11 for bookworm, fixing a use-after-free crash.
  • Stefano uploaded a new version of python-html2text, and updated python3-defaults to build with it.
  • In support of Python 3.12, Stefano dropped distutils as a Build-Dependency from a few packages, and uploaded a complex set of patches to python-mitogen.
  • Stefano landed some merge requests to clean up dead code in dh-python, removed the flit plugin, and uploaded it.
  • Stefano uploaded new upstream versions of twisted, hatchling, python-flexmock, python-authlib, python–mitogen, python-pipx, and xonsh.
  • Stefano requested removal of a few packages supporting the Opsis HDMI2USB hardware that DebConf Video team used to use for HDMI capture, as they are not being maintained upstream. They started to FTBFS, with recent sdcc changes.
  • DebConf 24 is getting ready to open registration, Stefano spent some time fixing bugs in the website, caused by infrastructure updates.
  • Stefano reviewed all the DebConf 23 travel reimbursements, filing requests for more information from SPI where our records mismatched.
  • Stefano spun up a Wafer website for the Berlin 2024 mini DebConf.
  • Roberto C. Sánchez worked on facilitating the transfer of upstream maintenance responsibility for the dormant Shorewall project to a new team led by the current maintainer of the Shorewall packages in Debian.
  • Colin Watson fixed build failures in celery-haystack-ng, db1-compat, jsonpickle, libsdl-perl, kali, knews, openssh-ssh1, python-json-log-formatter, python-typing-extensions, trn4, vigor, and wcwidth. Some of these were related to the 64-bit time_t transition, since that involved enabling -Werror=implicit-function-declaration.
  • Colin fixed an off-by-one error in neovim, which was already causing a build failure in Ubuntu and would eventually have caused a build failure in Debian with stricter toolchain settings.
  • Colin added an sshd@.service template to openssh to help newer systemd versions make containers and VMs SSH-accessible over AF_VSOCK sockets.
  • Following the xz-utils backdoor, Colin spent some time testing and discussing OpenSSH upstream’s proposed inline systemd notification patch, since the current implementation via libsystemd was part of the attack vector used by that backdoor.
  • Utkarsh reviewed and sponsored some Go packages for Lena Voytek and Rajudev.
  • Utkarsh also helped Mitchell Dzurick with the adoption of pyparted package.
  • Helmut sent 10 patches for cross build failures.
  • Helmut partially fixed architecture cross bootstrap tooling to deal with changes in linux-libc-dev and the recent gcc-for-host changes and also fixed a 64bit-time_t FTBFS in libtextwrap.
  • Thorsten Alteholz uploaded several packages from debian-printing: cjet, lprng, rlpr and epson-inkjet-printer-escpr were affected by the newly enabled compiler switch -Werror=implicit-function-declaration. Besides fixing these serious bugs, Thorsten also worked on other bugs and could fix one or the other.
  • Carles updated simplemonitor and python-ring-doorbell packages with new upstream versions.
  • Santiago is still working on the Salsa CI MRs to adapt the build jobs so they can rely on sbuild. Current work includes adapting the images used by the build job, implementing the basic sbuild support the related jobs, and adjusting the support for experimental and *-backports releases..
    Additionally, Santiago reviewed some MR such as Make timeout action explicit in the logs and the subsequent Implement conditional timeout verbosity, and the batch of MRs included in https://salsa.debian.org/salsa-ci-team/pipeline/-/merge_requests/482.
  • Santiago also reviewed applications for the improving Salsa CI in Debian GSoC 2024 project. We received applications from four very talented candidates. The selection process is currently ongoing. A huge thanks to all of them!
  • As part of the DebConf 24 organization, Santiago has taken part in the Content team discussions.
Categories: FLOSS Project Planets

Reproducible Builds (diffoscope): diffoscope 264 released

Planet Debian - Thu, 2024-04-11 20:00

The diffoscope maintainers are pleased to announce the release of diffoscope version 264. This version includes the following changes:

[ Chris Lamb ] * Don't crash on invalid zipfiles, even if we encounter 'badness' through through the file. (Re: #1068705) [ FC (Fay) Stegerman ] * Add note when there are duplicate entries in ZIP files. (Closes: reproducible-builds/diffoscope!140) [ Vagrant Cascadian ] * Add an external tool reference for GNU Guix for zipdetails.

You find out more by visiting the project homepage.

Categories: FLOSS Project Planets

Pythonicity: GraphQL root fields

Planet Python - Thu, 2024-04-11 20:00
There is no such thing as a “root field”.

There is a common - seemingly universal - misconception that GraphQL root fields are somehow special, in both usage and implementation. The better conceptual model is that there are root types, and all types have fields. The difference is not just semantics; it leads to actual misunderstandings.

Multiple queries

A common beginner question is “can there be multiple queries in a request”. The question would be better phrased as “can multiple fields on the root query type be requested”. The answer is of course, because requesting multiple fields on a type is normal. The implementation would have to go out of its way to restrict that behavior on just the root type. The only need for further clarity would be to introduce aliases for duplicate fields.

Flat namespace

GraphQL types share a global namespace, causing conflicts when federating multiple graphs. Nothing can be done about that unless GraphQL adopts namespaces.

But many APIs design the root query type to have unnecessarily flat fields. One often sees a hierarchy of types and fields below the root, but the top-level fields resemble a loose collections of functions. Verbs at the top level; nouns the rest of the way down. This design choice appears to be in a feedback loop with the notion of “root fields”.

Even the convention of calling the root query type Query demonstrates a lack of specificity. In a service-oriented architecture, a particular service might be more narrowly defined.

Mutations

Top-level mutation fields are special in one aspect: they are executed in order. This has resulted in even flatter namespaces for mutations,

mutation { createUser # executed first deleteUser }

This is not necessary, but seems widely believed that it is. Nested mutations work just fine.

mutation { user { create # executed in arbitrary order delete } }

If the underlying reason is truly execution order, the client could be explicit instead.

mutation { created: user { # executed first create } deleted: user { delete } }

There is no reason it has to influence API design.

Static methods

At the library level, the effect is top-level resolvers are implemented as functions (or static methods), whereas all other resolver are methods. This may lead to redundant or inefficient implementations, is oddly inconsistent, and is contrary to the documentation.

A resolver function receives four arguments:

obj The previous object, which for a field on the root Query type is often not used.

Sure, “often not used” by the developer of the API. That does not mean “should be unset” by the GraphQL library, but that is what has happened. Some libraries even exclude the object parameter entirely. In object-oriented libraries like strawberry, the code looks unnatural.

import strawberry @strawberry.type class Query: @strawberry.field def instance(self) -> bool | None: return None if self is None else isinstance(self, Query) schema = strawberry.Schema(Query) query = '{ instance }' schema.execute_sync(query).data {'instance': None}

Strawberry allows omitting self for this reason, creating an implicit staticmethod.

Root values

Libraries which follow the reference javascript implementation allow setting the root value explicitly.

schema.execute_sync(query, root_value=Query()).data {'instance': True}

Strawberry unofficially supports supplying an instance, but it has no effect.

schema = strawberry.Schema(Query()) schema.execute_sync(query).data {'instance': None}

And of course self can be of any type.

schema.execute_sync(query, root_value=...).data {'instance': False}

Moreover, the execute functions are for internal usage. Each library will vary in how to configure the root in a production application. Strawberry requires subclassing the application type.

import strawberry.asgi class GraphQL(strawberry.asgi.GraphQL): def __init__(self, root): super().__init__(strawberry.Schema(type(root))) self.root_value = root async def get_root_value(self, request): return self.root_value Example

Consider a more practical example where data is loaded, and clearly should not be reloaded on each request.

@strawberry.type class Dictionary: def __init__(self, source='/usr/share/dict/words'): self.words = {line.strip() for line in open(source)} @strawberry.field def is_word(self, text: str) -> bool: return text in self.words

Whether Dictionary is the query root - or attached to the query root - it should be instantiated only once. Of course it can be cached, but again there is a more natural way to write this outside the context of GraphQL.

@strawberry.type class Query: dictionary: Dictionary def __init__(self): self.dictionary = Dictionary()

Caching, context values, and root values are all clunky workarounds compared to the consistency of letting the root be Query() instead of Query. The applications which do not require this feature would never notice the difference.

The notion of “root fields” behaving as “top-level functions” has resulted in needless confusion, poorer API design, and incorrect implementations.

Categories: FLOSS Project Planets

The Drop Times: Harmony in Code: Irina Zaks' Open Source Journey

Planet Drupal - Thu, 2024-04-11 15:39
In a compelling interview, Irina Zaks, co-founder and CTO of Fibonacci Web Studio, shares insights on bridging quantum physics with web development, simplifying Drupal migrations, and advocating for open source in academia. Ahead of her Stanford WebCamp 2024 session, Irina discusses the impact of her work on the academic sector and her vision for the future of web technology.
Categories: FLOSS Project Planets

Pages