Lennart Poettering
805742a9c5
Allow systemd to be built as as single statically-linked binary ( #42820 )
...
The idea is that we can build a container by building a single-binary
systemd:
```console
$ meson setup build-static --default-library=static --prefer-static --auto-features=disabled -Dbuild-static=true -Dsystemd-multicall-binary=true && ninja -C build-static systemd
$ mkdir /var/tmp/container/usr/lib -p
$ cp build-static/systemd /var/tmp/container/usr/lib/
$ echo 'ID=quick' >/var/tmp/container/usr/lib/os-release
$ systemd-nspawn --restrict-address-families=af_unix --register=no --private-users=managed -D /var/tmp/container/ /usr/lib/systemd
░ Spawning container container on /var/tmp/container.
░ Press Ctrl-] three times within 1s to kill container; two times followed by r
░ to reboot container; two times followed by p to poweroff container.
Selected user namespace base 1855193088 and range 65536.
systemd 262~devel running in system mode (-PAM -AUDIT +SELINUX -APPARMOR +IMA +IPE +SMACK -SECCOMP -GCRYPT +GNUTLS +OPENSSL -ACL +BLKID +CURL -ELFUTILS -FIDO2 +IDN2 +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 -BZIP2 -LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -BTF -XKBCOMMON +UTMP -LIBARCHIVE)
Detected virtualization systemd-nspawn.
Detected architecture x86-64.
Detected first boot.
Welcome to Linux!
Initializing machine ID from container UUID.
Failed to open netlink, ignoring: Address family not supported by protocol
Applying preset policy.
Populated /etc with preset unit settings.
Unit default.target not found.
Falling back to graphical.target.
Mount unit not supported, skipping *MountsFor= dependencies.
Queued start job for default target graphical.target.
[ OK ] Reached target sysinit.target.
[ OK ] Reached target basic.target.
System is tainted: unmerged-bin:var-run-bad
[ OK ] Reached target multi-user.target.
[ OK ] Reached target graphical.target.
Startup finished in 61ms.
```
The container can be reloaded with SIGTERM, powered off with SIGRTMIN+4,
etc. SIGRTMIN+5 should cause a reboot but it currently fails:
```
...
Rebooting.
Container container is being rebooted.
Failed to attach root directory: Invalid argument
Failed to receive mount namespace fd from outer child: Input/output error
```
It's a bug … somewhere, but probably not caused by the linking changes
being done here.
2026-07-02 21:56:27 +02:00
..
2026-06-26 13:01:31 +01:00
2026-05-18 02:44:46 +09:00
2026-06-24 13:05:34 +02:00
2026-01-19 22:41:33 +09:00
2025-11-06 07:33:56 +09:00
2026-05-18 02:44:46 +09:00
2026-05-18 02:44:46 +09:00
2026-05-16 09:38:25 +09:00
2026-02-23 16:43:09 +00:00
2025-11-23 18:09:11 +01:00
2026-06-03 16:26:04 +02:00
2026-07-02 17:19:18 +02:00
2026-01-27 13:43:33 +01:00
2026-01-18 15:50:54 +09:00
2026-06-30 09:00:11 +02:00
2025-12-20 15:27:22 +01:00
2025-11-23 18:09:11 +01:00
2026-03-18 17:33:22 -04:00
2026-06-20 14:26:41 +02:00
2026-06-19 23:05:36 +02:00
2026-02-19 15:08:20 +01:00
2025-11-13 16:14:25 +01:00
2025-11-23 18:09:11 +01:00
2025-11-13 00:08:31 +01:00
2026-07-02 09:52:21 +01:00
2026-03-26 14:28:22 +01:00
2026-07-02 17:04:07 +01:00
2025-12-05 11:57:18 +01:00
2026-06-19 23:05:36 +02:00
2026-05-06 10:30:17 +02:00
2026-05-17 21:02:20 +09:00
2026-05-21 16:55:59 +09:00
2026-05-18 02:44:46 +09:00
2025-12-18 10:53:27 +01:00
2026-05-18 21:42:56 +02:00
2026-06-01 10:56:16 +02:00
2026-02-19 15:05:15 +01:00
2026-02-25 12:25:08 +01:00
2026-04-15 14:20:32 +00:00
2026-02-10 13:40:13 +00:00
2026-06-30 10:21:18 +01:00
2026-05-21 11:51:21 +01:00
2026-04-17 21:12:16 +01:00
2026-06-20 09:57:42 +01:00
2026-02-13 11:40:11 +01:00
2026-06-22 10:24:26 +02:00
2026-05-18 11:45:03 +01:00
2026-06-28 13:48:02 +09:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-01 09:40:31 +01:00
2026-03-18 10:28:11 +00:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-07-02 17:04:07 +01:00
2026-05-05 17:22:26 +02:00
2026-04-08 16:33:20 +02:00
2025-11-01 21:58:28 +01:00
2026-05-18 10:39:04 +01:00
2025-10-22 09:34:14 +02:00
2026-05-15 13:46:08 +01:00
2026-04-20 15:01:17 +01:00
2026-02-17 15:27:24 +01:00
2026-05-22 14:55:28 +01:00
2026-06-23 23:10:02 +02:00
2026-03-18 10:28:11 +00:00
2026-06-28 00:00:11 +09:00
2026-02-17 15:27:24 +01:00
2026-06-23 22:55:23 +02:00
2026-03-20 13:56:44 +00:00
2025-11-23 18:09:11 +01:00
2026-06-21 18:20:53 +01:00
2026-04-29 12:25:47 +02:00
2025-12-24 07:37:58 +01:00
2025-12-12 21:54:47 +09:00
2026-01-07 00:47:53 +01:00
2026-06-22 21:35:17 +01:00
2026-06-30 10:21:18 +01:00
2025-11-23 18:09:11 +01:00
2026-03-31 09:47:27 +01:00
2026-05-21 18:34:01 +02:00
2026-04-24 14:09:54 +01:00
2026-04-16 16:48:17 +02:00
2026-05-19 08:28:53 +00:00
2026-03-05 09:53:43 +01:00
2026-07-02 21:28:42 +02:00
2026-02-20 21:20:45 +01:00
2026-07-02 09:52:21 +01:00
2026-06-03 20:21:54 +01:00
2026-03-26 14:34:56 +01:00
2025-11-23 18:09:11 +01:00
2026-03-26 16:13:11 +01:00
2026-06-22 22:03:12 +02:00
2026-03-26 10:54:15 +01:00
2025-11-23 18:09:11 +01:00
2025-12-17 23:23:44 +00:00
2026-04-22 20:05:38 +02:00
2025-12-18 13:57:32 +01:00
2026-04-07 20:38:40 +02:00
2026-06-01 10:56:16 +02:00
2026-07-02 21:28:42 +02:00
2026-04-23 15:39:29 +02:00
2026-02-20 01:18:54 +09:00
2026-03-30 10:48:55 -04:00
2026-05-15 13:46:08 +01:00
2026-02-24 18:29:37 +01:00
2025-10-30 14:12:41 +00:00
2026-06-06 10:47:10 +01:00
2026-07-02 21:28:42 +02:00
2026-06-19 05:23:18 +02:00
2026-06-19 05:23:18 +02:00
2026-06-22 20:42:35 +02:00
2026-06-19 05:23:18 +02:00
2026-03-24 21:24:48 +01:00
2026-07-01 23:37:44 +02:00
2026-02-05 10:28:47 +01:00
2025-10-22 09:34:14 +02:00
2026-05-20 04:29:59 +09:00
2026-04-17 11:54:47 +02:00
2025-11-13 14:45:51 +01:00
2026-04-29 12:25:47 +02:00
2026-04-29 12:25:47 +02:00
2026-06-09 09:33:59 +02:00
2026-06-19 22:15:43 +02:00
2026-05-05 15:09:47 +02:00
2026-05-15 14:01:57 +09:00
2026-06-26 13:01:31 +01:00
2026-07-02 17:02:40 +01:00
2026-07-02 17:02:40 +01:00
2026-03-26 16:11:34 +01:00
2026-07-01 17:36:50 +02:00
2026-03-26 16:11:34 +01:00
2026-03-25 02:02:23 +01:00
2026-03-31 09:47:27 +01:00
2026-05-11 21:10:11 +02:00
2026-07-01 16:09:27 +02:00
2026-02-16 11:09:48 +01:00
2026-06-28 13:40:07 +09:00
2026-01-16 22:56:28 +09:00
2025-11-23 18:09:11 +01:00
2025-12-19 09:17:41 +00:00
2026-06-19 20:38:13 +02:00
2026-06-17 08:34:02 +02:00
2026-05-19 14:39:20 +02:00
2026-06-19 20:38:13 +02:00
2026-06-19 20:38:13 +02:00
2026-04-13 11:14:11 +02:00
2026-05-19 15:48:05 +09:00
2026-03-24 21:24:48 +01:00
2026-06-26 10:11:59 +01:00
2026-06-23 22:55:23 +02:00
2026-07-02 17:19:18 +02:00
2026-04-08 11:51:09 +01:00
2026-06-20 14:26:41 +02:00
2026-06-22 14:47:20 +01:00
2025-11-23 18:09:11 +01:00
2026-06-01 12:21:12 +02:00
2026-01-20 21:22:35 +01:00
2026-01-06 07:21:37 +09:00
2026-06-21 18:20:53 +01:00
2026-07-02 21:28:42 +02:00
2026-05-21 04:24:55 +09:00
2026-03-06 18:39:07 +01:00
2026-06-23 23:10:01 +02:00
2026-05-11 21:10:11 +02:00
2026-02-17 22:00:14 +01:00
2026-03-06 09:52:37 +09:00