Devuan uses the same format for packaging as Debian, so this is very similar to Debian packaging except that we only use gitlab for hosting and building packages. Specifically we will cover how to remove the systemd dependency from packages to make them suitable for use in Devuan.
Required reading 🔼
- Debian new maintainers guide recommend only if u plain become serious
- Devuan maintainer workflow
- Devuan VUA: Repository APT and DEB tricks and tips
Basic Required Packages 🔼
No matter the way you choose to made a package or become a mantainer, these package must be install as of minimal:
- build-essential : this package install compiler, development dpkg and development standard C libs.
- fakeroot : this package its used to acts as root without become a
- lintian: a package checker quality but not a binary package checker quality!
- devscripts: tools for operate when starting of modify a package such changelogs, control files etc
- debhelper: Swiss knife army tool to build and produce packages locally
Devuan way: official way and d1h 🔼
Requirements 🔼
Devuan/Debian: novice offline way 🔼
Requirements 🔼
Systemd removal 🔼
modify the control file to take over remove the systemd dependency, ans search the build depens line related.
$ sensible-editor debian/control
Build-Depends:
dh-systemd,
libsystemd-dev [linux-any],
Change any Depends sections so as not to depend on systemd, if theres any hardcoded runtime package Depends specifically we want to remove libsystemd0 as a dependency (this Depends poackage line are generated but search and remove if hardcoded any).
Depends: openssl, perl, libsystemd0
Now Exclude systemd from the build: Edit the rules file so that we can remove systemd from the build process.
$ sensible-editor debian/rules
Find the line that invokes the debhelper build and remove the --with systemd argument. Here we can just remove systemd from the end of the line.
dh $@ --parallel --with autoreconf systemd
In some cases configure options will be set for where to store systemd unit files. We can disable this by commenting it out.
# --with-systemdsystemunitdir=/lib/systemd/system