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
Direct Download
Read full article as PDF:
Price $2.95
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
News
-
An All-Snap Version of Ubuntu is In The Works
Along with the standard deb version of the open-source operating system, Canonical will release an-all snap version.
-
Mageia 9 Beta 2 Ready for Testing
The latest beta of the popular Mageia distribution now includes the latest kernel and plenty of updated applications.
-
KDE Plasma 6 Looks to Bring Basic HDR Support
The KWin piece of KDE Plasma now has HDR support and color management geared for the 6.0 release.
-
Bodhi Linux 7.0 Beta Ready for Testing
The latest iteration of the Bohdi Linux distribution is now available for those who want to experience what's in store and for testing purposes.
-
Changes Coming to Ubuntu PPA Usage
The way you manage Personal Package Archives will be changing with the release of Ubuntu 23.10.
-
AlmaLinux 9.2 Now Available for Download
AlmaLinux has been released and provides a free alternative to upstream Red Hat Enterprise Linux.
-
An Immutable Version of Fedora Is Under Consideration
For anyone who's a fan of using immutable versions of Linux, the Fedora team is currently considering adding a new spin called Fedora Onyx.
-
New Release of Br OS Includes ChatGPT Integration
Br OS 23.04 is now available and is geared specifically toward web content creation.
-
Command-Line Only Peropesis 2.1 Available Now
The latest iteration of Peropesis has been released with plenty of updates and introduces new software development tools.
-
TUXEDO Computers Announces InfinityBook Pro 14
With the new generation of their popular InfinityBook Pro 14, TUXEDO upgrades its ultra-mobile, powerful business laptop with some impressive specs.