Thread View: linux.debian.devel
10 messages
10 total messages
Started by Marc Haber
Mon, 19 Oct 2026 23:10
How to indicate that a package won't work without systemd
Author: Marc Haber
Date: Mon, 19 Oct 2026 23:10
Date: Mon, 19 Oct 2026 23:10
23 lines
2526 bytes
2526 bytes
Hi, I would like to write package dependencies that a certain package indicates that it won't work without systemd, most prominently that it would NOT work with sysvinit. My gut feeling tells me to depend on systemd-sysv as that one is the one setting the symlink from /sbin/init to systemd, but that seems kind of wrong for me since it has "sysv" in the name, the package description doesn't suggest that it is a package THIS central, and I don't know whether a, for example, dracut-based initramfs will care where /sbin/init points to at all. How do I have a package depend on "this system uses systemd as init"? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Re: How to indicate that a package won't work without systemd
Author: Simon Richter
Date: Tue, 20 Oct 2026 03:10
Date: Tue, 20 Oct 2026 03:10
27 lines
2952 bytes
2952 bytes
Hi,
On 10/20/26 7:42 AM, Marc Haber wrote:
> My gut feeling tells me to depend on systemd-sysv as that one is the one
> setting the symlink from /sbin/init to systemd, but that seems kind of
> wrong for me since it has "sysv" in the name, the package description
> doesn't suggest that it is a package THIS central, and I don't know
> whether a, for example, dracut-based initramfs will care where /sbin/
> init points to at all.
It's the correct approach IMO.
Frankly, no one reads the package description of systemd-sysv. The only
users who are ever confronted with this package are the ones who want to
uninstall it for some reason, for the rest it's just one of twenty magic
systemd components you don't need to understand (and that it's not a
component is something you don't need to understand either).
If dracut builds an initramfs that doesn't work with non-systemd pid1,
then dracut needs a dependency on systemd-sysv as well. "Doesn't work"
includes "starts an incompletely installed systemd despite the user
selecting a different pid1", because the result is going to be an
unusable system -- such a system would, for example, not have the
systemd NSS modules.
Simon
Re: How to indicate that a package won't work without systemd
Author: Simon McVittie
Date: Tue, 20 Oct 2026 09:20
Date: Tue, 20 Oct 2026 09:20
47 lines
3783 bytes
3783 bytes
On Tue, 20 Oct 2026 at 00:42:33 +0200, Marc Haber wrote:
>I would like to write package dependencies that a certain package
>indicates that it won't work without systemd, most prominently that it
>would NOT work with sysvinit.
What feature(s) of systemd? I know systemd's detractors often say it's
monolithic, but it's actually quite modular, and the down side of that
is that dependent packages do need to know which parts they are
depending on.
If it only needs systemd as pid 1, then yes, systemd-sysv is the closest
thing available in the apt/dpkg packaging system [1].
If it needs a working `systemd --user` (like dbus-user-session in
trixie), then systemd as pid 1 is not enough, and it needs to depend on
libpam-systemd. This is a stronger dependency (more constraints) than
having systemd as pid 1.
If it needs higher-level/optional components like libnss-systemd,
systemd-boot, systemd-container, systemd-resolved, systemd-timesyncd
then those are additional things to depend on.
>systemd-sysv [...] seems
>kind of wrong for me since it has "sysv" in the name
This is a historical artifact of how the transition from sysvinit to
systemd was implemented (initially with systemd as a non-default choice
that disabled but did not remove sysvinit, and then with systemd by
default). The fact that the previous default init is packaged as
sysvinit-core, not as sysvinit, is another artifact remaining from that
transition.
If the same transition had been done today, I think we'd probably have
packages named init-is-systemd and init-is-sysvinit, with the same
meaning as what's currently systemd-sysv and sysvinit-core respectively.
smcv
---
[1] It is technically possible to run systemd as pid 1 without
installing systemd-sysv, and it is technically possible to boot with
init=/something/that/is/not/systemd even if systemd-sysv is installed -
not every dependency can be expressed in terms of apt/dpkg Depends,
which fundamentally are about what's installed, not what's running.
"The running kernel must be 6.18 or later" is another example of a
dependency that we can't fully enforce via apt/dpkg.
Re: How to indicate that a package won't work without systemd
Author: Marc Haber
Date: Tue, 20 Oct 2026 12:50
Date: Tue, 20 Oct 2026 12:50
32 lines
3126 bytes
3126 bytes
On Tue, Oct 20, 2026 at 10:01:50AM +0100, Simon McVittie wrote: >On Tue, 20 Oct 2026 at 00:42:33 +0200, Marc Haber wrote: >>I would like to write package dependencies that a certain package >>indicates that it won't work without systemd, most prominently that >>it would NOT work with sysvinit. > >What feature(s) of systemd? I know systemd's detractors often say it's >monolithic, but it's actually quite modular, and the down side of that >is that dependent packages do need to know which parts they are >depending on. In this case, its systemd service unit is quite sophisticated and reaches a level of security that I have never even seen TRIED to achive in an init script. There is no init script, and the "cron job" which is actually invoked by systemd timer in the package, will horriby break with sysvinit. >If the same transition had been done today, I think we'd probably have >packages named init-is-systemd and init-is-sysvinit, with the same >meaning as what's currently systemd-sysv and sysvinit-core >respectively. All this should be documented. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Re: How to indicate that a package won't work without systemd
Author: Marc Haber
Date: Tue, 20 Oct 2026 13:10
Date: Tue, 20 Oct 2026 13:10
24 lines
2782 bytes
2782 bytes
On Tue, Oct 20, 2026 at 11:48:12AM +0900, Simon Richter wrote: >On 10/20/26 7:42 AM, Marc Haber wrote: >>My gut feeling tells me to depend on systemd-sysv as that one is the >>one setting the symlink from /sbin/init to systemd, but that seems >>kind of wrong for me since it has "sysv" in the name, the package >>description doesn't suggest that it is a package THIS central, and I >>don't know whether a, for example, dracut-based initramfs will care >>where /sbin/ init points to at all. > >It's the correct approach IMO. > >Frankly, no one reads the package description of systemd-sysv. I read it yesterday to find out whether it's the right package to depend on for my package and ended up with "okay, that was the wrong way". Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Re: How to indicate that a package won't work without systemd
Author: Stephen Kitt
Date: Thu, 22 Oct 2026 19:40
Date: Thu, 22 Oct 2026 19:40
54 lines
3827 bytes
3827 bytes
--Sig_/FD5wR+0rDoRBtqDmZMI6Hl6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, On Tue, 20 Oct 2026 00:42:33 +0200, Marc Haber <mh+debian-devel@zugschlus.d= e> wrote: > I would like to write package dependencies that a certain package=20 > indicates that it won't work without systemd, most prominently that it=20 > would NOT work with sysvinit. >=20 > My gut feeling tells me to depend on systemd-sysv as that one is the one= =20 > setting the symlink from /sbin/init to systemd, but that seems kind of=20 > wrong for me since it has "sysv" in the name, the package description=20 > doesn't suggest that it is a package THIS central, and I don't know=20 > whether a, for example, dracut-based initramfs will care where=20 > /sbin/init points to at all. >=20 > How do I have a package depend on "this system uses systemd as init"? This doesn=E2=80=99t answer your question, but can the package be used sens= ibly *without* an init at all? For example, could it be used in a container? If so, then a (strong) dependency on systemd might not be desirable. Regards, Stephen --Sig_/FD5wR+0rDoRBtqDmZMI6Hl6 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAmraX7kACgkQgNMC9Yht g5weehAAlavCaRA+r3O2cHbMUj092L4rRY6J3lNrfmc8UWV/Ak/RPC/D3bgasrBk Y6iUxzXZMfeI/pIuLRks2cS8KBlTkwdCIFa5TzuNclvB6699GtNiVTuNq9ljLauy R3/+yrR8x24mCjxeIWYplLmYjqbznvGDUO1H2XsLkx1Jxd21mLqNhsUQPsZKh11D RQ9CiCB1K4EJeGzIMEHz/BSD9+P2KDgG496/RdrpXsG35uSJXRyOU5tyVNMdyaWw ThEQEVdnwj8kFapzQ7EUmQGO3EFAZNVCjfVYX+nc29mvPQRY7f9SY8i7fYMh+dRh Kx2BLx+o8dDGpWFDv0QYd8qp5iSK3Uj4fPLL1xdxi+pRrgN9Rovpy+5iC1SeiXzq jF1BCOcIbvtHL4B+SvnH42M23xW3humaLASxuyou5lWVinwLhxioCjRU2aiCvF8+ PruZ7EkFs5gUWPQ1D3bgp6VC3W7zlb2ZKAbXkNHgo6Yp4fmXx2Sej9JeQajzvj11 zVasiQVksxZbY8IA0H9fYmq8CvJD+Ua/QEqwKOs8l1DSKP7D6ABfHr0pFneCI25j gac/w7qOlGDZCEOI6zv6khGPeiBCUNfmcWAzhcM/ut/Ti5ZBrfhp66D/hapWyyf2 TKIb0I5GzKQ4/KviJb4Qqv6He1VMV2l9yQU18uefsMxIk+txUcA= =zDV9 -----END PGP SIGNATURE----- --Sig_/FD5wR+0rDoRBtqDmZMI6Hl6--
Re: How to indicate that a package won't work without systemd
Author: Marc Haber
Date: Fri, 23 Oct 2026 05:40
Date: Fri, 23 Oct 2026 05:40
18 lines
2508 bytes
2508 bytes
On Thu, Oct 22, 2026 at 09:10:49PM +0200, Stephen Kitt wrote: >This doesnβt answer your question, but can the package be used sensibly >*without* an init at all? For example, could it be used in a container? If >so, then a (strong) dependency on systemd might not be desirable. The package is already split into the actual executable which works everywhere and the Debian integration which needs systemd timers and systemd service units. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Re: How to indicate that a package won't work without systemd
Author: Richard Lewis
Date: Sat, 24 Oct 2026 15:40
Date: Sat, 24 Oct 2026 15:40
28 lines
4548 bytes
4548 bytes
Marc Haber <mh+debian-devel@zugschlus.de> writes: > On Tue, Oct 20, 2026 at 10:01:50AM +0100, Simon McVittie wrote: >>On Tue, 20 Oct 2026 at 00:42:33 +0200, Marc Haber wrote: >>> I would like to write package dependencies that a certain package >>> indicates that it won't work without systemd, most prominently that >>> it would NOT work with sysvinit. >> >> What feature(s) of systemd? I know systemd's detractors often say >> it's monolithic, but it's actually quite modular, and the down side >> of that is that dependent packages do need to know which parts they >> are depending on. > > In this case, its systemd service unit is quite sophisticated and > reaches a level of security that I have never even seen TRIED to > achive in an init script. There is no init script, and the "cron job" > which is actually invoked by systemd timer in the package, will > horriby break with sysvinit. > >> If the same transition had been done today, I think we'd probably >> have packages named init-is-systemd and init-is-sysvinit, with the >> same meaning as what's currently systemd-sysv and sysvinit-core >> respectively. > > All this should be documented. https://wiki.debian.org/systemd/PackageDependencies - please everyone feel free to update and fix any misunderstandings and errors
Re: How to indicate that a package won't work without systemd
Author: Marc Haber
Date: Sun, 25 Oct 2026 17:00
Date: Sun, 25 Oct 2026 17:00
17 lines
2760 bytes
2760 bytes
On Sat, Oct 24, 2026 at 04:17:58PM +0100, Richard Lewis wrote: >https://wiki.debian.org/systemd/PackageDependencies - please everyone feel free to update and fix any misunderstandings and errors Thank you. Why do I not need to depend on systemd when I expect my service to be launched via a .service unit? How do I prevent bug reports from being filed that my service breaks when not launched via systemd? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Re: How to indicate that a package won't work without systemd
Author: Richard Lewis
Date: Sun, 25 Oct 2026 22:20
Date: Sun, 25 Oct 2026 22:20
17 lines
3966 bytes
3966 bytes
Marc Haber <mh+debian-devel@zugschlus.de> writes: > On Sat, Oct 24, 2026 at 04:17:58PM +0100, Richard Lewis wrote: >>https://wiki.debian.org/systemd/PackageDependencies - please everyone feel free to update and fix any misunderstandings and errors > > Thank you. > > Why do I not need to depend on systemd when I expect my service to be > launched via a .service unit? maybe you do in this instance (this is why the page says "most packages" at the top!). > How do I prevent bug reports from being filed that my service breaks > when not launched via systemd? (i dont think anything can stop that)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads