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
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.