1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00
systemd-stable/tools
Zbigniew Jędrzejewski-Szmek 4287c85589 meson: create new libsystemd-core.so private shared library
The scheme is very similar to libsystemd-shared.so: instead of building a
static library, we build a shared library from the same objects and link the
two users to it. Both systemd and systemd-analyze consist mostly of the fairly
big code in libcore, so we save a bit on the installation:

(-0g, no strip)
-rwxr-xr-x 5238864 Dec 14 12:52 /var/tmp/inst1/usr/lib/systemd/systemd
-rwxr-xr-x 5399600 Dec 14 12:52 /var/tmp/inst1/usr/bin/systemd-analyze
-rwxr-xr-x  244912 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/systemd
-rwxr-xr-x  461224 Dec 14 13:17 /var/tmp/inst2/usr/bin/systemd-analyze
-rwxr-xr-x 5271568 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so

(-0g, strip)
-rwxr-xr-x 2522080 Dec 14 13:19 /var/tmp/inst1/usr/lib/systemd/systemd
-rwxr-xr-x 2604160 Dec 14 13:19 /var/tmp/inst1/usr/bin/systemd-analyze
-rwxr-xr-x  113304 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/systemd
-rwxr-xr-x  207656 Dec 14 13:19 /var/tmp/inst2/usr/bin/systemd-analyze
-rwxr-xr-x 2648520 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so

So for systemd itself we grow a bit (2522080 → 2648520+113304=2761824), but
overall we save. The most is saved on all the test files that link to libcore,
if they are installed, because there's 15 of them:

$ du -s /var/tmp/inst?
220096	/var/tmp/inst1
122960	/var/tmp/inst2

I also considered making systemd-analyze a symlink to /usr/lib/systemd/systemd
and turning systemd into a multicall binary. We did something like this with
udevd and udevadm. But that solution doesn't fit well in this case.
systemd-analyze has a bunch of functionality that is not used in systemd,
so the systemd binary would need to grow quite a bit. And we're likely to
add new types of verification or introspection features in analyze, and this
baggage would only grow. In addition, there are the test binaries which also
benefit from this.
2021-12-25 15:18:47 +09:00
..
chromiumos licensing: add spdx header to chromiumos helper, move license file 2021-10-01 14:45:00 +02:00
add-git-hook.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
analyze-dump-sort.py tools/analyze-dump-sort: a helper to compare two 'systemd-analyze dump' outputs 2021-06-04 12:09:58 +02:00
catalog-report.py tree-wide: drop header for emacs from python scripts 2018-12-10 03:17:33 +09:00
check-api-docs.sh Change all fixed-path bash shebangs to /u/b/env bash outside test/ 2021-12-12 21:13:50 +01:00
check-compilation.sh tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
check-directives.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
check-help.sh Change all fixed-path bash shebangs to /u/b/env bash outside test/ 2021-12-12 21:13:50 +01:00
check-includes.pl Drop "Copyright abandonded" header 2018-07-24 11:14:44 +02:00
choose-default-locale.sh tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
coverity.sh tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
dbus_exporter.py Export D-Bus interfaces to /usr/share/dbus-1/interfaces 2021-12-10 08:51:58 +01:00
find-build-dir.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
find-double-newline.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
find-tabs.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
gdb-sd_dump_hashmaps.py license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
generate-gperfs.py license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
get-coverity.sh Change all fixed-path bash shebangs to /u/b/env bash outside test/ 2021-12-12 21:13:50 +01:00
git-contrib.sh git-contrib: copypaste-friendly output 2021-07-19 15:39:26 +09:00
list-discoverable-partitions.py docs: fix descriptions in discoverable partitions 2021-11-27 13:46:35 +00:00
make-autosuspend-rules.py license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
make-directive-index.py man: add "DNS resource record types" section 2021-06-29 10:44:18 +02:00
make-man-index.py license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
meson-build.sh tools: shellcheck-ify tool scripts 2021-09-30 12:27:06 +02:00
meson-make-symlink.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
meson-render-jinja2.py meson: add missing final newline in jinja2 outputs 2021-12-09 12:46:19 +01:00
meson-vcs-tag.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
oss-fuzz.sh meson: create new libsystemd-core.so private shared library 2021-12-25 15:18:47 +09:00
update-dbus-docs.py man: also add anotations for methods 2021-12-24 10:18:11 +00:00
update-hwdb-autosuspend.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
update-hwdb.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
update-man-rules.py meson: rename target to update-man-rules 2021-01-27 09:10:25 +01:00
update-syscall-tables.sh tools: shellcheck-ify most of the tool scripts 2021-04-20 20:11:13 +02:00
xml_helper.py license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00