import: introduce new mini-daemon systemd-importd, and make machinectl a client to it

System Internals / systemd - Lennart Poettering [poettering.net] - 21 January 2015 21:02 UTC

The old "systemd-import" binary is now an internal tool. We still use it as asynchronous backend for systemd-importd. Since the import tool might require some IO and CPU resources (due to qcow2 explosion, and decompression), and because we might want to run it with more minimal priviliges we still keep it around as the worker binary to execute as child process of importd.

machinectl now has verbs for pulling down images, cancelling them and listing them.

3d7415f import: introduce new mini-daemon systemd-importd, and make machinectl a client to it
.gitignore | 1 +
Makefile.am | 62 +-
configure.ac | 10 +
src/import/.gitignore | 1 +
src/import/import-common.c | 448 ++++++++++++
src/import/import-common.h | 39 ++
src/import/import-dkr.c | 34 +-
src/import/import-dkr.h | 4 -
src/import/import-raw.c | 3 +-
src/import/import-tar.c | 3 +-
src/import/import-util.c | 514 --------------
src/import/import-util.h | 54 --
src/import/import.c | 104 +--
src/import/importd.c | 958 ++++++++++++++++++++++++++
src/import/org.freedesktop.import1.conf | 62 ++
src/import/org.freedesktop.import1.policy.in | 29 +
src/import/org.freedesktop.import1.service | 12 +
src/journal/journald-syslog.c | 40 --
src/journal/journald-syslog.h | 1 -
src/libsystemd/sd-bus/bus-common-errors.c | 3 +
src/libsystemd/sd-bus/bus-common-errors.h | 3 +
src/machine/machinectl.c | 553 ++++++++++++++-
src/shared/import-util.c | 182 +++++
src/shared/import-util.h | 47 ++
src/shared/util.c | 55 ++
src/shared/util.h | 4 +
units/.gitignore | 1 +
units/org.freedesktop.import1.busname | 14 +
units/systemd-importd.service.in | 19 +
29 files changed, 2497 insertions(+), 763 deletions(-)

Upstream: github.com


  • Share