Find a file
Zbigniew Jędrzejewski-Szmek 22ce84de18 meson: do not link libsystemd_static into libcore (#8813)
(or in terms of the names of the actual files on disk, do not link
libsystemd-shared-238.a into libcore.a).

libsystemd_static is linked into libsystemd_shared, which in turn means that
anything that links to libcore and libsystemd_shared will get libsystemd_static
twice:

$ cc -o systemd 'systemd@exe/src_core_main.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie -DVALGRIND -Wl,--start-group src/core/libcore.a src/shared/libsystemd-shared-238.a src/shared/libsystemd-shared-238.so -pthread -lrt -lseccomp -lselinux -lmount -lblkid -Wl,--end-group -lseccomp -lpam -L/lib64 -laudit -lkmod -lmount -lrt -lcap -lacl -lcryptsetup -lgcrypt -lip4tc -lip6tc -lseccomp -lselinux -lidn -llzma -llz4 -lblkid '-Wl,-rpath,$ORIGIN/src/shared' -Wl,-rpath-link,/home/zbyszek/src/systemd/build/src/shared

This propagation of the dependency seems correct (in the sense that meson is
doing the expected thing based on the given configuration). Linking was done
this way in the original meson conversion. I was probably trying to get
everything to compile and link, I'm not sure why this particular choice was
made. In the meantime, meson has gotten better at propagating dependencies, so
it's possible that this had slightly different effect in the original
conversion, but I did not verify this. Either way, I think we should drop this.

With the patch:
$ cc -o systemd 'systemd@exe/src_core_main.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie -DVALGRIND -Wl,--start-group src/core/libcore.a src/shared/libsystemd-shared-238.so -pthread -lrt -lseccomp -lselinux -lmount -Wl,--end-group -lblkid -lrt -lseccomp -lpam -L/lib64 -laudit -lkmod -lselinux -lmount '-Wl,-rpath,$ORIGIN/src/shared' -Wl,-rpath-link,/home/zbyszek/src/systemd/build/src/shared

This is more correct because we're not linking the same code twice.
With the patch, libystemd_static is used in exactly four places:
- src/shared/libsystemd-shared-238.so
- src/udev/libudev.so.1.6.10
- pam_systemd.so
- test-bus-error
(compared to a bunch more executables before, including systemd,
systemd-analyze, test-hostname, test-ns, etc.)

Size savings are also noticable:

$ size /var/tmp/inst?/usr/lib/systemd/libsystemd-shared-238.so
   text	   data	    bss	    dec	    hex	filename
2397826	 578488	  15920	2992234	 2da86a	/var/tmp/inst1/usr/lib/systemd/libsystemd-shared-238.so
2397826	 578488	  15920	2992234	 2da86a	/var/tmp/inst2/usr/lib/systemd/libsystemd-shared-238.so

$ size /var/tmp/inst?/usr/lib/systemd/systemd
   text	   data	    bss	    dec	    hex	filename
1858790	 261688	   9320	2129798	 207f86	/var/tmp/inst1/usr/lib/systemd/systemd
1556358	 258704	   8072	1823134	 1bd19e	/var/tmp/inst2/usr/lib/systemd/systemd

$ du -s /var/tmp/inst?
52216	/var/tmp/inst1
50844	/var/tmp/inst2

https://github.com/google/oss-fuzz/issues/1330#issuecomment-384054530 might be related.
2018-04-25 13:47:18 +02:00
.github doc: add a new doc/ directory, and move two markdown docs into them 2018-02-27 19:59:09 +01:00
.mkosi mkosi: ensure the 'hostname' tool is available in the build environment 2018-04-19 11:30:18 +02:00
catalog tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
coccinelle util-lib: introduce new empty_or_root() helper (#8746) 2018-04-18 14:20:49 +02:00
doc CGROUP_DELEGATION: typo and grammar fixes 2018-04-24 12:07:34 +02:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: Add accelerometer orientation quirk for the Linx 1010B tablet (#8784) 2018-04-23 10:49:54 +02:00
man man/os-release: Document that blank lines are permitted (#8777) 2018-04-23 11:03:16 +02:00
modprobe.d Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
network tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
po po: update Turkish translation (#8783) 2018-04-23 10:12:03 +02:00
presets tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
rules tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
shell-completion bash-completion: add completion for resolvectl 2018-04-19 03:26:54 +09:00
src meson: do not link libsystemd_static into libcore (#8813) 2018-04-25 13:47:18 +02:00
sysctl.d tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
sysusers.d tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
test tests: compare with correct shell 2018-04-19 11:41:28 +02:00
tmpfiles.d meson: install nspawn tmpfiles snippet only when machined is turned on 2018-04-17 19:51:43 +02:00
tools tree-wide: drop spurious newlines (#8764) 2018-04-19 12:13:23 +02:00
travis-ci Integration of Travis CI and Coverity Scan Analysis (#7691) 2018-01-11 11:41:35 +01:00
units unit,meson: drop .in suffix if no substitution is required (#8740) 2018-04-17 19:49:10 +02:00
xorg login: avoid external process call 2018-01-12 18:02:57 +01:00
.dir-locals.el meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
.editorconfig editorconfig: add rule for meson.build files (#6671) 2017-08-28 16:37:23 +02:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore Add mkosi.output/ to .gitignore 2017-11-29 14:33:56 +01:00
.mailmap mailmap: one more person 2018-03-05 17:21:09 +01:00
.travis.yml Rename scripts/coverity.sh to tools/coverity.sh 2018-03-12 15:39:21 +01:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
meson.build resolvectl: rename systemd-resolve to resolvectl 2018-04-19 03:24:23 +09:00
meson_options.txt tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
mkosi.build mkosi: drop dumping all test output to console again 2018-04-19 11:41:28 +02:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
NEWS NEWS: Warn about predictable network naming changes 2018-03-26 14:00:43 -04:00
README README: mention systemd-stable 2018-03-26 15:28:03 +02:00
README.md README: mention systemd-stable 2018-03-26 15:28:03 +02:00
TODO update TODO 2018-04-24 15:58:31 +02:00
zanata.xml po: add basic fedora.zanata.org configuration 2018-02-19 13:56:57 +01:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Build Status
Coverity Scan Status
CII Best Practices

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements are provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the HACKING file for information how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.