Hi, Joel Roth writes:
> Katolaz wrote on March 2, 2018: > >> leloft wrote: > >> >> I issued $locate systemd >> and got 200 lines of output, including >> /etc/systemd/system/* (23 files) >> /lib/systemd/system/* (60 files) >> /lib/x86_64-linux-gnu/libsystemd.so.0 (and 0.17.0) >> /usr/lib/systemd (25 files) >> /usr/bin/deb-systemd-helper ((and deb-systemd-invoke) >> /var/lib/systemd/deb-systemd-helper-enabled/* (68 files) >> /var/lib/dpkg/info/libsystemd):amd64* (5 files) >> >> This seems a lot to me. Please could you confirm that an ascii >> installation should contain 200 systemd files as part of a normal >> ascii installation. Sorry to trouble you if these are trivial >> questions, but they feel far from that. >> Many thanks >> leloft > > Most of those "alarming" files are just systemd units files, put there > by daemons/packages/utilities who "also" support systemd in a way or > another. So they are not alarming but just *totally* *harmless* if you > don't have a running systemd as PID 1, since only systemd understands > and can run them. It would be *totally* *useless* (and utterly > *stupid* IMHO) to fork, rebuild, and maintain a few more hundred > packages only because they happen to provide a systemd unit file for > those systems where systemd is used. Actually, you can keep these files off your systems fairly easily without the need to fork, rebuild and maintain piles of packages. The idea is to exploit the power of dpkg's --path-exclude option. Please note that the dpkg(1) manual page says Warning: take into account that depending on the excluded paths you might completely break your system, use with caution. So if you try this and stuff breaks you get to keep the pieces ;-/ You can add a /etc/dpkg/dpkg.cfg.d/systemd-razor file that contains path-exclude globs for all the systemd files you want to get rid of like so path-exclude=*systemd* path-include=/etc/dpkg/dpkg.cfg.d/systemd-razor although you might just want to be a bit more subtle ;-) # See dpkg.cfg(5) for (scant) details. The above prevents installation of any new "offending" files (while keeping the systemd-razor file installed, doh). To get rid of files already installed, you can retro-actively apply the above on what's installed already like so-ish find / -name '*systemd*' ! -name systemd-razor -delete with appropriate privileges, i.e. as root. Please adjust if you used a more (set of) exclude patterns. People that want to do so can do this themselves rightaway and Devuan *could* add this dpkg.cfg.d file to a suitable package (and the find invocation in that package's postinst). The latter only after a good deal of testing of course. Disclaimer: None of the above has been tested (although I do use this approach to clean out /usr/share/doc in my devuan/slim Docker images, see https://gitlab.com/paddy-hack/devuan). Hope this helps, -- Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Software https://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng