Russ Allbery: Review: Dark Class
| Series: | Class 5 #5 |
| Publisher: | Eclipse |
| Copyright: | 2022 |
| ISBN: | 0-6454658-2-8 |
| Format: | Kindle |
| Pages: | 349 |
| Series: | Class 5 #5 |
| Publisher: | Eclipse |
| Copyright: | 2022 |
| ISBN: | 0-6454658-2-8 |
| Format: | Kindle |
| Pages: | 349 |
WWW::Mechanize::Chrome library and its test suite. ThisResource was not cached errors duringsaveResources, we implemented a fully asynchronous fallback_saveResourceTree. By chaining_cached_document with DOM.getOuterHTMLfile:// access.File name too long errors,MAX_PATH limit is 260filenameFromUrl was hardened. The filenamedefault_executable_names was expanded to includeheadless_shell and search paths were updated to include/usr/lib64/chromium-browser/.DOM.documentUpdated events could invalidatenodeIds immediately after navigation, causing XPath queriessleep(0.25s) was added after page loads to ensure the DOMualarm was a blocker for Windows, wheret::helper::set_watchdog functionalarm() (seconds) on Windowsualarm (microseconds) on Unix-like systems, enablinglib/ and to always runmake clean and perl Makefile.PL to ensureMETA.json and META.yml reflect the newad2 Windows Server 2025 instance was restored andad2 Windows_future API.xpath, field,get, etc.) into thin wrappers around new non-blocking..._future counterparts. This moved timeout management tot/lib/t/helper.pm, was created tosafe_get,safe_xpath) were implemented there, usingFuture->wait_any to race asynchronous operations against# Example test helper implementation
sub safe_xpath
my ($mech, $query, %options) = @_;
my $timeout = delete $options timeout 5;
my $call_f = $mech->xpath_future($query, %options);
my $timeout_f = $mech->sleep_future($timeout)->then(sub Future->fail("Timeout") );
return Future->wait_any($call_f, $timeout_f)->get;
t/50-tick.t)WWW::Mechanize::Chrome::Node was storing[key, val, key, val]), which wast::helper that listens on an ephemeral port; the backgroundget_set_value_future non-blocking required first making its_field_by_name, asynchronous. This culminatedform_name,form_id, etc.) to use the new asynchronous_future lookups, which was a key step in mitigating the_process_eval_result helper to centralize the parsing ofRuntime.evaluate. This ensures consistenteval_in_page) and asynchronous (eval_future)$self and the $response object, creating aScalar::Util::weaken on both $self and any->then block that is stored on an object.
wantarray): AwantarrayFuture->then blocks. This causedxpath to return incorrect results (e.g., awantarray in the synchronous_future method, and# Synchronous Wrapper
sub xpath($self, $query, %options)
$options wantarray = wantarray; # 1. Capture
return $self->xpath_future($query, %options)->get; # 2. Pass
# Asynchronous Implementation
sub xpath_future($self, $query, %options)
my $wantarray = delete $options wantarray ; # 3. Retrieve
# ... async logic ...
return $doc->then(sub
if ($wantarray) # 4. Respect
return Future->done(@results);
else
return Future->done($results[0]);
);
decoded_content()__body_future. This was implemented by storing the$response-> __body_future ). To make this more robust,about:blankXMLSerializer to get the live DOM content.
Future->then. Callbacks were updated to use optionalsub($result = undef) ... ) to gracefullysetDocumentContent is parsed differently than contentdocument.evaluate) against the live DOM, bypassing the_future variants.t/lib/t/helper.pm), not in the core library.wantarrayFuture chain to ensure correctwarn, note, diag) should be$self->log('debug', ...)MutationObserver Saga (March 19)
With most of the library refactored to be asynchronous, one stubbornt/65-is_visible.t, continued to fail with timeouts.wait_until_visible polling logic with a moreMutationObserver.
repeat sleep loop with an event-drivenMutationObserver in JavaScript that would notify PerlcallFunctionOn_future.setTimeout, which expected milliseconds.MutationObserver sPromise would never resolve, even after thecheckVisibility JavaScript logic inside the observerconsole.log tracing, failed to resolve theChrome.pm module.MutationObserver approachMutationObserver, a strategic decision was made to revertMutationObserver implementation, when integrated viacallFunctionOn_future with awaitPromise,MutationObserver code fromWWW::Mechanize::Chrome.pm and restore the originalrepeat sleep polling mechanism. A stable,t/lib/t/helper.pmsafe_wait_until_* wrappers werewait_any andsleep_future) that raced against the underlying pollingt/78-memleak.t persisted, but only on the Windowsad2 environment. This required a different approach thanon_dialog event listener was not being broken on Windows,on_dialog(undef) in DESTROY) were notIO::Async event loop implementation on Windows, and theTest::Memory::Cycle module. The cycle report was identicalon_dialog(undef) call fromclose() to DESTROY().deleteing the listener and callbackDESTROY.$self->remove_listener and$self->target->unlisten in a mistaken attempt to findt/78-memleak.t was wrapped in a conditionalTODO block that only executes on Windowsif ($^O =~ /MSWin32/i)), formally acknowledging the bugprove --nocount --jobs 3 -I local/ -bl xt t directly. This-It/lib include path, whicht::helper module.Can't locate t/helper.pm in @INC.Makefile.PL revealed a custom MY::test block-It/lib flag into themake test command. This confirmed thatmake test is the correct, canonical way to run the test.github/workflows/linux.yml file was modified to replaceprove call with make test in theRun Tests step. This ensures the CI environment runs theWWW::Mechanize::Chrome test suite is now stable and| Series: | Lady Astronaut #4 |
| Publisher: | Tor |
| Copyright: | 2025 |
| ISBN: | 1-250-23703-3 |
| Format: | Kindle |
| Pages: | 390 |
Recently I found myself with a few hours to kill, but with the only
available connectivity provided by an annoying firewall which would
normally allow requests only to a few very specific web sites.
This post shows how to work around this kind of restrictions by hiding
SSH in an HTTPS connection, which then can be used as a SOCKS proxy to
allow general connectivity.
socat
does all the hard work.
First, create two self-signed RSA keys pairs, one for the client
(bongo) and one for the server (attila):
domain=bongo.example.net openssl req -x509 -newkey rsa:2048 -days 7300 \ -subj /CN=$domain -addext "subjectAltName = DNS:$domain" \ -keyout socat.key -nodes \ -out socat.pemThen, concatenate the public and private keys to create the file provided to the
cert option, and use the public key as
the file for the cafile option on the other
side.
On the client side, if you normally would connect to
attila.example.net then you can add something like this to
~/.ssh/config:
Host httpstunnel-attila.example.net ProxyCommand socat --statistics STDIO OPENSSL:attila.example.net:443, cert=$HOME/.ssh/socat-bongo.pem,cafile=$HOME/.ssh/socat-attila.pem, snihost=$ SOCAT_SNI:-x.com DynamicForward 1080 Compression yes HostKeyAlias attila.example.net ControlMaster yes ControlPath ~/.ssh/.control_attila.example.net_22_%rThe
ProxyCommand directive uses socat to
provide the connectivity which ssh will use over stdio
instead of connecting to port 22 of the server.
The snihost option is enough to make many firewalls
believe that this is an authorized HTTPS request.
On the server side we use a simple systemd unit to start a forking
instance of socat, which will accept and process requests
from the client (and from random crawlers on the Internet: expect a lot
of cruft in that log...):
[Unit] Description=socat tunnel After=network.target [Service] Type=exec ExecStart=socat -ly OPENSSL-LISTEN:443,fork,reuseaddr, cert=%d/tlskey,cafile=%d/tlsca TCP:localhost:22 SuccessExitStatus=143 LoadCredential=tlskey:/etc/ssh/socat-attila.pem LoadCredential=tlsca:/etc/ssh/socat-bongo.pem Restart=on-abnormal RestartSec=5s DynamicUser=yes PrivateDevices=yes PrivateTmp=yes ProtectClock=yes ProtectControlGroups=yes ProtectHome=yes ProtectHostname=yes ProtectKernelLogs=yes ProtectKernelModules=yes ProtectKernelTunables=yes ProtectProc=invisible ProtectSystem=strict RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX RestrictNamespaces=yes RestrictRealtime=yes RestrictSUIDSGID=yes LockPersonality=yes MemoryDenyWriteExecute=yes NoNewPrivileges=yes AmbientCapabilities=CAP_NET_BIND_SERVICE CapabilityBoundingSet=CAP_NET_BIND_SERVICE SystemCallArchitectures=native SystemCallErrorNumber=EPERM SystemCallFilter=@system-service SystemCallFilter=~@resources SystemCallFilter=~@privileged [Install] WantedBy=multi-user.targetStrong sandboxing is enabled, so the
socat instance
is confined with very limited privileges. An interesting point is the
use of systemd credentials
to provide the cryptographic keys, since it allows to store them in a
part of the file system which would not be accessible to the program.
Advanced users can use this method to provide the keys from secure
storage.
# dig -t txt _spf.google.com grep spf1 _spf.google.com. 300 IN TXT "v=spf1 ip4:74.125.0.0/16 ip4:209.85.128.0/17 ip6:2001:4860:4864::/56 ip6:2404:6800:4864::/56 ip6:2607:f8b0:4000::/36 ip6:2800:3f0:4000::/36 ip6:2a00:1450:4000::/36 ip6:2c0f:fb50:4000::/36 ~all" # dig -t txt outlook.com grep spf1 outlook.com. 126 IN TXT "v=spf1 include:spf2.outlook.com -all" # dig -t txt _spf.mail.yahoo.com grep spf1 _spf.mail.yahoo.com. 1800 IN TXT "v=spf1 ptr:yahoo.com ptr:yahoo.net ip4:34.2.71.64/26 ip4:34.2.75.0/26 ip4:34.2.84.64/26 ip4:34.2.85.64/26 ip4:34.2.64.0/22 ip4:34.2.68.0/23 ip4:34.2.70.0/23 ip4:34.2.72.0/22 ip4:34.2.78.0/23 ip4:34.2.80.0/23 ip4:34.2.82.0/23 ip4:34.2.84.0/24 ip4:34.2.86.0" "/23 ip4:34.2.88.0/23 ip4:34.2.90.0/23 ip4:34.2.92.0/23 ip4:34.2.85.0/24 ip4:34.2.94.0/23 ?all" # dig -t txt icloud.com grep spf1 icloud.com. 3586 IN TXT "v=spf1 ip4:17.41.0.0/16 ip4:17.58.0.0/16 ip4:17.142.0.0/15 ip4:17.57.155.0/24 ip4:17.57.156.0/24 ip4:144.178.36.0/24 ip4:144.178.38.0/24 ip4:112.19.199.64/29 ip4:112.19.242.64/29 ip4:222.73.195.64/29 ip4:157.255.1.64/29" " ip4:106.39.212.64/29 ip4:123.126.78.64/29 ip4:183.240.219.64/29 ip4:39.156.163.64/29 ip4:57.103.64.0/18" " ip6:2a01:b747:3000:200::/56 ip6:2a01:b747:3001:200::/56 ip6:2a01:b747:3002:200::/56 ip6:2a01:b747:3003:200::/56 ip6:2a01:b747:3004:200::/56 ip6:2a01:b747:3005:200::/56 ip6:2a01:b747:3006:200::/56 ~all"In most IM systems there is a strong connection between people who communicate. If I send you two direct messages they will appear in the same room, and if someone else tries forging messages from me (EG by replacing the c and e letters in my address with Cyrillic letters that look like them or by mis-spelling my name) a separate room will be created and it will be obvious that something unexpected is happening. Protecting against the same attacks in email requires the user carefully reading the message, given that it s not uncommon for someone to start a message to me with Hi Russel (being unable to correctly copy my name from the To: field of the message they are writing) it s obvious that any security measure relying on such careful reading will fail. The IM protections against casual forgery also apply to rooms with multiple users, a new user can join a room for the purpose of spamming but they can t send a casual message impersonating a member of the room. A user can join a Matrix room I m in with the name Russell from another server but the potential for confusion will be minimised by a message notifying everyone that another Russell has joined the room and the list of users will show two Russells. For email the protections against forgery when sending to a list server are no different than those when sending to an individual directly which means very weak protections. Authenticating the conversation context once as done with IM is easier and more reliable than authenticating each message independently. Is Email Sucking the Main Technical Difference? It seems that the problems with forgery, spam, and general confusion when using email are a large part of the difference between email and IM. But in terms of technical issues the fact that email has significantly more users (if only because you need an email account to sign up for an IM system) is a major difference. Internet email is currently a universal system (apart from when it breaks from spam) and it has historically been used to gateway to other email systems like Fidonet, Uucp, and others. The lack of tight connection between parties that exchange messages in email makes it easier to bridge between protocols but harder to authenticate communication. Most of the problems with Internet email are not problems for everyone at all times, they are technical trade-offs that work well for some situations and for some times. Unfortunately many of those trade-offs are for things that worked well 25+ years ago. The GUI From a user perspective there doesn t have to be a great difference between email and IM. Email is usually delivered quickly enough to be in the same range as IM. The differences in layout between IM client software and email client software is cosmetic, someone could write an email client that organises messages in the same way as Slack or another popular IM system such that the less technical users wouldn t necessarily know the difference. The significant difference in the GUI for email and IM software was a design choice. Conversation Organisation The most significant difference in the operation of email and IM at the transport level is the establishment of connections in IM. Another difference is the fact that there are no standards implemented for the common IM implementations to interoperate which is an issue of big corporations creating IM systems and deliberately making them incompatible. The methods for managing email need to be improved. Having an inbox that s an unsorted mess of mail isn t useful if you want to track one discussion, breaking it out into different sub folders for common senders (similar to IM folders for DMs) as a standard feature without having to setup rules for each sender would be nice. Someone could design an email program with multiple layouts, one being the traditional form (which seems to be copied from Eudora [3]) and one with the inbox (or other folders) split up into conversations. There are email clients that support managing email threads which can be handy in some situations but often isn t the best option for quickly responding to messages that arrived recently. Archiving Most IM systems have no method for selectively archiving messages, there s a request open for a bookmark function in Matrix and there s nothing stopping a user from manually copying a message. But there s nothing like the convenient ability to move email to an archive folder in most IM systems. Without good archiving IM is a transient medium. This is OK for conversations but not good for determining the solutions to technical problems unless there is a Wiki or other result which can be used without relying on archives. Composing Messages In a modern email client when sending a message it prompts you for things that it considers complete, so if you don t enter a Subject or have the word attached in the message body but no file is attached to the message then it will prompt you to confirm that you aren t making a mistake. In an IM client the default is usually that pressing ENTER sends the message so every paragraph is a new message. IM clients are programmed to encourage lots of short messages while email clients are programmed to encourage more complete messages. Social Issues Quality The way people think about IM and email is very different, as one example there was never a need for a site like nohello.net for email. The idea that it s acceptable to use even lower quality writing in IM than people tend to use in email seems to be a major difference between the communication systems. It can be a good thing to have a chatty environment with messages that are regarded as transient for socialising, but that doesn t seem ideal for business use. Ownership Email is generally regarded as being comparable to physical letters. It is illegal and widely considered to be socially wrong to steal a letter from someone s letterbox if you regret sending it. In email the only unsend function I m aware of is that in Microsoft software which is documented to only work within the same organisation, and that only works if the recipient hasn t read the message. The message is considered to be owned by the recipient. But for IM it s a widely supported and socially acceptable function to delete or edit messages that have been sent. The message is regarded as permanently the property of the sender. What Should We Do? Community Creators When creating a community (and I use this in the broadest sense including companies) you should consider what types of communication will work well. When I started the Flounder group [4] I made a deliberate decision that non-free communication systems go against the aim of the group, I started it with a mailing list and then created a Matrix room which became very popular. Now the list hardly gets any use. It seems that most of the communication in the group is fairly informal and works better with IM. Does it make sense to use both? Should IM systems be supplemented with other systems that facilitate more detail such as a Wiki or a Lemmy room/instance [5] to cover the lack of long form communication? I have created a Lemmy room for Flounder but it hasn t got much interest so far. It seems that almost no-one makes a strategic decision about such issues. Software Developers It would be good to have the same options for archiving IM as there are for email. Also some options to encourage quality in IM communication similar to the way email clients want confirmation before sending messages without a subject or that might be missing an attachment. It would also be good to have better options for managing conversations in email. The Inbox as currently used is good for some things but a button to switch between that and a conversation view would be good. There are email clients that allow selecting message sort order and aggregation (kmail has a good selection of options) but they are designed for choosing a single setup that you like not between multiple views based on the task you are doing. It would be good to have links between different communication systems, if users had the option of putting their email address in their IM profile it would make things much easier. Having entirely separate systems for email and IM isn t good for users. Users The overall communications infrastructure could be improved if more people made tactical decisions about where and how to communicate. Keep the long messages to email and the chatty things to IM. Also for IM just do the communication not start with hello . To discourage wasting time I generally don t reply to messages that just say hello unless it s the first ever IM from someone. Conclusion A large part of the inefficiencies in electronic communication are due to platforms and usage patterns evolving with little strategic thought. The only apparent strategic thought is coming from corporations that provide IM services and have customer lock in at the core of their strategies. Free software developers have done great work in developing software to solve tactical problems but the strategies of large scale communications aren t being addressed. Email is loosely coupled and universal while IM is tightly coupled, authenticated, and often siloed. This makes email a good option for initial contact but a risk for ongoing discussions. There is no great solution to these issues as they are largely a problem due to the installed user base. But I think we can mitigate things with some GUI design changes and strategic planning of communication.
What led to this experiment? Well, for one, Well, for one, there was a thought
shared by Andrej Karpathy regarding the shift towards "Agentic" workflows.
"The future of software is not just 'tools', but 'agents' that can navigate complex tasks on your behalf."Recently, I spoke with Ritesh, who mentioned his success using the Gemini CLI to debug an idle power drain issue on his laptop. I wanted to experiment with this myself, and I had the perfect use case: configuring the Hyprland Window Manager on my aging laptop. The machine is nearly eight years old with 12GB of RAM (upgraded from the original 4GB). I found that GNOME and KDE were becoming overkill, often leading to system freezes when running multiple AI-powered IDEs like Antigravity and VS Code with Co-pilot. Coincidentally, I noticed my Jio number had a "Google One 2TB" and "Google AI Premium" plan available to claim. I claimed it, and now here I am, experimenting with the Gemini CLI.
npm install -g @google/gemini-cliNext, we need to create a context for Gemini a set of instructions for it to follow throughout the project. This is managed via a GEMINI.md file. I went to Google Gemini, explained my requirements, and asked it to generate one for me. My requirements were:
# Role: Hyprland Configuration Specialist (Minimalist & High-Performance)
You are a Linux Systems Engineer specializing in migrating users from heavy
Desktop Environments to minimalist, tiling-based Wayland sessions on Debian.
Your goal is to maximize available RAM for heavy applications while maintaining
essential desktop features.
## 1. Environment & Persona
- **Target OS:** Debian (Linux)
- **Target WM:** Hyprland
- **Hardware:** ThinkPad E470 (i5-7th Gen, 12GB RAM)
- **User Profile:** Emacs user, prioritizes "anti-gravity" (zero bloat).
- **Tone:** Technical, concise, and security-conscious.
## 2. Core Functional Requirements
- **Status Bar:** waybar (with CPU, RAM, Network, and Battery icons).
- **Wallpaper:** swww or hyprpaper .
- **Screen Lock:** hyprlock + hypridle .
- **Input Mapping:** Swap Control and Caps Lock ( kb_options = ctrl:nocaps ).
## 3. Operational Constraints
- **Permission First:** Ask before using sudo or writing outside the work directory.
- **Inspection:** Use hyprctl , lsmod , or gsettings for compatibility checks.
- **Artifact Management:** Update MEMORY.md after every major step.
Read MEMORY.md and GEMINI.md. Based on my hardware, give me a shell script to inspect my current GNOME environment so we can start replicating the session basics.
My Debian contributions this month were all sponsored by Freexian.
You can also support my work directly via Liberapay or GitHub Sponsors.
OpenSSH
I released bookworm and trixie fixes for CVE-2025-61984 and CVE-2025-61985, both allowing code execution via ProxyCommand in some cases. The trixie update also included a fix for openssh-server: refuses further connections after having handled PerSourceMaxStartups connections.
bugs.debian.org administration
Gioele Barabucci reported that some messages to the bug tracking system generated by the bts command were being discarded. While the regression here was on the client side, I found and fixed a typo in our SpamAssassin configuration that was failing to apply a bonus specifically to forwarded commands, mitigating the problem.
Python packaging
New upstream versions:
pkg_resources:
Testsuite: autopkgtest-pkg-pybuild easier to find.
I backported python-pytest-unmagic, a more recent version of pytest-django, and a more recent version of django-cte to trixie for use in Debusine.
Rust packaging
I also packaged rust-garde and rust-garde-derive, which are part of the pile of work needed to get the ruff packaging back in shape (which is a project I haven t decided if I m going to take on for real, but I thought I d at least chip away at a bit of it).
Other bits and pieces
Code reviews
Vcs-Git at it. However:
debian/, or something even stranger.
debian/1.2.3-7 tag on salsa corresponds precisely to what was actually uploaded. dput-based tooling (such as gbp buildpackage) doesn t cross-check the .dsc against git.
Vcs-Git and Salsa to build a Debian derivative? You could not.
tag2upload and dgit do solve this problem. When you upload, they:
archive/debian/1.2.3-7 tag to a single central git depository, *.dgit.debian.org;
Dgit field in .dsc so that clients can tell (using the ftpmaster API) that this was a git-based upload, what the corresponding git objects are, and where to find them.
dgit clone, as advertised in e.g. dgit-user(7). For dput-based uploads, it falls back to importing the source package.)
Adopting tag2upload - the minimal change
tag2upload is a substantial incremental improvement to many existing workflows. git-debpush is a drop-in replacement for building, signing, and uploading the source package.
So, you can just adopt it without completely overhauling your packaging practices. You and your co-maintainers can even mix-and-match tag2upload, dgit, and traditional approaches, for the same package.
Start with the wiki page and git-debpush(1) (ideally from forky aka testing).
You don t need to do any of the other things recommended in this article.
Overhauling your workflow, using advanced git-first tooling
The rest of this article is a guide to adopting the best and most advanced git-based tooling for Debian packaging.
Assumptions
gbp pq and/or quilt, and often used with git-buildpackage. You previously used gbp import-orig.
origin remote set to Salsa.
master. Personally I think we should use main but changing your main branch name is outside the scope of this article.
rationale Much traditional Debian tooling like
quiltandgbp pquses the patches-unapplied branch format, which stores the delta as patch files indebian/patches/, in a git tree full of unmodified upstream files. This is clumsy to work with, and can even be an alarming beartrap for Debian outsiders.
git merge when merging from upstream.
This is appropriate if your package has no or very few upstream changes. It is a good approach if the Debian maintainers and upstream maintainers work very closely, so that any needed changes for Debian are upstreamed quickly, and any desired behavioural differences can be arranged by configuration controlled from within debian/.
This is the approach documented more fully in our workflow tutorial dgit-maint-merge(7).
First, establish which upstream git tag corresponds to the version currently in Debian. From the sake of readability, I m going to pretend that upstream version isrationale Many maintainers have been importing upstream tarballs into git, for example by using
gbp import-orig. But in reality the upstream tarball is an intermediate build product, not (just) source code. Using tarballs rather than git exposes us to additional supply chain attacks; indeed, the key activation part of the xz backdoor attack was hidden only in the tarball! git offers better traceability than so-called pristine upstream tarballs. (The word pristine is even a joke by the author of pristine-tar!)
1.2.3, and that upstream tagged it v1.2.3.
Edit debian/watch to contain something like this:
version=4
opts="mode=git" https://codeberg.org/team/package refs/tags/v(\d\S*)You may need to adjust the regexp, depending on your upstream s tag name convention. If debian/watch had a files-excluded, you ll need to make a filtered version of upstream git.
Probably, the currentrationale We need some upstream tarball for the
3.0 (quilt)source format to work with. It needs to correspond to the git commit we re using as our upstream. We don t need or want to use a tarball from upstream for this. The.origis just needed so a nice legacy Debian source package (.dsc) can be generated.
.orig in the Debian archive, is an upstream tarball, which may be different to the output of git-archive and possibly even have different contents to what s in git. The legacy archive has trouble with differing .origs for the same upstream version .
So we must until the next upstream release change our idea of the upstream version number. We re going to add +git to Debian s idea of the upstream version. Manually make a tag with that name:
git tag -m "Compatibility tag for orig transition" v1.2.3+git v1.2.3~0
git push origin v1.2.3+gitIf you are doing the packaging overhaul at the same time as a new upstream version, you can skip this part.
git branch -f old-master # make a note of the old git representation
git reset --hard v1.2.3 # go back to the real upstream git tag
git checkout old-master :debian # take debian/* from old-master
git commit -m "Re-import Debian packaging on top of upstream git"
git merge --allow-unrelated-histories -s ours -m "Make fast forward from tarball-based history" old-master
git branch -d old-master # it's incorporated in our history nowIf there are any patches, manually apply them to your main branch with git am, and delete the patch files (git rm -r debian/patches, and commit). (If you ve chosen this workflow, there should be hardly any patches,)
rationale These are some pretty nasty git runes, indeed. They re needed because we want to restart our Debian packaging on top of a possibly quite different notion of what the upstream is.
git-debrebase -fdiverged convert-from-gbp upstream/1.2.3
git-debrebase -fdiverged -fupstream-not-ff new-upstream 1.2.3+gitIf you had patches which patched generated files which are present only in the upstream tarball, and not in upstream git, you will encounter rebase conflicts. You can drop hunks editing those files, since those files are no longer going to be part of your view of the upstream source code at all.
rationale The force option
-fupstream-not-ffwill be needed this one time because your existing Debian packaging history is (probably) not based directly on the upstream history.-fdivergedmay be needed because git-debrebase might spot that your branch is not based on dgit-ish git history.
dgit fetch
git show dgit/dgit/sid:debian/changelog
# check that you have the same version number
git merge -s ours --allow-unrelated-histories -m 'Declare fast forward from pre-git-based history' dgit/dgit/sidChange the source format
Delete any existing debian/source/options and/or debian/source/local-options.
debian/source/format to 1.0. Add debian/source/options containing -sn.
rationale We are using the 1.0 native source format. This is the simplest possible source format - just a tarball. We would prefer 3.0 (native) , which has some advantages, but dpkg-source between 2013 (wheezy) and 2025 (trixie) inclusive unjustifiably rejects this configuration. You may receive bug reports from over-zealous folks complaining about the use of the 1.0 source format. You should close such reports, with a reference to this article and to #1106402.
debian/source/format contains 3.0 (quilt).
README.source to at least mention dgit-maint-merge(7) or dgit-maint-debrebase(7), and to tell people not to try to edit or create anything in debian/patches/. Consider saying that uploads should be done via dgit or tag2upload.
Check that your Vcs-Git is correct in debian/control. Consider deleting or pruning debian/gbp.conf, since it isn t used by dgit, tag2upload, or git-debrebase.
debian/changelog about the git packaging change.
git-debrebase new-upstream will have added a new upstream version stanza to debian/changelog. Edit that so that it instead describes the packaging change. (Don t remove the +git from the upstream version number there!)
rationale Squashing could destroy your carefully-curated delta queue. It would also disrupt git-debrebase s git branch structure.
debian/salsa-ci.yml containing
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.ymlIn your Salsa repository, under Settings / CI/CD , expand General Pipelines and set CI/CD configuration file to debian/salsa-ci.yml.
rationale Your project may have an upstream CI config in
.gitlab-ci.yml. But you probably want to run the Debian Salsa CI jobs. You can add various extra configuration todebian/salsa-ci.ymlto customise it. Consult the Salsa CI docs.
debian/salsa-ci.yml:
.git-debrebase-prepare: &git-debrebase-prepare
# install the tools we'll need
- apt-get update
- apt-get --yes install git-debrebase git-debpush
# git-debrebase needs git user setup
- git config user.email "salsa-ci@invalid.invalid"
- git config user.name "salsa-ci"
# run git-debrebase make-patches
# https://salsa.debian.org/salsa-ci-team/pipeline/-/issues/371
- git-debrebase --force
- git-debrebase --noop-ok make-patches
# make an orig tarball using the upstream tag, not a gbp upstream/ tag
# https://salsa.debian.org/salsa-ci-team/pipeline/-/issues/541
- git-deborig
.build-definition: &build-definition
extends: .build-definition-common
before_script: *git-debrebase-prepare
build source:
extends: .build-source-only
before_script: *git-debrebase-prepare
variables:
# disable shallow cloning of git repository. This is needed for git-debrebase
GIT_DEPTH: 0rationale Unfortunately the Salsa CI pipeline currently lacks proper support for git-debrebase (salsa-ci#371) and has trouble directly using upstream git for orig tarballs (#salsa-ci#541). These runes were based on those in the Xen package. You should subscribe to the tickets #371 and #541 so that you can replace the clone-and-hack when proper support is merged.
master. Set Allowed to merge to Maintainers . Set Allowed to push and merge to No one . Leave Allow force push disabled.
This means that the only way to land anything on your mainline is via a Merge Request. When you make a Merge Request, gitlab will offer Set to auto-merge . Use that.
gitlab won t normally merge an MR unless CI passes, although you can override this on a per-MR basis if you need to.
(Sometimes, immediately after creating a merge request in gitlab, you will see a plain Merge button. This is a bug. Don t press that. Reload the page so that Set to auto-merge appears.)
autopkgtests
Ideally, your package would have meaningful autopkgtests (DEP-8 tests) This makes Salsa CI more useful for you, and also helps detect and defend you against regressions in your dependencies.
The Debian CI docs are a good starting point. In-depth discussion of writing autopkgtests is beyond the scope of this article.
Day-to-day work
With this capable tooling, most tasks are much easier.
Making changes to the package
Make all changes via a Salsa Merge Request. So start by making a branch that will become the MR branch.
On your MR branch you can freely edit every file. This includes upstream files, and files in debian/.
For example, you can:
git cherry-pick an upstream commit.
git am a patch from a mailing list or from the Debian Bug System.
git revert an earlier commit, even an upstream one.
git-rebase to squash/edit/combine/reorder commits.
git-debrebase -i to squash/edit/combine/reorder commits. When you are happy, run git-debrebase conclude.
Do not edit debian/patches/. With git-debrebase, this is purely an output. Edit the upstream files directly instead. To reorganise/maintain the patch queue, use git-debrebase -i to edit the actual commits.
apt-get build-dep .
dpkg-buildpackage -uc -bIdeally this will leave git status clean, with no modified or un-ignored untracked files. If it shows untracked files, add them to .gitignore or debian/.gitignore as applicable.
If it dirties the tree, consider trying to make it stop doing that. The easiest way is probably to build out-of-tree, if supported upstream. If this is too difficult, you can leave the messy build arrangements as they are, but you ll need to be disciplined about always committing, using git clean and git reset, and so on.
For formal binaries builds, including for testing, use dgit sbuild as described below for uploading to NEW.
Uploading to Debian
Start an MR branch for the administrative changes for the release.
Document all the changes you re going to release, in the debian/changelog.
dgit fetch sid
gbp dch --ignore-branch --since=dgit/dgit/sid --git-log=^upstream/main(For the first upload after switching to using tag2upload or dgit you needrationale
--ignore-branchis needed because gbp dch wrongly thinks you ought to be running this onmaster, but of course you re running it on your MR branch. The--git-log=^upstream/mainexcludes all upstream commits from the listing used to generate the changelog. (I m assuming you have anupstreamremote and that you re basing your work on theirmainbranch.) If there was a new upstream version, you ll usually want to write a single line about that, and perhaps summarise anything really important.
--since=debian/1.2.3-1, where 1.2.3-1 is your previous DEP-14 tag, because dgit/dgit/sid will be a dsc import, not your actual history.)
UNRELEASED to the target suite, and finalise the changelog. (Note that dch will insist that you at least save the file in your editor.)
dch -r
git commit -m 'Finalise for upload' debian/changelogMake an MR of these administrative changes, and merge it. (Either set it to auto-merge and wait for CI, or if you re in a hurry double-check that it really is just a changelog update so that you can be confident about telling Salsa to Merge unverified changes .)
Now you can perform the actual upload:
git checkout master
git pull --ff-only # bring the gitlab-made MR merge commit into your local treegit-debpushgit-debpush --quilt=linear--quilt=linear is needed only the first time, but it is very important that first time, to tell the system the correct git branch layout.
dgit can help take care of the build and upload for you:
Prepare the changelog update and merge it, as above. Then:
git-deborig
git-debrebase quickrationale Source package format 3.0 (quilt), which is what I m recommending here for use with git-debrebase, needs an orig tarball; it would also be needed for 1.0-with-diff.
dgit sbuild
dgit push-builtNew upstream version Find the new upstream version number and corresponding tag. (Let s suppose it srationale You don t have to use
dgit sbuild, but it is usually convenient to do so, because unlike sbuild, dgit understands git. Also it works around a gitignore-related defect in dpkg-source.
1.2.4.) Check the provenance:
git verify-tag v1.2.4rationale Not all upstreams sign their git tags, sadly. Sometimes encouraging them to do so can help. You may need to use some other method(s) to check that you have the right git commit for the release.
git merge v1.2.4
dch -v1.2.4-1 'New upstream release.'git debrebase mew-upstream 1.2.4git merge or git (deb)rebase.
After you ve completed the merge, test your package and make any further needed changes. When you have it working in a local branch, make a Merge Request, as above.
Sponsorship
git-based sponsorship is super easy! The sponsee can maintain their git branch on Salsa, and do all normal maintenance via gitlab operations.
When the time comes to upload, the sponsee notifies the sponsor that it s time. The sponsor fetches and checks out the git branch from Salsa, does their checks, as they judge appropriate, and when satisfied runs git-debpush.
As part of the sponsor s checks, they might want to see all changes since the last upload to Debian:
dgit fetch sid
git diff dgit/dgit/sid..HEADOr to see the Debian delta of the proposed upload:
git verify-tag v1.2.3
git diff v1.2.3..HEAD ':!debian'git log -p v1.2.3..HEAD ':!debian'Don t look at debian/patches/. It can be absent or out of date.
dgit fetch sid
git diff master...dgit/dgit/sidIf the NMUer used dgit, then git log dgit/dgit/sid will show you the commits they made.
Normally the best thing to do is to simply merge the NMU, and then do any reverts or rework in followup commits:
git merge dgit/dgit/sidgit-debrebase quick at this stage, to check that the merge went OK and the package still has a lineariseable delta queue.
1.2.3-7, you can go back and see the NMU diff again with:
git diff debian/1.2.3-7...dgit/dgit/siddebian/patches/. Normally it s best to filter them out with git diff ... ':!debian/patches'
If you d prefer to read the changes to the delta queue as an interdiff (diff of diffs), you can do something like
git checkout debian/1.2.3-7
git-debrebase --force make-patches
git diff HEAD...dgit/dgit/sid -- :debian/patchesto diff against a version with debian/patches/ up to date. (The NMU, in dgit/dgit/sid, will necessarily have the patches already up to date.)
Initial filteringrationale Yes, this will end up including the non-free files in the git history, on official Debian servers. That s OK. What s forbidden is non-free material in the Debianised git tree, or in the source packages.
git checkout -b upstream-dfsg v1.2.3
git rm nonfree.exe
git commit -m "upstream version 1.2.3 DFSG-cleaned"
git tag -s -m "upstream version 1.2.3 DFSG-cleaned" v1.2.3+ds1
git push origin upstream-dfsgAnd now, use 1.2.3+ds1, and the filtered branch upstream-dfsg, as the upstream version, instead of 1.2.3 and upstream/main. Follow the steps for Convert the git branch or New upstream version, as applicable, adding +ds1 into debian/changelog.
If you missed something and need to filter out more a nonfree files, re-use the same upstream-dfsg branch and bump the ds version, eg v1.2.3+ds2.
Subsequent upstream releases
git checkout upstream-dfsg
git merge v1.2.4
git rm additional-nonfree.exe # if any
git commit -m "upstream version 1.2.4 DFSG-cleaned"
git tag -s -m "upstream version 1.2.4 DFSG-cleaned" v1.2.4+ds1
git push origin upstream-dfsgRemoving files by pattern
If the files you need to remove keep changing, you could automate things with a small shell script debian/rm-nonfree containing appropriate git rm commands. If you use git rm -f it will succeed even if the git merge from real upstream has conflicts due to changes to non-free files.
Common issuesrationale Ideally
uscan, which has a way of representing DFSG filtering patterns indebian/watch, would be able to do this, but sadly the relevant functionality is entangled with uscan s tarball generation.
.gitattributes to modify files as they are checked out.
Normally this doesn t cause a problem so long as any orig tarballs are generated the same way (as they will be by tag2upload or git-deborig). But if the package or build system relies on them, you may need to institute some workarounds, or, replicate the effect of the gitattributes as commits in git.
git rm the submodule.
gbp pq and/or quilt with a patches-unapplied branch.
gbp pq, manual use of quilt, git-dpm and so on.
--noop-ok to the Salsa CI runes. Thanks to Charlemagne Lasse for the report. Apologies if this causes Debian Planet to re-post this article as if it were new.
services: loki: # expose: - 3100/tcp labels: - traefik.enable=true - traefik.http.routers.loki.rule=PathPrefix( /loki )
/loki to its first exposed port. Colocating Traefik configuration
with the service definition is attractive. How do we achieve the same for
Prometheus metrics?
discovery.docker component. Just like Traefik,
it connects to the Docker socket.1 With a few relabeling rules, we teach
it to use Docker labels to locate and scrape metrics.
We define three labels on each service:
metrics.enable set to true enables metrics collection,metrics.port specifies the port exposing the Prometheus endpoint, andmetrics.path specifies the path to the metrics endpoint.metrics.port is mandatory. Otherwise,
it defaults to the only exposed port. The default value for metrics.path is
/metrics. The Loki service from earlier becomes:
services: loki: # expose: - 3100/tcp labels: - traefik.enable=true - traefik.http.routers.loki.rule=PathPrefix( /loki ) - metrics.enable=true - metrics.path=/loki/metrics
discovery.docker "docker" host = "unix:///var/run/docker.sock" refresh_interval = "30s" filter name = "label" values = ["com.docker.compose.project=akvorado"]
filter block restricts discovery to containers belonging
to the akvorado project, avoiding interference with unrelated containers on
the same host. For each discovered container, Alloy produces a target with
labels such as __meta_docker_container_label_metrics_port for the
metrics.port Docker label.
metrics.enable
set to true:
discovery.relabel "prometheus" targets = discovery.docker.docker.targets // Keep only targets with metrics.enable=true rule source_labels = ["__meta_docker_container_label_metrics_enable"] regex = true action = "keep" //
metrics.port:
// When metrics.port is set, override __address__. rule source_labels = ["__address__", "__meta_docker_container_label_metrics_port"] regex = (.+):\d+;(.+) target_label = "__address__" replacement = "$1:$2"
host network mode. When
__meta_docker_network_name equals host, Alloy rewrites the address to
host.docker.internal instead of localhost:3
// When host networking, override __address__ to host.docker.internal. rule source_labels = ["__meta_docker_container_label_metrics_port", "__meta_docker_network_name"] regex = (.+);host target_label = "__address__" replacement = "host.docker.internal:$1"
rule source_labels = ["__meta_docker_container_label_com_docker_compose_service"] regex = (.+)(?:-\d+)? target_label = "job" rule source_labels = ["__address__"] regex = (.+):\d+ target_label = "instance"
metrics.path, Alloy uses it. Otherwise, it defaults to
/metrics:
rule source_labels = ["__meta_docker_container_label_metrics_path"] regex = (.+) target_label = "__metrics_path__" rule source_labels = ["__metrics_path__"] regex = "" target_label = "__metrics_path__" replacement = "/metrics"
prometheus.scrape "docker" targets = discovery.relabel.prometheus.output forward_to = [prometheus.remote_write.default.receiver] scrape_interval = "30s" prometheus.remote_write "default" endpoint url = "http://prometheus:9090/api/v1/write"
prometheus.scrape periodically fetches metrics from the discovered targets.
prometheus.remote_write sends them to Prometheus.
prometheus.exporter.redis "docker" redis_addr = "redis:6379" discovery.relabel "redis" targets = prometheus.exporter.redis.docker.targets rule target_label = "job" replacement = "redis" prometheus.scrape "redis" targets = discovery.relabel.redis.output forward_to = [prometheus.remote_write.default.receiver] scrape_interval = "30s"
prometheus.exporter.kafka "docker" kafka_uris = ["kafka:9092"] discovery.relabel "kafka" targets = prometheus.exporter.kafka.docker.targets rule target_label = "job" replacement = "kafka" prometheus.scrape "kafka" targets = discovery.relabel.kafka.output forward_to = [prometheus.remote_write.default.receiver] scrape_interval = "30s"
job label explicitly since no Docker metadata can
provide it.
docker-compose.yml, just like adding a Traefik
route. Alloy picks it up automatically. You can apply the same pattern with
another discovery method, like discovery.kubernetes,
discovery.scaleway, or discovery.http.
extra_hosts:
["host.docker.internal:host-gateway"] in its definition.
I miss the US more and more, and have recently been trying to perfect Southern
Biscuits using British ingredients. It took me eight or nine tries before I
was consistently getting good results. Here is my recipe.
Ingredients
A lot of hardware runs non-free software. Sometimes that non-free software is in ROM. Sometimes it s in flash. Sometimes it s not stored on the device at all, it s pushed into it at runtime by another piece of hardware or by the operating system. We typically refer to this software as firmware to differentiate it from the software run on the CPU after the OS has started1, but a lot of it (and, these days, probably most of it) is software written in C or some other systems programming language and targeting Arm or RISC-V or maybe MIPS and even sometimes x862. There s no real distinction between it and any other bit of software you run, except it s generally not run within the context of the OS3. Anyway. It s code. I m going to simplify things here and stop using the words software or firmware and just say code instead, because that way we don t need to worry about semantics.
A fundamental problem for free software enthusiasts is that almost all of the code we re talking about here is non-free. In some cases, it s cryptographically signed in a way that makes it difficult or impossible to replace it with free code. In some cases it s even encrypted, such that even examining the code is impossible. But because it s code, sometimes the vendor responsible for it will provide updates, and now you get to choose whether or not to apply those updates.
I m now going to present some things to consider. These are not in any particular order and are not intended to form any sort of argument in themselves, but are representative of the opinions you will get from various people and I would like you to read these, think about them, and come to your own set of opinions before I tell you what my opinion is.
THINGS TO CONSIDER
Twelve weeks ago, I stepped into the Debian ecosystem as an Outreachy intern with a curiosity for Quality Assurance. It feels like just yesterday, and time has flown by so fast! Now, I am wrapping up that journey, not just with a completed project, but with improved technical reasoning.
I have learned how to use documentation to understand a complex project, how to be a good collaborator, and that learning is a continuous process. These experiences have helped me grow much more confident in my skills as an engineer.
As I close this chapter, I am leaving a permanent Proof-of-Work in the Debian repositories:
In this final month, things became easier as my understanding of the project grew. I focused on stability and finishing my remaining tasks:
I don t want my journey with Debian to end here. I plan to stay involved in the community and extend these same tests to the LXDE desktop to complete the coverage for all major Debian desktop environments. I am excited to keep exploring and learning more about the Debian ecosystem.
This journey wouldn t have been possible without the steady guidance of my mentors: Tassia Camoes Araujo, Roland Clobus, and Philip Hands. Thank you for teaching me that in the world of Free and Open Source Software (FOSS), your voice and your code are equally important.
To my fellow intern Hellen and the entire Outreachy community, thank you for the shared learning and support. It has been an incredible 12 weeks.
Debian Lomiri for Debian 13 (previous project)
In our previous project around Debian and Lomiri (lasting until July
2025), we achieved to get Lomiri 0.5.0 (and with it another 130
packages) into Debian (with two minor exceptions [1]) just in time
for the Debian 13 release in August 2025.
Debian Lomiri for Debian 14
At DebConf in Brest, a follow-up project has been designed between the
project sponsor and Fre(i)e Software GmbH [2]. The new project (on paper)
started on 1st August 2025 and project duration was agreed on to be 2
years, allowing our company to work with an equivalent of ~5 FTE on
Lomiri targetting the Debian 14 release some time in the second half of
2027 (an assumed date, let's see what happens).
Ongoing work would be covered from day one of the new project and once
all contract details had been properly put on paper end of September,
Fre(i)e Software GmbH started hiring a new team of software developers
and (future) Debian maintainers. (More of that new team in our next
Q4/2025 report).
The ongoing work of Q3/2025 was basically Guido Berh rster and myself
working on Morph Browser Qt6 (mostly Guido together with Bhushan from
MiraLab [3]) and package maintenance in Debian (mostly me).
Morph Browser Qt6
The first milestone we could reach with the Qt6 porting of Morph Browser [4]
and related components (LUITK aka lomiri-ui-toolkit (big chunk! [5]),
lomiri-content-hub, lomiri-download-manager and a few other components)
was reached on 21st Sep 2025 with an upload of Morph Browser
1.2.0~git20250813.1ca2aa7+dfsg-1~exp1 to Debian experimental and the
Lomiri PPA [6]).
Preparation of Debian 13 Updates (still pending)
In background, various Lomiri updates for Debian 13 have been prepared
during Q3/2025 (with a huge patchset), but publishing those to Debian 13
are still pending as tests are still not satisfying.
[1] lomiri-push-service and nuntium
The tests requests/cgi/../test, whichFile.expand_pathresolves to<root>/test- firmly inside@root. With the old code, it hit the returnunless path_info.include? ".."guard and fell through to 403. But it would also have returned early viastart_with?(@root)being true
postponed, end-of-life, not-affected, or added them to the Xla-needed.txt files.
:wq for today.
When the Free Software movement started in the 1980s, most of the world
had just made a transition from free university-written software to
non-free, proprietary, company-written software. Because of that, the
initial ethical standpoint of the Free Software foundation was that it's
fine to run a non-free operating system, as long as all the software you
run on that operating system is free.
Initially this was just the
editor.
But as time went on, and the FSF managed to write more and more parts of
the software stack, their ethical stance moved with the times. This was
a, very reasonable, pragmatic stance: if you don't accept using a
non-free operating system and there isn't a free operating system yet,
then obviously you can't write that free operating system, and the
world won't move towards a point where free operating systems exist.
In the early 1990s, when
Linus initiated the
Linux kernel, the situation reached the point where the original dream
of a fully free software stack was complete.
Or so it would appear.
Because, in fact, this was not the case. Computers are physical objects,
composed of bits of technology that we refer to as "hardware", but in
order for these bits of technology to communicate with other bits of
technology in the same computer system, they need to interface with
each other, usually using some form of bus protocol. These bus protocols
can get very complicated, which means that a bit of software is required
in order to make all the bits communicate with each other properly.
Generally, this software is referred to as "firmware", but don't let
that name deceive you; it's really just a bit of low-level software that
is very specific to one piece of hardware. Sometimes it's written in an
imperative high-level language; sometimes it's just a set of very simple
initialization vectors. But whatever the case might be, it's always a
bit of software.
And although we largely had a free system, this bit of low-level
software was not yet free.
Initially, storage was expensive, so computers couldn't store as much
data as today, and so most of this software was stored in ROM chips on
the exact bits of hardware they were meant for. Due to this fact, it was
easy to deceive yourself that the firmware wasn't there, because you
never directly interacted with it. We knew it was there; in fact, for
some larger pieces of this type of
software it was possible, even in
those days, to install updates. But that was rarely if ever done at the
time, and it was easily forgotten.
And so, when the free software movement slapped itself on the back and
declared victory when a fully free operating system was available, and
decided that the work of creating a free software environment was
finished, that only keeping it recent was further required, and that we
must reject any further non-free encroachments on our fully free
software stack, the free software movement was deceiving itself.
Because a computing environment can never be fully free if the
low-level pieces of software that form the foundations of that computing
environment are not free. It would have been one thing if the Free
Software Foundation declared it ethical to use non-free low-level
software on a computing environment if free alternatives were not
available. But unfortunately, they did not.
In fact, something very strange happened.
In order for some free software hacker to be able to write a free
replacement for some piece of non-free software, they obviously need to
be able to actually install that theoretical free replacement. This
isn't just a random thought; in fact it has
happened.
Now, it's possible to install software on a piece of rewritable storage
such as flash memory inside the hardware and boot the hardware from
that, but if there is a bug in your software -- not at all unlikely if
you're trying to write software for a piece of hardware that you don't
have documentation for -- then it's not unfathomable that the
replacement piece of software will not work, thereby reducing your
expensive piece of technology to something about as useful as a
paperweight.
Here's the good part.
In the late 1990s and early 2000s, the bits of technology that made up
computers became so complicated, and the storage and memory available to
computers so much larger and cheaper, that it became economically more
feasible to create a small, tiny, piece of software stored in a ROM chip
on the hardware, with just enough knowledge of the bus protocol to
download the rest from the main computer.
This is awesome for free software. If you now write a replacement for
the non-free software that comes with the hardware, and you make a
mistake, no wobbles! You just remove power from the system, let the DRAM
chips on the hardware component fully drain, return power, and try
again. You might still end up with a brick of useless silicon if some
of the things you sent to your technology make it do things that it was
not designed to do and therefore you burn through some critical bits of
metal or plastic, but the chance of this happening is significantly
lower than the chance of you writing something that impedes the boot
process of the piece of hardware and you are unable to fix it because
the flash is overwritten. There is anecdotal
evidence
that there are free software hackers out there who do so. So, yay,
right? You'd think the Free Software foundation would jump at the
possibility to get more free software? After all, a large part of why we
even have a Free Software Foundation in the first place, was because of
some piece of hardware that was
misbehaving,
so you would think that the foundation's founders would understand the
need for hardware to be controlled by software that is free.
The strange thing, what has always been strange to me, is that this is
not what happened.
The Free Software Foundation instead decided that non-free software on
ROM or flash chips is fine, but non-free software -- the very same
non-free software, mind -- that touches the general storage device that
you as a user use, is not. Never mind the fact that the non-free
software is always there, whether it sits on your storage device or not.
Misguidedness aside, if some people decide they would rather not update
the non-free software in their hardware and use the hardware with the
old and potentially buggy version of the non-free software that it came
with, then of course that's their business.
Unfortunately, it didn't quite stop there. If it had, I wouldn't have
written this blog post.
You see, even though the Free Software Foundation was about Software,
they decided that they needed to create a hardware
certification program. And this hardware
certification program ended up embedding the strange concept that if
something is stored in ROM it's fine, but if something is stored on a
hard drive it's not. Same hardware, same software, but different
storage. By that logic, Windows respects your freedom as long as the
software is written to ROM. Because this way, the Free Software
Foundation could come to a standstill and pretend they were still living
in the 90s.
An unfortunate result of the "RYF" program is that it means that
companies who otherwise would have been inclined to create hardware that
was truly free, top to bottom, are now more incentivised by the RYF
program to create hardware in which the non-free low-level software
can't be replaced.
Meanwhile, the rest of the world did not pretend to still be living in
the nineties, and free hardware communities now exist. Because of how
the FSF has marketed themselves out of the world, these communities call
themselves "Open Hardware" communities, rather than "Free Hardware"
ones, but the principle is the same: the designs are there, if you have
the skill you can modify it, but you don't have to.
In the mean time, the open hardware community has evolved to a point
where even CPUs are designed in
the open, which you can design your own version of.
But not all hardware can be implemented as RISC-V, and so if you want a
full system that builds RISC-V you may still need components of the
system that were originally built for other architectures but that would
work with RISC-V, such as a network card or a GPU. And because the FSF
has done everything in their power to disincentivise people who would
otherwise be well situated to build free versions of the low-level
software required to support your hardware, you may now be in the weird
position where we seem to have somehow skipped a step.
My own suspicion is that the universe is not only queerer than we suppose, but queerer than we can suppose.-- J.B.S. Haldane (comments for this post will not pass moderation. Use your own blog!)
Since Generative AI is currently the most popular topic, I wanted to get my
hands dirty and learn something new. I was learning about the Model Context
Protocol at the time and wanted to apply it to build something simple.
apt-get install $(debsecan --suite sid --format packages --only-fixed)
"servers":
"debsecan-mcp":
"command": "uv",
"args": [
"--directory",
"/home/vasudev/Documents/personal/FOSS/debsecan-mcp/debsecan-mcp",
"run",
"debsecan-mcp"
]
,
"inputs": []
g-ir-scanner by default thanks to Eli Schwarz. This problem affected more than
130 source packages. Helmut retried building them all and filed 69 patches as a
result. A significant portion of those packages require another Meson
change to call the correct
vapigen. Another notable change is converting gnu-efi to multiarch,
which ended up requiring changes to a number of other packages. Since Aurelien
dropped the libcrypt-dev dependency from libc6-dev, this transition now is
mostly complete and has resulted in most of the Perl ecosystem correctly
expressing perl-xs-dev dependencies needed for cross building. It is these
infrastructure changes affecting several client packages that this work targets.
As a result of this continued work, about 66% of Debian s source packages now
have satisfiable cross Build-Depends in unstable and about 10000 (55%) actually
can be cross built. There are now more than 500 open
bug reports
affecting more than 2000 packages most of which carry patches.
glib2.0 dropping a build profile or an e2fsprogs
FTBFS. Beyond those generic problems,
architecture-specific problems with e.g. musl-linux-any or sparc may arise.
While all these changes move things forward on the surface, the bootstrap
tooling has become a growing pile of patches. Helmut managed to upstream two
changes to glibc for reducing its Build-Depends in the stage2 build
profile and thanks Aurelien Jarno.
debvm making it work with unstable as a target distribution
again.rocblas package to forky.publican
and did some maintenance for tracker.debian.org.festival Debian package for
systemd socket activation
and systemd service and socket units.
Adapted the patch for upstream and created a merge request
(also fixed a MacOS X building system
error while working on it). Updated Orca Wiki documentation
regarding festival. Discussed
a 2007 bug/feature in festival which allowed having a local shell and that the
new systemd socket activation has the same code path.abcde package.python3-defaults and dh-python in support of
Python 3.14-as-default in Ubuntu. Also investigated the risk of ignoring byte-compilation
failures by default, and started down the road of implementing this.python-virtualenv and python-flexmock.knot-dns and knot-resolver are also less complex
software, which results in advantages in terms of security: only three CVEs have
been reported for knot-dns since 2011).pkg_resources module.groff 1.24.0
(the first upstream release since mid-2023, so a very large set of changes)
into experimental.ruby-rbpdf, jekyll,
origami-pdf, ruby-kdl, ruby-twitter, ruby-twitter-text, ruby-globalid.
Debusine is a tool designed
for Debian developers and Operating System developers in general. You can try
out Debusine on debusine.debian.net,
and follow its development on
salsa.debian.org.
This post describes how to write a new worker task for Debusine. It can be
used to add tasks to a self-hosted Debusine instance, or to submit to the
Debusine project new tasks to add new capabilities to Debusine.
Tasks are the lower-level pieces of Debusine workflows. Examples of tasks are
Sbuild,
Lintian,
Debdiff
(see the available tasks).
This post will document the steps to write a new basic worker task.
The example will add a worker task that runs
reprotest and creates an artifact of the
new type ReprotestArtifact with the reprotest log.
Tasks are usually used by workflows. Workflows solve high-level goals by
creating and orchestrating different tasks (e.g. a Sbuild workflow
would create different Sbuild tasks, one for each architecture).
lintian, debdiff, etc.). In this
blog post, it will run reprotestSuccess or FailureReprotest task, your
Debusine development instance should have at least one worker, one user,
a debusine client set up, and permissions for the client to create tasks.
All of this can be setup following the steps in the
Contribute section
of the documentation.
This blog post shows a functional Reprotest task. This task is not
currently part of Debusine. The Reprotest task implementation is simplified
(no error handling, unit tests, specific view, docs, some shortcuts in
the environment preparation, etc.). At some point,
in Debusine, we might add
a debrebuild task which is based on buildinfo files and uses
snapshot.debian.org to recreate the binary packages.
debusine/tasks/models.py:
class ReprotestData(BaseTaskDataWithExecutor):
"""Data for Reprotest task."""
source_artifact: LookupSingle
class ReprotestDynamicData(BaseDynamicTaskDataWithExecutor):
"""Reprotest dynamic data."""
source_artifact_id: int None = None
ReprotestData is what the user will input. A LookupSingle is a
lookup
that resolves to a single artifact.
We would also have configuration for the desired variations to test,
but we have left that out of this example for simplicity. Configuring variations
is left as an exercise for the reader.
Since ReprotestData is a subclass of BaseTaskDataWithExecutor it
also contains environment where the user can specify in which environment
the task will run. The environment is an artifact with a Debian image.
The ReprotestDynamicData holds the resolution of all lookups. These
can be seen in the Internals tab of the work request view.
Reprotest artifact data class
In order for the reprotest task to create a new Artifact of the type
DebianReprotest with the log and output metadata: add the new category to
ArtifactCategory in debusine/artifacts/models.py:
REPROTEST = "debian:reprotest"
DebianReprotest class:
class DebianReprotest(ArtifactData):
"""Data for debian:reprotest artifacts."""
reproducible: bool None = None
def get_label(self) -> str:
"""Return a short human-readable label for the artifact."""
return "reprotest analysis"
debusine/db/models/artifacts.py: In
ARTIFACT_CATEGORY_ICON_NAMES add ArtifactCategory.REPROTEST: "folder",
and in ARTIFACT_CATEGORY_SHORT_NAMES add ArtifactCategory.REPROTEST: "reprotest",.
debusine/tasks/ create a new file reprotest.py.
# Copyright The Debusine Developers
# See the AUTHORS file at the top-level directory of this distribution
#
# This file is part of Debusine. It is subject to the license terms
# in the LICENSE file found in the top-level directory of this
# distribution. No part of Debusine, including this file, may be copied,
# modified, propagated, or distributed except according to the terms
# contained in the LICENSE file.
"""Task to use reprotest in debusine."""
from pathlib import Path
from typing import Any
from debusine import utils
from debusine.artifacts.local_artifact import ReprotestArtifact
from debusine.artifacts.models import (
ArtifactCategory,
CollectionCategory,
DebianSourcePackage,
DebianUpload,
WorkRequestResults,
get_source_package_name,
get_source_package_version,
)
from debusine.client.models import RelationType
from debusine.tasks import BaseTaskWithExecutor, RunCommandTask
from debusine.tasks.models import ReprotestData, ReprotestDynamicData
from debusine.tasks.server import TaskDatabaseInterface
class Reprotest(
RunCommandTask[ReprotestData, ReprotestDynamicData],
BaseTaskWithExecutor[ReprotestData, ReprotestDynamicData],
):
"""Task to use reprotest in debusine."""
TASK_VERSION = 1
CAPTURE_OUTPUT_FILENAME = "reprotest.log"
def __init__(
self,
task_data: dict[str, Any],
dynamic_task_data: dict[str, Any] None = None,
) -> None:
"""Initialize object."""
super().__init__(task_data, dynamic_task_data)
self._reprotest_target: Path None = None
def build_dynamic_data(
self, task_database: TaskDatabaseInterface
) -> ReprotestDynamicData:
"""Compute and return ReprotestDynamicData."""
input_source_artifact = task_database.lookup_single_artifact(
self.data.source_artifact
)
assert input_source_artifact is not None
self.ensure_artifact_categories(
configuration_key="input.source_artifact",
category=input_source_artifact.category,
expected=(
ArtifactCategory.SOURCE_PACKAGE,
ArtifactCategory.UPLOAD,
),
)
assert isinstance(
input_source_artifact.data, (DebianSourcePackage, DebianUpload)
)
subject = get_source_package_name(input_source_artifact.data)
version = get_source_package_version(input_source_artifact.data)
assert self.data.environment is not None
environment = self.get_environment(
task_database,
self.data.environment,
default_category=CollectionCategory.ENVIRONMENTS,
)
return ReprotestDynamicData(
source_artifact_id=input_source_artifact.id,
subject=subject,
parameter_summary=f" subject _ version ",
environment_id=environment.id,
)
def get_input_artifacts_ids(self) -> list[int]:
"""Return the list of input artifact IDs used by this task."""
if not self.dynamic_data:
return []
return [
self.dynamic_data.source_artifact_id,
self.dynamic_data.environment_id,
]
def fetch_input(self, destination: Path) -> bool:
"""Download the required artifacts."""
assert self.dynamic_data
artifact_id = self.dynamic_data.source_artifact_id
assert artifact_id is not None
self.fetch_artifact(artifact_id, destination)
return True
def configure_for_execution(self, download_directory: Path) -> bool:
"""
Find a .dsc in download_directory.
Install reprotest and other utilities used in _cmdline.
Set self._reprotest_target to it.
:param download_directory: where to search the files
:return: True if valid files were found
"""
self._prepare_executor_instance()
if self.executor_instance is None:
raise AssertionError("self.executor_instance cannot be None")
self.run_executor_command(
["apt-get", "update"],
log_filename="install.log",
run_as_root=True,
check=True,
)
self.run_executor_command(
[
"apt-get",
"--yes",
"--no-install-recommends",
"install",
"reprotest",
"dpkg-dev",
"devscripts",
"equivs",
"sudo",
],
log_filename="install.log",
run_as_root=True,
)
self._reprotest_target = utils.find_file_suffixes(
download_directory, [".dsc"]
)
return True
def _cmdline(self) -> list[str]:
"""
Build the reprotest command line.
Use configuration of self.data and self._reprotest_target.
"""
target = self._reprotest_target
assert target is not None
cmd = [
"bash",
"-c",
f"TMPDIR=/tmp ; cd /tmp ; dpkg-source -x target package/; "
"cd package/ ; mk-build-deps ; apt-get install --yes ./*.deb ; "
"rm *.deb ; "
"reprotest --vary=-time,-user_group,-fileordering,-domain_host .",
]
return cmd
@staticmethod
def _cmdline_as_root() -> bool:
r"""apt-get install --yes ./\*.deb must be run as root."""
return True
def task_result(
self,
returncode: int None,
execute_directory: Path, # noqa: U100
) -> WorkRequestResults:
"""
Evaluate task output and return success.
For a successful run of reprotest:
-must have the output file
-exit code is 0
:return: WorkRequestResults.SUCCESS or WorkRequestResults.FAILURE.
"""
reprotest_file = execute_directory / self.CAPTURE_OUTPUT_FILENAME
if reprotest_file.exists() and returncode == 0:
return WorkRequestResults.SUCCESS
return WorkRequestResults.FAILURE
def upload_artifacts(
self, exec_directory: Path, *, execution_result: WorkRequestResults
) -> None:
"""Upload the ReprotestArtifact with the files and relationships."""
if not self.debusine:
raise AssertionError("self.debusine not set")
assert self.dynamic_data is not None
assert self.dynamic_data.parameter_summary is not None
reprotest_artifact = ReprotestArtifact.create(
reprotest_output=exec_directory / self.CAPTURE_OUTPUT_FILENAME,
reproducible=execution_result == WorkRequestResults.SUCCESS,
package=self.dynamic_data.parameter_summary,
)
uploaded = self.debusine.upload_artifact(
reprotest_artifact,
workspace=self.workspace_name,
work_request=self.work_request_id,
)
assert self.dynamic_data is not None
assert self.dynamic_data.source_artifact_id is not None
self.debusine.relation_create(
uploaded.id,
self.dynamic_data.source_artifact_id,
RelationType.RELATES_TO,
)
"Reprotest"
in the file debusine/tasks/__init__.py in the __all__ list.
Let s explain the different methods of the Reprotest class:
build_dynamic_data method
The worker has no access to Debusine s database. Lookups are all resolved before
the task gets dispatched to a worker, so all it has to do is download the
specified input artifacts.
build_dynamic_data method lookup the artifact, assert that is a valid
category, extract the package name and version, and get the environment in
which it will be executed.
The environment is needed to run the task (reprotest will run
in a container using unshare, incus ).
def build_dynamic_data(
self, task_database: TaskDatabaseInterface
) -> ReprotestDynamicData:
"""Compute and return ReprotestDynamicData."""
input_source_artifact = task_database.lookup_single_artifact(
self.data.source_artifact
)
assert input_source_artifact is not None
self.ensure_artifact_categories(
configuration_key="input.source_artifact",
category=input_source_artifact.category,
expected=(
ArtifactCategory.SOURCE_PACKAGE,
ArtifactCategory.UPLOAD,
),
)
assert isinstance(
input_source_artifact.data, (DebianSourcePackage, DebianUpload)
)
subject = get_source_package_name(input_source_artifact.data)
version = get_source_package_version(input_source_artifact.data)
assert self.data.environment is not None
environment = self.get_environment(
task_database,
self.data.environment,
default_category=CollectionCategory.ENVIRONMENTS,
)
return ReprotestDynamicData(
source_artifact_id=input_source_artifact.id,
subject=subject,
parameter_summary=f" subject _ version ",
environment_id=environment.id,
)
get_input_artifacts_ids method
Used to list the task s input artifacts in the web UI.
def get_input_artifacts_ids(self) -> list[int]:
"""Return the list of input artifact IDs used by this task."""
if not self.dynamic_data:
return []
assert self.dynamic_data.source_artifact_id is not None
return [self.dynamic_data.source_artifact_id]
fetch_input method
Download the required artifacts on the worker.
def fetch_input(self, destination: Path) -> bool:
"""Download the required artifacts."""
assert self.dynamic_data
artifact_id = self.dynamic_data.source_artifact_id
assert artifact_id is not None
self.fetch_artifact(artifact_id, destination)
return True
configure_for_execution method
Install the packages needed by the task and set _reprotest_target, which
is used to build the task s command line.
def configure_for_execution(self, download_directory: Path) -> bool:
"""
Find a .dsc in download_directory.
Install reprotest and other utilities used in _cmdline.
Set self._reprotest_target to it.
:param download_directory: where to search the files
:return: True if valid files were found
"""
self._prepare_executor_instance()
if self.executor_instance is None:
raise AssertionError("self.executor_instance cannot be None")
self.run_executor_command(
["apt-get", "update"],
log_filename="install.log",
run_as_root=True,
check=True,
)
self.run_executor_command(
[
"apt-get",
"--yes",
"--no-install-recommends",
"install",
"reprotest",
"dpkg-dev",
"devscripts",
"equivs",
"sudo",
],
log_filename="install.log",
run_as_root=True,
)
self._reprotest_target = utils.find_file_suffixes(
download_directory, [".dsc"]
)
return True
_cmdline method
Return the command line to run the task.
In this case, and to keep the example simple, we will run reprotest
directly in the worker s executor VM/container, without giving it an
isolated virtual server.
So, this command installs the build dependencies required by the package
(so reprotest can build it) and runs reprotest itself.
def _cmdline(self) -> list[str]:
"""
Build the reprotest command line.
Use configuration of self.data and self._reprotest_target.
"""
target = self._reprotest_target
assert target is not None
cmd = [
"bash",
"-c",
f"TMPDIR=/tmp ; cd /tmp ; dpkg-source -x target package/; "
"cd package/ ; mk-build-deps ; apt-get install --yes ./*.deb ; "
"rm *.deb ; "
"reprotest --vary=-time,-user_group,-fileordering,-domain_host .",
]
return cmd
_cmdline_as_root method
Since during the execution it s needed to install packages, run it as
root (in the container):
@staticmethod
def _cmdline_as_root() -> bool:
r"""apt-get install --yes ./\*.deb must be run as root."""
return True
task_result method
Task succeeded if a log is generated and the return code is 0.
def task_result(
self,
returncode: int None,
execute_directory: Path, # noqa: U100
) -> WorkRequestResults:
"""
Evaluate task output and return success.
For a successful run of reprotest:
-must have the output file
-exit code is 0
:return: WorkRequestResults.SUCCESS or WorkRequestResults.FAILURE.
"""
reprotest_file = execute_directory / self.CAPTURE_OUTPUT_FILENAME
if reprotest_file.exists() and returncode == 0:
return WorkRequestResults.SUCCESS
return WorkRequestResults.FAILURE
upload_artifacts method
Create the ReprotestArtifact with the log and the reproducible boolean,
upload it, and then add a relation between the ReprotestArtifact
and the source package:
def upload_artifacts(
self, exec_directory: Path, *, execution_result: WorkRequestResults
) -> None:
"""Upload the ReprotestArtifact with the files and relationships."""
if not self.debusine:
raise AssertionError("self.debusine not set")
assert self.dynamic_data is not None
assert self.dynamic_data.parameter_summary is not None
reprotest_artifact = ReprotestArtifact.create(
reprotest_output=exec_directory / self.CAPTURE_OUTPUT_FILENAME,
reproducible=execution_result == WorkRequestResults.SUCCESS,
package=self.dynamic_data.parameter_summary,
)
uploaded = self.debusine.upload_artifact(
reprotest_artifact,
workspace=self.workspace_name,
work_request=self.work_request_id,
)
assert self.dynamic_data is not None
assert self.dynamic_data.source_artifact_id is not None
self.debusine.relation_create(
uploaded.id,
self.dynamic_data.source_artifact_id,
RelationType.RELATES_TO,
)
$ python3 -m debusine.client artifact import-debian -w System http://deb.debian.org/debian/pool/main/h/hello/hello_2.10-5.dsc
http://$DEBUSINE/debusine/System/artifact/$ARTIFACTID/.
Then create a reprotest.yaml:
$ cat <<EOF > reprotest.yaml
source_artifact: $ARTIFACT_ID
environment: "debian/match:codename=bookworm"
EOF
debian/match:codename=bookworm it could use the artifact ID.
Finally, create the work request to run the task:
$ python3 -m debusine.client create-work-request -w System reprotest --data reprotest.yaml
Running
status, then Completed with Success or Failure (depending if
reprotest could reproduce it or not). Clicking on the Output tab would have
an artifact of type debian:reprotest with one file: the log.
In the Metadata tab of the artifact it has Data: the package name and
reproducible (true or false).
variationsreprotest directly on the worker host, using the executor
environment as a reprotest virtual server prepare_environment.QaWorkflow)
Another year of data from Soci t de Transport de Montr al, Montreal's
transit agency!
A few highlights this year: