On Tue, 2020-01-28 at 16:51 +0100, Michael Biebl wrote: > Am 28.01.20 um 14:59 schrieb Ansgar: > > I tried linking systemd-{sysusers,tmpfiles} statically against > > systemd's private library earlier this month. It increases the > > binaries size by ~100 kB (compared to Installed-Size: 14.2 MB of > > systemd that is just one percent). > > Is that 100K per binary?
I checked my notes at it was 100 kB per binary: they are 212 kB larger (sysusers 51 kB → 137 kB, tmpfiles 84 kB → 212 kB); I tested with systemd 243-8. It might be possible to make it a bit smaller if one was to somehow link libsystemd0 for functions available there (libsystemd-shared currently duplicates those). > We also have the overhead from /usr/share/doc/, so another 100K+ I think not every package needs to ship the full changelog. There are two options to reduce this a bit: - ship truncated changelogs in binary packages (only last 2 years or so) - symlink changelog.Debian.gz -> ../other-package/changelog.Debian.gz for packages with strong dependencies; for example: systemd has Depends: libsystemd0 (= ${binary:version}). It could just have a symlink as nothing is lost. Of course neither of these points are specific to systemd. > More importantly, this requires a downstream patch, and I'm really > trying hard to reduce the number of those downstream patches. Ack. > > If we want to use systemd-{sysusers,tmpfiles} in maintainer scripts to > > create system users and/or directories under /var, then I think we > > should split it off into a separate package, say systemd-utils, so that > > package installation doesn't pull in the entire systemd init (for > > containers or other uses that might not require an init). > > Given that open{sysusers,tmpfiles} are currently packaged, shouldn't we > wait how that plays out first? > Maybe they are sufficiently well maintained upstream/downstream that > they would be an alternative for such a use case. I admit not being too enthusiastic about open{sysusers,tmpfiles} and would prefer to always use systemd-*, even in minimal environments created by debootstrap for buildds or other environments. > What I'm currently missing, is an overall plan. If the sysusers > interface is something we want as distro, there should be a coordinated > effort, not every package doing this on its own. The current state of shipping systemd-{tmpfiles,sysuser} in systemd is probably good enough for experimentation in leaf packages (outside of what debootstrap would install in minimal environments) or conditional use. If we agree to recommend use of systemd-{tmpfiles,sysuser} in Policy, then I would prefer if it was possible to split these utilities off into a separate binary package. (I opened a bug about -tmpfiles in Policy some time ago, but probably need to think a bit more about when to use .tmpfiles vs *Directory= in .service files. Using RuntimeDirectory=, StateDirectory=, ... where possible should maybe be preferred over .tmpfiles.) Ansgar