Migrating Debian and Ubuntu packages to systemd
Exceptions in rules Files
It does occasionally happen that debian/rules
includes other contents in addition to the call to dh
. At best, separate entries just supplement the work of dh
and override individual parts (targets). At worst, administrators will have to deal with a completely self-written rules
file. It is important to keep a cool head if this happens: rules
files normally use the debhelper suite.
Debhelper provides an approach for the package maintainer to change the normal sequence of steps for virtually any target. It is important to consider whether a target with the name override_dh_installinit
exists. If so, the rules
script is doing its own thing at this point. Unfortunately, it isn't possible to make a general statement about adapting to systemd. In such situations, the important thing in the end is that the script calls the dh_installinit
, dh_systemd_enable
, and dh_systemd_start
commands within the override_dh_installinit
target. If this happens, the debhelper scripts for systemd are aboard.
If dh is Missing Completely
Sometimes the rules
file does not call dh
at all, which is often the case for scripts that have some years under their belt and have long been abandoned. Anyone dealing with such a package would be best off making sure that the three debhelper commands in debian/rules
exist within the binary-arch
and the binary-indep
target. In most cases, this precaution is sufficient to ensure the systemd integration works correctly.
Infos
- systemd: https://wiki.freedesktop.org/www/Software/systemd/
- Debian: https://www.debian.org
- Mark Shuttleworth, "Losing graciously": http://www.markshuttleworth.com/archives/1316
- List of Ubuntu packages still to be converted: http://people.canonical.com/~jhunt/systemd/packages-to-convert/
- Comparison of Upstart and systemd unit files: https://wiki.ubuntu.com/SystemdForUpstartUsers
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.