summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------GNUmakefile1
-rw-r--r--Makefile50
-rw-r--r--build-aux/Makefile.each.tail/50-sd.mk57
-rw-r--r--build-aux/Makefile.each.tail/70-sdman.mk122
-rw-r--r--build-aux/Makefile.once.head/20-sd.mk165
-rw-r--r--build-aux/Makefile.once.head/20-sdman.mk58
-rw-r--r--build-aux/Makefile.once.tail/10-sd.mk98
l---------catalog/Makefile1
-rw-r--r--config.mk.in78
-rw-r--r--discard.mk977
-rw-r--r--docs/.gitignore1
l---------docs/Makefile1
l---------docs/sysvinit/Makefile1
l---------docs/var-log/Makefile1
l---------hwdb/Makefile1
l---------man/GNUmakefile1
-rw-r--r--[l---------]man/Makefile33
l---------network/Makefile1
-rw-r--r--rules/.gitignore1
l---------rules/Makefile1
l---------shell-completion/Makefile1
-rw-r--r--shell-completion/bash/.gitignore1
l---------shell-completion/bash/Makefile1
l---------shell-completion/zsh/Makefile1
-rw-r--r--shell-completion/zsh/_systemd82
l---------src/GNUmakefile1
-rw-r--r--src/Makefile66
l---------src/ac-power/Makefile1
l---------src/activate/Makefile1
l---------src/analyze/Makefile1
l---------src/ask-password/Makefile1
l---------src/backlight/Makefile1
l---------src/basic/Makefile1
l---------src/binfmt/Makefile1
l---------src/boot/Makefile1
l---------src/busctl/GNUmakefile1
-rw-r--r--src/busctl/Makefile37
-rw-r--r--src/busctl/busctl-introspect.c (renamed from src/libsystemd/sd-bus/busctl-introspect.c)11
-rw-r--r--src/busctl/busctl-introspect.h (renamed from src/libsystemd/sd-bus/busctl-introspect.h)0
-rw-r--r--src/busctl/busctl.c (renamed from src/libsystemd/sd-bus/busctl.c)41
-rw-r--r--src/busctl/busctl.completion.bash (renamed from shell-completion/bash/busctl)0
-rw-r--r--src/busctl/busctl.completion.zsh (renamed from shell-completion/zsh/_busctl)0
-rw-r--r--src/busctl/busctl.xml (renamed from man/busctl.xml)0
l---------src/cgls/Makefile1
l---------src/cgroups-agent/Makefile1
l---------src/cgtop/Makefile1
l---------src/core/Makefile1
l---------src/coredump/Makefile1
l---------src/cryptsetup/Makefile1
l---------src/dbus1-generator/Makefile1
l---------src/debug-generator/Makefile1
l---------src/delta/Makefile1
l---------src/detect-virt/Makefile1
l---------src/escape/Makefile1
l---------src/firstboot/Makefile1
l---------src/fsck/Makefile1
l---------src/fstab-generator/Makefile1
l---------src/getty-generator/Makefile1
l---------src/gpt-auto-generator/Makefile1
l---------src/grp-boot/GNUmakefile1
-rw-r--r--src/grp-boot/Makefile30
l---------src/grp-boot/bootctl/GNUmakefile1
-rw-r--r--src/grp-boot/bootctl/Makefile53
-rw-r--r--src/grp-boot/bootctl/bootctl.c (renamed from src/boot/bootctl.c)35
-rw-r--r--src/grp-boot/bootctl/bootctl.completion.bash (renamed from shell-completion/bash/bootctl)0
-rw-r--r--src/grp-boot/bootctl/bootctl.completion.zsh (renamed from shell-completion/zsh/_bootctl)0
-rw-r--r--src/grp-boot/bootctl/bootctl.xml (renamed from man/bootctl.xml)0
-rw-r--r--src/grp-boot/kernel-install/50-depmod.install (renamed from src/kernel-install/50-depmod.install)0
-rw-r--r--src/grp-boot/kernel-install/90-loaderentry.install (renamed from src/kernel-install/90-loaderentry.install)0
l---------src/grp-boot/kernel-install/GNUmakefile1
-rw-r--r--src/grp-boot/kernel-install/Makefile33
-rw-r--r--src/grp-boot/kernel-install/kernel-install (renamed from src/kernel-install/kernel-install)0
-rw-r--r--src/grp-boot/kernel-install/kernel-install.completion.bash (renamed from shell-completion/bash/kernel-install)0
-rw-r--r--src/grp-boot/kernel-install/kernel-install.completion.zsh (renamed from shell-completion/zsh/_kernel-install)0
-rw-r--r--src/grp-boot/kernel-install/kernel-install.xml (renamed from man/kernel-install.xml)0
-rw-r--r--src/grp-boot/systemd-boot/.gitignore (renamed from src/boot/efi/.gitignore)0
l---------src/grp-boot/systemd-boot/GNUmakefile1
-rw-r--r--src/grp-boot/systemd-boot/Makefile193
-rw-r--r--src/grp-boot/systemd-boot/boot.c (renamed from src/boot/efi/boot.c)2
-rw-r--r--src/grp-boot/systemd-boot/console.c (renamed from src/boot/efi/console.c)0
-rw-r--r--src/grp-boot/systemd-boot/console.h (renamed from src/boot/efi/console.h)0
-rw-r--r--src/grp-boot/systemd-boot/disk.c (renamed from src/boot/efi/disk.c)0
-rw-r--r--src/grp-boot/systemd-boot/disk.h (renamed from src/boot/efi/disk.h)0
-rw-r--r--src/grp-boot/systemd-boot/graphics.c (renamed from src/boot/efi/graphics.c)0
-rw-r--r--src/grp-boot/systemd-boot/graphics.h (renamed from src/boot/efi/graphics.h)0
-rw-r--r--src/grp-boot/systemd-boot/linux.c (renamed from src/boot/efi/linux.c)0
-rw-r--r--src/grp-boot/systemd-boot/linux.h (renamed from src/boot/efi/linux.h)0
-rw-r--r--src/grp-boot/systemd-boot/measure.c (renamed from src/boot/efi/measure.c)2
-rw-r--r--src/grp-boot/systemd-boot/measure.h (renamed from src/boot/efi/measure.h)0
-rw-r--r--src/grp-boot/systemd-boot/pefile.c (renamed from src/boot/efi/pefile.c)0
-rw-r--r--src/grp-boot/systemd-boot/pefile.h (renamed from src/boot/efi/pefile.h)0
-rw-r--r--src/grp-boot/systemd-boot/splash.c (renamed from src/boot/efi/splash.c)0
-rw-r--r--src/grp-boot/systemd-boot/splash.h (renamed from src/boot/efi/splash.h)0
-rw-r--r--src/grp-boot/systemd-boot/stub.c (renamed from src/boot/efi/stub.c)2
-rwxr-xr-xsrc/grp-boot/systemd-boot/test-efi-create-disk.sh (renamed from test/test-efi-create-disk.sh)0
-rw-r--r--src/grp-boot/systemd-boot/util.c (renamed from src/boot/efi/util.c)0
-rw-r--r--src/grp-boot/systemd-boot/util.h (renamed from src/boot/efi/util.h)0
l---------src/grp-coredump/GNUmakefile1
-rw-r--r--src/grp-coredump/Makefile29
l---------src/grp-coredump/coredumpctl/GNUmakefile1
-rw-r--r--src/grp-coredump/coredumpctl/Makefile41
-rw-r--r--src/grp-coredump/coredumpctl/coredumpctl.c (renamed from src/coredump/coredumpctl.c)42
-rw-r--r--src/grp-coredump/coredumpctl/coredumpctl.completion.bash (renamed from shell-completion/bash/coredumpctl)0
-rw-r--r--src/grp-coredump/coredumpctl/coredumpctl.completion.zsh (renamed from shell-completion/zsh/_coredumpctl)0
-rw-r--r--src/grp-coredump/coredumpctl/coredumpctl.xml (renamed from man/coredumpctl.xml)0
-rw-r--r--src/grp-coredump/systemd-coredump/50-coredump.sysctl.in (renamed from sysctl.d/50-coredump.conf.in)0
l---------src/grp-coredump/systemd-coredump/GNUmakefile1
-rw-r--r--src/grp-coredump/systemd-coredump/Makefile85
-rw-r--r--src/grp-coredump/systemd-coredump/coredump-vacuum.c (renamed from src/coredump/coredump-vacuum.c)19
-rw-r--r--src/grp-coredump/systemd-coredump/coredump-vacuum.h (renamed from src/coredump/coredump-vacuum.h)0
-rw-r--r--src/grp-coredump/systemd-coredump/coredump.c (renamed from src/coredump/coredump.c)65
-rw-r--r--src/grp-coredump/systemd-coredump/coredump.conf (renamed from src/coredump/coredump.conf)0
-rw-r--r--src/grp-coredump/systemd-coredump/coredump.conf.xml (renamed from man/coredump.conf.xml)0
-rw-r--r--src/grp-coredump/systemd-coredump/stacktrace.c (renamed from src/coredump/stacktrace.c)13
-rw-r--r--src/grp-coredump/systemd-coredump/stacktrace.h (renamed from src/coredump/stacktrace.h)0
-rw-r--r--src/grp-coredump/systemd-coredump/systemd-coredump.socket (renamed from units/systemd-coredump.socket)0
-rw-r--r--src/grp-coredump/systemd-coredump/systemd-coredump.sysusers (renamed from sysusers.d/systemd-coredump.conf)0
-rw-r--r--src/grp-coredump/systemd-coredump/systemd-coredump.tmpfiles (renamed from tmpfiles.d/systemd-coredump.conf)0
-rw-r--r--src/grp-coredump/systemd-coredump/systemd-coredump.xml (renamed from man/systemd-coredump.xml)0
-rw-r--r--src/grp-coredump/systemd-coredump/systemd-coredump@.service.in (renamed from units/systemd-coredump@.service.in)0
-rw-r--r--src/grp-coredump/systemd-coredump/test-coredump-vacuum.c (renamed from src/coredump/test-coredump-vacuum.c)0
l---------src/grp-hostname/GNUmakefile1
-rw-r--r--src/grp-hostname/Makefile29
l---------src/grp-hostname/hostnamectl/GNUmakefile1
-rw-r--r--src/grp-hostname/hostnamectl/Makefile44
-rw-r--r--src/grp-hostname/hostnamectl/hostnamectl.c (renamed from src/hostname/hostnamectl.c)20
-rw-r--r--src/grp-hostname/hostnamectl/hostnamectl.completion.bash (renamed from shell-completion/bash/hostnamectl)0
-rw-r--r--src/grp-hostname/hostnamectl/hostnamectl.completion.zsh (renamed from shell-completion/zsh/_hostnamectl)0
-rw-r--r--src/grp-hostname/hostnamectl/hostnamectl.xml (renamed from man/hostnamectl.xml)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/.gitignore (renamed from src/hostname/.gitignore)0
l---------src/grp-hostname/systemd-hostnamed/GNUmakefile1
-rw-r--r--src/grp-hostname/systemd-hostnamed/Makefile64
-rw-r--r--src/grp-hostname/systemd-hostnamed/hostnamed.c (renamed from src/hostname/hostnamed.c)26
-rw-r--r--src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.conf (renamed from src/hostname/org.freedesktop.hostname1.conf)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.policy.in (renamed from src/hostname/org.freedesktop.hostname1.policy.in)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.service (renamed from src/hostname/org.freedesktop.hostname1.service)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.in (renamed from units/systemd-hostnamed.service.in)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.xml (renamed from man/systemd-hostnamed.service.xml)0
l---------src/grp-initprogs/GNUmakefile1
-rw-r--r--src/grp-initprogs/Makefile44
l---------src/grp-initprogs/grp-sleep/GNUmakefile1
-rw-r--r--src/grp-initprogs/grp-sleep/Makefile30
l---------src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/GNUmakefile1
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile38
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/hibernate-resume-generator.c (renamed from src/hibernate-resume/hibernate-resume-generator.c)18
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/systemd-hibernate-resume-generator.xml (renamed from man/systemd-hibernate-resume-generator.xml)0
l---------src/grp-initprogs/grp-sleep/systemd-hibernate-resume/GNUmakefile1
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-hibernate-resume/Makefile45
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-hibernate-resume/hibernate-resume.c (renamed from src/hibernate-resume/hibernate-resume.c)8
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.in (renamed from units/systemd-hibernate-resume@.service.in)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.xml (renamed from man/systemd-hibernate-resume@.service.xml)0
l---------src/grp-initprogs/grp-sleep/systemd-sleep/GNUmakefile1
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/Makefile49
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/hibernate.target (renamed from units/hibernate.target)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/hybrid-sleep.target (renamed from units/hybrid-sleep.target)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/sleep.c (renamed from src/sleep/sleep.c)20
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/sleep.target (renamed from units/sleep.target)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/suspend.target (renamed from units/suspend.target)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hibernate.service.in (renamed from units/systemd-hibernate.service.in)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hybrid-sleep.service.in (renamed from units/systemd-hybrid-sleep.service.in)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.conf.xml (renamed from man/systemd-sleep.conf.xml)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.xml (renamed from man/systemd-suspend.service.xml)0
-rw-r--r--src/grp-initprogs/grp-sleep/systemd-sleep/systemd-suspend.service.in (renamed from units/systemd-suspend.service.in)0
l---------src/grp-initprogs/systemd-backlight/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-backlight/Makefile43
-rw-r--r--src/grp-initprogs/systemd-backlight/backlight.c (renamed from src/backlight/backlight.c)24
-rw-r--r--src/grp-initprogs/systemd-backlight/systemd-backlight@.service.in (renamed from units/systemd-backlight@.service.in)0
-rw-r--r--src/grp-initprogs/systemd-backlight/systemd-backlight@.service.xml (renamed from man/systemd-backlight@.service.xml)0
l---------src/grp-initprogs/systemd-binfmt/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-binfmt/Makefile56
-rw-r--r--src/grp-initprogs/systemd-binfmt/binfmt.c (renamed from src/binfmt/binfmt.c)18
-rw-r--r--src/grp-initprogs/systemd-binfmt/binfmt.d.xml (renamed from man/binfmt.d.xml)0
-rw-r--r--src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.automount (renamed from units/proc-sys-fs-binfmt_misc.automount)0
-rw-r--r--src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.mount (renamed from units/proc-sys-fs-binfmt_misc.mount)0
-rw-r--r--src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.in (renamed from units/systemd-binfmt.service.in)0
-rw-r--r--src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.xml (renamed from man/systemd-binfmt.service.xml)0
l---------src/grp-initprogs/systemd-detect-virt/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-detect-virt/Makefile36
-rw-r--r--src/grp-initprogs/systemd-detect-virt/detect-virt.c (renamed from src/detect-virt/detect-virt.c)4
-rw-r--r--src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.bash (renamed from shell-completion/bash/systemd-detect-virt)0
-rw-r--r--src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.zsh11
-rw-r--r--src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.xml (renamed from man/systemd-detect-virt.xml)0
l---------src/grp-initprogs/systemd-firstboot/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-firstboot/Makefile47
-rw-r--r--src/grp-initprogs/systemd-firstboot/firstboot.c (renamed from src/firstboot/firstboot.c)36
-rw-r--r--src/grp-initprogs/systemd-firstboot/systemd-firstboot.service.in (renamed from units/systemd-firstboot.service.in)0
-rw-r--r--src/grp-initprogs/systemd-firstboot/systemd-firstboot.xml (renamed from man/systemd-firstboot.xml)0
l---------src/grp-initprogs/systemd-fsck/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-fsck/Makefile33
-rw-r--r--src/grp-initprogs/systemd-fsck/fsck.c (renamed from src/fsck/fsck.c)38
-rw-r--r--src/grp-initprogs/systemd-fsck/systemd-fsck@.service.in (renamed from units/systemd-fsck@.service.in)0
-rw-r--r--src/grp-initprogs/systemd-fsck/systemd-fsck@.service.xml (renamed from man/systemd-fsck@.service.xml)0
l---------src/grp-initprogs/systemd-modules-load/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-modules-load/Makefile59
-rw-r--r--src/grp-initprogs/systemd-modules-load/kmod-static-nodes.service.in (renamed from units/kmod-static-nodes.service.in)0
-rw-r--r--src/grp-initprogs/systemd-modules-load/modules-load.c (renamed from src/modules-load/modules-load.c)18
-rw-r--r--src/grp-initprogs/systemd-modules-load/modules-load.d.xml (renamed from man/modules-load.d.xml)0
-rw-r--r--src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.in (renamed from units/systemd-modules-load.service.in)0
-rw-r--r--src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.xml (renamed from man/systemd-modules-load.service.xml)0
l---------src/grp-initprogs/systemd-quotacheck/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-quotacheck/Makefile46
-rw-r--r--src/grp-initprogs/systemd-quotacheck/quotacheck.c (renamed from src/quotacheck/quotacheck.c)10
-rw-r--r--src/grp-initprogs/systemd-quotacheck/quotaon.service.in (renamed from units/quotaon.service.in)0
-rw-r--r--src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.in (renamed from units/systemd-quotacheck.service.in)0
-rw-r--r--src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.xml (renamed from man/systemd-quotacheck.service.xml)0
l---------src/grp-initprogs/systemd-random-seed/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-random-seed/Makefile47
-rw-r--r--src/grp-initprogs/systemd-random-seed/random-seed.c (renamed from src/random-seed/random-seed.c)14
-rw-r--r--src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.in (renamed from units/systemd-random-seed.service.in)0
-rw-r--r--src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.xml (renamed from man/systemd-random-seed.service.xml)0
l---------src/grp-initprogs/systemd-rfkill/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-rfkill/Makefile46
-rw-r--r--src/grp-initprogs/systemd-rfkill/rfkill.c (renamed from src/rfkill/rfkill.c)33
-rw-r--r--src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.in (renamed from units/systemd-rfkill.service.in)0
-rw-r--r--src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.xml (renamed from man/systemd-rfkill.service.xml)0
-rw-r--r--src/grp-initprogs/systemd-rfkill/systemd-rfkill.socket (renamed from units/systemd-rfkill.socket)0
-rw-r--r--src/grp-initprogs/systemd-sysctl/50-default.sysctl (renamed from sysctl.d/50-default.conf)0
l---------src/grp-initprogs/systemd-sysctl/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-sysctl/Makefile33
-rw-r--r--src/grp-initprogs/systemd-sysctl/sysctl.c (renamed from src/sysctl/sysctl.c)22
-rw-r--r--src/grp-initprogs/systemd-sysctl/sysctl.d.xml (renamed from man/sysctl.d.xml)0
-rw-r--r--src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.in (renamed from units/systemd-sysctl.service.in)0
-rw-r--r--src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.xml (renamed from man/systemd-sysctl.service.xml)0
-rw-r--r--src/grp-initprogs/systemd-sysusers/.gitignore (renamed from sysusers.d/.gitignore)0
l---------src/grp-initprogs/systemd-sysusers/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-sysusers/Makefile56
-rw-r--r--src/grp-initprogs/systemd-sysusers/basic.sysusers.in (renamed from sysusers.d/basic.conf.in)0
-rw-r--r--src/grp-initprogs/systemd-sysusers/systemd-sysusers.service.in (renamed from units/systemd-sysusers.service.in)0
-rw-r--r--src/grp-initprogs/systemd-sysusers/systemd-sysusers.xml (renamed from man/systemd-sysusers.xml)0
-rw-r--r--src/grp-initprogs/systemd-sysusers/sysusers.c (renamed from src/sysusers/sysusers.c)36
-rw-r--r--src/grp-initprogs/systemd-sysusers/sysusers.d.xml (renamed from man/sysusers.d.xml)0
l---------src/grp-initprogs/systemd-tmpfiles/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/Makefile88
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/etc.tmpfiles.m4 (renamed from tmpfiles.d/etc.conf.m4)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/home.tmpfiles (renamed from tmpfiles.d/home.conf)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/legacy.tmpfiles (renamed from tmpfiles.d/legacy.conf)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/systemd-nologin.tmpfiles (renamed from tmpfiles.d/systemd-nologin.conf)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.service.in (renamed from units/systemd-tmpfiles-clean.service.in)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.timer (renamed from units/systemd-tmpfiles-clean.timer)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup-dev.service.in (renamed from units/systemd-tmpfiles-setup-dev.service.in)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup.service.in (renamed from units/systemd-tmpfiles-setup.service.in)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.completion.zsh (renamed from shell-completion/zsh/_systemd-tmpfiles)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.xml (renamed from man/systemd-tmpfiles.xml)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/tmp.tmpfiles (renamed from tmpfiles.d/tmp.conf)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/tmpfiles.c (renamed from src/tmpfiles/tmpfiles.c)73
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/tmpfiles.d.xml (renamed from man/tmpfiles.d.xml)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/var.tmpfiles (renamed from tmpfiles.d/var.conf)0
-rw-r--r--src/grp-initprogs/systemd-tmpfiles/x11.tmpfiles (renamed from tmpfiles.d/x11.conf)0
l---------src/grp-initprogs/systemd-update-done/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-update-done/Makefile34
-rw-r--r--src/grp-initprogs/systemd-update-done/systemd-update-done.service.in (renamed from units/systemd-update-done.service.in)0
-rw-r--r--src/grp-initprogs/systemd-update-done/systemd-update-done.service.xml (renamed from man/systemd-update-done.service.xml)0
-rw-r--r--src/grp-initprogs/systemd-update-done/update-done.c (renamed from src/update-done/update-done.c)10
l---------src/grp-initprogs/systemd-update-utmp/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-update-utmp/Makefile41
-rw-r--r--src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.in (renamed from units/systemd-update-utmp.service.in)0
-rw-r--r--src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.xml (renamed from man/systemd-update-utmp.service.xml)0
-rw-r--r--src/grp-initprogs/systemd-update-utmp/update-utmp.c (renamed from src/update-utmp/update-utmp.c)26
l---------src/grp-initprogs/systemd-user-sessions/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-user-sessions/Makefile48
-rw-r--r--src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.in (renamed from units/systemd-user-sessions.service.in)0
-rw-r--r--src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.xml (renamed from man/systemd-user-sessions.service.xml)0
-rw-r--r--src/grp-initprogs/systemd-user-sessions/user-sessions.c (renamed from src/user-sessions/user-sessions.c)12
-rw-r--r--src/grp-initprogs/systemd-vconsole-setup/.gitignore (renamed from src/vconsole/.gitignore)0
-rw-r--r--src/grp-initprogs/systemd-vconsole-setup/90-vconsole.rules.in (renamed from src/vconsole/90-vconsole.rules.in)0
l---------src/grp-initprogs/systemd-vconsole-setup/GNUmakefile1
-rw-r--r--src/grp-initprogs/systemd-vconsole-setup/Makefile47
-rw-r--r--src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.in (renamed from units/systemd-vconsole-setup.service.in)0
-rw-r--r--src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.xml (renamed from man/systemd-vconsole-setup.service.xml)0
-rw-r--r--src/grp-initprogs/systemd-vconsole-setup/vconsole-setup.c (renamed from src/vconsole/vconsole-setup.c)33
-rw-r--r--src/grp-initprogs/systemd-vconsole-setup/vconsole.conf.xml (renamed from man/vconsole.conf.xml)0
-rw-r--r--src/grp-journal/.gitignore (renamed from docs/sysvinit/.gitignore)0
-rw-r--r--src/grp-journal/90-journald.preset (renamed from system-preset/90-journald.preset)0
l---------src/grp-journal/GNUmakefile1
-rw-r--r--src/grp-journal/Makefile196
-rw-r--r--src/grp-journal/README.in (renamed from docs/var-log/README.in)0
-rw-r--r--src/grp-journal/grp-remote/.gitignore (renamed from src/journal-remote/.gitignore)0
-rw-r--r--src/grp-journal/grp-remote/90-journal-remote.preset (renamed from system-preset/90-journal-remote.preset)0
l---------src/grp-journal/grp-remote/GNUmakefile1
-rw-r--r--src/grp-journal/grp-remote/Makefile36
-rw-r--r--src/grp-journal/grp-remote/browse.html (renamed from src/journal-remote/browse.html)0
l---------src/grp-journal/grp-remote/libsystemd-microhttpd/GNUmakefile1
-rw-r--r--src/grp-journal/grp-remote/libsystemd-microhttpd/Makefile28
-rw-r--r--src/grp-journal/grp-remote/libsystemd-microhttpd/include/systemd-microhttpd/microhttpd-util.h (renamed from src/journal-remote/microhttpd-util.h)2
l---------src/grp-journal/grp-remote/libsystemd-microhttpd/src/GNUmakefile1
-rw-r--r--src/grp-journal/grp-remote/libsystemd-microhttpd/src/Makefile26
-rw-r--r--src/grp-journal/grp-remote/libsystemd-microhttpd/src/microhttpd-util.c (renamed from src/journal-remote/microhttpd-util.c)14
-rwxr-xr-xsrc/grp-journal/grp-remote/log-generator.py (renamed from src/journal-remote/log-generator.py)0
l---------src/grp-journal/grp-remote/systemd-journal-gatewayd/GNUmakefile1
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile66
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c (renamed from src/journal-remote/journal-gatewayd.c)30
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.in (renamed from units/systemd-journal-gatewayd.service.in)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.xml (renamed from man/systemd-journal-gatewayd.service.xml)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.socket (renamed from units/systemd-journal-gatewayd.socket)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.sysusers (renamed from sysusers.d/systemd-journal-gatewayd.conf)0
l---------src/grp-journal/grp-remote/systemd-journal-remote/GNUmakefile1
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/Makefile79
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.c (renamed from src/journal-remote/journal-remote-parse.c)11
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.h (renamed from src/journal-remote/journal-remote-parse.h)2
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c (renamed from src/journal-remote/journal-remote-write.c)3
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.h (renamed from src/journal-remote/journal-remote-write.h)2
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c (renamed from src/journal-remote/journal-remote.c)39
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.conf.in (renamed from src/journal-remote/journal-remote.conf.in)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.conf.xml (renamed from man/journal-remote.conf.xml)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.h (renamed from src/journal-remote/journal-remote.h)7
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.service.in (renamed from units/systemd-journal-remote.service.in)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.socket (renamed from units/systemd-journal-remote.socket)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.sysusers (renamed from sysusers.d/systemd-journal-remote.conf)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.xml (renamed from man/systemd-journal-remote.xml)0
l---------src/grp-journal/grp-remote/systemd-journal-upload/GNUmakefile1
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/Makefile54
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/journal-upload-journal.c (renamed from src/journal-remote/journal-upload-journal.c)12
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.c (renamed from src/journal-remote/journal-upload.c)33
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.conf.in (renamed from src/journal-remote/journal-upload.conf.in)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.conf.xml (renamed from man/journal-upload.conf.xml)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h (renamed from src/journal-remote/journal-upload.h)7
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.service.in (renamed from units/systemd-journal-upload.service.in)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.sysusers (renamed from sysusers.d/systemd-journal-upload.conf)0
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.xml (renamed from man/systemd-journal-upload.xml)0
-rw-r--r--src/grp-journal/grp-remote/systemd-remote.tmpfiles (renamed from tmpfiles.d/systemd-remote.conf)0
-rw-r--r--src/grp-journal/journal-nocow.tmpfiles (renamed from tmpfiles.d/journal-nocow.conf)0
l---------src/grp-journal/journalctl/GNUmakefile1
-rw-r--r--src/grp-journal/journalctl/Makefile61
-rw-r--r--src/grp-journal/journalctl/journal-qrcode.c (renamed from src/journal/journal-qrcode.c)0
-rw-r--r--src/grp-journal/journalctl/journal-qrcode.h (renamed from src/journal/journal-qrcode.h)2
-rw-r--r--src/grp-journal/journalctl/journalctl.c (renamed from src/journal/journalctl.c)78
-rw-r--r--src/grp-journal/journalctl/journalctl.completion.bash (renamed from shell-completion/bash/journalctl)0
-rw-r--r--src/grp-journal/journalctl/journalctl.completion.zsh (renamed from shell-completion/zsh/_journalctl)0
-rw-r--r--src/grp-journal/journalctl/journalctl.xml (renamed from man/journalctl.xml)0
-rw-r--r--src/grp-journal/journalctl/systemd-journal-catalog-update.service.in (renamed from units/systemd-journal-catalog-update.service.in)0
-rw-r--r--src/grp-journal/journalctl/systemd-journal-flush.service.in (renamed from units/systemd-journal-flush.service.in)0
-rw-r--r--src/grp-journal/libjournal-core/.gitignore (renamed from src/journal/.gitignore)0
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-audit.h (renamed from src/journal/journald-audit.h)3
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-console.h (renamed from src/journal/journald-console.h)0
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-kmsg.h (renamed from src/journal/journald-kmsg.h)0
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-native.h (renamed from src/journal/journald-native.h)0
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-rate-limit.h (renamed from src/journal/journald-rate-limit.h)2
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-server.h (renamed from src/journal/journald-server.h)9
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-stream.h (renamed from src/journal/journald-stream.h)3
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-syslog.h (renamed from src/journal/journald-syslog.h)0
-rw-r--r--src/grp-journal/libjournal-core/include/journal-core/journald-wall.h (renamed from src/journal/journald-wall.h)0
l---------src/grp-journal/libjournal-core/src/GNUmakefile1
-rw-r--r--src/grp-journal/libjournal-core/src/Makefile56
-rw-r--r--src/grp-journal/libjournal-core/src/journald-audit.c (renamed from src/journal/journald-audit.c)16
-rw-r--r--src/grp-journal/libjournal-core/src/journald-console.c (renamed from src/journal/journald-console.c)22
-rw-r--r--src/grp-journal/libjournal-core/src/journald-gperf.gperf (renamed from src/journal/journald-gperf.gperf)5
-rw-r--r--src/grp-journal/libjournal-core/src/journald-kmsg.c (renamed from src/journal/journald-kmsg.c)28
-rw-r--r--src/grp-journal/libjournal-core/src/journald-native.c (renamed from src/journal/journald-native.c)32
-rw-r--r--src/grp-journal/libjournal-core/src/journald-rate-limit.c (renamed from src/journal/journald-rate-limit.c)14
-rw-r--r--src/grp-journal/libjournal-core/src/journald-server.c (renamed from src/journal/journald-server.c)93
-rw-r--r--src/grp-journal/libjournal-core/src/journald-stream.c (renamed from src/journal/journald-stream.c)44
-rw-r--r--src/grp-journal/libjournal-core/src/journald-syslog.c (renamed from src/journal/journald-syslog.c)34
-rw-r--r--src/grp-journal/libjournal-core/src/journald-wall.c (renamed from src/journal/journald-wall.c)14
-rw-r--r--src/grp-journal/libjournal-core/test/test-audit-type.c (renamed from src/journal/test-audit-type.c)3
-rw-r--r--src/grp-journal/libjournal-core/test/test-catalog.c (renamed from src/journal/test-catalog.c)20
-rw-r--r--src/grp-journal/libjournal-core/test/test-compress-benchmark.c (renamed from src/journal/test-compress-benchmark.c)14
-rw-r--r--src/grp-journal/libjournal-core/test/test-compress.c (renamed from src/journal/test-compress.c)14
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-enum.c (renamed from src/journal/test-journal-enum.c)8
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-flush.c (renamed from src/journal/test-journal-flush.c)12
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-init.c (renamed from src/journal/test-journal-init.c)10
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-interleaving.c (renamed from src/journal/test-journal-interleaving.c)18
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-match.c (renamed from src/journal/test-journal-match.c)12
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-send.c (renamed from src/journal/test-journal-send.c)4
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-stream.c (renamed from src/journal/test-journal-stream.c)20
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-syslog.c (renamed from src/journal/test-journal-syslog.c)8
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal-verify.c (renamed from src/journal/test-journal-verify.c)14
-rw-r--r--src/grp-journal/libjournal-core/test/test-journal.c (renamed from src/journal/test-journal.c)10
-rw-r--r--src/grp-journal/libjournal-core/test/test-mmap-cache.c (renamed from src/journal/test-mmap-cache.c)10
l---------src/grp-journal/systemd-cat/GNUmakefile1
-rw-r--r--src/grp-journal/systemd-cat/Makefile35
-rw-r--r--src/grp-journal/systemd-cat/cat.c (renamed from src/journal/cat.c)12
-rw-r--r--src/grp-journal/systemd-cat/systemd-cat.completion.bash (renamed from shell-completion/bash/systemd-cat)0
-rw-r--r--src/grp-journal/systemd-cat/systemd-cat.completion.zsh12
-rw-r--r--src/grp-journal/systemd-cat/systemd-cat.xml (renamed from man/systemd-cat.xml)0
-rw-r--r--src/grp-journal/systemd-journald/.gitignore (renamed from catalog/.gitignore)0
l---------src/grp-journal/systemd-journald/GNUmakefile1
-rw-r--r--src/grp-journal/systemd-journald/Makefile85
-rw-r--r--src/grp-journal/systemd-journald/journald.c (renamed from src/journal/journald.c)18
-rw-r--r--src/grp-journal/systemd-journald/journald.conf (renamed from src/journal/journald.conf)0
-rw-r--r--src/grp-journal/systemd-journald/journald.conf.xml (renamed from man/journald.conf.xml)0
-rw-r--r--src/grp-journal/systemd-journald/systemd-journald-audit.socket (renamed from units/systemd-journald-audit.socket)0
-rw-r--r--src/grp-journal/systemd-journald/systemd-journald-dev-log.socket (renamed from units/systemd-journald-dev-log.socket)0
-rw-r--r--src/grp-journal/systemd-journald/systemd-journald.service.in (renamed from units/systemd-journald.service.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd-journald.service.xml (renamed from man/systemd-journald.service.xml)0
-rw-r--r--src/grp-journal/systemd-journald/systemd-journald.socket (renamed from units/systemd-journald.socket)0
-rw-r--r--src/grp-journal/systemd-journald/systemd-journald.sysusers (renamed from sysusers.d/systemd-journald.conf)0
-rw-r--r--src/grp-journal/systemd-journald/systemd-journald.tmpfiles.m4 (renamed from tmpfiles.d/systemd-journald.conf.m4)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.be.catalog.in (renamed from catalog/systemd.be.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.be@latin.catalog.in (renamed from catalog/systemd.be@latin.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.bg.catalog.in (renamed from catalog/systemd.bg.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.catalog.in (renamed from catalog/systemd.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.da.catalog.in (renamed from catalog/systemd.da.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.fr.catalog.in (renamed from catalog/systemd.fr.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.hr.catalog.in (renamed from catalog/systemd.hr.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.hu.catalog.in (renamed from catalog/systemd.hu.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.it.catalog.in (renamed from catalog/systemd.it.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.ko.catalog.in (renamed from catalog/systemd.ko.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.pl.catalog.in (renamed from catalog/systemd.pl.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.pt_BR.catalog.in (renamed from catalog/systemd.pt_BR.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.ru.catalog.in (renamed from catalog/systemd.ru.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.sr.catalog.in (renamed from catalog/systemd.sr.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.zh_CN.catalog.in (renamed from catalog/systemd.zh_CN.catalog.in)0
-rw-r--r--src/grp-journal/systemd-journald/systemd.zh_TW.catalog.in (renamed from catalog/systemd.zh_TW.catalog.in)0
l---------src/grp-locale/GNUmakefile1
-rw-r--r--src/grp-locale/Makefile29
l---------src/grp-locale/localectl/GNUmakefile1
-rw-r--r--src/grp-locale/localectl/Makefile44
-rw-r--r--src/grp-locale/localectl/localectl.c (renamed from src/locale/localectl.c)28
-rw-r--r--src/grp-locale/localectl/localectl.completion.bash (renamed from shell-completion/bash/localectl)0
-rw-r--r--src/grp-locale/localectl/localectl.completion.zsh (renamed from shell-completion/zsh/_localectl)0
-rw-r--r--src/grp-locale/localectl/localectl.xml (renamed from man/localectl.xml)0
-rw-r--r--src/grp-locale/systemd-localed/.gitignore (renamed from src/locale/.gitignore)0
l---------src/grp-locale/systemd-localed/GNUmakefile1
-rw-r--r--src/grp-locale/systemd-localed/Makefile89
-rw-r--r--src/grp-locale/systemd-localed/kbd-model-map (renamed from src/locale/kbd-model-map)0
-rw-r--r--src/grp-locale/systemd-localed/keymap-util.c (renamed from src/locale/keymap-util.c)21
-rw-r--r--src/grp-locale/systemd-localed/keymap-util.h (renamed from src/locale/keymap-util.h)2
-rw-r--r--src/grp-locale/systemd-localed/language-fallback-map (renamed from src/locale/language-fallback-map)0
-rw-r--r--src/grp-locale/systemd-localed/localed.c (renamed from src/locale/localed.c)29
-rw-r--r--src/grp-locale/systemd-localed/org.freedesktop.locale1.conf (renamed from src/locale/org.freedesktop.locale1.conf)0
-rw-r--r--src/grp-locale/systemd-localed/org.freedesktop.locale1.policy.in (renamed from src/locale/org.freedesktop.locale1.policy.in)0
-rw-r--r--src/grp-locale/systemd-localed/org.freedesktop.locale1.service (renamed from src/locale/org.freedesktop.locale1.service)0
-rw-r--r--src/grp-locale/systemd-localed/systemd-localed.service.in (renamed from units/systemd-localed.service.in)0
-rw-r--r--src/grp-locale/systemd-localed/systemd-localed.service.xml (renamed from man/systemd-localed.service.xml)0
-rw-r--r--src/grp-locale/systemd-localed/test-keymap-util.c (renamed from src/locale/test-keymap-util.c)7
-rw-r--r--src/grp-login/.gitignore (renamed from src/login/.gitignore)0
l---------src/grp-login/GNUmakefile1
-rw-r--r--src/grp-login/Makefile63
l---------src/grp-login/loginctl/GNUmakefile1
-rw-r--r--src/grp-login/loginctl/Makefile42
-rw-r--r--src/grp-login/loginctl/loginctl.c (renamed from src/login/loginctl.c)45
-rw-r--r--src/grp-login/loginctl/loginctl.completion.bash (renamed from shell-completion/bash/loginctl)0
-rw-r--r--src/grp-login/loginctl/loginctl.completion.zsh (renamed from shell-completion/zsh/_loginctl)0
-rw-r--r--src/grp-login/loginctl/loginctl.xml (renamed from man/loginctl.xml)0
-rw-r--r--src/grp-login/loginctl/sysfs-show.c (renamed from src/login/sysfs-show.c)17
-rw-r--r--src/grp-login/loginctl/sysfs-show.h (renamed from src/login/sysfs-show.h)0
l---------src/grp-login/pam_systemd/GNUmakefile1
-rw-r--r--src/grp-login/pam_systemd/Makefile57
-rw-r--r--src/grp-login/pam_systemd/pam_systemd.c (renamed from src/login/pam_systemd.c)34
-rw-r--r--src/grp-login/pam_systemd/pam_systemd.sym (renamed from src/login/pam_systemd.sym)0
-rw-r--r--src/grp-login/pam_systemd/pam_systemd.xml (renamed from man/pam_systemd.xml)0
-rw-r--r--src/grp-login/pam_systemd/systemd-user.pam.m4 (renamed from src/login/systemd-user.m4)0
l---------src/grp-login/systemd-inhibit/GNUmakefile1
-rw-r--r--src/grp-login/systemd-inhibit/Makefile37
-rw-r--r--src/grp-login/systemd-inhibit/inhibit.c (renamed from src/login/inhibit.c)24
-rw-r--r--src/grp-login/systemd-inhibit/systemd-inhibit.completion.zsh (renamed from shell-completion/zsh/_systemd-inhibit)0
-rw-r--r--src/grp-login/systemd-inhibit/systemd-inhibit.xml (renamed from man/systemd-inhibit.xml)0
-rw-r--r--src/grp-login/systemd-logind/70-power-switch.rules (renamed from src/login/70-power-switch.rules)0
-rw-r--r--src/grp-login/systemd-logind/70-uaccess.rules (renamed from src/login/70-uaccess.rules)0
-rw-r--r--src/grp-login/systemd-logind/71-seat.rules.in (renamed from src/login/71-seat.rules.in)0
-rw-r--r--src/grp-login/systemd-logind/73-seat-late.rules.in (renamed from src/login/73-seat-late.rules.in)0
l---------src/grp-login/systemd-logind/GNUmakefile1
-rw-r--r--src/grp-login/systemd-logind/Makefile132
-rw-r--r--src/grp-login/systemd-logind/logind-acl.c (renamed from src/login/logind-acl.c)21
-rw-r--r--src/grp-login/systemd-logind/logind-acl.h (renamed from src/login/logind-acl.h)2
-rw-r--r--src/grp-login/systemd-logind/logind-action.c (renamed from src/login/logind-action.c)23
-rw-r--r--src/grp-login/systemd-logind/logind-action.h (renamed from src/login/logind-action.h)0
-rw-r--r--src/grp-login/systemd-logind/logind-button.c (renamed from src/login/logind-button.c)12
-rw-r--r--src/grp-login/systemd-logind/logind-button.h (renamed from src/login/logind-button.h)0
-rw-r--r--src/grp-login/systemd-logind/logind-core.c (renamed from src/login/logind-core.c)20
-rw-r--r--src/grp-login/systemd-logind/logind-dbus.c (renamed from src/login/logind-dbus.c)53
-rw-r--r--src/grp-login/systemd-logind/logind-device.c (renamed from src/login/logind-device.c)5
-rw-r--r--src/grp-login/systemd-logind/logind-device.h (renamed from src/login/logind-device.h)3
-rw-r--r--src/grp-login/systemd-logind/logind-gperf.gperf (renamed from src/login/logind-gperf.gperf)4
-rw-r--r--src/grp-login/systemd-logind/logind-inhibit.c (renamed from src/login/logind-inhibit.c)23
-rw-r--r--src/grp-login/systemd-logind/logind-inhibit.h (renamed from src/login/logind-inhibit.h)0
-rw-r--r--src/grp-login/systemd-logind/logind-seat-dbus.c (renamed from src/login/logind-seat-dbus.c)15
-rw-r--r--src/grp-login/systemd-logind/logind-seat.c (renamed from src/login/logind-seat.c)23
-rw-r--r--src/grp-login/systemd-logind/logind-seat.h (renamed from src/login/logind-seat.h)3
-rw-r--r--src/grp-login/systemd-logind/logind-session-dbus.c (renamed from src/login/logind-session-dbus.c)17
-rw-r--r--src/grp-login/systemd-logind/logind-session-device.c (renamed from src/login/logind-session-device.c)16
-rw-r--r--src/grp-login/systemd-logind/logind-session-device.h (renamed from src/login/logind-session-device.h)3
-rw-r--r--src/grp-login/systemd-logind/logind-session.c (renamed from src/login/logind-session.c)42
-rw-r--r--src/grp-login/systemd-logind/logind-session.h (renamed from src/login/logind-session.h)7
-rw-r--r--src/grp-login/systemd-logind/logind-user-dbus.c (renamed from src/login/logind-user-dbus.c)13
-rw-r--r--src/grp-login/systemd-logind/logind-user.c (renamed from src/login/logind-user.c)53
-rw-r--r--src/grp-login/systemd-logind/logind-user.h (renamed from src/login/logind-user.h)3
-rw-r--r--src/grp-login/systemd-logind/logind-utmp.c (renamed from src/login/logind-utmp.c)27
-rw-r--r--src/grp-login/systemd-logind/logind.c (renamed from src/login/logind.c)33
-rw-r--r--src/grp-login/systemd-logind/logind.conf.in (renamed from src/login/logind.conf.in)0
-rw-r--r--src/grp-login/systemd-logind/logind.conf.xml (renamed from man/logind.conf.xml)0
-rw-r--r--src/grp-login/systemd-logind/logind.h (renamed from src/login/logind.h)12
-rw-r--r--src/grp-login/systemd-logind/org.freedesktop.login1.conf (renamed from src/login/org.freedesktop.login1.conf)0
-rw-r--r--src/grp-login/systemd-logind/org.freedesktop.login1.policy.in (renamed from src/login/org.freedesktop.login1.policy.in)0
-rw-r--r--src/grp-login/systemd-logind/org.freedesktop.login1.service (renamed from src/login/org.freedesktop.login1.service)0
-rw-r--r--src/grp-login/systemd-logind/systemd-logind.service.in (renamed from units/systemd-logind.service.in)0
-rw-r--r--src/grp-login/systemd-logind/systemd-logind.service.xml (renamed from man/systemd-logind.service.xml)0
-rw-r--r--src/grp-login/systemd-logind/user.slice (renamed from units/user.slice)0
-rw-r--r--src/grp-login/test-inhibit.c (renamed from src/login/test-inhibit.c)10
-rw-r--r--src/grp-login/test-login-shared.c (renamed from src/login/test-login-shared.c)4
-rw-r--r--src/grp-login/test-login-tables.c (renamed from src/login/test-login-tables.c)2
l---------src/grp-machine/GNUmakefile1
-rw-r--r--src/grp-machine/Makefile32
l---------src/grp-machine/grp-import/GNUmakefile1
-rw-r--r--src/grp-machine/grp-import/Makefile32
l---------src/grp-machine/grp-import/libimport/GNUmakefile1
-rw-r--r--src/grp-machine/grp-import/libimport/Makefile41
-rw-r--r--src/grp-machine/grp-import/libimport/import-common.c (renamed from src/import/import-common.c)11
-rw-r--r--src/grp-machine/grp-import/libimport/import-common.h (renamed from src/import/import-common.h)0
-rw-r--r--src/grp-machine/grp-import/libimport/import-compress.c (renamed from src/import/import-compress.c)5
-rw-r--r--src/grp-machine/grp-import/libimport/import-compress.h (renamed from src/import/import-compress.h)2
-rw-r--r--src/grp-machine/grp-import/libimport/qcow2-util.c (renamed from src/import/qcow2-util.c)9
-rw-r--r--src/grp-machine/grp-import/libimport/qcow2-util.h (renamed from src/import/qcow2-util.h)0
-rw-r--r--src/grp-machine/grp-import/libimport/test-qcow2.c (renamed from src/import/test-qcow2.c)7
l---------src/grp-machine/grp-import/systemd-export/GNUmakefile1
-rw-r--r--src/grp-machine/grp-import/systemd-export/Makefile50
-rw-r--r--src/grp-machine/grp-import/systemd-export/export-raw.c (renamed from src/import/export-raw.c)23
-rw-r--r--src/grp-machine/grp-import/systemd-export/export-raw.h (renamed from src/import/export-raw.h)5
-rw-r--r--src/grp-machine/grp-import/systemd-export/export-tar.c (renamed from src/import/export-tar.c)21
-rw-r--r--src/grp-machine/grp-import/systemd-export/export-tar.h (renamed from src/import/export-tar.h)5
-rw-r--r--src/grp-machine/grp-import/systemd-export/export.c (renamed from src/import/export.c)21
l---------src/grp-machine/grp-import/systemd-import/GNUmakefile1
-rw-r--r--src/grp-machine/grp-import/systemd-import/Makefile51
-rw-r--r--src/grp-machine/grp-import/systemd-import/import-raw.c (renamed from src/import/import-raw.c)41
-rw-r--r--src/grp-machine/grp-import/systemd-import/import-raw.h (renamed from src/import/import-raw.h)7
-rw-r--r--src/grp-machine/grp-import/systemd-import/import-tar.c (renamed from src/import/import-tar.c)41
-rw-r--r--src/grp-machine/grp-import/systemd-import/import-tar.h (renamed from src/import/import-tar.h)7
-rw-r--r--src/grp-machine/grp-import/systemd-import/import.c (renamed from src/import/import.c)21
-rw-r--r--src/grp-machine/grp-import/systemd-importd/.gitignore (renamed from src/import/.gitignore)0
l---------src/grp-machine/grp-import/systemd-importd/GNUmakefile1
-rw-r--r--src/grp-machine/grp-import/systemd-importd/Makefile65
-rw-r--r--src/grp-machine/grp-import/systemd-importd/importd.c (renamed from src/import/importd.c)46
-rw-r--r--src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.conf (renamed from src/import/org.freedesktop.import1.conf)0
-rw-r--r--src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.policy.in (renamed from src/import/org.freedesktop.import1.policy.in)0
-rw-r--r--src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.service (renamed from src/import/org.freedesktop.import1.service)0
-rw-r--r--src/grp-machine/grp-import/systemd-importd/systemd-importd.service.in (renamed from units/systemd-importd.service.in)0
-rw-r--r--src/grp-machine/grp-import/systemd-importd/systemd-importd.service.xml (renamed from man/systemd-importd.service.xml)0
l---------src/grp-machine/grp-import/systemd-pull/GNUmakefile1
-rw-r--r--src/grp-machine/grp-import/systemd-pull/Makefile66
-rw-r--r--src/grp-machine/grp-import/systemd-pull/curl-util.c (renamed from src/import/curl-util.c)7
-rw-r--r--src/grp-machine/grp-import/systemd-pull/curl-util.h (renamed from src/import/curl-util.h)4
-rw-r--r--src/grp-machine/grp-import/systemd-pull/import-pubring.gpg (renamed from src/import/import-pubring.gpg)bin9551 -> 9551 bytes
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-common.c (renamed from src/import/pull-common.c)35
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-common.h (renamed from src/import/pull-common.h)3
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-job.c (renamed from src/import/pull-job.c)19
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-job.h (renamed from src/import/pull-job.h)6
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-raw.c (renamed from src/import/pull-raw.c)46
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-raw.h (renamed from src/import/pull-raw.h)7
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-tar.c (renamed from src/import/pull-tar.c)41
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-tar.h (renamed from src/import/pull-tar.h)7
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull.c (renamed from src/import/pull.c)21
l---------src/grp-machine/libmachine-core/GNUmakefile1
-rw-r--r--src/grp-machine/libmachine-core/Makefile29
-rw-r--r--src/grp-machine/libmachine-core/include/machine-core/image-dbus.h (renamed from src/machine/image-dbus.h)0
-rw-r--r--src/grp-machine/libmachine-core/include/machine-core/machine-dbus.h (renamed from src/machine/machine-dbus.h)2
-rw-r--r--src/grp-machine/libmachine-core/include/machine-core/machine.h (renamed from src/machine/machine.h)5
-rw-r--r--src/grp-machine/libmachine-core/include/machine-core/machined.h (renamed from src/machine/machined.h)8
-rw-r--r--src/grp-machine/libmachine-core/include/machine-core/operation.h (renamed from src/machine/operation.h)6
l---------src/grp-machine/libmachine-core/src/GNUmakefile1
-rw-r--r--src/grp-machine/libmachine-core/src/Makefile43
-rw-r--r--src/grp-machine/libmachine-core/src/image-dbus.c (renamed from src/machine/image-dbus.c)20
-rw-r--r--src/grp-machine/libmachine-core/src/machine-dbus.c (renamed from src/machine/machine-dbus.c)44
-rw-r--r--src/grp-machine/libmachine-core/src/machine.c (renamed from src/machine/machine.c)42
-rw-r--r--src/grp-machine/libmachine-core/src/machined-dbus.c (renamed from src/machine/machined-dbus.c)46
-rw-r--r--src/grp-machine/libmachine-core/src/operation.c (renamed from src/machine/operation.c)8
l---------src/grp-machine/libmachine-core/test/GNUmakefile1
-rw-r--r--src/grp-machine/libmachine-core/test/Makefile35
-rw-r--r--src/grp-machine/libmachine-core/test/test-machine-tables.c (renamed from src/machine/test-machine-tables.c)4
l---------src/grp-machine/machinectl/GNUmakefile1
-rw-r--r--src/grp-machine/machinectl/Makefile42
-rw-r--r--src/grp-machine/machinectl/machinectl.c (renamed from src/machine/machinectl.c)64
-rw-r--r--src/grp-machine/machinectl/machinectl.completion.bash (renamed from shell-completion/bash/machinectl)0
-rw-r--r--src/grp-machine/machinectl/machinectl.completion.zsh (renamed from shell-completion/zsh/_machinectl)0
-rw-r--r--src/grp-machine/machinectl/machinectl.xml (renamed from man/machinectl.xml)0
l---------src/grp-machine/nss-mymachines/GNUmakefile1
-rw-r--r--src/grp-machine/nss-mymachines/Makefile45
-rw-r--r--src/grp-machine/nss-mymachines/nss-mymachines.c (renamed from src/nss-mymachines/nss-mymachines.c)28
-rw-r--r--src/grp-machine/nss-mymachines/nss-mymachines.sym (renamed from src/nss-mymachines/nss-mymachines.sym)0
-rw-r--r--src/grp-machine/nss-mymachines/nss-mymachines.xml (renamed from man/nss-mymachines.xml)0
-rw-r--r--src/grp-machine/systemd-machined/.gitignore (renamed from src/machine/.gitignore)0
l---------src/grp-machine/systemd-machined/GNUmakefile1
-rw-r--r--src/grp-machine/systemd-machined/Makefile75
-rw-r--r--src/grp-machine/systemd-machined/machine.slice (renamed from units/machine.slice)0
-rw-r--r--src/grp-machine/systemd-machined/machined.c (renamed from src/machine/machined.c)28
-rw-r--r--src/grp-machine/systemd-machined/org.freedesktop.machine1.conf (renamed from src/machine/org.freedesktop.machine1.conf)0
-rw-r--r--src/grp-machine/systemd-machined/org.freedesktop.machine1.policy.in (renamed from src/machine/org.freedesktop.machine1.policy.in)0
-rw-r--r--src/grp-machine/systemd-machined/org.freedesktop.machine1.service (renamed from src/machine/org.freedesktop.machine1.service)0
-rw-r--r--src/grp-machine/systemd-machined/systemd-machined.service.in (renamed from units/systemd-machined.service.in)0
-rw-r--r--src/grp-machine/systemd-machined/systemd-machined.service.xml (renamed from man/systemd-machined.service.xml)0
-rw-r--r--src/grp-network/90-networkd.preset (renamed from system-preset/90-networkd.preset)0
l---------src/grp-network/GNUmakefile1
-rw-r--r--src/grp-network/Makefile85
-rw-r--r--src/grp-network/libnetworkd-core/.gitignore (renamed from src/network/.gitignore)0
l---------src/grp-network/libnetworkd-core/GNUmakefile1
-rw-r--r--src/grp-network/libnetworkd-core/Makefile99
-rw-r--r--src/grp-network/libnetworkd-core/networkd-address-pool.c (renamed from src/network/networkd-address-pool.c)7
-rw-r--r--src/grp-network/libnetworkd-core/networkd-address-pool.h (renamed from src/network/networkd-address-pool.h)7
-rw-r--r--src/grp-network/libnetworkd-core/networkd-address.c (renamed from src/network/networkd-address.c)21
-rw-r--r--src/grp-network/libnetworkd-core/networkd-address.h (renamed from src/network/networkd-address.h)2
-rw-r--r--src/grp-network/libnetworkd-core/networkd-brvlan.c (renamed from src/network/networkd-brvlan.c)14
-rw-r--r--src/grp-network/libnetworkd-core/networkd-brvlan.h (renamed from src/network/networkd-brvlan.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-conf.c (renamed from src/network/networkd-conf.c)11
-rw-r--r--src/grp-network/libnetworkd-core/networkd-conf.h (renamed from src/network/networkd-conf.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-dhcp4.c (renamed from src/network/networkd-dhcp4.c)10
-rw-r--r--src/grp-network/libnetworkd-core/networkd-dhcp6.c (renamed from src/network/networkd-dhcp6.c)5
-rw-r--r--src/grp-network/libnetworkd-core/networkd-fdb.c (renamed from src/network/networkd-fdb.c)11
-rw-r--r--src/grp-network/libnetworkd-core/networkd-fdb.h (renamed from src/network/networkd-fdb.h)4
-rw-r--r--src/grp-network/libnetworkd-core/networkd-gperf.gperf (renamed from src/network/networkd-gperf.gperf)4
-rw-r--r--src/grp-network/libnetworkd-core/networkd-ipv4ll.c (renamed from src/network/networkd-ipv4ll.c)4
-rw-r--r--src/grp-network/libnetworkd-core/networkd-link-bus.c (renamed from src/network/networkd-link-bus.c)9
-rw-r--r--src/grp-network/libnetworkd-core/networkd-link.c (renamed from src/network/networkd-link.c)32
-rw-r--r--src/grp-network/libnetworkd-core/networkd-link.h (renamed from src/network/networkd-link.h)22
-rw-r--r--src/grp-network/libnetworkd-core/networkd-lldp-tx.c (renamed from src/network/networkd-lldp-tx.c)19
-rw-r--r--src/grp-network/libnetworkd-core/networkd-lldp-tx.h (renamed from src/network/networkd-lldp-tx.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-manager-bus.c (renamed from src/network/networkd-manager-bus.c)5
-rw-r--r--src/grp-network/libnetworkd-core/networkd-manager.c (renamed from src/network/networkd-manager.c)34
-rw-r--r--src/grp-network/libnetworkd-core/networkd-ndisc.c (renamed from src/network/networkd-ndisc.c)4
-rw-r--r--src/grp-network/libnetworkd-core/networkd-ndisc.h (renamed from src/network/networkd-ndisc.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-bond.c (renamed from src/network/networkd-netdev-bond.c)15
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-bond.h (renamed from src/network/networkd-netdev-bond.h)4
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-bridge.c (renamed from src/network/networkd-netdev-bridge.c)7
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-bridge.h (renamed from src/network/networkd-netdev-bridge.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-dummy.c (renamed from src/network/networkd-netdev-dummy.c)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-dummy.h (renamed from src/network/networkd-netdev-dummy.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-gperf.gperf (renamed from src/network/networkd-netdev-gperf.gperf)10
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c (renamed from src/network/networkd-netdev-ipvlan.c)5
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h (renamed from src/network/networkd-netdev-ipvlan.h)3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c (renamed from src/network/networkd-netdev-macvlan.c)5
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-macvlan.h (renamed from src/network/networkd-netdev-macvlan.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c (renamed from src/network/networkd-netdev-tunnel.c)15
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-tunnel.h (renamed from src/network/networkd-netdev-tunnel.h)2
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c (renamed from src/network/networkd-netdev-tuntap.c)10
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-tuntap.h (renamed from src/network/networkd-netdev-tuntap.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vcan.c (renamed from src/network/networkd-netdev-vcan.c)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vcan.h (renamed from src/network/networkd-netdev-vcan.h)4
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-veth.c (renamed from src/network/networkd-netdev-veth.c)3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-veth.h (renamed from src/network/networkd-netdev-veth.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vlan.c (renamed from src/network/networkd-netdev-vlan.c)3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vlan.h (renamed from src/network/networkd-netdev-vlan.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vrf.c (renamed from src/network/networkd-netdev-vrf.c)5
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vrf.h (renamed from src/network/networkd-netdev-vrf.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c (renamed from src/network/networkd-netdev-vxlan.c)13
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h (renamed from src/network/networkd-netdev-vxlan.h)3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev.c (renamed from src/network/networkd-netdev.c)23
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev.h (renamed from src/network/networkd-netdev.h)7
-rw-r--r--src/grp-network/libnetworkd-core/networkd-network-bus.c (renamed from src/network/networkd-network-bus.c)7
-rw-r--r--src/grp-network/libnetworkd-core/networkd-network-gperf.gperf (renamed from src/network/networkd-network-gperf.gperf)10
-rw-r--r--src/grp-network/libnetworkd-core/networkd-network.c (renamed from src/network/networkd-network.c)27
-rw-r--r--src/grp-network/libnetworkd-core/networkd-network.h (renamed from src/network/networkd-network.h)12
-rw-r--r--src/grp-network/libnetworkd-core/networkd-route.c (renamed from src/network/networkd-route.c)19
-rw-r--r--src/grp-network/libnetworkd-core/networkd-route.h (renamed from src/network/networkd-route.h)0
-rw-r--r--src/grp-network/libnetworkd-core/networkd-util.c (renamed from src/network/networkd-util.c)11
-rw-r--r--src/grp-network/libnetworkd-core/networkd-util.h (renamed from src/network/networkd-util.h)2
-rw-r--r--src/grp-network/libnetworkd-core/networkd.h (renamed from src/network/networkd.h)16
-rw-r--r--src/grp-network/network/80-container-host0.network (renamed from network/80-container-host0.network)0
-rw-r--r--src/grp-network/network/80-container-ve.network (renamed from network/80-container-ve.network)0
-rw-r--r--src/grp-network/network/80-container-vz.network (renamed from network/80-container-vz.network)0
-rw-r--r--src/grp-network/network/99-default.link (renamed from network/99-default.link)0
l---------src/grp-network/networkctl/GNUmakefile1
-rw-r--r--src/grp-network/networkctl/Makefile39
-rw-r--r--src/grp-network/networkctl/networkctl.c (renamed from src/network/networkctl.c)53
-rw-r--r--src/grp-network/networkctl/networkctl.completion.bash (renamed from shell-completion/bash/networkctl)0
-rw-r--r--src/grp-network/networkctl/networkctl.completion.zsh (renamed from shell-completion/zsh/_networkctl)0
-rw-r--r--src/grp-network/networkctl/networkctl.xml (renamed from man/networkctl.xml)0
l---------src/grp-network/systemd-networkd-wait-online/GNUmakefile1
-rw-r--r--src/grp-network/systemd-networkd-wait-online/Makefile43
-rw-r--r--src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.c (renamed from src/network/networkd-wait-online-link.c)6
-rw-r--r--src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.h (renamed from src/network/networkd-wait-online-link.h)0
-rw-r--r--src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c (renamed from src/network/networkd-wait-online-manager.c)14
-rw-r--r--src/grp-network/systemd-networkd-wait-online/networkd-wait-online.c (renamed from src/network/networkd-wait-online.c)7
-rw-r--r--src/grp-network/systemd-networkd-wait-online/networkd-wait-online.h (renamed from src/network/networkd-wait-online.h)8
-rw-r--r--src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in (renamed from units/systemd-networkd-wait-online.service.in)0
-rw-r--r--src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.xml (renamed from man/systemd-networkd-wait-online.service.xml)0
l---------src/grp-network/systemd-networkd/GNUmakefile1
-rw-r--r--src/grp-network/systemd-networkd/Makefile67
-rw-r--r--src/grp-network/systemd-networkd/networkd.c (renamed from src/network/networkd.c)10
-rw-r--r--src/grp-network/systemd-networkd/networkd.conf.xml (renamed from man/networkd.conf.xml)0
-rw-r--r--src/grp-network/systemd-networkd/org.freedesktop.network1.conf (renamed from src/network/org.freedesktop.network1.conf)0
-rw-r--r--src/grp-network/systemd-networkd/org.freedesktop.network1.service (renamed from src/network/org.freedesktop.network1.service)0
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.service.m4.in (renamed from units/systemd-networkd.service.m4.in)0
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.service.xml (renamed from man/systemd-networkd.service.xml)0
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.socket (renamed from units/systemd-networkd.socket)0
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.sysusers (renamed from sysusers.d/systemd-networkd.conf)0
-rw-r--r--src/grp-network/systemd-networkd/systemd-networkd.tmpfiles (renamed from tmpfiles.d/systemd-networkd.conf)0
-rw-r--r--src/grp-network/test-network-tables.c (renamed from src/network/test-network-tables.c)8
-rw-r--r--src/grp-network/test-network.c (renamed from src/network/test-network.c)6
-rw-r--r--src/grp-network/test-networkd-conf.c (renamed from src/network/test-networkd-conf.c)13
-rw-r--r--src/grp-resolve/90-resolved.preset (renamed from system-preset/90-resolved.preset)0
l---------src/grp-resolve/GNUmakefile1
-rw-r--r--src/grp-resolve/Makefile31
l---------src/grp-resolve/libbasic-dns/GNUmakefile1
-rw-r--r--src/grp-resolve/libbasic-dns/Makefile29
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/dns-type.h (renamed from src/resolve/dns-type.h)2
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-def.h (renamed from src/resolve/resolved-def.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-answer.h (renamed from src/resolve/resolved-dns-answer.h)3
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-dnssec.h (renamed from src/resolve/resolved-dns-dnssec.h)3
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-packet.h (renamed from src/resolve/resolved-dns-packet.h)10
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-question.h (renamed from src/resolve/resolved-dns-question.h)3
-rw-r--r--src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-rr.h (renamed from src/resolve/resolved-dns-rr.h)11
l---------src/grp-resolve/libbasic-dns/src/GNUmakefile1
-rw-r--r--src/grp-resolve/libbasic-dns/src/Makefile52
-rw-r--r--src/grp-resolve/libbasic-dns/src/dns-type.c (renamed from src/resolve/dns-type.c)6
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-answer.c (renamed from src/resolve/resolved-dns-answer.c)10
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-dnssec.c (renamed from src/resolve/resolved-dns-dnssec.c)14
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-packet.c (renamed from src/resolve/resolved-dns-packet.c)16
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-question.c (renamed from src/resolve/resolved-dns-question.c)8
-rw-r--r--src/grp-resolve/libbasic-dns/src/resolved-dns-rr.c (renamed from src/resolve/resolved-dns-rr.c)24
l---------src/grp-resolve/libbasic-dns/test/GNUmakefile1
-rw-r--r--src/grp-resolve/libbasic-dns/test/Makefile97
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/_443._tcp.fedoraproject.org.pkts (renamed from src/resolve/test-data/_443._tcp.fedoraproject.org.pkts)bin169 -> 169 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/_openpgpkey.fedoraproject.org.pkts (renamed from src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts)bin986 -> 986 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/fake-caa.pkts (renamed from src/resolve/test-data/fake-caa.pkts)bin196 -> 196 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/fedoraproject.org.pkts (renamed from src/resolve/test-data/fedoraproject.org.pkts)bin1483 -> 1483 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/gandi.net.pkts (renamed from src/resolve/test-data/gandi.net.pkts)bin1010 -> 1010 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/google.com.pkts (renamed from src/resolve/test-data/google.com.pkts)bin747 -> 747 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/kyhwana.org.pkts (renamed from src/resolve/test-data/kyhwana.org.pkts)bin1803 -> 1803 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/root.pkts (renamed from src/resolve/test-data/root.pkts)bin1061 -> 1061 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts (renamed from src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts)bin330 -> 330 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/teamits.com.pkts (renamed from src/resolve/test-data/teamits.com.pkts)bin1021 -> 1021 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-data/zbyszek@fedoraproject.org.pkts (renamed from src/resolve/test-data/zbyszek@fedoraproject.org.pkts)bin2533 -> 2533 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-dns-packet.c (renamed from src/resolve/test-dns-packet.c)22
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-dnssec-complex.c (renamed from src/resolve/test-dnssec-complex.c)18
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-dnssec.c (renamed from src/resolve/test-dnssec.c)10
-rw-r--r--src/grp-resolve/libbasic-dns/test/test-resolve-tables.c (renamed from src/resolve/test-resolve-tables.c)4
l---------src/grp-resolve/nss-resolve/GNUmakefile1
-rw-r--r--src/grp-resolve/nss-resolve/Makefile46
-rw-r--r--src/grp-resolve/nss-resolve/nss-resolve.c (renamed from src/nss-resolve/nss-resolve.c)18
-rw-r--r--src/grp-resolve/nss-resolve/nss-resolve.sym (renamed from src/nss-resolve/nss-resolve.sym)0
-rw-r--r--src/grp-resolve/nss-resolve/nss-resolve.xml (renamed from man/nss-resolve.xml)0
l---------src/grp-resolve/systemd-resolve/GNUmakefile1
-rw-r--r--src/grp-resolve/systemd-resolve/Makefile53
-rw-r--r--src/grp-resolve/systemd-resolve/resolve-tool.c (renamed from src/resolve/resolve-tool.c)34
-rw-r--r--src/grp-resolve/systemd-resolve/systemd-resolve.completion.bash (renamed from shell-completion/bash/systemd-resolve)0
-rw-r--r--src/grp-resolve/systemd-resolve/systemd-resolve.completion.zsh (renamed from shell-completion/zsh/_systemd-resolve)0
-rw-r--r--src/grp-resolve/systemd-resolve/systemd-resolve.xml (renamed from man/systemd-resolve.xml)0
-rw-r--r--src/grp-resolve/systemd-resolved/.gitignore (renamed from src/resolve/.gitignore)0
l---------src/grp-resolve/systemd-resolved/GNUmakefile1
-rw-r--r--src/grp-resolve/systemd-resolved/Makefile127
-rw-r--r--src/grp-resolve/systemd-resolved/RFCs (renamed from src/resolve/RFCs)0
-rw-r--r--src/grp-resolve/systemd-resolved/dnssec-trust-anchors.d.xml (renamed from man/dnssec-trust-anchors.d.xml)0
-rw-r--r--src/grp-resolve/systemd-resolved/org.freedesktop.resolve1.conf (renamed from src/resolve/org.freedesktop.resolve1.conf)0
-rw-r--r--src/grp-resolve/systemd-resolved/org.freedesktop.resolve1.service (renamed from src/resolve/org.freedesktop.resolve1.service)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolv.conf (renamed from src/resolve/resolv.conf)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-bus.c (renamed from src/resolve/resolved-bus.c)11
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-bus.h (renamed from src/resolve/resolved-bus.h)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-conf.c (renamed from src/resolve/resolved-conf.c)15
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-conf.h (renamed from src/resolve/resolved-conf.h)2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-cache.c (renamed from src/resolve/resolved-dns-cache.c)13
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-cache.h (renamed from src/resolve/resolved-dns-cache.h)16
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.c (renamed from src/resolve/resolved-dns-query.c)13
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.h (renamed from src/resolve/resolved-dns-query.h)12
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-scope.c (renamed from src/resolve/resolved-dns-scope.c)19
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-scope.h (renamed from src/resolve/resolved-dns-scope.h)6
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c (renamed from src/resolve/resolved-dns-search-domain.c)5
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-search-domain.h (renamed from src/resolve/resolved-dns-search-domain.h)2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-server.c (renamed from src/resolve/resolved-dns-server.c)11
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-server.h (renamed from src/resolve/resolved-dns-server.h)2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-stream.c (renamed from src/resolve/resolved-dns-stream.c)9
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-stream.h (renamed from src/resolve/resolved-dns-stream.h)4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-stub.c (renamed from src/resolve/resolved-dns-stub.c)5
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-stub.h (renamed from src/resolve/resolved-dns-stub.h)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c (renamed from src/resolve/resolved-dns-synthesize.c)7
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h (renamed from src/resolve/resolved-dns-synthesize.h)5
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-transaction.c (renamed from src/resolve/resolved-dns-transaction.c)19
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-transaction.h (renamed from src/resolve/resolved-dns-transaction.h)7
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c (renamed from src/resolve/resolved-dns-trust-anchor.c)29
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h (renamed from src/resolve/resolved-dns-trust-anchor.h)8
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-zone.c (renamed from src/resolve/resolved-dns-zone.c)11
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-zone.h (renamed from src/resolve/resolved-dns-zone.h)11
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-etc-hosts.c (renamed from src/resolve/resolved-etc-hosts.c)15
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-etc-hosts.h (renamed from src/resolve/resolved-etc-hosts.h)5
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-gperf.gperf (renamed from src/resolve/resolved-gperf.gperf)4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-link-bus.c (renamed from src/resolve/resolved-link-bus.c)13
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-link-bus.h (renamed from src/resolve/resolved-link-bus.h)2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-link.c (renamed from src/resolve/resolved-link.c)20
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-link.h (renamed from src/resolve/resolved-link.h)8
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-llmnr.c (renamed from src/resolve/resolved-llmnr.c)3
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-llmnr.h (renamed from src/resolve/resolved-llmnr.h)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-manager.c (renamed from src/resolve/resolved-manager.c)35
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-manager.h (renamed from src/resolve/resolved-manager.h)16
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-mdns.c (renamed from src/resolve/resolved-mdns.c)7
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-mdns.h (renamed from src/resolve/resolved-mdns.h)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-resolv-conf.c (renamed from src/resolve/resolved-resolv-conf.c)17
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-resolv-conf.h (renamed from src/resolve/resolved-resolv-conf.h)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolved.c (renamed from src/resolve/resolved.c)15
-rw-r--r--src/grp-resolve/systemd-resolved/resolved.conf.in (renamed from src/resolve/resolved.conf.in)0
-rw-r--r--src/grp-resolve/systemd-resolved/resolved.conf.xml (renamed from man/resolved.conf.xml)0
-rw-r--r--src/grp-resolve/systemd-resolved/systemd-resolved.service.m4.in (renamed from units/systemd-resolved.service.m4.in)0
-rw-r--r--src/grp-resolve/systemd-resolved/systemd-resolved.service.xml (renamed from man/systemd-resolved.service.xml)0
-rw-r--r--src/grp-resolve/systemd-resolved/systemd-resolved.sysusers (renamed from sysusers.d/systemd-resolved.conf)0
-rw-r--r--src/grp-resolve/systemd-resolved/systemd-resolved.tmpfiles (renamed from tmpfiles.d/systemd-resolved.conf)0
-rw-r--r--src/grp-system/90-systemd.preset (renamed from system-preset/90-systemd.preset)0
l---------src/grp-system/GNUmakefile1
-rw-r--r--src/grp-system/Makefile33
-rw-r--r--src/grp-system/bootup.xml (renamed from man/bootup.xml)0
l---------src/grp-system/grp-utils/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/Makefile32
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/.gitignore (renamed from src/analyze/.gitignore)0
l---------src/grp-system/grp-utils/systemd-analyze/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/Makefile39
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/analyze-verify.c (renamed from src/analyze/analyze-verify.c)19
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/analyze-verify.h (renamed from src/analyze/analyze-verify.h)2
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/analyze.c (renamed from src/analyze/analyze.c)35
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/systemd-analyze.completion.bash (renamed from shell-completion/bash/systemd-analyze)0
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/systemd-analyze.completion.zsh (renamed from shell-completion/zsh/_systemd-analyze)0
-rw-r--r--src/grp-system/grp-utils/systemd-analyze/systemd-analyze.xml (renamed from man/systemd-analyze.xml)0
l---------src/grp-system/grp-utils/systemd-delta/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-delta/Makefile33
-rw-r--r--src/grp-system/grp-utils/systemd-delta/delta.c (renamed from src/delta/delta.c)34
-rw-r--r--src/grp-system/grp-utils/systemd-delta/systemd-delta.completion.bash (renamed from shell-completion/bash/systemd-delta)0
-rw-r--r--src/grp-system/grp-utils/systemd-delta/systemd-delta.completion.zsh (renamed from shell-completion/zsh/_systemd-delta)0
-rw-r--r--src/grp-system/grp-utils/systemd-delta/systemd-delta.xml (renamed from man/systemd-delta.xml)0
l---------src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-fstab-generator/Makefile34
-rw-r--r--src/grp-system/grp-utils/systemd-fstab-generator/fstab-generator.c (renamed from src/fstab-generator/fstab-generator.c)38
-rw-r--r--src/grp-system/grp-utils/systemd-fstab-generator/systemd-fstab-generator.xml (renamed from man/systemd-fstab-generator.xml)0
l---------src/grp-system/grp-utils/systemd-run/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-run/Makefile33
-rw-r--r--src/grp-system/grp-utils/systemd-run/run.c (renamed from src/run/run.c)42
-rw-r--r--src/grp-system/grp-utils/systemd-run/systemd-run.completion.bash (renamed from shell-completion/bash/systemd-run)0
-rw-r--r--src/grp-system/grp-utils/systemd-run/systemd-run.completion.zsh (renamed from shell-completion/zsh/_systemd-run)0
-rw-r--r--src/grp-system/grp-utils/systemd-run/systemd-run.xml (renamed from man/systemd-run.xml)0
-rw-r--r--src/grp-system/grp-utils/systemd-sysv-generator/.gitignore (renamed from docs/var-log/.gitignore)0
l---------src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile1
-rw-r--r--src/grp-system/grp-utils/systemd-sysv-generator/Makefile46
-rw-r--r--src/grp-system/grp-utils/systemd-sysv-generator/README.in (renamed from docs/sysvinit/README.in)0
-rw-r--r--src/grp-system/grp-utils/systemd-sysv-generator/systemd-sysv-generator.xml (renamed from man/systemd-sysv-generator.xml)0
-rw-r--r--src/grp-system/grp-utils/systemd-sysv-generator/sysv-generator.c (renamed from src/sysv-generator/sysv-generator.c)38
-rw-r--r--src/grp-system/kernel-command-line.xml (renamed from man/kernel-command-line.xml)0
-rw-r--r--src/grp-system/libcore/.gitignore (renamed from src/core/.gitignore)0
l---------src/grp-system/libcore/GNUmakefile1
-rw-r--r--src/grp-system/libcore/Makefile28
-rw-r--r--src/grp-system/libcore/include/core/automount.h (renamed from src/core/automount.h)0
-rw-r--r--src/grp-system/libcore/include/core/bus-policy.h (renamed from src/core/bus-policy.h)6
-rw-r--r--src/grp-system/libcore/include/core/busname.h (renamed from src/core/busname.h)2
-rw-r--r--src/grp-system/libcore/include/core/cgroup.h (renamed from src/core/cgroup.h)6
-rw-r--r--src/grp-system/libcore/include/core/dbus-manager.h (renamed from src/core/dbus-manager.h)0
-rw-r--r--src/grp-system/libcore/include/core/device.h (renamed from src/core/device.h)0
-rw-r--r--src/grp-system/libcore/include/core/dynamic-user.h (renamed from src/core/dynamic-user.h)0
-rw-r--r--src/grp-system/libcore/include/core/emergency-action.h (renamed from src/core/emergency-action.h)3
-rw-r--r--src/grp-system/libcore/include/core/execute.h (renamed from src/core/execute.h)23
-rw-r--r--src/grp-system/libcore/include/core/hostname-setup.h (renamed from src/core/hostname-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/ima-setup.h (renamed from src/core/ima-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/job.h (renamed from src/core/job.h)6
-rw-r--r--src/grp-system/libcore/include/core/kill.h (renamed from src/core/kill.h)6
-rw-r--r--src/grp-system/libcore/include/core/killall.h (renamed from src/core/killall.h)0
-rw-r--r--src/grp-system/libcore/include/core/kmod-setup.h (renamed from src/core/kmod-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/load-fragment.h (renamed from src/core/load-fragment.h)0
-rw-r--r--src/grp-system/libcore/include/core/loopback-setup.h (renamed from src/core/loopback-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/machine-id-setup.h (renamed from src/core/machine-id-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/manager.h (renamed from src/core/manager.h)19
-rw-r--r--src/grp-system/libcore/include/core/mount-setup.h (renamed from src/core/mount-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/mount.h (renamed from src/core/mount.h)2
-rw-r--r--src/grp-system/libcore/include/core/namespace.h (renamed from src/core/namespace.h)6
-rw-r--r--src/grp-system/libcore/include/core/path.h (renamed from src/core/path.h)0
-rw-r--r--src/grp-system/libcore/include/core/scope.h (renamed from src/core/scope.h)0
-rw-r--r--src/grp-system/libcore/include/core/selinux-setup.h (renamed from src/core/selinux-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/service.h (renamed from src/core/service.h)5
-rw-r--r--src/grp-system/libcore/include/core/show-status.h (renamed from src/core/show-status.h)2
-rw-r--r--src/grp-system/libcore/include/core/slice.h (renamed from src/core/slice.h)0
-rw-r--r--src/grp-system/libcore/include/core/smack-setup.h (renamed from src/core/smack-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/socket.h (renamed from src/core/socket.h)3
-rw-r--r--src/grp-system/libcore/include/core/swap.h (renamed from src/core/swap.h)2
-rw-r--r--src/grp-system/libcore/include/core/target.h (renamed from src/core/target.h)0
-rw-r--r--src/grp-system/libcore/include/core/timer.h (renamed from src/core/timer.h)4
-rw-r--r--src/grp-system/libcore/include/core/unit.h (renamed from src/core/unit.h)11
l---------src/grp-system/libcore/src/GNUmakefile1
-rw-r--r--src/grp-system/libcore/src/Makefile170
-rw-r--r--src/grp-system/libcore/src/audit-fd.c (renamed from src/core/audit-fd.c)6
-rw-r--r--src/grp-system/libcore/src/audit-fd.h (renamed from src/core/audit-fd.h)0
-rw-r--r--src/grp-system/libcore/src/automount.c (renamed from src/core/automount.c)48
-rw-r--r--src/grp-system/libcore/src/bus-policy.c (renamed from src/core/bus-policy.c)14
-rw-r--r--src/grp-system/libcore/src/busname.c (renamed from src/core/busname.c)33
-rw-r--r--src/grp-system/libcore/src/cgroup.c (renamed from src/core/cgroup.c)26
-rw-r--r--src/grp-system/libcore/src/dbus-automount.c (renamed from src/core/dbus-automount.c)7
-rw-r--r--src/grp-system/libcore/src/dbus-automount.h (renamed from src/core/dbus-automount.h)0
-rw-r--r--src/grp-system/libcore/src/dbus-busname.c (renamed from src/core/dbus-busname.c)9
-rw-r--r--src/grp-system/libcore/src/dbus-busname.h (renamed from src/core/dbus-busname.h)0
-rw-r--r--src/grp-system/libcore/src/dbus-cgroup.c (renamed from src/core/dbus-cgroup.c)15
-rw-r--r--src/grp-system/libcore/src/dbus-cgroup.h (renamed from src/core/dbus-cgroup.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-device.c (renamed from src/core/dbus-device.c)5
-rw-r--r--src/grp-system/libcore/src/dbus-device.h (renamed from src/core/dbus-device.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-execute.c (renamed from src/core/dbus-execute.c)41
-rw-r--r--src/grp-system/libcore/src/dbus-execute.h (renamed from src/core/dbus-execute.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-job.c (renamed from src/core/dbus-job.c)11
-rw-r--r--src/grp-system/libcore/src/dbus-job.h (renamed from src/core/dbus-job.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-kill.c (renamed from src/core/dbus-kill.c)7
-rw-r--r--src/grp-system/libcore/src/dbus-kill.h (renamed from src/core/dbus-kill.h)6
-rw-r--r--src/grp-system/libcore/src/dbus-manager.c (renamed from src/core/dbus-manager.c)41
-rw-r--r--src/grp-system/libcore/src/dbus-mount.c (renamed from src/core/dbus-mount.c)9
-rw-r--r--src/grp-system/libcore/src/dbus-mount.h (renamed from src/core/dbus-mount.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-path.c (renamed from src/core/dbus-path.c)9
-rw-r--r--src/grp-system/libcore/src/dbus-path.h (renamed from src/core/dbus-path.h)0
-rw-r--r--src/grp-system/libcore/src/dbus-scope.c (renamed from src/core/dbus-scope.c)13
-rw-r--r--src/grp-system/libcore/src/dbus-scope.h (renamed from src/core/dbus-scope.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-service.c (renamed from src/core/dbus-service.c)21
-rw-r--r--src/grp-system/libcore/src/dbus-service.h (renamed from src/core/dbus-service.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-slice.c (renamed from src/core/dbus-slice.c)5
-rw-r--r--src/grp-system/libcore/src/dbus-slice.h (renamed from src/core/dbus-slice.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-socket.c (renamed from src/core/dbus-socket.c)11
-rw-r--r--src/grp-system/libcore/src/dbus-socket.h (renamed from src/core/dbus-socket.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-swap.c (renamed from src/core/dbus-swap.c)9
-rw-r--r--src/grp-system/libcore/src/dbus-swap.h (renamed from src/core/dbus-swap.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-target.c (renamed from src/core/dbus-target.c)3
-rw-r--r--src/grp-system/libcore/src/dbus-target.h (renamed from src/core/dbus-target.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-timer.c (renamed from src/core/dbus-timer.c)11
-rw-r--r--src/grp-system/libcore/src/dbus-timer.h (renamed from src/core/dbus-timer.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-unit.c (renamed from src/core/dbus-unit.c)27
-rw-r--r--src/grp-system/libcore/src/dbus-unit.h (renamed from src/core/dbus-unit.h)4
-rw-r--r--src/grp-system/libcore/src/dbus.c (renamed from src/core/dbus.c)33
-rw-r--r--src/grp-system/libcore/src/dbus.h (renamed from src/core/dbus.h)2
-rw-r--r--src/grp-system/libcore/src/device.c (renamed from src/core/device.c)25
-rw-r--r--src/grp-system/libcore/src/dynamic-user.c (renamed from src/core/dynamic-user.c)18
-rw-r--r--src/grp-system/libcore/src/emergency-action.c (renamed from src/core/emergency-action.c)13
-rw-r--r--src/grp-system/libcore/src/execute.c (renamed from src/core/execute.c)90
-rw-r--r--src/grp-system/libcore/src/hostname-setup.c (renamed from src/core/hostname-setup.c)16
-rw-r--r--src/grp-system/libcore/src/ima-setup.c (renamed from src/core/ima-setup.c)10
-rw-r--r--src/grp-system/libcore/src/job.c (renamed from src/core/job.c)37
-rw-r--r--src/grp-system/libcore/src/kill.c (renamed from src/core/kill.c)8
-rw-r--r--src/grp-system/libcore/src/killall.c (renamed from src/core/killall.c)22
-rw-r--r--src/grp-system/libcore/src/kmod-setup.c (renamed from src/core/kmod-setup.c)8
-rw-r--r--src/grp-system/libcore/src/linux/auto_dev-ioctl.h (renamed from src/shared/linux/auto_dev-ioctl.h)0
-rw-r--r--src/grp-system/libcore/src/load-dropin.c (renamed from src/core/load-dropin.c)13
-rw-r--r--src/grp-system/libcore/src/load-dropin.h (renamed from src/core/load-dropin.h)4
-rw-r--r--src/grp-system/libcore/src/load-fragment-gperf.gperf.m4 (renamed from src/core/load-fragment-gperf.gperf.m4)7
-rw-r--r--src/grp-system/libcore/src/load-fragment.c (renamed from src/core/load-fragment.c)70
-rw-r--r--src/grp-system/libcore/src/locale-setup.c (renamed from src/core/locale-setup.c)15
-rw-r--r--src/grp-system/libcore/src/locale-setup.h (renamed from src/core/locale-setup.h)0
-rw-r--r--src/grp-system/libcore/src/loopback-setup.c (renamed from src/core/loopback-setup.c)9
-rw-r--r--src/grp-system/libcore/src/machine-id-setup.c (renamed from src/core/machine-id-setup.c)36
-rw-r--r--src/grp-system/libcore/src/manager.c (renamed from src/core/manager.c)92
-rw-r--r--src/grp-system/libcore/src/mount-setup.c (renamed from src/core/mount-setup.c)40
-rw-r--r--src/grp-system/libcore/src/mount.c (renamed from src/core/mount.c)43
-rw-r--r--src/grp-system/libcore/src/namespace.c (renamed from src/core/namespace.c)37
-rw-r--r--src/grp-system/libcore/src/path.c (renamed from src/core/path.c)29
-rw-r--r--src/grp-system/libcore/src/scope.c (renamed from src/core/scope.c)19
-rw-r--r--src/grp-system/libcore/src/selinux-access.c (renamed from src/core/selinux-access.c)19
-rw-r--r--src/grp-system/libcore/src/selinux-access.h (renamed from src/core/selinux-access.h)6
-rw-r--r--src/grp-system/libcore/src/selinux-setup.c (renamed from src/core/selinux-setup.c)12
-rw-r--r--src/grp-system/libcore/src/service.c (renamed from src/core/service.c)59
-rw-r--r--src/grp-system/libcore/src/show-status.c (renamed from src/core/show-status.c)16
-rw-r--r--src/grp-system/libcore/src/slice.c (renamed from src/core/slice.c)17
-rw-r--r--src/grp-system/libcore/src/smack-setup.c (renamed from src/core/smack-setup.c)18
-rw-r--r--src/grp-system/libcore/src/socket.c (renamed from src/core/socket.c)58
-rw-r--r--src/grp-system/libcore/src/swap.c (renamed from src/core/swap.c)37
-rw-r--r--src/grp-system/libcore/src/target.c (renamed from src/core/target.c)13
-rw-r--r--src/grp-system/libcore/src/timer.c (renamed from src/core/timer.c)29
-rw-r--r--src/grp-system/libcore/src/transaction.c (renamed from src/core/transaction.c)11
-rw-r--r--src/grp-system/libcore/src/transaction.h (renamed from src/core/transaction.h)10
-rw-r--r--src/grp-system/libcore/src/unit-printf.c (renamed from src/core/unit-printf.c)21
-rw-r--r--src/grp-system/libcore/src/unit-printf.h (renamed from src/core/unit-printf.h)2
-rw-r--r--src/grp-system/libcore/src/unit.c (renamed from src/core/unit.c)65
-rw-r--r--src/grp-system/systemctl/.gitignore (renamed from shell-completion/zsh/.gitignore)1
l---------src/grp-system/systemctl/GNUmakefile1
-rw-r--r--src/grp-system/systemctl/Makefile33
-rw-r--r--src/grp-system/systemctl/halt.xml (renamed from man/halt.xml)0
-rw-r--r--src/grp-system/systemctl/runlevel.xml (renamed from man/runlevel.xml)0
-rw-r--r--src/grp-system/systemctl/shutdown.xml (renamed from man/shutdown.xml)0
-rw-r--r--src/grp-system/systemctl/systemctl.c (renamed from src/systemctl/systemctl.c)111
-rw-r--r--src/grp-system/systemctl/systemctl.completion.bash.in (renamed from shell-completion/bash/systemctl.in)0
-rw-r--r--src/grp-system/systemctl/systemctl.completion.zsh.in (renamed from shell-completion/zsh/_systemctl.in)0
-rw-r--r--src/grp-system/systemctl/systemctl.xml (renamed from man/systemctl.xml)0
-rwxr-xr-xsrc/grp-system/systemctl/systemd-sysv-install.SKELETON (renamed from src/systemctl/systemd-sysv-install.SKELETON)0
-rw-r--r--src/grp-system/systemctl/systemd.preset.xml (renamed from man/systemd.preset.xml)0
-rw-r--r--src/grp-system/systemctl/telinit.xml (renamed from man/telinit.xml)0
l---------src/grp-system/systemd-cgroups-agent/GNUmakefile1
-rw-r--r--src/grp-system/systemd-cgroups-agent/Makefile33
-rw-r--r--src/grp-system/systemd-cgroups-agent/cgroups-agent.c (renamed from src/cgroups-agent/cgroups-agent.c)6
l---------src/grp-system/systemd-shutdown/GNUmakefile1
-rw-r--r--src/grp-system/systemd-shutdown/Makefile39
-rw-r--r--src/grp-system/systemd-shutdown/halt.target (renamed from units/halt.target)0
-rw-r--r--src/grp-system/systemd-shutdown/kexec.target (renamed from units/kexec.target)0
-rw-r--r--src/grp-system/systemd-shutdown/poweroff.target (renamed from units/poweroff.target)0
-rw-r--r--src/grp-system/systemd-shutdown/reboot.target (renamed from units/reboot.target)0
-rw-r--r--src/grp-system/systemd-shutdown/shutdown.c (renamed from src/core/shutdown.c)34
-rw-r--r--src/grp-system/systemd-shutdown/systemd-halt.service.in (renamed from units/systemd-halt.service.in)0
-rw-r--r--src/grp-system/systemd-shutdown/systemd-kexec.service.in (renamed from units/systemd-kexec.service.in)0
-rw-r--r--src/grp-system/systemd-shutdown/systemd-poweroff.service.in (renamed from units/systemd-poweroff.service.in)0
-rw-r--r--src/grp-system/systemd-shutdown/systemd-reboot.service.in (renamed from units/systemd-reboot.service.in)0
-rw-r--r--src/grp-system/systemd-shutdown/systemd-shutdown.xml (renamed from man/systemd-halt.service.xml)0
-rw-r--r--src/grp-system/systemd-shutdown/umount.c (renamed from src/core/umount.c)32
-rw-r--r--src/grp-system/systemd-shutdown/umount.h (renamed from src/core/umount.h)0
-rwxr-xr-xsrc/grp-system/systemd/50-systemd-user.xorg (renamed from xorg/50-systemd-user.sh)0
l---------src/grp-system/systemd/GNUmakefile1
-rw-r--r--src/grp-system/systemd/Makefile73
-rw-r--r--src/grp-system/systemd/macros.systemd.in (renamed from src/core/macros.systemd.in)0
-rw-r--r--src/grp-system/systemd/main.c (renamed from src/core/main.c)106
-rw-r--r--src/grp-system/systemd/org.freedesktop.systemd1.conf (renamed from src/core/org.freedesktop.systemd1.conf)0
-rw-r--r--src/grp-system/systemd/org.freedesktop.systemd1.policy.in.in (renamed from src/core/org.freedesktop.systemd1.policy.in.in)0
-rw-r--r--src/grp-system/systemd/org.freedesktop.systemd1.service (renamed from src/core/org.freedesktop.systemd1.service)0
-rw-r--r--src/grp-system/systemd/system.conf (renamed from src/core/system.conf)0
-rw-r--r--src/grp-system/systemd/systemd-system.conf.xml (renamed from man/systemd-system.conf.xml)0
-rw-r--r--src/grp-system/systemd/systemd-tmpfs.tmpfiles (renamed from tmpfiles.d/systemd-tmpfs.conf)0
-rw-r--r--src/grp-system/systemd/systemd.automount.xml (renamed from man/systemd.automount.xml)0
-rw-r--r--src/grp-system/systemd/systemd.device.xml (renamed from man/systemd.device.xml)0
-rw-r--r--src/grp-system/systemd/systemd.exec.xml (renamed from man/systemd.exec.xml)0
-rw-r--r--src/grp-system/systemd/systemd.generator.xml (renamed from man/systemd.generator.xml)0
-rw-r--r--src/grp-system/systemd/systemd.journal-fields.xml (renamed from man/systemd.journal-fields.xml)0
-rw-r--r--src/grp-system/systemd/systemd.kill.xml (renamed from man/systemd.kill.xml)0
-rw-r--r--src/grp-system/systemd/systemd.link.xml (renamed from man/systemd.link.xml)0
-rw-r--r--src/grp-system/systemd/systemd.mount.xml (renamed from man/systemd.mount.xml)0
-rw-r--r--src/grp-system/systemd/systemd.netdev.xml (renamed from man/systemd.netdev.xml)0
-rw-r--r--src/grp-system/systemd/systemd.network.xml (renamed from man/systemd.network.xml)0
-rw-r--r--src/grp-system/systemd/systemd.nspawn.xml (renamed from man/systemd.nspawn.xml)0
-rw-r--r--src/grp-system/systemd/systemd.offline-updates.xml (renamed from man/systemd.offline-updates.xml)0
-rw-r--r--src/grp-system/systemd/systemd.path.xml (renamed from man/systemd.path.xml)0
-rw-r--r--src/grp-system/systemd/systemd.pc.in (renamed from src/core/systemd.pc.in)0
-rw-r--r--src/grp-system/systemd/systemd.resource-control.xml (renamed from man/systemd.resource-control.xml)0
-rw-r--r--src/grp-system/systemd/systemd.scope.xml (renamed from man/systemd.scope.xml)0
-rw-r--r--src/grp-system/systemd/systemd.service.xml (renamed from man/systemd.service.xml)0
-rw-r--r--src/grp-system/systemd/systemd.slice.xml (renamed from man/systemd.slice.xml)0
-rw-r--r--src/grp-system/systemd/systemd.socket.xml (renamed from man/systemd.socket.xml)0
-rw-r--r--src/grp-system/systemd/systemd.special.xml (renamed from man/systemd.special.xml)0
-rw-r--r--src/grp-system/systemd/systemd.swap.xml (renamed from man/systemd.swap.xml)0
-rw-r--r--src/grp-system/systemd/systemd.target.xml (renamed from man/systemd.target.xml)0
-rw-r--r--src/grp-system/systemd/systemd.time.xml (renamed from man/systemd.time.xml)0
-rw-r--r--src/grp-system/systemd/systemd.timer.xml (renamed from man/systemd.timer.xml)0
-rw-r--r--src/grp-system/systemd/systemd.tmpfiles (renamed from tmpfiles.d/systemd.conf)0
-rw-r--r--src/grp-system/systemd/systemd.unit.xml (renamed from man/systemd.unit.xml)0
-rw-r--r--src/grp-system/systemd/systemd.xml (renamed from man/systemd.xml)0
-rw-r--r--src/grp-system/systemd/triggers.systemd.in (renamed from src/core/triggers.systemd.in)0
-rw-r--r--src/grp-system/systemd/user.conf (renamed from src/core/user.conf)0
l---------src/grp-timedate/GNUmakefile1
-rw-r--r--src/grp-timedate/Makefile29
-rw-r--r--src/grp-timedate/systemd-timedated/.gitignore (renamed from src/timedate/.gitignore)0
l---------src/grp-timedate/systemd-timedated/GNUmakefile1
-rw-r--r--src/grp-timedate/systemd-timedated/Makefile65
-rw-r--r--src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.conf (renamed from src/timedate/org.freedesktop.timedate1.conf)0
-rw-r--r--src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.policy.in (renamed from src/timedate/org.freedesktop.timedate1.policy.in)0
-rw-r--r--src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.service (renamed from src/timedate/org.freedesktop.timedate1.service)0
-rw-r--r--src/grp-timedate/systemd-timedated/systemd-timedated.service.in (renamed from units/systemd-timedated.service.in)0
-rw-r--r--src/grp-timedate/systemd-timedated/systemd-timedated.service.xml (renamed from man/systemd-timedated.service.xml)0
-rw-r--r--src/grp-timedate/systemd-timedated/timedated.c (renamed from src/timedate/timedated.c)34
l---------src/grp-timedate/timedatectl/GNUmakefile1
-rw-r--r--src/grp-timedate/timedatectl/Makefile43
-rw-r--r--src/grp-timedate/timedatectl/timedatectl.c (renamed from src/timedate/timedatectl.c)20
-rw-r--r--src/grp-timedate/timedatectl/timedatectl.completion.bash (renamed from shell-completion/bash/timedatectl)0
-rw-r--r--src/grp-timedate/timedatectl/timedatectl.completion.zsh (renamed from shell-completion/zsh/_timedatectl)0
-rw-r--r--src/grp-timedate/timedatectl/timedatectl.xml (renamed from man/timedatectl.xml)0
-rw-r--r--src/grp-udev/.gitignore (renamed from src/udev/.gitignore)1
-rw-r--r--src/grp-udev/50-udev-default.rules (renamed from rules/50-udev-default.rules)0
-rw-r--r--src/grp-udev/60-block.rules (renamed from rules/60-block.rules)0
-rw-r--r--src/grp-udev/60-drm.rules (renamed from rules/60-drm.rules)0
-rw-r--r--src/grp-udev/60-evdev.rules (renamed from rules/60-evdev.rules)0
-rw-r--r--src/grp-udev/60-persistent-alsa.rules (renamed from rules/60-persistent-alsa.rules)0
-rw-r--r--src/grp-udev/60-persistent-input.rules (renamed from rules/60-persistent-input.rules)0
-rw-r--r--src/grp-udev/60-persistent-storage-tape.rules (renamed from rules/60-persistent-storage-tape.rules)0
-rw-r--r--src/grp-udev/60-persistent-storage.rules (renamed from rules/60-persistent-storage.rules)0
-rw-r--r--src/grp-udev/60-serial.rules (renamed from rules/60-serial.rules)0
-rw-r--r--src/grp-udev/64-btrfs.rules (renamed from rules/64-btrfs.rules)0
-rw-r--r--src/grp-udev/70-mouse.rules (renamed from rules/70-mouse.rules)0
-rw-r--r--src/grp-udev/70-touchpad.rules (renamed from rules/70-touchpad.rules)0
-rw-r--r--src/grp-udev/75-net-description.rules (renamed from rules/75-net-description.rules)0
-rw-r--r--src/grp-udev/78-sound-card.rules (renamed from rules/78-sound-card.rules)0
-rw-r--r--src/grp-udev/80-drivers.rules (renamed from rules/80-drivers.rules)0
-rw-r--r--src/grp-udev/80-net-setup-link.rules (renamed from rules/80-net-setup-link.rules)0
-rw-r--r--src/grp-udev/99-systemd.rules.in (renamed from rules/99-systemd.rules.in)0
l---------src/grp-udev/GNUmakefile1
-rw-r--r--src/grp-udev/Makefile86
l---------src/grp-udev/ata_id/GNUmakefile1
-rw-r--r--src/grp-udev/ata_id/Makefile35
-rw-r--r--src/grp-udev/ata_id/ata_id.c (renamed from src/udev/ata_id/ata_id.c)13
-rw-r--r--src/grp-udev/cdrom_id/60-cdrom_id.rules (renamed from rules/60-cdrom_id.rules)0
l---------src/grp-udev/cdrom_id/GNUmakefile1
-rw-r--r--src/grp-udev/cdrom_id/Makefile38
-rw-r--r--src/grp-udev/cdrom_id/cdrom_id.c (renamed from src/udev/cdrom_id/cdrom_id.c)7
l---------src/grp-udev/collect/GNUmakefile1
-rw-r--r--src/grp-udev/collect/Makefile35
-rw-r--r--src/grp-udev/collect/collect.c (renamed from src/udev/collect/collect.c)8
-rw-r--r--src/grp-udev/hwdb/.gitignore (renamed from hwdb/.gitignore)0
-rw-r--r--src/grp-udev/hwdb/20-OUI.hwdb (renamed from hwdb/20-OUI.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-acpi-vendor.hwdb (renamed from hwdb/20-acpi-vendor.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-acpi-vendor.hwdb.patch (renamed from hwdb/20-acpi-vendor.hwdb.patch)0
-rw-r--r--src/grp-udev/hwdb/20-bluetooth-vendor-product.hwdb (renamed from hwdb/20-bluetooth-vendor-product.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-net-ifname.hwdb (renamed from hwdb/20-net-ifname.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-pci-classes.hwdb (renamed from hwdb/20-pci-classes.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-pci-vendor-model.hwdb (renamed from hwdb/20-pci-vendor-model.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-sdio-classes.hwdb (renamed from hwdb/20-sdio-classes.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-sdio-vendor-model.hwdb (renamed from hwdb/20-sdio-vendor-model.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-usb-classes.hwdb (renamed from hwdb/20-usb-classes.hwdb)0
-rw-r--r--src/grp-udev/hwdb/20-usb-vendor-model.hwdb (renamed from hwdb/20-usb-vendor-model.hwdb)0
-rw-r--r--src/grp-udev/hwdb/60-evdev.hwdb (renamed from hwdb/60-evdev.hwdb)0
-rw-r--r--src/grp-udev/hwdb/60-keyboard.hwdb (renamed from hwdb/60-keyboard.hwdb)0
-rw-r--r--src/grp-udev/hwdb/70-mouse.hwdb (renamed from hwdb/70-mouse.hwdb)0
-rw-r--r--src/grp-udev/hwdb/70-pointingstick.hwdb (renamed from hwdb/70-pointingstick.hwdb)0
-rw-r--r--src/grp-udev/hwdb/70-touchpad.hwdb (renamed from hwdb/70-touchpad.hwdb)0
l---------src/grp-udev/hwdb/GNUmakefile1
-rw-r--r--src/grp-udev/hwdb/Makefile71
-rwxr-xr-xsrc/grp-udev/hwdb/acpi-update.py (renamed from hwdb/acpi-update.py)0
-rwxr-xr-xsrc/grp-udev/hwdb/ids-update.pl (renamed from hwdb/ids-update.pl)0
-rwxr-xr-xsrc/grp-udev/hwdb/parse_hwdb.py (renamed from hwdb/parse_hwdb.py)0
-rw-r--r--src/grp-udev/hwdb/sdio.ids (renamed from hwdb/sdio.ids)0
l---------src/grp-udev/libudev-core/GNUmakefile1
-rw-r--r--src/grp-udev/libudev-core/Makefile99
l---------src/grp-udev/libudev-core/logind-acl.c1
l---------src/grp-udev/libudev-core/logind-acl.h1
-rw-r--r--src/grp-udev/libudev-core/net/.gitignore (renamed from src/udev/net/.gitignore)0
l---------src/grp-udev/libudev-core/net/GNUmakefile1
-rw-r--r--src/grp-udev/libudev-core/net/Makefile29
-rw-r--r--src/grp-udev/libudev-core/net/ethtool-util.c (renamed from src/udev/net/ethtool-util.c)14
-rw-r--r--src/grp-udev/libudev-core/net/ethtool-util.h (renamed from src/udev/net/ethtool-util.h)2
-rw-r--r--src/grp-udev/libudev-core/net/link-config-gperf.gperf (renamed from src/udev/net/link-config-gperf.gperf)8
-rw-r--r--src/grp-udev/libudev-core/net/link-config.c (renamed from src/udev/net/link-config.c)38
-rw-r--r--src/grp-udev/libudev-core/net/link-config.h (renamed from src/udev/net/link-config.h)7
l---------src/grp-udev/libudev-core/sd-login.c1
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-blkid.c (renamed from src/udev/udev-builtin-blkid.c)12
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-btrfs.c (renamed from src/udev/udev-builtin-btrfs.c)6
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-hwdb.c (renamed from src/udev/udev-builtin-hwdb.c)11
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-input_id.c (renamed from src/udev/udev-builtin-input_id.c)9
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-keyboard.c (renamed from src/udev/udev-builtin-keyboard.c)9
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-kmod.c (renamed from src/udev/udev-builtin-kmod.c)2
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-net_id.c (renamed from src/udev/udev-builtin-net_id.c)9
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-net_setup_link.c (renamed from src/udev/udev-builtin-net_setup_link.c)4
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-path_id.c (renamed from src/udev/udev-builtin-path_id.c)4
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-uaccess.c (renamed from src/udev/udev-builtin-uaccess.c)9
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-usb_id.c (renamed from src/udev/udev-builtin-usb_id.c)6
-rw-r--r--src/grp-udev/libudev-core/udev-builtin.c (renamed from src/udev/udev-builtin.c)2
-rw-r--r--src/grp-udev/libudev-core/udev-ctrl.c (renamed from src/udev/udev-ctrl.c)8
-rw-r--r--src/grp-udev/libudev-core/udev-event.c (renamed from src/udev/udev-event.c)14
-rw-r--r--src/grp-udev/libudev-core/udev-node.c (renamed from src/udev/udev-node.c)12
-rw-r--r--src/grp-udev/libudev-core/udev-rules.c (renamed from src/udev/udev-rules.c)30
-rw-r--r--src/grp-udev/libudev-core/udev-watch.c (renamed from src/udev/udev-watch.c)2
-rw-r--r--src/grp-udev/mtd_probe/75-probe_mtd.rules (renamed from rules/75-probe_mtd.rules)0
l---------src/grp-udev/mtd_probe/GNUmakefile1
-rw-r--r--src/grp-udev/mtd_probe/Makefile37
-rw-r--r--src/grp-udev/mtd_probe/mtd_probe.c (renamed from src/udev/mtd_probe/mtd_probe.c)0
-rw-r--r--src/grp-udev/mtd_probe/mtd_probe.h (renamed from src/udev/mtd_probe/mtd_probe.h)2
-rw-r--r--src/grp-udev/mtd_probe/probe_smartmedia.c (renamed from src/udev/mtd_probe/probe_smartmedia.c)0
-rw-r--r--src/grp-udev/scsi_id/.gitignore (renamed from src/udev/scsi_id/.gitignore)0
l---------src/grp-udev/scsi_id/GNUmakefile1
-rw-r--r--src/grp-udev/scsi_id/Makefile41
-rw-r--r--src/grp-udev/scsi_id/README (renamed from src/udev/scsi_id/README)0
-rw-r--r--src/grp-udev/scsi_id/scsi.h (renamed from src/udev/scsi_id/scsi.h)0
-rw-r--r--src/grp-udev/scsi_id/scsi_id.c (renamed from src/udev/scsi_id/scsi_id.c)9
-rw-r--r--src/grp-udev/scsi_id/scsi_id.h (renamed from src/udev/scsi_id/scsi_id.h)0
-rw-r--r--src/grp-udev/scsi_id/scsi_serial.c (renamed from src/udev/scsi_id/scsi_serial.c)12
l---------src/grp-udev/systemd-hwdb/GNUmakefile1
-rw-r--r--src/grp-udev/systemd-hwdb/Makefile48
-rw-r--r--src/grp-udev/systemd-hwdb/hwdb.c (renamed from src/hwdb/hwdb.c)30
-rw-r--r--src/grp-udev/systemd-hwdb/hwdb.xml (renamed from man/hwdb.xml)0
-rw-r--r--src/grp-udev/systemd-hwdb/systemd-hwdb.xml (renamed from man/systemd-hwdb.xml)0
l---------src/grp-udev/systemd-udevd/GNUmakefile1
-rw-r--r--src/grp-udev/systemd-udevd/Makefile40
-rw-r--r--src/grp-udev/systemd-udevd/systemd-udevd.service.in (renamed from units/systemd-udevd.service.in)0
-rw-r--r--src/grp-udev/systemd-udevd/systemd-udevd.service.xml (renamed from man/systemd-udevd.service.xml)0
-rw-r--r--src/grp-udev/systemd-udevd/udev.conf (renamed from src/udev/udev.conf)0
-rw-r--r--src/grp-udev/systemd-udevd/udev.conf.xml (renamed from man/udev.conf.xml)0
-rw-r--r--src/grp-udev/systemd-udevd/udevd.c (renamed from src/udev/udevd.c)48
-rw-r--r--src/grp-udev/udev.pc.in (renamed from src/udev/udev.pc.in)0
-rw-r--r--src/grp-udev/udev.xml (renamed from man/udev.xml)0
l---------src/grp-udev/udevadm/GNUmakefile1
-rw-r--r--src/grp-udev/udevadm/Makefile46
-rw-r--r--src/grp-udev/udevadm/udevadm-control.c (renamed from src/udev/udevadm-control.c)4
-rw-r--r--src/grp-udev/udevadm/udevadm-hwdb.c (renamed from src/udev/udevadm-hwdb.c)22
-rw-r--r--src/grp-udev/udevadm/udevadm-info.c (renamed from src/udev/udevadm-info.c)7
-rw-r--r--src/grp-udev/udevadm/udevadm-monitor.c (renamed from src/udev/udevadm-monitor.c)6
-rw-r--r--src/grp-udev/udevadm/udevadm-settle.c (renamed from src/udev/udevadm-settle.c)4
-rw-r--r--src/grp-udev/udevadm/udevadm-test-builtin.c (renamed from src/udev/udevadm-test-builtin.c)2
-rw-r--r--src/grp-udev/udevadm/udevadm-test.c (renamed from src/udev/udevadm-test.c)4
-rw-r--r--src/grp-udev/udevadm/udevadm-trigger.c (renamed from src/udev/udevadm-trigger.c)7
-rw-r--r--src/grp-udev/udevadm/udevadm-util.c (renamed from src/udev/udevadm-util.c)3
-rw-r--r--src/grp-udev/udevadm/udevadm-util.h (renamed from src/udev/udevadm-util.h)0
-rw-r--r--src/grp-udev/udevadm/udevadm.c (renamed from src/udev/udevadm.c)4
-rw-r--r--src/grp-udev/udevadm/udevadm.completion.bash (renamed from shell-completion/bash/udevadm)0
-rw-r--r--src/grp-udev/udevadm/udevadm.completion.zsh (renamed from shell-completion/zsh/_udevadm)0
-rw-r--r--src/grp-udev/udevadm/udevadm.xml (renamed from man/udevadm.xml)0
-rw-r--r--src/grp-udev/v4l_id/60-persistent-v4l.rules (renamed from rules/60-persistent-v4l.rules)0
l---------src/grp-udev/v4l_id/GNUmakefile1
-rw-r--r--src/grp-udev/v4l_id/Makefile38
-rw-r--r--src/grp-udev/v4l_id/v4l_id.c (renamed from src/udev/v4l_id/v4l_id.c)5
l---------src/grp-utils/GNUmakefile1
-rw-r--r--src/grp-utils/Makefile32
l---------src/grp-utils/systemd-ac-power/GNUmakefile1
-rw-r--r--src/grp-utils/systemd-ac-power/Makefile33
-rw-r--r--src/grp-utils/systemd-ac-power/ac-power.c (renamed from src/ac-power/ac-power.c)2
l---------src/grp-utils/systemd-escape/GNUmakefile1
-rw-r--r--src/grp-utils/systemd-escape/Makefile34
-rw-r--r--src/grp-utils/systemd-escape/escape.c (renamed from src/escape/escape.c)10
-rw-r--r--src/grp-utils/systemd-escape/systemd-escape.xml (renamed from man/systemd-escape.xml)0
l---------src/grp-utils/systemd-notify/GNUmakefile1
-rw-r--r--src/grp-utils/systemd-notify/Makefile33
-rw-r--r--src/grp-utils/systemd-notify/notify.c (renamed from src/notify/notify.c)20
-rw-r--r--src/grp-utils/systemd-notify/systemd-notify.completion.zsh12
-rw-r--r--src/grp-utils/systemd-notify/systemd-notify.xml (renamed from man/systemd-notify.xml)0
l---------src/grp-utils/systemd-path/GNUmakefile1
-rw-r--r--src/grp-utils/systemd-path/Makefile34
l---------src/grp-utils/systemd-path/_sd-common.h1
-rw-r--r--src/grp-utils/systemd-path/path.c (renamed from src/path/path.c)12
-rw-r--r--src/grp-utils/systemd-path/sd-path.c (renamed from src/libsystemd/sd-path/sd-path.c)22
-rw-r--r--src/grp-utils/systemd-path/sd-path.h (renamed from src/systemd/sd-path.h)0
-rw-r--r--src/grp-utils/systemd-path/systemd-path.completion.bash (renamed from shell-completion/bash/systemd-path)0
-rw-r--r--src/grp-utils/systemd-path/systemd-path.xml (renamed from man/systemd-path.xml)0
l---------src/grp-utils/systemd-socket-activate/GNUmakefile1
-rw-r--r--src/grp-utils/systemd-socket-activate/Makefile35
-rw-r--r--src/grp-utils/systemd-socket-activate/activate.c (renamed from src/activate/activate.c)22
-rw-r--r--src/grp-utils/systemd-socket-activate/systemd-socket-activate.xml (renamed from man/systemd-socket-activate.xml)0
l---------src/hibernate-resume/Makefile1
l---------src/hostname/Makefile1
l---------src/hwdb/Makefile1
l---------src/import/Makefile1
l---------src/initctl/Makefile1
l---------src/journal-remote/Makefile1
l---------src/journal/Makefile1
l---------src/kernel-install/Makefile1
l---------src/libsystemd-basic/GNUmakefile1
-rw-r--r--src/libsystemd-basic/Makefile28
-rw-r--r--src/libsystemd-basic/include/systemd-basic/MurmurHash2.h (renamed from src/basic/MurmurHash2.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/af-list.h (renamed from src/basic/af-list.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/alloc-util.h (renamed from src/basic/alloc-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/architecture.h (renamed from src/basic/architecture.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/arphrd-list.h (renamed from src/basic/arphrd-list.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/async.h (renamed from src/basic/async.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/audit-util.h (renamed from src/basic/audit-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/barrier.h (renamed from src/basic/barrier.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/bitmap.h (renamed from src/basic/bitmap.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/btrfs-ctree.h (renamed from src/basic/btrfs-ctree.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/btrfs-util.h (renamed from src/basic/btrfs-util.h)2
-rw-r--r--src/libsystemd-basic/include/systemd-basic/build.h (renamed from src/basic/build.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/bus-label.h (renamed from src/basic/bus-label.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/calendarspec.h (renamed from src/basic/calendarspec.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/cap-list.h (renamed from src/basic/cap-list.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/capability-util.h (renamed from src/basic/capability-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/cgroup-util.h (renamed from src/basic/cgroup-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/chattr-util.h (renamed from src/basic/chattr-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/clock-util.h (renamed from src/basic/clock-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/conf-files.h (renamed from src/basic/conf-files.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/copy.h (renamed from src/basic/copy.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/cpu-set-util.h (renamed from src/basic/cpu-set-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/def.h (renamed from src/basic/def.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/device-nodes.h (renamed from src/basic/device-nodes.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/dirent-util.h (renamed from src/basic/dirent-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/env-util.h (renamed from src/basic/env-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/errno-list.h (renamed from src/basic/errno-list.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/escape.h (renamed from src/basic/escape.h)2
-rw-r--r--src/libsystemd-basic/include/systemd-basic/ether-addr-util.h (renamed from src/basic/ether-addr-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/exit-status.h (renamed from src/basic/exit-status.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/extract-word.h (renamed from src/basic/extract-word.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/fd-util.h (renamed from src/basic/fd-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/fileio-label.h (renamed from src/basic/fileio-label.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/fileio.h (renamed from src/basic/fileio.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/formats-util.h (renamed from src/basic/formats-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/fs-util.h (renamed from src/basic/fs-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/glob-util.h (renamed from src/basic/glob-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/gunicode.h (renamed from src/basic/gunicode.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/hash-funcs.h (renamed from src/basic/hash-funcs.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/hashmap.h (renamed from src/basic/hashmap.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/hexdecoct.h (renamed from src/basic/hexdecoct.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/hostname-util.h (renamed from src/basic/hostname-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/in-addr-util.h (renamed from src/basic/in-addr-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/io-util.h (renamed from src/basic/io-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/ioprio.h (renamed from src/basic/ioprio.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/label.h (renamed from src/basic/label.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/list.h (renamed from src/basic/list.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/locale-util.h (renamed from src/basic/locale-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/lockfile-util.h (renamed from src/basic/lockfile-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/log.h (renamed from src/basic/log.h)2
-rw-r--r--src/libsystemd-basic/include/systemd-basic/login-util.h (renamed from src/basic/login-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/macro.h (renamed from src/basic/macro.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/memfd-util.h (renamed from src/basic/memfd-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/mempool.h (renamed from src/basic/mempool.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/missing.h (renamed from src/basic/missing.h)13
-rw-r--r--src/libsystemd-basic/include/systemd-basic/missing_syscall.h (renamed from src/basic/missing_syscall.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/mkdir.h (renamed from src/basic/mkdir.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/mount-util.h (renamed from src/basic/mount-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/nss-util.h (renamed from src/basic/nss-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/ordered-set.h (renamed from src/basic/ordered-set.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/parse-util.h (renamed from src/basic/parse-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/path-util.h (renamed from src/basic/path-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/prioq.h (renamed from src/basic/prioq.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/proc-cmdline.h (renamed from src/basic/proc-cmdline.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/process-util.h (renamed from src/basic/process-util.h)2
-rw-r--r--src/libsystemd-basic/include/systemd-basic/random-util.h (renamed from src/basic/random-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/ratelimit.h (renamed from src/basic/ratelimit.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/raw-clone.h (renamed from src/basic/raw-clone.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/refcnt.h (renamed from src/basic/refcnt.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/replace-var.h (renamed from src/basic/replace-var.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/rlimit-util.h (renamed from src/basic/rlimit-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/rm-rf.h (renamed from src/basic/rm-rf.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/securebits.h (renamed from src/basic/securebits.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/selinux-util.h (renamed from src/basic/selinux-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/set.h (renamed from src/basic/set.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/sigbus.h (renamed from src/basic/sigbus.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/signal-util.h (renamed from src/basic/signal-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/siphash24.h (renamed from src/basic/siphash24.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/smack-util.h (renamed from src/basic/smack-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/socket-util.h (renamed from src/basic/socket-util.h)1
-rw-r--r--src/libsystemd-basic/include/systemd-basic/sparse-endian.h (renamed from src/basic/sparse-endian.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/special.h (renamed from src/basic/special.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/stat-util.h (renamed from src/basic/stat-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/stdio-util.h (renamed from src/basic/stdio-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/strbuf.h (renamed from src/basic/strbuf.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/string-table.h (renamed from src/basic/string-table.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/string-util.h (renamed from src/basic/string-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/strv.h (renamed from src/basic/strv.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/strxcpyx.h (renamed from src/basic/strxcpyx.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/syslog-util.h (renamed from src/basic/syslog-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/terminal-util.h (renamed from src/basic/terminal-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/time-util.h (renamed from src/basic/time-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/umask-util.h (renamed from src/basic/umask-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/unaligned.h (renamed from src/basic/unaligned.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/unit-name.h (renamed from src/basic/unit-name.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/user-util.h (renamed from src/basic/user-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/utf8.h (renamed from src/basic/utf8.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/util.h (renamed from src/basic/util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/verbs.h (renamed from src/basic/verbs.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/virt.h (renamed from src/basic/virt.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/web-util.h (renamed from src/basic/web-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/xattr-util.h (renamed from src/basic/xattr-util.h)0
-rw-r--r--src/libsystemd-basic/include/systemd-basic/xml.h (renamed from src/basic/xml.h)0
-rw-r--r--src/libsystemd-basic/src/.gitignore (renamed from src/basic/.gitignore)0
l---------src/libsystemd-basic/src/GNUmakefile1
-rw-r--r--src/libsystemd-basic/src/Makefile274
-rw-r--r--src/libsystemd-basic/src/MurmurHash2.c (renamed from src/basic/MurmurHash2.c)2
-rw-r--r--src/libsystemd-basic/src/af-list.c (renamed from src/basic/af-list.c)4
-rw-r--r--src/libsystemd-basic/src/alloc-util.c (renamed from src/basic/alloc-util.c)6
-rw-r--r--src/libsystemd-basic/src/architecture.c (renamed from src/basic/architecture.c)8
-rw-r--r--src/libsystemd-basic/src/arphrd-list.c (renamed from src/basic/arphrd-list.c)4
-rw-r--r--src/libsystemd-basic/src/async.c (renamed from src/basic/async.c)10
-rw-r--r--src/libsystemd-basic/src/audit-util.c (renamed from src/basic/audit-util.c)19
-rw-r--r--src/libsystemd-basic/src/barrier.c (renamed from src/basic/barrier.c)6
-rw-r--r--src/libsystemd-basic/src/bitmap.c (renamed from src/basic/bitmap.c)8
-rw-r--r--src/libsystemd-basic/src/btrfs-util.c (renamed from src/basic/btrfs-util.c)37
-rw-r--r--src/libsystemd-basic/src/bus-label.c (renamed from src/basic/bus-label.c)8
-rw-r--r--src/libsystemd-basic/src/calendarspec.c (renamed from src/basic/calendarspec.c)12
-rw-r--r--src/libsystemd-basic/src/cap-list.c (renamed from src/basic/cap-list.c)10
-rw-r--r--src/libsystemd-basic/src/capability-util.c (renamed from src/basic/capability-util.c)16
-rw-r--r--src/libsystemd-basic/src/cgroup-util.c (renamed from src/basic/cgroup-util.c)52
-rw-r--r--src/libsystemd-basic/src/chattr-util.c (renamed from src/basic/chattr-util.c)7
-rw-r--r--src/libsystemd-basic/src/clock-util.c (renamed from src/basic/clock-util.c)15
-rw-r--r--src/libsystemd-basic/src/conf-files.c (renamed from src/basic/conf-files.c)22
-rw-r--r--src/libsystemd-basic/src/copy.c (renamed from src/basic/copy.c)32
-rw-r--r--src/libsystemd-basic/src/cpu-set-util.c (renamed from src/basic/cpu-set-util.c)14
-rw-r--r--src/libsystemd-basic/src/device-nodes.c (renamed from src/basic/device-nodes.c)4
-rw-r--r--src/libsystemd-basic/src/dirent-util.c (renamed from src/basic/dirent-util.c)6
-rw-r--r--src/libsystemd-basic/src/env-util.c (renamed from src/basic/env-util.c)16
-rw-r--r--src/libsystemd-basic/src/errno-list.c (renamed from src/basic/errno-list.c)4
-rw-r--r--src/libsystemd-basic/src/escape.c (renamed from src/basic/escape.c)10
-rw-r--r--src/libsystemd-basic/src/ether-addr-util.c (renamed from src/basic/ether-addr-util.c)6
-rw-r--r--src/libsystemd-basic/src/exit-status.c (renamed from src/basic/exit-status.c)6
-rw-r--r--src/libsystemd-basic/src/extract-word.c (renamed from src/basic/extract-word.c)14
-rw-r--r--src/libsystemd-basic/src/fd-util.c (renamed from src/basic/fd-util.c)18
-rw-r--r--src/libsystemd-basic/src/fileio-label.c (renamed from src/basic/fileio-label.c)6
-rw-r--r--src/libsystemd-basic/src/fileio.c (renamed from src/basic/fileio.c)38
-rw-r--r--src/libsystemd-basic/src/fs-util.c (renamed from src/basic/fs-util.c)36
-rw-r--r--src/libsystemd-basic/src/glob-util.c (renamed from src/basic/glob-util.c)6
-rw-r--r--src/libsystemd-basic/src/gunicode.c (renamed from src/basic/gunicode.c)2
-rw-r--r--src/libsystemd-basic/src/hash-funcs.c (renamed from src/basic/hash-funcs.c)2
-rw-r--r--src/libsystemd-basic/src/hashmap.c (renamed from src/basic/hashmap.c)23
-rw-r--r--src/libsystemd-basic/src/hexdecoct.c (renamed from src/basic/hexdecoct.c)8
-rw-r--r--src/libsystemd-basic/src/hostname-util.c (renamed from src/basic/hostname-util.c)10
-rw-r--r--src/libsystemd-basic/src/in-addr-util.c (renamed from src/basic/in-addr-util.c)10
-rw-r--r--src/libsystemd-basic/src/io-util.c (renamed from src/basic/io-util.c)4
-rw-r--r--src/libsystemd-basic/src/label.c (renamed from src/basic/label.c)8
-rw-r--r--src/libsystemd-basic/src/locale-util.c (renamed from src/basic/locale-util.c)20
-rw-r--r--src/libsystemd-basic/src/lockfile-util.c (renamed from src/basic/lockfile-util.c)12
-rw-r--r--src/libsystemd-basic/src/log.c (renamed from src/basic/log.c)42
-rw-r--r--src/libsystemd-basic/src/login-util.c (renamed from src/basic/login-util.c)4
-rw-r--r--src/libsystemd-basic/src/memfd-util.c (renamed from src/basic/memfd-util.c)14
-rw-r--r--src/libsystemd-basic/src/mempool.c (renamed from src/basic/mempool.c)6
-rw-r--r--src/libsystemd-basic/src/mkdir-label.c (renamed from src/basic/mkdir-label.c)4
-rw-r--r--src/libsystemd-basic/src/mkdir.c (renamed from src/basic/mkdir.c)12
-rw-r--r--src/libsystemd-basic/src/mount-util.c (renamed from src/basic/mount-util.c)24
-rw-r--r--src/libsystemd-basic/src/ordered-set.c (renamed from src/basic/ordered-set.c)4
-rw-r--r--src/libsystemd-basic/src/parse-util.c (renamed from src/basic/parse-util.c)12
-rw-r--r--src/libsystemd-basic/src/path-util.c (renamed from src/basic/path-util.c)26
-rw-r--r--src/libsystemd-basic/src/prioq.c (renamed from src/basic/prioq.c)6
-rw-r--r--src/libsystemd-basic/src/proc-cmdline.c (renamed from src/basic/proc-cmdline.c)22
-rw-r--r--src/libsystemd-basic/src/process-util.c (renamed from src/basic/process-util.c)39
-rw-r--r--src/libsystemd-basic/src/random-util.c (renamed from src/basic/random-util.c)13
-rw-r--r--src/libsystemd-basic/src/ratelimit.c (renamed from src/basic/ratelimit.c)4
-rw-r--r--src/libsystemd-basic/src/replace-var.c (renamed from src/basic/replace-var.c)8
-rw-r--r--src/libsystemd-basic/src/rlimit-util.c (renamed from src/basic/rlimit-util.c)16
-rw-r--r--src/libsystemd-basic/src/rm-rf.c (renamed from src/basic/rm-rf.c)20
-rw-r--r--src/libsystemd-basic/src/selinux-util.c (renamed from src/basic/selinux-util.c)14
-rw-r--r--src/libsystemd-basic/src/sigbus.c (renamed from src/basic/sigbus.c)6
-rw-r--r--src/libsystemd-basic/src/signal-util.c (renamed from src/basic/signal-util.c)12
-rw-r--r--src/libsystemd-basic/src/siphash24.c (renamed from src/basic/siphash24.c)6
-rw-r--r--src/libsystemd-basic/src/smack-util.c (renamed from src/basic/smack-util.c)18
-rw-r--r--src/libsystemd-basic/src/socket-label.c (renamed from src/basic/socket-label.c)18
-rw-r--r--src/libsystemd-basic/src/socket-util.c (renamed from src/basic/socket-util.c)32
-rw-r--r--src/libsystemd-basic/src/stat-util.c (renamed from src/basic/stat-util.c)17
-rw-r--r--src/libsystemd-basic/src/strbuf.c (renamed from src/basic/strbuf.c)4
-rw-r--r--src/libsystemd-basic/src/string-table.c (renamed from src/basic/string-table.c)4
-rw-r--r--src/libsystemd-basic/src/string-util.c (renamed from src/basic/string-util.c)12
-rw-r--r--src/libsystemd-basic/src/strv.c (renamed from src/basic/strv.c)14
-rw-r--r--src/libsystemd-basic/src/strxcpyx.c (renamed from src/basic/strxcpyx.c)2
-rw-r--r--src/libsystemd-basic/src/syslog-util.c (renamed from src/basic/syslog-util.c)8
-rw-r--r--src/libsystemd-basic/src/terminal-util.c (renamed from src/basic/terminal-util.c)47
-rw-r--r--src/libsystemd-basic/src/time-util.c (renamed from src/basic/time-util.c)22
-rw-r--r--src/libsystemd-basic/src/unit-name.c (renamed from src/basic/unit-name.c)20
-rw-r--r--src/libsystemd-basic/src/user-util.c (renamed from src/basic/user-util.c)24
-rw-r--r--src/libsystemd-basic/src/utf8.c (renamed from src/basic/utf8.c)8
-rw-r--r--src/libsystemd-basic/src/util.c (renamed from src/basic/util.c)50
-rw-r--r--src/libsystemd-basic/src/verbs.c (renamed from src/basic/verbs.c)10
-rw-r--r--src/libsystemd-basic/src/virt.c (renamed from src/basic/virt.c)22
-rw-r--r--src/libsystemd-basic/src/web-util.c (renamed from src/basic/web-util.c)6
-rw-r--r--src/libsystemd-basic/src/xattr-util.c (renamed from src/basic/xattr-util.c)14
-rw-r--r--src/libsystemd-basic/src/xml.c (renamed from src/basic/xml.c)6
-rw-r--r--src/libsystemd-blkid/include/systemd-blkid/blkid-util.h (renamed from src/basic/blkid-util.h)2
l---------src/libsystemd-firewall/GNUmakefile1
-rw-r--r--src/libsystemd-firewall/Makefile28
-rw-r--r--src/libsystemd-firewall/include/systemd-firewall/firewall-util.h (renamed from src/shared/firewall-util.h)2
l---------src/libsystemd-firewall/src/GNUmakefile1
-rw-r--r--src/libsystemd-firewall/src/Makefile41
-rw-r--r--src/libsystemd-firewall/src/firewall-util.c (renamed from src/shared/firewall-util.c)15
l---------src/libsystemd-gcrypt/GNUmakefile1
-rw-r--r--src/libsystemd-gcrypt/Makefile28
-rw-r--r--src/libsystemd-gcrypt/include/systemd-gcrypt/gcrypt-util.h (renamed from src/shared/gcrypt-util.h)0
l---------src/libsystemd-gcrypt/src/GNUmakefile1
-rw-r--r--src/libsystemd-gcrypt/src/Makefile26
-rw-r--r--src/libsystemd-gcrypt/src/gcrypt-util.c (renamed from src/shared/gcrypt-util.c)4
l---------src/libsystemd-network/GNUmakefile1
-rw-r--r--[l---------]src/libsystemd-network/Makefile30
l---------src/libsystemd-network/include/systemd-network/_sd-common.h1
-rw-r--r--src/libsystemd-network/include/systemd-network/arp-util.h (renamed from src/libsystemd-network/arp-util.h)4
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-identifier.h (renamed from src/libsystemd-network/dhcp-identifier.h)8
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-internal.h (renamed from src/libsystemd-network/dhcp-internal.h)7
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h (renamed from src/libsystemd-network/dhcp-lease-internal.h)7
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-protocol.h (renamed from src/libsystemd-network/dhcp-protocol.h)4
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-server-internal.h (renamed from src/libsystemd-network/dhcp-server-internal.h)11
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp6-internal.h (renamed from src/libsystemd-network/dhcp6-internal.h)8
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h (renamed from src/libsystemd-network/dhcp6-lease-internal.h)3
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp6-protocol.h (renamed from src/libsystemd-network/dhcp6-protocol.h)4
-rw-r--r--src/libsystemd-network/include/systemd-network/icmp6-util.h (renamed from src/libsystemd-network/icmp6-util.h)0
-rw-r--r--src/libsystemd-network/include/systemd-network/lldp-internal.h (renamed from src/libsystemd-network/lldp-internal.h)11
-rw-r--r--src/libsystemd-network/include/systemd-network/lldp-neighbor.h (renamed from src/libsystemd-network/lldp-neighbor.h)6
-rw-r--r--src/libsystemd-network/include/systemd-network/lldp-network.h (renamed from src/libsystemd-network/lldp-network.h)2
-rw-r--r--src/libsystemd-network/include/systemd-network/ndisc-internal.h (renamed from src/libsystemd-network/ndisc-internal.h)2
-rw-r--r--src/libsystemd-network/include/systemd-network/ndisc-router.h (renamed from src/libsystemd-network/ndisc-router.h)4
-rw-r--r--src/libsystemd-network/include/systemd-network/network-internal.h (renamed from src/libsystemd-network/network-internal.h)6
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp-client.h (renamed from src/systemd/sd-dhcp-client.h)5
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp-lease.h (renamed from src/systemd/sd-dhcp-lease.h)0
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp-server.h (renamed from src/systemd/sd-dhcp-server.h)2
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h (renamed from src/systemd/sd-dhcp6-client.h)5
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp6-lease.h (renamed from src/systemd/sd-dhcp6-lease.h)0
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-ipv4acd.h (renamed from src/systemd/sd-ipv4acd.h)2
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-ipv4ll.h (renamed from src/systemd/sd-ipv4ll.h)2
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-lldp.h (renamed from src/systemd/sd-lldp.h)2
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-ndisc.h (renamed from src/systemd/sd-ndisc.h)2
l---------src/libsystemd-network/src/GNUmakefile1
-rw-r--r--src/libsystemd-network/src/Makefile83
-rw-r--r--src/libsystemd-network/src/arp-util.c (renamed from src/libsystemd-network/arp-util.c)9
-rw-r--r--src/libsystemd-network/src/dhcp-identifier.c (renamed from src/libsystemd-network/dhcp-identifier.c)20
-rw-r--r--src/libsystemd-network/src/dhcp-network.c (renamed from src/libsystemd-network/dhcp-network.c)7
-rw-r--r--src/libsystemd-network/src/dhcp-option.c (renamed from src/libsystemd-network/dhcp-option.c)7
-rw-r--r--src/libsystemd-network/src/dhcp-packet.c (renamed from src/libsystemd-network/dhcp-packet.c)4
-rw-r--r--src/libsystemd-network/src/dhcp6-network.c (renamed from src/libsystemd-network/dhcp6-network.c)9
-rw-r--r--src/libsystemd-network/src/dhcp6-option.c (renamed from src/libsystemd-network/dhcp6-option.c)19
-rw-r--r--src/libsystemd-network/src/icmp6-util.c (renamed from src/libsystemd-network/icmp6-util.c)9
-rw-r--r--src/libsystemd-network/src/lldp-neighbor.c (renamed from src/libsystemd-network/lldp-neighbor.c)16
-rw-r--r--src/libsystemd-network/src/lldp-network.c (renamed from src/libsystemd-network/lldp-network.c)9
-rw-r--r--src/libsystemd-network/src/ndisc-router.c (renamed from src/libsystemd-network/ndisc-router.c)17
-rw-r--r--src/libsystemd-network/src/network-internal.c (renamed from src/libsystemd-network/network-internal.c)36
-rw-r--r--src/libsystemd-network/src/sd-dhcp-client.c (renamed from src/libsystemd-network/sd-dhcp-client.c)26
-rw-r--r--src/libsystemd-network/src/sd-dhcp-lease.c (renamed from src/libsystemd-network/sd-dhcp-lease.c)31
-rw-r--r--src/libsystemd-network/src/sd-dhcp-server.c (renamed from src/libsystemd-network/sd-dhcp-server.c)19
-rw-r--r--src/libsystemd-network/src/sd-dhcp6-client.c (renamed from src/libsystemd-network/sd-dhcp6-client.c)28
-rw-r--r--src/libsystemd-network/src/sd-dhcp6-lease.c (renamed from src/libsystemd-network/sd-dhcp6-lease.c)10
-rw-r--r--src/libsystemd-network/src/sd-ipv4acd.c (renamed from src/libsystemd-network/sd-ipv4acd.c)23
-rw-r--r--src/libsystemd-network/src/sd-ipv4ll.c (renamed from src/libsystemd-network/sd-ipv4ll.c)23
-rw-r--r--src/libsystemd-network/src/sd-lldp.c (renamed from src/libsystemd-network/sd-lldp.c)17
-rw-r--r--src/libsystemd-network/src/sd-ndisc.c (renamed from src/libsystemd-network/sd-ndisc.c)21
l---------src/libsystemd-network/test/GNUmakefile1
-rw-r--r--src/libsystemd-network/test/Makefile118
-rw-r--r--src/libsystemd-network/test/test-acd.c (renamed from src/libsystemd-network/test-acd.c)14
-rw-r--r--src/libsystemd-network/test/test-dhcp-client.c (renamed from src/libsystemd-network/test-dhcp-client.c)18
-rw-r--r--src/libsystemd-network/test/test-dhcp-option.c (renamed from src/libsystemd-network/test-dhcp-option.c)10
-rw-r--r--src/libsystemd-network/test/test-dhcp-server.c (renamed from src/libsystemd-network/test-dhcp-server.c)6
-rw-r--r--src/libsystemd-network/test/test-dhcp6-client.c (renamed from src/libsystemd-network/test-dhcp6-client.c)20
-rw-r--r--src/libsystemd-network/test/test-ipv4ll-manual.c (renamed from src/libsystemd-network/test-ipv4ll-manual.c)19
-rw-r--r--src/libsystemd-network/test/test-ipv4ll.c (renamed from src/libsystemd-network/test-ipv4ll.c)11
-rw-r--r--src/libsystemd-network/test/test-lldp.c (renamed from src/libsystemd-network/test-lldp.c)16
-rw-r--r--src/libsystemd-network/test/test-ndisc-rs.c (renamed from src/libsystemd-network/test-ndisc-rs.c)15
l---------src/libsystemd-shared/GNUmakefile1
-rw-r--r--src/libsystemd-shared/Makefile28
-rw-r--r--src/libsystemd-shared/include/systemd-shared/acl-util.h (renamed from src/shared/acl-util.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/acpi-fpdt.h (renamed from src/shared/acpi-fpdt.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/apparmor-util.h (renamed from src/shared/apparmor-util.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/ask-password-api.h (renamed from src/shared/ask-password-api.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/base-filesystem.h (renamed from src/shared/base-filesystem.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/boot-timestamps.h (renamed from src/shared/boot-timestamps.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/bus-unit-util.h (renamed from src/shared/bus-unit-util.h)4
-rw-r--r--src/libsystemd-shared/include/systemd-shared/cgroup-show.h (renamed from src/shared/cgroup-show.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/clean-ipc.h (renamed from src/shared/clean-ipc.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/condition.h (renamed from src/shared/condition.h)4
-rw-r--r--src/libsystemd-shared/include/systemd-shared/conf-parser.h (renamed from src/shared/conf-parser.h)6
-rw-r--r--src/libsystemd-shared/include/systemd-shared/dev-setup.h (renamed from src/shared/dev-setup.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/dns-domain.h (renamed from src/shared/dns-domain.h)4
-rw-r--r--src/libsystemd-shared/include/systemd-shared/dropin.h (renamed from src/shared/dropin.h)8
-rw-r--r--src/libsystemd-shared/include/systemd-shared/efivars.h (renamed from src/shared/efivars.h)4
-rw-r--r--src/libsystemd-shared/include/systemd-shared/fdset.h (renamed from src/shared/fdset.h)6
-rw-r--r--src/libsystemd-shared/include/systemd-shared/fstab-util.h (renamed from src/shared/fstab-util.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/generator.h (renamed from src/shared/generator.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/gpt.h (renamed from src/shared/gpt.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/ima-util.h (renamed from src/shared/ima-util.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/import-util.h (renamed from src/shared/import-util.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/initreq.h (renamed from src/shared/initreq.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/install-printf.h (renamed from src/shared/install-printf.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/install.h (renamed from src/shared/install.h)21
-rw-r--r--src/libsystemd-shared/include/systemd-shared/logs-show.h (renamed from src/shared/logs-show.h)9
-rw-r--r--src/libsystemd-shared/include/systemd-shared/machine-image.h (renamed from src/shared/machine-image.h)12
-rw-r--r--src/libsystemd-shared/include/systemd-shared/machine-pool.h (renamed from src/shared/machine-pool.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/output-mode.h (renamed from src/shared/output-mode.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/pager.h (renamed from src/shared/pager.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/path-lookup.h (renamed from src/shared/path-lookup.h)3
-rw-r--r--src/libsystemd-shared/include/systemd-shared/ptyfwd.h (renamed from src/shared/ptyfwd.h)4
-rw-r--r--src/libsystemd-shared/include/systemd-shared/resolve-util.h (renamed from src/shared/resolve-util.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/seccomp-util.h (renamed from src/shared/seccomp-util.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/sleep-config.h (renamed from src/shared/sleep-config.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/spawn-ask-password-agent.h (renamed from src/shared/spawn-ask-password-agent.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/spawn-polkit-agent.h (renamed from src/shared/spawn-polkit-agent.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/specifier.h (renamed from src/shared/specifier.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/switch-root.h (renamed from src/shared/switch-root.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/sysctl-util.h (renamed from src/shared/sysctl-util.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/test-tables.h (renamed from src/shared/test-tables.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/tests.h (renamed from src/shared/tests.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/udev-util.h (renamed from src/shared/udev-util.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/uid-range.h (renamed from src/shared/uid-range.h)0
-rw-r--r--src/libsystemd-shared/include/systemd-shared/utmp-wtmp.h (renamed from src/shared/utmp-wtmp.h)4
-rw-r--r--src/libsystemd-shared/include/systemd-shared/vlan-util.h (renamed from src/shared/vlan-util.h)2
-rw-r--r--src/libsystemd-shared/include/systemd-shared/watchdog.h (renamed from src/shared/watchdog.h)4
l---------src/libsystemd-shared/src/GNUmakefile1
-rw-r--r--src/libsystemd-shared/src/Makefile182
-rw-r--r--src/libsystemd-shared/src/acl-util.c (renamed from src/shared/acl-util.c)12
-rw-r--r--src/libsystemd-shared/src/acpi-fpdt.c (renamed from src/shared/acpi-fpdt.c)10
-rw-r--r--src/libsystemd-shared/src/apparmor-util.c (renamed from src/shared/apparmor-util.c)8
-rw-r--r--src/libsystemd-shared/src/ask-password-api.c (renamed from src/shared/ask-password-api.c)40
-rw-r--r--src/libsystemd-shared/src/base-filesystem.c (renamed from src/shared/base-filesystem.c)18
-rw-r--r--src/libsystemd-shared/src/boot-timestamps.c (renamed from src/shared/boot-timestamps.c)10
-rw-r--r--src/libsystemd-shared/src/bus-unit-util.c (renamed from src/shared/bus-unit-util.c)40
-rw-r--r--src/libsystemd-shared/src/cgroup-show.c (renamed from src/shared/cgroup-show.c)24
-rw-r--r--src/libsystemd-shared/src/clean-ipc.c (renamed from src/shared/clean-ipc.c)20
-rw-r--r--src/libsystemd-shared/src/condition.c (renamed from src/shared/condition.c)54
-rw-r--r--src/libsystemd-shared/src/conf-parser.c (renamed from src/shared/conf-parser.c)36
-rw-r--r--src/libsystemd-shared/src/dev-setup.c (renamed from src/shared/dev-setup.c)14
-rw-r--r--src/libsystemd-shared/src/dns-domain.c (renamed from src/shared/dns-domain.c)20
-rw-r--r--src/libsystemd-shared/src/dropin.c (renamed from src/shared/dropin.c)30
-rw-r--r--src/libsystemd-shared/src/efivars.c (renamed from src/shared/efivars.c)28
-rw-r--r--src/libsystemd-shared/src/fdset.c (renamed from src/shared/fdset.c)18
-rw-r--r--src/libsystemd-shared/src/fstab-util.c (renamed from src/shared/fstab-util.c)20
-rw-r--r--src/libsystemd-shared/src/generator.c (renamed from src/shared/generator.c)32
-rw-r--r--src/libsystemd-shared/src/ima-util.c (renamed from src/shared/ima-util.c)2
-rw-r--r--src/libsystemd-shared/src/import-util.c (renamed from src/shared/import-util.c)18
-rw-r--r--src/libsystemd-shared/src/install-printf.c (renamed from src/shared/install-printf.c)16
-rw-r--r--src/libsystemd-shared/src/install.c (renamed from src/shared/install.c)50
-rw-r--r--src/libsystemd-shared/src/logs-show.c (renamed from src/shared/logs-show.c)48
-rw-r--r--src/libsystemd-shared/src/machine-image.c (renamed from src/shared/machine-image.c)46
-rw-r--r--src/libsystemd-shared/src/machine-pool.c (renamed from src/shared/machine-pool.c)45
-rw-r--r--src/libsystemd-shared/src/output-mode.c (renamed from src/shared/output-mode.c)4
-rw-r--r--src/libsystemd-shared/src/pager.c (renamed from src/shared/pager.c)22
-rw-r--r--src/libsystemd-shared/src/path-lookup.c (renamed from src/shared/path-lookup.c)24
-rw-r--r--src/libsystemd-shared/src/ptyfwd.c (renamed from src/shared/ptyfwd.c)16
-rw-r--r--src/libsystemd-shared/src/resolve-util.c (renamed from src/shared/resolve-util.c)6
-rw-r--r--src/libsystemd-shared/src/seccomp-util.c (renamed from src/shared/seccomp-util.c)9
-rw-r--r--src/libsystemd-shared/src/sleep-config.c (renamed from src/shared/sleep-config.c)24
-rw-r--r--src/libsystemd-shared/src/spawn-ask-password-agent.c (renamed from src/shared/spawn-ask-password-agent.c)8
-rw-r--r--src/libsystemd-shared/src/spawn-polkit-agent.c (renamed from src/shared/spawn-polkit-agent.c)18
-rw-r--r--src/libsystemd-shared/src/specifier.c (renamed from src/shared/specifier.c)12
-rw-r--r--src/libsystemd-shared/src/switch-root.c (renamed from src/shared/switch-root.c)24
-rw-r--r--src/libsystemd-shared/src/sysctl-util.c (renamed from src/shared/sysctl-util.c)10
-rw-r--r--src/libsystemd-shared/src/tests.c (renamed from src/shared/tests.c)4
-rw-r--r--src/libsystemd-shared/src/uid-range.c (renamed from src/shared/uid-range.c)6
-rw-r--r--src/libsystemd-shared/src/utmp-wtmp.c (renamed from src/shared/utmp-wtmp.c)22
-rw-r--r--src/libsystemd-shared/src/vlan-util.c (renamed from src/shared/vlan-util.c)6
-rw-r--r--src/libsystemd-shared/src/watchdog.c (renamed from src/shared/watchdog.c)9
l---------src/libsystemd/GNUmakefile1
-rw-r--r--[l---------]src/libsystemd/Makefile110
-rw-r--r--src/libsystemd/include-staging/systemd-staging/sd-device.h (renamed from src/systemd/sd-device.h)2
-rw-r--r--src/libsystemd/include-staging/systemd-staging/sd-hwdb.h (renamed from src/systemd/sd-hwdb.h)2
-rw-r--r--src/libsystemd/include-staging/systemd-staging/sd-netlink.h (renamed from src/systemd/sd-netlink.h)6
-rw-r--r--src/libsystemd/include-staging/systemd-staging/sd-network.h (renamed from src/systemd/sd-network.h)2
-rw-r--r--src/libsystemd/include-staging/systemd-staging/sd-resolve.h (renamed from src/systemd/sd-resolve.h)5
-rw-r--r--src/libsystemd/include/systemd/_sd-common.h (renamed from src/systemd/_sd-common.h)0
-rw-r--r--src/libsystemd/include/systemd/sd-bus-protocol.h (renamed from src/systemd/sd-bus-protocol.h)0
-rw-r--r--src/libsystemd/include/systemd/sd-bus-vtable.h (renamed from src/systemd/sd-bus-vtable.h)0
-rw-r--r--src/libsystemd/include/systemd/sd-bus.h (renamed from src/systemd/sd-bus.h)7
-rw-r--r--src/libsystemd/include/systemd/sd-daemon.h (renamed from src/systemd/sd-daemon.h)0
-rw-r--r--src/libsystemd/include/systemd/sd-event.h (renamed from src/systemd/sd-event.h)0
-rw-r--r--src/libsystemd/include/systemd/sd-id128.h (renamed from src/systemd/sd-id128.h)0
-rw-r--r--src/libsystemd/include/systemd/sd-journal.h (renamed from src/systemd/sd-journal.h)3
-rw-r--r--src/libsystemd/include/systemd/sd-login.h (renamed from src/systemd/sd-login.h)0
-rw-r--r--src/libsystemd/include/systemd/sd-messages.h (renamed from src/systemd/sd-messages.h)3
-rw-r--r--src/libsystemd/include/systemd/sd-utf8.h (renamed from src/systemd/sd-utf8.h)0
-rw-r--r--src/libsystemd/libsystemd-pkgconfig.xml (renamed from man/libsystemd-pkgconfig.xml)0
-rw-r--r--src/libsystemd/sd-bus-errors.xml (renamed from man/sd-bus-errors.xml)0
-rw-r--r--src/libsystemd/sd-bus.xml (renamed from man/sd-bus.xml)0
l---------src/libsystemd/sd-bus/Makefile1
-rw-r--r--src/libsystemd/sd-daemon.xml (renamed from man/sd-daemon.xml)0
l---------src/libsystemd/sd-daemon/Makefile1
l---------src/libsystemd/sd-device/Makefile1
-rw-r--r--src/libsystemd/sd-event.xml (renamed from man/sd-event.xml)0
l---------src/libsystemd/sd-event/Makefile1
l---------src/libsystemd/sd-hwdb/Makefile1
-rw-r--r--src/libsystemd/sd-id128.xml (renamed from man/sd-id128.xml)0
l---------src/libsystemd/sd-id128/Makefile1
-rw-r--r--src/libsystemd/sd-journal.xml (renamed from man/sd-journal.xml)0
-rw-r--r--src/libsystemd/sd-login.xml (renamed from man/sd-login.xml)0
l---------src/libsystemd/sd-login/Makefile1
l---------src/libsystemd/sd-netlink/Makefile1
l---------src/libsystemd/sd-network/Makefile1
l---------src/libsystemd/sd-path/Makefile1
l---------src/libsystemd/sd-resolve/Makefile1
l---------src/libsystemd/sd-utf8/Makefile1
-rw-r--r--src/libsystemd/sd_booted.xml (renamed from man/sd_booted.xml)0
-rw-r--r--src/libsystemd/sd_bus_add_match.xml (renamed from man/sd_bus_add_match.xml)0
-rw-r--r--src/libsystemd/sd_bus_creds_get_pid.xml (renamed from man/sd_bus_creds_get_pid.xml)0
-rw-r--r--src/libsystemd/sd_bus_creds_new_from_pid.xml (renamed from man/sd_bus_creds_new_from_pid.xml)0
-rw-r--r--src/libsystemd/sd_bus_default.xml (renamed from man/sd_bus_default.xml)0
-rw-r--r--src/libsystemd/sd_bus_error.xml (renamed from man/sd_bus_error.xml)0
-rw-r--r--src/libsystemd/sd_bus_error_add_map.xml (renamed from man/sd_bus_error_add_map.xml)0
-rw-r--r--src/libsystemd/sd_bus_get_fd.xml (renamed from man/sd_bus_get_fd.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_append.xml (renamed from man/sd_bus_message_append.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_append_array.xml (renamed from man/sd_bus_message_append_array.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_append_basic.xml (renamed from man/sd_bus_message_append_basic.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_append_string_memfd.xml (renamed from man/sd_bus_message_append_string_memfd.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_append_strv.xml (renamed from man/sd_bus_message_append_strv.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_get_cookie.xml (renamed from man/sd_bus_message_get_cookie.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_get_monotonic_usec.xml (renamed from man/sd_bus_message_get_monotonic_usec.xml)0
-rw-r--r--src/libsystemd/sd_bus_message_read_basic.xml (renamed from man/sd_bus_message_read_basic.xml)0
-rw-r--r--src/libsystemd/sd_bus_negotiate_fds.xml (renamed from man/sd_bus_negotiate_fds.xml)0
-rw-r--r--src/libsystemd/sd_bus_new.xml (renamed from man/sd_bus_new.xml)0
-rw-r--r--src/libsystemd/sd_bus_path_encode.xml (renamed from man/sd_bus_path_encode.xml)0
-rw-r--r--src/libsystemd/sd_bus_process.xml (renamed from man/sd_bus_process.xml)0
-rw-r--r--src/libsystemd/sd_bus_request_name.xml (renamed from man/sd_bus_request_name.xml)0
-rw-r--r--src/libsystemd/sd_bus_track_add_name.xml (renamed from man/sd_bus_track_add_name.xml)0
-rw-r--r--src/libsystemd/sd_bus_track_new.xml (renamed from man/sd_bus_track_new.xml)0
-rw-r--r--src/libsystemd/sd_event_add_child.xml (renamed from man/sd_event_add_child.xml)0
-rw-r--r--src/libsystemd/sd_event_add_defer.xml (renamed from man/sd_event_add_defer.xml)0
-rw-r--r--src/libsystemd/sd_event_add_io.xml (renamed from man/sd_event_add_io.xml)0
-rw-r--r--src/libsystemd/sd_event_add_signal.xml (renamed from man/sd_event_add_signal.xml)0
-rw-r--r--src/libsystemd/sd_event_add_time.xml (renamed from man/sd_event_add_time.xml)0
-rw-r--r--src/libsystemd/sd_event_exit.xml (renamed from man/sd_event_exit.xml)0
-rw-r--r--src/libsystemd/sd_event_get_fd-glib-example.c (renamed from man/glib-event-glue.c)0
-rw-r--r--src/libsystemd/sd_event_get_fd.xml (renamed from man/sd_event_get_fd.xml)0
-rw-r--r--src/libsystemd/sd_event_new.xml (renamed from man/sd_event_new.xml)0
-rw-r--r--src/libsystemd/sd_event_now.xml (renamed from man/sd_event_now.xml)0
-rw-r--r--src/libsystemd/sd_event_run.xml (renamed from man/sd_event_run.xml)0
-rw-r--r--src/libsystemd/sd_event_set_watchdog.xml (renamed from man/sd_event_set_watchdog.xml)0
-rw-r--r--src/libsystemd/sd_event_source_get_event.xml (renamed from man/sd_event_source_get_event.xml)0
-rw-r--r--src/libsystemd/sd_event_source_get_pending.xml (renamed from man/sd_event_source_get_pending.xml)0
-rw-r--r--src/libsystemd/sd_event_source_set_description.xml (renamed from man/sd_event_source_set_description.xml)0
-rw-r--r--src/libsystemd/sd_event_source_set_enabled.xml (renamed from man/sd_event_source_set_enabled.xml)0
-rw-r--r--src/libsystemd/sd_event_source_set_prepare.xml (renamed from man/sd_event_source_set_prepare.xml)0
-rw-r--r--src/libsystemd/sd_event_source_set_priority.xml (renamed from man/sd_event_source_set_priority.xml)0
-rw-r--r--src/libsystemd/sd_event_source_set_userdata.xml (renamed from man/sd_event_source_set_userdata.xml)0
-rw-r--r--src/libsystemd/sd_event_source_unref.xml (renamed from man/sd_event_source_unref.xml)0
-rw-r--r--src/libsystemd/sd_event_wait.xml (renamed from man/sd_event_wait.xml)0
-rw-r--r--src/libsystemd/sd_get_seats.xml (renamed from man/sd_get_seats.xml)0
-rw-r--r--src/libsystemd/sd_id128_get_machine.xml (renamed from man/sd_id128_get_machine.xml)0
-rw-r--r--src/libsystemd/sd_id128_randomize.xml (renamed from man/sd_id128_randomize.xml)0
-rw-r--r--src/libsystemd/sd_id128_to_string.xml (renamed from man/sd_id128_to_string.xml)0
-rw-r--r--src/libsystemd/sd_is_fifo.xml (renamed from man/sd_is_fifo.xml)0
-rw-r--r--src/libsystemd/sd_journal_add_match.xml (renamed from man/sd_journal_add_match.xml)0
-rw-r--r--src/libsystemd/sd_journal_enumerate_fields.xml (renamed from man/sd_journal_enumerate_fields.xml)0
-rw-r--r--src/libsystemd/sd_journal_get_catalog.xml (renamed from man/sd_journal_get_catalog.xml)0
-rw-r--r--src/libsystemd/sd_journal_get_cursor.xml (renamed from man/sd_journal_get_cursor.xml)0
-rw-r--r--src/libsystemd/sd_journal_get_cutoff_realtime_usec.xml (renamed from man/sd_journal_get_cutoff_realtime_usec.xml)0
-rw-r--r--src/libsystemd/sd_journal_get_data.xml (renamed from man/sd_journal_get_data.xml)0
-rw-r--r--src/libsystemd/sd_journal_get_fd.xml (renamed from man/sd_journal_get_fd.xml)0
-rw-r--r--src/libsystemd/sd_journal_get_realtime_usec.xml (renamed from man/sd_journal_get_realtime_usec.xml)0
-rw-r--r--src/libsystemd/sd_journal_get_usage.xml (renamed from man/sd_journal_get_usage.xml)0
-rw-r--r--src/libsystemd/sd_journal_has_runtime_files.xml (renamed from man/sd_journal_has_runtime_files.xml)0
-rw-r--r--src/libsystemd/sd_journal_next.xml (renamed from man/sd_journal_next.xml)0
-rw-r--r--src/libsystemd/sd_journal_open.xml (renamed from man/sd_journal_open.xml)0
-rw-r--r--src/libsystemd/sd_journal_print.xml (renamed from man/sd_journal_print.xml)0
-rw-r--r--src/libsystemd/sd_journal_query_unique.xml (renamed from man/sd_journal_query_unique.xml)0
-rw-r--r--src/libsystemd/sd_journal_seek_head.xml (renamed from man/sd_journal_seek_head.xml)0
-rw-r--r--src/libsystemd/sd_journal_stream_fd.xml (renamed from man/sd_journal_stream_fd.xml)0
-rw-r--r--src/libsystemd/sd_listen_fds.xml (renamed from man/sd_listen_fds.xml)0
-rw-r--r--src/libsystemd/sd_login_monitor_new.xml (renamed from man/sd_login_monitor_new.xml)0
-rw-r--r--src/libsystemd/sd_machine_get_class.xml (renamed from man/sd_machine_get_class.xml)0
-rw-r--r--src/libsystemd/sd_notify.xml (renamed from man/sd_notify.xml)0
-rw-r--r--src/libsystemd/sd_pid_get_session.xml (renamed from man/sd_pid_get_session.xml)0
-rw-r--r--src/libsystemd/sd_seat_get_active.xml (renamed from man/sd_seat_get_active.xml)0
-rw-r--r--src/libsystemd/sd_session_is_active.xml (renamed from man/sd_session_is_active.xml)0
-rw-r--r--src/libsystemd/sd_uid_get_state.xml (renamed from man/sd_uid_get_state.xml)0
-rw-r--r--src/libsystemd/sd_watchdog_enabled.xml (renamed from man/sd_watchdog_enabled.xml)0
l---------src/libsystemd/src/GNUmakefile1
-rw-r--r--src/libsystemd/src/Makefile203
-rw-r--r--src/libsystemd/src/sd-bus/DIFFERENCES (renamed from src/libsystemd/sd-bus/DIFFERENCES)0
l---------src/libsystemd/src/sd-bus/GNUmakefile1
-rw-r--r--src/libsystemd/src/sd-bus/GVARIANT-SERIALIZATION (renamed from src/libsystemd/sd-bus/GVARIANT-SERIALIZATION)0
-rw-r--r--src/libsystemd/src/sd-bus/Makefile26
-rw-r--r--src/libsystemd/src/sd-bus/PORTING-DBUS1 (renamed from src/libsystemd/sd-bus/PORTING-DBUS1)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-bloom.c (renamed from src/libsystemd/sd-bus/bus-bloom.c)5
-rw-r--r--src/libsystemd/src/sd-bus/bus-bloom.h (renamed from src/libsystemd/sd-bus/bus-bloom.h)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-common-errors.c (renamed from src/libsystemd/sd-bus/bus-common-errors.c)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-common-errors.h (renamed from src/libsystemd/sd-bus/bus-common-errors.h)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-container.c (renamed from src/libsystemd/sd-bus/bus-container.c)7
-rw-r--r--src/libsystemd/src/sd-bus/bus-container.h (renamed from src/libsystemd/sd-bus/bus-container.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-control.c (renamed from src/libsystemd/sd-bus/bus-control.c)15
-rw-r--r--src/libsystemd/src/sd-bus/bus-control.h (renamed from src/libsystemd/sd-bus/bus-control.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-convenience.c (renamed from src/libsystemd/sd-bus/bus-convenience.c)3
-rw-r--r--src/libsystemd/src/sd-bus/bus-creds.c (renamed from src/libsystemd/sd-bus/bus-creds.c)36
-rw-r--r--src/libsystemd/src/sd-bus/bus-creds.h (renamed from src/libsystemd/sd-bus/bus-creds.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-dump.c (renamed from src/libsystemd/sd-bus/bus-dump.c)23
-rw-r--r--src/libsystemd/src/sd-bus/bus-dump.h (renamed from src/libsystemd/sd-bus/bus-dump.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-error.c (renamed from src/libsystemd/sd-bus/bus-error.c)11
-rw-r--r--src/libsystemd/src/sd-bus/bus-error.h (renamed from src/libsystemd/sd-bus/bus-error.h)4
-rw-r--r--src/libsystemd/src/sd-bus/bus-gvariant.c (renamed from src/libsystemd/sd-bus/bus-gvariant.c)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-gvariant.h (renamed from src/libsystemd/sd-bus/bus-gvariant.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-internal.c (renamed from src/libsystemd/sd-bus/bus-internal.c)7
-rw-r--r--src/libsystemd/src/sd-bus/bus-internal.h (renamed from src/libsystemd/sd-bus/bus-internal.h)15
-rw-r--r--src/libsystemd/src/sd-bus/bus-introspect.c (renamed from src/libsystemd/sd-bus/bus-introspect.c)9
-rw-r--r--src/libsystemd/src/sd-bus/bus-introspect.h (renamed from src/libsystemd/sd-bus/bus-introspect.h)4
-rw-r--r--src/libsystemd/src/sd-bus/bus-kernel.c (renamed from src/libsystemd/sd-bus/bus-kernel.c)27
-rw-r--r--src/libsystemd/src/sd-bus/bus-kernel.h (renamed from src/libsystemd/sd-bus/bus-kernel.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-match.c (renamed from src/libsystemd/sd-bus/bus-match.c)13
-rw-r--r--src/libsystemd/src/sd-bus/bus-match.h (renamed from src/libsystemd/sd-bus/bus-match.h)4
-rw-r--r--src/libsystemd/src/sd-bus/bus-message.c (renamed from src/libsystemd/sd-bus/bus-message.c)21
-rw-r--r--src/libsystemd/src/sd-bus/bus-message.h (renamed from src/libsystemd/sd-bus/bus-message.h)7
-rw-r--r--src/libsystemd/src/sd-bus/bus-objects.c (renamed from src/libsystemd/sd-bus/bus-objects.c)9
-rw-r--r--src/libsystemd/src/sd-bus/bus-objects.h (renamed from src/libsystemd/sd-bus/bus-objects.h)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-protocol.h (renamed from src/libsystemd/sd-bus/bus-protocol.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-signature.c (renamed from src/libsystemd/sd-bus/bus-signature.c)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-signature.h (renamed from src/libsystemd/sd-bus/bus-signature.h)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-slot.c (renamed from src/libsystemd/sd-bus/bus-slot.c)7
-rw-r--r--src/libsystemd/src/sd-bus/bus-slot.h (renamed from src/libsystemd/sd-bus/bus-slot.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-socket.c (renamed from src/libsystemd/sd-bus/bus-socket.c)31
-rw-r--r--src/libsystemd/src/sd-bus/bus-socket.h (renamed from src/libsystemd/sd-bus/bus-socket.h)2
-rw-r--r--src/libsystemd/src/sd-bus/bus-track.c (renamed from src/libsystemd/sd-bus/bus-track.c)5
-rw-r--r--src/libsystemd/src/sd-bus/bus-track.h (renamed from src/libsystemd/sd-bus/bus-track.h)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-type.c (renamed from src/libsystemd/sd-bus/bus-type.c)0
-rw-r--r--src/libsystemd/src/sd-bus/bus-type.h (renamed from src/libsystemd/sd-bus/bus-type.h)4
-rw-r--r--src/libsystemd/src/sd-bus/bus-util.c (renamed from src/shared/bus-util.c)35
-rw-r--r--src/libsystemd/src/sd-bus/bus-util.h (renamed from src/shared/bus-util.h)10
-rw-r--r--src/libsystemd/src/sd-bus/kdbus.h (renamed from src/libsystemd/sd-bus/kdbus.h)0
-rw-r--r--src/libsystemd/src/sd-bus/sd-bus.c (renamed from src/libsystemd/sd-bus/sd-bus.c)29
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-benchmark.c (renamed from src/libsystemd/sd-bus/test-bus-benchmark.c)13
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-chat.c (renamed from src/libsystemd/sd-bus/test-bus-chat.c)15
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-cleanup.c (renamed from src/libsystemd/sd-bus/test-bus-cleanup.c)5
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-creds.c (renamed from src/libsystemd/sd-bus/test-bus-creds.c)5
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-error.c (renamed from src/libsystemd/sd-bus/test-bus-error.c)5
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-gvariant.c (renamed from src/libsystemd/sd-bus/test-bus-gvariant.c)9
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-introspect.c (renamed from src/libsystemd/sd-bus/test-bus-introspect.c)3
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c (renamed from src/libsystemd/sd-bus/test-bus-kernel-bloom.c)11
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-kernel.c (renamed from src/libsystemd/sd-bus/test-bus-kernel.c)11
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-marshal.c (renamed from src/libsystemd/sd-bus/test-bus-marshal.c)15
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-match.c (renamed from src/libsystemd/sd-bus/test-bus-match.c)5
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-objects.c (renamed from src/libsystemd/sd-bus/test-bus-objects.c)13
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-server.c (renamed from src/libsystemd/sd-bus/test-bus-server.c)9
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-signature.c (renamed from src/libsystemd/sd-bus/test-bus-signature.c)5
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-track.c (renamed from src/libsystemd/sd-bus/test-bus-track.c)4
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-zero-copy.c (renamed from src/libsystemd/sd-bus/test-bus-zero-copy.c)15
l---------src/libsystemd/src/sd-daemon/Makefile1
-rw-r--r--src/libsystemd/src/sd-daemon/sd-daemon.c (renamed from src/libsystemd/sd-daemon/sd-daemon.c)20
l---------src/libsystemd/src/sd-device/Makefile1
-rw-r--r--src/libsystemd/src/sd-device/device-enumerator-private.h (renamed from src/libsystemd/sd-device/device-enumerator-private.h)2
-rw-r--r--src/libsystemd/src/sd-device/device-enumerator.c (renamed from src/libsystemd/sd-device/device-enumerator.c)18
-rw-r--r--src/libsystemd/src/sd-device/device-internal.h (renamed from src/libsystemd/sd-device/device-internal.h)4
-rw-r--r--src/libsystemd/src/sd-device/device-private.c (renamed from src/libsystemd/sd-device/device-private.c)36
-rw-r--r--src/libsystemd/src/sd-device/device-private.h (renamed from src/libsystemd/sd-device/device-private.h)2
-rw-r--r--src/libsystemd/src/sd-device/device-util.h (renamed from src/libsystemd/sd-device/device-util.h)2
-rw-r--r--src/libsystemd/src/sd-device/sd-device.c (renamed from src/libsystemd/sd-device/sd-device.c)32
l---------src/libsystemd/src/sd-event/Makefile1
-rw-r--r--src/libsystemd/src/sd-event/sd-event.c (renamed from src/libsystemd/sd-event/sd-event.c)36
-rw-r--r--src/libsystemd/src/sd-event/test-event.c (renamed from src/libsystemd/sd-event/test-event.c)12
l---------src/libsystemd/src/sd-hwdb/GNUmakefile1
-rw-r--r--src/libsystemd/src/sd-hwdb/Makefile26
-rw-r--r--src/libsystemd/src/sd-hwdb/hwdb-internal.h (renamed from src/libsystemd/sd-hwdb/hwdb-internal.h)4
-rw-r--r--src/libsystemd/src/sd-hwdb/hwdb-util.h (renamed from src/libsystemd/sd-hwdb/hwdb-util.h)5
-rw-r--r--src/libsystemd/src/sd-hwdb/sd-hwdb.c (renamed from src/libsystemd/sd-hwdb/sd-hwdb.c)12
l---------src/libsystemd/src/sd-id128/Makefile1
-rw-r--r--src/libsystemd/src/sd-id128/id128-util.c (renamed from src/libsystemd/sd-id128/id128-util.c)9
-rw-r--r--src/libsystemd/src/sd-id128/id128-util.h (renamed from src/libsystemd/sd-id128/id128-util.h)6
-rw-r--r--src/libsystemd/src/sd-id128/sd-id128.c (renamed from src/libsystemd/sd-id128/sd-id128.c)15
l---------src/libsystemd/src/sd-journal/GNUmakefile1
-rw-r--r--src/libsystemd/src/sd-journal/Makefile42
-rw-r--r--src/libsystemd/src/sd-journal/audit-type.c (renamed from src/journal/audit-type.c)6
-rw-r--r--src/libsystemd/src/sd-journal/audit-type.h (renamed from src/journal/audit-type.h)2
-rw-r--r--src/libsystemd/src/sd-journal/catalog.c (renamed from src/journal/catalog.c)31
-rw-r--r--src/libsystemd/src/sd-journal/catalog.h (renamed from src/journal/catalog.h)6
-rw-r--r--src/libsystemd/src/sd-journal/compress.c (renamed from src/journal/compress.c)17
-rw-r--r--src/libsystemd/src/sd-journal/compress.h (renamed from src/journal/compress.h)0
-rw-r--r--src/libsystemd/src/sd-journal/fsprg.c (renamed from src/journal/fsprg.c)3
-rw-r--r--src/libsystemd/src/sd-journal/fsprg.h (renamed from src/journal/fsprg.h)4
-rw-r--r--src/libsystemd/src/sd-journal/journal-authenticate.c (renamed from src/journal/journal-authenticate.c)7
-rw-r--r--src/libsystemd/src/sd-journal/journal-authenticate.h (renamed from src/journal/journal-authenticate.h)0
-rw-r--r--src/libsystemd/src/sd-journal/journal-def.h (renamed from src/journal/journal-def.h)10
-rw-r--r--src/libsystemd/src/sd-journal/journal-file.c (renamed from src/journal/journal-file.c)27
-rw-r--r--src/libsystemd/src/sd-journal/journal-file.h (renamed from src/journal/journal-file.h)11
-rw-r--r--src/libsystemd/src/sd-journal/journal-internal.h (renamed from src/journal/journal-internal.h)11
-rw-r--r--src/libsystemd/src/sd-journal/journal-send.c (renamed from src/journal/journal-send.c)22
-rw-r--r--src/libsystemd/src/sd-journal/journal-vacuum.c (renamed from src/journal/journal-vacuum.c)17
-rw-r--r--src/libsystemd/src/sd-journal/journal-vacuum.h (renamed from src/journal/journal-vacuum.h)2
-rw-r--r--src/libsystemd/src/sd-journal/journal-verify.c (renamed from src/journal/journal-verify.c)15
-rw-r--r--src/libsystemd/src/sd-journal/journal-verify.h (renamed from src/journal/journal-verify.h)0
-rw-r--r--src/libsystemd/src/sd-journal/lookup3.c (renamed from src/journal/lookup3.c)0
-rw-r--r--src/libsystemd/src/sd-journal/lookup3.h (renamed from src/journal/lookup3.h)2
-rw-r--r--src/libsystemd/src/sd-journal/mmap-cache.c (renamed from src/journal/mmap-cache.c)17
-rw-r--r--src/libsystemd/src/sd-journal/mmap-cache.h (renamed from src/journal/mmap-cache.h)0
-rw-r--r--src/libsystemd/src/sd-journal/sd-journal.c (renamed from src/journal/sd-journal.c)40
l---------src/libsystemd/src/sd-login/Makefile1
-rw-r--r--src/libsystemd/src/sd-login/sd-login.c (renamed from src/libsystemd/sd-login/sd-login.c)42
-rw-r--r--src/libsystemd/src/sd-login/test-login.c (renamed from src/libsystemd/sd-login/test-login.c)16
l---------src/libsystemd/src/sd-netlink/Makefile1
-rw-r--r--src/libsystemd/src/sd-netlink/local-addresses.c (renamed from src/libsystemd/sd-netlink/local-addresses.c)6
-rw-r--r--src/libsystemd/src/sd-netlink/local-addresses.h (renamed from src/libsystemd/sd-netlink/local-addresses.h)5
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-internal.h (renamed from src/libsystemd/sd-netlink/netlink-internal.h)8
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-message.c (renamed from src/libsystemd/sd-netlink/netlink-message.c)14
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-socket.c (renamed from src/libsystemd/sd-netlink/netlink-socket.c)14
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-types.c (renamed from src/libsystemd/sd-netlink/netlink-types.c)10
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-types.h (renamed from src/libsystemd/sd-netlink/netlink-types.h)2
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-util.c (renamed from src/libsystemd/sd-netlink/netlink-util.c)2
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-util.h (renamed from src/libsystemd/sd-netlink/netlink-util.h)5
-rw-r--r--src/libsystemd/src/sd-netlink/rtnl-message.c (renamed from src/libsystemd/sd-netlink/rtnl-message.c)12
-rw-r--r--src/libsystemd/src/sd-netlink/sd-netlink.c (renamed from src/libsystemd/sd-netlink/sd-netlink.c)16
-rw-r--r--src/libsystemd/src/sd-netlink/test-local-addresses.c (renamed from src/libsystemd/sd-netlink/test-local-addresses.c)7
-rw-r--r--src/libsystemd/src/sd-netlink/test-netlink.c (renamed from src/libsystemd/sd-netlink/test-netlink.c)14
l---------src/libsystemd/src/sd-network/Makefile1
-rw-r--r--src/libsystemd/src/sd-network/network-util.c (renamed from src/libsystemd/sd-network/network-util.c)7
-rw-r--r--src/libsystemd/src/sd-network/network-util.h (renamed from src/libsystemd/sd-network/network-util.h)2
-rw-r--r--src/libsystemd/src/sd-network/sd-network.c (renamed from src/libsystemd/sd-network/sd-network.c)23
l---------src/libsystemd/src/sd-resolve/Makefile1
-rw-r--r--src/libsystemd/src/sd-resolve/sd-resolve.c (renamed from src/libsystemd/sd-resolve/sd-resolve.c)17
-rw-r--r--src/libsystemd/src/sd-resolve/test-resolve.c (renamed from src/libsystemd/sd-resolve/test-resolve.c)11
-rw-r--r--src/libsystemd/src/sd-utf8/sd-utf8.c (renamed from src/libsystemd/sd-utf8/sd-utf8.c)6
-rw-r--r--src/libsystemd/src/subdir.mk29
-rw-r--r--src/libsystemd/src/test.mk164
l---------src/libudev/GNUmakefile1
-rw-r--r--[l---------]src/libudev/Makefile65
-rw-r--r--src/libudev/include/libudev.h (renamed from src/libudev/libudev.h)0
-rw-r--r--src/libudev/libudev.xml (renamed from man/libudev.xml)0
l---------src/libudev/src/GNUmakefile1
-rw-r--r--src/libudev/src/Makefile45
-rw-r--r--src/libudev/src/libudev-device-internal.h (renamed from src/libudev/libudev-device-internal.h)5
-rw-r--r--src/libudev/src/libudev-device-private.c (renamed from src/libudev/libudev-device-private.c)5
-rw-r--r--src/libudev/src/libudev-device.c (renamed from src/libudev/libudev-device.c)16
-rw-r--r--src/libudev/src/libudev-enumerate.c (renamed from src/libudev/libudev-enumerate.c)11
-rw-r--r--src/libudev/src/libudev-hwdb.c (renamed from src/libudev/libudev-hwdb.c)6
-rw-r--r--src/libudev/src/libudev-list.c (renamed from src/libudev/libudev-list.c)3
-rw-r--r--src/libudev/src/libudev-monitor.c (renamed from src/libudev/libudev-monitor.c)24
-rw-r--r--src/libudev/src/libudev-private.h (renamed from src/libudev/libudev-private.h)10
-rw-r--r--src/libudev/src/libudev-queue.c (renamed from src/libudev/libudev-queue.c)7
-rw-r--r--src/libudev/src/libudev-util.c (renamed from src/libudev/libudev-util.c)11
-rw-r--r--src/libudev/src/libudev.c (renamed from src/libudev/libudev.c)11
-rw-r--r--src/libudev/src/udev.h (renamed from src/udev/udev.h)13
-rw-r--r--src/libudev/udev_device_get_syspath.xml (renamed from man/udev_device_get_syspath.xml)0
-rw-r--r--src/libudev/udev_device_has_tag.xml (renamed from man/udev_device_has_tag.xml)0
-rw-r--r--src/libudev/udev_device_new_from_syspath.xml (renamed from man/udev_device_new_from_syspath.xml)0
-rw-r--r--src/libudev/udev_enumerate_add_match_subsystem.xml (renamed from man/udev_enumerate_add_match_subsystem.xml)0
-rw-r--r--src/libudev/udev_enumerate_new.xml (renamed from man/udev_enumerate_new.xml)0
-rw-r--r--src/libudev/udev_enumerate_scan_devices.xml (renamed from man/udev_enumerate_scan_devices.xml)0
-rw-r--r--src/libudev/udev_list_entry.xml (renamed from man/udev_list_entry.xml)0
-rw-r--r--src/libudev/udev_monitor_filter_update.xml (renamed from man/udev_monitor_filter_update.xml)0
-rw-r--r--src/libudev/udev_monitor_new_from_netlink.xml (renamed from man/udev_monitor_new_from_netlink.xml)0
-rw-r--r--src/libudev/udev_monitor_receive_device.xml (renamed from man/udev_monitor_receive_device.xml)0
-rw-r--r--src/libudev/udev_new.xml (renamed from man/udev_new.xml)0
l---------src/locale/Makefile1
l---------src/login/Makefile1
l---------src/machine-id-setup/Makefile1
l---------src/machine/Makefile1
l---------src/manpages/GNUmakefile1
-rw-r--r--src/manpages/Makefile26
-rw-r--r--src/manpages/daemon.xml (renamed from man/daemon.xml)0
-rw-r--r--src/manpages/file-hierarchy.xml (renamed from man/file-hierarchy.xml)0
-rw-r--r--src/manpages/hostname.xml (renamed from man/hostname.xml)0
-rw-r--r--src/manpages/locale.conf.xml (renamed from man/locale.conf.xml)0
-rw-r--r--src/manpages/localtime.xml (renamed from man/localtime.xml)0
-rw-r--r--src/manpages/machine-id.xml (renamed from man/machine-id.xml)0
-rw-r--r--src/manpages/machine-info.xml (renamed from man/machine-info.xml)0
-rw-r--r--src/manpages/os-release.xml (renamed from man/os-release.xml)0
l---------src/modules-load/Makefile1
l---------src/mount/Makefile1
l---------src/network/Makefile1
l---------src/notify/Makefile1
l---------src/nspawn/Makefile1
l---------src/nss-myhostname/GNUmakefile1
-rw-r--r--[l---------]src/nss-myhostname/Makefile48
-rw-r--r--src/nss-myhostname/nss-myhostname.c16
-rw-r--r--src/nss-myhostname/nss-myhostname.xml (renamed from man/nss-myhostname.xml)0
l---------src/nss-mymachines/Makefile1
l---------src/nss-resolve/Makefile1
l---------src/nss-systemd/GNUmakefile1
-rw-r--r--[l---------]src/nss-systemd/Makefile46
-rw-r--r--src/nss-systemd/nss-systemd.c26
-rw-r--r--src/nss-systemd/nss-systemd.xml (renamed from man/nss-systemd.xml)0
l---------src/path/Makefile1
l---------src/quotacheck/Makefile1
l---------src/random-seed/Makefile1
l---------src/rc-local-generator/Makefile1
l---------src/remount-fs/Makefile1
l---------src/reply-password/Makefile1
l---------src/resolve/Makefile1
l---------src/rfkill/Makefile1
l---------src/run/Makefile1
l---------src/shared/Makefile1
l---------src/sleep/Makefile1
l---------src/socket-proxy/Makefile1
l---------src/sysctl/Makefile1
l---------src/system-update-generator/Makefile1
l---------src/systemctl/Makefile1
l---------src/systemd-ask-password/GNUmakefile1
-rw-r--r--src/systemd-ask-password/Makefile33
-rw-r--r--src/systemd-ask-password/ask-password.c (renamed from src/ask-password/ask-password.c)10
-rw-r--r--src/systemd-ask-password/systemd-ask-password.completion.zsh12
-rw-r--r--src/systemd-ask-password/systemd-ask-password.xml (renamed from man/systemd-ask-password.xml)0
l---------src/systemd-cgls/GNUmakefile1
-rw-r--r--src/systemd-cgls/Makefile33
-rw-r--r--src/systemd-cgls/cgls.c (renamed from src/cgls/cgls.c)28
-rw-r--r--src/systemd-cgls/systemd-cgls.completion.bash (renamed from shell-completion/bash/systemd-cgls)0
-rw-r--r--src/systemd-cgls/systemd-cgls.completion.zsh12
-rw-r--r--src/systemd-cgls/systemd-cgls.xml (renamed from man/systemd-cgls.xml)0
l---------src/systemd-cgtop/GNUmakefile1
-rw-r--r--src/systemd-cgtop/Makefile33
-rw-r--r--src/systemd-cgtop/cgtop.c (renamed from src/cgtop/cgtop.c)32
-rw-r--r--src/systemd-cgtop/systemd-cgtop.completion.bash (renamed from shell-completion/bash/systemd-cgtop)0
-rw-r--r--src/systemd-cgtop/systemd-cgtop.completion.zsh17
-rw-r--r--src/systemd-cgtop/systemd-cgtop.xml (renamed from man/systemd-cgtop.xml)0
l---------src/systemd-cryptsetup/GNUmakefile1
-rw-r--r--src/systemd-cryptsetup/Makefile58
-rw-r--r--src/systemd-cryptsetup/cryptsetup-generator.c (renamed from src/cryptsetup/cryptsetup-generator.c)32
-rw-r--r--src/systemd-cryptsetup/cryptsetup-pre.target (renamed from units/cryptsetup-pre.target)0
-rw-r--r--src/systemd-cryptsetup/cryptsetup.c (renamed from src/cryptsetup/cryptsetup.c)27
-rw-r--r--src/systemd-cryptsetup/cryptsetup.target (renamed from units/cryptsetup.target)0
-rw-r--r--src/systemd-cryptsetup/crypttab.xml (renamed from man/crypttab.xml)0
-rw-r--r--src/systemd-cryptsetup/systemd-cryptsetup-generator.xml (renamed from man/systemd-cryptsetup-generator.xml)0
-rw-r--r--src/systemd-cryptsetup/systemd-cryptsetup@.service.xml (renamed from man/systemd-cryptsetup@.service.xml)0
l---------src/systemd-debug-generator/GNUmakefile1
-rw-r--r--src/systemd-debug-generator/Makefile34
-rw-r--r--src/systemd-debug-generator/debug-generator.c (renamed from src/debug-generator/debug-generator.c)18
-rw-r--r--src/systemd-debug-generator/systemd-debug-generator.xml (renamed from man/systemd-debug-generator.xml)0
l---------src/systemd-getty-generator/GNUmakefile1
-rw-r--r--src/systemd-getty-generator/Makefile33
-rw-r--r--src/systemd-getty-generator/getty-generator.c (renamed from src/getty-generator/getty-generator.c)24
-rw-r--r--src/systemd-getty-generator/systemd-getty-generator.xml (renamed from man/systemd-getty-generator.xml)0
l---------src/systemd-gpt-auto-generator/GNUmakefile1
-rw-r--r--src/systemd-gpt-auto-generator/Makefile42
-rw-r--r--src/systemd-gpt-auto-generator/gpt-auto-generator.c (renamed from src/gpt-auto-generator/gpt-auto-generator.c)52
-rw-r--r--src/systemd-gpt-auto-generator/systemd-gpt-auto-generator.xml (renamed from man/systemd-gpt-auto-generator.xml)0
l---------src/systemd-initctl/GNUmakefile1
-rw-r--r--src/systemd-initctl/Makefile33
-rw-r--r--src/systemd-initctl/initctl.c (renamed from src/initctl/initctl.c)28
-rw-r--r--src/systemd-initctl/systemd-initctl.service.in (renamed from units/systemd-initctl.service.in)0
-rw-r--r--src/systemd-initctl/systemd-initctl.service.xml (renamed from man/systemd-initctl.service.xml)0
-rw-r--r--src/systemd-initctl/systemd-initctl.socket (renamed from units/systemd-initctl.socket)0
l---------src/systemd-machine-id-setup/GNUmakefile1
-rw-r--r--src/systemd-machine-id-setup/Makefile38
-rw-r--r--src/systemd-machine-id-setup/machine-id-setup-main.c (renamed from src/machine-id-setup/machine-id-setup-main.c)8
-rw-r--r--src/systemd-machine-id-setup/systemd-machine-id-commit.service.xml (renamed from man/systemd-machine-id-commit.service.xml)0
-rw-r--r--src/systemd-machine-id-setup/systemd-machine-id-setup.completion.zsh8
-rw-r--r--src/systemd-machine-id-setup/systemd-machine-id-setup.xml (renamed from man/systemd-machine-id-setup.xml)0
l---------src/systemd-mount/GNUmakefile1
-rw-r--r--src/systemd-mount/Makefile33
-rw-r--r--src/systemd-mount/mount-tool.c (renamed from src/mount/mount-tool.c)32
-rw-r--r--src/systemd-mount/systemd-mount.xml (renamed from man/systemd-mount.xml)0
-rw-r--r--src/systemd-nspawn/.gitignore (renamed from src/nspawn/.gitignore)0
l---------src/systemd-nspawn/GNUmakefile1
-rw-r--r--src/systemd-nspawn/Makefile93
-rw-r--r--src/systemd-nspawn/nspawn-cgroup.c (renamed from src/nspawn/nspawn-cgroup.c)19
-rw-r--r--src/systemd-nspawn/nspawn-cgroup.h (renamed from src/nspawn/nspawn-cgroup.h)2
-rw-r--r--src/systemd-nspawn/nspawn-expose-ports.c (renamed from src/nspawn/nspawn-expose-ports.c)24
-rw-r--r--src/systemd-nspawn/nspawn-expose-ports.h (renamed from src/nspawn/nspawn-expose-ports.h)8
-rw-r--r--src/systemd-nspawn/nspawn-gperf.gperf (renamed from src/nspawn/nspawn-gperf.gperf)6
-rw-r--r--src/systemd-nspawn/nspawn-mount.c (renamed from src/nspawn/nspawn-mount.c)36
-rw-r--r--src/systemd-nspawn/nspawn-mount.h (renamed from src/nspawn/nspawn-mount.h)2
-rw-r--r--src/systemd-nspawn/nspawn-network.c (renamed from src/nspawn/nspawn-network.c)30
-rw-r--r--src/systemd-nspawn/nspawn-network.h (renamed from src/nspawn/nspawn-network.h)0
-rw-r--r--src/systemd-nspawn/nspawn-patch-uid.c (renamed from src/nspawn/nspawn-patch-uid.c)20
-rw-r--r--src/systemd-nspawn/nspawn-patch-uid.h (renamed from src/nspawn/nspawn-patch-uid.h)0
-rw-r--r--src/systemd-nspawn/nspawn-register.c (renamed from src/nspawn/nspawn-register.c)15
-rw-r--r--src/systemd-nspawn/nspawn-register.h (renamed from src/nspawn/nspawn-register.h)2
-rw-r--r--src/systemd-nspawn/nspawn-seccomp.c (renamed from src/nspawn/nspawn-seccomp.c)7
-rw-r--r--src/systemd-nspawn/nspawn-seccomp.h (renamed from src/nspawn/nspawn-seccomp.h)0
-rw-r--r--src/systemd-nspawn/nspawn-settings.c (renamed from src/nspawn/nspawn-settings.c)21
-rw-r--r--src/systemd-nspawn/nspawn-settings.h (renamed from src/nspawn/nspawn-settings.h)3
-rw-r--r--src/systemd-nspawn/nspawn-setuid.c (renamed from src/nspawn/nspawn-setuid.c)17
-rw-r--r--src/systemd-nspawn/nspawn-setuid.h (renamed from src/nspawn/nspawn-setuid.h)0
-rw-r--r--src/systemd-nspawn/nspawn-stub-pid1.c (renamed from src/nspawn/nspawn-stub-pid1.c)13
-rw-r--r--src/systemd-nspawn/nspawn-stub-pid1.h (renamed from src/nspawn/nspawn-stub-pid1.h)0
-rw-r--r--src/systemd-nspawn/nspawn.c (renamed from src/nspawn/nspawn.c)102
-rw-r--r--src/systemd-nspawn/systemd-nspawn.completion.bash (renamed from shell-completion/bash/systemd-nspawn)0
-rw-r--r--src/systemd-nspawn/systemd-nspawn.completion.zsh (renamed from shell-completion/zsh/_systemd-nspawn)0
-rw-r--r--src/systemd-nspawn/systemd-nspawn.tmpfiles (renamed from tmpfiles.d/systemd-nspawn.conf)0
-rw-r--r--src/systemd-nspawn/systemd-nspawn.xml (renamed from man/systemd-nspawn.xml)0
-rw-r--r--src/systemd-nspawn/systemd-nspawn@.service.in (renamed from units/systemd-nspawn@.service.in)0
-rw-r--r--src/systemd-nspawn/test-patch-uid.c (renamed from src/nspawn/test-patch-uid.c)7
l---------src/systemd-rc-local-generator/GNUmakefile1
-rw-r--r--src/systemd-rc-local-generator/Makefile32
-rw-r--r--src/systemd-rc-local-generator/rc-local-generator.c (renamed from src/rc-local-generator/rc-local-generator.c)10
l---------src/systemd-remount-fs/GNUmakefile1
-rw-r--r--src/systemd-remount-fs/Makefile35
-rw-r--r--src/systemd-remount-fs/remount-fs.c (renamed from src/remount-fs/remount-fs.c)18
-rw-r--r--src/systemd-remount-fs/systemd-remount-fs.service.in (renamed from units/systemd-remount-fs.service.in)0
-rw-r--r--src/systemd-remount-fs/systemd-remount-fs.service.xml (renamed from man/systemd-remount-fs.service.xml)0
l---------src/systemd-reply-password/GNUmakefile1
-rw-r--r--src/systemd-reply-password/Makefile33
-rw-r--r--src/systemd-reply-password/reply-password.c (renamed from src/reply-password/reply-password.c)12
l---------src/systemd-socket-proxyd/GNUmakefile1
-rw-r--r--src/systemd-socket-proxyd/Makefile34
-rw-r--r--src/systemd-socket-proxyd/socket-proxyd.c (renamed from src/socket-proxy/socket-proxyd.c)24
-rw-r--r--src/systemd-socket-proxyd/systemd-socket-proxyd.xml (renamed from man/systemd-socket-proxyd.xml)0
l---------src/systemd-stdio-bridge/GNUmakefile1
-rw-r--r--src/systemd-stdio-bridge/Makefile33
-rw-r--r--src/systemd-stdio-bridge/stdio-bridge.c (renamed from src/stdio-bridge/stdio-bridge.c)16
l---------src/systemd-system-update-generator/GNUmakefile1
-rw-r--r--src/systemd-system-update-generator/Makefile33
-rw-r--r--src/systemd-system-update-generator/system-update-generator.c (renamed from src/system-update-generator/system-update-generator.c)8
-rw-r--r--src/systemd-system-update-generator/systemd-system-update-generator.xml (renamed from man/systemd-system-update-generator.xml)0
-rw-r--r--src/systemd-timesyncd/.gitignore (renamed from src/timesync/.gitignore)0
-rw-r--r--src/systemd-timesyncd/90-timesyncd.preset (renamed from system-preset/90-timesyncd.preset)0
l---------src/systemd-timesyncd/GNUmakefile1
-rw-r--r--src/systemd-timesyncd/Makefile65
-rw-r--r--src/systemd-timesyncd/systemd-timesyncd.service.in (renamed from units/systemd-timesyncd.service.in)0
-rw-r--r--src/systemd-timesyncd/systemd-timesyncd.service.xml (renamed from man/systemd-timesyncd.service.xml)0
-rw-r--r--src/systemd-timesyncd/systemd-timesyncd.sysusers (renamed from sysusers.d/systemd-timesyncd.conf)0
-rw-r--r--src/systemd-timesyncd/timesyncd-conf.c (renamed from src/timesync/timesyncd-conf.c)9
-rw-r--r--src/systemd-timesyncd/timesyncd-conf.h (renamed from src/timesync/timesyncd-conf.h)3
-rw-r--r--src/systemd-timesyncd/timesyncd-gperf.gperf (renamed from src/timesync/timesyncd-gperf.gperf)4
-rw-r--r--src/systemd-timesyncd/timesyncd-manager.c (renamed from src/timesync/timesyncd-manager.c)33
-rw-r--r--src/systemd-timesyncd/timesyncd-manager.h (renamed from src/timesync/timesyncd-manager.h)10
-rw-r--r--src/systemd-timesyncd/timesyncd-server.c (renamed from src/timesync/timesyncd-server.c)3
-rw-r--r--src/systemd-timesyncd/timesyncd-server.h (renamed from src/timesync/timesyncd-server.h)4
-rw-r--r--src/systemd-timesyncd/timesyncd.c (renamed from src/timesync/timesyncd.c)21
-rw-r--r--src/systemd-timesyncd/timesyncd.conf.in (renamed from src/timesync/timesyncd.conf.in)0
-rw-r--r--src/systemd-timesyncd/timesyncd.conf.xml (renamed from man/timesyncd.conf.xml)0
l---------src/systemd-tty-ask-password-agent/GNUmakefile1
-rw-r--r--src/systemd-tty-ask-password-agent/Makefile33
-rw-r--r--src/systemd-tty-ask-password-agent/systemd-ask-password-console.service.xml (renamed from man/systemd-ask-password-console.service.xml)0
-rw-r--r--src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.completion.zsh14
-rw-r--r--src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.xml (renamed from man/systemd-tty-ask-password-agent.xml)0
-rw-r--r--src/systemd-tty-ask-password-agent/tty-ask-password-agent.c (renamed from src/tty-ask-password-agent/tty-ask-password-agent.c)44
l---------src/systemd/Makefile1
l---------src/sysusers/Makefile1
l---------src/sysv-generator/Makefile1
l---------src/test/GNUmakefile1
-rw-r--r--[l---------]src/test/Makefile36
-rw-r--r--src/test/test-acl-util.c10
-rw-r--r--src/test/test-af-list.c8
-rw-r--r--src/test/test-alloc-util.c6
-rw-r--r--src/test/test-architecture.c8
-rw-r--r--src/test/test-arphrd-list.c8
-rw-r--r--src/test/test-ask-password-api.c6
-rw-r--r--src/test/test-async.c8
-rw-r--r--src/test/test-barrier.c4
-rw-r--r--src/test/test-bitmap.c2
-rw-r--r--src/test/test-boot-timestamps.c10
-rw-r--r--src/test/test-btrfs.c14
-rw-r--r--src/test/test-calendarspec.c8
-rw-r--r--src/test/test-cap-list.c12
-rw-r--r--src/test/test-capability.c8
-rw-r--r--src/test/test-cgroup-mask.c11
-rw-r--r--src/test/test-cgroup-util.c23
-rw-r--r--src/test/test-cgroup.c8
-rw-r--r--src/test/test-clock.c12
-rw-r--r--src/test/test-condition.c34
-rw-r--r--src/test/test-conf-files.c20
-rw-r--r--src/test/test-conf-parser.c12
-rw-r--r--src/test/test-copy.c26
-rw-r--r--src/test/test-cpu-set-util.c6
-rw-r--r--src/test/test-daemon.c4
-rw-r--r--src/test/test-date.c6
-rw-r--r--src/test/test-device-nodes.c8
-rw-r--r--src/test/test-dns-domain.c8
-rw-r--r--src/test/test-ellipsize.c10
-rw-r--r--src/test/test-engine.c9
-rw-r--r--src/test/test-env-util.c8
-rw-r--r--src/test/test-escape.c6
-rw-r--r--src/test/test-execute.c23
-rw-r--r--src/test/test-extract-word.c6
-rw-r--r--src/test/test-fd-util.c8
-rw-r--r--src/test/test-fdset.c10
-rw-r--r--src/test/test-fileio.c24
-rw-r--r--src/test/test-firewall-util.c4
-rw-r--r--src/test/test-fs-util.c22
-rw-r--r--src/test/test-fstab-util.c10
-rw-r--r--src/test/test-glob-util.c8
-rw-r--r--src/test/test-hashmap-plain.c10
-rw-r--r--src/test/test-hashmap.c4
-rw-r--r--src/test/test-helper.h4
-rw-r--r--src/test/test-hexdecoct.c8
-rw-r--r--src/test/test-hostname-util.c10
-rw-r--r--src/test/test-hostname.c4
-rw-r--r--src/test/test-id128.c20
-rw-r--r--src/test/test-install-root.c12
-rw-r--r--src/test/test-install.c2
-rw-r--r--src/test/test-io-util.c8
-rw-r--r--src/test/test-ipcrm.c6
-rw-r--r--src/test/test-job-type.c6
-rw-r--r--src/test/test-libudev.c16
-rw-r--r--src/test/test-list.c4
-rw-r--r--src/test/test-locale-util.c6
-rw-r--r--src/test/test-log.c6
-rw-r--r--src/test/test-loopback.c4
-rw-r--r--src/test/test-namespace.c12
-rw-r--r--src/test/test-netlink-manual.c10
-rw-r--r--src/test/test-ns.c4
-rw-r--r--src/test/test-nss.c28
-rw-r--r--src/test/test-parse-util.c4
-rw-r--r--src/test/test-path-lookup.c10
-rw-r--r--src/test/test-path-util.c18
-rw-r--r--src/test/test-path.c25
-rw-r--r--src/test/test-prioq.c10
-rw-r--r--src/test/test-proc-cmdline.c14
-rw-r--r--src/test/test-process-util.c25
-rw-r--r--src/test/test-ratelimit.c6
-rw-r--r--src/test/test-replace-var.c8
-rw-r--r--src/test/test-rlimit-util.c12
-rw-r--r--src/test/test-sched-prio.c9
-rw-r--r--src/test/test-seccomp.c12
-rw-r--r--src/test/test-selinux.c14
-rw-r--r--src/test/test-set.c2
-rw-r--r--src/test/test-sigbus.c6
-rw-r--r--src/test/test-signal-util.c4
-rw-r--r--src/test/test-siphash24.c4
-rw-r--r--src/test/test-sizeof.c4
-rw-r--r--src/test/test-sleep.c8
-rw-r--r--src/test/test-socket-util.c18
-rw-r--r--src/test/test-stat-util.c10
-rw-r--r--src/test/test-strbuf.c8
-rw-r--r--src/test/test-string-util.c8
-rw-r--r--src/test/test-strip-tab-ansi.c6
-rw-r--r--src/test/test-strv.c10
-rw-r--r--src/test/test-strxcpyx.c6
-rw-r--r--src/test/test-tables.c62
-rw-r--r--src/test/test-terminal-util.c12
-rw-r--r--src/test/test-time.c6
-rw-r--r--src/test/test-tmpfiles.c16
-rw-r--r--src/test/test-udev.c14
-rw-r--r--src/test/test-uid-range.c8
-rw-r--r--src/test/test-unaligned.c6
-rw-r--r--src/test/test-unit-file.c35
-rw-r--r--src/test/test-unit-name.c27
-rw-r--r--src/test/test-user-util.c10
-rw-r--r--src/test/test-utf8.c8
-rw-r--r--src/test/test-util.c16
-rw-r--r--src/test/test-verbs.c6
-rw-r--r--src/test/test-watchdog.c4
-rw-r--r--src/test/test-web-util.c4
-rw-r--r--src/test/test-xattr-util.c12
-rw-r--r--src/test/test-xml.c8
l---------src/timedate/Makefile1
l---------src/timesync/Makefile1
l---------src/tmpfiles/Makefile1
l---------src/tty-ask-password-agent/Makefile1
-rw-r--r--src/udev/.vimrc4
l---------src/udev/Makefile1
l---------src/udev/ata_id/Makefile1
l---------src/udev/cdrom_id/Makefile1
l---------src/udev/collect/Makefile1
l---------src/udev/mtd_probe/Makefile1
l---------src/udev/net/Makefile1
l---------src/udev/scsi_id/Makefile1
l---------src/udev/v4l_id/Makefile1
l---------src/update-done/Makefile1
l---------src/update-utmp/Makefile1
l---------src/user-sessions/Makefile1
l---------src/vconsole/Makefile1
-rw-r--r--src/zsh-completion/_sd_hosts_or_user_at_host (renamed from shell-completion/zsh/_sd_hosts_or_user_at_host)0
-rw-r--r--src/zsh-completion/_sd_machines (renamed from shell-completion/zsh/_sd_machines)0
-rw-r--r--src/zsh-completion/_sd_outputmodes (renamed from shell-completion/zsh/_sd_outputmodes)0
-rw-r--r--src/zsh-completion/_sd_unit_files (renamed from shell-completion/zsh/_sd_unit_files)0
l---------sysctl.d/Makefile1
l---------system-preset/Makefile1
l---------sysusers.d/Makefile1
l---------test/GNUmakefile1
-rw-r--r--test/Makefile975
-rw-r--r--test/TEST-01-BASIC/Makefile10
l---------test/TEST-02-CRYPTSETUP/Makefile1
l---------test/TEST-03-JOBS/Makefile1
l---------test/TEST-04-JOURNAL/Makefile1
l---------test/TEST-05-RLIMITS/Makefile1
l---------test/TEST-06-SELINUX/Makefile1
l---------test/TEST-07-ISSUE-1981/Makefile1
l---------test/TEST-08-ISSUE-2730/Makefile1
l---------test/TEST-09-ISSUE-2691/Makefile1
l---------test/TEST-10-ISSUE-2467/Makefile1
l---------test/TEST-11-ISSUE-3166/Makefile1
l---------test/TEST-12-ISSUE-3171/Makefile1
-rw-r--r--test/TEST-13-NSPAWN-SMOKE/Makefile11
l---------tmpfiles.d/Makefile1
l---------units/Makefile1
l---------units/user/Makefile1
2163 files changed, 17904 insertions, 6645 deletions
diff --git a/GNUmakefile b/GNUmakefile
new file mode 120000
index 0000000000..0f24a727ed
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1 @@
+GNUmakefile \ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..a1d8defac5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,50 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+# intltoolize
+files.src.gen += m4/intltool.m4
+files.src.gen += po/Makefile.in.in
+# autoreconf
+files.src.gen += aclocal.m4
+files.src.gen += automake.mk.in
+files.src.gen += build-aux/compile
+files.src.gen += build-aux/config.guess
+files.src.gen += build-aux/config.sub
+files.src.gen += build-aux/install-sh
+files.src.gen += build-aux/ltmain.sh
+files.src.gen += build-aux/missing
+files.src.gen += m4/libtool.m4
+files.src.gen += m4/ltoptions.m4
+files.src.gen += m4/ltsugar.m4
+files.src.gen += m4/ltversion.m4
+files.src.gen += m4/lt~obsolete.m4
+files.src.gen += config.h.in
+files.src.gen += configure
+
+nested.subdirs += man
+nested.subdirs += src
+nested.subdirs += test
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/build-aux/Makefile.each.tail/50-sd.mk b/build-aux/Makefile.each.tail/50-sd.mk
new file mode 100644
index 0000000000..c6c05cdff7
--- /dev/null
+++ b/build-aux/Makefile.each.tail/50-sd.mk
@@ -0,0 +1,57 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+%-from-name.gperf: %-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
+
+%-from-name.h: %-from-name.gperf
+ $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
+
+$(outdir)/%: sysctl.d/%.in
+ $(SED_PROCESS)
+
+%.sh: %.sh.in
+ $(SED_PROCESS)
+ $(AM_V_GEN)chmod +x $@
+
+$(outdir)/%.c: src/%.gperf
+ $(AM_V_GPERF)$(GPERF) < $< > $@
+
+$(outdir)/%: src/%.m4 $(top_builddir)/config.status
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
+# Stupid test that everything purported to be exported really is
+define generate-sym-test
+ $(AM_V_at)printf '#include <stdio.h>\n' > $@
+ $(AM_V_at)printf '#include "%s"\n' $(notdir $(filter %.h, $^)) >> $@
+ $(AM_V_at)printf 'void* functions[] = {\n' >> $@
+ $(AM_V_GEN)sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< >> $@
+ $(AM_V_at)printf '};\nint main(void) {\n' >> $@
+ $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@
+ $(AM_V_at)printf 'return 0; }\n' >> $@
+endef
+
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/build-aux/Makefile.each.tail/70-sdman.mk b/build-aux/Makefile.each.tail/70-sdman.mk
new file mode 100644
index 0000000000..2e7e0d4e39
--- /dev/null
+++ b/build-aux/Makefile.each.tail/70-sdman.mk
@@ -0,0 +1,122 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+
+MANPAGES =
+MANPAGES_ALIAS =
+
+include Makefile-man.am
+
+.PHONY: man update-man-list
+man: $(MANPAGES) $(MANPAGES_ALIAS) $(HTML_FILES) $(HTML_ALIAS)
+
+XML_FILES = \
+ ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
+HTML_FILES = \
+ ${XML_FILES:.xml=.html}
+HTML_ALIAS = \
+ ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(MANPAGES_ALIAS)}}}}}
+
+ifneq ($(ENABLE_MANPAGES),)
+man_MANS = \
+ $(MANPAGES) \
+ $(MANPAGES_ALIAS)
+
+noinst_DATA += \
+ $(HTML_FILES) \
+ $(HTML_ALIAS) \
+ docs/html/man
+endif # ENABLE_MANPAGES
+
+CLEANFILES += \
+ $(man_MANS) \
+ $(HTML_FILES) \
+ $(HTML_ALIAS) \
+ docs/html/man
+
+$(outdir)/man:
+ $(AM_V_LN)$(LN_S) -f ../../man $@
+
+$(outdir)/index.html: man/systemd.index.html
+ $(AM_V_LN)$(LN_S) -f systemd.index.html $@
+
+ifneq ($(HAVE_PYTHON),)
+noinst_DATA += \
+ man/index.html
+endif # HAVE_PYTHON
+
+CLEANFILES += \
+ man/index.html
+
+XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml)
+NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
+SOURCE_XML_FILES = ${patsubst %,$(top_srcdir)/%,$(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))}
+
+# This target should only be run manually. It recreates Makefile-man.am
+# file in the source directory based on all man/*.xml files. Run it after
+# adding, removing, or changing the conditional in a man page.
+update-man-list: $(top_srcdir)/tools/make-man-rules.py $(XML_GLOB) man/custom-entities.ent
+ $(AM_V_GEN)$(PYTHON) $< $(XML_GLOB) > $(top_srcdir)/Makefile-man.tmp
+ $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
+ @echo "Makefile-man.am has been regenerated"
+
+$(outdir)/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FILES)
+ $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
+
+$(outdir)/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py man/custom-entities.ent $(SOURCE_XML_FILES)
+ $(AM_V_GEN)$(PYTHON) $< $@ $(SOURCE_XML_FILES)
+
+CLEANFILES += \
+ man/systemd.index.xml \
+ man/systemd.directives.xml
+
+EXTRA_DIST += \
+ $(filter-out man/systemd.directives.xml man/systemd.index.xml,$(XML_FILES)) \
+ tools/make-man-index.py \
+ tools/make-man-rules.py \
+ tools/make-directive-index.py \
+ tools/xml_helper.py \
+ man/glib-event-glue.c
+
+$(outdir)/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
+ $(XSLTPROC_PROCESS_MAN)
+
+$(outdir)/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
+ $(XSLTPROC_PROCESS_MAN)
+
+$(outdir)/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
+ $(XSLTPROC_PROCESS_MAN)
+
+$(outdir)/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
+ $(XSLTPROC_PROCESS_MAN)
+
+$(outdir)/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
+ $(XSLTPROC_PROCESS_MAN)
+
+$(outdir)/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
+ $(XSLTPROC_PROCESS_HTML)
+
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/build-aux/Makefile.once.head/20-sd.mk b/build-aux/Makefile.once.head/20-sd.mk
new file mode 100644
index 0000000000..134c2c0ef1
--- /dev/null
+++ b/build-aux/Makefile.once.head/20-sd.mk
@@ -0,0 +1,165 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+AM_MAKEFLAGS = --no-print-directory
+AUTOMAKE_OPTIONS = color-tests parallel-tests
+
+GCC_COLORS ?= 'ooh, shiny!'
+export GCC_COLORS
+
+SUBDIRS = . po
+
+# remove targets if the command fails
+.DELETE_ON_ERROR:
+
+# keep intermediate files
+.SECONDARY:
+
+# Keep the test-suite.log
+.PRECIOUS: $(TEST_SUITE_LOG) Makefile
+
+V ?=
+
+AM_V_M4 = $(AM_V_M4_$(V))
+AM_V_M4_ = $(AM_V_M4_$(AM_DEFAULT_VERBOSITY))
+AM_V_M4_0 = @echo " M4 " $@;
+AM_V_M4_1 =
+
+AM_V_GPERF = $(AM_V_GPERF_$(V))
+AM_V_GPERF_ = $(AM_V_GPERF_$(AM_DEFAULT_VERBOSITY))
+AM_V_GPERF_0 = @echo " GPERF " $@;
+AM_V_GPERF_1 =
+
+AM_V_RM = $(AM_V_RM_$(V))
+AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY))
+AM_V_RM_0 = @echo " RM " $@;
+AM_V_RM_1 =
+
+AM_V_CC = $(AM_V_CC_$(V))
+AM_V_CC_ = $(AM_V_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC_0 = @echo " CC " $@;
+AM_V_CC_1 =
+
+AM_V_CCLD = $(AM_V_CCLD_$(V))
+AM_V_CCLD_ = $(AM_V_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD_0 = @echo " CCLD " $@;
+AM_V_CCLD_1 =
+
+AM_V_P = $(AM_V_P_$(V))
+AM_V_P_ = $(AM_V_P_$(AM_DEFAULT_VERBOSITY))
+AM_V_P_0 = false
+AM_V_P_1 = :
+
+AM_V_GEN = $(AM_V_GEN_$(V))
+AM_V_GEN_ = $(AM_V_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN_0 = @echo " GEN " $@;
+AM_V_GEN_1 =
+
+AM_V_at = $(AM_V_at_$(V))
+AM_V_at_ = $(AM_V_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at_0 = @
+AM_V_at_1 =
+
+AM_V_lt = $(AM_V_lt_$(V))
+AM_V_lt_ = $(AM_V_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt_0 = --silent
+AM_V_lt_1 =
+
+INTLTOOL_V_MERGE = $(INTLTOOL_V_MERGE_$(V))
+INTLTOOL_V_MERGE_OPTIONS = $(intltool_v_merge_options_$(V))
+INTLTOOL_V_MERGE_ = $(INTLTOOL_V_MERGE_$(AM_DEFAULT_VERBOSITY))
+INTLTOOL_V_MERGE_0 = @echo " ITMRG " $@;
+INTLTOOL_V_MERGE_1 =
+
+substitutions = \
+ '|rootlibexecdir=$(rootlibexecdir)|' \
+ '|rootbindir=$(rootbindir)|' \
+ '|bindir=$(bindir)|' \
+ '|SYSTEMCTL=$(rootbindir)/systemctl|' \
+ '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
+ '|pkgsysconfdir=$(pkgsysconfdir)|' \
+ '|SYSTEM_CONFIG_UNIT_PATH=$(pkgsysconfdir)/system|' \
+ '|USER_CONFIG_UNIT_PATH=$(pkgsysconfdir)/user|' \
+ '|pkgdatadir=$(pkgdatadir)|' \
+ '|systemunitdir=$(systemunitdir)|' \
+ '|userunitdir=$(userunitdir)|' \
+ '|systempresetdir=$(systempresetdir)|' \
+ '|userpresetdir=$(userpresetdir)|' \
+ '|udevhwdbdir=$(udevhwdbdir)|' \
+ '|udevrulesdir=$(udevrulesdir)|' \
+ '|catalogdir=$(catalogdir)|' \
+ '|tmpfilesdir=$(tmpfilesdir)|' \
+ '|sysusersdir=$(sysusersdir)|' \
+ '|sysctldir=$(sysctldir)|' \
+ '|systemgeneratordir=$(systemgeneratordir)|' \
+ '|usergeneratordir=$(usergeneratordir)|' \
+ '|CERTIFICATEROOT=$(CERTIFICATEROOT)|' \
+ '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
+ '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
+ '|PACKAGE_URL=$(PACKAGE_URL)|' \
+ '|RANDOM_SEED_DIR=$(localstatedir)/lib/systemd/|' \
+ '|RANDOM_SEED=$(localstatedir)/lib/systemd/random-seed|' \
+ '|prefix=$(prefix)|' \
+ '|exec_prefix=$(exec_prefix)|' \
+ '|libdir=$(libdir)|' \
+ '|includedir=$(includedir)|' \
+ '|VERSION=$(VERSION)|' \
+ '|rootprefix=$(rootprefix)|' \
+ '|udevlibexecdir=$(udevlibexecdir)|' \
+ '|SUSHELL=$(SUSHELL)|' \
+ '|SULOGIN=$(SULOGIN)|' \
+ '|DEBUGTTY=$(DEBUGTTY)|' \
+ '|KILL=$(KILL)|' \
+ '|KMOD=$(KMOD)|' \
+ '|MOUNT_PATH=$(MOUNT_PATH)|' \
+ '|UMOUNT_PATH=$(UMOUNT_PATH)|' \
+ '|MKDIR_P=$(MKDIR_P)|' \
+ '|QUOTAON=$(QUOTAON)|' \
+ '|QUOTACHECK=$(QUOTACHECK)|' \
+ '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
+ '|VARLOGDIR=$(varlogdir)|' \
+ '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
+ '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
+ '|PYTHON=$(PYTHON)|' \
+ '|NTP_SERVERS=$(NTP_SERVERS)|' \
+ '|DNS_SERVERS=$(DNS_SERVERS)|' \
+ '|DEFAULT_DNSSEC_MODE=$(DEFAULT_DNSSEC_MODE)|' \
+ '|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
+ '|systemuidmax=$(SYSTEM_UID_MAX)|' \
+ '|systemgidmax=$(SYSTEM_GID_MAX)|' \
+ '|TTY_GID=$(TTY_GID)|' \
+ '|systemsleepdir=$(systemsleepdir)|' \
+ '|systemshutdowndir=$(systemshutdowndir)|' \
+ '|binfmtdir=$(binfmtdir)|' \
+ '|modulesloaddir=$(modulesloaddir)|'
+
+SED_PROCESS = \
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+ < $< > $@
+
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/build-aux/Makefile.once.head/20-sdman.mk b/build-aux/Makefile.once.head/20-sdman.mk
new file mode 100644
index 0000000000..3fb076febe
--- /dev/null
+++ b/build-aux/Makefile.once.head/20-sdman.mk
@@ -0,0 +1,58 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+AM_V_XSLT = $(AM_V_XSLT_$(V))
+AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
+AM_V_XSLT_0 = @echo " XSLT " $@;
+AM_V_XSLT_1 =
+
+AM_V_LN = $(AM_V_LN_$(V))
+AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY))
+AM_V_LN_0 = @echo " LN " $@;
+AM_V_LN_1 =
+
+XSLTPROC_FLAGS = \
+ --nonet \
+ --xinclude \
+ --stringparam man.output.quietly 1 \
+ --stringparam funcsynopsis.style ansi \
+ --stringparam man.authors.section.enabled 0 \
+ --stringparam man.copyright.section.enabled 0 \
+ --stringparam systemd.version $(VERSION) \
+ --path '$(builddir)/man:$(srcdir)/man'
+
+XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc)
+XSLTPROC_PROCESS_MAN = \
+ $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
+
+XSLTPROC_PROCESS_HTML = \
+ $(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
+
+define html-alias
+ $(AM_V_LN)$(LN_S) -f $(notdir $<) $@
+endef
+
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/build-aux/Makefile.once.tail/10-sd.mk b/build-aux/Makefile.once.tail/10-sd.mk
new file mode 100644
index 0000000000..7df79c0364
--- /dev/null
+++ b/build-aux/Makefile.once.tail/10-sd.mk
@@ -0,0 +1,98 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+# Let's run all tests of the test suite, but under valgrind. Let's
+# exclude perl/python/shell scripts we have in there
+.PHONY: valgrind-tests
+valgrind-tests: $(TESTS)
+ $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
+ if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
+ echo -e "$${x}Skipping non-binary $$f"; else \
+ echo -e "$${x}Running $$f"; \
+ $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \
+ x="\n\n"; \
+ done
+
+exported-%: %
+ $(AM_V_GEN)$(NM) -g --defined-only $(builddir)/.libs/$(<:.la=.so) 2>&1 /dev/null | grep " T " | cut -d" " -f3 > $@
+
+exported: $(addprefix exported-, $(lib_LTLIBRARIES))
+ $(AM_V_GEN)sort -u $^ > $@
+
+.PHONY: check-api-docs
+check-api-docs: exported man
+ $(AM_V_GEN)for symbol in `cat exported` ; do \
+ if test -f $(builddir)/man/$$symbol.html ; then \
+ echo " Symbol $$symbol() is documented." ; \
+ else \
+ echo "‣ Symbol $$symbol() lacks documentation." ; \
+ fi ; \
+ done
+
+OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
+ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
+
+undefined defined: $(ALL_OBJECTS)
+ $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
+ $(NM) -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
+ done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
+
+CLEANFILES += \
+ defined \
+ undefined
+
+.PHONY: check-api-unused
+check-api-unused: defined undefined exported
+ ( cat exported undefined ) | sort -u | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-
+
+.PHONY: check-includes
+check-includes: $(top_srcdir)/tools/check-includes.pl
+ $(AM_V_GEN) find * -name '*.[hcS]' -type f -print | sort -u \
+ | xargs $(top_srcdir)/tools/check-includes.pl
+
+EXTRA_DIST += \
+ $(top_srcdir)/tools/check-includes.pl
+
+.PHONY: cppcheck
+cppcheck:
+ cppcheck --enable=all -q $(top_srcdir)
+
+# Used to extract compile flags for YCM.
+print-%:
+ @echo $($*)
+
+git-contrib:
+ @git shortlog -s `git describe --abbrev=0`.. | cut -c8- | sed 's/ / /g' | awk '{ print $$0 "," }' | sort -u
+
+EXTRA_DIST += \
+ tools/gdb-sd_dump_hashmaps.py
+
+list-keys:
+ gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --list-keys
+
+add-key:
+ gpg --verbose --no-options --no-default-keyring --no-auto-key-locate --batch --trust-model=always --keyring=$(srcdir)/src/import/import-pubring.gpg --import -
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/catalog/Makefile b/catalog/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/catalog/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/config.mk.in b/config.mk.in
new file mode 100644
index 0000000000..77283a78bf
--- /dev/null
+++ b/config.mk.in
@@ -0,0 +1,78 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+# Dirs of external packages
+dbuspolicydir=@dbuspolicydir@
+dbussessionservicedir=@dbussessionservicedir@
+dbussystemservicedir=@dbussystemservicedir@
+pamlibdir=@pamlibdir@
+pamconfdir=@pamconfdir@
+pkgconfigdatadir=$(datadir)/pkgconfig
+pkgconfiglibdir=$(libdir)/pkgconfig
+polkitpolicydir=$(datadir)/polkit-1/actions
+bashcompletiondir=@bashcompletiondir@
+zshcompletiondir=@zshcompletiondir@
+rpmmacrosdir=$(prefix)/lib/rpm/macros.d
+sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
+sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
+varlogdir=$(localstatedir)/log
+systemdstatedir=$(localstatedir)/lib/systemd
+catalogstatedir=$(systemdstatedir)/catalog
+xinitrcdir=$(sysconfdir)/X11/xinit/xinitrc.d
+
+# Our own, non-special dirs
+pkgsysconfdir=$(sysconfdir)/systemd
+userunitdir=$(prefix)/lib/systemd/user
+userpresetdir=$(prefix)/lib/systemd/user-preset
+tmpfilesdir=$(prefix)/lib/tmpfiles.d
+sysusersdir=$(prefix)/lib/sysusers.d
+sysctldir=$(prefix)/lib/sysctl.d
+binfmtdir=$(prefix)/lib/binfmt.d
+modulesloaddir=$(prefix)/lib/modules-load.d
+networkdir=$(rootprefix)/lib/systemd/network
+pkgincludedir=$(includedir)/systemd
+systemgeneratordir=$(rootlibexecdir)/system-generators
+usergeneratordir=$(prefix)/lib/systemd/user-generators
+systemshutdowndir=$(rootlibexecdir)/system-shutdown
+systemsleepdir=$(rootlibexecdir)/system-sleep
+systemunitdir=$(rootprefix)/lib/systemd/system
+systempresetdir=$(rootprefix)/lib/systemd/system-preset
+udevlibexecdir=$(rootprefix)/lib/udev
+udevhomedir=$(udevlibexecdir)
+udevrulesdir=$(udevlibexecdir)/rules.d
+udevhwdbdir=$(udevlibexecdir)/hwdb.d
+catalogdir=$(prefix)/lib/systemd/catalog
+kernelinstalldir = $(prefix)/lib/kernel/install.d
+factory_etcdir = $(datadir)/factory/etc
+factory_pamdir = $(datadir)/factory/etc/pam.d
+bootlibdir = $(prefix)/lib/systemd/boot/efi
+
+# And these are the special ones for /
+rootprefix=@rootprefix@
+rootbindir=$(rootprefix)/bin
+rootlibexecdir=$(rootprefix)/lib/systemd
+
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/discard.mk b/discard.mk
new file mode 100644
index 0000000000..9a2fbfd002
--- /dev/null
+++ b/discard.mk
@@ -0,0 +1,977 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+EXTRA_DIST =
+BUILT_SOURCES =
+INSTALL_EXEC_HOOKS =
+UNINSTALL_EXEC_HOOKS =
+INSTALL_DATA_HOOKS =
+UNINSTALL_DATA_HOOKS =
+DISTCLEAN_LOCAL_HOOKS =
+CLEAN_LOCAL_HOOKS =
+pkginclude_HEADERS =
+noinst_LTLIBRARIES =
+lib_LTLIBRARIES =
+rootlibexec_LTLIBRARIES =
+include_HEADERS =
+noinst_DATA =
+pkgconfigdata_DATA =
+pkgconfiglib_DATA =
+polkitpolicy_in_in_files =
+polkitpolicy_in_files =
+polkitpolicy_files =
+dist_udevrules_DATA =
+nodist_udevrules_DATA =
+dist_pkgsysconf_DATA =
+nodist_pkgsysconf_DATA =
+dist_dbuspolicy_DATA =
+dist_dbussystemservice_DATA =
+dist_systemunit_DATA_busnames =
+dist_sysusers_DATA =
+check_PROGRAMS =
+check_DATA =
+dist_rootlibexec_DATA =
+tests=
+manual_tests =
+TEST_EXTENSIONS = .py
+PY_LOG_COMPILER = $(PYTHON)
+DISABLE_HARD_ERRORS = yes
+ifneq ($(ENABLE_TESTS),)
+noinst_PROGRAMS = $(manual_tests) $(tests) $(unsafe_tests)
+TESTS = $(tests)
+ifneq ($(ENABLE_UNSAFE_TESTS),)
+TESTS += \
+ $(unsafe_tests)
+endif
+else
+noinst_PROGRAMS =
+TESTS =
+endif # ENABLE_TESTS
+AM_TESTS_ENVIRONMENT = \
+ export SYSTEMD_KBD_MODEL_MAP=$(abs_top_srcdir)/src/locale/kbd-model-map; \
+ export SYSTEMD_LANGUAGE_FALLBACK_MAP=$(abs_top_srcdir)/src/locale/language-fallback-map;
+
+ifneq ($(ENABLE_BASH_COMPLETION),)
+dist_bashcompletion_DATA = $(dist_bashcompletion_data)
+nodist_bashcompletion_DATA = $(nodist_bashcompletion_data)
+endif # ENABLE_BASH_COMPLETION
+ifneq ($(ENABLE_ZSH_COMPLETION),)
+dist_zshcompletion_DATA = $(dist_zshcompletion_data)
+nodist_zshcompletion_DATA = $(nodist_zshcompletion_data)
+endif # ENABLE_ZSH_COMPLETION
+udevlibexec_PROGRAMS =
+gperf_gperf_sources =
+rootlib_LTLIBRARIES =
+
+in_files = $(filter %.in,$(EXTRA_DIST))
+in_in_files = $(filter %.in.in, $(in_files))
+m4_files = $(filter %.m4,$(EXTRA_DIST) $(in_files:.m4.in=.m4))
+
+CLEANFILES = $(BUILT_SOURCES) \
+ $(pkgconfigdata_DATA) \
+ $(pkgconfiglib_DATA) \
+ $(nodist_bashcompletion_data) \
+ $(nodist_zshcompletion_data) \
+ $(in_files:.in=) $(in_in_files:.in.in=) \
+ $(m4_files:.m4=)
+
+.PHONY: $(INSTALL_EXEC_HOOKS) $(UNINSTALL_EXEC_HOOKS) \
+ $(INSTALL_DATA_HOOKS) $(UNINSTALL_DATA_HOOKS) \
+ $(DISTCLEAN_LOCAL_HOOKS) $(CLEAN_LOCAL_HOOKS)
+
+AM_CPPFLAGS = \
+ -include $(top_builddir)/config.h \
+ -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \
+ -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
+ -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
+ -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
+ -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
+ -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
+ -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
+ -DCERTIFICATE_ROOT=\"$(CERTIFICATEROOT)\" \
+ -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
+ -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
+ -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
+ -DSYSTEMD_FSCK_PATH=\"$(rootlibexecdir)/systemd-fsck\" \
+ -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
+ -DSYSTEMD_SLEEP_BINARY_PATH=\"$(rootlibexecdir)/systemd-sleep\" \
+ -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" \
+ -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(rootbindir)/systemd-tty-ask-password-agent\" \
+ -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
+ -DROOTPREFIX=\"$(rootprefix)\" \
+ -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" \
+ -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" \
+ -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
+ -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
+ -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
+ -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
+ -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
+ -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
+ -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" \
+ -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
+ -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
+ -DQUOTACHECK=\"$(QUOTACHECK)\" \
+ -DKEXEC=\"$(KEXEC)\" \
+ -DMOUNT_PATH=\"$(MOUNT_PATH)\" \
+ -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" \
+ -DLIBDIR=\"$(libdir)\" \
+ -DROOTLIBDIR=\"$(rootlibdir)\" \
+ -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
+ -DTEST_DIR=\"$(abs_top_srcdir)/test\" \
+ -I $(top_srcdir)/src \
+ -I $(top_builddir)/src/basic \
+ -I $(top_srcdir)/src/basic \
+ -I $(top_srcdir)/src/shared \
+ -I $(top_builddir)/src/shared \
+ -I $(top_srcdir)/src/network \
+ -I $(top_srcdir)/src/locale \
+ -I $(top_srcdir)/src/login \
+ -I $(top_srcdir)/src/journal \
+ -I $(top_builddir)/src/journal \
+ -I $(top_srcdir)/src/timedate \
+ -I $(top_srcdir)/src/timesync \
+ -I $(top_srcdir)/src/nspawn \
+ -I $(top_srcdir)/src/resolve \
+ -I $(top_builddir)/src/resolve \
+ -I $(top_srcdir)/src/systemd \
+ -I $(top_builddir)/src/core \
+ -I $(top_srcdir)/src/core \
+ -I $(top_srcdir)/src/libudev \
+ -I $(top_srcdir)/src/udev \
+ -I $(top_srcdir)/src/udev/net \
+ -I $(top_builddir)/src/udev \
+ -I $(top_srcdir)/src/libsystemd/sd-bus \
+ -I $(top_srcdir)/src/libsystemd/sd-event \
+ -I $(top_srcdir)/src/libsystemd/sd-login \
+ -I $(top_srcdir)/src/libsystemd/sd-netlink \
+ -I $(top_srcdir)/src/libsystemd/sd-network \
+ -I $(top_srcdir)/src/libsystemd/sd-hwdb \
+ -I $(top_srcdir)/src/libsystemd/sd-device \
+ -I $(top_srcdir)/src/libsystemd/sd-id128 \
+ -I $(top_srcdir)/src/libsystemd-network \
+ $(OUR_CPPFLAGS)
+
+AM_CFLAGS = $(OUR_CFLAGS)
+AM_LDFLAGS = $(OUR_LDFLAGS)
+
+# ------------------------------------------------------------------------------
+INSTALL_DIRS =
+
+SHUTDOWN_TARGET_WANTS =
+LOCAL_FS_TARGET_WANTS =
+MULTI_USER_TARGET_WANTS =
+GRAPHICAL_TARGET_WANTS =
+RESCUE_TARGET_WANTS =
+SYSINIT_TARGET_WANTS =
+SOCKETS_TARGET_WANTS =
+BUSNAMES_TARGET_WANTS =
+TIMERS_TARGET_WANTS =
+USER_SOCKETS_TARGET_WANTS =
+USER_DEFAULT_TARGET_WANTS =
+USER_BUSNAMES_TARGET_WANTS =
+
+SYSTEM_UNIT_ALIASES =
+USER_UNIT_ALIASES =
+GENERAL_ALIASES =
+
+install-target-wants-hook:
+ what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(RESCUE_TARGET_WANTS)" && wants=rescue.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(SLICES_TARGET_WANTS)" && wants=slices.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(USER_SOCKETS_TARGET_WANTS)" && wants=sockets.target && dir=$(userunitdir) && $(add-wants)
+ what="$(USER_DEFAULT_TARGET_WANTS)" && wants=default.target && dir=$(userunitdir) && $(add-wants)
+
+install-busnames-target-wants-hook:
+ what="$(BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(systemunitdir) && $(add-wants)
+ what="$(USER_BUSNAMES_TARGET_WANTS)" && wants=busnames.target && dir=$(userunitdir) && $(add-wants)
+
+define add-wants
+ [ -z "$$what" ] || ( \
+ dir=$(DESTDIR)$$dir/$$wants.wants && \
+ $(MKDIR_P) -m 0755 $$dir && \
+ cd $$dir && \
+ rm -f $$what && \
+ for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
+endef
+
+install-directories-hook:
+ $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
+
+install-aliases-hook:
+ set -- $(SYSTEM_UNIT_ALIASES) && \
+ dir=$(systemunitdir) && $(install-aliases)
+ set -- $(USER_UNIT_ALIASES) && \
+ dir=$(userunitdir) && $(install-relative-aliases)
+ set -- $(GENERAL_ALIASES) && \
+ dir= && $(install-relative-aliases)
+
+define install-aliases
+ while [ -n "$$1" ]; do \
+ $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+ rm -f $(DESTDIR)$$dir/$$2 && \
+ $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
+ shift 2 || exit $$?; \
+ done
+endef
+
+define install-relative-aliases
+ while [ -n "$$1" ]; do \
+ $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+ rm -f $(DESTDIR)$$dir/$$2 && \
+ $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
+ shift 2 || exit $$?; \
+ done
+endef
+
+install-touch-usr-hook:
+ touch -c $(DESTDIR)/$(prefix)
+
+INSTALL_EXEC_HOOKS += \
+ install-target-wants-hook \
+ install-directories-hook \
+ install-aliases-hook \
+ install-touch-usr-hook
+
+INSTALL_EXEC_HOOKS += \
+ install-busnames-target-wants-hook
+
+dist_bashcompletion_data = \
+ shell-completion/bash/busctl \
+ shell-completion/bash/journalctl \
+ shell-completion/bash/systemd-analyze \
+ shell-completion/bash/systemd-cat \
+ shell-completion/bash/systemd-cgls \
+ shell-completion/bash/systemd-cgtop \
+ shell-completion/bash/systemd-delta \
+ shell-completion/bash/systemd-detect-virt \
+ shell-completion/bash/systemd-nspawn \
+ shell-completion/bash/systemd-path \
+ shell-completion/bash/systemd-run \
+ shell-completion/bash/udevadm \
+ shell-completion/bash/kernel-install
+
+nodist_bashcompletion_data = \
+ shell-completion/bash/systemctl
+
+dist_zshcompletion_data = \
+ shell-completion/zsh/_busctl \
+ shell-completion/zsh/_journalctl \
+ shell-completion/zsh/_udevadm \
+ shell-completion/zsh/_kernel-install \
+ shell-completion/zsh/_systemd-nspawn \
+ shell-completion/zsh/_systemd-analyze \
+ shell-completion/zsh/_systemd-run \
+ shell-completion/zsh/_sd_hosts_or_user_at_host \
+ shell-completion/zsh/_sd_outputmodes \
+ shell-completion/zsh/_sd_unit_files \
+ shell-completion/zsh/_systemd-delta \
+ shell-completion/zsh/_systemd
+
+nodist_zshcompletion_data = \
+ shell-completion/zsh/_systemctl
+
+EXTRA_DIST += \
+ shell-completion/bash/systemctl.in \
+ shell-completion/zsh/_systemctl.in
+
+dist_sysctl_DATA = \
+ sysctl.d/50-default.conf
+
+dist_systemunit_DATA = \
+ units/graphical.target \
+ units/multi-user.target \
+ units/emergency.target \
+ units/sysinit.target \
+ units/basic.target \
+ units/getty.target \
+ units/halt.target \
+ units/kexec.target \
+ units/exit.target \
+ units/local-fs.target \
+ units/local-fs-pre.target \
+ units/initrd.target \
+ units/initrd-fs.target \
+ units/initrd-root-device.target \
+ units/initrd-root-fs.target \
+ units/remote-fs.target \
+ units/remote-fs-pre.target \
+ units/network.target \
+ units/network-pre.target \
+ units/network-online.target \
+ units/nss-lookup.target \
+ units/nss-user-lookup.target \
+ units/poweroff.target \
+ units/reboot.target \
+ units/rescue.target \
+ units/rpcbind.target \
+ units/time-sync.target \
+ units/shutdown.target \
+ units/final.target \
+ units/umount.target \
+ units/sigpwr.target \
+ units/sleep.target \
+ units/sockets.target \
+ units/timers.target \
+ units/paths.target \
+ units/suspend.target \
+ units/swap.target \
+ units/slices.target \
+ units/system.slice \
+ units/systemd-initctl.socket \
+ units/syslog.socket \
+ units/dev-hugepages.mount \
+ units/dev-mqueue.mount \
+ units/sys-kernel-config.mount \
+ units/sys-kernel-debug.mount \
+ units/sys-fs-fuse-connections.mount \
+ units/tmp.mount \
+ units/var-lib-machines.mount \
+ units/printer.target \
+ units/sound.target \
+ units/bluetooth.target \
+ units/smartcard.target \
+ units/systemd-ask-password-wall.path \
+ units/systemd-ask-password-console.path \
+ units/systemd-udevd-control.socket \
+ units/systemd-udevd-kernel.socket \
+ units/system-update.target \
+ units/initrd-switch-root.target \
+ units/machines.target
+
+dist_systemunit_DATA += \
+ $(dist_systemunit_DATA_busnames)
+
+dist_systemunit_DATA_busnames += \
+ units/busnames.target
+
+nodist_systemunit_DATA = \
+ units/getty@.service \
+ units/serial-getty@.service \
+ units/console-getty.service \
+ units/container-getty@.service \
+ units/systemd-initctl.service \
+ units/systemd-remount-fs.service \
+ units/systemd-ask-password-wall.service \
+ units/systemd-ask-password-console.service \
+ units/systemd-sysctl.service \
+ units/emergency.service \
+ units/rescue.service \
+ units/user@.service \
+ units/systemd-suspend.service \
+ units/systemd-halt.service \
+ units/systemd-poweroff.service \
+ units/systemd-reboot.service \
+ units/systemd-kexec.service \
+ units/systemd-exit.service \
+ units/systemd-fsck@.service \
+ units/systemd-fsck-root.service \
+ units/systemd-machine-id-commit.service \
+ units/systemd-udevd.service \
+ units/systemd-udev-trigger.service \
+ units/systemd-udev-settle.service \
+ units/systemd-hwdb-update.service \
+ units/debug-shell.service \
+ units/initrd-parse-etc.service \
+ units/initrd-cleanup.service \
+ units/initrd-udevadm-cleanup-db.service \
+ units/initrd-switch-root.service \
+ units/systemd-nspawn@.service \
+ units/systemd-update-done.service
+
+ifneq ($(HAVE_UTMP),)
+nodist_systemunit_DATA += \
+ units/systemd-update-utmp.service \
+ units/systemd-update-utmp-runlevel.service
+endif # HAVE_UTMP
+
+dist_userunit_DATA = \
+ units/user/basic.target \
+ units/user/default.target \
+ units/user/exit.target \
+ units/user/graphical-session.target \
+ units/user/graphical-session-pre.target \
+ units/user/bluetooth.target \
+ units/user/busnames.target \
+ units/user/paths.target \
+ units/user/printer.target \
+ units/user/shutdown.target \
+ units/user/smartcard.target \
+ units/user/sockets.target \
+ units/user/sound.target \
+ units/user/timers.target
+
+nodist_userunit_DATA = \
+ units/user/systemd-exit.service
+
+dist_systempreset_DATA = \
+ system-preset/90-systemd.preset
+
+EXTRA_DIST += \
+ units/getty@.service.m4 \
+ units/serial-getty@.service.m4 \
+ units/console-getty.service.m4.in \
+ units/container-getty@.service.m4.in \
+ units/rescue.service.in \
+ units/systemd-initctl.service.in \
+ units/systemd-remount-fs.service.in \
+ units/systemd-update-utmp.service.in \
+ units/systemd-update-utmp-runlevel.service.in \
+ units/systemd-ask-password-wall.service.in \
+ units/systemd-ask-password-console.service.in \
+ units/systemd-sysctl.service.in \
+ units/emergency.service.in \
+ units/systemd-halt.service.in \
+ units/systemd-poweroff.service.in \
+ units/systemd-reboot.service.in \
+ units/systemd-kexec.service.in \
+ units/systemd-exit.service.in \
+ units/user/systemd-exit.service.in \
+ units/systemd-fsck@.service.in \
+ units/systemd-fsck-root.service.in \
+ units/systemd-machine-id-commit.service.in \
+ units/user@.service.m4.in \
+ units/debug-shell.service.in \
+ units/systemd-suspend.service.in \
+ units/quotaon.service.in \
+ units/initrd-parse-etc.service.in \
+ units/initrd-cleanup.service.in \
+ units/initrd-udevadm-cleanup-db.service.in \
+ units/initrd-switch-root.service.in \
+ units/systemd-nspawn@.service.in \
+ units/systemd-update-done.service.in \
+ units/tmp.mount.m4
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+nodist_systemunit_DATA += \
+ units/rc-local.service \
+ units/halt-local.service
+
+systemgenerator_PROGRAMS += \
+ systemd-sysv-generator \
+ systemd-rc-local-generator
+endif # HAVE_SYSV_COMPAT
+
+EXTRA_DIST += \
+ src/systemctl/systemd-sysv-install.SKELETON \
+ units/rc-local.service.in \
+ units/halt-local.service.in
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/machines.target $(pkgsysconfdir)/system/multi-user.target.wants/machines.target
+
+dist_doc_DATA = \
+ README \
+ NEWS \
+ CODING_STYLE \
+ LICENSE.LGPL2.1 \
+ LICENSE.GPL2 \
+ DISTRO_PORTING \
+ src/libsystemd/sd-bus/PORTING-DBUS1 \
+ src/libsystemd/sd-bus/DIFFERENCES \
+ src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
+
+EXTRA_DIST += \
+ README.md \
+ autogen.sh \
+ .dir-locals.el \
+ .editorconfig \
+ .vimrc \
+ .ycm_extra_conf.py \
+ .travis.yml \
+ .mailmap
+
+@INTLTOOL_POLICY_RULE@
+
+ifneq ($(ENABLE_LDCONFIG),)
+dist_systemunit_DATA += \
+ units/ldconfig.service
+
+SYSINIT_TARGET_WANTS += \
+ ldconfig.service
+endif # ENABLE_LDCONFIG
+
+gperf_gperf_m4_sources = \
+ src/core/load-fragment-gperf.gperf.m4
+
+gperf_txt_sources = \
+ src/basic/errno-list.txt \
+ src/basic/af-list.txt \
+ src/basic/arphrd-list.txt \
+ src/basic/cap-list.txt
+
+BUILT_SOURCES += \
+ $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
+ $(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf-nulstr.c) \
+ $(gperf_gperf_sources:-gperf.gperf=-gperf.c) \
+ $(gperf_txt_sources:-list.txt=-from-name.h) \
+ $(filter-out %keyboard-keys-to-name.h,$(gperf_txt_sources:-list.txt=-to-name.h))
+
+CLEANFILES += \
+ $(gperf_txt_sources:-list.txt=-from-name.gperf)
+DISTCLEANFILES = \
+ $(gperf_txt_sources)
+
+EXTRA_DIST += \
+ $(gperf_gperf_m4_sources) \
+ $(gperf_gperf_sources)
+
+CLEANFILES += \
+ $(gperf_txt_sources)
+
+## .PHONY so it always rebuilds it
+.PHONY: coverage lcov-run lcov-report coverage-sync
+
+# run lcov from scratch, always
+coverage: all
+ $(MAKE) lcov-run
+ $(MAKE) lcov-report
+
+coverage_dir = coverage
+coverage_opts = --base-directory $(srcdir) --directory $(builddir) --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
+
+ifneq ($(ENABLE_COVERAGE),)
+# reset run coverage tests
+lcov-run:
+ @rm -rf $(coverage_dir)
+ lcov $(coverage_opts) --zerocounters
+ -$(MAKE) check
+
+# generate report based on current coverage data
+lcov-report:
+ $(MKDIR_P) $(coverage_dir)
+ lcov $(coverage_opts) --compat-libtool --capture --no-external \
+ | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
+ lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
+ genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
+ @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
+
+# lcov doesn't work properly with vpath builds, make sure that bad
+# output is not uploaded by mistake.
+coverage-sync: coverage
+ test "$(builddir)" = "$(srcdir)"
+ rsync -rlv --delete --omit-dir-times coverage/ $(www_target)/coverage
+
+else
+lcov-run lcov-report:
+ echo "Need to reconfigure with --enable-coverage"
+endif # ENABLE_COVERAGE
+
+ifneq ($(HAVE_REMOTE),)
+nodist_sysusers_DATA += \
+ sysusers.d/systemd-remote.conf
+endif # HAVE_REMOTE
+dist_factory_etc_DATA = \
+ factory/etc/nsswitch.conf
+
+ifneq ($(HAVE_PAM),)
+dist_factory_pam_DATA = \
+ factory/etc/pam.d/system-auth \
+ factory/etc/pam.d/other
+endif # HAVE_PAM
+
+ifneq ($(ENABLE_TESTS),)
+TESTS += \
+ test/udev-test.pl
+
+ifneq ($(HAVE_PYTHON),)
+TESTS += \
+ test/rule-syntax-check.py \
+ hwdb/parse_hwdb.py
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+TESTS += \
+ test/sysv-generator-test.py
+endif # HAVE_SYSV_COMPAT
+endif # HAVE_PYTHON
+endif # ENABLE_TESTS
+
+tests += \
+ test-libudev
+
+manual_tests += \
+ test-udev
+
+test_libudev_SOURCES = \
+ src/test/test-libudev.c
+
+test_libudev_LDADD = \
+ libsystemd-shared.la
+
+test_udev_SOURCES = \
+ src/test/test-udev.c
+
+test_udev_LDADD = \
+ libudev-core.la \
+ libsystemd-shared.la \
+ $(BLKID_LIBS) \
+ $(KMOD_LIBS) \
+ -lrt
+
+ifneq ($(ENABLE_TESTS),)
+check_DATA += \
+ test/sys
+endif # ENABLE_TESTS
+
+# packed sysfs test tree
+$(outdir)/sys: test/sys.tar.xz
+ -rm -rf test/sys
+ $(AM_V_GEN)tar -C test/ -xJf $(top_srcdir)/test/sys.tar.xz
+ -touch test/sys
+
+test-sys-distclean:
+ -rm -rf test/sys
+DISTCLEAN_LOCAL_HOOKS += test-sys-distclean
+
+EXTRA_DIST += \
+ test/sys.tar.xz \
+ test/udev-test.pl \
+ test/rule-syntax-check.py \
+ test/sysv-generator-test.py \
+ test/mocks/fsck \
+ hwdb/parse_hwdb.py
+
+test_nss_SOURCES = \
+ src/test/test-nss.c
+
+test_nss_LDADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la \
+ -ldl
+
+manual_tests += \
+ test-nss
+
+endif # HAVE_GCRYPT
+endif # HAVE_BZIP2
+endif # HAVE_ZLIB
+endif # HAVE_XZ
+endif # HAVE_LIBCURL
+
+endif # ENABLE_IMPORTD
+EXTRA_DIST += \
+ test/Makefile \
+ test/README.testsuite \
+ test/TEST-01-BASIC \
+ test/TEST-01-BASIC/Makefile \
+ test/TEST-01-BASIC/test.sh \
+ test/TEST-02-CRYPTSETUP \
+ test/TEST-02-CRYPTSETUP/Makefile \
+ test/TEST-02-CRYPTSETUP/test.sh \
+ test/TEST-03-JOBS \
+ test/TEST-03-JOBS/Makefile \
+ test/TEST-03-JOBS/test-jobs.sh \
+ test/TEST-03-JOBS/test.sh \
+ test/TEST-04-JOURNAL/Makefile \
+ test/TEST-04-JOURNAL/test-journal.sh \
+ test/TEST-04-JOURNAL/test.sh \
+ test/TEST-05-RLIMITS/Makefile \
+ test/TEST-05-RLIMITS/test-rlimits.sh \
+ test/TEST-05-RLIMITS/test.sh \
+ test/TEST-06-SELINUX/Makefile \
+ test/TEST-06-SELINUX/test-selinux-checks.sh \
+ test/TEST-06-SELINUX/test.sh \
+ test/TEST-06-SELINUX/systemd_test.te \
+ test/TEST-06-SELINUX/systemd_test.if \
+ test/TEST-07-ISSUE-1981/Makefile \
+ test/TEST-07-ISSUE-1981/test-segfault.sh \
+ test/TEST-07-ISSUE-1981/test.sh \
+ test/TEST-08-ISSUE-2730/Makefile \
+ test/TEST-08-ISSUE-2730/test.sh \
+ test/TEST-09-ISSUE-2691/Makefile \
+ test/TEST-09-ISSUE-2691/test.sh \
+ test/TEST-10-ISSUE-2467/Makefile \
+ test/TEST-10-ISSUE-2467/test.sh \
+ test/TEST-11-ISSUE-3166/Makefile \
+ test/TEST-11-ISSUE-3166/test.sh \
+ test/TEST-12-ISSUE-3171/Makefile \
+ test/TEST-12-ISSUE-3171/test.sh \
+ test/TEST-13-NSPAWN-SMOKE/Makefile \
+ test/TEST-13-NSPAWN-SMOKE/create-busybox-container \
+ test/TEST-13-NSPAWN-SMOKE/test.sh \
+ test/test-functions
+
+EXTRA_DIST += \
+ test/loopy2.service \
+ test/loopy3.service \
+ test/loopy4.service \
+ test/loopy.service \
+ test/loopy.service.d \
+ test/loopy.service.d/compat.conf
+
+$(outdir)/%: units/%.in
+ $(SED_PROCESS)
+
+$(outdir)/%: man/%.in
+ $(SED_PROCESS)
+
+%.pc: %.pc.in
+ $(SED_PROCESS)
+
+%.conf: %.conf.in
+ $(SED_PROCESS)
+
+$(outdir)/%.systemd: src/core/%.systemd.in
+ $(SED_PROCESS)
+
+$(outdir)/%.policy.in: src/%.policy.in.in
+ $(SED_PROCESS)
+
+$(outdir)/%: shell-completion/%.in
+ $(SED_PROCESS)
+
+%.rules: %.rules.in
+ $(SED_PROCESS)
+
+%.conf: %.conf.in
+ $(SED_PROCESS)
+
+$(outdir)/%: sysusers.d/%.m4 $(top_builddir)/config.status
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
+$(outdir)/%: tmpfiles.d/%.m4 $(top_builddir)/config.status
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
+
+$(outdir)/%: units/%.m4 $(top_builddir)/config.status
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
+
+$(outdir)/%: units/user/%.m4 $(top_builddir)/config.status
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
+
+ifneq ($(ENABLE_POLKIT),)
+nodist_polkitpolicy_DATA = \
+ $(polkitpolicy_files) \
+ $(polkitpolicy_in_in_files:.policy.in.in=.policy)
+endif # ENABLE_POLKIT
+
+EXTRA_DIST += \
+ $(polkitpolicy_in_files) \
+ $(polkitpolicy_in_in_files)
+
+CLEANFILES += \
+ man/custom-entities.ent
+
+EXTRA_DIST += \
+ man/custom-html.xsl \
+ man/custom-man.xsl
+
+# ------------------------------------------------------------------------------
+SOCKETS_TARGET_WANTS += \
+ systemd-initctl.socket
+
+ifneq ($(HAVE_UTMP),)
+ifneq ($(HAVE_SYSV_COMPAT),)
+MULTI_USER_TARGET_WANTS += \
+ systemd-update-utmp-runlevel.service
+GRAPHICAL_TARGET_WANTS += \
+ systemd-update-utmp-runlevel.service
+RESCUE_TARGET_WANTS += \
+ systemd-update-utmp-runlevel.service
+endif # HAVE_SYSV_COMPAT
+
+SYSINIT_TARGET_WANTS += \
+ systemd-update-utmp.service
+endif # HAVE_UTMP
+
+SYSINIT_TARGET_WANTS += \
+ systemd-update-done.service
+
+LOCAL_FS_TARGET_WANTS += \
+ systemd-remount-fs.service \
+ tmp.mount \
+ var-lib-machines.mount
+
+MULTI_USER_TARGET_WANTS += \
+ getty.target \
+ systemd-ask-password-wall.path
+
+SYSINIT_TARGET_WANTS += \
+ dev-hugepages.mount \
+ dev-mqueue.mount \
+ sys-kernel-config.mount \
+ sys-kernel-debug.mount \
+ sys-fs-fuse-connections.mount \
+ systemd-sysctl.service \
+ systemd-ask-password-console.path
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+SYSTEM_UNIT_ALIASES += \
+ poweroff.target runlevel0.target \
+ rescue.target runlevel1.target \
+ multi-user.target runlevel2.target \
+ multi-user.target runlevel3.target \
+ multi-user.target runlevel4.target \
+ graphical.target runlevel5.target \
+ reboot.target runlevel6.target
+endif # HAVE_SYSV_COMPAT
+
+SYSTEM_UNIT_ALIASES += \
+ graphical.target default.target \
+ reboot.target ctrl-alt-del.target \
+ getty@.service autovt@.service
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
+ $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \
+ $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \
+ $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+INSTALL_DIRS += \
+ $(systemunitdir)/runlevel1.target.wants \
+ $(systemunitdir)/runlevel2.target.wants \
+ $(systemunitdir)/runlevel3.target.wants \
+ $(systemunitdir)/runlevel4.target.wants \
+ $(systemunitdir)/runlevel5.target.wants
+endif # HAVE_SYSV_COMPAT
+
+INSTALL_DIRS += \
+ $(prefix)/lib/modules-load.d \
+ $(sysconfdir)/modules-load.d \
+ $(prefix)/lib/systemd/network \
+ $(sysconfdir)/systemd/network \
+ $(prefix)/lib/sysctl.d \
+ $(sysconfdir)/sysctl.d \
+ $(prefix)/lib/kernel/install.d \
+ $(sysconfdir)/kernel/install.d \
+ $(systemshutdowndir) \
+ $(systemsleepdir) \
+ $(systemgeneratordir) \
+ $(usergeneratordir) \
+ \
+ $(userunitdir) \
+ $(pkgsysconfdir)/system \
+ $(pkgsysconfdir)/system/multi-user.target.wants \
+ $(pkgsysconfdir)/system/getty.target.wants \
+ $(pkgsysconfdir)/user \
+ $(dbussessionservicedir) \
+ $(sysconfdir)/xdg/systemd
+
+install-exec-hook: $(INSTALL_EXEC_HOOKS)
+
+uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
+
+install-data-hook: $(INSTALL_DATA_HOOKS)
+
+distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
+
+clean-local: $(CLEAN_LOCAL_HOOKS)
+ rm -rf $(abs_srcdir)/install-tree
+ rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
+ $(abs_srcdir)/hwdb/iab.txt
+
+DISTCHECK_CONFIGURE_FLAGS = \
+ --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
+ --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
+ --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
+ --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
+ --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
+ --with-pamlibdir=$$dc_install_base/$(pamlibdir) \
+ --with-pamconfdir=$$dc_install_base/$(pamconfdir) \
+ --with-rootprefix=$$dc_install_base \
+ --enable-compat-libs
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+DISTCHECK_CONFIGURE_FLAGS += \
+ --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
+ --with-sysvrcnd-path=$$dc_install_base/$(sysvrcnddir)
+else
+DISTCHECK_CONFIGURE_FLAGS += \
+ --with-sysvinit-path= \
+ --with-sysvrcnd-path=
+endif # HAVE_SYSV_COMPAT
+
+ifneq ($(ENABLE_SPLIT_USR),)
+DISTCHECK_CONFIGURE_FLAGS += \
+ --enable-split-usr
+else
+DISTCHECK_CONFIGURE_FLAGS += \
+ --disable-split-usr
+endif # ENABLE_SPLIT_USR
+
+.PHONY: dist-check-help
+dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
+ for i in $(abspath $^); do \
+ if $$i --help | grep -v 'default:' | grep -E -q '.{80}.' ; then \
+ echo "$(basename $$i) --help output is too wide:"; \
+ $$i --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
+ exit 1; \
+ fi; done
+
+include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
+public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
+.PHONY: dist-check-includes
+dist-check-includes: $(public_headers)
+ @res=0; \
+ for i in $(abspath $^); do \
+ for cc in $(include_compilers); do \
+ echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null"; \
+ $$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1; \
+ done; \
+ done; exit $$res
+
+.PHONY: built-sources
+built-sources: $(BUILT_SOURCES)
+
+.PHONY: git-tag
+git-tag:
+ git tag -s "v$(VERSION)" -m "systemd $(VERSION)"
+
+.PHONY: git-tar
+git-tar:
+ git archive --format=tar --prefix=systemd-$(VERSION)/ HEAD | gzip > systemd-$(VERSION).tar.gz
+
+www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
+
+.PHONY: doc-sync
+doc-sync: all
+ rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
+
+.PHONY: install-tree
+install-tree: all
+ rm -rf $(abs_srcdir)/install-tree
+ $(MAKE) install DESTDIR=$(abs_srcdir)/install-tree
+ tree $(abs_srcdir)/install-tree
+
+BUILT_SOURCES += \
+ test-libsystemd-sym.c \
+ test-libudev-sym.c
+
+CLEANFILES += \
+ test-libsystemd-sym.c \
+ test-libudev-sym.c
+
+tests += \
+ test-libsystemd-sym \
+ test-libudev-sym
+
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/docs/.gitignore b/docs/.gitignore
deleted file mode 100644
index 35b5e99aee..0000000000
--- a/docs/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/html
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/docs/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/docs/sysvinit/Makefile b/docs/sysvinit/Makefile
deleted file mode 120000
index 50be21181f..0000000000
--- a/docs/sysvinit/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../src/Makefile \ No newline at end of file
diff --git a/docs/var-log/Makefile b/docs/var-log/Makefile
deleted file mode 120000
index 50be21181f..0000000000
--- a/docs/var-log/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../src/Makefile \ No newline at end of file
diff --git a/hwdb/Makefile b/hwdb/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/hwdb/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/man/GNUmakefile b/man/GNUmakefile
new file mode 120000
index 0000000000..bb60b1ed40
--- /dev/null
+++ b/man/GNUmakefile
@@ -0,0 +1 @@
+../GNUmakefile \ No newline at end of file
diff --git a/man/Makefile b/man/Makefile
index bd1047548b..edba211499 120000..100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -1 +1,32 @@
-../src/Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+$(outdir)/custom-entities.ent: configure.ac
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@)
+ $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
+ printf '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">\n,$(substitutions))))') \
+ > $@ # '
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/network/Makefile b/network/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/network/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/rules/.gitignore b/rules/.gitignore
deleted file mode 100644
index 93a50ddd80..0000000000
--- a/rules/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/99-systemd.rules
diff --git a/rules/Makefile b/rules/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/rules/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/shell-completion/Makefile b/shell-completion/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/shell-completion/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/shell-completion/bash/.gitignore b/shell-completion/bash/.gitignore
deleted file mode 100644
index 016e09d1e7..0000000000
--- a/shell-completion/bash/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/systemctl
diff --git a/shell-completion/bash/Makefile b/shell-completion/bash/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/shell-completion/bash/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/shell-completion/zsh/Makefile b/shell-completion/zsh/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/shell-completion/zsh/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
deleted file mode 100644
index 62114ff095..0000000000
--- a/shell-completion/zsh/_systemd
+++ /dev/null
@@ -1,82 +0,0 @@
-#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-detect-virt systemd-machine-id-setup systemd-notify systemd-tty-ask-password-agent
-
-local curcontext="$curcontext" state lstate line
-case "$service" in
- systemd-ask-password)
- _arguments \
- {-h,--help}'[Show this help]' \
- '--icon=[Icon name]:icon name:' \
- '--timeout=[Timeout in sec]:timeout (seconds):' \
- '--no-tty[Ask question via agent even on TTY]' \
- '--accept-cached[Accept cached passwords]' \
- '--multiple[List multiple passwords if available]'
- ;;
- systemd-cat)
- _arguments \
- {-h,--help}'[Show this help]' \
- '--version[Show package version.]' \
- {-t+,--identifier=}'[Set syslog identifier.]:syslog identifier:' \
- {-p+,--priority=}'[Set priority value.]:value:({0..7})' \
- '--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \
- ':Message'
- ;;
- systemd-cgls)
- _arguments \
- {-h,--help}'[Show this help]' \
- '--version[Show package version]' \
- '--no-pager[Do not pipe output into a pager]' \
- {-a,--all}'[Show all groups, including empty]' \
- '-k[Include kernel threads in output]' \
- ':cgroups:(cpuset cpu cpuacct memory devices freezer blkio)'
- ;;
- systemd-cgtop)
- _arguments \
- {-h,--help}'[Show this help]' \
- '--version[Print version and exit]' \
- '(-c -m -i -t)-p[Order by path]' \
- '(-c -p -m -i)-t[Order by number of tasks]' \
- '(-m -p -i -t)-c[Order by CPU load]' \
- '(-c -p -i -t)-m[Order by memory load]' \
- '(-c -m -p -t)-i[Order by IO load]' \
- {-d+,--delay=}'[Specify delay]:delay:' \
- {-n+,--iterations=}'[Run for N iterations before exiting]:number of iterations:' \
- {-b,--batch}'[Run in batch mode, accepting no input]' \
- '--depth=[Maximum traversal depth]:maximum depth:'
- ;;
- systemd-detect-virt)
- _arguments \
- {-h,--help}'[Show this help]' \
- '--version[Show package version]' \
- {-c,--container}'[Only detect whether we are run in a container]' \
- {-v,--vm}'[Only detect whether we are run in a VM]' \
- {-q,--quiet}"[Don't output anything, just set return value]"
- ;;
- systemd-machine-id-setup)
- _arguments \
- {-h,--help}'[Show this help]' \
- '--version[Show package version]'
- ;;
- systemd-notify)
- _arguments \
- {-h,--help}'[Show this help]' \
- '--version[Show package version]' \
- '--ready[Inform the init system about service start-up completion.]' \
- '--pid=[Inform the init system about the main PID of the daemon]:daemon main PID:_pids' \
- '--status=[Send a free-form status string for the daemon to the init systemd]:status string:' \
- '--booted[Returns 0 if the system was booted up with systemd]'
- ;;
- systemd-tty-ask-password-agent)
- _arguments \
- {-h,--help}'[Prints a short help text and exits.]' \
- '--version[Prints a short version string and exits.]' \
- '--list[Lists all currently pending system password requests.]' \
- '--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \
- '--watch[Continuously process password requests.]' \
- '--wall[Forward password requests to wall(1).]' \
- '--plymouth[Ask question with plymouth(8).]' \
- '--console[Ask question on /dev/console.]'
- ;;
- *) _message 'eh?' ;;
-esac
-
-#vim: set ft=zsh sw=4 ts=4 et
diff --git a/src/GNUmakefile b/src/GNUmakefile
new file mode 120000
index 0000000000..bb60b1ed40
--- /dev/null
+++ b/src/GNUmakefile
@@ -0,0 +1 @@
+../GNUmakefile \ No newline at end of file
diff --git a/src/Makefile b/src/Makefile
index 9d07505194..a390ece982 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,6 +1,12 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
# This file is part of systemd.
#
-# Copyright 2010 Lennart Poettering
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
@@ -14,15 +20,53 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
-# This file is a dirty trick to simplify compilation from within
-# emacs. This file is not intended to be distributed. So, don't touch
-# it, even better ignore it!
-
-all:
- $(MAKE) -C ..
-
-clean:
- $(MAKE) -C .. clean
+nested.subdirs += busctl
+nested.subdirs += grp-boot
+nested.subdirs += grp-coredump
+nested.subdirs += grp-hostname
+nested.subdirs += grp-initprogs
+nested.subdirs += grp-journal
+nested.subdirs += grp-locale
+nested.subdirs += grp-login
+nested.subdirs += grp-machine
+nested.subdirs += grp-network
+nested.subdirs += grp-resolve
+nested.subdirs += grp-system
+nested.subdirs += grp-timedate
+nested.subdirs += grp-udev
+nested.subdirs += grp-utils
+nested.subdirs += libsystemd
+nested.subdirs += libsystemd-basic
+nested.subdirs += libsystemd-firewall
+nested.subdirs += libsystemd-gcrypt
+nested.subdirs += libsystemd-network
+nested.subdirs += libsystemd-shared
+nested.subdirs += libudev
+nested.subdirs += manpages
+nested.subdirs += nss-myhostname
+nested.subdirs += nss-systemd
+nested.subdirs += systemd-ask-password
+nested.subdirs += systemd-cgls
+nested.subdirs += systemd-cgtop
+nested.subdirs += systemd-cryptsetup
+nested.subdirs += systemd-debug-generator
+nested.subdirs += systemd-getty-generator
+nested.subdirs += systemd-gpt-auto-generator
+nested.subdirs += systemd-initctl
+nested.subdirs += systemd-machine-id-setup
+nested.subdirs += systemd-mount
+nested.subdirs += systemd-nspawn
+nested.subdirs += systemd-rc-local-generator
+nested.subdirs += systemd-remount-fs
+nested.subdirs += systemd-reply-password
+nested.subdirs += systemd-socket-proxyd
+nested.subdirs += systemd-stdio-bridge
+nested.subdirs += systemd-system-update-generator
+nested.subdirs += systemd-timesyncd
+nested.subdirs += systemd-tty-ask-password-agent
+nested.subdirs += test
-.PHONY: all clean
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/ac-power/Makefile b/src/ac-power/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/ac-power/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/activate/Makefile b/src/activate/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/activate/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/analyze/Makefile b/src/analyze/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/analyze/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/ask-password/Makefile b/src/ask-password/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/ask-password/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/backlight/Makefile b/src/backlight/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/backlight/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/basic/Makefile b/src/basic/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/basic/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/binfmt/Makefile b/src/binfmt/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/binfmt/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/boot/Makefile b/src/boot/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/boot/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/busctl/GNUmakefile b/src/busctl/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/busctl/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/busctl/Makefile b/src/busctl/Makefile
new file mode 100644
index 0000000000..bb41d82b85
--- /dev/null
+++ b/src/busctl/Makefile
@@ -0,0 +1,37 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += \
+ busctl
+
+busctl_SOURCES = \
+ src/libsystemd/sd-bus/busctl.c \
+ src/libsystemd/sd-bus/busctl-introspect.c \
+ src/libsystemd/sd-bus/busctl-introspect.h
+
+busctl_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/sd-bus/busctl-introspect.c b/src/busctl/busctl-introspect.c
index b09509f8e1..6f7c1d2a75 100644
--- a/src/libsystemd/sd-bus/busctl-introspect.c
+++ b/src/busctl/busctl-introspect.c
@@ -17,13 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/xml.h"
-#include "alloc-util.h"
#include "busctl-introspect.h"
-#include "string-util.h"
-#include "util.h"
-#include "xml.h"
#define NODE_DEPTH_MAX 16
diff --git a/src/libsystemd/sd-bus/busctl-introspect.h b/src/busctl/busctl-introspect.h
index d922e352db..d922e352db 100644
--- a/src/libsystemd/sd-bus/busctl-introspect.h
+++ b/src/busctl/busctl-introspect.h
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/busctl/busctl.c
index 2c3f591053..bac7fb06c4 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/busctl/busctl.c
@@ -19,27 +19,28 @@
#include <getopt.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-dump.h"
-#include "bus-internal.h"
-#include "bus-signature.h"
-#include "bus-type.h"
-#include "bus-util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-dump.h"
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-signature.h"
+#include "sd-bus/bus-type.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/pager.h"
+
#include "busctl-introspect.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "locale-util.h"
-#include "log.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "set.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "user-util.h"
-#include "util.h"
static bool arg_no_pager = false;
static bool arg_legend = true;
diff --git a/shell-completion/bash/busctl b/src/busctl/busctl.completion.bash
index 6a770b1b84..6a770b1b84 100644
--- a/shell-completion/bash/busctl
+++ b/src/busctl/busctl.completion.bash
diff --git a/shell-completion/zsh/_busctl b/src/busctl/busctl.completion.zsh
index a425b8c700..a425b8c700 100644
--- a/shell-completion/zsh/_busctl
+++ b/src/busctl/busctl.completion.zsh
diff --git a/man/busctl.xml b/src/busctl/busctl.xml
index 052a33097f..052a33097f 100644
--- a/man/busctl.xml
+++ b/src/busctl/busctl.xml
diff --git a/src/cgls/Makefile b/src/cgls/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/cgls/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/cgroups-agent/Makefile b/src/cgroups-agent/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/cgroups-agent/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/cgtop/Makefile b/src/cgtop/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/cgtop/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/core/Makefile b/src/core/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/core/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/coredump/Makefile b/src/coredump/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/coredump/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/cryptsetup/Makefile b/src/cryptsetup/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/cryptsetup/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/dbus1-generator/Makefile b/src/dbus1-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/dbus1-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/debug-generator/Makefile b/src/debug-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/debug-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/delta/Makefile b/src/delta/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/delta/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/detect-virt/Makefile b/src/detect-virt/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/detect-virt/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/escape/Makefile b/src/escape/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/escape/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/firstboot/Makefile b/src/firstboot/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/firstboot/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/fsck/Makefile b/src/fsck/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/fsck/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/fstab-generator/Makefile b/src/fstab-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/fstab-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/getty-generator/Makefile b/src/getty-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/getty-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/gpt-auto-generator/Makefile b/src/gpt-auto-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/gpt-auto-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/grp-boot/GNUmakefile b/src/grp-boot/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-boot/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-boot/Makefile b/src/grp-boot/Makefile
new file mode 100644
index 0000000000..df1febe823
--- /dev/null
+++ b/src/grp-boot/Makefile
@@ -0,0 +1,30 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += bootctl
+nested.subdirs += kernel-install
+nested.subdirs += systemd-boot
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-boot/bootctl/GNUmakefile b/src/grp-boot/bootctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-boot/bootctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-boot/bootctl/Makefile b/src/grp-boot/bootctl/Makefile
new file mode 100644
index 0000000000..90bbed9fad
--- /dev/null
+++ b/src/grp-boot/bootctl/Makefile
@@ -0,0 +1,53 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_EFI),)
+ifneq ($(HAVE_BLKID),)
+bootctl_SOURCES = \
+ src/boot/bootctl.c
+
+bootctl_CPPFLAGS = \
+ -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\" \
+ -DBOOTLIBDIR=\"$(bootlibdir)\"
+
+bootctl_CFLAGS = \
+ $(BLKID_CFLAGS)
+
+bootctl_LDADD = \
+ libsystemd-shared.la \
+ $(BLKID_LIBS)
+
+bin_PROGRAMS += \
+ bootctl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/bootctl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_bootctl
+endif # HAVE_BLKID
+endif # ENABLE_EFI
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/boot/bootctl.c b/src/grp-boot/bootctl/bootctl.c
index d53f8b2a6f..ed1c7ef791 100644
--- a/src/boot/bootctl.c
+++ b/src/grp-boot/bootctl/bootctl.c
@@ -26,7 +26,6 @@
#include <ftw.h>
#include <getopt.h>
#include <limits.h>
-#include <linux/magic.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -36,22 +35,24 @@
#include <sys/statfs.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "blkid-util.h"
-#include "dirent-util.h"
-#include "efivars.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "locale-util.h"
-#include "parse-util.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "umask-util.h"
-#include "util.h"
-#include "verbs.h"
-#include "virt.h"
-#include "stat-util.h"
+#include <linux/magic.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-basic/virt.h"
+#include "systemd-blkid/blkid-util.h"
+#include "systemd-shared/efivars.h"
static char *arg_path = NULL;
static bool arg_touch_variables = true;
diff --git a/shell-completion/bash/bootctl b/src/grp-boot/bootctl/bootctl.completion.bash
index c86ec7edc9..c86ec7edc9 100644
--- a/shell-completion/bash/bootctl
+++ b/src/grp-boot/bootctl/bootctl.completion.bash
diff --git a/shell-completion/zsh/_bootctl b/src/grp-boot/bootctl/bootctl.completion.zsh
index 0e1b0a5562..0e1b0a5562 100644
--- a/shell-completion/zsh/_bootctl
+++ b/src/grp-boot/bootctl/bootctl.completion.zsh
diff --git a/man/bootctl.xml b/src/grp-boot/bootctl/bootctl.xml
index e2575a4751..e2575a4751 100644
--- a/man/bootctl.xml
+++ b/src/grp-boot/bootctl/bootctl.xml
diff --git a/src/kernel-install/50-depmod.install b/src/grp-boot/kernel-install/50-depmod.install
index 68c24bed7a..68c24bed7a 100644
--- a/src/kernel-install/50-depmod.install
+++ b/src/grp-boot/kernel-install/50-depmod.install
diff --git a/src/kernel-install/90-loaderentry.install b/src/grp-boot/kernel-install/90-loaderentry.install
index af9f0f9ccd..af9f0f9ccd 100644
--- a/src/kernel-install/90-loaderentry.install
+++ b/src/grp-boot/kernel-install/90-loaderentry.install
diff --git a/src/grp-boot/kernel-install/GNUmakefile b/src/grp-boot/kernel-install/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-boot/kernel-install/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-boot/kernel-install/Makefile b/src/grp-boot/kernel-install/Makefile
new file mode 100644
index 0000000000..6a937f516c
--- /dev/null
+++ b/src/grp-boot/kernel-install/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+dist_bin_SCRIPTS = \
+ src/kernel-install/kernel-install
+
+dist_kernelinstall_SCRIPTS = \
+ src/kernel-install/50-depmod.install \
+ src/kernel-install/90-loaderentry.install
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/kernel-install/kernel-install b/src/grp-boot/kernel-install/kernel-install
index 0c0ee718ac..0c0ee718ac 100644
--- a/src/kernel-install/kernel-install
+++ b/src/grp-boot/kernel-install/kernel-install
diff --git a/shell-completion/bash/kernel-install b/src/grp-boot/kernel-install/kernel-install.completion.bash
index 7cd2494cf7..7cd2494cf7 100644
--- a/shell-completion/bash/kernel-install
+++ b/src/grp-boot/kernel-install/kernel-install.completion.bash
diff --git a/shell-completion/zsh/_kernel-install b/src/grp-boot/kernel-install/kernel-install.completion.zsh
index 4fdd3a4ae7..4fdd3a4ae7 100644
--- a/shell-completion/zsh/_kernel-install
+++ b/src/grp-boot/kernel-install/kernel-install.completion.zsh
diff --git a/man/kernel-install.xml b/src/grp-boot/kernel-install/kernel-install.xml
index 32e6169f63..32e6169f63 100644
--- a/man/kernel-install.xml
+++ b/src/grp-boot/kernel-install/kernel-install.xml
diff --git a/src/boot/efi/.gitignore b/src/grp-boot/systemd-boot/.gitignore
index e193acbe12..e193acbe12 100644
--- a/src/boot/efi/.gitignore
+++ b/src/grp-boot/systemd-boot/.gitignore
diff --git a/src/grp-boot/systemd-boot/GNUmakefile b/src/grp-boot/systemd-boot/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-boot/systemd-boot/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-boot/systemd-boot/Makefile b/src/grp-boot/systemd-boot/Makefile
new file mode 100644
index 0000000000..3b4d4ddda1
--- /dev/null
+++ b/src/grp-boot/systemd-boot/Makefile
@@ -0,0 +1,193 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_EFI),)
+ifneq ($(HAVE_GNUEFI),)
+efi_cppflags = \
+ $(EFI_CPPFLAGS) \
+ -I$(top_builddir) -include config.h \
+ -I$(EFI_INC_DIR)/efi \
+ -I$(EFI_INC_DIR)/efi/$(EFI_ARCH) \
+ -DEFI_MACHINE_TYPE_NAME=\"$(EFI_MACHINE_TYPE_NAME)\"
+
+efi_cflags = \
+ $(EFI_CFLAGS) \
+ -Wall \
+ -Wextra \
+ -std=gnu90 \
+ -nostdinc \
+ -ggdb -O0 \
+ -fpic \
+ -fshort-wchar \
+ -nostdinc \
+ -ffreestanding \
+ -fno-strict-aliasing \
+ -fno-stack-protector \
+ -Wsign-compare \
+ -Wno-missing-field-initializers
+
+ifneq ($(ARCH_X86_64),)
+efi_cflags += \
+ -mno-red-zone \
+ -mno-sse \
+ -mno-mmx \
+ -DEFI_FUNCTION_WRAPPER \
+ -DGNU_EFI_USE_MS_ABI
+endif # ARCH_X86_64
+
+ifneq ($(ARCH_IA32),)
+efi_cflags += \
+ -mno-sse \
+ -mno-mmx
+endif # ARCH_IA32
+
+efi_ldflags = \
+ $(EFI_LDFLAGS) \
+ -T $(EFI_LDS_DIR)/elf_$(EFI_ARCH)_efi.lds \
+ -shared \
+ -Bsymbolic \
+ -nostdlib \
+ -znocombreloc \
+ -L $(EFI_LIB_DIR) \
+ $(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
+
+# Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary' instead,
+# and add required symbols manually.
+ifneq ($(ARCH_AARCH64),)
+efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
+EFI_FORMAT = -O binary
+else
+EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
+endif # ARCH_AARCH64
+endif # HAVE_GNUEFI
+endif # ENABLE_EFI
+
+# ------------------------------------------------------------------------------
+systemd_boot_headers = \
+ src/boot/efi/util.h \
+ src/boot/efi/console.h \
+ src/boot/efi/graphics.h \
+ src/boot/efi/pefile.h \
+ src/boot/efi/measure.h \
+ src/boot/efi/disk.h
+
+systemd_boot_sources = \
+ src/boot/efi/util.c \
+ src/boot/efi/console.c \
+ src/boot/efi/graphics.c \
+ src/boot/efi/pefile.c \
+ src/boot/efi/disk.c \
+ src/boot/efi/measure.c \
+ src/boot/efi/boot.c
+
+EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
+
+systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o))
+systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so
+systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi
+
+ifneq ($(ENABLE_EFI),)
+ifneq ($(HAVE_GNUEFI),)
+bootlib_DATA = $(systemd_boot)
+
+$(outdir)/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
+ @$(MKDIR_P) $(top_builddir)/src/boot/efi/
+ $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
+
+$(systemd_boot_solib): $(systemd_boot_objects)
+ $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \
+ -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
+ nm -D -u $@ | grep ' U ' && exit 1 || :
+
+$(systemd_boot): $(systemd_boot_solib)
+ $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
+ -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
+endif # HAVE_GNUEFI
+endif # ENABLE_EFI
+
+CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
+
+# ------------------------------------------------------------------------------
+stub_headers = \
+ src/boot/efi/util.h \
+ src/boot/efi/pefile.h \
+ src/boot/efi/disk.h \
+ src/boot/efi/graphics.h \
+ src/boot/efi/splash.h \
+ src/boot/efi/measure.h \
+ src/boot/efi/linux.h
+
+stub_sources = \
+ src/boot/efi/util.c \
+ src/boot/efi/pefile.c \
+ src/boot/efi/disk.c \
+ src/boot/efi/graphics.c \
+ src/boot/efi/splash.c \
+ src/boot/efi/linux.c \
+ src/boot/efi/measure.c \
+ src/boot/efi/stub.c
+
+EXTRA_DIST += \
+ $(stub_sources) \
+ $(stub_headers) \
+ test/splash.bmp
+
+stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o))
+stub_solib = $(top_builddir)/src/boot/efi/stub.so
+stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub
+
+ifneq ($(ENABLE_EFI),)
+ifneq ($(HAVE_GNUEFI),)
+bootlib_DATA += $(stub)
+
+$(outdir)/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
+ @$(MKDIR_P) $(top_builddir)/src/boot/efi/
+ $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
+
+$(stub_solib): $(stub_objects)
+ $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
+ -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
+ nm -D -u $@ | grep ' U ' && exit 1 || :
+
+$(stub): $(stub_solib)
+ $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \
+ -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
+endif # HAVE_GNUEFI
+endif # ENABLE_EFI
+
+CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
+
+# ------------------------------------------------------------------------------
+CLEANFILES += test-efi-disk.img
+
+test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
+ $(AM_V_GEN)test/test-efi-create-disk.sh
+
+test-efi: test-efi-disk.img
+ $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
+
+EXTRA_DIST += test/test-efi-create-disk.sh
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/boot/efi/boot.c b/src/grp-boot/systemd-boot/boot.c
index 30c1ead1aa..9dfaed6d46 100644
--- a/src/boot/efi/boot.c
+++ b/src/grp-boot/systemd-boot/boot.c
@@ -20,9 +20,9 @@
#include "disk.h"
#include "graphics.h"
#include "linux.h"
+#include "measure.h"
#include "pefile.h"
#include "util.h"
-#include "measure.h"
#ifndef EFI_OS_INDICATIONS_BOOT_TO_FW_UI
#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001ULL
diff --git a/src/boot/efi/console.c b/src/grp-boot/systemd-boot/console.c
index 2b797c9a5f..2b797c9a5f 100644
--- a/src/boot/efi/console.c
+++ b/src/grp-boot/systemd-boot/console.c
diff --git a/src/boot/efi/console.h b/src/grp-boot/systemd-boot/console.h
index 3fe0ce5ec4..3fe0ce5ec4 100644
--- a/src/boot/efi/console.h
+++ b/src/grp-boot/systemd-boot/console.h
diff --git a/src/boot/efi/disk.c b/src/grp-boot/systemd-boot/disk.c
index 3e3b5b224a..3e3b5b224a 100644
--- a/src/boot/efi/disk.c
+++ b/src/grp-boot/systemd-boot/disk.c
diff --git a/src/boot/efi/disk.h b/src/grp-boot/systemd-boot/disk.h
index af91a9c674..af91a9c674 100644
--- a/src/boot/efi/disk.h
+++ b/src/grp-boot/systemd-boot/disk.h
diff --git a/src/boot/efi/graphics.c b/src/grp-boot/systemd-boot/graphics.c
index 4854baf874..4854baf874 100644
--- a/src/boot/efi/graphics.c
+++ b/src/grp-boot/systemd-boot/graphics.c
diff --git a/src/boot/efi/graphics.h b/src/grp-boot/systemd-boot/graphics.h
index cf48e647e7..cf48e647e7 100644
--- a/src/boot/efi/graphics.h
+++ b/src/grp-boot/systemd-boot/graphics.h
diff --git a/src/boot/efi/linux.c b/src/grp-boot/systemd-boot/linux.c
index 0dc99a6c53..0dc99a6c53 100644
--- a/src/boot/efi/linux.c
+++ b/src/grp-boot/systemd-boot/linux.c
diff --git a/src/boot/efi/linux.h b/src/grp-boot/systemd-boot/linux.h
index d9e6ed7955..d9e6ed7955 100644
--- a/src/boot/efi/linux.h
+++ b/src/grp-boot/systemd-boot/linux.h
diff --git a/src/boot/efi/measure.c b/src/grp-boot/systemd-boot/measure.c
index 4ac11a9bb0..42c7f477de 100644
--- a/src/boot/efi/measure.c
+++ b/src/grp-boot/systemd-boot/measure.c
@@ -15,6 +15,7 @@
#include <efi.h>
#include <efilib.h>
+
#include "measure.h"
#define EFI_TCG_PROTOCOL_GUID { 0xf541796d, 0xa62e, 0x4954, {0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd} }
@@ -159,7 +160,6 @@ typedef EFI_STATUS(EFIAPI * EFI_TCG2_SUBMIT_COMMAND) (IN EFI_TCG2_PROTOCOL * Thi
IN UINT32 OutputParameterBlockSize, IN UINT8 * OutputParameterBlock);
typedef EFI_STATUS(EFIAPI * EFI_TCG2_GET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, OUT UINT32 * ActivePcrBanks);
-
typedef EFI_STATUS(EFIAPI * EFI_TCG2_SET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, IN UINT32 ActivePcrBanks);
typedef EFI_STATUS(EFIAPI * EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This,
diff --git a/src/boot/efi/measure.h b/src/grp-boot/systemd-boot/measure.h
index a2cfe817d0..a2cfe817d0 100644
--- a/src/boot/efi/measure.h
+++ b/src/grp-boot/systemd-boot/measure.h
diff --git a/src/boot/efi/pefile.c b/src/grp-boot/systemd-boot/pefile.c
index 77fff77b69..77fff77b69 100644
--- a/src/boot/efi/pefile.c
+++ b/src/grp-boot/systemd-boot/pefile.c
diff --git a/src/boot/efi/pefile.h b/src/grp-boot/systemd-boot/pefile.h
index 2e445ede17..2e445ede17 100644
--- a/src/boot/efi/pefile.h
+++ b/src/grp-boot/systemd-boot/pefile.h
diff --git a/src/boot/efi/splash.c b/src/grp-boot/systemd-boot/splash.c
index c0ef7f64fe..c0ef7f64fe 100644
--- a/src/boot/efi/splash.c
+++ b/src/grp-boot/systemd-boot/splash.c
diff --git a/src/boot/efi/splash.h b/src/grp-boot/systemd-boot/splash.h
index 09b543fb47..09b543fb47 100644
--- a/src/boot/efi/splash.h
+++ b/src/grp-boot/systemd-boot/splash.h
diff --git a/src/boot/efi/stub.c b/src/grp-boot/systemd-boot/stub.c
index 1e250f34f4..9fae0c1372 100644
--- a/src/boot/efi/stub.c
+++ b/src/grp-boot/systemd-boot/stub.c
@@ -17,10 +17,10 @@
#include "disk.h"
#include "graphics.h"
#include "linux.h"
+#include "measure.h"
#include "pefile.h"
#include "splash.h"
#include "util.h"
-#include "measure.h"
/* magic string to find in the binary image */
static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " VERSION " ####";
diff --git a/test/test-efi-create-disk.sh b/src/grp-boot/systemd-boot/test-efi-create-disk.sh
index cd4699dc18..cd4699dc18 100755
--- a/test/test-efi-create-disk.sh
+++ b/src/grp-boot/systemd-boot/test-efi-create-disk.sh
diff --git a/src/boot/efi/util.c b/src/grp-boot/systemd-boot/util.c
index 98c5be74ce..98c5be74ce 100644
--- a/src/boot/efi/util.c
+++ b/src/grp-boot/systemd-boot/util.c
diff --git a/src/boot/efi/util.h b/src/grp-boot/systemd-boot/util.h
index e673cdf9a0..e673cdf9a0 100644
--- a/src/boot/efi/util.h
+++ b/src/grp-boot/systemd-boot/util.h
diff --git a/src/grp-coredump/GNUmakefile b/src/grp-coredump/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-coredump/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-coredump/Makefile b/src/grp-coredump/Makefile
new file mode 100644
index 0000000000..c2bbf948e9
--- /dev/null
+++ b/src/grp-coredump/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += coredumpctl
+nested.subdirs += systemd-coredump
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-coredump/coredumpctl/GNUmakefile b/src/grp-coredump/coredumpctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-coredump/coredumpctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-coredump/coredumpctl/Makefile b/src/grp-coredump/coredumpctl/Makefile
new file mode 100644
index 0000000000..25a0ee29f2
--- /dev/null
+++ b/src/grp-coredump/coredumpctl/Makefile
@@ -0,0 +1,41 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+coredumpctl_SOURCES = \
+ src/coredump/coredumpctl.c
+
+coredumpctl_LDADD = \
+ libsystemd-shared.la
+
+bin_PROGRAMS += \
+ coredumpctl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/coredumpctl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_coredumpctl
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/coredump/coredumpctl.c b/src/grp-coredump/coredumpctl/coredumpctl.c
index 0e5351e621..083bbccb32 100644
--- a/src/coredump/coredumpctl.c
+++ b/src/grp-coredump/coredumpctl/coredumpctl.c
@@ -24,27 +24,27 @@
#include <string.h>
#include <unistd.h>
-#include "sd-journal.h"
-
-#include "alloc-util.h"
-#include "compress.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "journal-internal.h"
-#include "log.h"
-#include "macro.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "set.h"
-#include "sigbus.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "user-util.h"
-#include "util.h"
+#include <systemd/sd-journal.h>
+
+#include "sd-journal/compress.h"
+#include "sd-journal/journal-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/pager.h"
static enum {
ACTION_NONE,
diff --git a/shell-completion/bash/coredumpctl b/src/grp-coredump/coredumpctl/coredumpctl.completion.bash
index 6091677506..6091677506 100644
--- a/shell-completion/bash/coredumpctl
+++ b/src/grp-coredump/coredumpctl/coredumpctl.completion.bash
diff --git a/shell-completion/zsh/_coredumpctl b/src/grp-coredump/coredumpctl/coredumpctl.completion.zsh
index e4c04a697f..e4c04a697f 100644
--- a/shell-completion/zsh/_coredumpctl
+++ b/src/grp-coredump/coredumpctl/coredumpctl.completion.zsh
diff --git a/man/coredumpctl.xml b/src/grp-coredump/coredumpctl/coredumpctl.xml
index abc245be5e..abc245be5e 100644
--- a/man/coredumpctl.xml
+++ b/src/grp-coredump/coredumpctl/coredumpctl.xml
diff --git a/sysctl.d/50-coredump.conf.in b/src/grp-coredump/systemd-coredump/50-coredump.sysctl.in
index 5a25de4512..5a25de4512 100644
--- a/sysctl.d/50-coredump.conf.in
+++ b/src/grp-coredump/systemd-coredump/50-coredump.sysctl.in
diff --git a/src/grp-coredump/systemd-coredump/GNUmakefile b/src/grp-coredump/systemd-coredump/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-coredump/systemd-coredump/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-coredump/systemd-coredump/Makefile b/src/grp-coredump/systemd-coredump/Makefile
new file mode 100644
index 0000000000..08fc6d44df
--- /dev/null
+++ b/src/grp-coredump/systemd-coredump/Makefile
@@ -0,0 +1,85 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_COREDUMP),)
+systemd_coredump_SOURCES = \
+ src/coredump/coredump.c \
+ src/coredump/coredump-vacuum.c \
+ src/coredump/coredump-vacuum.h
+
+systemd_coredump_CFLAGS = \
+ $(ACL_CFLAGS)
+
+systemd_coredump_LDADD = \
+ libsystemd-shared.la \
+ $(ACL_LIBS)
+
+ifneq ($(HAVE_ELFUTILS),)
+systemd_coredump_SOURCES += \
+ src/coredump/stacktrace.c \
+ src/coredump/stacktrace.h
+
+systemd_coredump_LDADD += \
+ $(ELFUTILS_LIBS)
+endif # HAVE_ELFUTILS
+
+nodist_systemunit_DATA += \
+ units/systemd-coredump@.service
+
+dist_systemunit_DATA += \
+ units/systemd-coredump.socket
+
+SOCKETS_TARGET_WANTS += \
+ systemd-coredump.socket
+
+rootlibexec_PROGRAMS += \
+ systemd-coredump
+
+dist_pkgsysconf_DATA += \
+ src/coredump/coredump.conf
+
+manual_tests += \
+ test-coredump-vacuum
+
+test_coredump_vacuum_SOURCES = \
+ src/coredump/test-coredump-vacuum.c \
+ src/coredump/coredump-vacuum.c \
+ src/coredump/coredump-vacuum.h
+
+test_coredump_vacuum_LDADD = \
+ libsystemd-shared.la
+
+nodist_sysctl_DATA = \
+ sysctl.d/50-coredump.conf
+
+CLEANFILES += \
+ sysctl.d/50-coredump.conf
+endif # ENABLE_COREDUMP
+
+EXTRA_DIST += \
+ sysctl.d/50-coredump.conf.in \
+ units/systemd-coredump@.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/coredump/coredump-vacuum.c b/src/grp-coredump/systemd-coredump/coredump-vacuum.c
index f02b6dbd87..96fdf7344c 100644
--- a/src/coredump/coredump-vacuum.c
+++ b/src/grp-coredump/systemd-coredump/coredump-vacuum.c
@@ -19,16 +19,17 @@
#include <sys/statvfs.h>
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "coredump-vacuum.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "hashmap.h"
-#include "macro.h"
-#include "string-util.h"
-#include "time-util.h"
-#include "user-util.h"
-#include "util.h"
#define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */
#define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */
diff --git a/src/coredump/coredump-vacuum.h b/src/grp-coredump/systemd-coredump/coredump-vacuum.h
index 4b7b9f2d98..4b7b9f2d98 100644
--- a/src/coredump/coredump-vacuum.h
+++ b/src/grp-coredump/systemd-coredump/coredump-vacuum.h
diff --git a/src/coredump/coredump.c b/src/grp-coredump/systemd-coredump/coredump.c
index a982c204be..9c60d04e60 100644
--- a/src/coredump/coredump.c
+++ b/src/grp-coredump/systemd-coredump/coredump.c
@@ -28,40 +28,41 @@
#include <elfutils/libdwfl.h>
#endif
-#include "sd-daemon.h"
-#include "sd-journal.h"
-#include "sd-login.h"
-#include "sd-messages.h"
-
-#include "acl-util.h"
-#include "alloc-util.h"
-#include "capability-util.h"
-#include "cgroup-util.h"
-#include "compress.h"
-#include "conf-parser.h"
-#include "copy.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-journal.h>
+#include <systemd/sd-login.h>
+#include <systemd/sd-messages.h>
+
+#include "journal-core/journald-native.h"
+#include "sd-journal/compress.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/acl-util.h"
+#include "systemd-shared/conf-parser.h"
+
#include "coredump-vacuum.h"
-#include "dirent-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "io-util.h"
-#include "journald-native.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "socket-util.h"
-#include "special.h"
#include "stacktrace.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
/* The maximum size up to which we process coredumps */
#define PROCESS_SIZE_MAX ((uint64_t) (2LLU*1024LLU*1024LLU*1024LLU))
diff --git a/src/coredump/coredump.conf b/src/grp-coredump/systemd-coredump/coredump.conf
index c2f0643e03..c2f0643e03 100644
--- a/src/coredump/coredump.conf
+++ b/src/grp-coredump/systemd-coredump/coredump.conf
diff --git a/man/coredump.conf.xml b/src/grp-coredump/systemd-coredump/coredump.conf.xml
index 77b4dac51c..77b4dac51c 100644
--- a/man/coredump.conf.xml
+++ b/src/grp-coredump/systemd-coredump/coredump.conf.xml
diff --git a/src/coredump/stacktrace.c b/src/grp-coredump/systemd-coredump/stacktrace.c
index cc4dad9465..1e59582c67 100644
--- a/src/coredump/stacktrace.c
+++ b/src/grp-coredump/systemd-coredump/stacktrace.c
@@ -20,13 +20,14 @@
#include <dwarf.h>
#include <elfutils/libdwfl.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+
#include "stacktrace.h"
-#include "string-util.h"
-#include "util.h"
#define FRAMES_MAX 64
#define THREADS_MAX 64
diff --git a/src/coredump/stacktrace.h b/src/grp-coredump/systemd-coredump/stacktrace.h
index 15e9c04465..15e9c04465 100644
--- a/src/coredump/stacktrace.h
+++ b/src/grp-coredump/systemd-coredump/stacktrace.h
diff --git a/units/systemd-coredump.socket b/src/grp-coredump/systemd-coredump/systemd-coredump.socket
index 4cb2460471..4cb2460471 100644
--- a/units/systemd-coredump.socket
+++ b/src/grp-coredump/systemd-coredump/systemd-coredump.socket
diff --git a/sysusers.d/systemd-coredump.conf b/src/grp-coredump/systemd-coredump/systemd-coredump.sysusers
index bc0816ca5e..bc0816ca5e 100644
--- a/sysusers.d/systemd-coredump.conf
+++ b/src/grp-coredump/systemd-coredump/systemd-coredump.sysusers
diff --git a/tmpfiles.d/systemd-coredump.conf b/src/grp-coredump/systemd-coredump/systemd-coredump.tmpfiles
index 02b052583d..02b052583d 100644
--- a/tmpfiles.d/systemd-coredump.conf
+++ b/src/grp-coredump/systemd-coredump/systemd-coredump.tmpfiles
diff --git a/man/systemd-coredump.xml b/src/grp-coredump/systemd-coredump/systemd-coredump.xml
index 4a1bc8b296..4a1bc8b296 100644
--- a/man/systemd-coredump.xml
+++ b/src/grp-coredump/systemd-coredump/systemd-coredump.xml
diff --git a/units/systemd-coredump@.service.in b/src/grp-coredump/systemd-coredump/systemd-coredump@.service.in
index 588c8d629c..588c8d629c 100644
--- a/units/systemd-coredump@.service.in
+++ b/src/grp-coredump/systemd-coredump/systemd-coredump@.service.in
diff --git a/src/coredump/test-coredump-vacuum.c b/src/grp-coredump/systemd-coredump/test-coredump-vacuum.c
index 70a57f183f..70a57f183f 100644
--- a/src/coredump/test-coredump-vacuum.c
+++ b/src/grp-coredump/systemd-coredump/test-coredump-vacuum.c
diff --git a/src/grp-hostname/GNUmakefile b/src/grp-hostname/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-hostname/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-hostname/Makefile b/src/grp-hostname/Makefile
new file mode 100644
index 0000000000..939c268c10
--- /dev/null
+++ b/src/grp-hostname/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += hostnamectl
+nested.subdirs += systemd-hostnamed
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-hostname/hostnamectl/GNUmakefile b/src/grp-hostname/hostnamectl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-hostname/hostnamectl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-hostname/hostnamectl/Makefile b/src/grp-hostname/hostnamectl/Makefile
new file mode 100644
index 0000000000..c728acce7b
--- /dev/null
+++ b/src/grp-hostname/hostnamectl/Makefile
@@ -0,0 +1,44 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_HOSTNAMED),)
+
+hostnamectl_SOURCES = \
+ src/hostname/hostnamectl.c
+
+hostnamectl_LDADD = \
+ libsystemd-shared.la
+
+bin_PROGRAMS += \
+ hostnamectl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/hostnamectl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_hostnamectl
+endif # ENABLE_HOSTNAMED
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/hostname/hostnamectl.c b/src/grp-hostname/hostnamectl/hostnamectl.c
index 07c57fb567..d6da61879b 100644
--- a/src/hostname/hostnamectl.c
+++ b/src/grp-hostname/hostnamectl/hostnamectl.c
@@ -23,16 +23,16 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-bus.h"
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "architecture.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "hostname-util.h"
-#include "spawn-polkit-agent.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-id128.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/spawn-polkit-agent.h"
static bool arg_ask_password = true;
static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
diff --git a/shell-completion/bash/hostnamectl b/src/grp-hostname/hostnamectl/hostnamectl.completion.bash
index 6a252188ea..6a252188ea 100644
--- a/shell-completion/bash/hostnamectl
+++ b/src/grp-hostname/hostnamectl/hostnamectl.completion.bash
diff --git a/shell-completion/zsh/_hostnamectl b/src/grp-hostname/hostnamectl/hostnamectl.completion.zsh
index 7528e0649d..7528e0649d 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/src/grp-hostname/hostnamectl/hostnamectl.completion.zsh
diff --git a/man/hostnamectl.xml b/src/grp-hostname/hostnamectl/hostnamectl.xml
index 9e1b593e6d..9e1b593e6d 100644
--- a/man/hostnamectl.xml
+++ b/src/grp-hostname/hostnamectl/hostnamectl.xml
diff --git a/src/hostname/.gitignore b/src/grp-hostname/systemd-hostnamed/.gitignore
index 1ff281b231..1ff281b231 100644
--- a/src/hostname/.gitignore
+++ b/src/grp-hostname/systemd-hostnamed/.gitignore
diff --git a/src/grp-hostname/systemd-hostnamed/GNUmakefile b/src/grp-hostname/systemd-hostnamed/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-hostname/systemd-hostnamed/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-hostname/systemd-hostnamed/Makefile b/src/grp-hostname/systemd-hostnamed/Makefile
new file mode 100644
index 0000000000..0c8f0b5ae6
--- /dev/null
+++ b/src/grp-hostname/systemd-hostnamed/Makefile
@@ -0,0 +1,64 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_HOSTNAMED),)
+systemd_hostnamed_SOURCES = \
+ src/hostname/hostnamed.c
+
+systemd_hostnamed_LDADD = \
+ libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+ systemd-hostnamed
+
+nodist_systemunit_DATA += \
+ units/systemd-hostnamed.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.hostname1.busname
+
+dist_dbuspolicy_DATA += \
+ src/hostname/org.freedesktop.hostname1.conf
+
+dist_dbussystemservice_DATA += \
+ src/hostname/org.freedesktop.hostname1.service
+
+polkitpolicy_files += \
+ src/hostname/org.freedesktop.hostname1.policy
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-hostnamed.service dbus-org.freedesktop.hostname1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.hostname1.busname
+
+endif # ENABLE_HOSTNAMED
+polkitpolicy_in_files += \
+ src/hostname/org.freedesktop.hostname1.policy.in
+
+EXTRA_DIST += \
+ units/systemd-hostnamed.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/hostname/hostnamed.c b/src/grp-hostname/systemd-hostnamed/hostnamed.c
index 197f905b7d..3e683a20ce 100644
--- a/src/hostname/hostnamed.c
+++ b/src/grp-hostname/systemd-hostnamed/hostnamed.c
@@ -22,19 +22,19 @@
#include <sys/utsname.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "def.h"
-#include "env-util.h"
-#include "fileio-label.h"
-#include "hostname-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
-#include "virt.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
#define VALID_DEPLOYMENT_CHARS (DIGITS LETTERS "-.:")
diff --git a/src/hostname/org.freedesktop.hostname1.conf b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.conf
index 46b4aadc83..46b4aadc83 100644
--- a/src/hostname/org.freedesktop.hostname1.conf
+++ b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.conf
diff --git a/src/hostname/org.freedesktop.hostname1.policy.in b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.policy.in
index c32c1d4fda..c32c1d4fda 100644
--- a/src/hostname/org.freedesktop.hostname1.policy.in
+++ b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.policy.in
diff --git a/src/hostname/org.freedesktop.hostname1.service b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.service
index 6041ed60ca..6041ed60ca 100644
--- a/src/hostname/org.freedesktop.hostname1.service
+++ b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.service
diff --git a/units/systemd-hostnamed.service.in b/src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.in
index edc5a1722a..edc5a1722a 100644
--- a/units/systemd-hostnamed.service.in
+++ b/src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.in
diff --git a/man/systemd-hostnamed.service.xml b/src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.xml
index 6990d41b02..6990d41b02 100644
--- a/man/systemd-hostnamed.service.xml
+++ b/src/grp-hostname/systemd-hostnamed/systemd-hostnamed.service.xml
diff --git a/src/grp-initprogs/GNUmakefile b/src/grp-initprogs/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-initprogs/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/Makefile b/src/grp-initprogs/Makefile
new file mode 100644
index 0000000000..2cf2214e2a
--- /dev/null
+++ b/src/grp-initprogs/Makefile
@@ -0,0 +1,44 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += grp-sleep
+nested.subdirs += systemd-backlight
+nested.subdirs += systemd-binfmt
+nested.subdirs += systemd-detect-virt
+nested.subdirs += systemd-firstboot
+nested.subdirs += systemd-fsck
+nested.subdirs += systemd-modules-load
+nested.subdirs += systemd-quotacheck
+nested.subdirs += systemd-random-seed
+nested.subdirs += systemd-rfkill
+nested.subdirs += systemd-sysctl
+nested.subdirs += systemd-sysusers
+nested.subdirs += systemd-tmpfiles
+nested.subdirs += systemd-update-done
+nested.subdirs += systemd-update-utmp
+nested.subdirs += systemd-user-sessions
+nested.subdirs += systemd-vconsole-setup
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-initprogs/grp-sleep/GNUmakefile b/src/grp-initprogs/grp-sleep/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/grp-sleep/Makefile b/src/grp-initprogs/grp-sleep/Makefile
new file mode 100644
index 0000000000..5a3a87d2bf
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/Makefile
@@ -0,0 +1,30 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += systemd-hibernate-resume
+nested.subdirs += systemd-hibernate-resume-generator
+nested.subdirs += systemd-sleep
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/GNUmakefile b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile
new file mode 100644
index 0000000000..835f2a37b2
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile
@@ -0,0 +1,38 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_HIBERNATE),)
+systemgenerator_PROGRAMS += \
+ systemd-hibernate-resume-generator
+
+systemd_hibernate_resume_generator_SOURCES = \
+ src/hibernate-resume/hibernate-resume-generator.c
+
+systemd_hibernate_resume_generator_LDADD = \
+ libsystemd-shared.la
+
+endif # ENABLE_HIBERNATE
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/hibernate-resume/hibernate-resume-generator.c b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/hibernate-resume-generator.c
index 17e670604e..de440853db 100644
--- a/src/hibernate-resume/hibernate-resume-generator.c
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/hibernate-resume-generator.c
@@ -20,15 +20,15 @@
#include <errno.h>
#include <stdio.h>
-#include "alloc-util.h"
-#include "fstab-util.h"
-#include "log.h"
-#include "mkdir.h"
-#include "proc-cmdline.h"
-#include "special.h"
-#include "string-util.h"
-#include "unit-name.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/fstab-util.h"
static const char *arg_dest = "/tmp";
static char *arg_resume_dev = NULL;
diff --git a/man/systemd-hibernate-resume-generator.xml b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/systemd-hibernate-resume-generator.xml
index d811b9b551..d811b9b551 100644
--- a/man/systemd-hibernate-resume-generator.xml
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/systemd-hibernate-resume-generator.xml
diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/GNUmakefile b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/Makefile b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/Makefile
new file mode 100644
index 0000000000..95f44744a2
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/Makefile
@@ -0,0 +1,45 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_HIBERNATE),)
+
+rootlibexec_PROGRAMS += \
+ systemd-hibernate-resume
+
+systemd_hibernate_resume_SOURCES = \
+ src/hibernate-resume/hibernate-resume.c
+
+systemd_hibernate_resume_LDADD = \
+ libsystemd-shared.la
+
+nodist_systemunit_DATA += \
+ units/systemd-hibernate-resume@.service
+
+endif # ENABLE_HIBERNATE
+
+EXTRA_DIST += \
+ units/systemd-hibernate-resume@.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/hibernate-resume/hibernate-resume.c b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/hibernate-resume.c
index 21df3c4461..f41c6afef0 100644
--- a/src/hibernate-resume/hibernate-resume.c
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/hibernate-resume.c
@@ -21,10 +21,10 @@
#include <stdio.h>
#include <sys/stat.h>
-#include "alloc-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
struct stat st;
diff --git a/units/systemd-hibernate-resume@.service.in b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.in
index 65e8eb83f1..65e8eb83f1 100644
--- a/units/systemd-hibernate-resume@.service.in
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.in
diff --git a/man/systemd-hibernate-resume@.service.xml b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.xml
index 7d00827447..7d00827447 100644
--- a/man/systemd-hibernate-resume@.service.xml
+++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume/systemd-hibernate-resume@.service.xml
diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/GNUmakefile b/src/grp-initprogs/grp-sleep/systemd-sleep/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile b/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile
new file mode 100644
index 0000000000..45c0beaf9d
--- /dev/null
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile
@@ -0,0 +1,49 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-sleep
+systemd_sleep_SOURCES = \
+ src/sleep/sleep.c
+
+systemd_sleep_LDADD = \
+ libsystemd-shared.la
+
+ifneq ($(ENABLE_HIBERNATE),)
+
+dist_systemunit_DATA += \
+ units/hibernate.target \
+ units/hybrid-sleep.target
+
+nodist_systemunit_DATA += \
+ units/systemd-hibernate.service \
+ units/systemd-hybrid-sleep.service
+
+endif # ENABLE_HIBERNATE
+
+EXTRA_DIST += \
+ units/systemd-hibernate.service.in \
+ units/systemd-hybrid-sleep.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/hibernate.target b/src/grp-initprogs/grp-sleep/systemd-sleep/hibernate.target
index 143eb59230..143eb59230 100644
--- a/units/hibernate.target
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/hibernate.target
diff --git a/units/hybrid-sleep.target b/src/grp-initprogs/grp-sleep/systemd-sleep/hybrid-sleep.target
index d2d3409225..d2d3409225 100644
--- a/units/hybrid-sleep.target
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/hybrid-sleep.target
diff --git a/src/sleep/sleep.c b/src/grp-initprogs/grp-sleep/systemd-sleep/sleep.c
index c8f0742183..16ae4c7314 100644
--- a/src/sleep/sleep.c
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/sleep.c
@@ -22,16 +22,16 @@
#include <getopt.h>
#include <stdio.h>
-#include "sd-messages.h"
-
-#include "def.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "sleep-config.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include <systemd/sd-messages.h>
+
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/sleep-config.h"
static char* arg_verb = NULL;
diff --git a/units/sleep.target b/src/grp-initprogs/grp-sleep/systemd-sleep/sleep.target
index 10c7c8d594..10c7c8d594 100644
--- a/units/sleep.target
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/sleep.target
diff --git a/units/suspend.target b/src/grp-initprogs/grp-sleep/systemd-sleep/suspend.target
index f50cb2264f..f50cb2264f 100644
--- a/units/suspend.target
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/suspend.target
diff --git a/units/systemd-hibernate.service.in b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hibernate.service.in
index 29d9b696a8..29d9b696a8 100644
--- a/units/systemd-hibernate.service.in
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hibernate.service.in
diff --git a/units/systemd-hybrid-sleep.service.in b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hybrid-sleep.service.in
index 914b686c36..914b686c36 100644
--- a/units/systemd-hybrid-sleep.service.in
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-hybrid-sleep.service.in
diff --git a/man/systemd-sleep.conf.xml b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.conf.xml
index 9a379ecb94..9a379ecb94 100644
--- a/man/systemd-sleep.conf.xml
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.conf.xml
diff --git a/man/systemd-suspend.service.xml b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.xml
index a8beb86f4d..a8beb86f4d 100644
--- a/man/systemd-suspend.service.xml
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.xml
diff --git a/units/systemd-suspend.service.in b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-suspend.service.in
index 3a702d2e22..3a702d2e22 100644
--- a/units/systemd-suspend.service.in
+++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-suspend.service.in
diff --git a/src/grp-initprogs/systemd-backlight/GNUmakefile b/src/grp-initprogs/systemd-backlight/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-backlight/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-backlight/Makefile b/src/grp-initprogs/systemd-backlight/Makefile
new file mode 100644
index 0000000000..4a79889681
--- /dev/null
+++ b/src/grp-initprogs/systemd-backlight/Makefile
@@ -0,0 +1,43 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_BACKLIGHT),)
+rootlibexec_PROGRAMS += \
+ systemd-backlight
+
+nodist_systemunit_DATA += \
+ units/systemd-backlight@.service
+
+systemd_backlight_SOURCES = \
+ src/backlight/backlight.c
+
+systemd_backlight_LDADD = \
+ libsystemd-shared.la
+endif # ENABLE_BACKLIGHT
+
+EXTRA_DIST += \
+ units/systemd-backlight@.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/backlight/backlight.c b/src/grp-initprogs/systemd-backlight/backlight.c
index 7c59f60d5f..f5b80c395e 100644
--- a/src/backlight/backlight.c
+++ b/src/grp-initprogs/systemd-backlight/backlight.c
@@ -17,18 +17,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "libudev.h"
-
-#include "alloc-util.h"
-#include "def.h"
-#include "escape.h"
-#include "fileio.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "string-util.h"
-#include "udev-util.h"
-#include "util.h"
+#include <libudev.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/udev-util.h"
static struct udev_device *find_pci_or_platform_parent(struct udev_device *device) {
struct udev_device *parent;
diff --git a/units/systemd-backlight@.service.in b/src/grp-initprogs/systemd-backlight/systemd-backlight@.service.in
index 5e6706c11c..5e6706c11c 100644
--- a/units/systemd-backlight@.service.in
+++ b/src/grp-initprogs/systemd-backlight/systemd-backlight@.service.in
diff --git a/man/systemd-backlight@.service.xml b/src/grp-initprogs/systemd-backlight/systemd-backlight@.service.xml
index 3459ed8851..3459ed8851 100644
--- a/man/systemd-backlight@.service.xml
+++ b/src/grp-initprogs/systemd-backlight/systemd-backlight@.service.xml
diff --git a/src/grp-initprogs/systemd-binfmt/GNUmakefile b/src/grp-initprogs/systemd-binfmt/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-binfmt/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-binfmt/Makefile b/src/grp-initprogs/systemd-binfmt/Makefile
new file mode 100644
index 0000000000..d9e032d16d
--- /dev/null
+++ b/src/grp-initprogs/systemd-binfmt/Makefile
@@ -0,0 +1,56 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_BINFMT),)
+systemd_binfmt_SOURCES = \
+ src/binfmt/binfmt.c
+
+systemd_binfmt_LDADD = \
+ libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+ systemd-binfmt
+
+dist_systemunit_DATA += \
+ units/proc-sys-fs-binfmt_misc.automount \
+ units/proc-sys-fs-binfmt_misc.mount
+
+nodist_systemunit_DATA += \
+ units/systemd-binfmt.service
+
+INSTALL_DIRS += \
+ $(prefix)/lib/binfmt.d \
+ $(sysconfdir)/binfmt.d
+
+SYSINIT_TARGET_WANTS += \
+ systemd-binfmt.service \
+ proc-sys-fs-binfmt_misc.automount
+
+endif # ENABLE_BINFMT
+
+EXTRA_DIST += \
+ units/systemd-binfmt.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/binfmt/binfmt.c b/src/grp-initprogs/systemd-binfmt/binfmt.c
index eeef04fb1c..f569d117df 100644
--- a/src/binfmt/binfmt.c
+++ b/src/grp-initprogs/systemd-binfmt/binfmt.c
@@ -25,15 +25,15 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "def.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static const char conf_file_dirs[] = CONF_PATHS_NULSTR("binfmt.d");
diff --git a/man/binfmt.d.xml b/src/grp-initprogs/systemd-binfmt/binfmt.d.xml
index 5b63cfb4c3..5b63cfb4c3 100644
--- a/man/binfmt.d.xml
+++ b/src/grp-initprogs/systemd-binfmt/binfmt.d.xml
diff --git a/units/proc-sys-fs-binfmt_misc.automount b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.automount
index 6be38937b1..6be38937b1 100644
--- a/units/proc-sys-fs-binfmt_misc.automount
+++ b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.automount
diff --git a/units/proc-sys-fs-binfmt_misc.mount b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.mount
index 8c7c386318..8c7c386318 100644
--- a/units/proc-sys-fs-binfmt_misc.mount
+++ b/src/grp-initprogs/systemd-binfmt/proc-sys-fs-binfmt_misc.mount
diff --git a/units/systemd-binfmt.service.in b/src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.in
index d53073ee61..d53073ee61 100644
--- a/units/systemd-binfmt.service.in
+++ b/src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.in
diff --git a/man/systemd-binfmt.service.xml b/src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.xml
index cccfb49ca9..cccfb49ca9 100644
--- a/man/systemd-binfmt.service.xml
+++ b/src/grp-initprogs/systemd-binfmt/systemd-binfmt.service.xml
diff --git a/src/grp-initprogs/systemd-detect-virt/GNUmakefile b/src/grp-initprogs/systemd-detect-virt/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-detect-virt/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-detect-virt/Makefile b/src/grp-initprogs/systemd-detect-virt/Makefile
new file mode 100644
index 0000000000..7158be148a
--- /dev/null
+++ b/src/grp-initprogs/systemd-detect-virt/Makefile
@@ -0,0 +1,36 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-detect-virt
+systemd_detect_virt_SOURCES = \
+ src/detect-virt/detect-virt.c
+
+systemd_detect_virt_LDADD = \
+ libsystemd-shared.la
+
+INSTALL_EXEC_HOOKS += \
+ systemd-detect-virt-install-hook
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/detect-virt/detect-virt.c b/src/grp-initprogs/systemd-detect-virt/detect-virt.c
index 4b8956f0ad..484f689c4c 100644
--- a/src/detect-virt/detect-virt.c
+++ b/src/grp-initprogs/systemd-detect-virt/detect-virt.c
@@ -22,8 +22,8 @@
#include <stdbool.h>
#include <stdlib.h>
-#include "util.h"
-#include "virt.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
static bool arg_quiet = false;
static enum {
diff --git a/shell-completion/bash/systemd-detect-virt b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.bash
index df06c29841..df06c29841 100644
--- a/shell-completion/bash/systemd-detect-virt
+++ b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.bash
diff --git a/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.zsh b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.zsh
new file mode 100644
index 0000000000..a0c7df727c
--- /dev/null
+++ b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.completion.zsh
@@ -0,0 +1,11 @@
+#compdef systemd-detect-virt
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--version[Show package version]' \
+ {-c,--container}'[Only detect whether we are run in a container]' \
+ {-v,--vm}'[Only detect whether we are run in a VM]' \
+ {-q,--quiet}"[Don't output anything, just set return value]"
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-detect-virt.xml b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.xml
index 996c2fa256..996c2fa256 100644
--- a/man/systemd-detect-virt.xml
+++ b/src/grp-initprogs/systemd-detect-virt/systemd-detect-virt.xml
diff --git a/src/grp-initprogs/systemd-firstboot/GNUmakefile b/src/grp-initprogs/systemd-firstboot/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-firstboot/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-firstboot/Makefile b/src/grp-initprogs/systemd-firstboot/Makefile
new file mode 100644
index 0000000000..20ea125a52
--- /dev/null
+++ b/src/grp-initprogs/systemd-firstboot/Makefile
@@ -0,0 +1,47 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_FIRSTBOOT),)
+systemd_firstboot_SOURCES = \
+ src/firstboot/firstboot.c
+
+systemd_firstboot_LDADD = \
+ libsystemd-shared.la \
+ -lcrypt
+
+rootbin_PROGRAMS += \
+ systemd-firstboot
+
+nodist_systemunit_DATA += \
+ units/systemd-firstboot.service
+
+SYSINIT_TARGET_WANTS += \
+ systemd-firstboot.service
+endif # ENABLE_FIRSTBOOT
+
+EXTRA_DIST += \
+ units/systemd-firstboot.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/firstboot/firstboot.c b/src/grp-initprogs/systemd-firstboot/firstboot.c
index 83a21eaf0e..4ed3c23419 100644
--- a/src/firstboot/firstboot.c
+++ b/src/grp-initprogs/systemd-firstboot/firstboot.c
@@ -22,24 +22,24 @@
#include <shadow.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "ask-password-api.h"
-#include "copy.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hostname-util.h"
-#include "locale-util.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "random-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "time-util.h"
-#include "umask-util.h"
-#include "user-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/ask-password-api.h"
static char *arg_root = NULL;
static char *arg_locale = NULL; /* $LANG */
diff --git a/units/systemd-firstboot.service.in b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.service.in
index 405c6f3fd2..405c6f3fd2 100644
--- a/units/systemd-firstboot.service.in
+++ b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.service.in
diff --git a/man/systemd-firstboot.xml b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.xml
index b269e48113..b269e48113 100644
--- a/man/systemd-firstboot.xml
+++ b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.xml
diff --git a/src/grp-initprogs/systemd-fsck/GNUmakefile b/src/grp-initprogs/systemd-fsck/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-fsck/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-fsck/Makefile b/src/grp-initprogs/systemd-fsck/Makefile
new file mode 100644
index 0000000000..8a223a7f70
--- /dev/null
+++ b/src/grp-initprogs/systemd-fsck/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-fsck
+systemd_fsck_SOURCES = \
+ src/fsck/fsck.c
+
+systemd_fsck_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/fsck/fsck.c b/src/grp-initprogs/systemd-fsck/fsck.c
index be25c6a2b2..df6f96096b 100644
--- a/src/fsck/fsck.c
+++ b/src/grp-initprogs/systemd-fsck/fsck.c
@@ -27,25 +27,25 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-device.h"
-
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "device-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "special.h"
-#include "stdio-util.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "sd-device/device-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-device.h"
/* exit codes as defined in fsck(8) */
enum {
diff --git a/units/systemd-fsck@.service.in b/src/grp-initprogs/systemd-fsck/systemd-fsck@.service.in
index 6ca6b07e9e..6ca6b07e9e 100644
--- a/units/systemd-fsck@.service.in
+++ b/src/grp-initprogs/systemd-fsck/systemd-fsck@.service.in
diff --git a/man/systemd-fsck@.service.xml b/src/grp-initprogs/systemd-fsck/systemd-fsck@.service.xml
index 933c3247ad..933c3247ad 100644
--- a/man/systemd-fsck@.service.xml
+++ b/src/grp-initprogs/systemd-fsck/systemd-fsck@.service.xml
diff --git a/src/grp-initprogs/systemd-modules-load/GNUmakefile b/src/grp-initprogs/systemd-modules-load/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-modules-load/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-modules-load/Makefile b/src/grp-initprogs/systemd-modules-load/Makefile
new file mode 100644
index 0000000000..01ee557164
--- /dev/null
+++ b/src/grp-initprogs/systemd-modules-load/Makefile
@@ -0,0 +1,59 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_KMOD),)
+systemd_modules_load_SOURCES = \
+ src/modules-load/modules-load.c
+
+systemd_modules_load_CFLAGS = \
+ $(KMOD_CFLAGS)
+
+systemd_modules_load_LDADD = \
+ libsystemd-shared.la \
+ $(KMOD_LIBS)
+
+rootlibexec_PROGRAMS += \
+ systemd-modules-load
+
+nodist_systemunit_DATA += \
+ units/systemd-modules-load.service
+
+SYSINIT_TARGET_WANTS += \
+ systemd-modules-load.service
+
+ifneq ($(ENABLE_TMPFILES),)
+nodist_systemunit_DATA += \
+ units/kmod-static-nodes.service
+
+SYSINIT_TARGET_WANTS += \
+ kmod-static-nodes.service
+endif # ENABLE_TMPFILES
+endif # HAVE_KMOD
+
+EXTRA_DIST += \
+ units/systemd-modules-load.service.in \
+ units/kmod-static-nodes.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/kmod-static-nodes.service.in b/src/grp-initprogs/systemd-modules-load/kmod-static-nodes.service.in
index a9c8df1184..a9c8df1184 100644
--- a/units/kmod-static-nodes.service.in
+++ b/src/grp-initprogs/systemd-modules-load/kmod-static-nodes.service.in
diff --git a/src/modules-load/modules-load.c b/src/grp-initprogs/systemd-modules-load/modules-load.c
index 0901fea8dc..077561e2ba 100644
--- a/src/modules-load/modules-load.c
+++ b/src/grp-initprogs/systemd-modules-load/modules-load.c
@@ -24,15 +24,15 @@
#include <string.h>
#include <sys/stat.h>
-#include "conf-files.h"
-#include "def.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "proc-cmdline.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static char **arg_proc_cmdline_modules = NULL;
diff --git a/man/modules-load.d.xml b/src/grp-initprogs/systemd-modules-load/modules-load.d.xml
index 4b722aa128..4b722aa128 100644
--- a/man/modules-load.d.xml
+++ b/src/grp-initprogs/systemd-modules-load/modules-load.d.xml
diff --git a/units/systemd-modules-load.service.in b/src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.in
index 9de6d31349..9de6d31349 100644
--- a/units/systemd-modules-load.service.in
+++ b/src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.in
diff --git a/man/systemd-modules-load.service.xml b/src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.xml
index b25929b2e4..b25929b2e4 100644
--- a/man/systemd-modules-load.service.xml
+++ b/src/grp-initprogs/systemd-modules-load/systemd-modules-load.service.xml
diff --git a/src/grp-initprogs/systemd-quotacheck/GNUmakefile b/src/grp-initprogs/systemd-quotacheck/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-quotacheck/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-quotacheck/Makefile b/src/grp-initprogs/systemd-quotacheck/Makefile
new file mode 100644
index 0000000000..84c7204d38
--- /dev/null
+++ b/src/grp-initprogs/systemd-quotacheck/Makefile
@@ -0,0 +1,46 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_QUOTACHECK),)
+rootlibexec_PROGRAMS += \
+ systemd-quotacheck
+
+nodist_systemunit_DATA += \
+ units/systemd-quotacheck.service
+
+systemd_quotacheck_SOURCES = \
+ src/quotacheck/quotacheck.c
+
+systemd_quotacheck_LDADD = \
+ libsystemd-shared.la
+endif # ENABLE_QUOTACHECK
+
+EXTRA_DIST += \
+ units/systemd-quotacheck.service.in
+
+nodist_systemunit_DATA += \
+ units/quotaon.service
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/quotacheck/quotacheck.c b/src/grp-initprogs/systemd-quotacheck/quotacheck.c
index 2714cde5c7..7687354ad6 100644
--- a/src/quotacheck/quotacheck.c
+++ b/src/grp-initprogs/systemd-quotacheck/quotacheck.c
@@ -23,11 +23,11 @@
#include <sys/prctl.h>
#include <unistd.h>
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static bool arg_skip = false;
static bool arg_force = false;
diff --git a/units/quotaon.service.in b/src/grp-initprogs/systemd-quotacheck/quotaon.service.in
index 7d59a40195..7d59a40195 100644
--- a/units/quotaon.service.in
+++ b/src/grp-initprogs/systemd-quotacheck/quotaon.service.in
diff --git a/units/systemd-quotacheck.service.in b/src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.in
index 5cb9bc3bc9..5cb9bc3bc9 100644
--- a/units/systemd-quotacheck.service.in
+++ b/src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.in
diff --git a/man/systemd-quotacheck.service.xml b/src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.xml
index 9d4976274e..9d4976274e 100644
--- a/man/systemd-quotacheck.service.xml
+++ b/src/grp-initprogs/systemd-quotacheck/systemd-quotacheck.service.xml
diff --git a/src/grp-initprogs/systemd-random-seed/GNUmakefile b/src/grp-initprogs/systemd-random-seed/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-random-seed/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-random-seed/Makefile b/src/grp-initprogs/systemd-random-seed/Makefile
new file mode 100644
index 0000000000..8d8fce955c
--- /dev/null
+++ b/src/grp-initprogs/systemd-random-seed/Makefile
@@ -0,0 +1,47 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_RANDOMSEED),)
+rootlibexec_PROGRAMS += \
+ systemd-random-seed
+
+nodist_systemunit_DATA += \
+ units/systemd-random-seed.service
+
+systemd_random_seed_SOURCES = \
+ src/random-seed/random-seed.c
+
+systemd_random_seed_LDADD = \
+ libsystemd-shared.la
+
+SYSINIT_TARGET_WANTS += \
+ systemd-random-seed.service
+
+endif # ENABLE_RANDOMSEED
+
+EXTRA_DIST += \
+ units/systemd-random-seed.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/random-seed/random-seed.c b/src/grp-initprogs/systemd-random-seed/random-seed.c
index 6748bb9dd3..83415ffb4c 100644
--- a/src/random-seed/random-seed.c
+++ b/src/grp-initprogs/systemd-random-seed/random-seed.c
@@ -23,13 +23,13 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "log.h"
-#include "mkdir.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#define POOL_SIZE_MIN 512
diff --git a/units/systemd-random-seed.service.in b/src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.in
index b244a8ce43..b244a8ce43 100644
--- a/units/systemd-random-seed.service.in
+++ b/src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.in
diff --git a/man/systemd-random-seed.service.xml b/src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.xml
index f3b5a947da..f3b5a947da 100644
--- a/man/systemd-random-seed.service.xml
+++ b/src/grp-initprogs/systemd-random-seed/systemd-random-seed.service.xml
diff --git a/src/grp-initprogs/systemd-rfkill/GNUmakefile b/src/grp-initprogs/systemd-rfkill/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-rfkill/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-rfkill/Makefile b/src/grp-initprogs/systemd-rfkill/Makefile
new file mode 100644
index 0000000000..32fb516b52
--- /dev/null
+++ b/src/grp-initprogs/systemd-rfkill/Makefile
@@ -0,0 +1,46 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_RFKILL),)
+rootlibexec_PROGRAMS += \
+ systemd-rfkill
+
+nodist_systemunit_DATA += \
+ units/systemd-rfkill.service
+
+dist_systemunit_DATA += \
+ units/systemd-rfkill.socket
+
+systemd_rfkill_SOURCES = \
+ src/rfkill/rfkill.c
+
+systemd_rfkill_LDADD = \
+ libsystemd-shared.la
+endif # ENABLE_RFKILL
+
+EXTRA_DIST += \
+ units/systemd-rfkill.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/rfkill/rfkill.c b/src/grp-initprogs/systemd-rfkill/rfkill.c
index 0acdf229ed..6a463d0f92 100644
--- a/src/rfkill/rfkill.c
+++ b/src/grp-initprogs/systemd-rfkill/rfkill.c
@@ -17,24 +17,25 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/rfkill.h>
#include <poll.h>
-#include "libudev.h"
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "io-util.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "udev-util.h"
-#include "util.h"
+#include <linux/rfkill.h>
+
+#include <libudev.h>
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/udev-util.h"
#define EXIT_USEC (5 * USEC_PER_SEC)
diff --git a/units/systemd-rfkill.service.in b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.in
index 780a19b996..780a19b996 100644
--- a/units/systemd-rfkill.service.in
+++ b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.in
diff --git a/man/systemd-rfkill.service.xml b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.xml
index f464842700..f464842700 100644
--- a/man/systemd-rfkill.service.xml
+++ b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.service.xml
diff --git a/units/systemd-rfkill.socket b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.socket
index 20ae2f8adb..20ae2f8adb 100644
--- a/units/systemd-rfkill.socket
+++ b/src/grp-initprogs/systemd-rfkill/systemd-rfkill.socket
diff --git a/sysctl.d/50-default.conf b/src/grp-initprogs/systemd-sysctl/50-default.sysctl
index f08f32e849..f08f32e849 100644
--- a/sysctl.d/50-default.conf
+++ b/src/grp-initprogs/systemd-sysctl/50-default.sysctl
diff --git a/src/grp-initprogs/systemd-sysctl/GNUmakefile b/src/grp-initprogs/systemd-sysctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-sysctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-sysctl/Makefile b/src/grp-initprogs/systemd-sysctl/Makefile
new file mode 100644
index 0000000000..3fe12fd460
--- /dev/null
+++ b/src/grp-initprogs/systemd-sysctl/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-sysctl
+systemd_sysctl_SOURCES = \
+ src/sysctl/sysctl.c
+
+systemd_sysctl_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/sysctl/sysctl.c b/src/grp-initprogs/systemd-sysctl/sysctl.c
index b3587e249d..de047890f6 100644
--- a/src/sysctl/sysctl.c
+++ b/src/grp-initprogs/systemd-sysctl/sysctl.c
@@ -25,17 +25,17 @@
#include <stdlib.h>
#include <string.h>
-#include "conf-files.h"
-#include "def.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hashmap.h"
-#include "log.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "sysctl-util.h"
-#include "util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/sysctl-util.h"
static char **arg_prefixes = NULL;
diff --git a/man/sysctl.d.xml b/src/grp-initprogs/systemd-sysctl/sysctl.d.xml
index ccf6c8e39f..ccf6c8e39f 100644
--- a/man/sysctl.d.xml
+++ b/src/grp-initprogs/systemd-sysctl/sysctl.d.xml
diff --git a/units/systemd-sysctl.service.in b/src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.in
index 980f611df2..980f611df2 100644
--- a/units/systemd-sysctl.service.in
+++ b/src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.in
diff --git a/man/systemd-sysctl.service.xml b/src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.xml
index 686b2cdef4..686b2cdef4 100644
--- a/man/systemd-sysctl.service.xml
+++ b/src/grp-initprogs/systemd-sysctl/systemd-sysctl.service.xml
diff --git a/sysusers.d/.gitignore b/src/grp-initprogs/systemd-sysusers/.gitignore
index c065034d29..c065034d29 100644
--- a/sysusers.d/.gitignore
+++ b/src/grp-initprogs/systemd-sysusers/.gitignore
diff --git a/src/grp-initprogs/systemd-sysusers/GNUmakefile b/src/grp-initprogs/systemd-sysusers/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-sysusers/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-sysusers/Makefile b/src/grp-initprogs/systemd-sysusers/Makefile
new file mode 100644
index 0000000000..66af87f02c
--- /dev/null
+++ b/src/grp-initprogs/systemd-sysusers/Makefile
@@ -0,0 +1,56 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_SYSUSERS),)
+systemd_sysusers_SOURCES = \
+ src/sysusers/sysusers.c
+
+systemd_sysusers_LDADD = \
+ libsystemd-shared.la
+
+rootbin_PROGRAMS += \
+ systemd-sysusers
+
+nodist_systemunit_DATA += \
+ units/systemd-sysusers.service
+
+SYSINIT_TARGET_WANTS += \
+ systemd-sysusers.service
+
+nodist_sysusers_DATA = \
+ sysusers.d/systemd.conf \
+ sysusers.d/basic.conf
+
+INSTALL_DIRS += \
+ $(sysusersdir)
+endif # ENABLE_SYSUSERS
+
+EXTRA_DIST += \
+ units/systemd-sysusers.service.in \
+ sysusers.d/systemd.conf.m4 \
+ sysusers.d/systemd-remote.conf.m4 \
+ sysusers.d/basic.conf.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/sysusers.d/basic.conf.in b/src/grp-initprogs/systemd-sysusers/basic.sysusers.in
index b2dc5ebd4f..b2dc5ebd4f 100644
--- a/sysusers.d/basic.conf.in
+++ b/src/grp-initprogs/systemd-sysusers/basic.sysusers.in
diff --git a/units/systemd-sysusers.service.in b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.service.in
index 4d8309ab6b..4d8309ab6b 100644
--- a/units/systemd-sysusers.service.in
+++ b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.service.in
diff --git a/man/systemd-sysusers.xml b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.xml
index 4892caad12..4892caad12 100644
--- a/man/systemd-sysusers.xml
+++ b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.xml
diff --git a/src/sysusers/sysusers.c b/src/grp-initprogs/systemd-sysusers/sysusers.c
index 0684f58fcd..fc1ae6df3a 100644
--- a/src/sysusers/sysusers.c
+++ b/src/grp-initprogs/systemd-sysusers/sysusers.c
@@ -24,24 +24,24 @@
#include <shadow.h>
#include <utmp.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "copy.h"
-#include "def.h"
-#include "fd-util.h"
-#include "fileio-label.h"
-#include "formats-util.h"
-#include "hashmap.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "smack-util.h"
-#include "specifier.h"
-#include "string-util.h"
-#include "strv.h"
-#include "uid-range.h"
-#include "user-util.h"
-#include "utf8.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/specifier.h"
+#include "systemd-shared/uid-range.h"
typedef enum ItemType {
ADD_USER = 'u',
diff --git a/man/sysusers.d.xml b/src/grp-initprogs/systemd-sysusers/sysusers.d.xml
index 18ee3800d6..18ee3800d6 100644
--- a/man/sysusers.d.xml
+++ b/src/grp-initprogs/systemd-sysusers/sysusers.d.xml
diff --git a/src/grp-initprogs/systemd-tmpfiles/GNUmakefile b/src/grp-initprogs/systemd-tmpfiles/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-tmpfiles/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-tmpfiles/Makefile b/src/grp-initprogs/systemd-tmpfiles/Makefile
new file mode 100644
index 0000000000..14da180947
--- /dev/null
+++ b/src/grp-initprogs/systemd-tmpfiles/Makefile
@@ -0,0 +1,88 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_TMPFILES),)
+systemd_tmpfiles_SOURCES = \
+ src/tmpfiles/tmpfiles.c
+
+systemd_tmpfiles_CFLAGS = \
+ $(ACL_CFLAGS)
+
+systemd_tmpfiles_LDADD = \
+ libsystemd-shared.la \
+ $(ACL_LIBS)
+
+rootbin_PROGRAMS += \
+ systemd-tmpfiles
+
+dist_systemunit_DATA += \
+ units/systemd-tmpfiles-clean.timer
+
+nodist_systemunit_DATA += \
+ units/systemd-tmpfiles-setup-dev.service \
+ units/systemd-tmpfiles-setup.service \
+ units/systemd-tmpfiles-clean.service
+
+nodist_tmpfiles_DATA = \
+ tmpfiles.d/systemd.conf \
+ tmpfiles.d/etc.conf
+
+dist_tmpfiles_DATA = \
+ tmpfiles.d/systemd-nologin.conf \
+ tmpfiles.d/tmp.conf \
+ tmpfiles.d/x11.conf \
+ tmpfiles.d/var.conf \
+ tmpfiles.d/home.conf \
+ tmpfiles.d/systemd-nspawn.conf \
+ tmpfiles.d/journal-nocow.conf
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+dist_tmpfiles_DATA += \
+ tmpfiles.d/legacy.conf
+endif # HAVE_SYSV_COMPAT
+
+SYSINIT_TARGET_WANTS += \
+ systemd-tmpfiles-setup-dev.service \
+ systemd-tmpfiles-setup.service
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_systemd-tmpfiles
+
+TIMERS_TARGET_WANTS += \
+ systemd-tmpfiles-clean.timer
+
+INSTALL_DIRS += \
+ $(tmpfilesdir) \
+ $(sysconfdir)/tmpfiles.d
+endif # ENABLE_TMPFILES
+
+EXTRA_DIST += \
+ tmpfiles.d/systemd.conf.m4 \
+ tmpfiles.d/etc.conf.m4 \
+ units/systemd-tmpfiles-setup-dev.service.in \
+ units/systemd-tmpfiles-setup.service.in \
+ units/systemd-tmpfiles-clean.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/tmpfiles.d/etc.conf.m4 b/src/grp-initprogs/systemd-tmpfiles/etc.tmpfiles.m4
index 928105ea8d..928105ea8d 100644
--- a/tmpfiles.d/etc.conf.m4
+++ b/src/grp-initprogs/systemd-tmpfiles/etc.tmpfiles.m4
diff --git a/tmpfiles.d/home.conf b/src/grp-initprogs/systemd-tmpfiles/home.tmpfiles
index 9f25b83392..9f25b83392 100644
--- a/tmpfiles.d/home.conf
+++ b/src/grp-initprogs/systemd-tmpfiles/home.tmpfiles
diff --git a/tmpfiles.d/legacy.conf b/src/grp-initprogs/systemd-tmpfiles/legacy.tmpfiles
index 62e2ae0986..62e2ae0986 100644
--- a/tmpfiles.d/legacy.conf
+++ b/src/grp-initprogs/systemd-tmpfiles/legacy.tmpfiles
diff --git a/tmpfiles.d/systemd-nologin.conf b/src/grp-initprogs/systemd-tmpfiles/systemd-nologin.tmpfiles
index a30a8da604..a30a8da604 100644
--- a/tmpfiles.d/systemd-nologin.conf
+++ b/src/grp-initprogs/systemd-tmpfiles/systemd-nologin.tmpfiles
diff --git a/units/systemd-tmpfiles-clean.service.in b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.service.in
index 133c8c94c4..133c8c94c4 100644
--- a/units/systemd-tmpfiles-clean.service.in
+++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.service.in
diff --git a/units/systemd-tmpfiles-clean.timer b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.timer
index 9975dcfaca..9975dcfaca 100644
--- a/units/systemd-tmpfiles-clean.timer
+++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-clean.timer
diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup-dev.service.in
index 0123a030e4..0123a030e4 100644
--- a/units/systemd-tmpfiles-setup-dev.service.in
+++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup-dev.service.in
diff --git a/units/systemd-tmpfiles-setup.service.in b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup.service.in
index e895cda0e6..e895cda0e6 100644
--- a/units/systemd-tmpfiles-setup.service.in
+++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles-setup.service.in
diff --git a/shell-completion/zsh/_systemd-tmpfiles b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.completion.zsh
index 6ff02e5d98..6ff02e5d98 100644
--- a/shell-completion/zsh/_systemd-tmpfiles
+++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.completion.zsh
diff --git a/man/systemd-tmpfiles.xml b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.xml
index c1aab51551..c1aab51551 100644
--- a/man/systemd-tmpfiles.xml
+++ b/src/grp-initprogs/systemd-tmpfiles/systemd-tmpfiles.xml
diff --git a/tmpfiles.d/tmp.conf b/src/grp-initprogs/systemd-tmpfiles/tmp.tmpfiles
index fe5225d751..fe5225d751 100644
--- a/tmpfiles.d/tmp.conf
+++ b/src/grp-initprogs/systemd-tmpfiles/tmp.tmpfiles
diff --git a/src/tmpfiles/tmpfiles.c b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c
index 954f4aa985..a371b11734 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c
@@ -25,7 +25,6 @@
#include <getopt.h>
#include <glob.h>
#include <limits.h>
-#include <linux/fs.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
@@ -36,41 +35,43 @@
#include <time.h>
#include <unistd.h>
-#include "acl-util.h"
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "capability-util.h"
-#include "chattr-util.h"
-#include "conf-files.h"
-#include "copy.h"
-#include "def.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "glob-util.h"
-#include "io-util.h"
-#include "label.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "selinux-util.h"
-#include "set.h"
-#include "specifier.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "umask-util.h"
-#include "user-util.h"
-#include "util.h"
+#include <linux/fs.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/acl-util.h"
+#include "systemd-shared/specifier.h"
/* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
* them in the file system. This is intended to be used to create
diff --git a/man/tmpfiles.d.xml b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.d.xml
index e040a1636d..e040a1636d 100644
--- a/man/tmpfiles.d.xml
+++ b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.d.xml
diff --git a/tmpfiles.d/var.conf b/src/grp-initprogs/systemd-tmpfiles/var.tmpfiles
index ae7952e77a..ae7952e77a 100644
--- a/tmpfiles.d/var.conf
+++ b/src/grp-initprogs/systemd-tmpfiles/var.tmpfiles
diff --git a/tmpfiles.d/x11.conf b/src/grp-initprogs/systemd-tmpfiles/x11.tmpfiles
index 4c96a54a13..4c96a54a13 100644
--- a/tmpfiles.d/x11.conf
+++ b/src/grp-initprogs/systemd-tmpfiles/x11.tmpfiles
diff --git a/src/grp-initprogs/systemd-update-done/GNUmakefile b/src/grp-initprogs/systemd-update-done/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-update-done/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-update-done/Makefile b/src/grp-initprogs/systemd-update-done/Makefile
new file mode 100644
index 0000000000..258828924a
--- /dev/null
+++ b/src/grp-initprogs/systemd-update-done/Makefile
@@ -0,0 +1,34 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-update-done
+
+systemd_update_done_SOURCES = \
+ src/update-done/update-done.c
+
+systemd_update_done_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/systemd-update-done.service.in b/src/grp-initprogs/systemd-update-done/systemd-update-done.service.in
index ec7d906392..ec7d906392 100644
--- a/units/systemd-update-done.service.in
+++ b/src/grp-initprogs/systemd-update-done/systemd-update-done.service.in
diff --git a/man/systemd-update-done.service.xml b/src/grp-initprogs/systemd-update-done/systemd-update-done.service.xml
index a2dad39f01..a2dad39f01 100644
--- a/man/systemd-update-done.service.xml
+++ b/src/grp-initprogs/systemd-update-done/systemd-update-done.service.xml
diff --git a/src/update-done/update-done.c b/src/grp-initprogs/systemd-update-done/update-done.c
index 48c2a3fff4..f35e293e3d 100644
--- a/src/update-done/update-done.c
+++ b/src/grp-initprogs/systemd-update-done/update-done.c
@@ -17,11 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "fd-util.h"
-#include "fileio.h"
-#include "io-util.h"
-#include "selinux-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/util.h"
#define MESSAGE \
"# This file was created by systemd-update-done. Its only \n" \
diff --git a/src/grp-initprogs/systemd-update-utmp/GNUmakefile b/src/grp-initprogs/systemd-update-utmp/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-update-utmp/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-update-utmp/Makefile b/src/grp-initprogs/systemd-update-utmp/Makefile
new file mode 100644
index 0000000000..506e4840a5
--- /dev/null
+++ b/src/grp-initprogs/systemd-update-utmp/Makefile
@@ -0,0 +1,41 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_UTMP),)
+rootlibexec_PROGRAMS += \
+ systemd-update-utmp
+endif # HAVE_UTMP
+
+systemd_update_utmp_SOURCES = \
+ src/update-utmp/update-utmp.c
+
+systemd_update_utmp_CFLAGS = \
+ $(AUDIT_CFLAGS)
+
+systemd_update_utmp_LDADD = \
+ libsystemd-shared.la \
+ $(AUDIT_LIBS)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/systemd-update-utmp.service.in b/src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.in
index 163eccd91f..163eccd91f 100644
--- a/units/systemd-update-utmp.service.in
+++ b/src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.in
diff --git a/man/systemd-update-utmp.service.xml b/src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.xml
index c8a9cb7c90..c8a9cb7c90 100644
--- a/man/systemd-update-utmp.service.xml
+++ b/src/grp-initprogs/systemd-update-utmp/systemd-update-utmp.service.xml
diff --git a/src/update-utmp/update-utmp.c b/src/grp-initprogs/systemd-update-utmp/update-utmp.c
index a8efe8e91f..8f622caa64 100644
--- a/src/update-utmp/update-utmp.c
+++ b/src/grp-initprogs/systemd-update-utmp/update-utmp.c
@@ -25,19 +25,19 @@
#include <libaudit.h>
#endif
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "formats-util.h"
-#include "log.h"
-#include "macro.h"
-#include "special.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "util.h"
-#include "utmp-wtmp.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/utmp-wtmp.h"
typedef struct Context {
sd_bus *bus;
diff --git a/src/grp-initprogs/systemd-user-sessions/GNUmakefile b/src/grp-initprogs/systemd-user-sessions/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-user-sessions/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-user-sessions/Makefile b/src/grp-initprogs/systemd-user-sessions/Makefile
new file mode 100644
index 0000000000..91c84e46fe
--- /dev/null
+++ b/src/grp-initprogs/systemd-user-sessions/Makefile
@@ -0,0 +1,48 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_PAM),)
+
+systemd_user_sessions_SOURCES = \
+ src/user-sessions/user-sessions.c
+
+systemd_user_sessions_LDADD = \
+ libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+ systemd-user-sessions
+
+nodist_systemunit_DATA += \
+ units/systemd-user-sessions.service
+
+MULTI_USER_TARGET_WANTS += \
+ systemd-user-sessions.service
+
+endif # HAVE_PAM
+
+EXTRA_DIST += \
+ units/systemd-user-sessions.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/systemd-user-sessions.service.in b/src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.in
index b4ea5a134b..b4ea5a134b 100644
--- a/units/systemd-user-sessions.service.in
+++ b/src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.in
diff --git a/man/systemd-user-sessions.service.xml b/src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.xml
index 67aba54119..67aba54119 100644
--- a/man/systemd-user-sessions.service.xml
+++ b/src/grp-initprogs/systemd-user-sessions/systemd-user-sessions.service.xml
diff --git a/src/user-sessions/user-sessions.c b/src/grp-initprogs/systemd-user-sessions/user-sessions.c
index 9b29b5ba1d..3ccb419aee 100644
--- a/src/user-sessions/user-sessions.c
+++ b/src/grp-initprogs/systemd-user-sessions/user-sessions.c
@@ -20,12 +20,12 @@
#include <errno.h>
#include <unistd.h>
-#include "fileio.h"
-#include "fileio-label.h"
-#include "log.h"
-#include "selinux-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
int main(int argc, char*argv[]) {
diff --git a/src/vconsole/.gitignore b/src/grp-initprogs/systemd-vconsole-setup/.gitignore
index 82741b2fb3..82741b2fb3 100644
--- a/src/vconsole/.gitignore
+++ b/src/grp-initprogs/systemd-vconsole-setup/.gitignore
diff --git a/src/vconsole/90-vconsole.rules.in b/src/grp-initprogs/systemd-vconsole-setup/90-vconsole.rules.in
index 84b4d575bd..84b4d575bd 100644
--- a/src/vconsole/90-vconsole.rules.in
+++ b/src/grp-initprogs/systemd-vconsole-setup/90-vconsole.rules.in
diff --git a/src/grp-initprogs/systemd-vconsole-setup/GNUmakefile b/src/grp-initprogs/systemd-vconsole-setup/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-initprogs/systemd-vconsole-setup/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-initprogs/systemd-vconsole-setup/Makefile b/src/grp-initprogs/systemd-vconsole-setup/Makefile
new file mode 100644
index 0000000000..d1918d968e
--- /dev/null
+++ b/src/grp-initprogs/systemd-vconsole-setup/Makefile
@@ -0,0 +1,47 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_VCONSOLE),)
+systemd_vconsole_setup_SOURCES = \
+ src/vconsole/vconsole-setup.c
+
+systemd_vconsole_setup_LDADD = \
+ libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+ systemd-vconsole-setup
+
+nodist_udevrules_DATA += \
+ src/vconsole/90-vconsole.rules
+
+nodist_systemunit_DATA += \
+ units/systemd-vconsole-setup.service
+endif # ENABLE_VCONSOLE
+
+EXTRA_DIST += \
+ src/vconsole/90-vconsole.rules.in \
+ units/systemd-vconsole-setup.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/systemd-vconsole-setup.service.in b/src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.in
index 2bd1fd1a5d..2bd1fd1a5d 100644
--- a/units/systemd-vconsole-setup.service.in
+++ b/src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.in
diff --git a/man/systemd-vconsole-setup.service.xml b/src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.xml
index f2da2a7b77..f2da2a7b77 100644
--- a/man/systemd-vconsole-setup.service.xml
+++ b/src/grp-initprogs/systemd-vconsole-setup/systemd-vconsole-setup.service.xml
diff --git a/src/vconsole/vconsole-setup.c b/src/grp-initprogs/systemd-vconsole-setup/vconsole-setup.c
index a0ab5990fc..ad6a4283fc 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/grp-initprogs/systemd-vconsole-setup/vconsole-setup.c
@@ -21,9 +21,6 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
-#include <linux/kd.h>
-#include <linux/tiocl.h>
-#include <linux/vt.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -31,19 +28,23 @@
#include <termios.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "io-util.h"
-#include "locale-util.h"
-#include "log.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "util.h"
-#include "virt.h"
+#include <linux/kd.h>
+#include <linux/tiocl.h>
+#include <linux/vt.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
static bool is_vconsole(int fd) {
unsigned char data[1];
diff --git a/man/vconsole.conf.xml b/src/grp-initprogs/systemd-vconsole-setup/vconsole.conf.xml
index fa30ca6569..fa30ca6569 100644
--- a/man/vconsole.conf.xml
+++ b/src/grp-initprogs/systemd-vconsole-setup/vconsole.conf.xml
diff --git a/docs/sysvinit/.gitignore b/src/grp-journal/.gitignore
index c3fea7424f..c3fea7424f 100644
--- a/docs/sysvinit/.gitignore
+++ b/src/grp-journal/.gitignore
diff --git a/system-preset/90-journald.preset b/src/grp-journal/90-journald.preset
index 1022f0e86f..1022f0e86f 100644
--- a/system-preset/90-journald.preset
+++ b/src/grp-journal/90-journald.preset
diff --git a/src/grp-journal/GNUmakefile b/src/grp-journal/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-journal/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/Makefile b/src/grp-journal/Makefile
new file mode 100644
index 0000000000..2b4a366f8a
--- /dev/null
+++ b/src/grp-journal/Makefile
@@ -0,0 +1,196 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+test_journal_SOURCES = \
+ src/journal/test-journal.c
+
+test_journal_LDADD = \
+ libjournal-core.la
+
+test_journal_send_SOURCES = \
+ src/journal/test-journal-send.c
+
+test_journal_send_LDADD = \
+ libjournal-core.la
+
+test_journal_syslog_SOURCES = \
+ src/journal/test-journal-syslog.c
+
+test_journal_syslog_LDADD = \
+ libjournal-core.la
+
+test_journal_match_SOURCES = \
+ src/journal/test-journal-match.c
+
+test_journal_match_LDADD = \
+ libjournal-core.la
+
+test_journal_enum_SOURCES = \
+ src/journal/test-journal-enum.c
+
+test_journal_enum_LDADD = \
+ libjournal-core.la
+
+test_journal_stream_SOURCES = \
+ src/journal/test-journal-stream.c
+
+test_journal_stream_LDADD = \
+ libjournal-core.la
+
+test_journal_flush_SOURCES = \
+ src/journal/test-journal-flush.c
+
+test_journal_flush_LDADD = \
+ libjournal-core.la
+
+test_journal_init_SOURCES = \
+ src/journal/test-journal-init.c
+
+test_journal_init_LDADD = \
+ libjournal-core.la
+
+test_journal_verify_SOURCES = \
+ src/journal/test-journal-verify.c
+
+test_journal_verify_LDADD = \
+ libjournal-core.la
+
+test_journal_interleaving_SOURCES = \
+ src/journal/test-journal-interleaving.c
+
+test_journal_interleaving_LDADD = \
+ libjournal-core.la
+
+test_mmap_cache_SOURCES = \
+ src/journal/test-mmap-cache.c
+
+test_mmap_cache_LDADD = \
+ libjournal-core.la
+
+test_catalog_SOURCES = \
+ src/journal/test-catalog.c
+
+test_catalog_CPPFLAGS = \
+ -DCATALOG_DIR=\"$(abs_top_builddir)/catalog\"
+
+test_catalog_LDADD = \
+ libjournal-core.la
+
+test_compress_SOURCES = \
+ src/journal/test-compress.c
+
+test_compress_LDADD = \
+ libsystemd-shared.la
+
+ifneq ($(HAVE_LZ4),)
+test_compress_CFLAGS += \
+ $(LZ4_CFLAGA)
+test_compress_LDADD += \
+ $(LZ4_LIBS)
+endif
+
+test_compress_benchmark_SOURCES = \
+ src/journal/test-compress-benchmark.c
+
+test_compress_benchmark_LDADD = \
+ libsystemd-shared.la
+
+test_audit_type_SOURCES = \
+ src/journal/test-audit-type.c
+
+test_audit_type_LDADD = \
+ libjournal-core.la
+
+journal-install-hook:
+ -$(MKDIR_P) $(DESTDIR)/var/log/journal
+ -chown 0:0 $(DESTDIR)/var/log/journal
+ -chmod 755 $(DESTDIR)/var/log/journal
+ -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/
+ -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/
+
+journal-uninstall-hook:
+ -rmdir $(DESTDIR)/var/log/journal/remote
+ -rmdir $(DESTDIR)/var/log/journal/
+
+INSTALL_EXEC_HOOKS += journal-install-hook
+UNINSTALL_EXEC_HOOKS += journal-uninstall-hook
+
+# ------------------------------------------------------------------------------
+# Update catalog on installation. Do not bother if installing
+# in DESTDIR, since this is likely for packaging purposes.
+catalog-update-hook:
+ -test -n "$(DESTDIR)" || $(rootbindir)/journalctl --update-catalog
+
+INSTALL_DATA_HOOKS += \
+ catalog-update-hook
+
+catalog-remove-hook:
+ -test -n "$(DESTDIR)" || rm -f $(catalogstatedir)/database
+
+UNINSTALL_DATA_HOOKS += \
+ catalog-remove-hook
+
+tests += \
+ test-journal \
+ test-journal-enum \
+ test-journal-send \
+ test-journal-syslog \
+ test-journal-match \
+ test-journal-stream \
+ test-journal-init \
+ test-journal-verify \
+ test-journal-interleaving \
+ test-journal-flush \
+ test-mmap-cache \
+ test-catalog \
+ test-audit-type
+
+ifneq ($(HAVE_COMPRESSION),)
+tests += \
+ test-compress \
+ test-compress-benchmark
+endif # HAVE_COMPRESSION
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+
+varlog_DATA = \
+ docs/var-log/README
+
+$(outdir)/README: docs/var-log/README.in
+ $(SED_PROCESS)
+
+CLEANFILES += \
+ docs/var-log/README
+endif # HAVE_SYSV_COMPAT
+
+EXTRA_DIST += \
+ docs/var-log/README.in
+
+nested.subdirs += grp-remote
+nested.subdirs += journalctl
+nested.subdirs += systemd-cat
+nested.subdirs += systemd-journald
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/docs/var-log/README.in b/src/grp-journal/README.in
index 2e64fb196a..2e64fb196a 100644
--- a/docs/var-log/README.in
+++ b/src/grp-journal/README.in
diff --git a/src/journal-remote/.gitignore b/src/grp-journal/grp-remote/.gitignore
index 06847b65d4..06847b65d4 100644
--- a/src/journal-remote/.gitignore
+++ b/src/grp-journal/grp-remote/.gitignore
diff --git a/system-preset/90-journal-remote.preset b/src/grp-journal/grp-remote/90-journal-remote.preset
index f5917b2b84..f5917b2b84 100644
--- a/system-preset/90-journal-remote.preset
+++ b/src/grp-journal/grp-remote/90-journal-remote.preset
diff --git a/src/grp-journal/grp-remote/GNUmakefile b/src/grp-journal/grp-remote/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-journal/grp-remote/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/grp-remote/Makefile b/src/grp-journal/grp-remote/Makefile
new file mode 100644
index 0000000000..8b9dcaf7ca
--- /dev/null
+++ b/src/grp-journal/grp-remote/Makefile
@@ -0,0 +1,36 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_TMPFILES),)
+dist_tmpfiles_DATA += \
+ tmpfiles.d/systemd-remote.conf
+endif # ENABLE_TMPFILES
+
+nested.subdirs += libsystemd-microhttpd
+nested.subdirs += systemd-journal-gatewayd
+nested.subdirs += systemd-journal-remote
+nested.subdirs += systemd-journal-upload
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal-remote/browse.html b/src/grp-journal/grp-remote/browse.html
index 32848c7673..32848c7673 100644
--- a/src/journal-remote/browse.html
+++ b/src/grp-journal/grp-remote/browse.html
diff --git a/src/grp-journal/grp-remote/libsystemd-microhttpd/GNUmakefile b/src/grp-journal/grp-remote/libsystemd-microhttpd/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-journal/grp-remote/libsystemd-microhttpd/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/grp-remote/libsystemd-microhttpd/Makefile b/src/grp-journal/grp-remote/libsystemd-microhttpd/Makefile
new file mode 100644
index 0000000000..ef8de68e3a
--- /dev/null
+++ b/src/grp-journal/grp-remote/libsystemd-microhttpd/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal-remote/microhttpd-util.h b/src/grp-journal/grp-remote/libsystemd-microhttpd/include/systemd-microhttpd/microhttpd-util.h
index af26ab69fe..c43e1dce40 100644
--- a/src/journal-remote/microhttpd-util.h
+++ b/src/grp-journal/grp-remote/libsystemd-microhttpd/include/systemd-microhttpd/microhttpd-util.h
@@ -22,7 +22,7 @@
#include <microhttpd.h>
#include <stdarg.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
/* Compatiblity with libmicrohttpd < 0.9.38 */
#ifndef MHD_HTTP_NOT_ACCEPTABLE
diff --git a/src/grp-journal/grp-remote/libsystemd-microhttpd/src/GNUmakefile b/src/grp-journal/grp-remote/libsystemd-microhttpd/src/GNUmakefile
new file mode 120000
index 0000000000..e2e0817f3f
--- /dev/null
+++ b/src/grp-journal/grp-remote/libsystemd-microhttpd/src/GNUmakefile
@@ -0,0 +1 @@
+../../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/grp-remote/libsystemd-microhttpd/src/Makefile b/src/grp-journal/grp-remote/libsystemd-microhttpd/src/Makefile
new file mode 100644
index 0000000000..2d0ec68307
--- /dev/null
+++ b/src/grp-journal/grp-remote/libsystemd-microhttpd/src/Makefile
@@ -0,0 +1,26 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal-remote/microhttpd-util.c b/src/grp-journal/grp-remote/libsystemd-microhttpd/src/microhttpd-util.c
index cae10203c6..edbe970c06 100644
--- a/src/journal-remote/microhttpd-util.c
+++ b/src/grp-journal/grp-remote/libsystemd-microhttpd/src/microhttpd-util.c
@@ -27,13 +27,13 @@
#include <gnutls/x509.h>
#endif
-#include "alloc-util.h"
-#include "log.h"
-#include "macro.h"
-#include "microhttpd-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-microhttpd/microhttpd-util.h"
void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
char *f;
diff --git a/src/journal-remote/log-generator.py b/src/grp-journal/grp-remote/log-generator.py
index fd6964e758..fd6964e758 100755
--- a/src/journal-remote/log-generator.py
+++ b/src/grp-journal/grp-remote/log-generator.py
diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/GNUmakefile b/src/grp-journal/grp-remote/systemd-journal-gatewayd/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile
new file mode 100644
index 0000000000..0ae96978af
--- /dev/null
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile
@@ -0,0 +1,66 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_MICROHTTPD),)
+gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
+
+rootlibexec_PROGRAMS += \
+ systemd-journal-gatewayd
+
+systemd_journal_gatewayd_SOURCES = \
+ src/journal-remote/journal-gatewayd.c \
+ src/journal-remote/microhttpd-util.h \
+ src/journal-remote/microhttpd-util.c
+
+systemd_journal_gatewayd_LDADD = \
+ libsystemd-shared.la \
+ $(MICROHTTPD_LIBS)
+
+ifneq ($(HAVE_GNUTLS),)
+systemd_journal_gatewayd_LDADD += \
+ $(GNUTLS_LIBS)
+endif # HAVE_GNUTLS
+
+systemd_journal_gatewayd_CFLAGS = \
+ $(MICROHTTPD_CFLAGS)
+
+systemd_journal_gatewayd_CPPFLAGS = \
+ -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\"
+
+dist_systemunit_DATA += \
+ units/systemd-journal-gatewayd.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-journal-gatewayd.service
+
+dist_gatewayddocumentroot_DATA = \
+ src/journal-remote/browse.html
+
+endif # HAVE_MICROHTTPD
+
+EXTRA_DIST += \
+ units/systemd-journal-gatewayd.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal-remote/journal-gatewayd.c b/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c
index 6611a355d4..22f48d2603 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c
@@ -24,21 +24,21 @@
#include <string.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-daemon.h"
-#include "sd-journal.h"
-
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hostname-util.h"
-#include "log.h"
-#include "logs-show.h"
-#include "microhttpd-util.h"
-#include "parse-util.h"
-#include "sigbus.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-journal.h>
+
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/util.h"
+#include "systemd-microhttpd/microhttpd-util.h"
+#include "systemd-shared/logs-show.h"
#define JOURNAL_WAIT_TIMEOUT (10*USEC_PER_SEC)
diff --git a/units/systemd-journal-gatewayd.service.in b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.in
index efefaa4244..efefaa4244 100644
--- a/units/systemd-journal-gatewayd.service.in
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.in
diff --git a/man/systemd-journal-gatewayd.service.xml b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.xml
index 2cb114f6e3..2cb114f6e3 100644
--- a/man/systemd-journal-gatewayd.service.xml
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.service.xml
diff --git a/units/systemd-journal-gatewayd.socket b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.socket
index 79d9b04210..79d9b04210 100644
--- a/units/systemd-journal-gatewayd.socket
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.socket
diff --git a/sysusers.d/systemd-journal-gatewayd.conf b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.sysusers
index 379be0852e..379be0852e 100644
--- a/sysusers.d/systemd-journal-gatewayd.conf
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/systemd-journal-gatewayd.sysusers
diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/GNUmakefile b/src/grp-journal/grp-remote/systemd-journal-remote/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
new file mode 100644
index 0000000000..ce902b7f62
--- /dev/null
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
@@ -0,0 +1,79 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_MICROHTTPD),)
+rootlibexec_PROGRAMS += \
+ systemd-journal-remote
+
+systemd_journal_remote_SOURCES = \
+ src/journal-remote/journal-remote-parse.h \
+ src/journal-remote/journal-remote-parse.c \
+ src/journal-remote/journal-remote-write.h \
+ src/journal-remote/journal-remote-write.c \
+ src/journal-remote/journal-remote.h \
+ src/journal-remote/journal-remote.c
+
+systemd_journal_remote_LDADD = \
+ libjournal-core.la
+
+systemd_journal_remote_SOURCES += \
+ src/journal-remote/microhttpd-util.h \
+ src/journal-remote/microhttpd-util.c
+
+systemd_journal_remote_CFLAGS = \
+ $(MICROHTTPD_CFLAGS)
+
+systemd_journal_remote_LDADD += \
+ $(MICROHTTPD_LIBS)
+
+ifneq ($(HAVE_GNUTLS),)
+systemd_journal_remote_LDADD += \
+ $(GNUTLS_LIBS)
+endif # HAVE_GNUTLS
+
+# systemd-journal-remote make sense mostly with full crypto stack
+dist_systemunit_DATA += \
+ units/systemd-journal-remote.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-journal-remote.service
+
+journal-remote-install-hook: journal-install-hook
+ -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
+ -chown 0:0 $(DESTDIR)/var/log/journal/remote
+ -chmod 755 $(DESTDIR)/var/log/journal/remote
+
+INSTALL_EXEC_HOOKS += journal-remote-install-hook
+
+nodist_pkgsysconf_DATA += \
+ src/journal-remote/journal-remote.conf
+
+EXTRA_DIST += \
+ units/systemd-journal-remote.service.in \
+ src/journal-remote/journal-remote.conf.in \
+ src/journal-remote/log-generator.py
+endif # HAVE_MICROHTTPD
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal-remote/journal-remote-parse.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.c
index 9ba9ee3fc0..fdfa692214 100644
--- a/src/journal-remote/journal-remote-parse.c
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "fd-util.h"
+#include "journal-core/journald-native.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+
#include "journal-remote-parse.h"
-#include "journald-native.h"
-#include "parse-util.h"
-#include "string-util.h"
#define LINE_CHUNK 8*1024u
diff --git a/src/journal-remote/journal-remote-parse.h b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.h
index 1740a21f92..4f47ea89d6 100644
--- a/src/journal-remote/journal-remote-parse.h
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "journal-remote-write.h"
diff --git a/src/journal-remote/journal-remote-write.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c
index 8729372aa3..99b02602ea 100644
--- a/src/journal-remote/journal-remote-write.c
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c
@@ -17,7 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+
#include "journal-remote.h"
int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len) {
diff --git a/src/journal-remote/journal-remote-write.h b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.h
index 53ba45fc04..a61434ca75 100644
--- a/src/journal-remote/journal-remote-write.h
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "journal-file.h"
+#include "sd-journal/journal-file.h"
typedef struct RemoteServer RemoteServer;
diff --git a/src/journal-remote/journal-remote.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c
index d86c3681b1..476f4d27a8 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c
@@ -27,27 +27,28 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "def.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "journal-file.h"
+#include <systemd/sd-daemon.h>
+
+#include "journal-core/journald-native.h"
+#include "sd-journal/journal-file.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/conf-parser.h"
+
#include "journal-remote-write.h"
#include "journal-remote.h"
-#include "journald-native.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
#define REMOTE_JOURNAL_PATH "/var/log/journal/remote"
diff --git a/src/journal-remote/journal-remote.conf.in b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.conf.in
index 7122d63362..7122d63362 100644
--- a/src/journal-remote/journal-remote.conf.in
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.conf.in
diff --git a/man/journal-remote.conf.xml b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.conf.xml
index f7ac8c46e0..f7ac8c46e0 100644
--- a/man/journal-remote.conf.xml
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.conf.xml
diff --git a/src/journal-remote/journal-remote.h b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.h
index 30ad7df996..1c090ccdfc 100644
--- a/src/journal-remote/journal-remote.h
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.h
@@ -19,12 +19,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-microhttpd/microhttpd-util.h"
-#include "hashmap.h"
#include "journal-remote-parse.h"
#include "journal-remote-write.h"
-#include "microhttpd-util.h"
typedef struct MHDDaemonWrapper MHDDaemonWrapper;
diff --git a/units/systemd-journal-remote.service.in b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.service.in
index 753dd6c158..753dd6c158 100644
--- a/units/systemd-journal-remote.service.in
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.service.in
diff --git a/units/systemd-journal-remote.socket b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.socket
index 076dcae8a3..076dcae8a3 100644
--- a/units/systemd-journal-remote.socket
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.socket
diff --git a/sysusers.d/systemd-journal-remote.conf b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.sysusers
index ca20c24896..ca20c24896 100644
--- a/sysusers.d/systemd-journal-remote.conf
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.sysusers
diff --git a/man/systemd-journal-remote.xml b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.xml
index ee2d5c2486..ee2d5c2486 100644
--- a/man/systemd-journal-remote.xml
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/systemd-journal-remote.xml
diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/GNUmakefile b/src/grp-journal/grp-remote/systemd-journal-upload/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/Makefile b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile
new file mode 100644
index 0000000000..f6966df0f6
--- /dev/null
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile
@@ -0,0 +1,54 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_LIBCURL),)
+rootlibexec_PROGRAMS += \
+ systemd-journal-upload
+
+systemd_journal_upload_SOURCES = \
+ src/journal-remote/journal-upload.h \
+ src/journal-remote/journal-upload.c \
+ src/journal-remote/journal-upload-journal.c
+
+systemd_journal_upload_CFLAGS = \
+ $(LIBCURL_CFLAGS)
+
+systemd_journal_upload_LDADD = \
+ libsystemd-shared.la \
+ $(LIBCURL_LIBS)
+
+nodist_systemunit_DATA += \
+ units/systemd-journal-upload.service
+
+nodist_pkgsysconf_DATA += \
+ src/journal-remote/journal-upload.conf
+
+endif # HAVE_LIBCURL
+
+EXTRA_DIST += \
+ units/systemd-journal-upload.service.in \
+ src/journal-remote/journal-upload.conf.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal-remote/journal-upload-journal.c b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload-journal.c
index 8ce8e1895e..3a5e450e35 100644
--- a/src/journal-remote/journal-upload-journal.c
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload-journal.c
@@ -20,12 +20,14 @@
#include <curl/curl.h>
#include <stdbool.h>
-#include "alloc-util.h"
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+
#include "journal-upload.h"
-#include "log.h"
-#include "utf8.h"
-#include "util.h"
-#include "sd-daemon.h"
/**
* Write up to size bytes to buf. Return negative on error, and number of
diff --git a/src/journal-remote/journal-upload.c b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.c
index 61190ff83c..418ff1b16f 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.c
@@ -23,23 +23,24 @@
#include <stdio.h>
#include <sys/stat.h>
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "def.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "glob-util.h"
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
+
#include "journal-upload.h"
-#include "log.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "sigbus.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "util.h"
#define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-upload.pem"
#define CERT_FILE CERTIFICATE_ROOT "/certs/journal-upload.pem"
diff --git a/src/journal-remote/journal-upload.conf.in b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.conf.in
index c5670682e8..c5670682e8 100644
--- a/src/journal-remote/journal-upload.conf.in
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.conf.in
diff --git a/man/journal-upload.conf.xml b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.conf.xml
index e3be62dfd1..e3be62dfd1 100644
--- a/man/journal-upload.conf.xml
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.conf.xml
diff --git a/src/journal-remote/journal-upload.h b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h
index 5711905f86..c121f8f16b 100644
--- a/src/journal-remote/journal-upload.h
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h
@@ -2,9 +2,10 @@
#include <inttypes.h>
-#include "sd-event.h"
-#include "sd-journal.h"
-#include "time-util.h"
+#include <systemd/sd-event.h>
+#include <systemd/sd-journal.h>
+
+#include "systemd-basic/time-util.h"
typedef enum {
ENTRY_CURSOR = 0, /* Nothing actually written yet. */
diff --git a/units/systemd-journal-upload.service.in b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.service.in
index d8fd243620..d8fd243620 100644
--- a/units/systemd-journal-upload.service.in
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.service.in
diff --git a/sysusers.d/systemd-journal-upload.conf b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.sysusers
index 927d400279..927d400279 100644
--- a/sysusers.d/systemd-journal-upload.conf
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.sysusers
diff --git a/man/systemd-journal-upload.xml b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.xml
index f9723dea89..f9723dea89 100644
--- a/man/systemd-journal-upload.xml
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/systemd-journal-upload.xml
diff --git a/tmpfiles.d/systemd-remote.conf b/src/grp-journal/grp-remote/systemd-remote.tmpfiles
index e19230f648..e19230f648 100644
--- a/tmpfiles.d/systemd-remote.conf
+++ b/src/grp-journal/grp-remote/systemd-remote.tmpfiles
diff --git a/tmpfiles.d/journal-nocow.conf b/src/grp-journal/journal-nocow.tmpfiles
index e7938c8911..e7938c8911 100644
--- a/tmpfiles.d/journal-nocow.conf
+++ b/src/grp-journal/journal-nocow.tmpfiles
diff --git a/src/grp-journal/journalctl/GNUmakefile b/src/grp-journal/journalctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-journal/journalctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/journalctl/Makefile b/src/grp-journal/journalctl/Makefile
new file mode 100644
index 0000000000..f8519405d2
--- /dev/null
+++ b/src/grp-journal/journalctl/Makefile
@@ -0,0 +1,61 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
+journalctl_CFLAGS = \
+
+journalctl_SOURCES = \
+ src/journal/journalctl.c
+
+journalctl_LDADD = \
+ libsystemd-shared.la \
+ libudev-core.la
+
+ifneq ($(HAVE_QRENCODE),)
+journalctl_SOURCES += \
+ src/journal/journal-qrcode.c \
+ src/journal/journal-qrcode.h
+
+journalctl_CFLAGS += \
+ $(QRENCODE_CFLAGS)
+
+journalctl_LDADD += \
+ $(QRENCODE_LIBS)
+endif # HAVE_QRENCODE
+
+rootbin_PROGRAMS += \
+ journalctl
+
+nodist_systemunit_DATA += \
+ units/systemd-journal-flush.service \
+ units/systemd-journal-catalog-update.service
+SYSINIT_TARGET_WANTS += \
+ systemd-journal-flush.service \
+ systemd-journal-catalog-update.service
+EXTRA_DIST += \
+ units/systemd-journal-flush.service.in \
+ units/systemd-journal-catalog-update.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal/journal-qrcode.c b/src/grp-journal/journalctl/journal-qrcode.c
index e38730d65c..e38730d65c 100644
--- a/src/journal/journal-qrcode.c
+++ b/src/grp-journal/journalctl/journal-qrcode.c
diff --git a/src/journal/journal-qrcode.h b/src/grp-journal/journalctl/journal-qrcode.h
index ef39085561..34a779d5be 100644
--- a/src/journal/journal-qrcode.h
+++ b/src/grp-journal/journalctl/journal-qrcode.h
@@ -22,6 +22,6 @@
#include <inttypes.h>
#include <stdio.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
int print_qr_code(FILE *f, const void *seed, size_t seed_size, uint64_t start, uint64_t interval, const char *hn, sd_id128_t machine);
diff --git a/src/journal/journalctl.c b/src/grp-journal/journalctl/journalctl.c
index 7f997487b4..9e31283c0e 100644
--- a/src/journal/journalctl.c
+++ b/src/grp-journal/journalctl/journalctl.c
@@ -21,7 +21,6 @@
#include <fcntl.h>
#include <fnmatch.h>
#include <getopt.h>
-#include <linux/fs.h>
#include <locale.h>
#include <poll.h>
#include <signal.h>
@@ -33,44 +32,47 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-journal.h"
-
-#include "acl-util.h"
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "catalog.h"
-#include "chattr-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "fsprg.h"
-#include "glob-util.h"
-#include "hostname-util.h"
-#include "io-util.h"
-#include "journal-def.h"
-#include "journal-internal.h"
-#include "journal-qrcode.h"
-#include "journal-vacuum.h"
-#include "journal-verify.h"
-#include "locale-util.h"
-#include "log.h"
-#include "logs-show.h"
-#include "mkdir.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "rlimit-util.h"
-#include "set.h"
-#include "sigbus.h"
-#include "strv.h"
-#include "syslog-util.h"
-#include "terminal-util.h"
+#include <linux/fs.h>
+
+#include <systemd/sd-bus.h>
+#include <systemd/sd-journal.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "sd-journal/catalog.h"
+#include "sd-journal/fsprg.h"
+#include "sd-journal/journal-def.h"
+#include "sd-journal/journal-internal.h"
+#include "sd-journal/journal-vacuum.h"
+#include "sd-journal/journal-verify.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/acl-util.h"
+#include "systemd-shared/logs-show.h"
+#include "systemd-shared/pager.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
-#include "udev-util.h"
-#include "unit-name.h"
-#include "user-util.h"
+
+#include "journal-qrcode.h"
#define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
diff --git a/shell-completion/bash/journalctl b/src/grp-journal/journalctl/journalctl.completion.bash
index a999a10df1..a999a10df1 100644
--- a/shell-completion/bash/journalctl
+++ b/src/grp-journal/journalctl/journalctl.completion.bash
diff --git a/shell-completion/zsh/_journalctl b/src/grp-journal/journalctl/journalctl.completion.zsh
index ef67fcf2a0..ef67fcf2a0 100644
--- a/shell-completion/zsh/_journalctl
+++ b/src/grp-journal/journalctl/journalctl.completion.zsh
diff --git a/man/journalctl.xml b/src/grp-journal/journalctl/journalctl.xml
index 63b4a267b8..63b4a267b8 100644
--- a/man/journalctl.xml
+++ b/src/grp-journal/journalctl/journalctl.xml
diff --git a/units/systemd-journal-catalog-update.service.in b/src/grp-journal/journalctl/systemd-journal-catalog-update.service.in
index 6370dd478f..6370dd478f 100644
--- a/units/systemd-journal-catalog-update.service.in
+++ b/src/grp-journal/journalctl/systemd-journal-catalog-update.service.in
diff --git a/units/systemd-journal-flush.service.in b/src/grp-journal/journalctl/systemd-journal-flush.service.in
index a0a2e3fdb4..a0a2e3fdb4 100644
--- a/units/systemd-journal-flush.service.in
+++ b/src/grp-journal/journalctl/systemd-journal-flush.service.in
diff --git a/src/journal/.gitignore b/src/grp-journal/libjournal-core/.gitignore
index b93a9462fa..b93a9462fa 100644
--- a/src/journal/.gitignore
+++ b/src/grp-journal/libjournal-core/.gitignore
diff --git a/src/journal/journald-audit.h b/src/grp-journal/libjournal-core/include/journal-core/journald-audit.h
index 8c7457778c..4d5d359d6a 100644
--- a/src/journal/journald-audit.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-audit.h
@@ -19,8 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/socket-util.h"
+
#include "journald-server.h"
-#include "socket-util.h"
void server_process_audit_message(Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const union sockaddr_union *sa, socklen_t salen);
diff --git a/src/journal/journald-console.h b/src/grp-journal/libjournal-core/include/journal-core/journald-console.h
index dda07e2c28..dda07e2c28 100644
--- a/src/journal/journald-console.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-console.h
diff --git a/src/journal/journald-kmsg.h b/src/grp-journal/libjournal-core/include/journal-core/journald-kmsg.h
index dab49f1e8c..dab49f1e8c 100644
--- a/src/journal/journald-kmsg.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-kmsg.h
diff --git a/src/journal/journald-native.h b/src/grp-journal/libjournal-core/include/journal-core/journald-native.h
index c13b80aa4f..c13b80aa4f 100644
--- a/src/journal/journald-native.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-native.h
diff --git a/src/journal/journald-rate-limit.h b/src/grp-journal/libjournal-core/include/journal-core/journald-rate-limit.h
index bb0abb7ee9..4f7764eb1d 100644
--- a/src/journal/journald-rate-limit.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-rate-limit.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "util.h"
+#include "systemd-basic/util.h"
typedef struct JournalRateLimit JournalRateLimit;
diff --git a/src/journal/journald-server.h b/src/grp-journal/libjournal-core/include/journal-core/journald-server.h
index d1520c45dd..03d0fa213d 100644
--- a/src/journal/journald-server.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-server.h
@@ -22,15 +22,16 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
+
+#include "sd-journal/journal-file.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
typedef struct Server Server;
-#include "hashmap.h"
-#include "journal-file.h"
#include "journald-rate-limit.h"
#include "journald-stream.h"
-#include "list.h"
typedef enum Storage {
STORAGE_AUTO,
diff --git a/src/journal/journald-stream.h b/src/grp-journal/libjournal-core/include/journal-core/journald-stream.h
index db4c67fae3..ff38effb1d 100644
--- a/src/journal/journald-stream.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-stream.h
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-shared/fdset.h"
+
typedef struct StdoutStream StdoutStream;
-#include "fdset.h"
#include "journald-server.h"
int server_open_stdout_socket(Server *s);
diff --git a/src/journal/journald-syslog.h b/src/grp-journal/libjournal-core/include/journal-core/journald-syslog.h
index 46ad715314..46ad715314 100644
--- a/src/journal/journald-syslog.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-syslog.h
diff --git a/src/journal/journald-wall.h b/src/grp-journal/libjournal-core/include/journal-core/journald-wall.h
index ebc2b89fa8..ebc2b89fa8 100644
--- a/src/journal/journald-wall.h
+++ b/src/grp-journal/libjournal-core/include/journal-core/journald-wall.h
diff --git a/src/grp-journal/libjournal-core/src/GNUmakefile b/src/grp-journal/libjournal-core/src/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-journal/libjournal-core/src/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/libjournal-core/src/Makefile b/src/grp-journal/libjournal-core/src/Makefile
new file mode 100644
index 0000000000..6ea0446e27
--- /dev/null
+++ b/src/grp-journal/libjournal-core/src/Makefile
@@ -0,0 +1,56 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+libjournal_core_la_SOURCES = \
+ src/journal/journald-kmsg.c \
+ src/journal/journald-kmsg.h \
+ src/journal/journald-syslog.c \
+ src/journal/journald-syslog.h \
+ src/journal/journald-stream.c \
+ src/journal/journald-stream.h \
+ src/journal/journald-server.c \
+ src/journal/journald-server.h \
+ src/journal/journald-console.c \
+ src/journal/journald-console.h \
+ src/journal/journald-wall.c \
+ src/journal/journald-wall.h \
+ src/journal/journald-native.c \
+ src/journal/journald-native.h \
+ src/journal/journald-audit.c \
+ src/journal/journald-audit.h \
+ src/journal/journald-rate-limit.c \
+ src/journal/journald-rate-limit.h \
+ src/journal/journal-internal.h
+
+nodist_libjournal_core_la_SOURCES = \
+ src/journal/journald-gperf.c
+
+libjournal_core_la_LIBADD = \
+ libsystemd-shared.la
+
+noinst_LTLIBRARIES += \
+ libjournal-core.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal/journald-audit.c b/src/grp-journal/libjournal-core/src/journald-audit.c
index a433c91c54..65f925fdc4 100644
--- a/src/journal/journald-audit.c
+++ b/src/grp-journal/libjournal-core/src/journald-audit.c
@@ -17,14 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "audit-type.h"
-#include "fd-util.h"
-#include "hexdecoct.h"
-#include "io-util.h"
-#include "journald-audit.h"
-#include "missing.h"
-#include "string-util.h"
+#include "journal-core/journald-audit.h"
+#include "sd-journal/audit-type.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/string-util.h"
typedef struct MapField {
const char *audit_field;
diff --git a/src/journal/journald-console.c b/src/grp-journal/libjournal-core/src/journald-console.c
index 3a9fba42a3..2dad27973e 100644
--- a/src/journal/journald-console.c
+++ b/src/grp-journal/libjournal-core/src/journald-console.c
@@ -21,17 +21,17 @@
#include <sys/socket.h>
#include <time.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "io-util.h"
-#include "journald-console.h"
-#include "journald-server.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "stdio-util.h"
-#include "terminal-util.h"
+#include "journal-core/journald-console.h"
+#include "journal-core/journald-server.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/terminal-util.h"
static bool prefix_timestamp(void) {
diff --git a/src/journal/journald-gperf.gperf b/src/grp-journal/libjournal-core/src/journald-gperf.gperf
index 654fd76a4b..b898668ad1 100644
--- a/src/journal/journald-gperf.gperf
+++ b/src/grp-journal/libjournal-core/src/journald-gperf.gperf
@@ -1,8 +1,9 @@
%{
#include <stddef.h>
#include <sys/socket.h>
-#include "conf-parser.h"
-#include "journald-server.h"
+
+#include "journal-core/journald-server.h"
+#include "systemd-shared/conf-parser.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/journal/journald-kmsg.c b/src/grp-journal/libjournal-core/src/journald-kmsg.c
index f64abdd431..598c2d6c80 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/grp-journal/libjournal-core/src/journald-kmsg.c
@@ -23,20 +23,20 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "libudev.h"
-#include "sd-messages.h"
-
-#include "escape.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "io-util.h"
-#include "journald-kmsg.h"
-#include "journald-server.h"
-#include "journald-syslog.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include <libudev.h>
+#include <systemd/sd-messages.h>
+
+#include "journal-core/journald-kmsg.h"
+#include "journal-core/journald-server.h"
+#include "journal-core/journald-syslog.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
void server_forward_kmsg(
Server *s,
diff --git a/src/journal/journald-native.c b/src/grp-journal/libjournal-core/src/journald-native.c
index 0a1ce205c2..536765f414 100644
--- a/src/journal/journald-native.c
+++ b/src/grp-journal/libjournal-core/src/journald-native.c
@@ -23,22 +23,22 @@
#include <sys/statvfs.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "io-util.h"
-#include "journald-console.h"
-#include "journald-kmsg.h"
-#include "journald-native.h"
-#include "journald-server.h"
-#include "journald-syslog.h"
-#include "journald-wall.h"
-#include "memfd-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "socket-util.h"
-#include "string-util.h"
+#include "journal-core/journald-console.h"
+#include "journal-core/journald-kmsg.h"
+#include "journal-core/journald-native.h"
+#include "journal-core/journald-server.h"
+#include "journal-core/journald-syslog.h"
+#include "journal-core/journald-wall.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/memfd-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
bool valid_user_field(const char *p, size_t l, bool allow_protected) {
const char *a;
diff --git a/src/journal/journald-rate-limit.c b/src/grp-journal/libjournal-core/src/journald-rate-limit.c
index f48639cf58..10bff9df83 100644
--- a/src/journal/journald-rate-limit.c
+++ b/src/grp-journal/libjournal-core/src/journald-rate-limit.c
@@ -20,13 +20,13 @@
#include <errno.h>
#include <string.h>
-#include "alloc-util.h"
-#include "hashmap.h"
-#include "journald-rate-limit.h"
-#include "list.h"
-#include "random-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "journal-core/journald-rate-limit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#define POOLS_MAX 5
#define BUCKETS_MAX 127
diff --git a/src/journal/journald-server.c b/src/grp-journal/libjournal-core/src/journald-server.c
index 50bd83fc6e..158e0c197c 100644
--- a/src/journal/journald-server.c
+++ b/src/grp-journal/libjournal-core/src/journald-server.c
@@ -24,54 +24,55 @@
#include <sys/mman.h>
#include <sys/signalfd.h>
#include <sys/statvfs.h>
+
#include <linux/sockios.h>
-#include "libudev.h"
-#include "sd-daemon.h"
-#include "sd-journal.h"
-#include "sd-messages.h"
-
-#include "acl-util.h"
-#include "alloc-util.h"
-#include "audit-util.h"
-#include "cgroup-util.h"
-#include "conf-parser.h"
-#include "dirent-util.h"
-#include "extract-word.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "hostname-util.h"
-#include "id128-util.h"
-#include "io-util.h"
-#include "journal-authenticate.h"
-#include "journal-file.h"
-#include "journal-internal.h"
-#include "journal-vacuum.h"
-#include "journald-audit.h"
-#include "journald-kmsg.h"
-#include "journald-native.h"
-#include "journald-rate-limit.h"
-#include "journald-server.h"
-#include "journald-stream.h"
-#include "journald-syslog.h"
-#include "log.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "rm-rf.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "syslog-util.h"
+#include <libudev.h>
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-journal.h>
+#include <systemd/sd-messages.h>
+
+#include "journal-core/journald-audit.h"
+#include "journal-core/journald-kmsg.h"
+#include "journal-core/journald-native.h"
+#include "journal-core/journald-rate-limit.h"
+#include "journal-core/journald-server.h"
+#include "journal-core/journald-stream.h"
+#include "journal-core/journald-syslog.h"
+#include "sd-id128/id128-util.h"
+#include "sd-journal/journal-authenticate.h"
+#include "sd-journal/journal-file.h"
+#include "sd-journal/journal-internal.h"
+#include "sd-journal/journal-vacuum.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/acl-util.h"
+#include "systemd-shared/conf-parser.h"
#define USER_JOURNALS_MAX 1024
diff --git a/src/journal/journald-stream.c b/src/grp-journal/libjournal-core/src/journald-stream.c
index bc092f3c12..64b24e157b 100644
--- a/src/journal/journald-stream.c
+++ b/src/grp-journal/libjournal-core/src/journald-stream.c
@@ -24,28 +24,28 @@
#include <selinux/selinux.h>
#endif
-#include "sd-daemon.h"
-#include "sd-event.h"
-
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "io-util.h"
-#include "journald-console.h"
-#include "journald-kmsg.h"
-#include "journald-server.h"
-#include "journald-stream.h"
-#include "journald-syslog.h"
-#include "journald-wall.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "selinux-util.h"
-#include "socket-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "syslog-util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+
+#include "journal-core/journald-console.h"
+#include "journal-core/journald-kmsg.h"
+#include "journal-core/journald-server.h"
+#include "journal-core/journald-stream.h"
+#include "journal-core/journald-syslog.h"
+#include "journal-core/journald-wall.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/syslog-util.h"
#define STDOUT_STREAMS_MAX 4096
diff --git a/src/journal/journald-syslog.c b/src/grp-journal/libjournal-core/src/journald-syslog.c
index 0609b4b694..054a44b39f 100644
--- a/src/journal/journald-syslog.c
+++ b/src/grp-journal/libjournal-core/src/journald-syslog.c
@@ -21,23 +21,23 @@
#include <sys/epoll.h>
#include <unistd.h>
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "io-util.h"
-#include "journald-console.h"
-#include "journald-kmsg.h"
-#include "journald-server.h"
-#include "journald-syslog.h"
-#include "journald-wall.h"
-#include "process-util.h"
-#include "selinux-util.h"
-#include "socket-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "syslog-util.h"
+#include <systemd/sd-messages.h>
+
+#include "journal-core/journald-console.h"
+#include "journal-core/journald-kmsg.h"
+#include "journal-core/journald-server.h"
+#include "journal-core/journald-syslog.h"
+#include "journal-core/journald-wall.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/syslog-util.h"
/* Warn once every 30s if we missed syslog message */
#define WARN_FORWARD_SYSLOG_MISSED_USEC (30 * USEC_PER_SEC)
diff --git a/src/journal/journald-wall.c b/src/grp-journal/libjournal-core/src/journald-wall.c
index 4d91fafffe..242e69f6c3 100644
--- a/src/journal/journald-wall.c
+++ b/src/grp-journal/libjournal-core/src/journald-wall.c
@@ -17,13 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "formats-util.h"
-#include "journald-server.h"
-#include "journald-wall.h"
-#include "process-util.h"
-#include "string-util.h"
-#include "utmp-wtmp.h"
+#include "journal-core/journald-server.h"
+#include "journal-core/journald-wall.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/utmp-wtmp.h"
void server_forward_wall(
Server *s,
diff --git a/src/journal/test-audit-type.c b/src/grp-journal/libjournal-core/test/test-audit-type.c
index 88a2e6d9d9..812a3953ea 100644
--- a/src/journal/test-audit-type.c
+++ b/src/grp-journal/libjournal-core/test/test-audit-type.c
@@ -18,9 +18,10 @@
***/
#include <stdio.h>
+
#include <linux/audit.h>
-#include "audit-type.h"
+#include "sd-journal/audit-type.h"
static void print_audit_label(int i) {
const char *name;
diff --git a/src/journal/test-catalog.c b/src/grp-journal/libjournal-core/test/test-catalog.c
index b7d9e7bffa..c922a0f964 100644
--- a/src/journal/test-catalog.c
+++ b/src/grp-journal/libjournal-core/test/test-catalog.c
@@ -23,16 +23,16 @@
#include <locale.h>
#include <unistd.h>
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "catalog.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "util.h"
+#include <systemd/sd-messages.h>
+
+#include "sd-journal/catalog.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static const char *catalog_dirs[] = {
CATALOG_DIR,
diff --git a/src/journal/test-compress-benchmark.c b/src/grp-journal/libjournal-core/test/test-compress-benchmark.c
index 6f6d71435d..e3f45a5d67 100644
--- a/src/journal/test-compress-benchmark.c
+++ b/src/grp-journal/libjournal-core/test/test-compress-benchmark.c
@@ -17,13 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "compress.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "random-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "sd-journal/compress.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
typedef int (compress_t)(const void *src, uint64_t src_size, void *dst,
size_t dst_alloc_size, size_t *dst_size);
diff --git a/src/journal/test-compress.c b/src/grp-journal/libjournal-core/test/test-compress.c
index 72cadf1771..d68a960941 100644
--- a/src/journal/test-compress.c
+++ b/src/grp-journal/libjournal-core/test/test-compress.c
@@ -21,13 +21,13 @@
#include <lz4.h>
#endif
-#include "alloc-util.h"
-#include "compress.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "macro.h"
-#include "random-util.h"
-#include "util.h"
+#include "sd-journal/compress.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/util.h"
#ifdef HAVE_XZ
# define XZ_OK 0
diff --git a/src/journal/test-journal-enum.c b/src/grp-journal/libjournal-core/test/test-journal-enum.c
index 354c2c3c00..2c529f0544 100644
--- a/src/journal/test-journal-enum.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-enum.c
@@ -19,11 +19,11 @@
#include <stdio.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
-#include "journal-internal.h"
-#include "log.h"
-#include "macro.h"
+#include "sd-journal/journal-internal.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
int main(int argc, char *argv[]) {
unsigned n = 0;
diff --git a/src/journal/test-journal-flush.c b/src/grp-journal/libjournal-core/test/test-journal-flush.c
index ba8b20b228..0ebec91563 100644
--- a/src/journal/test-journal-flush.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-flush.c
@@ -19,13 +19,13 @@
#include <fcntl.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
-#include "alloc-util.h"
-#include "journal-file.h"
-#include "journal-internal.h"
-#include "macro.h"
-#include "string-util.h"
+#include "sd-journal/journal-file.h"
+#include "sd-journal/journal-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
int main(int argc, char *argv[]) {
_cleanup_free_ char *fn = NULL;
diff --git a/src/journal/test-journal-init.c b/src/grp-journal/libjournal-core/test/test-journal-init.c
index ef21e2d05f..719b99ab77 100644
--- a/src/journal/test-journal-init.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-init.c
@@ -17,12 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
-#include "log.h"
-#include "parse-util.h"
-#include "rm-rf.h"
-#include "util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
sd_journal *j;
diff --git a/src/journal/test-journal-interleaving.c b/src/grp-journal/libjournal-core/test/test-journal-interleaving.c
index 35cae23bf8..5bb5e0b09b 100644
--- a/src/journal/test-journal-interleaving.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-interleaving.c
@@ -21,15 +21,15 @@
#include <fcntl.h>
#include <unistd.h>
-#include "sd-journal.h"
-
-#include "alloc-util.h"
-#include "journal-file.h"
-#include "journal-vacuum.h"
-#include "log.h"
-#include "parse-util.h"
-#include "rm-rf.h"
-#include "util.h"
+#include <systemd/sd-journal.h>
+
+#include "sd-journal/journal-file.h"
+#include "sd-journal/journal-vacuum.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/util.h"
/* This program tests skipping around in a multi-file journal.
*/
diff --git a/src/journal/test-journal-match.c b/src/grp-journal/libjournal-core/test/test-journal-match.c
index 3ab554b9b0..4d3731b3be 100644
--- a/src/journal/test-journal-match.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-match.c
@@ -19,13 +19,13 @@
#include <stdio.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
-#include "alloc-util.h"
-#include "journal-internal.h"
-#include "log.h"
-#include "string-util.h"
-#include "util.h"
+#include "sd-journal/journal-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
_cleanup_(sd_journal_closep) sd_journal*j = NULL;
diff --git a/src/journal/test-journal-send.c b/src/grp-journal/libjournal-core/test/test-journal-send.c
index d70f0b0bc8..bca76fc4df 100644
--- a/src/journal/test-journal-send.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-send.c
@@ -21,9 +21,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
int main(int argc, char *argv[]) {
char huge[4096*1024];
diff --git a/src/journal/test-journal-stream.c b/src/grp-journal/libjournal-core/test/test-journal-stream.c
index 7e5a980719..84db1eeeb4 100644
--- a/src/journal/test-journal-stream.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-stream.c
@@ -20,16 +20,16 @@
#include <fcntl.h>
#include <unistd.h>
-#include "sd-journal.h"
-
-#include "alloc-util.h"
-#include "journal-file.h"
-#include "journal-internal.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "rm-rf.h"
-#include "util.h"
+#include <systemd/sd-journal.h>
+
+#include "sd-journal/journal-file.h"
+#include "sd-journal/journal-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/util.h"
#define N_ENTRIES 200
diff --git a/src/journal/test-journal-syslog.c b/src/grp-journal/libjournal-core/test/test-journal-syslog.c
index 4ff7f3ec2e..f86cfb2677 100644
--- a/src/journal/test-journal-syslog.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-syslog.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "journald-syslog.h"
-#include "macro.h"
-#include "string-util.h"
+#include "journal-core/journald-syslog.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
static void test_syslog_parse_identifier(const char* str,
const char *ident, const char*pid, int ret) {
diff --git a/src/journal/test-journal-verify.c b/src/grp-journal/libjournal-core/test/test-journal-verify.c
index 3d2312fc55..8a1aa45901 100644
--- a/src/journal/test-journal-verify.c
+++ b/src/grp-journal/libjournal-core/test/test-journal-verify.c
@@ -21,13 +21,13 @@
#include <stdio.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "journal-file.h"
-#include "journal-verify.h"
-#include "log.h"
-#include "rm-rf.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "sd-journal/journal-file.h"
+#include "sd-journal/journal-verify.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
#define N_ENTRIES 6000
#define RANDOM_RANGE 77
diff --git a/src/journal/test-journal.c b/src/grp-journal/libjournal-core/test/test-journal.c
index 2543d64b5b..0792750a61 100644
--- a/src/journal/test-journal.c
+++ b/src/grp-journal/libjournal-core/test/test-journal.c
@@ -20,11 +20,11 @@
#include <fcntl.h>
#include <unistd.h>
-#include "journal-authenticate.h"
-#include "journal-file.h"
-#include "journal-vacuum.h"
-#include "log.h"
-#include "rm-rf.h"
+#include "sd-journal/journal-authenticate.h"
+#include "sd-journal/journal-file.h"
+#include "sd-journal/journal-vacuum.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/rm-rf.h"
static bool arg_keep = false;
diff --git a/src/journal/test-mmap-cache.c b/src/grp-journal/libjournal-core/test/test-mmap-cache.c
index 0ad49aeb5f..162952f64e 100644
--- a/src/journal/test-mmap-cache.c
+++ b/src/grp-journal/libjournal-core/test/test-mmap-cache.c
@@ -22,11 +22,11 @@
#include <sys/mman.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "fileio.h"
-#include "macro.h"
-#include "mmap-cache.h"
-#include "util.h"
+#include "sd-journal/mmap-cache.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
int x, y, z, r;
diff --git a/src/grp-journal/systemd-cat/GNUmakefile b/src/grp-journal/systemd-cat/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-journal/systemd-cat/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/systemd-cat/Makefile b/src/grp-journal/systemd-cat/Makefile
new file mode 100644
index 0000000000..77c0861f2c
--- /dev/null
+++ b/src/grp-journal/systemd-cat/Makefile
@@ -0,0 +1,35 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemd_cat_SOURCES = \
+ src/journal/cat.c
+
+systemd_cat_LDADD = \
+ libjournal-core.la
+
+bin_PROGRAMS += \
+ systemd-cat
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal/cat.c b/src/grp-journal/systemd-cat/cat.c
index 08c844d44f..105d42591e 100644
--- a/src/journal/cat.c
+++ b/src/grp-journal/systemd-cat/cat.c
@@ -24,13 +24,13 @@
#include <stdlib.h>
#include <unistd.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
-#include "fd-util.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "syslog-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/util.h"
static const char *arg_identifier = NULL;
static int arg_priority = LOG_INFO;
diff --git a/shell-completion/bash/systemd-cat b/src/grp-journal/systemd-cat/systemd-cat.completion.bash
index 8d84042af1..8d84042af1 100644
--- a/shell-completion/bash/systemd-cat
+++ b/src/grp-journal/systemd-cat/systemd-cat.completion.bash
diff --git a/src/grp-journal/systemd-cat/systemd-cat.completion.zsh b/src/grp-journal/systemd-cat/systemd-cat.completion.zsh
new file mode 100644
index 0000000000..7487b00ee8
--- /dev/null
+++ b/src/grp-journal/systemd-cat/systemd-cat.completion.zsh
@@ -0,0 +1,12 @@
+#compdef systemd-cat
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--version[Show package version.]' \
+ {-t+,--identifier=}'[Set syslog identifier.]:syslog identifier:' \
+ {-p+,--priority=}'[Set priority value.]:value:({0..7})' \
+ '--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \
+ ':Message'
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-cat.xml b/src/grp-journal/systemd-cat/systemd-cat.xml
index 160db9fb5c..160db9fb5c 100644
--- a/man/systemd-cat.xml
+++ b/src/grp-journal/systemd-cat/systemd-cat.xml
diff --git a/catalog/.gitignore b/src/grp-journal/systemd-journald/.gitignore
index ff695342e3..ff695342e3 100644
--- a/catalog/.gitignore
+++ b/src/grp-journal/systemd-journald/.gitignore
diff --git a/src/grp-journal/systemd-journald/GNUmakefile b/src/grp-journal/systemd-journald/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-journal/systemd-journald/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-journal/systemd-journald/Makefile b/src/grp-journal/systemd-journald/Makefile
new file mode 100644
index 0000000000..4f05218d88
--- /dev/null
+++ b/src/grp-journal/systemd-journald/Makefile
@@ -0,0 +1,85 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemd_journald_SOURCES = \
+ src/journal/journald.c \
+ src/journal/journald-server.h
+
+systemd_journald_LDADD = \
+ libjournal-core.la \
+ libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+ systemd-journald
+
+dist_systemunit_DATA += \
+ units/systemd-journald.socket \
+ units/systemd-journald-dev-log.socket \
+ units/systemd-journald-audit.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-journald.service
+
+dist_pkgsysconf_DATA += \
+ src/journal/journald.conf
+
+nodist_catalog_DATA = \
+ catalog/systemd.bg.catalog \
+ catalog/systemd.be.catalog \
+ catalog/systemd.be@latin.catalog \
+ catalog/systemd.fr.catalog \
+ catalog/systemd.it.catalog \
+ catalog/systemd.pl.catalog \
+ catalog/systemd.pt_BR.catalog \
+ catalog/systemd.ru.catalog \
+ catalog/systemd.zh_CN.catalog \
+ catalog/systemd.zh_TW.catalog \
+ catalog/systemd.catalog
+
+EXTRA_DIST += \
+ $(nodist_catalog_DATA:.catalog=.catalog.in)
+
+# Note that we don't use @@ for replacement markers here, but %%. This is
+# because the catalog uses @@ already for its runtime replacement handling and
+# we don't want to conflict with that.
+$(outdir)/%.catalog: catalog/%.catalog.in
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(SED) -e 's~%SUPPORT_URL%~$(SUPPORT_URL)~' < $< > $@
+
+SOCKETS_TARGET_WANTS += \
+ systemd-journald.socket \
+ systemd-journald-dev-log.socket \
+ systemd-journald-audit.socket
+
+SYSINIT_TARGET_WANTS += \
+ systemd-journald.service
+
+EXTRA_DIST += \
+ units/systemd-journald.service.in
+
+gperf_gperf_sources += \
+ src/journal/journald-gperf.gperf
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal/journald.c b/src/grp-journal/systemd-journald/journald.c
index 7f47ca22dd..fb93f54924 100644
--- a/src/journal/journald.c
+++ b/src/grp-journal/systemd-journald/journald.c
@@ -19,15 +19,15 @@
#include <unistd.h>
-#include "sd-daemon.h"
-#include "sd-messages.h"
-
-#include "formats-util.h"
-#include "journal-authenticate.h"
-#include "journald-kmsg.h"
-#include "journald-server.h"
-#include "journald-syslog.h"
-#include "sigbus.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-messages.h>
+
+#include "journal-core/journald-kmsg.h"
+#include "journal-core/journald-server.h"
+#include "journal-core/journald-syslog.h"
+#include "sd-journal/journal-authenticate.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/sigbus.h"
int main(int argc, char *argv[]) {
Server server;
diff --git a/src/journal/journald.conf b/src/grp-journal/systemd-journald/journald.conf
index 2541b949be..2541b949be 100644
--- a/src/journal/journald.conf
+++ b/src/grp-journal/systemd-journald/journald.conf
diff --git a/man/journald.conf.xml b/src/grp-journal/systemd-journald/journald.conf.xml
index 9daa964803..9daa964803 100644
--- a/man/journald.conf.xml
+++ b/src/grp-journal/systemd-journald/journald.conf.xml
diff --git a/units/systemd-journald-audit.socket b/src/grp-journal/systemd-journald/systemd-journald-audit.socket
index 541f2cf38d..541f2cf38d 100644
--- a/units/systemd-journald-audit.socket
+++ b/src/grp-journal/systemd-journald/systemd-journald-audit.socket
diff --git a/units/systemd-journald-dev-log.socket b/src/grp-journal/systemd-journald/systemd-journald-dev-log.socket
index ffd44bb507..ffd44bb507 100644
--- a/units/systemd-journald-dev-log.socket
+++ b/src/grp-journal/systemd-journald/systemd-journald-dev-log.socket
diff --git a/units/systemd-journald.service.in b/src/grp-journal/systemd-journald/systemd-journald.service.in
index 712ce55483..712ce55483 100644
--- a/units/systemd-journald.service.in
+++ b/src/grp-journal/systemd-journald/systemd-journald.service.in
diff --git a/man/systemd-journald.service.xml b/src/grp-journal/systemd-journald/systemd-journald.service.xml
index 2810638bc2..2810638bc2 100644
--- a/man/systemd-journald.service.xml
+++ b/src/grp-journal/systemd-journald/systemd-journald.service.xml
diff --git a/units/systemd-journald.socket b/src/grp-journal/systemd-journald/systemd-journald.socket
index 71737014ca..71737014ca 100644
--- a/units/systemd-journald.socket
+++ b/src/grp-journal/systemd-journald/systemd-journald.socket
diff --git a/sysusers.d/systemd-journald.conf b/src/grp-journal/systemd-journald/systemd-journald.sysusers
index dcb01f606a..dcb01f606a 100644
--- a/sysusers.d/systemd-journald.conf
+++ b/src/grp-journal/systemd-journald/systemd-journald.sysusers
diff --git a/tmpfiles.d/systemd-journald.conf.m4 b/src/grp-journal/systemd-journald/systemd-journald.tmpfiles.m4
index 2e8bd8cbef..2e8bd8cbef 100644
--- a/tmpfiles.d/systemd-journald.conf.m4
+++ b/src/grp-journal/systemd-journald/systemd-journald.tmpfiles.m4
diff --git a/catalog/systemd.be.catalog.in b/src/grp-journal/systemd-journald/systemd.be.catalog.in
index 5b237f0558..5b237f0558 100644
--- a/catalog/systemd.be.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.be.catalog.in
diff --git a/catalog/systemd.be@latin.catalog.in b/src/grp-journal/systemd-journald/systemd.be@latin.catalog.in
index fc9f7cad16..fc9f7cad16 100644
--- a/catalog/systemd.be@latin.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.be@latin.catalog.in
diff --git a/catalog/systemd.bg.catalog.in b/src/grp-journal/systemd-journald/systemd.bg.catalog.in
index 76b0ce8f17..76b0ce8f17 100644
--- a/catalog/systemd.bg.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.bg.catalog.in
diff --git a/catalog/systemd.catalog.in b/src/grp-journal/systemd-journald/systemd.catalog.in
index 2c72d31290..2c72d31290 100644
--- a/catalog/systemd.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.catalog.in
diff --git a/catalog/systemd.da.catalog.in b/src/grp-journal/systemd-journald/systemd.da.catalog.in
index bc7d94476f..bc7d94476f 100644
--- a/catalog/systemd.da.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.da.catalog.in
diff --git a/catalog/systemd.fr.catalog.in b/src/grp-journal/systemd-journald/systemd.fr.catalog.in
index 573b288e74..573b288e74 100644
--- a/catalog/systemd.fr.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.fr.catalog.in
diff --git a/catalog/systemd.hr.catalog.in b/src/grp-journal/systemd-journald/systemd.hr.catalog.in
index 7502aed741..7502aed741 100644
--- a/catalog/systemd.hr.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.hr.catalog.in
diff --git a/catalog/systemd.hu.catalog.in b/src/grp-journal/systemd-journald/systemd.hu.catalog.in
index f538b7f958..f538b7f958 100644
--- a/catalog/systemd.hu.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.hu.catalog.in
diff --git a/catalog/systemd.it.catalog.in b/src/grp-journal/systemd-journald/systemd.it.catalog.in
index 86e44a604d..86e44a604d 100644
--- a/catalog/systemd.it.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.it.catalog.in
diff --git a/catalog/systemd.ko.catalog.in b/src/grp-journal/systemd-journald/systemd.ko.catalog.in
index 0249cba747..0249cba747 100644
--- a/catalog/systemd.ko.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.ko.catalog.in
diff --git a/catalog/systemd.pl.catalog.in b/src/grp-journal/systemd-journald/systemd.pl.catalog.in
index 5eead5c92c..5eead5c92c 100644
--- a/catalog/systemd.pl.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.pl.catalog.in
diff --git a/catalog/systemd.pt_BR.catalog.in b/src/grp-journal/systemd-journald/systemd.pt_BR.catalog.in
index e461c2b2ba..e461c2b2ba 100644
--- a/catalog/systemd.pt_BR.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.pt_BR.catalog.in
diff --git a/catalog/systemd.ru.catalog.in b/src/grp-journal/systemd-journald/systemd.ru.catalog.in
index df55478592..df55478592 100644
--- a/catalog/systemd.ru.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.ru.catalog.in
diff --git a/catalog/systemd.sr.catalog.in b/src/grp-journal/systemd-journald/systemd.sr.catalog.in
index 06a0ff648c..06a0ff648c 100644
--- a/catalog/systemd.sr.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.sr.catalog.in
diff --git a/catalog/systemd.zh_CN.catalog.in b/src/grp-journal/systemd-journald/systemd.zh_CN.catalog.in
index ba7c697c16..ba7c697c16 100644
--- a/catalog/systemd.zh_CN.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.zh_CN.catalog.in
diff --git a/catalog/systemd.zh_TW.catalog.in b/src/grp-journal/systemd-journald/systemd.zh_TW.catalog.in
index f7b42fa1c7..f7b42fa1c7 100644
--- a/catalog/systemd.zh_TW.catalog.in
+++ b/src/grp-journal/systemd-journald/systemd.zh_TW.catalog.in
diff --git a/src/grp-locale/GNUmakefile b/src/grp-locale/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-locale/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-locale/Makefile b/src/grp-locale/Makefile
new file mode 100644
index 0000000000..082d1f8eba
--- /dev/null
+++ b/src/grp-locale/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += localectl
+nested.subdirs += systemd-localed
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-locale/localectl/GNUmakefile b/src/grp-locale/localectl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-locale/localectl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-locale/localectl/Makefile b/src/grp-locale/localectl/Makefile
new file mode 100644
index 0000000000..2544d16309
--- /dev/null
+++ b/src/grp-locale/localectl/Makefile
@@ -0,0 +1,44 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_LOCALED),)
+
+localectl_SOURCES = \
+ src/locale/localectl.c
+
+localectl_LDADD = \
+ libsystemd-shared.la
+
+bin_PROGRAMS += \
+ localectl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/localectl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_localectl
+endif # ENABLE_LOCALED
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/locale/localectl.c b/src/grp-locale/localectl/localectl.c
index 81afb4909f..491b40c8fa 100644
--- a/src/locale/localectl.c
+++ b/src/grp-locale/localectl/localectl.c
@@ -25,20 +25,20 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-bus.h"
-
-#include "bus-error.h"
-#include "bus-util.h"
-#include "def.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "locale-util.h"
-#include "pager.h"
-#include "set.h"
-#include "spawn-polkit-agent.h"
-#include "strv.h"
-#include "util.h"
-#include "virt.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/pager.h"
+#include "systemd-shared/spawn-polkit-agent.h"
static bool arg_no_pager = false;
static bool arg_ask_password = true;
diff --git a/shell-completion/bash/localectl b/src/grp-locale/localectl/localectl.completion.bash
index e0c06a794e..e0c06a794e 100644
--- a/shell-completion/bash/localectl
+++ b/src/grp-locale/localectl/localectl.completion.bash
diff --git a/shell-completion/zsh/_localectl b/src/grp-locale/localectl/localectl.completion.zsh
index 54c2d456e4..54c2d456e4 100644
--- a/shell-completion/zsh/_localectl
+++ b/src/grp-locale/localectl/localectl.completion.zsh
diff --git a/man/localectl.xml b/src/grp-locale/localectl/localectl.xml
index 31238272f3..31238272f3 100644
--- a/man/localectl.xml
+++ b/src/grp-locale/localectl/localectl.xml
diff --git a/src/locale/.gitignore b/src/grp-locale/systemd-localed/.gitignore
index b1e0ba755e..b1e0ba755e 100644
--- a/src/locale/.gitignore
+++ b/src/grp-locale/systemd-localed/.gitignore
diff --git a/src/grp-locale/systemd-localed/GNUmakefile b/src/grp-locale/systemd-localed/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-locale/systemd-localed/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-locale/systemd-localed/Makefile b/src/grp-locale/systemd-localed/Makefile
new file mode 100644
index 0000000000..1a12959a61
--- /dev/null
+++ b/src/grp-locale/systemd-localed/Makefile
@@ -0,0 +1,89 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_LOCALED),)
+systemd_localed_SOURCES = \
+ src/locale/localed.c \
+ src/locale/keymap-util.c \
+ src/locale/keymap-util.h
+
+systemd_localed_LDADD = \
+ libsystemd-shared.la \
+ -ldl
+
+systemd_localed_CFLAGS = \
+ $(XKBCOMMON_CFLAGS)
+
+nodist_systemunit_DATA += \
+ units/systemd-localed.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.locale1.busname
+
+rootlibexec_PROGRAMS += \
+ systemd-localed
+
+dist_dbuspolicy_DATA += \
+ src/locale/org.freedesktop.locale1.conf
+
+dist_dbussystemservice_DATA += \
+ src/locale/org.freedesktop.locale1.service
+
+polkitpolicy_files += \
+ src/locale/org.freedesktop.locale1.policy
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-localed.service dbus-org.freedesktop.locale1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.locale1.busname
+
+dist_pkgdata_DATA = \
+ src/locale/kbd-model-map \
+ src/locale/language-fallback-map
+
+test_keymap_util_SOURCES = \
+ src/locale/test-keymap-util.c \
+ src/locale/keymap-util.c \
+ src/locale/keymap-util.h
+
+test_keymap_util_LDADD = \
+ libsystemd-shared.la \
+ -ldl
+
+tests += \
+ test-keymap-util
+
+endif # ENABLE_LOCALED
+
+.PHONY: update-kbd-model-map
+
+polkitpolicy_in_files += \
+ src/locale/org.freedesktop.locale1.policy.in
+
+EXTRA_DIST += \
+ units/systemd-localed.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/locale/kbd-model-map b/src/grp-locale/systemd-localed/kbd-model-map
index 8fa984f83b..8fa984f83b 100644
--- a/src/locale/kbd-model-map
+++ b/src/grp-locale/systemd-localed/kbd-model-map
diff --git a/src/locale/keymap-util.c b/src/grp-locale/systemd-localed/keymap-util.c
index a6bcd1ad54..bbaae0d8c8 100644
--- a/src/locale/keymap-util.c
+++ b/src/grp-locale/systemd-localed/keymap-util.c
@@ -22,17 +22,18 @@
#include <string.h>
#include <unistd.h>
-#include "def.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fileio-label.h"
-#include "fileio.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+
#include "keymap-util.h"
-#include "locale-util.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "string-util.h"
-#include "strv.h"
static bool startswith_comma(const char *s, const char *prefix) {
s = startswith(s, prefix);
diff --git a/src/locale/keymap-util.h b/src/grp-locale/systemd-localed/keymap-util.h
index 20ef2a4a34..12bb83acb6 100644
--- a/src/locale/keymap-util.h
+++ b/src/grp-locale/systemd-localed/keymap-util.h
@@ -18,7 +18,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "locale-util.h"
+#include "systemd-basic/locale-util.h"
typedef struct Context {
char *locale[_VARIABLE_LC_MAX];
diff --git a/src/locale/language-fallback-map b/src/grp-locale/systemd-localed/language-fallback-map
index d0b02a6b98..d0b02a6b98 100644
--- a/src/locale/language-fallback-map
+++ b/src/grp-locale/systemd-localed/language-fallback-map
diff --git a/src/locale/localed.c b/src/grp-locale/systemd-localed/localed.c
index 1cb049e74a..e8a5eacbf4 100644
--- a/src/locale/localed.c
+++ b/src/grp-locale/systemd-localed/localed.c
@@ -23,25 +23,26 @@
#include <unistd.h>
#ifdef HAVE_XKBCOMMON
-#include <xkbcommon/xkbcommon.h>
#include <dlfcn.h>
+#include <xkbcommon/xkbcommon.h>
#endif
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-message.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-message.h"
-#include "bus-util.h"
-#include "def.h"
#include "keymap-util.h"
-#include "locale-util.h"
-#include "macro.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
static Hashmap *polkit_registry = NULL;
diff --git a/src/locale/org.freedesktop.locale1.conf b/src/grp-locale/systemd-localed/org.freedesktop.locale1.conf
index 79d0ecd2bb..79d0ecd2bb 100644
--- a/src/locale/org.freedesktop.locale1.conf
+++ b/src/grp-locale/systemd-localed/org.freedesktop.locale1.conf
diff --git a/src/locale/org.freedesktop.locale1.policy.in b/src/grp-locale/systemd-localed/org.freedesktop.locale1.policy.in
index df63845e9b..df63845e9b 100644
--- a/src/locale/org.freedesktop.locale1.policy.in
+++ b/src/grp-locale/systemd-localed/org.freedesktop.locale1.policy.in
diff --git a/src/locale/org.freedesktop.locale1.service b/src/grp-locale/systemd-localed/org.freedesktop.locale1.service
index 025f9a0fc2..025f9a0fc2 100644
--- a/src/locale/org.freedesktop.locale1.service
+++ b/src/grp-locale/systemd-localed/org.freedesktop.locale1.service
diff --git a/units/systemd-localed.service.in b/src/grp-locale/systemd-localed/systemd-localed.service.in
index df829e1164..df829e1164 100644
--- a/units/systemd-localed.service.in
+++ b/src/grp-locale/systemd-localed/systemd-localed.service.in
diff --git a/man/systemd-localed.service.xml b/src/grp-locale/systemd-localed/systemd-localed.service.xml
index 06aa78c0e4..06aa78c0e4 100644
--- a/man/systemd-localed.service.xml
+++ b/src/grp-locale/systemd-localed/systemd-localed.service.xml
diff --git a/src/locale/test-keymap-util.c b/src/grp-locale/systemd-localed/test-keymap-util.c
index 2adda3da2b..9a7c4c9b53 100644
--- a/src/locale/test-keymap-util.c
+++ b/src/grp-locale/systemd-localed/test-keymap-util.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+
#include "keymap-util.h"
-#include "log.h"
-#include "string-util.h"
static void test_find_language_fallback(void) {
_cleanup_free_ char *ans = NULL, *ans2 = NULL;
diff --git a/src/login/.gitignore b/src/grp-login/.gitignore
index 3a8ba497c1..3a8ba497c1 100644
--- a/src/login/.gitignore
+++ b/src/grp-login/.gitignore
diff --git a/src/grp-login/GNUmakefile b/src/grp-login/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-login/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-login/Makefile b/src/grp-login/Makefile
new file mode 100644
index 0000000000..48a15db591
--- /dev/null
+++ b/src/grp-login/Makefile
@@ -0,0 +1,63 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+test_login_SOURCES = \
+ src/libsystemd/sd-login/test-login.c
+
+test_login_LDADD = \
+ libsystemd-shared.la
+
+test_login_shared_SOURCES = \
+ src/login/test-login-shared.c
+
+test_login_shared_LDADD = \
+ libsystemd-shared.la
+
+test_inhibit_SOURCES = \
+ src/login/test-inhibit.c
+
+test_inhibit_LDADD = \
+ libsystemd-shared.la
+
+test_login_tables_SOURCES = \
+ src/login/test-login-tables.c
+
+test_login_tables_LDADD = \
+ liblogind-core.la
+
+manual_tests += \
+ test-login \
+ test-inhibit
+
+tests += \
+ test-login-tables \
+ test-login-shared
+
+nested.subdirs += loginctl
+nested.subdirs += pam_systemd
+nested.subdirs += systemd-inhibit
+nested.subdirs += systemd-logind
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-login/loginctl/GNUmakefile b/src/grp-login/loginctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-login/loginctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-login/loginctl/Makefile b/src/grp-login/loginctl/Makefile
new file mode 100644
index 0000000000..f1a474e1cc
--- /dev/null
+++ b/src/grp-login/loginctl/Makefile
@@ -0,0 +1,42 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+loginctl_SOURCES = \
+ src/login/loginctl.c \
+ src/login/sysfs-show.h \
+ src/login/sysfs-show.c
+
+loginctl_LDADD = \
+ libsystemd-shared.la
+
+rootbin_PROGRAMS += \
+ loginctl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/loginctl
+
+dist_zshcompletion_data += shell-completion/zsh/_loginctl
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/login/loginctl.c b/src/grp-login/loginctl/loginctl.c
index 4c618ed19e..d905b0f6a1 100644
--- a/src/login/loginctl.c
+++ b/src/grp-login/loginctl/loginctl.c
@@ -23,29 +23,30 @@
#include <string.h>
#include <unistd.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
-#include "cgroup-show.h"
-#include "cgroup-util.h"
-#include "log.h"
-#include "logs-show.h"
-#include "macro.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "spawn-polkit-agent.h"
-#include "strv.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-shared/bus-unit-util.h"
+#include "systemd-shared/cgroup-show.h"
+#include "systemd-shared/logs-show.h"
+#include "systemd-shared/pager.h"
+#include "systemd-shared/spawn-polkit-agent.h"
+
#include "sysfs-show.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "user-util.h"
-#include "util.h"
-#include "verbs.h"
static char **arg_property = NULL;
static bool arg_all = false;
diff --git a/shell-completion/bash/loginctl b/src/grp-login/loginctl/loginctl.completion.bash
index 776eca4e62..776eca4e62 100644
--- a/shell-completion/bash/loginctl
+++ b/src/grp-login/loginctl/loginctl.completion.bash
diff --git a/shell-completion/zsh/_loginctl b/src/grp-login/loginctl/loginctl.completion.zsh
index 6f6ff6e314..6f6ff6e314 100644
--- a/shell-completion/zsh/_loginctl
+++ b/src/grp-login/loginctl/loginctl.completion.zsh
diff --git a/man/loginctl.xml b/src/grp-login/loginctl/loginctl.xml
index fb51740503..fb51740503 100644
--- a/man/loginctl.xml
+++ b/src/grp-login/loginctl/loginctl.xml
diff --git a/src/login/sysfs-show.c b/src/grp-login/loginctl/sysfs-show.c
index 29785e2f11..ff4babdc74 100644
--- a/src/login/sysfs-show.c
+++ b/src/grp-login/loginctl/sysfs-show.c
@@ -20,16 +20,17 @@
#include <errno.h>
#include <string.h>
-#include "libudev.h"
+#include <libudev.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/udev-util.h"
-#include "alloc-util.h"
-#include "locale-util.h"
-#include "path-util.h"
-#include "string-util.h"
#include "sysfs-show.h"
-#include "terminal-util.h"
-#include "udev-util.h"
-#include "util.h"
static int show_sysfs_one(
struct udev *udev,
diff --git a/src/login/sysfs-show.h b/src/grp-login/loginctl/sysfs-show.h
index 3e94bc3ed5..3e94bc3ed5 100644
--- a/src/login/sysfs-show.h
+++ b/src/grp-login/loginctl/sysfs-show.h
diff --git a/src/grp-login/pam_systemd/GNUmakefile b/src/grp-login/pam_systemd/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-login/pam_systemd/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-login/pam_systemd/Makefile b/src/grp-login/pam_systemd/Makefile
new file mode 100644
index 0000000000..2f1dfd9db1
--- /dev/null
+++ b/src/grp-login/pam_systemd/Makefile
@@ -0,0 +1,57 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_PAM),)
+pam_systemd_la_SOURCES = \
+ src/login/pam_systemd.sym \
+ src/login/pam_systemd.c
+
+pam_systemd_la_CFLAGS = \
+ $(PAM_CFLAGS)
+
+pam_systemd_la_LDFLAGS = \
+ -module \
+ -export-dynamic \
+ -avoid-version \
+ -shared \
+ -Wl,--version-script=$(srcdir)/pam_systemd.sym
+
+pam_systemd_la_LIBADD = \
+ libsystemd-shared.la \
+ $(PAM_LIBS)
+
+pamlib_LTLIBRARIES = \
+ pam_systemd.la
+
+ifneq ($(ENABLE_PAM_CONFIG),)
+dist_pamconf_DATA = \
+ src/login/systemd-user
+endif
+
+EXTRA_DIST += \
+ src/login/systemd-user.m4
+endif # HAVE_PAM
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/login/pam_systemd.c b/src/grp-login/pam_systemd/pam_systemd.c
index 4f023640f6..fe1a2266b7 100644
--- a/src/login/pam_systemd.c
+++ b/src/grp-login/pam_systemd/pam_systemd.c
@@ -28,23 +28,23 @@
#include <security/pam_modutil.h>
#include <sys/file.h>
-#include "alloc-util.h"
-#include "audit-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "def.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "hostname-util.h"
-#include "login-util.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "socket-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/login-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
static int parse_argv(
pam_handle_t *handle,
diff --git a/src/login/pam_systemd.sym b/src/grp-login/pam_systemd/pam_systemd.sym
index 23ff75f688..23ff75f688 100644
--- a/src/login/pam_systemd.sym
+++ b/src/grp-login/pam_systemd/pam_systemd.sym
diff --git a/man/pam_systemd.xml b/src/grp-login/pam_systemd/pam_systemd.xml
index ddda81bc90..ddda81bc90 100644
--- a/man/pam_systemd.xml
+++ b/src/grp-login/pam_systemd/pam_systemd.xml
diff --git a/src/login/systemd-user.m4 b/src/grp-login/pam_systemd/systemd-user.pam.m4
index e33963b125..e33963b125 100644
--- a/src/login/systemd-user.m4
+++ b/src/grp-login/pam_systemd/systemd-user.pam.m4
diff --git a/src/grp-login/systemd-inhibit/GNUmakefile b/src/grp-login/systemd-inhibit/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-login/systemd-inhibit/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-login/systemd-inhibit/Makefile b/src/grp-login/systemd-inhibit/Makefile
new file mode 100644
index 0000000000..8b3b7995d9
--- /dev/null
+++ b/src/grp-login/systemd-inhibit/Makefile
@@ -0,0 +1,37 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+dist_zshcompletion_data += shell-completion/zsh/_systemd-inhibit
+
+systemd_inhibit_SOURCES = \
+ src/login/inhibit.c
+
+systemd_inhibit_LDADD = \
+ libsystemd-shared.la
+
+rootbin_PROGRAMS += \
+ systemd-inhibit
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/login/inhibit.c b/src/grp-login/systemd-inhibit/inhibit.c
index f2c37a8623..c4c14bdffe 100644
--- a/src/login/inhibit.c
+++ b/src/grp-login/systemd-inhibit/inhibit.c
@@ -23,18 +23,18 @@
#include <stdlib.h>
#include <unistd.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
static const char* arg_what = "idle:sleep:shutdown";
static const char* arg_who = NULL;
diff --git a/shell-completion/zsh/_systemd-inhibit b/src/grp-login/systemd-inhibit/systemd-inhibit.completion.zsh
index 1b3247b2cd..1b3247b2cd 100644
--- a/shell-completion/zsh/_systemd-inhibit
+++ b/src/grp-login/systemd-inhibit/systemd-inhibit.completion.zsh
diff --git a/man/systemd-inhibit.xml b/src/grp-login/systemd-inhibit/systemd-inhibit.xml
index ce169960d8..ce169960d8 100644
--- a/man/systemd-inhibit.xml
+++ b/src/grp-login/systemd-inhibit/systemd-inhibit.xml
diff --git a/src/login/70-power-switch.rules b/src/grp-login/systemd-logind/70-power-switch.rules
index e2855b50f7..e2855b50f7 100644
--- a/src/login/70-power-switch.rules
+++ b/src/grp-login/systemd-logind/70-power-switch.rules
diff --git a/src/login/70-uaccess.rules b/src/grp-login/systemd-logind/70-uaccess.rules
index 50dcd2e275..50dcd2e275 100644
--- a/src/login/70-uaccess.rules
+++ b/src/grp-login/systemd-logind/70-uaccess.rules
diff --git a/src/login/71-seat.rules.in b/src/grp-login/systemd-logind/71-seat.rules.in
index de55c9a4ec..de55c9a4ec 100644
--- a/src/login/71-seat.rules.in
+++ b/src/grp-login/systemd-logind/71-seat.rules.in
diff --git a/src/login/73-seat-late.rules.in b/src/grp-login/systemd-logind/73-seat-late.rules.in
index 901df750fd..901df750fd 100644
--- a/src/login/73-seat-late.rules.in
+++ b/src/grp-login/systemd-logind/73-seat-late.rules.in
diff --git a/src/grp-login/systemd-logind/GNUmakefile b/src/grp-login/systemd-logind/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-login/systemd-logind/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-login/systemd-logind/Makefile b/src/grp-login/systemd-logind/Makefile
new file mode 100644
index 0000000000..24de945818
--- /dev/null
+++ b/src/grp-login/systemd-logind/Makefile
@@ -0,0 +1,132 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_LOGIND),)
+
+systemd_logind_SOURCES = \
+ src/login/logind.c \
+ src/login/logind.h
+
+nodist_systemd_logind_SOURCES = \
+ src/login/logind-gperf.c
+
+systemd_logind_LDADD = \
+ liblogind-core.la
+
+liblogind_core_la_SOURCES = \
+ src/login/logind-core.c \
+ src/login/logind-device.c \
+ src/login/logind-device.h \
+ src/login/logind-button.c \
+ src/login/logind-button.h \
+ src/login/logind-action.c \
+ src/login/logind-action.h \
+ src/login/logind-seat.c \
+ src/login/logind-seat.h \
+ src/login/logind-session.c \
+ src/login/logind-session.h \
+ src/login/logind-session-device.c \
+ src/login/logind-session-device.h \
+ src/login/logind-user.c \
+ src/login/logind-user.h \
+ src/login/logind-inhibit.c \
+ src/login/logind-inhibit.h \
+ src/login/logind-dbus.c \
+ src/login/logind-session-dbus.c \
+ src/login/logind-seat-dbus.c \
+ src/login/logind-user-dbus.c \
+ src/login/logind-utmp.c \
+ src/login/logind-acl.h
+
+liblogind_core_la_LIBADD = \
+ libsystemd-shared.la
+
+ifneq ($(HAVE_ACL),)
+liblogind_core_la_SOURCES += \
+ src/login/logind-acl.c
+endif # HAVE_ACL
+
+noinst_LTLIBRARIES += \
+ liblogind-core.la
+
+rootlibexec_PROGRAMS += \
+ systemd-logind
+
+nodist_systemunit_DATA += \
+ units/systemd-logind.service
+
+dist_systemunit_DATA += \
+ units/user.slice
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.login1.busname
+
+dist_dbussystemservice_DATA += \
+ src/login/org.freedesktop.login1.service
+
+dist_dbuspolicy_DATA += \
+ src/login/org.freedesktop.login1.conf
+
+nodist_pkgsysconf_DATA += \
+ src/login/logind.conf
+
+polkitpolicy_files += \
+ src/login/org.freedesktop.login1.policy
+
+INSTALL_DIRS += \
+ $(systemdstatedir)
+
+MULTI_USER_TARGET_WANTS += \
+ systemd-logind.service
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-logind.service dbus-org.freedesktop.login1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.login1.busname
+
+dist_udevrules_DATA += \
+ src/login/70-uaccess.rules \
+ src/login/70-power-switch.rules
+
+nodist_udevrules_DATA += \
+ src/login/71-seat.rules \
+ src/login/73-seat-late.rules
+
+endif # ENABLE_LOGIND
+
+polkitpolicy_in_files += \
+ src/login/org.freedesktop.login1.policy.in
+
+gperf_gperf_sources += \
+ src/login/logind-gperf.gperf
+
+EXTRA_DIST += \
+ src/login/71-seat.rules.in \
+ src/login/73-seat-late.rules.in \
+ units/systemd-logind.service.in \
+ src/login/logind.conf.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/login/logind-acl.c b/src/grp-login/systemd-logind/logind-acl.c
index 0cef88a82d..9261e59122 100644
--- a/src/login/logind-acl.c
+++ b/src/grp-login/systemd-logind/logind-acl.c
@@ -20,17 +20,18 @@
#include <errno.h>
#include <string.h>
-#include "acl-util.h"
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "formats-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/acl-util.h"
+#include "systemd-shared/udev-util.h"
+
#include "logind-acl.h"
-#include "set.h"
-#include "string-util.h"
-#include "udev-util.h"
-#include "util.h"
static int flush_acl(acl_t acl) {
acl_entry_t i;
diff --git a/src/login/logind-acl.h b/src/grp-login/systemd-logind/logind-acl.h
index 1286c6a3cd..7d324ea90a 100644
--- a/src/login/logind-acl.h
+++ b/src/grp-login/systemd-logind/logind-acl.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "libudev.h"
+#include <libudev.h>
#ifdef HAVE_ACL
diff --git a/src/login/logind-action.c b/src/grp-login/systemd-logind/logind-action.c
index a950409254..3115284564 100644
--- a/src/login/logind-action.c
+++ b/src/grp-login/systemd-logind/logind-action.c
@@ -19,18 +19,19 @@
#include <unistd.h>
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "conf-parser.h"
-#include "formats-util.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/sleep-config.h"
+
#include "logind-action.h"
-#include "process-util.h"
-#include "sleep-config.h"
-#include "special.h"
-#include "string-table.h"
-#include "terminal-util.h"
-#include "user-util.h"
int manager_handle_action(
Manager *m,
diff --git a/src/login/logind-action.h b/src/grp-login/systemd-logind/logind-action.h
index fb40ae48d2..fb40ae48d2 100644
--- a/src/login/logind-action.h
+++ b/src/grp-login/systemd-logind/logind-action.h
diff --git a/src/login/logind-button.c b/src/grp-login/systemd-logind/logind-button.c
index 90fb93bbaf..60e9f0a476 100644
--- a/src/login/logind-button.c
+++ b/src/grp-login/systemd-logind/logind-button.c
@@ -22,15 +22,17 @@
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
+
#include <linux/input.h>
-#include "sd-messages.h"
+#include <systemd/sd-messages.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
-#include "fd-util.h"
#include "logind-button.h"
-#include "string-util.h"
-#include "util.h"
Button* button_new(Manager *m, const char *name) {
Button *b;
diff --git a/src/login/logind-button.h b/src/grp-login/systemd-logind/logind-button.h
index f30cba2959..f30cba2959 100644
--- a/src/login/logind-button.h
+++ b/src/grp-login/systemd-logind/logind-button.h
diff --git a/src/login/logind-core.c b/src/grp-login/systemd-logind/logind-core.c
index eff5a4a36f..b4bb502aac 100644
--- a/src/login/logind-core.c
+++ b/src/grp-login/systemd-logind/logind-core.c
@@ -21,18 +21,20 @@
#include <pwd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
+
#include <linux/vt.h>
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "fd-util.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/udev-util.h"
+
#include "logind.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "udev-util.h"
-#include "user-util.h"
int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) {
Device *d;
diff --git a/src/login/logind-dbus.c b/src/grp-login/systemd-logind/logind-dbus.c
index 0a84d75e24..c4b962ec92 100644
--- a/src/login/logind-dbus.c
+++ b/src/grp-login/systemd-logind/logind-dbus.c
@@ -22,33 +22,34 @@
#include <string.h>
#include <unistd.h>
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "audit-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "dirent-util.h"
-#include "efivars.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio-label.h"
-#include "formats-util.h"
-#include "fs-util.h"
+#include <systemd/sd-messages.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/efivars.h"
+#include "systemd-shared/sleep-config.h"
+#include "systemd-shared/udev-util.h"
+#include "systemd-shared/utmp-wtmp.h"
+
#include "logind.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "selinux-util.h"
-#include "sleep-config.h"
-#include "special.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "udev-util.h"
-#include "unit-name.h"
-#include "user-util.h"
-#include "utmp-wtmp.h"
int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret) {
_cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL;
diff --git a/src/login/logind-device.c b/src/grp-login/systemd-logind/logind-device.c
index 6537fa04bf..15ef1b10bb 100644
--- a/src/login/logind-device.c
+++ b/src/grp-login/systemd-logind/logind-device.c
@@ -19,9 +19,10 @@
#include <string.h>
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/util.h"
+
#include "logind-device.h"
-#include "util.h"
Device* device_new(Manager *m, const char *sysfs, bool master) {
Device *d;
diff --git a/src/login/logind-device.h b/src/grp-login/systemd-logind/logind-device.h
index 927068e00a..11b9bfbecd 100644
--- a/src/login/logind-device.h
+++ b/src/grp-login/systemd-logind/logind-device.h
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/list.h"
+
typedef struct Device Device;
-#include "list.h"
#include "logind-seat.h"
#include "logind-session-device.h"
diff --git a/src/login/logind-gperf.gperf b/src/grp-login/systemd-logind/logind-gperf.gperf
index 0b6a5f3cf4..3dcde4cb8f 100644
--- a/src/login/logind-gperf.gperf
+++ b/src/grp-login/systemd-logind/logind-gperf.gperf
@@ -1,6 +1,8 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
+
+#include "systemd-shared/conf-parser.h"
+
#include "logind.h"
%}
struct ConfigPerfItem;
diff --git a/src/login/logind-inhibit.c b/src/grp-login/systemd-logind/logind-inhibit.c
index c93b24009b..b416f395a1 100644
--- a/src/login/logind-inhibit.c
+++ b/src/grp-login/systemd-logind/logind-inhibit.c
@@ -22,18 +22,19 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "logind-inhibit.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "util.h"
Inhibitor* inhibitor_new(Manager *m, const char* id) {
Inhibitor *i;
diff --git a/src/login/logind-inhibit.h b/src/grp-login/systemd-logind/logind-inhibit.h
index 70de199c60..70de199c60 100644
--- a/src/login/logind-inhibit.h
+++ b/src/grp-login/systemd-logind/logind-inhibit.h
diff --git a/src/login/logind-seat-dbus.c b/src/grp-login/systemd-logind/logind-seat-dbus.c
index f934a5326a..000a96cddc 100644
--- a/src/login/logind-seat-dbus.c
+++ b/src/grp-login/systemd-logind/logind-seat-dbus.c
@@ -20,15 +20,16 @@
#include <errno.h>
#include <string.h>
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-label.h"
-#include "bus-util.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "logind-seat.h"
#include "logind.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
static int property_get_active_session(
sd_bus *bus,
diff --git a/src/login/logind-seat.c b/src/grp-login/systemd-logind/logind-seat.c
index ecc7bd2e5b..ea5513bea5 100644
--- a/src/login/logind-seat.c
+++ b/src/grp-login/systemd-logind/logind-seat.c
@@ -22,20 +22,21 @@
#include <string.h>
#include <unistd.h>
-#include "sd-messages.h"
+#include <systemd/sd-messages.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
#include "logind-acl.h"
#include "logind-seat.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "util.h"
Seat *seat_new(Manager *m, const char *id) {
Seat *s;
diff --git a/src/login/logind-seat.h b/src/grp-login/systemd-logind/logind-seat.h
index 9a4fbc5bc5..fba08ef5c3 100644
--- a/src/login/logind-seat.h
+++ b/src/grp-login/systemd-logind/logind-seat.h
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/list.h"
+
typedef struct Seat Seat;
-#include "list.h"
#include "logind-session.h"
struct Seat {
diff --git a/src/login/logind-session-dbus.c b/src/grp-login/systemd-logind/logind-session-dbus.c
index 22dea5db1f..ffcc1c8324 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/grp-login/systemd-logind/logind-session-dbus.c
@@ -20,17 +20,18 @@
#include <errno.h>
#include <string.h>
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-label.h"
-#include "bus-util.h"
-#include "fd-util.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+
#include "logind-session-device.h"
#include "logind-session.h"
#include "logind.h"
-#include "signal-util.h"
-#include "strv.h"
-#include "util.h"
static int property_get_user(
sd_bus *bus,
diff --git a/src/login/logind-session-device.c b/src/grp-login/systemd-logind/logind-session-device.c
index 4055a23277..131e000439 100644
--- a/src/login/logind-session-device.c
+++ b/src/grp-login/systemd-logind/logind-session-device.c
@@ -18,19 +18,21 @@
***/
#include <fcntl.h>
-#include <linux/input.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
-#include "libudev.h"
+#include <linux/input.h>
+
+#include <libudev.h>
+
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "fd-util.h"
#include "logind-session-device.h"
-#include "missing.h"
-#include "util.h"
enum SessionDeviceNotifications {
SESSION_DEVICE_RESUME,
diff --git a/src/login/logind-session-device.h b/src/grp-login/systemd-logind/logind-session-device.h
index 7c8503583f..4bd0f28695 100644
--- a/src/login/logind-session-device.h
+++ b/src/grp-login/systemd-logind/logind-session-device.h
@@ -19,10 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/list.h"
+
typedef enum DeviceType DeviceType;
typedef struct SessionDevice SessionDevice;
-#include "list.h"
#include "logind.h"
enum DeviceType {
diff --git a/src/login/logind-session.c b/src/grp-login/systemd-logind/logind-session.c
index cbf035f706..f25f4b6555 100644
--- a/src/login/logind-session.c
+++ b/src/grp-login/systemd-logind/logind-session.c
@@ -19,32 +19,34 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/kd.h>
-#include <linux/vt.h>
#include <signal.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "audit-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "io-util.h"
+#include <linux/kd.h>
+#include <linux/vt.h>
+
+#include <systemd/sd-messages.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "logind-session.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "string-table.h"
-#include "terminal-util.h"
-#include "user-util.h"
-#include "util.h"
#define RELEASE_USEC (20*USEC_PER_SEC)
diff --git a/src/login/logind-session.h b/src/grp-login/systemd-logind/logind-session.h
index ffb7cd2d41..9b836aacd2 100644
--- a/src/login/logind-session.h
+++ b/src/grp-login/systemd-logind/logind-session.h
@@ -19,11 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Session Session;
+#include "systemd-basic/list.h"
+#include "systemd-basic/login-util.h"
+
typedef enum KillWho KillWho;
+typedef struct Session Session;
-#include "list.h"
-#include "login-util.h"
#include "logind-user.h"
typedef enum SessionState {
diff --git a/src/login/logind-user-dbus.c b/src/grp-login/systemd-logind/logind-user-dbus.c
index af6392e025..73e44f8e61 100644
--- a/src/login/logind-user-dbus.c
+++ b/src/grp-login/systemd-logind/logind-user-dbus.c
@@ -20,14 +20,15 @@
#include <errno.h>
#include <string.h>
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "formats-util.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+
#include "logind-user.h"
#include "logind.h"
-#include "signal-util.h"
-#include "strv.h"
-#include "user-util.h"
static int property_get_display(
sd_bus *bus,
diff --git a/src/login/logind-user.c b/src/grp-login/systemd-logind/logind-user.c
index 2dc5fa7665..0308a78d42 100644
--- a/src/login/logind-user.c
+++ b/src/grp-login/systemd-logind/logind-user.c
@@ -22,33 +22,34 @@
#include <sys/mount.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "clean-ipc.h"
-#include "conf-parser.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "label.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/clean-ipc.h"
+#include "systemd-shared/conf-parser.h"
+
#include "logind-user.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "smack-util.h"
-#include "special.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "unit-name.h"
-#include "user-util.h"
-#include "util.h"
int user_new(User **out, Manager *m, uid_t uid, gid_t gid, const char *name) {
_cleanup_(user_freep) User *u = NULL;
diff --git a/src/login/logind-user.h b/src/grp-login/systemd-logind/logind-user.h
index 4f0966dc77..d93223f6ad 100644
--- a/src/login/logind-user.h
+++ b/src/grp-login/systemd-logind/logind-user.h
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/list.h"
+
typedef struct User User;
-#include "list.h"
#include "logind.h"
typedef enum UserState {
diff --git a/src/login/logind-utmp.c b/src/grp-login/systemd-logind/logind-utmp.c
index 29ab00eb1f..319718ca57 100644
--- a/src/login/logind-utmp.c
+++ b/src/grp-login/systemd-logind/logind-utmp.c
@@ -22,20 +22,21 @@
#include <string.h>
#include <unistd.h>
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "audit-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "formats-util.h"
+#include <systemd/sd-messages.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/utmp-wtmp.h"
+
#include "logind.h"
-#include "special.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "user-util.h"
-#include "utmp-wtmp.h"
_const_ static usec_t when_wall(usec_t n, usec_t elapse) {
diff --git a/src/login/logind.c b/src/grp-login/systemd-logind/logind.c
index a9841a3832..c95a11f9ea 100644
--- a/src/login/logind.c
+++ b/src/grp-login/systemd-logind/logind.c
@@ -22,23 +22,24 @@
#include <string.h>
#include <unistd.h>
-#include "libudev.h"
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "conf-parser.h"
-#include "def.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
+#include <libudev.h>
+#include <systemd/sd-daemon.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/udev-util.h"
+
#include "logind.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "strv.h"
-#include "udev-util.h"
-#include "cgroup-util.h"
static void manager_free(Manager *m);
diff --git a/src/login/logind.conf.in b/src/grp-login/systemd-logind/logind.conf.in
index 6f720b7708..6f720b7708 100644
--- a/src/login/logind.conf.in
+++ b/src/grp-login/systemd-logind/logind.conf.in
diff --git a/man/logind.conf.xml b/src/grp-login/systemd-logind/logind.conf.xml
index 994e0e1140..994e0e1140 100644
--- a/man/logind.conf.xml
+++ b/src/grp-login/systemd-logind/logind.conf.xml
diff --git a/src/login/logind.h b/src/grp-login/systemd-logind/logind.h
index 7556ee2e48..4e6f424e9e 100644
--- a/src/login/logind.h
+++ b/src/grp-login/systemd-logind/logind.h
@@ -21,13 +21,13 @@
#include <stdbool.h>
-#include "libudev.h"
-#include "sd-bus.h"
-#include "sd-event.h"
+#include <libudev.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
-#include "hashmap.h"
-#include "list.h"
-#include "set.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/set.h"
typedef struct Manager Manager;
diff --git a/src/login/org.freedesktop.login1.conf b/src/grp-login/systemd-logind/org.freedesktop.login1.conf
index c89e40457e..c89e40457e 100644
--- a/src/login/org.freedesktop.login1.conf
+++ b/src/grp-login/systemd-logind/org.freedesktop.login1.conf
diff --git a/src/login/org.freedesktop.login1.policy.in b/src/grp-login/systemd-logind/org.freedesktop.login1.policy.in
index 66cbce393c..66cbce393c 100644
--- a/src/login/org.freedesktop.login1.policy.in
+++ b/src/grp-login/systemd-logind/org.freedesktop.login1.policy.in
diff --git a/src/login/org.freedesktop.login1.service b/src/grp-login/systemd-logind/org.freedesktop.login1.service
index 762dae2bb3..762dae2bb3 100644
--- a/src/login/org.freedesktop.login1.service
+++ b/src/grp-login/systemd-logind/org.freedesktop.login1.service
diff --git a/units/systemd-logind.service.in b/src/grp-login/systemd-logind/systemd-logind.service.in
index 0b6de35733..0b6de35733 100644
--- a/units/systemd-logind.service.in
+++ b/src/grp-login/systemd-logind/systemd-logind.service.in
diff --git a/man/systemd-logind.service.xml b/src/grp-login/systemd-logind/systemd-logind.service.xml
index f0bdb1c756..f0bdb1c756 100644
--- a/man/systemd-logind.service.xml
+++ b/src/grp-login/systemd-logind/systemd-logind.service.xml
diff --git a/units/user.slice b/src/grp-login/systemd-logind/user.slice
index 9fa6284c12..9fa6284c12 100644
--- a/units/user.slice
+++ b/src/grp-login/systemd-logind/user.slice
diff --git a/src/login/test-inhibit.c b/src/grp-login/test-inhibit.c
index a3cf9d293b..3cddff0e9d 100644
--- a/src/login/test-inhibit.c
+++ b/src/grp-login/test-inhibit.c
@@ -19,12 +19,12 @@
#include <unistd.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "bus-util.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "util.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
static int inhibit(sd_bus *bus, const char *what) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
diff --git a/src/login/test-login-shared.c b/src/grp-login/test-login-shared.c
index 3d233f017c..769d7b9915 100644
--- a/src/login/test-login-shared.c
+++ b/src/grp-login/test-login-shared.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "login-util.h"
-#include "macro.h"
+#include "systemd-basic/login-util.h"
+#include "systemd-basic/macro.h"
static void test_session_id_valid(void) {
assert_se(session_id_valid("c1"));
diff --git a/src/login/test-login-tables.c b/src/grp-login/test-login-tables.c
index 4fbc893a9a..0d9d7ae479 100644
--- a/src/login/test-login-tables.c
+++ b/src/grp-login/test-login-tables.c
@@ -19,7 +19,7 @@
#include "logind-action.h"
#include "logind-session.h"
-#include "test-tables.h"
+#include "systemd-shared/test-tables.h"
int main(int argc, char **argv) {
test_table(handle_action, HANDLE_ACTION);
diff --git a/src/grp-machine/GNUmakefile b/src/grp-machine/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-machine/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/Makefile b/src/grp-machine/Makefile
new file mode 100644
index 0000000000..98e33243b7
--- /dev/null
+++ b/src/grp-machine/Makefile
@@ -0,0 +1,32 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += grp-import
+nested.subdirs += libmachine-core
+nested.subdirs += machinectl
+nested.subdirs += nss-mymachines
+nested.subdirs += systemd-machined
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-machine/grp-import/GNUmakefile b/src/grp-machine/grp-import/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-machine/grp-import/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/grp-import/Makefile b/src/grp-machine/grp-import/Makefile
new file mode 100644
index 0000000000..dfa189b317
--- /dev/null
+++ b/src/grp-machine/grp-import/Makefile
@@ -0,0 +1,32 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += libimport
+nested.subdirs += systemd-export
+nested.subdirs += systemd-import
+nested.subdirs += systemd-importd
+nested.subdirs += systemd-pull
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-machine/grp-import/libimport/GNUmakefile b/src/grp-machine/grp-import/libimport/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-machine/grp-import/libimport/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/grp-import/libimport/Makefile b/src/grp-machine/grp-import/libimport/Makefile
new file mode 100644
index 0000000000..585001b2fa
--- /dev/null
+++ b/src/grp-machine/grp-import/libimport/Makefile
@@ -0,0 +1,41 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+manual_tests += \
+ test-qcow2
+
+test_qcow2_SOURCES = \
+ src/import/test-qcow2.c \
+ src/import/qcow2-util.c \
+ src/import/qcow2-util.h
+
+test_qcow2_CFLAGS = \
+ $(ZLIB_CFLAGS)
+
+test_qcow2_LDADD = \
+ libsystemd-shared.la \
+ $(ZLIB_LIBS)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/import/import-common.c b/src/grp-machine/grp-import/libimport/import-common.c
index 81209cdaf6..b0a34d5745 100644
--- a/src/import/import-common.c
+++ b/src/grp-machine/grp-import/libimport/import-common.c
@@ -22,12 +22,13 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "btrfs-util.h"
-#include "capability-util.h"
-#include "fd-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/util.h"
+
#include "import-common.h"
-#include "signal-util.h"
-#include "util.h"
int import_make_read_only_fd(int fd) {
int r;
diff --git a/src/import/import-common.h b/src/grp-machine/grp-import/libimport/import-common.h
index 07d3250e71..07d3250e71 100644
--- a/src/import/import-common.h
+++ b/src/grp-machine/grp-import/libimport/import-common.h
diff --git a/src/import/import-compress.c b/src/grp-machine/grp-import/libimport/import-compress.c
index f1766bbe3b..2e116df26c 100644
--- a/src/import/import-compress.c
+++ b/src/grp-machine/grp-import/libimport/import-compress.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/util.h"
+
#include "import-compress.h"
-#include "string-table.h"
-#include "util.h"
void import_compress_free(ImportCompress *c) {
assert(c);
diff --git a/src/import/import-compress.h b/src/grp-machine/grp-import/libimport/import-compress.h
index 6b59d0724b..025dd030be 100644
--- a/src/import/import-compress.h
+++ b/src/grp-machine/grp-import/libimport/import-compress.h
@@ -24,7 +24,7 @@
#include <sys/types.h>
#include <zlib.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef enum ImportCompressType {
IMPORT_COMPRESS_UNKNOWN,
diff --git a/src/import/qcow2-util.c b/src/grp-machine/grp-import/libimport/qcow2-util.c
index ee2121cc36..4c81fbebc7 100644
--- a/src/import/qcow2-util.c
+++ b/src/grp-machine/grp-import/libimport/qcow2-util.c
@@ -19,11 +19,12 @@
#include <zlib.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/util.h"
+
#include "qcow2-util.h"
-#include "sparse-endian.h"
-#include "util.h"
#define QCOW2_MAGIC 0x514649fb
diff --git a/src/import/qcow2-util.h b/src/grp-machine/grp-import/libimport/qcow2-util.h
index 6dddac8cdf..6dddac8cdf 100644
--- a/src/import/qcow2-util.h
+++ b/src/grp-machine/grp-import/libimport/qcow2-util.h
diff --git a/src/import/test-qcow2.c b/src/grp-machine/grp-import/libimport/test-qcow2.c
index b820253d71..7c973970ba 100644
--- a/src/import/test-qcow2.c
+++ b/src/grp-machine/grp-import/libimport/test-qcow2.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "fd-util.h"
-#include "log.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
+
#include "qcow2-util.h"
-#include "util.h"
int main(int argc, char *argv[]) {
_cleanup_close_ int sfd = -1, dfd = -1;
diff --git a/src/grp-machine/grp-import/systemd-export/GNUmakefile b/src/grp-machine/grp-import/systemd-export/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-export/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/grp-import/systemd-export/Makefile b/src/grp-machine/grp-import/systemd-export/Makefile
new file mode 100644
index 0000000000..fa6306226f
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-export/Makefile
@@ -0,0 +1,50 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-export
+
+systemd_export_SOURCES = \
+ src/import/export.c \
+ src/import/export-tar.c \
+ src/import/export-tar.h \
+ src/import/export-raw.c \
+ src/import/export-raw.h \
+ src/import/import-common.c \
+ src/import/import-common.h \
+ src/import/import-compress.c \
+ src/import/import-compress.h
+
+systemd_export_CFLAGS = \
+ $(XZ_CFLAGS) \
+ $(ZLIB_CFLAGS) \
+ $(BZIP2_CFLAGS)
+
+systemd_export_LDADD = \
+ libsystemd-shared.la \
+ $(XZ_LIBS) \
+ $(ZLIB_LIBS) \
+ $(BZIP2_LIBS)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/import/export-raw.c b/src/grp-machine/grp-import/systemd-export/export-raw.c
index a3dbce1954..64d0aa6197 100644
--- a/src/import/export-raw.c
+++ b/src/grp-machine/grp-import/systemd-export/export-raw.c
@@ -25,19 +25,20 @@
#include <libgen.h>
#undef basename
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "copy.h"
-#include "export-raw.h"
-#include "fd-util.h"
-#include "fileio.h"
#include "import-common.h"
-#include "missing.h"
-#include "ratelimit.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+
+#include "export-raw.h"
#define COPY_BUFFER_SIZE (16*1024)
diff --git a/src/import/export-raw.h b/src/grp-machine/grp-import/systemd-export/export-raw.h
index 8e723d4908..89aef76eed 100644
--- a/src/import/export-raw.h
+++ b/src/grp-machine/grp-import/systemd-export/export-raw.h
@@ -19,13 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "import-compress.h"
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef struct RawExport RawExport;
-
typedef void (*RawExportFinished)(RawExport *export, int error, void *userdata);
int raw_export_new(RawExport **export, sd_event *event, RawExportFinished on_finished, void *userdata);
diff --git a/src/import/export-tar.c b/src/grp-machine/grp-import/systemd-export/export-tar.c
index 3bb6027431..541f033c3e 100644
--- a/src/import/export-tar.c
+++ b/src/grp-machine/grp-import/systemd-export/export-tar.c
@@ -17,18 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "export-tar.h"
-#include "fd-util.h"
-#include "fileio.h"
#include "import-common.h"
-#include "process-util.h"
-#include "ratelimit.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+
+#include "export-tar.h"
#define COPY_BUFFER_SIZE (16*1024)
diff --git a/src/import/export-tar.h b/src/grp-machine/grp-import/systemd-export/export-tar.h
index 1e3c8bb80c..2c50c1e5bf 100644
--- a/src/import/export-tar.h
+++ b/src/grp-machine/grp-import/systemd-export/export-tar.h
@@ -19,13 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "import-compress.h"
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef struct TarExport TarExport;
-
typedef void (*TarExportFinished)(TarExport *export, int error, void *userdata);
int tar_export_new(TarExport **export, sd_event *event, TarExportFinished on_finished, void *userdata);
diff --git a/src/import/export.c b/src/grp-machine/grp-import/systemd-export/export.c
index cc98c33ef6..a07273da7c 100644
--- a/src/import/export.c
+++ b/src/grp-machine/grp-import/systemd-export/export.c
@@ -19,19 +19,20 @@
#include <getopt.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-shared/import-util.h"
+#include "systemd-shared/machine-image.h"
-#include "alloc-util.h"
#include "export-raw.h"
#include "export-tar.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "hostname-util.h"
-#include "import-util.h"
-#include "machine-image.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "verbs.h"
static ImportCompressType arg_compress = IMPORT_COMPRESS_UNKNOWN;
diff --git a/src/grp-machine/grp-import/systemd-import/GNUmakefile b/src/grp-machine/grp-import/systemd-import/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-import/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/grp-import/systemd-import/Makefile b/src/grp-machine/grp-import/systemd-import/Makefile
new file mode 100644
index 0000000000..8d04ec18c5
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-import/Makefile
@@ -0,0 +1,51 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-import
+systemd_import_SOURCES = \
+ src/import/import.c \
+ src/import/import-raw.c \
+ src/import/import-raw.h \
+ src/import/import-tar.c \
+ src/import/import-tar.h \
+ src/import/import-common.c \
+ src/import/import-common.h \
+ src/import/import-compress.c \
+ src/import/import-compress.h \
+ src/import/qcow2-util.c \
+ src/import/qcow2-util.h
+
+systemd_import_CFLAGS = \
+ $(XZ_CFLAGS) \
+ $(ZLIB_CFLAGS) \
+ $(BZIP2_CFLAGS)
+
+systemd_import_LDADD = \
+ libsystemd-shared.la \
+ $(XZ_LIBS) \
+ $(ZLIB_LIBS) \
+ $(BZIP2_LIBS)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/import/import-raw.c b/src/grp-machine/grp-import/systemd-import/import-raw.c
index 29f3f896e5..fa484377f1 100644
--- a/src/import/import-raw.c
+++ b/src/grp-machine/grp-import/systemd-import/import-raw.c
@@ -19,29 +19,30 @@
#include <linux/fs.h>
-#include "sd-daemon.h"
-#include "sd-event.h"
-
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "chattr-util.h"
-#include "copy.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hostname-util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+
#include "import-common.h"
#include "import-compress.h"
-#include "import-raw.h"
-#include "io-util.h"
-#include "machine-pool.h"
-#include "mkdir.h"
-#include "path-util.h"
#include "qcow2-util.h"
-#include "ratelimit.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/machine-pool.h"
+
+#include "import-raw.h"
struct RawImport {
sd_event *event;
diff --git a/src/import/import-raw.h b/src/grp-machine/grp-import/systemd-import/import-raw.h
index 4f543e0883..64c532242d 100644
--- a/src/import/import-raw.h
+++ b/src/grp-machine/grp-import/systemd-import/import-raw.h
@@ -19,13 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "import-util.h"
-#include "macro.h"
+#include "systemd-basic/macro.h"
+#include "systemd-shared/import-util.h"
typedef struct RawImport RawImport;
-
typedef void (*RawImportFinished)(RawImport *import, int error, void *userdata);
int raw_import_new(RawImport **import, sd_event *event, const char *image_root, RawImportFinished on_finished, void *userdata);
diff --git a/src/import/import-tar.c b/src/grp-machine/grp-import/systemd-import/import-tar.c
index 22f9b8c5ea..458f905d80 100644
--- a/src/import/import-tar.c
+++ b/src/grp-machine/grp-import/systemd-import/import-tar.c
@@ -19,29 +19,30 @@
#include <linux/fs.h>
-#include "sd-daemon.h"
-#include "sd-event.h"
-
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "copy.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hostname-util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+
#include "import-common.h"
#include "import-compress.h"
-#include "import-tar.h"
-#include "io-util.h"
-#include "machine-pool.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "process-util.h"
#include "qcow2-util.h"
-#include "ratelimit.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/machine-pool.h"
+
+#include "import-tar.h"
struct TarImport {
sd_event *event;
diff --git a/src/import/import-tar.h b/src/grp-machine/grp-import/systemd-import/import-tar.h
index 24abe06c8f..01c3f2d542 100644
--- a/src/import/import-tar.h
+++ b/src/grp-machine/grp-import/systemd-import/import-tar.h
@@ -19,13 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "import-util.h"
-#include "macro.h"
+#include "systemd-basic/macro.h"
+#include "systemd-shared/import-util.h"
typedef struct TarImport TarImport;
-
typedef void (*TarImportFinished)(TarImport *import, int error, void *userdata);
int tar_import_new(TarImport **import, sd_event *event, const char *image_root, TarImportFinished on_finished, void *userdata);
diff --git a/src/import/import.c b/src/grp-machine/grp-import/systemd-import/import.c
index 2b6ca24af8..d6f772a159 100644
--- a/src/import/import.c
+++ b/src/grp-machine/grp-import/systemd-import/import.c
@@ -19,19 +19,20 @@
#include <getopt.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-shared/import-util.h"
+#include "systemd-shared/machine-image.h"
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "hostname-util.h"
#include "import-raw.h"
#include "import-tar.h"
-#include "import-util.h"
-#include "machine-image.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "verbs.h"
static bool arg_force = false;
static bool arg_read_only = false;
diff --git a/src/import/.gitignore b/src/grp-machine/grp-import/systemd-importd/.gitignore
index 01106e2e68..01106e2e68 100644
--- a/src/import/.gitignore
+++ b/src/grp-machine/grp-import/systemd-importd/.gitignore
diff --git a/src/grp-machine/grp-import/systemd-importd/GNUmakefile b/src/grp-machine/grp-import/systemd-importd/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-importd/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/grp-import/systemd-importd/Makefile b/src/grp-machine/grp-import/systemd-importd/Makefile
new file mode 100644
index 0000000000..f473e34ea3
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-importd/Makefile
@@ -0,0 +1,65 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-importd
+systemd_importd_SOURCES = \
+ src/import/importd.c
+
+systemd_importd_CFLAGS = \
+ -D SYSTEMD_PULL_PATH=\"$(rootlibexecdir)/systemd-pull\" \
+ -D SYSTEMD_IMPORT_PATH=\"$(rootlibexecdir)/systemd-import\" \
+ -D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
+
+systemd_importd_LDADD = \
+ libsystemd-shared.la
+
+nodist_systemunit_DATA += \
+ units/systemd-importd.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.import1.busname
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.import1.busname
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-importd.service dbus-org.freedesktop.import1.service
+
+dist_dbussystemservice_DATA += \
+ src/import/org.freedesktop.import1.service
+
+dist_dbuspolicy_DATA += \
+ src/import/org.freedesktop.import1.conf
+
+polkitpolicy_files += \
+ src/import/org.freedesktop.import1.policy
+
+polkitpolicy_in_files += \
+ src/import/org.freedesktop.import1.policy.in
+
+EXTRA_DIST += \
+ units/systemd-importd.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/import/importd.c b/src/grp-machine/grp-import/systemd-importd/importd.c
index 9d31a956a5..68c52e564e 100644
--- a/src/import/importd.c
+++ b/src/grp-machine/grp-import/systemd-importd/importd.c
@@ -19,29 +19,29 @@
#include <sys/prctl.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
-#include "def.h"
-#include "fd-util.h"
-#include "hostname-util.h"
-#include "import-util.h"
-#include "machine-pool.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "string-table.h"
-#include "strv.h"
-#include "syslog-util.h"
-#include "user-util.h"
-#include "util.h"
-#include "web-util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/web-util.h"
+#include "systemd-shared/import-util.h"
+#include "systemd-shared/machine-pool.h"
typedef struct Transfer Transfer;
typedef struct Manager Manager;
diff --git a/src/import/org.freedesktop.import1.conf b/src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.conf
index ed2539a03b..ed2539a03b 100644
--- a/src/import/org.freedesktop.import1.conf
+++ b/src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.conf
diff --git a/src/import/org.freedesktop.import1.policy.in b/src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.policy.in
index 85924ed743..85924ed743 100644
--- a/src/import/org.freedesktop.import1.policy.in
+++ b/src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.policy.in
diff --git a/src/import/org.freedesktop.import1.service b/src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.service
index 8fc4c47881..8fc4c47881 100644
--- a/src/import/org.freedesktop.import1.service
+++ b/src/grp-machine/grp-import/systemd-importd/org.freedesktop.import1.service
diff --git a/units/systemd-importd.service.in b/src/grp-machine/grp-import/systemd-importd/systemd-importd.service.in
index ac27c2bcba..ac27c2bcba 100644
--- a/units/systemd-importd.service.in
+++ b/src/grp-machine/grp-import/systemd-importd/systemd-importd.service.in
diff --git a/man/systemd-importd.service.xml b/src/grp-machine/grp-import/systemd-importd/systemd-importd.service.xml
index 8fdced475c..8fdced475c 100644
--- a/man/systemd-importd.service.xml
+++ b/src/grp-machine/grp-import/systemd-importd/systemd-importd.service.xml
diff --git a/src/grp-machine/grp-import/systemd-pull/GNUmakefile b/src/grp-machine/grp-import/systemd-pull/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-pull/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/grp-import/systemd-pull/Makefile b/src/grp-machine/grp-import/systemd-pull/Makefile
new file mode 100644
index 0000000000..b89d456f37
--- /dev/null
+++ b/src/grp-machine/grp-import/systemd-pull/Makefile
@@ -0,0 +1,66 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-pull
+systemd_pull_SOURCES = \
+ src/import/pull.c \
+ src/import/pull-raw.c \
+ src/import/pull-raw.h \
+ src/import/pull-tar.c \
+ src/import/pull-tar.h \
+ src/import/pull-job.c \
+ src/import/pull-job.h \
+ src/import/pull-common.c \
+ src/import/pull-common.h \
+ src/import/import-common.c \
+ src/import/import-common.h \
+ src/import/import-compress.c \
+ src/import/import-compress.h \
+ src/import/curl-util.c \
+ src/import/curl-util.h \
+ src/import/qcow2-util.c \
+ src/import/qcow2-util.h
+
+systemd_pull_CFLAGS = \
+ $(LIBCURL_CFLAGS) \
+ $(XZ_CFLAGS) \
+ $(ZLIB_CFLAGS) \
+ $(BZIP2_CFLAGS) \
+ $(GCRYPT_CFLAGS) \
+ -D VENDOR_KEYRING_PATH=\"$(rootlibexecdir)/import-pubring.gpg\" \
+ -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
+
+systemd_pull_LDADD = \
+ libsystemd-shared.la \
+ $(LIBCURL_LIBS) \
+ $(XZ_LIBS) \
+ $(ZLIB_LIBS) \
+ $(BZIP2_LIBS) \
+ $(GCRYPT_LIBS)
+
+dist_rootlibexec_DATA += \
+ src/import/import-pubring.gpg
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/import/curl-util.c b/src/grp-machine/grp-import/systemd-pull/curl-util.c
index 734e1560e6..141ce9e875 100644
--- a/src/import/curl-util.c
+++ b/src/grp-machine/grp-import/systemd-pull/curl-util.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/string-util.h"
+
#include "curl-util.h"
-#include "fd-util.h"
-#include "string-util.h"
static void curl_glue_check_finished(CurlGlue *g) {
CURLMsg *msg;
diff --git a/src/import/curl-util.h b/src/grp-machine/grp-import/systemd-pull/curl-util.h
index a758cc5640..1619aeb18c 100644
--- a/src/import/curl-util.h
+++ b/src/grp-machine/grp-import/systemd-pull/curl-util.h
@@ -22,9 +22,9 @@
#include <curl/curl.h>
#include <sys/types.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "hashmap.h"
+#include "systemd-basic/hashmap.h"
typedef struct CurlGlue CurlGlue;
diff --git a/src/import/import-pubring.gpg b/src/grp-machine/grp-import/systemd-pull/import-pubring.gpg
index be27776896..be27776896 100644
--- a/src/import/import-pubring.gpg
+++ b/src/grp-machine/grp-import/systemd-pull/import-pubring.gpg
Binary files differ
diff --git a/src/import/pull-common.c b/src/grp-machine/grp-import/systemd-pull/pull-common.c
index 2ae2a4174c..9830d8a10f 100644
--- a/src/import/pull-common.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull-common.c
@@ -19,25 +19,26 @@
#include <sys/prctl.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "capability-util.h"
-#include "copy.h"
-#include "dirent-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "path-util.h"
-#include "process-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/web-util.h"
+
#include "pull-common.h"
#include "pull-job.h"
-#include "rm-rf.h"
-#include "signal-util.h"
-#include "siphash24.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
-#include "web-util.h"
#define FILENAME_ESCAPE "/.#\"\'"
#define HASH_URL_THRESHOLD_LENGTH (_POSIX_PATH_MAX - 16)
diff --git a/src/import/pull-common.h b/src/grp-machine/grp-import/systemd-pull/pull-common.h
index 929a131c88..1eb8f27fe8 100644
--- a/src/import/pull-common.h
+++ b/src/grp-machine/grp-import/systemd-pull/pull-common.h
@@ -21,7 +21,8 @@
#include <stdbool.h>
-#include "import-util.h"
+#include "systemd-shared/import-util.h"
+
#include "pull-job.h"
int pull_make_local_copy(const char *final, const char *root, const char *local, bool force_local);
diff --git a/src/import/pull-job.c b/src/grp-machine/grp-import/systemd-pull/pull-job.c
index e550df2c57..86d974952f 100644
--- a/src/import/pull-job.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull-job.c
@@ -19,16 +19,17 @@
#include <sys/xattr.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "hexdecoct.h"
-#include "io-util.h"
-#include "machine-pool.h"
-#include "parse-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/xattr-util.h"
+#include "systemd-shared/machine-pool.h"
+
#include "pull-job.h"
-#include "string-util.h"
-#include "strv.h"
-#include "xattr-util.h"
PullJob* pull_job_unref(PullJob *j) {
if (!j)
diff --git a/src/import/pull-job.h b/src/grp-machine/grp-import/systemd-pull/pull-job.h
index 3a152a50e3..8a99883794 100644
--- a/src/import/pull-job.h
+++ b/src/grp-machine/grp-import/systemd-pull/pull-job.h
@@ -21,12 +21,12 @@
#include <gcrypt.h>
-#include "curl-util.h"
#include "import-compress.h"
-#include "macro.h"
+#include "systemd-basic/macro.h"
-typedef struct PullJob PullJob;
+#include "curl-util.h"
+typedef struct PullJob PullJob;
typedef void (*PullJobFinished)(PullJob *job);
typedef int (*PullJobOpenDisk)(PullJob *job);
typedef int (*PullJobHeader)(PullJob *job, const char *header, size_t sz);
diff --git a/src/import/pull-raw.c b/src/grp-machine/grp-import/systemd-pull/pull-raw.c
index 0cf410a5d9..f15fb07a8e 100644
--- a/src/import/pull-raw.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull-raw.c
@@ -18,35 +18,37 @@
***/
#include <curl/curl.h>
-#include <linux/fs.h>
#include <sys/xattr.h>
-#include "sd-daemon.h"
+#include <linux/fs.h>
+
+#include <systemd/sd-daemon.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "chattr-util.h"
-#include "copy.h"
-#include "curl-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hostname-util.h"
#include "import-common.h"
-#include "import-util.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
+#include "qcow2-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/web-util.h"
+#include "systemd-shared/import-util.h"
+
+#include "curl-util.h"
#include "pull-common.h"
#include "pull-job.h"
#include "pull-raw.h"
-#include "qcow2-util.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "utf8.h"
-#include "util.h"
-#include "web-util.h"
typedef enum RawProgress {
RAW_DOWNLOADING,
diff --git a/src/import/pull-raw.h b/src/grp-machine/grp-import/systemd-pull/pull-raw.h
index 8f6d16eb3a..0940cff93b 100644
--- a/src/import/pull-raw.h
+++ b/src/grp-machine/grp-import/systemd-pull/pull-raw.h
@@ -19,13 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "import-util.h"
-#include "macro.h"
+#include "systemd-basic/macro.h"
+#include "systemd-shared/import-util.h"
typedef struct RawPull RawPull;
-
typedef void (*RawPullFinished)(RawPull *pull, int error, void *userdata);
int raw_pull_new(RawPull **pull, sd_event *event, const char *image_root, RawPullFinished on_finished, void *userdata);
diff --git a/src/import/pull-tar.c b/src/grp-machine/grp-import/systemd-pull/pull-tar.c
index 68e2397b02..167c7fade5 100644
--- a/src/import/pull-tar.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull-tar.c
@@ -20,31 +20,32 @@
#include <curl/curl.h>
#include <sys/prctl.h>
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "copy.h"
-#include "curl-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hostname-util.h"
#include "import-common.h"
-#include "import-util.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "process-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/web-util.h"
+#include "systemd-shared/import-util.h"
+
+#include "curl-util.h"
#include "pull-common.h"
#include "pull-job.h"
#include "pull-tar.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "utf8.h"
-#include "util.h"
-#include "web-util.h"
typedef enum TarProgress {
TAR_DOWNLOADING,
diff --git a/src/import/pull-tar.h b/src/grp-machine/grp-import/systemd-pull/pull-tar.h
index 7e63e496d8..21d4db5519 100644
--- a/src/import/pull-tar.h
+++ b/src/grp-machine/grp-import/systemd-pull/pull-tar.h
@@ -19,13 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "import-util.h"
-#include "macro.h"
+#include "systemd-basic/macro.h"
+#include "systemd-shared/import-util.h"
typedef struct TarPull TarPull;
-
typedef void (*TarPullFinished)(TarPull *pull, int error, void *userdata);
int tar_pull_new(TarPull **pull, sd_event *event, const char *image_root, TarPullFinished on_finished, void *userdata);
diff --git a/src/import/pull.c b/src/grp-machine/grp-import/systemd-pull/pull.c
index 53b1211965..a6b5ed47a8 100644
--- a/src/import/pull.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull.c
@@ -19,19 +19,20 @@
#include <getopt.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-basic/web-util.h"
+#include "systemd-shared/import-util.h"
+#include "systemd-shared/machine-image.h"
-#include "alloc-util.h"
-#include "hostname-util.h"
-#include "import-util.h"
-#include "machine-image.h"
-#include "parse-util.h"
#include "pull-raw.h"
#include "pull-tar.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "verbs.h"
-#include "web-util.h"
static bool arg_force = false;
static const char *arg_image_root = "/var/lib/machines";
diff --git a/src/grp-machine/libmachine-core/GNUmakefile b/src/grp-machine/libmachine-core/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-machine/libmachine-core/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/libmachine-core/Makefile b/src/grp-machine/libmachine-core/Makefile
new file mode 100644
index 0000000000..7c64e6af5f
--- /dev/null
+++ b/src/grp-machine/libmachine-core/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+nested.subdirs += test
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/machine/image-dbus.h b/src/grp-machine/libmachine-core/include/machine-core/image-dbus.h
index b62da996c6..b62da996c6 100644
--- a/src/machine/image-dbus.h
+++ b/src/grp-machine/libmachine-core/include/machine-core/image-dbus.h
diff --git a/src/machine/machine-dbus.h b/src/grp-machine/libmachine-core/include/machine-core/machine-dbus.h
index 241b23c7ec..d3faf5cb07 100644
--- a/src/machine/machine-dbus.h
+++ b/src/grp-machine/libmachine-core/include/machine-core/machine-dbus.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
#include "machine.h"
diff --git a/src/machine/machine.h b/src/grp-machine/libmachine-core/include/machine-core/machine.h
index e5d75361a9..361451b1c8 100644
--- a/src/machine/machine.h
+++ b/src/grp-machine/libmachine-core/include/machine-core/machine.h
@@ -19,10 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Machine Machine;
+#include "systemd-basic/list.h"
+
typedef enum KillWho KillWho;
+typedef struct Machine Machine;
-#include "list.h"
#include "machined.h"
#include "operation.h"
diff --git a/src/machine/machined.h b/src/grp-machine/libmachine-core/include/machine-core/machined.h
index 7b9b148044..8994097db0 100644
--- a/src/machine/machined.h
+++ b/src/grp-machine/libmachine-core/include/machine-core/machined.h
@@ -21,11 +21,11 @@
#include <stdbool.h>
-#include "sd-bus.h"
-#include "sd-event.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
-#include "hashmap.h"
-#include "list.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
typedef struct Manager Manager;
diff --git a/src/machine/operation.h b/src/grp-machine/libmachine-core/include/machine-core/operation.h
index 9831b123d7..5eed62bd6f 100644
--- a/src/machine/operation.h
+++ b/src/grp-machine/libmachine-core/include/machine-core/operation.h
@@ -21,10 +21,10 @@
#include <sys/types.h>
-#include "sd-bus.h"
-#include "sd-event.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
-#include "list.h"
+#include "systemd-basic/list.h"
typedef struct Operation Operation;
diff --git a/src/grp-machine/libmachine-core/src/GNUmakefile b/src/grp-machine/libmachine-core/src/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-machine/libmachine-core/src/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/libmachine-core/src/Makefile b/src/grp-machine/libmachine-core/src/Makefile
new file mode 100644
index 0000000000..ac7cdc0e2d
--- /dev/null
+++ b/src/grp-machine/libmachine-core/src/Makefile
@@ -0,0 +1,43 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+libmachine_core_la_SOURCES = \
+ src/machine/machine.c \
+ src/machine/machine.h \
+ src/machine/machined-dbus.c \
+ src/machine/machine-dbus.c \
+ src/machine/machine-dbus.h \
+ src/machine/image-dbus.c \
+ src/machine/image-dbus.h \
+ src/machine/operation.c \
+ src/machine/operation.h
+
+libmachine_core_la_LIBADD = \
+ libsystemd-shared.la
+
+noinst_LTLIBRARIES += \
+ libmachine-core.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/machine/image-dbus.c b/src/grp-machine/libmachine-core/src/image-dbus.c
index 867bbc467b..f3467bf193 100644
--- a/src/machine/image-dbus.c
+++ b/src/grp-machine/libmachine-core/src/image-dbus.c
@@ -17,16 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-label.h"
-#include "bus-util.h"
-#include "fd-util.h"
-#include "image-dbus.h"
-#include "io-util.h"
-#include "machine-image.h"
-#include "process-util.h"
-#include "strv.h"
-#include "user-util.h"
+#include "machine-core/image-dbus.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/machine-image.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, image_type, ImageType);
diff --git a/src/machine/machine-dbus.c b/src/grp-machine/libmachine-core/src/machine-dbus.c
index 5ca18ff87e..b7363054b3 100644
--- a/src/machine/machine-dbus.c
+++ b/src/grp-machine/libmachine-core/src/machine-dbus.c
@@ -28,28 +28,28 @@
#include <libgen.h>
#undef basename
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-internal.h"
-#include "bus-label.h"
-#include "bus-util.h"
-#include "copy.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "in-addr-util.h"
-#include "local-addresses.h"
-#include "machine-dbus.h"
-#include "machine.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "user-util.h"
+#include "machine-core/machine-dbus.h"
+#include "machine-core/machine.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-util.h"
+#include "sd-netlink/local-addresses.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
static int property_get_state(
sd_bus *bus,
diff --git a/src/machine/machine.c b/src/grp-machine/libmachine-core/src/machine.c
index a02b9d7575..67a2afe061 100644
--- a/src/machine/machine.c
+++ b/src/grp-machine/libmachine-core/src/machine.c
@@ -21,27 +21,27 @@
#include <string.h>
#include <unistd.h>
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "escape.h"
-#include "extract-word.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "hashmap.h"
-#include "machine-dbus.h"
-#include "machine.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "util.h"
+#include <systemd/sd-messages.h>
+
+#include "machine-core/machine-dbus.h"
+#include "machine-core/machine.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
Machine* machine_new(Manager *manager, MachineClass class, const char *name) {
Machine *m;
diff --git a/src/machine/machined-dbus.c b/src/grp-machine/libmachine-core/src/machined-dbus.c
index e40f40a263..bc1bbd4891 100644
--- a/src/machine/machined-dbus.c
+++ b/src/grp-machine/libmachine-core/src/machined-dbus.c
@@ -21,29 +21,29 @@
#include <string.h>
#include <unistd.h>
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "hostname-util.h"
-#include "image-dbus.h"
-#include "io-util.h"
-#include "machine-dbus.h"
-#include "machine-image.h"
-#include "machine-pool.h"
-#include "machined.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "stdio-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "user-util.h"
+#include <systemd/sd-id128.h>
+
+#include "machine-core/image-dbus.h"
+#include "machine-core/machine-dbus.h"
+#include "machine-core/machined.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/machine-image.h"
+#include "systemd-shared/machine-pool.h"
static int property_get_pool_path(
sd_bus *bus,
diff --git a/src/machine/operation.c b/src/grp-machine/libmachine-core/src/operation.c
index c966d0d21c..ce37eee98b 100644
--- a/src/machine/operation.c
+++ b/src/grp-machine/libmachine-core/src/operation.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "operation.h"
-#include "process-util.h"
+#include "machine-core/operation.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/process-util.h"
static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
diff --git a/src/grp-machine/libmachine-core/test/GNUmakefile b/src/grp-machine/libmachine-core/test/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-machine/libmachine-core/test/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/libmachine-core/test/Makefile b/src/grp-machine/libmachine-core/test/Makefile
new file mode 100644
index 0000000000..a75e11f3ac
--- /dev/null
+++ b/src/grp-machine/libmachine-core/test/Makefile
@@ -0,0 +1,35 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+test_machine_tables_SOURCES = \
+ src/machine/test-machine-tables.c
+
+test_machine_tables_LDADD = \
+ libmachine-core.la
+
+tests += \
+ test-machine-tables
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/machine/test-machine-tables.c b/src/grp-machine/libmachine-core/test/test-machine-tables.c
index f851a4d37d..5f50c3856b 100644
--- a/src/machine/test-machine-tables.c
+++ b/src/grp-machine/libmachine-core/test/test-machine-tables.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "machine.h"
-#include "test-tables.h"
+#include "machine-core/machine.h"
+#include "systemd-shared/test-tables.h"
int main(int argc, char **argv) {
test_table(machine_class, MACHINE_CLASS);
diff --git a/src/grp-machine/machinectl/GNUmakefile b/src/grp-machine/machinectl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-machine/machinectl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/machinectl/Makefile b/src/grp-machine/machinectl/Makefile
new file mode 100644
index 0000000000..f6760f3174
--- /dev/null
+++ b/src/grp-machine/machinectl/Makefile
@@ -0,0 +1,42 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+machinectl_SOURCES = \
+ src/machine/machinectl.c
+
+machinectl_LDADD = \
+ libsystemd-shared.la
+
+rootbin_PROGRAMS += \
+ machinectl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/machinectl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_machinectl \
+ shell-completion/zsh/_sd_machines
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/machine/machinectl.c b/src/grp-machine/machinectl/machinectl.c
index 7b9be3b425..733d73435e 100644
--- a/src/machine/machinectl.c
+++ b/src/grp-machine/machinectl/machinectl.c
@@ -29,38 +29,38 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
-#include "cgroup-show.h"
-#include "cgroup-util.h"
-#include "copy.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "hostname-util.h"
-#include "import-util.h"
-#include "log.h"
-#include "logs-show.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "ptyfwd.h"
-#include "signal-util.h"
-#include "spawn-polkit-agent.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "util.h"
-#include "verbs.h"
-#include "web-util.h"
-#include "stdio-util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-basic/web-util.h"
+#include "systemd-shared/bus-unit-util.h"
+#include "systemd-shared/cgroup-show.h"
+#include "systemd-shared/import-util.h"
+#include "systemd-shared/logs-show.h"
+#include "systemd-shared/pager.h"
+#include "systemd-shared/ptyfwd.h"
+#include "systemd-shared/spawn-polkit-agent.h"
#define ALL_IP_ADDRESSES -1
diff --git a/shell-completion/bash/machinectl b/src/grp-machine/machinectl/machinectl.completion.bash
index aebe48304d..aebe48304d 100644
--- a/shell-completion/bash/machinectl
+++ b/src/grp-machine/machinectl/machinectl.completion.bash
diff --git a/shell-completion/zsh/_machinectl b/src/grp-machine/machinectl/machinectl.completion.zsh
index 92d77109a5..92d77109a5 100644
--- a/shell-completion/zsh/_machinectl
+++ b/src/grp-machine/machinectl/machinectl.completion.zsh
diff --git a/man/machinectl.xml b/src/grp-machine/machinectl/machinectl.xml
index 5a6ec294d2..5a6ec294d2 100644
--- a/man/machinectl.xml
+++ b/src/grp-machine/machinectl/machinectl.xml
diff --git a/src/grp-machine/nss-mymachines/GNUmakefile b/src/grp-machine/nss-mymachines/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-machine/nss-mymachines/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/nss-mymachines/Makefile b/src/grp-machine/nss-mymachines/Makefile
new file mode 100644
index 0000000000..5f8898b1a0
--- /dev/null
+++ b/src/grp-machine/nss-mymachines/Makefile
@@ -0,0 +1,45 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+libnss_mymachines_la_SOURCES = \
+ src/nss-mymachines/nss-mymachines.sym \
+ src/nss-mymachines/nss-mymachines.c
+
+libnss_mymachines_la_LDFLAGS = \
+ -module \
+ -export-dynamic \
+ -avoid-version \
+ -shared \
+ -shrext .so.2 \
+ -Wl,--version-script=$(srcdir)/nss-mymachines.sym
+
+libnss_mymachines_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la
+
+rootlib_LTLIBRARIES += \
+ libnss_mymachines.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/nss-mymachines/nss-mymachines.c b/src/grp-machine/nss-mymachines/nss-mymachines.c
index 895f61c462..18de097746 100644
--- a/src/nss-mymachines/nss-mymachines.c
+++ b/src/grp-machine/nss-mymachines/nss-mymachines.c
@@ -20,20 +20,20 @@
#include <netdb.h>
#include <nss.h>
-#include "sd-bus.h"
-#include "sd-login.h"
-
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "env-util.h"
-#include "hostname-util.h"
-#include "in-addr-util.h"
-#include "macro.h"
-#include "nss-util.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-login.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/nss-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
NSS_GETHOSTBYNAME_PROTOTYPES(mymachines);
NSS_GETPW_PROTOTYPES(mymachines);
diff --git a/src/nss-mymachines/nss-mymachines.sym b/src/grp-machine/nss-mymachines/nss-mymachines.sym
index 0728ac3ba7..0728ac3ba7 100644
--- a/src/nss-mymachines/nss-mymachines.sym
+++ b/src/grp-machine/nss-mymachines/nss-mymachines.sym
diff --git a/man/nss-mymachines.xml b/src/grp-machine/nss-mymachines/nss-mymachines.xml
index 00bcc53ec0..00bcc53ec0 100644
--- a/man/nss-mymachines.xml
+++ b/src/grp-machine/nss-mymachines/nss-mymachines.xml
diff --git a/src/machine/.gitignore b/src/grp-machine/systemd-machined/.gitignore
index e1065b5894..e1065b5894 100644
--- a/src/machine/.gitignore
+++ b/src/grp-machine/systemd-machined/.gitignore
diff --git a/src/grp-machine/systemd-machined/GNUmakefile b/src/grp-machine/systemd-machined/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-machine/systemd-machined/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-machine/systemd-machined/Makefile b/src/grp-machine/systemd-machined/Makefile
new file mode 100644
index 0000000000..432a792a18
--- /dev/null
+++ b/src/grp-machine/systemd-machined/Makefile
@@ -0,0 +1,75 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemd_machined_SOURCES = \
+ src/machine/machined.c \
+ src/machine/machined.h
+
+systemd_machined_LDADD = \
+ libmachine-core.la
+
+rootlibexec_PROGRAMS += \
+ systemd-machined
+
+nodist_systemunit_DATA += \
+ units/systemd-machined.service
+
+dist_systemunit_DATA += \
+ units/machine.slice
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.machine1.busname
+
+dist_dbussystemservice_DATA += \
+ src/machine/org.freedesktop.machine1.service
+
+dist_dbuspolicy_DATA += \
+ src/machine/org.freedesktop.machine1.conf
+
+polkitpolicy_files += \
+ src/machine/org.freedesktop.machine1.policy
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-machined.service dbus-org.freedesktop.machine1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.machine1.busname
+
+polkitpolicy_in_files += \
+ src/machine/org.freedesktop.machine1.policy.in
+
+EXTRA_DIST += \
+ units/systemd-machined.service.in
+
+# ------------------------------------------------------------------------------
+ifneq ($(ENABLE_IMPORTD),)
+
+ifneq ($(HAVE_LIBCURL),)
+ifneq ($(HAVE_XZ),)
+ifneq ($(HAVE_ZLIB),)
+ifneq ($(HAVE_BZIP2),)
+ifneq ($(HAVE_GCRYPT),)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/machine.slice b/src/grp-machine/systemd-machined/machine.slice
index 3d40dfd73b..3d40dfd73b 100644
--- a/units/machine.slice
+++ b/src/grp-machine/systemd-machined/machine.slice
diff --git a/src/machine/machined.c b/src/grp-machine/systemd-machined/machined.c
index 57121945f3..d6ce7e0c26 100644
--- a/src/machine/machined.c
+++ b/src/grp-machine/systemd-machined/machined.c
@@ -21,20 +21,20 @@
#include <string.h>
#include <unistd.h>
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "hostname-util.h"
-#include "label.h"
-#include "machine-image.h"
-#include "machined.h"
-#include "signal-util.h"
+#include <systemd/sd-daemon.h>
+
+#include "machine-core/machined.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-shared/machine-image.h"
Manager *manager_new(void) {
Manager *m;
diff --git a/src/machine/org.freedesktop.machine1.conf b/src/grp-machine/systemd-machined/org.freedesktop.machine1.conf
index 562b9d3cc0..562b9d3cc0 100644
--- a/src/machine/org.freedesktop.machine1.conf
+++ b/src/grp-machine/systemd-machined/org.freedesktop.machine1.conf
diff --git a/src/machine/org.freedesktop.machine1.policy.in b/src/grp-machine/systemd-machined/org.freedesktop.machine1.policy.in
index 69f78a5c25..69f78a5c25 100644
--- a/src/machine/org.freedesktop.machine1.policy.in
+++ b/src/grp-machine/systemd-machined/org.freedesktop.machine1.policy.in
diff --git a/src/machine/org.freedesktop.machine1.service b/src/grp-machine/systemd-machined/org.freedesktop.machine1.service
index d3dc99852b..d3dc99852b 100644
--- a/src/machine/org.freedesktop.machine1.service
+++ b/src/grp-machine/systemd-machined/org.freedesktop.machine1.service
diff --git a/units/systemd-machined.service.in b/src/grp-machine/systemd-machined/systemd-machined.service.in
index 911ead79ee..911ead79ee 100644
--- a/units/systemd-machined.service.in
+++ b/src/grp-machine/systemd-machined/systemd-machined.service.in
diff --git a/man/systemd-machined.service.xml b/src/grp-machine/systemd-machined/systemd-machined.service.xml
index 999aeee1c6..999aeee1c6 100644
--- a/man/systemd-machined.service.xml
+++ b/src/grp-machine/systemd-machined/systemd-machined.service.xml
diff --git a/system-preset/90-networkd.preset b/src/grp-network/90-networkd.preset
index 609edafe23..609edafe23 100644
--- a/system-preset/90-networkd.preset
+++ b/src/grp-network/90-networkd.preset
diff --git a/src/grp-network/GNUmakefile b/src/grp-network/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-network/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-network/Makefile b/src/grp-network/Makefile
new file mode 100644
index 0000000000..504395e39d
--- /dev/null
+++ b/src/grp-network/Makefile
@@ -0,0 +1,85 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+dist_network_DATA = \
+ network/99-default.link \
+ network/80-container-host0.network \
+ network/80-container-ve.network \
+ network/80-container-vz.network
+
+ifneq ($(ENABLE_NETWORKD),)
+test_networkd_conf_SOURCES = \
+ src/network/test-networkd-conf.c
+
+test_networkd_conf_LDADD = \
+ libnetworkd-core.la
+
+test_network_SOURCES = \
+ src/network/test-network.c
+
+test_network_LDADD = \
+ libnetworkd-core.la
+
+ifneq ($(HAVE_LIBIPTC),)
+test_network_LDADD += \
+ libsystemd-firewall.la
+endif # HAVE_LIBIPTC
+
+test_network_tables_SOURCES = \
+ src/network/test-network-tables.c \
+ src/shared/test-tables.h
+
+test_network_tables_LDADD = \
+ libnetworkd-core.la \
+ libudev-core.la
+
+ifneq ($(HAVE_LIBIPTC),)
+test_network_tables_LDADD += \
+ libsystemd-firewall.la
+endif # HAVE_LIBIPTC
+
+tests += \
+ test-networkd-conf \
+ test-network \
+ test-network-tables
+
+endif # ENABLE_NETWORKD
+
+gperf_gperf_sources += \
+ src/network/networkd-gperf.gperf \
+ src/network/networkd-network-gperf.gperf \
+ src/network/networkd-netdev-gperf.gperf
+
+EXTRA_DIST += \
+ units/systemd-networkd.service.m4.in \
+ units/systemd-networkd-wait-online.service.in \
+ test/networkd-test.py
+
+nested.subdirs += libnetworkd-core
+nested.subdirs += networkctl
+nested.subdirs += systemd-networkd
+nested.subdirs += systemd-networkd-wait-online
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/network/.gitignore b/src/grp-network/libnetworkd-core/.gitignore
index aca55206b7..aca55206b7 100644
--- a/src/network/.gitignore
+++ b/src/grp-network/libnetworkd-core/.gitignore
diff --git a/src/grp-network/libnetworkd-core/GNUmakefile b/src/grp-network/libnetworkd-core/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-network/libnetworkd-core/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-network/libnetworkd-core/Makefile b/src/grp-network/libnetworkd-core/Makefile
new file mode 100644
index 0000000000..5b4501f9ef
--- /dev/null
+++ b/src/grp-network/libnetworkd-core/Makefile
@@ -0,0 +1,99 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+noinst_LTLIBRARIES += \
+ libnetworkd-core.la
+
+libnetworkd_core_la_CFLAGS = \
+
+libnetworkd_core_la_SOURCES = \
+ src/libsystemd-network/network-internal.h \
+ src/network/networkd.h \
+ src/network/networkd-conf.h \
+ src/network/networkd-conf.c \
+ src/network/networkd-link.h \
+ src/network/networkd-link.c \
+ src/network/networkd-netdev.h \
+ src/network/networkd-netdev.c \
+ src/network/networkd-netdev-vrf.h \
+ src/network/networkd-netdev-vrf.c \
+ src/network/networkd-netdev-tunnel.h \
+ src/network/networkd-netdev-tunnel.c \
+ src/network/networkd-netdev-veth.h \
+ src/network/networkd-netdev-veth.c \
+ src/network/networkd-netdev-vxlan.h \
+ src/network/networkd-netdev-vxlan.c \
+ src/network/networkd-netdev-vlan.h \
+ src/network/networkd-netdev-vlan.c \
+ src/network/networkd-netdev-macvlan.h \
+ src/network/networkd-netdev-macvlan.c \
+ src/network/networkd-netdev-ipvlan.h \
+ src/network/networkd-netdev-ipvlan.c \
+ src/network/networkd-netdev-dummy.h \
+ src/network/networkd-netdev-dummy.c \
+ src/network/networkd-netdev-tuntap.h \
+ src/network/networkd-netdev-tuntap.c \
+ src/network/networkd-netdev-bond.h \
+ src/network/networkd-netdev-bond.c \
+ src/network/networkd-netdev-bridge.h \
+ src/network/networkd-netdev-bridge.c \
+ src/network/networkd-netdev-vcan.h \
+ src/network/networkd-netdev-vcan.c \
+ src/network/networkd-link-bus.c \
+ src/network/networkd-ipv4ll.c \
+ src/network/networkd-dhcp4.c \
+ src/network/networkd-dhcp6.c \
+ src/network/networkd-ndisc.h \
+ src/network/networkd-ndisc.c \
+ src/network/networkd-network.h \
+ src/network/networkd-network.c \
+ src/network/networkd-network-bus.c \
+ src/network/networkd-address.h \
+ src/network/networkd-address.c \
+ src/network/networkd-route.h \
+ src/network/networkd-route.c \
+ src/network/networkd-manager.c \
+ src/network/networkd-manager-bus.c \
+ src/network/networkd-fdb.h \
+ src/network/networkd-fdb.c \
+ src/network/networkd-brvlan.h \
+ src/network/networkd-brvlan.c \
+ src/network/networkd-address-pool.h \
+ src/network/networkd-address-pool.c \
+ src/network/networkd-util.h \
+ src/network/networkd-util.c \
+ src/network/networkd-lldp-tx.h \
+ src/network/networkd-lldp-tx.c
+
+nodist_libnetworkd_core_la_SOURCES = \
+ src/network/networkd-gperf.c \
+ src/network/networkd-network-gperf.c \
+ src/network/networkd-netdev-gperf.c
+
+libnetworkd_core_la_LIBADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/network/networkd-address-pool.c b/src/grp-network/libnetworkd-core/networkd-address-pool.c
index ebc6c9eb9e..fa71df4bd5 100644
--- a/src/network/networkd-address-pool.c
+++ b/src/grp-network/libnetworkd-core/networkd-address-pool.c
@@ -17,11 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+
#include "networkd-address-pool.h"
#include "networkd.h"
-#include "set.h"
-#include "string-util.h"
int address_pool_new(
Manager *m,
diff --git a/src/network/networkd-address-pool.h b/src/grp-network/libnetworkd-core/networkd-address-pool.h
index af30decfe0..102608fa37 100644
--- a/src/network/networkd-address-pool.h
+++ b/src/grp-network/libnetworkd-core/networkd-address-pool.h
@@ -19,11 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct AddressPool AddressPool;
-
-#include "in-addr-util.h"
-#include "list.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/list.h"
+typedef struct AddressPool AddressPool;
typedef struct Manager Manager;
struct AddressPool {
diff --git a/src/network/networkd-address.c b/src/grp-network/libnetworkd-core/networkd-address.c
index ed52d5e42d..e91744f3e0 100644
--- a/src/network/networkd-address.c
+++ b/src/grp-network/libnetworkd-core/networkd-address.c
@@ -19,18 +19,19 @@
#include <net/if.h>
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "firewall-util.h"
-#include "netlink-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-firewall/firewall-util.h"
+#include "systemd-shared/conf-parser.h"
+
#include "networkd-address.h"
#include "networkd.h"
-#include "parse-util.h"
-#include "set.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "utf8.h"
-#include "util.h"
#define ADDRESSES_PER_LINK_MAX 2048U
#define STATIC_ADDRESSES_PER_NETWORK_MAX 1024U
diff --git a/src/network/networkd-address.h b/src/grp-network/libnetworkd-core/networkd-address.h
index bc3b4fc7f3..25d2975e89 100644
--- a/src/network/networkd-address.h
+++ b/src/grp-network/libnetworkd-core/networkd-address.h
@@ -22,7 +22,7 @@
#include <inttypes.h>
#include <stdbool.h>
-#include "in-addr-util.h"
+#include "systemd-basic/in-addr-util.h"
typedef struct Address Address;
diff --git a/src/network/networkd-brvlan.c b/src/grp-network/libnetworkd-core/networkd-brvlan.c
index 18ecd86858..de27f8dda3 100644
--- a/src/network/networkd-brvlan.c
+++ b/src/grp-network/libnetworkd-core/networkd-brvlan.c
@@ -18,16 +18,18 @@
***/
#include <netinet/in.h>
-#include <linux/if_bridge.h>
#include <stdbool.h>
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "netlink-util.h"
+#include <linux/if_bridge.h>
+
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/vlan-util.h"
+
#include "networkd-brvlan.h"
#include "networkd.h"
-#include "parse-util.h"
-#include "vlan-util.h"
static bool is_bit_set(unsigned bit, uint32_t scope) {
assert(bit < sizeof(scope)*8);
diff --git a/src/network/networkd-brvlan.h b/src/grp-network/libnetworkd-core/networkd-brvlan.h
index b37633f94f..b37633f94f 100644
--- a/src/network/networkd-brvlan.h
+++ b/src/grp-network/libnetworkd-core/networkd-brvlan.h
diff --git a/src/network/networkd-conf.c b/src/grp-network/libnetworkd-core/networkd-conf.c
index 49bb8c18f6..6d8ce04f62 100644
--- a/src/network/networkd-conf.c
+++ b/src/grp-network/libnetworkd-core/networkd-conf.c
@@ -19,12 +19,13 @@
#include <ctype.h>
-#include "conf-parser.h"
-#include "def.h"
-#include "dhcp-identifier.h"
-#include "hexdecoct.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-shared/conf-parser.h"
+
#include "networkd-conf.h"
-#include "string-table.h"
int manager_parse_config_file(Manager *m) {
assert(m);
diff --git a/src/network/networkd-conf.h b/src/grp-network/libnetworkd-core/networkd-conf.h
index 00ddb7672a..00ddb7672a 100644
--- a/src/network/networkd-conf.h
+++ b/src/grp-network/libnetworkd-core/networkd-conf.h
diff --git a/src/network/networkd-dhcp4.c b/src/grp-network/libnetworkd-core/networkd-dhcp4.c
index 76d3d132ea..34b423f0b5 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/grp-network/libnetworkd-core/networkd-dhcp4.c
@@ -18,12 +18,14 @@
***/
#include <netinet/ether.h>
+
#include <linux/if.h>
-#include "alloc-util.h"
-#include "dhcp-lease-internal.h"
-#include "hostname-util.h"
-#include "network-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/network-internal.h"
+
#include "networkd.h"
static int dhcp4_route_handler(sd_netlink *rtnl, sd_netlink_message *m,
diff --git a/src/network/networkd-dhcp6.c b/src/grp-network/libnetworkd-core/networkd-dhcp6.c
index 15acf56a5f..d00190c520 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/grp-network/libnetworkd-core/networkd-dhcp6.c
@@ -18,11 +18,12 @@
***/
#include <netinet/ether.h>
+
#include <linux/if.h>
-#include "sd-dhcp6-client.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-network/sd-dhcp6-client.h"
-#include "network-internal.h"
#include "networkd.h"
static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link);
diff --git a/src/network/networkd-fdb.c b/src/grp-network/libnetworkd-core/networkd-fdb.c
index ed5a47589e..07a7a7c7e9 100644
--- a/src/network/networkd-fdb.c
+++ b/src/grp-network/libnetworkd-core/networkd-fdb.c
@@ -20,13 +20,14 @@
#include <net/ethernet.h>
#include <net/if.h>
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "netlink-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/vlan-util.h"
+
#include "networkd-fdb.h"
#include "networkd.h"
-#include "util.h"
-#include "vlan-util.h"
#define STATIC_FDB_ENTRIES_PER_NETWORK_MAX 1024U
diff --git a/src/network/networkd-fdb.h b/src/grp-network/libnetworkd-core/networkd-fdb.h
index 2d7d28735c..b798f36979 100644
--- a/src/network/networkd-fdb.h
+++ b/src/grp-network/libnetworkd-core/networkd-fdb.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "list.h"
-#include "macro.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/macro.h"
typedef struct Network Network;
typedef struct FdbEntry FdbEntry;
diff --git a/src/network/networkd-gperf.gperf b/src/grp-network/libnetworkd-core/networkd-gperf.gperf
index 3fdfe74955..836063d371 100644
--- a/src/network/networkd-gperf.gperf
+++ b/src/grp-network/libnetworkd-core/networkd-gperf.gperf
@@ -1,6 +1,8 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
+
+#include "systemd-shared/conf-parser.h"
+
#include "networkd-conf.h"
%}
struct ConfigPerfItem;
diff --git a/src/network/networkd-ipv4ll.c b/src/grp-network/libnetworkd-core/networkd-ipv4ll.c
index 2d81311e81..5c6ffe30a7 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/grp-network/libnetworkd-core/networkd-ipv4ll.c
@@ -18,9 +18,11 @@
***/
#include <netinet/ether.h>
+
#include <linux/if.h>
-#include "network-internal.h"
+#include "systemd-network/network-internal.h"
+
#include "networkd.h"
static int ipv4ll_address_lost(Link *link) {
diff --git a/src/network/networkd-link-bus.c b/src/grp-network/libnetworkd-core/networkd-link-bus.c
index 532557ed6c..e690cfa8f4 100644
--- a/src/network/networkd-link-bus.c
+++ b/src/grp-network/libnetworkd-core/networkd-link-bus.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-util.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/strv.h"
+
#include "networkd-link.h"
#include "networkd.h"
-#include "parse-util.h"
-#include "strv.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_administrative_state, link_state, LinkState);
diff --git a/src/network/networkd-link.c b/src/grp-network/libnetworkd-core/networkd-link.c
index aefe7335b9..04b836c143 100644
--- a/src/network/networkd-link.c
+++ b/src/grp-network/libnetworkd-core/networkd-link.c
@@ -18,26 +18,28 @@
***/
#include <netinet/ether.h>
-#include <linux/if.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "dhcp-lease-internal.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "netlink-util.h"
-#include "network-internal.h"
+#include <linux/if.h>
+
+#include "sd-bus/bus-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/udev-util.h"
+
#include "networkd-lldp-tx.h"
#include "networkd-ndisc.h"
#include "networkd.h"
-#include "set.h"
-#include "socket-util.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "udev-util.h"
-#include "util.h"
-#include "virt.h"
static bool link_dhcp6_enabled(Link *link) {
assert(link);
diff --git a/src/network/networkd-link.h b/src/grp-network/libnetworkd-core/networkd-link.h
index 77f72d070e..64482e9914 100644
--- a/src/network/networkd-link.h
+++ b/src/grp-network/libnetworkd-core/networkd-link.h
@@ -21,17 +21,17 @@
#include <endian.h>
-#include "sd-bus.h"
-#include "sd-dhcp-client.h"
-#include "sd-dhcp-server.h"
-#include "sd-dhcp6-client.h"
-#include "sd-ipv4ll.h"
-#include "sd-lldp.h"
-#include "sd-ndisc.h"
-#include "sd-netlink.h"
-
-#include "list.h"
-#include "set.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/list.h"
+#include "systemd-basic/set.h"
+#include "systemd-network/sd-dhcp-client.h"
+#include "systemd-network/sd-dhcp-server.h"
+#include "systemd-network/sd-dhcp6-client.h"
+#include "systemd-network/sd-ipv4ll.h"
+#include "systemd-network/sd-lldp.h"
+#include "systemd-network/sd-ndisc.h"
+#include "systemd-staging/sd-netlink.h"
typedef enum LinkState {
LINK_STATE_PENDING,
diff --git a/src/network/networkd-lldp-tx.c b/src/grp-network/libnetworkd-core/networkd-lldp-tx.c
index 3aa768388b..abefb5cb9d 100644
--- a/src/network/networkd-lldp-tx.c
+++ b/src/grp-network/libnetworkd-core/networkd-lldp-tx.c
@@ -21,17 +21,18 @@
#include <inttypes.h>
#include <string.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hostname-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unaligned.h"
+
#include "networkd-lldp-tx.h"
#include "networkd.h"
-#include "parse-util.h"
-#include "random-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "unaligned.h"
/* The LLDP spec calls this "txFastInit", see 9.2.5.19 */
#define LLDP_TX_FAST_INIT 4U
diff --git a/src/network/networkd-lldp-tx.h b/src/grp-network/libnetworkd-core/networkd-lldp-tx.h
index 4680c9d950..4680c9d950 100644
--- a/src/network/networkd-lldp-tx.h
+++ b/src/grp-network/libnetworkd-core/networkd-lldp-tx.h
diff --git a/src/network/networkd-manager-bus.c b/src/grp-network/libnetworkd-core/networkd-manager-bus.c
index 0c429b9471..735bf75510 100644
--- a/src/network/networkd-manager-bus.c
+++ b/src/grp-network/libnetworkd-core/networkd-manager-bus.c
@@ -17,8 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-util.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+
#include "networkd.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState);
diff --git a/src/network/networkd-manager.c b/src/grp-network/libnetworkd-core/networkd-manager.c
index 9174dcc7f4..d7d149ebb5 100644
--- a/src/network/networkd-manager.c
+++ b/src/grp-network/libnetworkd-core/networkd-manager.c
@@ -18,27 +18,29 @@
***/
#include <sys/socket.h>
+
#include <linux/if.h>
-#include "sd-daemon.h"
-#include "sd-netlink.h"
+#include <systemd/sd-daemon.h>
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "conf-parser.h"
-#include "def.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "fileio.h"
#include "libudev-private.h"
-#include "local-addresses.h"
-#include "netlink-util.h"
+#include "sd-bus/bus-util.h"
+#include "sd-netlink/local-addresses.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/ordered-set.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/dns-domain.h"
+#include "systemd-shared/udev-util.h"
+#include "systemd-staging/sd-netlink.h"
+
#include "networkd.h"
-#include "ordered-set.h"
-#include "path-util.h"
-#include "set.h"
-#include "udev-util.h"
-#include "virt.h"
/* use 8 MB for receive socket kernel queue. */
#define RCVBUF_SIZE (8*1024*1024)
diff --git a/src/network/networkd-ndisc.c b/src/grp-network/libnetworkd-core/networkd-ndisc.c
index 4853791aa5..410491f237 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/grp-network/libnetworkd-core/networkd-ndisc.c
@@ -19,10 +19,10 @@
#include <netinet/icmp6.h>
-#include "sd-ndisc.h"
+#include "systemd-network/sd-ndisc.h"
-#include "networkd.h"
#include "networkd-ndisc.h"
+#include "networkd.h"
#define NDISC_DNSSL_MAX 64U
#define NDISC_RDNSS_MAX 64U
diff --git a/src/network/networkd-ndisc.h b/src/grp-network/libnetworkd-core/networkd-ndisc.h
index 127126190e..127126190e 100644
--- a/src/network/networkd-ndisc.h
+++ b/src/grp-network/libnetworkd-core/networkd-ndisc.h
diff --git a/src/network/networkd-netdev-bond.c b/src/grp-network/libnetworkd-core/networkd-netdev-bond.c
index 46d1669337..02226924c1 100644
--- a/src/network/networkd-netdev-bond.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-bond.c
@@ -19,17 +19,18 @@
***/
#include <netinet/ether.h>
+
#include <linux/if_bonding.h>
-#include "sd-netlink.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-staging/sd-netlink.h"
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "extract-word.h"
-#include "missing.h"
#include "networkd-netdev-bond.h"
-#include "string-table.h"
-#include "string-util.h"
/*
* Number of seconds between instances where the bonding
diff --git a/src/network/networkd-netdev-bond.h b/src/grp-network/libnetworkd-core/networkd-netdev-bond.h
index b941edb344..f7f262ef60 100644
--- a/src/network/networkd-netdev-bond.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-bond.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "in-addr-util.h"
-#include "list.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/list.h"
#include "networkd-netdev.h"
diff --git a/src/network/networkd-netdev-bridge.c b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c
index 002ad94210..84e582544f 100644
--- a/src/network/networkd-netdev-bridge.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c
@@ -20,10 +20,11 @@
#include <net/if.h>
-#include "missing.h"
-#include "netlink-util.h"
-#include "networkd.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/missing.h"
+
#include "networkd-netdev-bridge.h"
+#include "networkd.h"
/* callback for brige netdev's parameter set */
static int netdev_bridge_set_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) {
diff --git a/src/network/networkd-netdev-bridge.h b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.h
index 53f72f1ea5..53f72f1ea5 100644
--- a/src/network/networkd-netdev-bridge.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.h
diff --git a/src/network/networkd-netdev-dummy.c b/src/grp-network/libnetworkd-core/networkd-netdev-dummy.c
index 6617a86c20..6617a86c20 100644
--- a/src/network/networkd-netdev-dummy.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-dummy.c
diff --git a/src/network/networkd-netdev-dummy.h b/src/grp-network/libnetworkd-core/networkd-netdev-dummy.h
index efe302267e..efe302267e 100644
--- a/src/network/networkd-netdev-dummy.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-dummy.h
diff --git a/src/network/networkd-netdev-gperf.gperf b/src/grp-network/libnetworkd-core/networkd-netdev-gperf.gperf
index 323eaa8032..03f25ab564 100644
--- a/src/network/networkd-netdev-gperf.gperf
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-gperf.gperf
@@ -1,7 +1,10 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
-#include "network-internal.h"
+
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/vlan-util.h"
+
#include "networkd-netdev-bond.h"
#include "networkd-netdev-bridge.h"
#include "networkd-netdev-ipvlan.h"
@@ -10,10 +13,9 @@
#include "networkd-netdev-tuntap.h"
#include "networkd-netdev-veth.h"
#include "networkd-netdev-vlan.h"
-#include "networkd-netdev-vxlan.h"
#include "networkd-netdev-vrf.h"
+#include "networkd-netdev-vxlan.h"
#include "networkd-netdev.h"
-#include "vlan-util.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/network/networkd-netdev-ipvlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c
index af4177e43a..2c91316029 100644
--- a/src/network/networkd-netdev-ipvlan.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c
@@ -19,9 +19,10 @@
#include <net/if.h>
-#include "conf-parser.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-shared/conf-parser.h"
+
#include "networkd-netdev-ipvlan.h"
-#include "string-table.h"
static const char* const ipvlan_mode_table[_NETDEV_IPVLAN_MODE_MAX] = {
[NETDEV_IPVLAN_MODE_L2] = "L2",
diff --git a/src/network/networkd-netdev-ipvlan.h b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h
index 10d4079844..f9d103126b 100644
--- a/src/network/networkd-netdev-ipvlan.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h
@@ -19,7 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "missing.h"
+#include "systemd-basic/missing.h"
+
#include "networkd-netdev.h"
typedef enum IPVlanMode {
diff --git a/src/network/networkd-netdev-macvlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c
index 48e98aa51b..1b1ccbc772 100644
--- a/src/network/networkd-netdev-macvlan.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c
@@ -19,9 +19,10 @@
#include <net/if.h>
-#include "conf-parser.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-shared/conf-parser.h"
+
#include "networkd-netdev-macvlan.h"
-#include "string-table.h"
static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = {
[NETDEV_MACVLAN_MODE_PRIVATE] = "private",
diff --git a/src/network/networkd-netdev-macvlan.h b/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.h
index 3663f4f051..3663f4f051 100644
--- a/src/network/networkd-netdev-macvlan.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.h
diff --git a/src/network/networkd-netdev-tunnel.c b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c
index 9138ee4511..30a5293639 100644
--- a/src/network/networkd-netdev-tunnel.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c
@@ -19,20 +19,21 @@
#include <arpa/inet.h>
#include <net/if.h>
+
#include <linux/ip.h>
#include <linux/if_tunnel.h>
#include <linux/ip6_tunnel.h>
-#include "sd-netlink.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-staging/sd-netlink.h"
-#include "conf-parser.h"
-#include "missing.h"
#include "networkd-link.h"
#include "networkd-netdev-tunnel.h"
-#include "parse-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "util.h"
#define DEFAULT_TNL_HOP_LIMIT 64
#define IP6_FLOWINFO_FLOWLABEL htobe32(0x000FFFFF)
diff --git a/src/network/networkd-netdev-tunnel.h b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.h
index 32a46bd82f..bc2a9f7881 100644
--- a/src/network/networkd-netdev-tunnel.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "in-addr-util.h"
+#include "systemd-basic/in-addr-util.h"
#include "networkd-netdev.h"
diff --git a/src/network/networkd-netdev-tuntap.c b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c
index 088a4d8d32..0660dfc1d6 100644
--- a/src/network/networkd-netdev-tuntap.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c
@@ -18,17 +18,19 @@
***/
#include <fcntl.h>
-#include <linux/if_tun.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include "alloc-util.h"
-#include "fd-util.h"
+#include <linux/if_tun.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/user-util.h"
+
#include "networkd-netdev-tuntap.h"
-#include "user-util.h"
#define TUN_DEV "/dev/net/tun"
diff --git a/src/network/networkd-netdev-tuntap.h b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.h
index 120f00a353..120f00a353 100644
--- a/src/network/networkd-netdev-tuntap.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.h
diff --git a/src/network/networkd-netdev-vcan.c b/src/grp-network/libnetworkd-core/networkd-netdev-vcan.c
index bfce6e1962..bfce6e1962 100644
--- a/src/network/networkd-netdev-vcan.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vcan.c
diff --git a/src/network/networkd-netdev-vcan.h b/src/grp-network/libnetworkd-core/networkd-netdev-vcan.h
index 6ba47fd70e..99a03b9159 100644
--- a/src/network/networkd-netdev-vcan.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vcan.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct VCan VCan;
-
#include <linux/can/netlink.h>
+typedef struct VCan VCan;
+
#include "networkd-netdev.h"
struct VCan {
diff --git a/src/network/networkd-netdev-veth.c b/src/grp-network/libnetworkd-core/networkd-netdev-veth.c
index b122a06c25..171fe4012a 100644
--- a/src/network/networkd-netdev-veth.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-veth.c
@@ -18,9 +18,10 @@
***/
#include <net/if.h>
+
#include <linux/veth.h>
-#include "sd-netlink.h"
+#include "systemd-staging/sd-netlink.h"
#include "networkd-netdev-veth.h"
diff --git a/src/network/networkd-netdev-veth.h b/src/grp-network/libnetworkd-core/networkd-netdev-veth.h
index e69bfbc8f0..e69bfbc8f0 100644
--- a/src/network/networkd-netdev-veth.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-veth.h
diff --git a/src/network/networkd-netdev-vlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-vlan.c
index 3cc072388f..a819edc380 100644
--- a/src/network/networkd-netdev-vlan.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vlan.c
@@ -19,8 +19,9 @@
#include <net/if.h>
+#include "systemd-shared/vlan-util.h"
+
#include "networkd-netdev-vlan.h"
-#include "vlan-util.h"
static int netdev_vlan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *req) {
VLan *v;
diff --git a/src/network/networkd-netdev-vlan.h b/src/grp-network/libnetworkd-core/networkd-netdev-vlan.h
index 2dfe314b6e..2dfe314b6e 100644
--- a/src/network/networkd-netdev-vlan.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vlan.h
diff --git a/src/network/networkd-netdev-vrf.c b/src/grp-network/libnetworkd-core/networkd-netdev-vrf.c
index 89bd142e8c..c9b281d185 100644
--- a/src/network/networkd-netdev-vrf.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vrf.c
@@ -19,8 +19,9 @@
#include <net/if.h>
-#include "sd-netlink.h"
-#include "missing.h"
+#include "systemd-basic/missing.h"
+#include "systemd-staging/sd-netlink.h"
+
#include "networkd-netdev-vrf.h"
static int netdev_vrf_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
diff --git a/src/network/networkd-netdev-vrf.h b/src/grp-network/libnetworkd-core/networkd-netdev-vrf.h
index 3d92a26a4d..3d92a26a4d 100644
--- a/src/network/networkd-netdev-vrf.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vrf.h
diff --git a/src/network/networkd-netdev-vxlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c
index 706e52b698..12f88ef650 100644
--- a/src/network/networkd-netdev-vxlan.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c
@@ -19,13 +19,12 @@
#include <net/if.h>
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
-#include "alloc-util.h"
-#include "extract-word.h"
-#include "parse-util.h"
-#include "missing.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-staging/sd-netlink.h"
#include "networkd-link.h"
#include "networkd-netdev-vxlan.h"
diff --git a/src/network/networkd-netdev-vxlan.h b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h
index 3906820afb..1cf42c14cf 100644
--- a/src/network/networkd-netdev-vxlan.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/in-addr-util.h"
+
typedef struct VxLan VxLan;
-#include "in-addr-util.h"
#include "networkd-netdev.h"
#define VXLAN_VID_MAX (1u << 24) - 1
diff --git a/src/network/networkd-netdev.c b/src/grp-network/libnetworkd-core/networkd-netdev.c
index a210ba1242..52107b5177 100644
--- a/src/network/networkd-netdev.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev.c
@@ -19,19 +19,20 @@
#include <net/if.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "conf-parser.h"
-#include "fd-util.h"
-#include "list.h"
-#include "netlink-util.h"
-#include "network-internal.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/conf-parser.h"
+
#include "networkd-netdev.h"
#include "networkd.h"
-#include "siphash24.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
[NETDEV_KIND_BRIDGE] = &bridge_vtable,
diff --git a/src/network/networkd-netdev.h b/src/grp-network/libnetworkd-core/networkd-netdev.h
index 37c7431213..758af90d5f 100644
--- a/src/network/networkd-netdev.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev.h
@@ -19,10 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink.h"
-
-#include "list.h"
-#include "time-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-staging/sd-netlink.h"
typedef struct netdev_join_callback netdev_join_callback;
typedef struct Link Link;
diff --git a/src/network/networkd-network-bus.c b/src/grp-network/libnetworkd-core/networkd-network-bus.c
index 6e21676d23..e8eeb454d2 100644
--- a/src/network/networkd-network-bus.c
+++ b/src/grp-network/libnetworkd-core/networkd-network-bus.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+
#include "networkd.h"
-#include "string-util.h"
-#include "strv.h"
static int property_get_ether_addrs(
sd_bus *bus,
diff --git a/src/network/networkd-network-gperf.gperf b/src/grp-network/libnetworkd-core/networkd-network-gperf.gperf
index bcf8186c33..fcad688480 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/grp-network/libnetworkd-core/networkd-network-gperf.gperf
@@ -1,10 +1,12 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
-#include "networkd.h"
+
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/vlan-util.h"
+
#include "networkd-conf.h"
-#include "network-internal.h"
-#include "vlan-util.h"
+#include "networkd.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/network/networkd-network.c b/src/grp-network/libnetworkd-core/networkd-network.c
index 042232fcac..84409772ff 100644
--- a/src/network/networkd-network.c
+++ b/src/grp-network/libnetworkd-core/networkd-network.c
@@ -20,21 +20,22 @@
#include <ctype.h>
#include <net/if.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "conf-parser.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "hostname-util.h"
-#include "network-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/dns-domain.h"
+
#include "networkd-network.h"
#include "networkd.h"
-#include "parse-util.h"
-#include "set.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "util.h"
static int network_load_one(Manager *manager, const char *filename) {
_cleanup_network_free_ Network *network = NULL;
diff --git a/src/network/networkd-network.h b/src/grp-network/libnetworkd-core/networkd-network.h
index 09c3b3a3ae..e12279fa3a 100644
--- a/src/network/networkd-network.h
+++ b/src/grp-network/libnetworkd-core/networkd-network.h
@@ -19,13 +19,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
-#include "udev.h"
+#include <systemd/sd-bus.h>
-#include "condition.h"
-#include "dhcp-identifier.h"
-#include "hashmap.h"
-#include "resolve-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-shared/condition.h"
+#include "systemd-shared/resolve-util.h"
+#include "udev.h"
#include "networkd-address.h"
#include "networkd-brvlan.h"
diff --git a/src/network/networkd-route.c b/src/grp-network/libnetworkd-core/networkd-route.c
index 6f60ee5e31..fdff340369 100644
--- a/src/network/networkd-route.c
+++ b/src/grp-network/libnetworkd-core/networkd-route.c
@@ -17,17 +17,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "in-addr-util.h"
-#include "netlink-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/sysctl-util.h"
+
#include "networkd-route.h"
#include "networkd.h"
-#include "parse-util.h"
-#include "set.h"
-#include "string-util.h"
-#include "sysctl-util.h"
-#include "util.h"
#define ROUTES_DEFAULT_MAX_PER_FAMILY 4096U
diff --git a/src/network/networkd-route.h b/src/grp-network/libnetworkd-core/networkd-route.h
index d4e4dbac0b..d4e4dbac0b 100644
--- a/src/network/networkd-route.h
+++ b/src/grp-network/libnetworkd-core/networkd-route.h
diff --git a/src/network/networkd-util.c b/src/grp-network/libnetworkd-core/networkd-util.c
index 555a7c68a1..d0569215ab 100644
--- a/src/network/networkd-util.c
+++ b/src/grp-network/libnetworkd-core/networkd-util.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "conf-parser.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
+
#include "networkd-util.h"
-#include "parse-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "util.h"
const char *address_family_boolean_to_string(AddressFamilyBoolean b) {
if (b == ADDRESS_FAMILY_YES ||
diff --git a/src/network/networkd-util.h b/src/grp-network/libnetworkd-core/networkd-util.h
index d5c385bea4..49ac1b0dc5 100644
--- a/src/network/networkd-util.h
+++ b/src/grp-network/libnetworkd-core/networkd-util.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef enum AddressFamilyBoolean {
/* This is a bitmask, though it usually doesn't feel that way! */
diff --git a/src/network/networkd.h b/src/grp-network/libnetworkd-core/networkd.h
index cb1b73145e..4676758c81 100644
--- a/src/network/networkd.h
+++ b/src/grp-network/libnetworkd-core/networkd.h
@@ -21,14 +21,14 @@
#include <arpa/inet.h>
-#include "sd-bus.h"
-#include "sd-event.h"
-#include "sd-netlink.h"
-#include "udev.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
-#include "dhcp-identifier.h"
-#include "hashmap.h"
-#include "list.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-staging/sd-netlink.h"
+#include "udev.h"
#include "networkd-address-pool.h"
#include "networkd-link.h"
@@ -39,11 +39,11 @@
#include "networkd-netdev-macvlan.h"
#include "networkd-netdev-tunnel.h"
#include "networkd-netdev-tuntap.h"
+#include "networkd-netdev-vcan.h"
#include "networkd-netdev-veth.h"
#include "networkd-netdev-vlan.h"
#include "networkd-netdev-vrf.h"
#include "networkd-netdev-vxlan.h"
-#include "networkd-netdev-vcan.h"
#include "networkd-network.h"
#include "networkd-util.h"
diff --git a/network/80-container-host0.network b/src/grp-network/network/80-container-host0.network
index b012cf98cb..b012cf98cb 100644
--- a/network/80-container-host0.network
+++ b/src/grp-network/network/80-container-host0.network
diff --git a/network/80-container-ve.network b/src/grp-network/network/80-container-ve.network
index ac796bfb07..ac796bfb07 100644
--- a/network/80-container-ve.network
+++ b/src/grp-network/network/80-container-ve.network
diff --git a/network/80-container-vz.network b/src/grp-network/network/80-container-vz.network
index 3d532d6f60..3d532d6f60 100644
--- a/network/80-container-vz.network
+++ b/src/grp-network/network/80-container-vz.network
diff --git a/network/99-default.link b/src/grp-network/network/99-default.link
index 79538f9b29..79538f9b29 100644
--- a/network/99-default.link
+++ b/src/grp-network/network/99-default.link
diff --git a/src/grp-network/networkctl/GNUmakefile b/src/grp-network/networkctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-network/networkctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-network/networkctl/Makefile b/src/grp-network/networkctl/Makefile
new file mode 100644
index 0000000000..7b651c7f74
--- /dev/null
+++ b/src/grp-network/networkctl/Makefile
@@ -0,0 +1,39 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += \
+ networkctl
+
+networkctl_SOURCES = \
+ src/network/networkctl.c
+
+networkctl_LDADD = \
+ libsystemd-shared.la \
+ libsystemd-network.la
+
+dist_bashcompletion_data += \
+ shell-completion/bash/networkctl
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/network/networkctl.c b/src/grp-network/networkctl/networkctl.c
index 6f7f41bf7d..bc95b4fb24 100644
--- a/src/network/networkctl.c
+++ b/src/grp-network/networkctl/networkctl.c
@@ -21,33 +21,32 @@
#include <net/if.h>
#include <stdbool.h>
-#include "sd-device.h"
-#include "sd-hwdb.h"
-#include "sd-lldp.h"
-#include "sd-netlink.h"
-#include "sd-network.h"
-
-#include "alloc-util.h"
-#include "arphrd-list.h"
-#include "device-util.h"
-#include "ether-addr-util.h"
-#include "fd-util.h"
-#include "hwdb-util.h"
-#include "local-addresses.h"
-#include "locale-util.h"
-#include "netlink-util.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "socket-util.h"
-#include "sparse-endian.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "strxcpyx.h"
-#include "terminal-util.h"
-#include "util.h"
-#include "verbs.h"
+#include "sd-device/device-util.h"
+#include "sd-hwdb/hwdb-util.h"
+#include "sd-netlink/local-addresses.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/arphrd-list.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-network/sd-lldp.h"
+#include "systemd-shared/pager.h"
+#include "systemd-staging/sd-device.h"
+#include "systemd-staging/sd-hwdb.h"
+#include "systemd-staging/sd-netlink.h"
+#include "systemd-staging/sd-network.h"
static bool arg_no_pager = false;
static bool arg_legend = true;
diff --git a/shell-completion/bash/networkctl b/src/grp-network/networkctl/networkctl.completion.bash
index 942c7e1c00..942c7e1c00 100644
--- a/shell-completion/bash/networkctl
+++ b/src/grp-network/networkctl/networkctl.completion.bash
diff --git a/shell-completion/zsh/_networkctl b/src/grp-network/networkctl/networkctl.completion.zsh
index 61f173b78e..61f173b78e 100644
--- a/shell-completion/zsh/_networkctl
+++ b/src/grp-network/networkctl/networkctl.completion.zsh
diff --git a/man/networkctl.xml b/src/grp-network/networkctl/networkctl.xml
index 24e1de6986..24e1de6986 100644
--- a/man/networkctl.xml
+++ b/src/grp-network/networkctl/networkctl.xml
diff --git a/src/grp-network/systemd-networkd-wait-online/GNUmakefile b/src/grp-network/systemd-networkd-wait-online/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-network/systemd-networkd-wait-online/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-network/systemd-networkd-wait-online/Makefile b/src/grp-network/systemd-networkd-wait-online/Makefile
new file mode 100644
index 0000000000..421bb9a673
--- /dev/null
+++ b/src/grp-network/systemd-networkd-wait-online/Makefile
@@ -0,0 +1,43 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += \
+ systemd-networkd-wait-online
+
+systemd_networkd_wait_online_CFLAGS = \
+
+systemd_networkd_wait_online_SOURCES = \
+ src/libsystemd-network/network-internal.h \
+ src/network/networkd-wait-online.h \
+ src/network/networkd-wait-online-link.h \
+ src/network/networkd-wait-online.c \
+ src/network/networkd-wait-online-manager.c \
+ src/network/networkd-wait-online-link.c
+
+systemd_networkd_wait_online_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/network/networkd-wait-online-link.c b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.c
index e63ba07e90..f91ff37a7a 100644
--- a/src/network/networkd-wait-online-link.c
+++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.c
@@ -18,11 +18,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-network.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-staging/sd-network.h"
-#include "alloc-util.h"
#include "networkd-wait-online-link.h"
-#include "string-util.h"
int link_new(Manager *m, Link **ret, int ifindex, const char *ifname) {
_cleanup_(link_freep) Link *l = NULL;
diff --git a/src/network/networkd-wait-online-link.h b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.h
index dc35085c55..dc35085c55 100644
--- a/src/network/networkd-wait-online-link.h
+++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.h
diff --git a/src/network/networkd-wait-online-manager.c b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c
index 725b3310dd..7113479d91 100644
--- a/src/network/networkd-wait-online-manager.c
+++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c
@@ -17,17 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <fnmatch.h>
#include <netinet/ether.h>
+
#include <linux/if.h>
-#include <fnmatch.h>
-#include "alloc-util.h"
-#include "netlink-util.h"
-#include "network-internal.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/network-internal.h"
+
#include "networkd-wait-online-link.h"
#include "networkd-wait-online.h"
-#include "time-util.h"
-#include "util.h"
bool manager_ignore_link(Manager *m, Link *link) {
assert(m);
diff --git a/src/network/networkd-wait-online.c b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.c
index 3220c4b7ef..9b250102dc 100644
--- a/src/network/networkd-wait-online.c
+++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.c
@@ -20,11 +20,12 @@
#include <getopt.h>
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
#include "networkd-wait-online.h"
-#include "signal-util.h"
-#include "strv.h"
static bool arg_quiet = false;
static usec_t arg_timeout = 120 * USEC_PER_SEC;
diff --git a/src/network/networkd-wait-online.h b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.h
index f91995c306..e8c749b840 100644
--- a/src/network/networkd-wait-online.h
+++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
-#include "sd-netlink.h"
-#include "sd-network.h"
+#include <systemd/sd-event.h>
-#include "hashmap.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-staging/sd-netlink.h"
+#include "systemd-staging/sd-network.h"
typedef struct Manager Manager;
diff --git a/units/systemd-networkd-wait-online.service.in b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in
index a9bad7aa8f..a9bad7aa8f 100644
--- a/units/systemd-networkd-wait-online.service.in
+++ b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.in
diff --git a/man/systemd-networkd-wait-online.service.xml b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.xml
index e21c805342..e21c805342 100644
--- a/man/systemd-networkd-wait-online.service.xml
+++ b/src/grp-network/systemd-networkd-wait-online/systemd-networkd-wait-online.service.xml
diff --git a/src/grp-network/systemd-networkd/GNUmakefile b/src/grp-network/systemd-networkd/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-network/systemd-networkd/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-network/systemd-networkd/Makefile b/src/grp-network/systemd-networkd/Makefile
new file mode 100644
index 0000000000..118f627c16
--- /dev/null
+++ b/src/grp-network/systemd-networkd/Makefile
@@ -0,0 +1,67 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += \
+ systemd-networkd
+
+systemd_networkd_SOURCES = \
+ src/network/networkd.c
+
+systemd_networkd_LDADD = \
+ libnetworkd-core.la
+
+ifneq ($(HAVE_LIBIPTC),)
+systemd_networkd_LDADD += \
+ libsystemd-firewall.la
+endif # HAVE_LIBIPTC
+
+dist_systemunit_DATA += \
+ units/systemd-networkd.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-networkd.service \
+ units/systemd-networkd-wait-online.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.network1.busname
+
+dist_dbussystemservice_DATA += \
+ src/network/org.freedesktop.network1.service
+
+dist_dbuspolicy_DATA += \
+ src/network/org.freedesktop.network1.conf
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
+ $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
+ $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-networkd.service dbus-org.freedesktop.network1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.network1.busname
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/network/networkd.c b/src/grp-network/systemd-networkd/networkd.c
index c8f81a2ca6..369cf91221 100644
--- a/src/network/networkd.c
+++ b/src/grp-network/systemd-networkd/networkd.c
@@ -17,13 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
-#include "capability-util.h"
-#include "networkd.h"
#include "networkd-conf.h"
-#include "signal-util.h"
-#include "user-util.h"
+#include "networkd.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/user-util.h"
int main(int argc, char *argv[]) {
_cleanup_manager_free_ Manager *m = NULL;
diff --git a/man/networkd.conf.xml b/src/grp-network/systemd-networkd/networkd.conf.xml
index 57e647a31b..57e647a31b 100644
--- a/man/networkd.conf.xml
+++ b/src/grp-network/systemd-networkd/networkd.conf.xml
diff --git a/src/network/org.freedesktop.network1.conf b/src/grp-network/systemd-networkd/org.freedesktop.network1.conf
index 52dad33668..52dad33668 100644
--- a/src/network/org.freedesktop.network1.conf
+++ b/src/grp-network/systemd-networkd/org.freedesktop.network1.conf
diff --git a/src/network/org.freedesktop.network1.service b/src/grp-network/systemd-networkd/org.freedesktop.network1.service
index bea885fe53..bea885fe53 100644
--- a/src/network/org.freedesktop.network1.service
+++ b/src/grp-network/systemd-networkd/org.freedesktop.network1.service
diff --git a/units/systemd-networkd.service.m4.in b/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in
index a968d8bd45..a968d8bd45 100644
--- a/units/systemd-networkd.service.m4.in
+++ b/src/grp-network/systemd-networkd/systemd-networkd.service.m4.in
diff --git a/man/systemd-networkd.service.xml b/src/grp-network/systemd-networkd/systemd-networkd.service.xml
index 0bfe5519bc..0bfe5519bc 100644
--- a/man/systemd-networkd.service.xml
+++ b/src/grp-network/systemd-networkd/systemd-networkd.service.xml
diff --git a/units/systemd-networkd.socket b/src/grp-network/systemd-networkd/systemd-networkd.socket
index 9e4e9dd338..9e4e9dd338 100644
--- a/units/systemd-networkd.socket
+++ b/src/grp-network/systemd-networkd/systemd-networkd.socket
diff --git a/sysusers.d/systemd-networkd.conf b/src/grp-network/systemd-networkd/systemd-networkd.sysusers
index 208148d6b8..208148d6b8 100644
--- a/sysusers.d/systemd-networkd.conf
+++ b/src/grp-network/systemd-networkd/systemd-networkd.sysusers
diff --git a/tmpfiles.d/systemd-networkd.conf b/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles
index 24197555ee..24197555ee 100644
--- a/tmpfiles.d/systemd-networkd.conf
+++ b/src/grp-network/systemd-networkd/systemd-networkd.tmpfiles
diff --git a/src/network/test-network-tables.c b/src/grp-network/test-network-tables.c
index adbe09a5e1..89c7591778 100644
--- a/src/network/test-network-tables.c
+++ b/src/grp-network/test-network-tables.c
@@ -1,11 +1,11 @@
-#include "dhcp6-internal.h"
-#include "dhcp6-protocol.h"
#include "ethtool-util.h"
-#include "netlink-internal.h"
#include "networkd-netdev-bond.h"
#include "networkd-netdev-macvlan.h"
#include "networkd.h"
-#include "test-tables.h"
+#include "sd-netlink/netlink-internal.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-shared/test-tables.h"
int main(int argc, char **argv) {
test_table(bond_mode, NETDEV_BOND_MODE);
diff --git a/src/network/test-network.c b/src/grp-network/test-network.c
index 855646173f..e94aea1765 100644
--- a/src/network/test-network.c
+++ b/src/grp-network/test-network.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dhcp-lease-internal.h"
-#include "network-internal.h"
#include "networkd.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/network-internal.h"
static void test_deserialize_in_addr(void) {
_cleanup_free_ struct in_addr *addresses = NULL;
diff --git a/src/network/test-networkd-conf.c b/src/grp-network/test-networkd-conf.c
index 0e1a18457d..ca9559b9ce 100644
--- a/src/network/test-networkd-conf.c
+++ b/src/grp-network/test-networkd-conf.c
@@ -17,15 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hexdecoct.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "ether-addr-util.h"
-
#include "networkd-conf.h"
#include "networkd-network.h"
-#include "network-internal.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-network/network-internal.h"
static void test_config_parse_duid_type_one(const char *rvalue, int ret, DUIDType expected) {
DUIDType actual = 0;
diff --git a/system-preset/90-resolved.preset b/src/grp-resolve/90-resolved.preset
index c5a5063cc1..c5a5063cc1 100644
--- a/system-preset/90-resolved.preset
+++ b/src/grp-resolve/90-resolved.preset
diff --git a/src/grp-resolve/GNUmakefile b/src/grp-resolve/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-resolve/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-resolve/Makefile b/src/grp-resolve/Makefile
new file mode 100644
index 0000000000..8132573d49
--- /dev/null
+++ b/src/grp-resolve/Makefile
@@ -0,0 +1,31 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += libbasic-dns
+nested.subdirs += nss-resolve
+nested.subdirs += systemd-resolve
+nested.subdirs += systemd-resolved
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/libbasic-dns/GNUmakefile b/src/grp-resolve/libbasic-dns/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-resolve/libbasic-dns/Makefile b/src/grp-resolve/libbasic-dns/Makefile
new file mode 100644
index 0000000000..7c64e6af5f
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+nested.subdirs += test
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/resolve/dns-type.h b/src/grp-resolve/libbasic-dns/include/basic-dns/dns-type.h
index e675fe4ea3..df1642f85e 100644
--- a/src/resolve/dns-type.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/dns-type.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
/* DNS record types, taken from
* http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml.
diff --git a/src/resolve/resolved-def.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-def.h
index c4c1915b18..c4c1915b18 100644
--- a/src/resolve/resolved-def.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-def.h
diff --git a/src/resolve/resolved-dns-answer.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-answer.h
index 4a92bd1150..447604d008 100644
--- a/src/resolve/resolved-dns-answer.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-answer.h
@@ -19,10 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/macro.h"
+
typedef struct DnsAnswer DnsAnswer;
typedef struct DnsAnswerItem DnsAnswerItem;
-#include "macro.h"
#include "resolved-dns-rr.h"
/* A simple array of resource records. We keep track of the
diff --git a/src/resolve/resolved-dns-dnssec.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-dnssec.h
index 77bd4d71bf..b91abe98ac 100644
--- a/src/resolve/resolved-dns-dnssec.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-dnssec.h
@@ -19,10 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-shared/dns-domain.h"
+
typedef enum DnssecResult DnssecResult;
typedef enum DnssecVerdict DnssecVerdict;
-#include "dns-domain.h"
#include "resolved-dns-answer.h"
#include "resolved-dns-rr.h"
diff --git a/src/resolve/resolved-dns-packet.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-packet.h
index 054dc88a85..8fc031e013 100644
--- a/src/resolve/resolved-dns-packet.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-packet.h
@@ -22,13 +22,13 @@
#include <netinet/ip.h>
#include <netinet/udp.h>
-#include "hashmap.h"
-#include "in-addr-util.h"
-#include "macro.h"
-#include "sparse-endian.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
-typedef struct DnsPacketHeader DnsPacketHeader;
typedef struct DnsPacket DnsPacket;
+typedef struct DnsPacketHeader DnsPacketHeader;
#include "resolved-def.h"
#include "resolved-dns-answer.h"
diff --git a/src/resolve/resolved-dns-question.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-question.h
index a9a1863b1e..fb1b2d2410 100644
--- a/src/resolve/resolved-dns-question.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-question.h
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/macro.h"
+
typedef struct DnsQuestion DnsQuestion;
-#include "macro.h"
#include "resolved-dns-rr.h"
/* A simple array of resource keys */
diff --git a/src/resolve/resolved-dns-rr.h b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-rr.h
index 42d39a1251..864c7c237f 100644
--- a/src/resolve/resolved-dns-rr.h
+++ b/src/grp-resolve/libbasic-dns/include/basic-dns/resolved-dns-rr.h
@@ -21,12 +21,13 @@
#include <netinet/in.h>
-#include "bitmap.h"
+#include "systemd-basic/bitmap.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/string-util.h"
+
#include "dns-type.h"
-#include "hashmap.h"
-#include "in-addr-util.h"
-#include "list.h"
-#include "string-util.h"
typedef struct DnsResourceKey DnsResourceKey;
typedef struct DnsResourceRecord DnsResourceRecord;
diff --git a/src/grp-resolve/libbasic-dns/src/GNUmakefile b/src/grp-resolve/libbasic-dns/src/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/src/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-resolve/libbasic-dns/src/Makefile b/src/grp-resolve/libbasic-dns/src/Makefile
new file mode 100644
index 0000000000..d7f12fafd4
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/src/Makefile
@@ -0,0 +1,52 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+$(outdir)/dns_type-list.txt: src/resolve/dns-type.h
+ $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
+
+$(outdir)/dns_type-to-name.h: src/resolve/dns_type-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
+
+$(outdir)/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@
+
+basic_dns_sources = \
+ src/resolve/resolved-dns-dnssec.c \
+ src/resolve/resolved-dns-dnssec.h \
+ src/resolve/resolved-dns-packet.c \
+ src/resolve/resolved-dns-packet.h \
+ src/resolve/resolved-dns-rr.c \
+ src/resolve/resolved-dns-rr.h \
+ src/resolve/resolved-dns-answer.c \
+ src/resolve/resolved-dns-answer.h \
+ src/resolve/resolved-dns-question.c \
+ src/resolve/resolved-dns-question.h \
+ src/resolve/dns-type.c \
+ src/resolve/dns-type.h
+
+gperf_txt_sources += \
+ src/resolve/dns_type-list.txt
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/resolve/dns-type.c b/src/grp-resolve/libbasic-dns/src/dns-type.c
index d89ae28dcd..f7acfa9e6f 100644
--- a/src/resolve/dns-type.c
+++ b/src/grp-resolve/libbasic-dns/src/dns-type.c
@@ -19,9 +19,9 @@
#include <sys/socket.h>
-#include "dns-type.h"
-#include "parse-util.h"
-#include "string-util.h"
+#include "basic-dns/dns-type.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
typedef const struct {
uint16_t type;
diff --git a/src/resolve/resolved-dns-answer.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-answer.c
index ab85754bf7..afb0d3cafa 100644
--- a/src/resolve/resolved-dns-answer.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-answer.c
@@ -17,11 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "resolved-dns-answer.h"
-#include "resolved-dns-dnssec.h"
-#include "string-util.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/dns-domain.h"
DnsAnswer *dns_answer_new(unsigned n) {
DnsAnswer *a;
diff --git a/src/resolve/resolved-dns-dnssec.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-dnssec.c
index d4a267c89f..9f56ce0843 100644
--- a/src/resolve/resolved-dns-dnssec.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-dnssec.c
@@ -21,13 +21,13 @@
#include <gcrypt.h>
#endif
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "gcrypt-util.h"
-#include "hexdecoct.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-packet.h"
-#include "string-table.h"
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-gcrypt/gcrypt-util.h"
+#include "systemd-shared/dns-domain.h"
#define VERIFY_RRS_MAX 256
#define MAX_KEY_SIZE (32*1024)
diff --git a/src/resolve/resolved-dns-packet.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-packet.c
index 337a8c473f..6f356cba7d 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-packet.c
@@ -17,14 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "resolved-dns-packet.h"
-#include "string-table.h"
-#include "strv.h"
-#include "unaligned.h"
-#include "utf8.h"
-#include "util.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unaligned.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/dns-domain.h"
#define EDNS0_OPT_DO (1<<15)
diff --git a/src/resolve/resolved-dns-question.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-question.c
index c8b502d1cd..672ef6207d 100644
--- a/src/resolve/resolved-dns-question.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-question.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "dns-type.h"
-#include "resolved-dns-question.h"
+#include "basic-dns/dns-type.h"
+#include "basic-dns/resolved-dns-question.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-shared/dns-domain.h"
DnsQuestion *dns_question_new(unsigned n) {
DnsQuestion *q;
diff --git a/src/resolve/resolved-dns-rr.c b/src/grp-resolve/libbasic-dns/src/resolved-dns-rr.c
index 87e4abec6e..c6ec81ead6 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/grp-resolve/libbasic-dns/src/resolved-dns-rr.c
@@ -19,18 +19,18 @@
#include <math.h>
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "dns-type.h"
-#include "escape.h"
-#include "hexdecoct.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-rr.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
+#include "basic-dns/dns-type.h"
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-rr.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-shared/dns-domain.h"
DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *name) {
DnsResourceKey *k;
diff --git a/src/grp-resolve/libbasic-dns/test/GNUmakefile b/src/grp-resolve/libbasic-dns/test/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/test/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-resolve/libbasic-dns/test/Makefile b/src/grp-resolve/libbasic-dns/test/Makefile
new file mode 100644
index 0000000000..165f401d26
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/test/Makefile
@@ -0,0 +1,97 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+tests += \
+ test-dns-packet \
+ test-resolve-tables \
+ test-dnssec
+
+manual_tests += \
+ test-dnssec-complex
+
+test_resolve_tables_SOURCES = \
+ src/resolve/test-resolve-tables.c \
+ src/resolve/dns_type-from-name.h \
+ src/resolve/dns_type-to-name.h \
+ $(basic_dns_sources) \
+ src/shared/test-tables.h
+
+test_resolve_tables_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+test_resolve_tables_LDADD = \
+ libsystemd-shared.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+test_dns_packet_SOURCES = \
+ src/resolve/test-dns-packet.c \
+ $(basic_dns_sources)
+
+test_dns_packet_CPPFLAGS = \
+ -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
+
+test_dns_packet_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+test_dns_packet_LDADD = \
+ libsystemd-shared.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+EXTRA_DIST += \
+ src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts \
+ src/resolve/test-data/fedoraproject.org.pkts \
+ src/resolve/test-data/gandi.net.pkts \
+ src/resolve/test-data/google.com.pkts \
+ src/resolve/test-data/root.pkts \
+ src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
+ src/resolve/test-data/teamits.com.pkts \
+ src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
+ src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
+ src/resolve/test-data/kyhwana.org.pkts \
+ src/resolve/test-data/fake-caa.pkts
+
+test_dnssec_SOURCES = \
+ src/resolve/test-dnssec.c \
+ $(basic_dns_sources)
+
+test_dnssec_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+test_dnssec_LDADD = \
+ libsystemd-shared.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+test_dnssec_complex_SOURCES = \
+ src/resolve/test-dnssec-complex.c \
+ src/resolve/dns-type.c \
+ src/resolve/dns-type.h
+
+test_dnssec_complex_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/resolve/test-data/_443._tcp.fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/_443._tcp.fedoraproject.org.pkts
index a383c6286d..a383c6286d 100644
--- a/src/resolve/test-data/_443._tcp.fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/_443._tcp.fedoraproject.org.pkts
Binary files differ
diff --git a/src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/_openpgpkey.fedoraproject.org.pkts
index 15de02e997..15de02e997 100644
--- a/src/resolve/test-data/_openpgpkey.fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/_openpgpkey.fedoraproject.org.pkts
Binary files differ
diff --git a/src/resolve/test-data/fake-caa.pkts b/src/grp-resolve/libbasic-dns/test/test-data/fake-caa.pkts
index 1c3ecc5491..1c3ecc5491 100644
--- a/src/resolve/test-data/fake-caa.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/fake-caa.pkts
Binary files differ
diff --git a/src/resolve/test-data/fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/fedoraproject.org.pkts
index 17874844d9..17874844d9 100644
--- a/src/resolve/test-data/fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/fedoraproject.org.pkts
Binary files differ
diff --git a/src/resolve/test-data/gandi.net.pkts b/src/grp-resolve/libbasic-dns/test/test-data/gandi.net.pkts
index 5ef51e0c8e..5ef51e0c8e 100644
--- a/src/resolve/test-data/gandi.net.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/gandi.net.pkts
Binary files differ
diff --git a/src/resolve/test-data/google.com.pkts b/src/grp-resolve/libbasic-dns/test/test-data/google.com.pkts
index f98c4cd855..f98c4cd855 100644
--- a/src/resolve/test-data/google.com.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/google.com.pkts
Binary files differ
diff --git a/src/resolve/test-data/kyhwana.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/kyhwana.org.pkts
index e28a725c9a..e28a725c9a 100644
--- a/src/resolve/test-data/kyhwana.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/kyhwana.org.pkts
Binary files differ
diff --git a/src/resolve/test-data/root.pkts b/src/grp-resolve/libbasic-dns/test/test-data/root.pkts
index 54ba668c75..54ba668c75 100644
--- a/src/resolve/test-data/root.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/root.pkts
Binary files differ
diff --git a/src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts b/src/grp-resolve/libbasic-dns/test/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
index a854249532..a854249532 100644
--- a/src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
Binary files differ
diff --git a/src/resolve/test-data/teamits.com.pkts b/src/grp-resolve/libbasic-dns/test/test-data/teamits.com.pkts
index 11deb39677..11deb39677 100644
--- a/src/resolve/test-data/teamits.com.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/teamits.com.pkts
Binary files differ
diff --git a/src/resolve/test-data/zbyszek@fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test/test-data/zbyszek@fedoraproject.org.pkts
index f0a6f982df..f0a6f982df 100644
--- a/src/resolve/test-data/zbyszek@fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test/test-data/zbyszek@fedoraproject.org.pkts
Binary files differ
diff --git a/src/resolve/test-dns-packet.c b/src/grp-resolve/libbasic-dns/test/test-dns-packet.c
index 956b155872..7a012c13dd 100644
--- a/src/resolve/test-dns-packet.c
+++ b/src/grp-resolve/libbasic-dns/test/test-dns-packet.c
@@ -17,19 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <net/if.h>
#include <glob.h>
+#include <net/if.h>
-#include "alloc-util.h"
-#include "fileio.h"
-#include "glob-util.h"
-#include "log.h"
-#include "macro.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-rr.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unaligned.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-rr.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unaligned.h"
#define HASH_KEY SD_ID128_MAKE(d3,1e,48,90,4b,fa,4c,fe,af,9d,d5,a1,d7,2e,8a,b1)
diff --git a/src/resolve/test-dnssec-complex.c b/src/grp-resolve/libbasic-dns/test/test-dnssec-complex.c
index 58c089eb40..2eb4cfe1c2 100644
--- a/src/resolve/test-dnssec-complex.c
+++ b/src/grp-resolve/libbasic-dns/test/test-dnssec-complex.c
@@ -19,15 +19,15 @@
#include <netinet/ip.h>
-#include "sd-bus.h"
-
-#include "af-list.h"
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "dns-type.h"
-#include "random-util.h"
-#include "string-util.h"
-#include "time-util.h"
+#include <systemd/sd-bus.h>
+
+#include "basic-dns/dns-type.h"
+#include "sd-bus/bus-common-errors.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/time-util.h"
#define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC)
diff --git a/src/resolve/test-dnssec.c b/src/grp-resolve/libbasic-dns/test/test-dnssec.c
index b3018e8239..c2b8a74944 100644
--- a/src/resolve/test-dnssec.c
+++ b/src/grp-resolve/libbasic-dns/test/test-dnssec.c
@@ -21,11 +21,11 @@
#include <netinet/in.h>
#include <sys/socket.h>
-#include "alloc-util.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-rr.h"
-#include "string-util.h"
-#include "hexdecoct.h"
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-rr.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/string-util.h"
static void test_dnssec_canonicalize_one(const char *original, const char *canonical, int r) {
char canonicalized[DNSSEC_CANONICAL_HOSTNAME_MAX];
diff --git a/src/resolve/test-resolve-tables.c b/src/grp-resolve/libbasic-dns/test/test-resolve-tables.c
index 2d615130e1..98474b1abf 100644
--- a/src/resolve/test-resolve-tables.c
+++ b/src/grp-resolve/libbasic-dns/test/test-resolve-tables.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "dns-type.h"
-#include "test-tables.h"
+#include "basic-dns/dns-type.h"
+#include "systemd-shared/test-tables.h"
int main(int argc, char **argv) {
uint16_t i;
diff --git a/src/grp-resolve/nss-resolve/GNUmakefile b/src/grp-resolve/nss-resolve/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-resolve/nss-resolve/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-resolve/nss-resolve/Makefile b/src/grp-resolve/nss-resolve/Makefile
new file mode 100644
index 0000000000..310f816b06
--- /dev/null
+++ b/src/grp-resolve/nss-resolve/Makefile
@@ -0,0 +1,46 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+libnss_resolve_la_SOURCES = \
+ src/nss-resolve/nss-resolve.sym \
+ src/nss-resolve/nss-resolve.c
+
+libnss_resolve_la_LDFLAGS = \
+ -module \
+ -export-dynamic \
+ -avoid-version \
+ -shared \
+ -shrext .so.2 \
+ -Wl,--version-script=$(srcdir)/nss-resolve.sym
+
+libnss_resolve_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la \
+ -ldl
+
+rootlib_LTLIBRARIES += \
+ libnss_resolve.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/nss-resolve/nss-resolve.c b/src/grp-resolve/nss-resolve/nss-resolve.c
index d46a3afe91..681416e18f 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/grp-resolve/nss-resolve/nss-resolve.c
@@ -24,15 +24,15 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-bus.h"
-
-#include "bus-common-errors.h"
-#include "in-addr-util.h"
-#include "macro.h"
-#include "nss-util.h"
-#include "string-util.h"
-#include "util.h"
-#include "signal-util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/nss-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
NSS_GETHOSTBYNAME_PROTOTYPES(resolve);
NSS_GETHOSTBYADDR_PROTOTYPES(resolve);
diff --git a/src/nss-resolve/nss-resolve.sym b/src/grp-resolve/nss-resolve/nss-resolve.sym
index df8dff2a20..df8dff2a20 100644
--- a/src/nss-resolve/nss-resolve.sym
+++ b/src/grp-resolve/nss-resolve/nss-resolve.sym
diff --git a/man/nss-resolve.xml b/src/grp-resolve/nss-resolve/nss-resolve.xml
index 9f24f65019..9f24f65019 100644
--- a/man/nss-resolve.xml
+++ b/src/grp-resolve/nss-resolve/nss-resolve.xml
diff --git a/src/grp-resolve/systemd-resolve/GNUmakefile b/src/grp-resolve/systemd-resolve/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-resolve/systemd-resolve/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-resolve/systemd-resolve/Makefile b/src/grp-resolve/systemd-resolve/Makefile
new file mode 100644
index 0000000000..9d9b46d58d
--- /dev/null
+++ b/src/grp-resolve/systemd-resolve/Makefile
@@ -0,0 +1,53 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemd_resolve_SOURCES = \
+ src/resolve/resolve-tool.c \
+ $(basic_dns_sources) \
+ src/shared/gcrypt-util.c \
+ src/shared/gcrypt-util.h
+
+nodist_systemd_resolve_SOURCES = \
+ src/resolve/dns_type-from-name.h \
+ src/resolve/dns_type-to-name.h
+
+systemd_resolve_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+systemd_resolve_LDADD = \
+ libsystemd-shared.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+bin_PROGRAMS += \
+ systemd-resolve
+
+dist_bashcompletion_data += \
+ shell-completion/bash/systemd-resolve
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_systemd-resolve
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/resolve/resolve-tool.c b/src/grp-resolve/systemd-resolve/resolve-tool.c
index 9d4d04220c..3e19b8563c 100644
--- a/src/resolve/resolve-tool.c
+++ b/src/grp-resolve/systemd-resolve/resolve-tool.c
@@ -20,23 +20,23 @@
#include <getopt.h>
#include <net/if.h>
-#include "sd-bus.h"
-#include "sd-netlink.h"
-
-#include "af-list.h"
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "escape.h"
-#include "gcrypt-util.h"
-#include "in-addr-util.h"
-#include "netlink-util.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "resolved-def.h"
-#include "resolved-dns-packet.h"
-#include "strv.h"
-#include "terminal-util.h"
+#include <systemd/sd-bus.h>
+
+#include "basic-dns/resolved-def.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-gcrypt/gcrypt-util.h"
+#include "systemd-shared/pager.h"
+#include "systemd-staging/sd-netlink.h"
#define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC)
diff --git a/shell-completion/bash/systemd-resolve b/src/grp-resolve/systemd-resolve/systemd-resolve.completion.bash
index f59482fe23..f59482fe23 100644
--- a/shell-completion/bash/systemd-resolve
+++ b/src/grp-resolve/systemd-resolve/systemd-resolve.completion.bash
diff --git a/shell-completion/zsh/_systemd-resolve b/src/grp-resolve/systemd-resolve/systemd-resolve.completion.zsh
index c318ab50f1..c318ab50f1 100644
--- a/shell-completion/zsh/_systemd-resolve
+++ b/src/grp-resolve/systemd-resolve/systemd-resolve.completion.zsh
diff --git a/man/systemd-resolve.xml b/src/grp-resolve/systemd-resolve/systemd-resolve.xml
index 2bc917ac26..2bc917ac26 100644
--- a/man/systemd-resolve.xml
+++ b/src/grp-resolve/systemd-resolve/systemd-resolve.xml
diff --git a/src/resolve/.gitignore b/src/grp-resolve/systemd-resolved/.gitignore
index f0835923b7..f0835923b7 100644
--- a/src/resolve/.gitignore
+++ b/src/grp-resolve/systemd-resolved/.gitignore
diff --git a/src/grp-resolve/systemd-resolved/GNUmakefile b/src/grp-resolve/systemd-resolved/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-resolve/systemd-resolved/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-resolve/systemd-resolved/Makefile b/src/grp-resolve/systemd-resolved/Makefile
new file mode 100644
index 0000000000..e8ae8ccc28
--- /dev/null
+++ b/src/grp-resolve/systemd-resolved/Makefile
@@ -0,0 +1,127 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_RESOLVED),)
+
+systemd_resolved_SOURCES = \
+ src/resolve/resolved.c \
+ src/resolve/resolved-manager.c \
+ src/resolve/resolved-manager.h \
+ src/resolve/resolved-conf.c \
+ src/resolve/resolved-conf.h \
+ src/resolve/resolved-resolv-conf.c \
+ src/resolve/resolved-resolv-conf.h \
+ src/resolve/resolved-bus.c \
+ src/resolve/resolved-bus.h \
+ src/resolve/resolved-link.h \
+ src/resolve/resolved-link.c \
+ src/resolve/resolved-link-bus.c \
+ src/resolve/resolved-link-bus.h \
+ src/resolve/resolved-llmnr.h \
+ src/resolve/resolved-llmnr.c \
+ src/resolve/resolved-mdns.h \
+ src/resolve/resolved-mdns.c \
+ src/resolve/resolved-def.h \
+ $(basic_dns_sources) \
+ src/resolve/resolved-dns-query.h \
+ src/resolve/resolved-dns-query.c \
+ src/resolve/resolved-dns-synthesize.h \
+ src/resolve/resolved-dns-synthesize.c \
+ src/resolve/resolved-dns-transaction.h \
+ src/resolve/resolved-dns-transaction.c \
+ src/resolve/resolved-dns-scope.h \
+ src/resolve/resolved-dns-scope.c \
+ src/resolve/resolved-dns-server.h \
+ src/resolve/resolved-dns-server.c \
+ src/resolve/resolved-dns-search-domain.h \
+ src/resolve/resolved-dns-search-domain.c \
+ src/resolve/resolved-dns-cache.h \
+ src/resolve/resolved-dns-cache.c \
+ src/resolve/resolved-dns-zone.h \
+ src/resolve/resolved-dns-zone.c \
+ src/resolve/resolved-dns-stream.h \
+ src/resolve/resolved-dns-stream.c \
+ src/resolve/resolved-dns-trust-anchor.h \
+ src/resolve/resolved-dns-trust-anchor.c \
+ src/resolve/resolved-dns-stub.h \
+ src/resolve/resolved-dns-stub.c \
+ src/resolve/resolved-etc-hosts.h \
+ src/resolve/resolved-etc-hosts.c \
+ src/shared/gcrypt-util.c \
+ src/shared/gcrypt-util.h
+
+nodist_systemd_resolved_SOURCES = \
+ src/resolve/dns_type-from-name.h \
+ src/resolve/dns_type-to-name.h \
+ src/resolve/resolved-gperf.c
+
+systemd_resolved_CFLAGS = \
+ $(GCRYPT_CFLAGS)
+
+systemd_resolved_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la \
+ $(GCRYPT_LIBS) \
+ -lm
+
+rootlibexec_PROGRAMS += \
+ systemd-resolved
+
+nodist_systemunit_DATA += \
+ units/systemd-resolved.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.resolve1.busname
+
+dist_dbuspolicy_DATA += \
+ src/resolve/org.freedesktop.resolve1.conf
+
+dist_dbussystemservice_DATA += \
+ src/resolve/org.freedesktop.resolve1.service
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-resolved.service dbus-org.freedesktop.resolve1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.resolve1.busname
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/systemd-resolved.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-resolved.service
+
+nodist_pkgsysconf_DATA += \
+ src/resolve/resolved.conf
+
+endif # ENABLE_RESOLVED
+gperf_gperf_sources += \
+ src/resolve/resolved-gperf.gperf
+
+EXTRA_DIST += \
+ units/systemd-resolved.service.m4.in \
+ src/resolve/resolved.conf.in
+
+dist_rootlibexec_DATA += \
+ src/resolve/resolv.conf
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/resolve/RFCs b/src/grp-resolve/systemd-resolved/RFCs
index 09c85f9518..09c85f9518 100644
--- a/src/resolve/RFCs
+++ b/src/grp-resolve/systemd-resolved/RFCs
diff --git a/man/dnssec-trust-anchors.d.xml b/src/grp-resolve/systemd-resolved/dnssec-trust-anchors.d.xml
index 9a28862ceb..9a28862ceb 100644
--- a/man/dnssec-trust-anchors.d.xml
+++ b/src/grp-resolve/systemd-resolved/dnssec-trust-anchors.d.xml
diff --git a/src/resolve/org.freedesktop.resolve1.conf b/src/grp-resolve/systemd-resolved/org.freedesktop.resolve1.conf
index 25b09774e5..25b09774e5 100644
--- a/src/resolve/org.freedesktop.resolve1.conf
+++ b/src/grp-resolve/systemd-resolved/org.freedesktop.resolve1.conf
diff --git a/src/resolve/org.freedesktop.resolve1.service b/src/grp-resolve/systemd-resolved/org.freedesktop.resolve1.service
index 7ac5c323f0..7ac5c323f0 100644
--- a/src/resolve/org.freedesktop.resolve1.service
+++ b/src/grp-resolve/systemd-resolved/org.freedesktop.resolve1.service
diff --git a/src/resolve/resolv.conf b/src/grp-resolve/systemd-resolved/resolv.conf
index b8034d6829..b8034d6829 100644
--- a/src/resolve/resolv.conf
+++ b/src/grp-resolve/systemd-resolved/resolv.conf
diff --git a/src/resolve/resolved-bus.c b/src/grp-resolve/systemd-resolved/resolved-bus.c
index 2ca65e6953..ec63fb2900 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/grp-resolve/systemd-resolved/resolved-bus.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
-#include "dns-domain.h"
+#include "basic-dns/resolved-def.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-bus.h"
-#include "resolved-def.h"
#include "resolved-dns-synthesize.h"
#include "resolved-link-bus.h"
diff --git a/src/resolve/resolved-bus.h b/src/grp-resolve/systemd-resolved/resolved-bus.h
index f49e1337d2..f49e1337d2 100644
--- a/src/resolve/resolved-bus.h
+++ b/src/grp-resolve/systemd-resolved/resolved-bus.h
diff --git a/src/resolve/resolved-conf.c b/src/grp-resolve/systemd-resolved/resolved-conf.c
index abf3263178..48aa2da331 100644
--- a/src/resolve/resolved-conf.c
+++ b/src/grp-resolve/systemd-resolved/resolved-conf.c
@@ -17,14 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "def.h"
-#include "extract-word.h"
-#include "parse-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/conf-parser.h"
+
#include "resolved-conf.h"
-#include "string-table.h"
-#include "string-util.h"
DEFINE_CONFIG_PARSE_ENUM(config_parse_dns_stub_listener_mode, dns_stub_listener_mode, DnsStubListenerMode, "Failed to parse DNS stub listener mode setting");
diff --git a/src/resolve/resolved-conf.h b/src/grp-resolve/systemd-resolved/resolved-conf.h
index 8184d6cadf..e8cd8e1af3 100644
--- a/src/resolve/resolved-conf.h
+++ b/src/grp-resolve/systemd-resolved/resolved-conf.h
@@ -30,8 +30,8 @@ enum DnsStubListenerMode {
_DNS_STUB_LISTENER_MODE_INVALID = -1
};
-#include "resolved-manager.h"
#include "resolved-dns-server.h"
+#include "resolved-manager.h"
int manager_parse_config_file(Manager *m);
diff --git a/src/resolve/resolved-dns-cache.c b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
index 9233fb0ac1..1f8811c5de 100644
--- a/src/resolve/resolved-dns-cache.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
@@ -19,13 +19,14 @@
#include <net/if.h>
-#include "af-list.h"
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-dns-cache.h"
-#include "resolved-dns-packet.h"
-#include "string-util.h"
/* Never cache more than 4K entries. RFC 1536, Section 5 suggests to
* leave DNS caches unbounded, but that's crazy. */
diff --git a/src/resolve/resolved-dns-cache.h b/src/grp-resolve/systemd-resolved/resolved-dns-cache.h
index 22a7c17377..c2b6a987b9 100644
--- a/src/resolve/resolved-dns-cache.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hashmap.h"
-#include "list.h"
-#include "prioq.h"
-#include "time-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/prioq.h"
+#include "systemd-basic/time-util.h"
typedef struct DnsCache {
Hashmap *by_key;
@@ -31,10 +31,10 @@ typedef struct DnsCache {
unsigned n_miss;
} DnsCache;
-#include "resolved-dns-answer.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-question.h"
-#include "resolved-dns-rr.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-question.h"
+#include "basic-dns/resolved-dns-rr.h"
void dns_cache_flush(DnsCache *c);
void dns_cache_prune(DnsCache *c);
diff --git a/src/resolve/resolved-dns-query.c b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
index e03db4d003..2193dc5bcf 100644
--- a/src/resolve/resolved-dns-query.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
@@ -17,15 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "dns-type.h"
-#include "hostname-util.h"
-#include "local-addresses.h"
+#include "basic-dns/dns-type.h"
+#include "sd-netlink/local-addresses.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-dns-query.h"
#include "resolved-dns-synthesize.h"
#include "resolved-etc-hosts.h"
-#include "string-util.h"
/* How long to wait for the query in total */
#define QUERY_TIMEOUT_USEC (30 * USEC_PER_SEC)
diff --git a/src/resolve/resolved-dns-query.h b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
index 49a35b846b..bc26a58f21 100644
--- a/src/resolve/resolved-dns-query.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
@@ -20,17 +20,17 @@
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "set.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
+#include "systemd-basic/set.h"
-typedef struct DnsQueryCandidate DnsQueryCandidate;
typedef struct DnsQuery DnsQuery;
+typedef struct DnsQueryCandidate DnsQueryCandidate;
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
-#include "resolved-dns-stream.h"
#include "resolved-dns-search-domain.h"
+#include "resolved-dns-stream.h"
struct DnsQueryCandidate {
DnsQuery *query;
diff --git a/src/resolve/resolved-dns-scope.c b/src/grp-resolve/systemd-resolved/resolved-dns-scope.c
index 8dbc7f623b..9f20fd304a 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.c
@@ -19,18 +19,19 @@
#include <netinet/tcp.h>
-#include "af-list.h"
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "hostname-util.h"
-#include "missing.h"
-#include "random-util.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-dns-scope.h"
#include "resolved-llmnr.h"
#include "resolved-mdns.h"
-#include "socket-util.h"
-#include "strv.h"
#define MULTICAST_RATELIMIT_INTERVAL_USEC (1*USEC_PER_SEC)
#define MULTICAST_RATELIMIT_BURST 1000
diff --git a/src/resolve/resolved-dns-scope.h b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
index 01a83a76b2..26623b1878 100644
--- a/src/resolve/resolved-dns-scope.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
@@ -19,13 +19,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "list.h"
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "systemd-basic/list.h"
typedef struct DnsScope DnsScope;
#include "resolved-dns-cache.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-packet.h"
#include "resolved-dns-query.h"
#include "resolved-dns-search-domain.h"
#include "resolved-dns-server.h"
diff --git a/src/resolve/resolved-dns-search-domain.c b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c
index 1386e6a17b..a82df4c7a6 100644
--- a/src/resolve/resolved-dns-search-domain.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c
@@ -17,8 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dns-domain.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-dns-search-domain.h"
int dns_search_domain_new(
diff --git a/src/resolve/resolved-dns-search-domain.h b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.h
index eaacef4edc..53b4f3207a 100644
--- a/src/resolve/resolved-dns-search-domain.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef struct DnsSearchDomain DnsSearchDomain;
diff --git a/src/resolve/resolved-dns-server.c b/src/grp-resolve/systemd-resolved/resolved-dns-server.c
index 22c64e8491..b2605c0d46 100644
--- a/src/resolve/resolved-dns-server.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-server.c
@@ -17,15 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sd-messages.h>
+#include <systemd/sd-messages.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
-#include "alloc-util.h"
#include "resolved-dns-server.h"
#include "resolved-dns-stub.h"
#include "resolved-resolv-conf.h"
-#include "siphash24.h"
-#include "string-table.h"
-#include "string-util.h"
/* After how much time to repeat classic DNS requests */
#define DNS_TIMEOUT_MIN_USEC (500 * USEC_PER_MSEC)
diff --git a/src/resolve/resolved-dns-server.h b/src/grp-resolve/systemd-resolved/resolved-dns-server.h
index 83e288a202..cb0ad80292 100644
--- a/src/resolve/resolved-dns-server.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-server.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "in-addr-util.h"
+#include "systemd-basic/in-addr-util.h"
typedef struct DnsServer DnsServer;
diff --git a/src/resolve/resolved-dns-stream.c b/src/grp-resolve/systemd-resolved/resolved-dns-stream.c
index 878bae47dc..5f77d47f64 100644
--- a/src/resolve/resolved-dns-stream.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.c
@@ -19,10 +19,11 @@
#include <netinet/tcp.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "missing.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/missing.h"
+
#include "resolved-dns-stream.h"
#define DNS_STREAM_TIMEOUT_USEC (10 * USEC_PER_SEC)
diff --git a/src/resolve/resolved-dns-stream.h b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
index 4cdb4f6806..3d5a3c22d1 100644
--- a/src/resolve/resolved-dns-stream.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "socket-util.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "systemd-basic/socket-util.h"
typedef struct DnsStream DnsStream;
-#include "resolved-dns-packet.h"
#include "resolved-dns-transaction.h"
#include "resolved-manager.h"
diff --git a/src/resolve/resolved-dns-stub.c b/src/grp-resolve/systemd-resolved/resolved-dns-stub.c
index e76de6c06a..ad49862a70 100644
--- a/src/resolve/resolved-dns-stub.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-stub.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "fd-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/socket-util.h"
+
#include "resolved-dns-stub.h"
-#include "socket-util.h"
/* The MTU of the loopback device is 64K on Linux, advertise that as maximum datagram size, but subtract the Ethernet,
* IP and UDP header sizes */
diff --git a/src/resolve/resolved-dns-stub.h b/src/grp-resolve/systemd-resolved/resolved-dns-stub.h
index 12b86f6753..12b86f6753 100644
--- a/src/resolve/resolved-dns-stub.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-stub.h
diff --git a/src/resolve/resolved-dns-synthesize.c b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c
index e3003411f7..53d1940d9e 100644
--- a/src/resolve/resolved-dns-synthesize.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "hostname-util.h"
-#include "local-addresses.h"
+#include "sd-netlink/local-addresses.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hostname-util.h"
+
#include "resolved-dns-synthesize.h"
int dns_synthesize_ifindex(int ifindex) {
diff --git a/src/resolve/resolved-dns-synthesize.h b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
index 5d829bb2e7..23b05587ac 100644
--- a/src/resolve/resolved-dns-synthesize.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
@@ -19,8 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
+
#include "resolved-manager.h"
int dns_synthesize_ifindex(int ifindex);
diff --git a/src/resolve/resolved-dns-transaction.c b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c
index 2fce44ec8b..b17493d659 100644
--- a/src/resolve/resolved-dns-transaction.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c
@@ -17,18 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sd-messages.h>
-
-#include "af-list.h"
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "errno-list.h"
-#include "fd-util.h"
-#include "random-util.h"
+#include <systemd/sd-messages.h>
+
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/errno-list.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-dns-cache.h"
#include "resolved-dns-transaction.h"
#include "resolved-llmnr.h"
-#include "string-table.h"
#define TRANSACTIONS_MAX 4096
diff --git a/src/resolve/resolved-dns-transaction.h b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
index 5a1df70422..705336221d 100644
--- a/src/resolve/resolved-dns-transaction.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
@@ -55,9 +55,10 @@ enum DnsTransactionSource {
_DNS_TRANSACTION_SOURCE_INVALID = -1
};
-#include "resolved-dns-answer.h"
-#include "resolved-dns-packet.h"
-#include "resolved-dns-question.h"
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-question.h"
+
#include "resolved-dns-scope.h"
#include "resolved-dns-server.h"
#include "resolved-dns-stream.h"
diff --git a/src/resolve/resolved-dns-trust-anchor.c b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
index 9917b9e984..cb45136788 100644
--- a/src/resolve/resolved-dns-trust-anchor.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
@@ -17,21 +17,22 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sd-messages.h>
-
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "def.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hexdecoct.h"
-#include "parse-util.h"
+#include <systemd/sd-messages.h>
+
+#include "basic-dns/resolved-dns-dnssec.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-dns-trust-anchor.h"
-#include "resolved-dns-dnssec.h"
-#include "set.h"
-#include "string-util.h"
-#include "strv.h"
static const char trust_anchor_dirs[] = CONF_PATHS_NULSTR("dnssec-trust-anchors.d");
diff --git a/src/resolve/resolved-dns-trust-anchor.h b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
index 635c75fde5..9039bd7aa3 100644
--- a/src/resolve/resolved-dns-trust-anchor.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct DnsTrustAnchor DnsTrustAnchor;
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-rr.h"
+#include "systemd-basic/hashmap.h"
-#include "hashmap.h"
-#include "resolved-dns-answer.h"
-#include "resolved-dns-rr.h"
+typedef struct DnsTrustAnchor DnsTrustAnchor;
/* This contains a fixed database mapping domain names to DS or DNSKEY records. */
diff --git a/src/resolve/resolved-dns-zone.c b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
index 746a979f47..723df26454 100644
--- a/src/resolve/resolved-dns-zone.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "list.h"
-#include "resolved-dns-packet.h"
+#include "basic-dns/resolved-dns-packet.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-dns-zone.h"
-#include "string-util.h"
/* Never allow more than 1K entries */
#define ZONE_MAX 1024
diff --git a/src/resolve/resolved-dns-zone.h b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
index a41df37e6b..fe656be793 100644
--- a/src/resolve/resolved-dns-zone.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
@@ -19,19 +19,20 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hashmap.h"
+#include "systemd-basic/hashmap.h"
typedef struct DnsZone {
Hashmap *by_key;
Hashmap *by_name;
} DnsZone;
-typedef struct DnsZoneItem DnsZoneItem;
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
+#include "basic-dns/resolved-dns-rr.h"
+
typedef enum DnsZoneItemState DnsZoneItemState;
+typedef struct DnsZoneItem DnsZoneItem;
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
-#include "resolved-dns-rr.h"
#include "resolved-dns-transaction.h"
/* RFC 4795 Section 2.8. suggests a TTL of 30s by default */
diff --git a/src/resolve/resolved-etc-hosts.c b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c
index 40d650949d..942c06605e 100644
--- a/src/resolve/resolved-etc-hosts.c
+++ b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c
@@ -17,14 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "fd-util.h"
-#include "fileio.h"
-#include "hostname-util.h"
-#include "resolved-etc-hosts.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+
#include "resolved-dns-synthesize.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
+#include "resolved-etc-hosts.h"
/* Recheck /etc/hosts at most once every 2s */
#define ETC_HOSTS_RECHECK_USEC (2*USEC_PER_SEC)
diff --git a/src/resolve/resolved-etc-hosts.h b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
index 9d5a175f18..49e449b56d 100644
--- a/src/resolve/resolved-etc-hosts.h
+++ b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "basic-dns/resolved-dns-answer.h"
+#include "basic-dns/resolved-dns-question.h"
+
#include "resolved-manager.h"
-#include "resolved-dns-question.h"
-#include "resolved-dns-answer.h"
void manager_etc_hosts_flush(Manager *m);
int manager_etc_hosts_read(Manager *m);
diff --git a/src/resolve/resolved-gperf.gperf b/src/grp-resolve/systemd-resolved/resolved-gperf.gperf
index 446f85cdf4..79e54d8357 100644
--- a/src/resolve/resolved-gperf.gperf
+++ b/src/grp-resolve/systemd-resolved/resolved-gperf.gperf
@@ -1,6 +1,8 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
+
+#include "systemd-shared/conf-parser.h"
+
#include "resolved-conf.h"
%}
struct ConfigPerfItem;
diff --git a/src/resolve/resolved-link-bus.c b/src/grp-resolve/systemd-resolved/resolved-link-bus.c
index 364812250f..bea3c35829 100644
--- a/src/resolve/resolved-link-bus.c
+++ b/src/grp-resolve/systemd-resolved/resolved-link-bus.c
@@ -17,15 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
-#include "parse-util.h"
-#include "resolve-util.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/resolve-util.h"
+
#include "resolved-bus.h"
#include "resolved-link-bus.h"
#include "resolved-resolv-conf.h"
-#include "strv.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_resolve_support, resolve_support, ResolveSupport);
diff --git a/src/resolve/resolved-link-bus.h b/src/grp-resolve/systemd-resolved/resolved-link-bus.h
index 646031b631..b1ac57961d 100644
--- a/src/resolve/resolved-link-bus.h
+++ b/src/grp-resolve/systemd-resolved/resolved-link-bus.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
#include "resolved-link.h"
diff --git a/src/resolve/resolved-link.c b/src/grp-resolve/systemd-resolved/resolved-link.c
index 13e1f91192..99be607b09 100644
--- a/src/resolve/resolved-link.c
+++ b/src/grp-resolve/systemd-resolved/resolved-link.c
@@ -19,17 +19,17 @@
#include <net/if.h>
-#include "sd-network.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-staging/sd-network.h"
+
#include "resolved-link.h"
-#include "string-util.h"
-#include "strv.h"
int link_new(Manager *m, Link **ret, int ifindex) {
_cleanup_(link_freep) Link *l = NULL;
diff --git a/src/resolve/resolved-link.h b/src/grp-resolve/systemd-resolved/resolved-link.h
index c9b2a58c34..271309914f 100644
--- a/src/resolve/resolved-link.h
+++ b/src/grp-resolve/systemd-resolved/resolved-link.h
@@ -21,14 +21,14 @@
#include <net/if.h>
-#include "in-addr-util.h"
-#include "ratelimit.h"
-#include "resolve-util.h"
+#include "basic-dns/resolved-dns-rr.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-shared/resolve-util.h"
typedef struct Link Link;
typedef struct LinkAddress LinkAddress;
-#include "resolved-dns-rr.h"
#include "resolved-dns-scope.h"
#include "resolved-dns-search-domain.h"
#include "resolved-dns-server.h"
diff --git a/src/resolve/resolved-llmnr.c b/src/grp-resolve/systemd-resolved/resolved-llmnr.c
index 3516af58ee..2a22f20790 100644
--- a/src/resolve/resolved-llmnr.c
+++ b/src/grp-resolve/systemd-resolved/resolved-llmnr.c
@@ -20,7 +20,8 @@
#include <netinet/in.h>
#include <resolv.h>
-#include "fd-util.h"
+#include "systemd-basic/fd-util.h"
+
#include "resolved-llmnr.h"
#include "resolved-manager.h"
diff --git a/src/resolve/resolved-llmnr.h b/src/grp-resolve/systemd-resolved/resolved-llmnr.h
index 8133582fa7..8133582fa7 100644
--- a/src/resolve/resolved-llmnr.h
+++ b/src/grp-resolve/systemd-resolved/resolved-llmnr.h
diff --git a/src/resolve/resolved-manager.c b/src/grp-resolve/systemd-resolved/resolved-manager.c
index 6630585d13..67bbe30f13 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/grp-resolve/systemd-resolved/resolved-manager.c
@@ -21,19 +21,24 @@
#include <poll.h>
#include <sys/ioctl.h>
-#include "af-list.h"
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "fileio-label.h"
-#include "hostname-util.h"
-#include "io-util.h"
-#include "netlink-util.h"
-#include "network-internal.h"
-#include "ordered-set.h"
-#include "parse-util.h"
-#include "random-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/ordered-set.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-bus.h"
#include "resolved-conf.h"
#include "resolved-dns-stub.h"
@@ -42,10 +47,6 @@
#include "resolved-manager.h"
#include "resolved-mdns.h"
#include "resolved-resolv-conf.h"
-#include "socket-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "utf8.h"
#define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC)
diff --git a/src/resolve/resolved-manager.h b/src/grp-resolve/systemd-resolved/resolved-manager.h
index 6b2208ed94..4e9dcd51f1 100644
--- a/src/resolve/resolved-manager.h
+++ b/src/grp-resolve/systemd-resolved/resolved-manager.h
@@ -19,14 +19,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
-#include "sd-netlink.h"
-#include "sd-network.h"
-
-#include "hashmap.h"
-#include "list.h"
-#include "ordered-set.h"
-#include "resolve-util.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/ordered-set.h"
+#include "systemd-shared/resolve-util.h"
+#include "systemd-staging/sd-netlink.h"
+#include "systemd-staging/sd-network.h"
typedef struct Manager Manager;
diff --git a/src/resolve/resolved-mdns.c b/src/grp-resolve/systemd-resolved/resolved-mdns.c
index b13b1d0144..f810019763 100644
--- a/src/resolve/resolved-mdns.c
+++ b/src/grp-resolve/systemd-resolved/resolved-mdns.c
@@ -17,11 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <resolv.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <resolv.h>
+
+#include "systemd-basic/fd-util.h"
-#include "fd-util.h"
#include "resolved-manager.h"
#include "resolved-mdns.h"
diff --git a/src/resolve/resolved-mdns.h b/src/grp-resolve/systemd-resolved/resolved-mdns.h
index 5d274648f4..5d274648f4 100644
--- a/src/resolve/resolved-mdns.h
+++ b/src/grp-resolve/systemd-resolved/resolved-mdns.h
diff --git a/src/resolve/resolved-resolv-conf.c b/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c
index 801014caf5..5cc79a0040 100644
--- a/src/resolve/resolved-resolv-conf.c
+++ b/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c
@@ -19,16 +19,17 @@
#include <resolv.h>
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "fileio-label.h"
-#include "fileio.h"
-#include "ordered-set.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/ordered-set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/dns-domain.h"
+
#include "resolved-conf.h"
#include "resolved-resolv-conf.h"
-#include "string-util.h"
-#include "strv.h"
int manager_read_resolv_conf(Manager *m) {
_cleanup_fclose_ FILE *f = NULL;
diff --git a/src/resolve/resolved-resolv-conf.h b/src/grp-resolve/systemd-resolved/resolved-resolv-conf.h
index 75fa080e4c..75fa080e4c 100644
--- a/src/resolve/resolved-resolv-conf.h
+++ b/src/grp-resolve/systemd-resolved/resolved-resolv-conf.h
diff --git a/src/resolve/resolved.c b/src/grp-resolve/systemd-resolved/resolved.c
index deb75f9ae5..7fe9b7edbb 100644
--- a/src/resolve/resolved.c
+++ b/src/grp-resolve/systemd-resolved/resolved.c
@@ -17,17 +17,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-daemon.h"
-#include "sd-event.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/user-util.h"
-#include "capability-util.h"
-#include "mkdir.h"
#include "resolved-conf.h"
#include "resolved-manager.h"
#include "resolved-resolv-conf.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "user-util.h"
int main(int argc, char *argv[]) {
_cleanup_(manager_freep) Manager *m = NULL;
diff --git a/src/resolve/resolved.conf.in b/src/grp-resolve/systemd-resolved/resolved.conf.in
index 60afa151e3..60afa151e3 100644
--- a/src/resolve/resolved.conf.in
+++ b/src/grp-resolve/systemd-resolved/resolved.conf.in
diff --git a/man/resolved.conf.xml b/src/grp-resolve/systemd-resolved/resolved.conf.xml
index 4fc1ef1b33..4fc1ef1b33 100644
--- a/man/resolved.conf.xml
+++ b/src/grp-resolve/systemd-resolved/resolved.conf.xml
diff --git a/units/systemd-resolved.service.m4.in b/src/grp-resolve/systemd-resolved/systemd-resolved.service.m4.in
index 0f0440ddaf..0f0440ddaf 100644
--- a/units/systemd-resolved.service.m4.in
+++ b/src/grp-resolve/systemd-resolved/systemd-resolved.service.m4.in
diff --git a/man/systemd-resolved.service.xml b/src/grp-resolve/systemd-resolved/systemd-resolved.service.xml
index 56f67960ce..56f67960ce 100644
--- a/man/systemd-resolved.service.xml
+++ b/src/grp-resolve/systemd-resolved/systemd-resolved.service.xml
diff --git a/sysusers.d/systemd-resolved.conf b/src/grp-resolve/systemd-resolved/systemd-resolved.sysusers
index 5872bf2db7..5872bf2db7 100644
--- a/sysusers.d/systemd-resolved.conf
+++ b/src/grp-resolve/systemd-resolved/systemd-resolved.sysusers
diff --git a/tmpfiles.d/systemd-resolved.conf b/src/grp-resolve/systemd-resolved/systemd-resolved.tmpfiles
index 760fe11412..760fe11412 100644
--- a/tmpfiles.d/systemd-resolved.conf
+++ b/src/grp-resolve/systemd-resolved/systemd-resolved.tmpfiles
diff --git a/system-preset/90-systemd.preset b/src/grp-system/90-systemd.preset
index 5f7b292244..5f7b292244 100644
--- a/system-preset/90-systemd.preset
+++ b/src/grp-system/90-systemd.preset
diff --git a/src/grp-system/GNUmakefile b/src/grp-system/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-system/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/Makefile b/src/grp-system/Makefile
new file mode 100644
index 0000000000..b950c8136b
--- /dev/null
+++ b/src/grp-system/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += grp-utils
+nested.subdirs += libcore
+nested.subdirs += systemctl
+nested.subdirs += systemd
+nested.subdirs += systemd-cgroups-agent
+nested.subdirs += systemd-shutdown
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/man/bootup.xml b/src/grp-system/bootup.xml
index 986996398c..986996398c 100644
--- a/man/bootup.xml
+++ b/src/grp-system/bootup.xml
diff --git a/src/grp-system/grp-utils/GNUmakefile b/src/grp-system/grp-utils/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/grp-utils/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/Makefile b/src/grp-system/grp-utils/Makefile
new file mode 100644
index 0000000000..2c8cc75a7c
--- /dev/null
+++ b/src/grp-system/grp-utils/Makefile
@@ -0,0 +1,32 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += systemd-analyze
+nested.subdirs += systemd-delta
+nested.subdirs += systemd-fstab-generator
+nested.subdirs += systemd-run
+nested.subdirs += systemd-sysv-generator
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/analyze/.gitignore b/src/grp-system/grp-utils/systemd-analyze/.gitignore
index 752ea236c8..752ea236c8 100644
--- a/src/analyze/.gitignore
+++ b/src/grp-system/grp-utils/systemd-analyze/.gitignore
diff --git a/src/grp-system/grp-utils/systemd-analyze/GNUmakefile b/src/grp-system/grp-utils/systemd-analyze/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-analyze/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-analyze/Makefile b/src/grp-system/grp-utils/systemd-analyze/Makefile
new file mode 100644
index 0000000000..cb1b72e77d
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-analyze/Makefile
@@ -0,0 +1,39 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-analyze
+systemd_analyze_SOURCES = \
+ src/analyze/analyze.c \
+ src/analyze/analyze-verify.c \
+ src/analyze/analyze-verify.h
+
+systemd_analyze_CFLAGS = \
+ $(SECCOMP_CFLAGS) \
+ $(MOUNT_CFLAGS)
+
+systemd_analyze_LDADD = \
+ libcore.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/analyze/analyze-verify.c b/src/grp-system/grp-utils/systemd-analyze/analyze-verify.c
index 0ce0276d92..22d210a14b 100644
--- a/src/analyze/analyze-verify.c
+++ b/src/grp-system/grp-utils/systemd-analyze/analyze-verify.c
@@ -19,16 +19,17 @@
#include <stdlib.h>
-#include "alloc-util.h"
+#include "core/manager.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/pager.h"
+
#include "analyze-verify.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "log.h"
-#include "manager.h"
-#include "pager.h"
-#include "path-util.h"
-#include "strv.h"
-#include "unit-name.h"
static int prepare_filename(const char *filename, char **ret) {
int r;
diff --git a/src/analyze/analyze-verify.h b/src/grp-system/grp-utils/systemd-analyze/analyze-verify.h
index d8204dc69c..33b809997a 100644
--- a/src/analyze/analyze-verify.h
+++ b/src/grp-system/grp-utils/systemd-analyze/analyze-verify.h
@@ -21,6 +21,6 @@
#include <stdbool.h>
-#include "path-lookup.h"
+#include "systemd-shared/path-lookup.h"
int verify_units(char **filenames, UnitFileScope scope, bool check_man);
diff --git a/src/analyze/analyze.c b/src/grp-system/grp-utils/systemd-analyze/analyze.c
index 66830695f3..ea775c8dd1 100644
--- a/src/analyze/analyze.c
+++ b/src/grp-system/grp-utils/systemd-analyze/analyze.c
@@ -23,25 +23,26 @@
#include <stdio.h>
#include <stdlib.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/bus-unit-util.h"
+#include "systemd-shared/pager.h"
-#include "alloc-util.h"
#include "analyze-verify.h"
-#include "bus-error.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
-#include "glob-util.h"
-#include "hashmap.h"
-#include "locale-util.h"
-#include "log.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "special.h"
-#include "strv.h"
-#include "strxcpyx.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "util.h"
#define SCALE_X (0.1 / 1000.0) /* pixels per us */
#define SCALE_Y (20.0)
diff --git a/shell-completion/bash/systemd-analyze b/src/grp-system/grp-utils/systemd-analyze/systemd-analyze.completion.bash
index 7a5f46ba1d..7a5f46ba1d 100644
--- a/shell-completion/bash/systemd-analyze
+++ b/src/grp-system/grp-utils/systemd-analyze/systemd-analyze.completion.bash
diff --git a/shell-completion/zsh/_systemd-analyze b/src/grp-system/grp-utils/systemd-analyze/systemd-analyze.completion.zsh
index efafddc686..efafddc686 100644
--- a/shell-completion/zsh/_systemd-analyze
+++ b/src/grp-system/grp-utils/systemd-analyze/systemd-analyze.completion.zsh
diff --git a/man/systemd-analyze.xml b/src/grp-system/grp-utils/systemd-analyze/systemd-analyze.xml
index 8fa7cd3329..8fa7cd3329 100644
--- a/man/systemd-analyze.xml
+++ b/src/grp-system/grp-utils/systemd-analyze/systemd-analyze.xml
diff --git a/src/grp-system/grp-utils/systemd-delta/GNUmakefile b/src/grp-system/grp-utils/systemd-delta/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-delta/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-delta/Makefile b/src/grp-system/grp-utils/systemd-delta/Makefile
new file mode 100644
index 0000000000..7273647c52
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-delta/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-delta
+systemd_delta_SOURCES = \
+ src/delta/delta.c
+
+systemd_delta_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/delta/delta.c b/src/grp-system/grp-utils/systemd-delta/delta.c
index f32744def2..0142803b46 100644
--- a/src/delta/delta.c
+++ b/src/grp-system/grp-utils/systemd-delta/delta.c
@@ -24,23 +24,23 @@
#include <sys/prctl.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "locale-util.h"
-#include "log.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/pager.h"
static const char prefixes[] =
"/etc\0"
diff --git a/shell-completion/bash/systemd-delta b/src/grp-system/grp-utils/systemd-delta/systemd-delta.completion.bash
index cb1732895f..cb1732895f 100644
--- a/shell-completion/bash/systemd-delta
+++ b/src/grp-system/grp-utils/systemd-delta/systemd-delta.completion.bash
diff --git a/shell-completion/zsh/_systemd-delta b/src/grp-system/grp-utils/systemd-delta/systemd-delta.completion.zsh
index 757f1b66fb..757f1b66fb 100644
--- a/shell-completion/zsh/_systemd-delta
+++ b/src/grp-system/grp-utils/systemd-delta/systemd-delta.completion.zsh
diff --git a/man/systemd-delta.xml b/src/grp-system/grp-utils/systemd-delta/systemd-delta.xml
index 99709604aa..99709604aa 100644
--- a/man/systemd-delta.xml
+++ b/src/grp-system/grp-utils/systemd-delta/systemd-delta.xml
diff --git a/src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile b/src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-fstab-generator/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-fstab-generator/Makefile b/src/grp-system/grp-utils/systemd-fstab-generator/Makefile
new file mode 100644
index 0000000000..43475f69e1
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-fstab-generator/Makefile
@@ -0,0 +1,34 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemgenerator_PROGRAMS += systemd-fstab-generator
+systemd_fstab_generator_SOURCES = \
+ src/fstab-generator/fstab-generator.c \
+ src/core/mount-setup.c
+
+systemd_fstab_generator_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/fstab-generator/fstab-generator.c b/src/grp-system/grp-utils/systemd-fstab-generator/fstab-generator.c
index e77bd71a52..aceac5151c 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/grp-system/grp-utils/systemd-fstab-generator/fstab-generator.c
@@ -23,25 +23,25 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fstab-util.h"
-#include "generator.h"
-#include "log.h"
-#include "mkdir.h"
-#include "mount-setup.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "special.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "util.h"
-#include "virt.h"
+#include "core/mount-setup.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/fstab-util.h"
+#include "systemd-shared/generator.h"
static const char *arg_dest = "/tmp";
static bool arg_fstab_enabled = true;
diff --git a/man/systemd-fstab-generator.xml b/src/grp-system/grp-utils/systemd-fstab-generator/systemd-fstab-generator.xml
index a971cb3675..a971cb3675 100644
--- a/man/systemd-fstab-generator.xml
+++ b/src/grp-system/grp-utils/systemd-fstab-generator/systemd-fstab-generator.xml
diff --git a/src/grp-system/grp-utils/systemd-run/GNUmakefile b/src/grp-system/grp-utils/systemd-run/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-run/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-run/Makefile b/src/grp-system/grp-utils/systemd-run/Makefile
new file mode 100644
index 0000000000..9664591eb6
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-run/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-run
+systemd_run_SOURCES = \
+ src/run/run.c
+
+systemd_run_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/run/run.c b/src/grp-system/grp-utils/systemd-run/run.c
index 81b53fdfab..274edaf2f0 100644
--- a/src/run/run.c
+++ b/src/grp-system/grp-utils/systemd-run/run.c
@@ -20,27 +20,27 @@
#include <getopt.h>
#include <stdio.h>
-#include "sd-bus.h"
-#include "sd-event.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
-#include "calendarspec.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "ptyfwd.h"
-#include "signal-util.h"
-#include "spawn-polkit-agent.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "user-util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/calendarspec.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/bus-unit-util.h"
+#include "systemd-shared/ptyfwd.h"
+#include "systemd-shared/spawn-polkit-agent.h"
static bool arg_ask_password = true;
static bool arg_scope = false;
diff --git a/shell-completion/bash/systemd-run b/src/grp-system/grp-utils/systemd-run/systemd-run.completion.bash
index 4116ba7eca..4116ba7eca 100644
--- a/shell-completion/bash/systemd-run
+++ b/src/grp-system/grp-utils/systemd-run/systemd-run.completion.bash
diff --git a/shell-completion/zsh/_systemd-run b/src/grp-system/grp-utils/systemd-run/systemd-run.completion.zsh
index da9f73a6d0..da9f73a6d0 100644
--- a/shell-completion/zsh/_systemd-run
+++ b/src/grp-system/grp-utils/systemd-run/systemd-run.completion.zsh
diff --git a/man/systemd-run.xml b/src/grp-system/grp-utils/systemd-run/systemd-run.xml
index 2ad8cb0835..2ad8cb0835 100644
--- a/man/systemd-run.xml
+++ b/src/grp-system/grp-utils/systemd-run/systemd-run.xml
diff --git a/docs/var-log/.gitignore b/src/grp-system/grp-utils/systemd-sysv-generator/.gitignore
index c3fea7424f..c3fea7424f 100644
--- a/docs/var-log/.gitignore
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/.gitignore
diff --git a/src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile b/src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/grp-utils/systemd-sysv-generator/Makefile b/src/grp-system/grp-utils/systemd-sysv-generator/Makefile
new file mode 100644
index 0000000000..9dec62efdc
--- /dev/null
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/Makefile
@@ -0,0 +1,46 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemd_sysv_generator_SOURCES = \
+ src/sysv-generator/sysv-generator.c
+
+systemd_sysv_generator_LDADD = \
+ libcore.la
+
+ifneq ($(HAVE_SYSV_COMPAT),)
+sysvinit_DATA = \
+ docs/sysvinit/README
+
+$(outdir)/README: docs/sysvinit/README.in
+ $(SED_PROCESS)
+
+CLEANFILES += \
+ docs/sysvinit/README
+endif # HAVE_SYSV_COMPAT
+
+EXTRA_DIST += \
+ docs/sysvinit/README.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/docs/sysvinit/README.in b/src/grp-system/grp-utils/systemd-sysv-generator/README.in
index 996402d06b..996402d06b 100644
--- a/docs/sysvinit/README.in
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/README.in
diff --git a/man/systemd-sysv-generator.xml b/src/grp-system/grp-utils/systemd-sysv-generator/systemd-sysv-generator.xml
index 2353eb3efe..2353eb3efe 100644
--- a/man/systemd-sysv-generator.xml
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/systemd-sysv-generator.xml
diff --git a/src/sysv-generator/sysv-generator.c b/src/grp-system/grp-utils/systemd-sysv-generator/sysv-generator.c
index c2c80175a2..42dc76c20e 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/grp-system/grp-utils/systemd-sysv-generator/sysv-generator.c
@@ -23,25 +23,25 @@
#include <stdio.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hashmap.h"
-#include "hexdecoct.h"
-#include "install.h"
-#include "log.h"
-#include "mkdir.h"
-#include "path-lookup.h"
-#include "path-util.h"
-#include "set.h"
-#include "special.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/path-lookup.h"
static const struct {
const char *path;
diff --git a/man/kernel-command-line.xml b/src/grp-system/kernel-command-line.xml
index 1fa31a14b7..1fa31a14b7 100644
--- a/man/kernel-command-line.xml
+++ b/src/grp-system/kernel-command-line.xml
diff --git a/src/core/.gitignore b/src/grp-system/libcore/.gitignore
index 465b4fcc20..465b4fcc20 100644
--- a/src/core/.gitignore
+++ b/src/grp-system/libcore/.gitignore
diff --git a/src/grp-system/libcore/GNUmakefile b/src/grp-system/libcore/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/libcore/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/libcore/Makefile b/src/grp-system/libcore/Makefile
new file mode 100644
index 0000000000..76e6e9ddee
--- /dev/null
+++ b/src/grp-system/libcore/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/core/automount.h b/src/grp-system/libcore/include/core/automount.h
index 76a201178e..76a201178e 100644
--- a/src/core/automount.h
+++ b/src/grp-system/libcore/include/core/automount.h
diff --git a/src/core/bus-policy.h b/src/grp-system/libcore/include/core/bus-policy.h
index 5b2c4d5953..a338f29af6 100644
--- a/src/core/bus-policy.h
+++ b/src/grp-system/libcore/include/core/bus-policy.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "kdbus.h"
-#include "list.h"
-#include "macro.h"
+#include "sd-bus/kdbus.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/macro.h"
typedef struct BusNamePolicy BusNamePolicy;
diff --git a/src/core/busname.h b/src/grp-system/libcore/include/core/busname.h
index a8562db458..aa7f0ecb1b 100644
--- a/src/core/busname.h
+++ b/src/grp-system/libcore/include/core/busname.h
@@ -22,8 +22,8 @@
typedef struct BusName BusName;
typedef struct BusNamePolicy BusNamePolicy;
-#include "unit.h"
#include "bus-policy.h"
+#include "unit.h"
typedef enum BusNameResult {
BUSNAME_SUCCESS,
diff --git a/src/core/cgroup.h b/src/grp-system/libcore/include/core/cgroup.h
index 4cd168f63e..6293b84cd7 100644
--- a/src/core/cgroup.h
+++ b/src/grp-system/libcore/include/core/cgroup.h
@@ -21,9 +21,9 @@
#include <stdbool.h>
-#include "list.h"
-#include "time-util.h"
-#include "cgroup-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/time-util.h"
typedef struct CGroupContext CGroupContext;
typedef struct CGroupDeviceAllow CGroupDeviceAllow;
diff --git a/src/core/dbus-manager.h b/src/grp-system/libcore/include/core/dbus-manager.h
index 36a2e9481b..36a2e9481b 100644
--- a/src/core/dbus-manager.h
+++ b/src/grp-system/libcore/include/core/dbus-manager.h
diff --git a/src/core/device.h b/src/grp-system/libcore/include/core/device.h
index 184a1a349b..184a1a349b 100644
--- a/src/core/device.h
+++ b/src/grp-system/libcore/include/core/device.h
diff --git a/src/core/dynamic-user.h b/src/grp-system/libcore/include/core/dynamic-user.h
index 0b8bce1a72..0b8bce1a72 100644
--- a/src/core/dynamic-user.h
+++ b/src/grp-system/libcore/include/core/dynamic-user.h
diff --git a/src/core/emergency-action.h b/src/grp-system/libcore/include/core/emergency-action.h
index 8804b59752..c463b892bc 100644
--- a/src/core/emergency-action.h
+++ b/src/grp-system/libcore/include/core/emergency-action.h
@@ -32,7 +32,8 @@ typedef enum EmergencyAction {
_EMERGENCY_ACTION_INVALID = -1
} EmergencyAction;
-#include "macro.h"
+#include "systemd-basic/macro.h"
+
#include "manager.h"
int emergency_action(Manager *m, EmergencyAction action, const char *reboot_arg, const char *reason);
diff --git a/src/core/execute.h b/src/grp-system/libcore/include/core/execute.h
index c7d0f7761e..4dad8713fc 100644
--- a/src/core/execute.h
+++ b/src/grp-system/libcore/include/core/execute.h
@@ -19,21 +19,22 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct ExecStatus ExecStatus;
-typedef struct ExecCommand ExecCommand;
-typedef struct ExecContext ExecContext;
-typedef struct ExecRuntime ExecRuntime;
-typedef struct ExecParameters ExecParameters;
-
#include <sched.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/capability.h>
-#include "cgroup-util.h"
-#include "fdset.h"
-#include "list.h"
-#include "missing.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/missing.h"
+#include "systemd-shared/fdset.h"
+
+typedef struct ExecCommand ExecCommand;
+typedef struct ExecContext ExecContext;
+typedef struct ExecParameters ExecParameters;
+typedef struct ExecRuntime ExecRuntime;
+typedef struct ExecStatus ExecStatus;
+
#include "namespace.h"
typedef enum ExecUtmpMode {
@@ -255,8 +256,8 @@ struct ExecParameters {
int stderr_fd;
};
-#include "unit.h"
#include "dynamic-user.h"
+#include "unit.h"
int exec_spawn(Unit *unit,
ExecCommand *command,
diff --git a/src/core/hostname-setup.h b/src/grp-system/libcore/include/core/hostname-setup.h
index 73e8c75c71..73e8c75c71 100644
--- a/src/core/hostname-setup.h
+++ b/src/grp-system/libcore/include/core/hostname-setup.h
diff --git a/src/core/ima-setup.h b/src/grp-system/libcore/include/core/ima-setup.h
index 472b58cb00..472b58cb00 100644
--- a/src/core/ima-setup.h
+++ b/src/grp-system/libcore/include/core/ima-setup.h
diff --git a/src/core/job.h b/src/grp-system/libcore/include/core/job.h
index 85368f0d30..3e62465695 100644
--- a/src/core/job.h
+++ b/src/grp-system/libcore/include/core/job.h
@@ -21,10 +21,10 @@
#include <stdbool.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "list.h"
-#include "unit-name.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/unit-name.h"
typedef struct Job Job;
typedef struct JobDependency JobDependency;
diff --git a/src/core/kill.h b/src/grp-system/libcore/include/core/kill.h
index b3d2056cb0..ad8583b9b0 100644
--- a/src/core/kill.h
+++ b/src/grp-system/libcore/include/core/kill.h
@@ -19,12 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct KillContext KillContext;
-
#include <stdbool.h>
#include <stdio.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
+
+typedef struct KillContext KillContext;
typedef enum KillMode {
/* The kill mode is a property of a unit. */
diff --git a/src/core/killall.h b/src/grp-system/libcore/include/core/killall.h
index acc2439f00..acc2439f00 100644
--- a/src/core/killall.h
+++ b/src/grp-system/libcore/include/core/killall.h
diff --git a/src/core/kmod-setup.h b/src/grp-system/libcore/include/core/kmod-setup.h
index 685f4df301..685f4df301 100644
--- a/src/core/kmod-setup.h
+++ b/src/grp-system/libcore/include/core/kmod-setup.h
diff --git a/src/core/load-fragment.h b/src/grp-system/libcore/include/core/load-fragment.h
index ede6b1f735..ede6b1f735 100644
--- a/src/core/load-fragment.h
+++ b/src/grp-system/libcore/include/core/load-fragment.h
diff --git a/src/core/loopback-setup.h b/src/grp-system/libcore/include/core/loopback-setup.h
index e7547b8a26..e7547b8a26 100644
--- a/src/core/loopback-setup.h
+++ b/src/grp-system/libcore/include/core/loopback-setup.h
diff --git a/src/core/machine-id-setup.h b/src/grp-system/libcore/include/core/machine-id-setup.h
index 29f4620646..29f4620646 100644
--- a/src/core/machine-id-setup.h
+++ b/src/grp-system/libcore/include/core/machine-id-setup.h
diff --git a/src/core/manager.h b/src/grp-system/libcore/include/core/manager.h
index 35172fdba9..429b86a94c 100644
--- a/src/core/manager.h
+++ b/src/grp-system/libcore/include/core/manager.h
@@ -23,14 +23,14 @@
#include <stdbool.h>
#include <stdio.h>
-#include "sd-bus.h"
-#include "sd-event.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
-#include "cgroup-util.h"
-#include "fdset.h"
-#include "hashmap.h"
-#include "list.h"
-#include "ratelimit.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-shared/fdset.h"
/* Enforce upper limit how many names we allow */
#define MANAGER_MAX_NAMES 131072 /* 128K */
@@ -68,11 +68,12 @@ typedef enum StatusType {
STATUS_TYPE_EMERGENCY,
} StatusType;
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/path-lookup.h"
+
#include "execute.h"
#include "job.h"
-#include "path-lookup.h"
#include "show-status.h"
-#include "unit-name.h"
struct Manager {
/* Note that the set of units we know of is allowed to be
diff --git a/src/core/mount-setup.h b/src/grp-system/libcore/include/core/mount-setup.h
index 647bd770ae..647bd770ae 100644
--- a/src/core/mount-setup.h
+++ b/src/grp-system/libcore/include/core/mount-setup.h
diff --git a/src/core/mount.h b/src/grp-system/libcore/include/core/mount.h
index 9f7326ba6a..148fedf354 100644
--- a/src/core/mount.h
+++ b/src/grp-system/libcore/include/core/mount.h
@@ -21,8 +21,8 @@
typedef struct Mount Mount;
-#include "kill.h"
#include "dynamic-user.h"
+#include "kill.h"
typedef enum MountExecCommand {
MOUNT_EXEC_MOUNT,
diff --git a/src/core/namespace.h b/src/grp-system/libcore/include/core/namespace.h
index 6310638e9a..8e80e2f38e 100644
--- a/src/core/namespace.h
+++ b/src/grp-system/libcore/include/core/namespace.h
@@ -20,11 +20,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct NameSpaceInfo NameSpaceInfo;
-
#include <stdbool.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
+
+typedef struct NameSpaceInfo NameSpaceInfo;
typedef enum ProtectHome {
PROTECT_HOME_NO,
diff --git a/src/core/path.h b/src/grp-system/libcore/include/core/path.h
index 4230c8fb99..4230c8fb99 100644
--- a/src/core/path.h
+++ b/src/grp-system/libcore/include/core/path.h
diff --git a/src/core/scope.h b/src/grp-system/libcore/include/core/scope.h
index eaf8e8b447..eaf8e8b447 100644
--- a/src/core/scope.h
+++ b/src/grp-system/libcore/include/core/scope.h
diff --git a/src/core/selinux-setup.h b/src/grp-system/libcore/include/core/selinux-setup.h
index 7b613249b0..7b613249b0 100644
--- a/src/core/selinux-setup.h
+++ b/src/grp-system/libcore/include/core/selinux-setup.h
diff --git a/src/core/service.h b/src/grp-system/libcore/include/core/service.h
index 2869144fcb..1ebf62eed6 100644
--- a/src/core/service.h
+++ b/src/grp-system/libcore/include/core/service.h
@@ -19,13 +19,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/ratelimit.h"
+
typedef struct Service Service;
typedef struct ServiceFDStore ServiceFDStore;
-#include "exit-status.h"
#include "kill.h"
#include "path.h"
-#include "ratelimit.h"
typedef enum ServiceRestart {
SERVICE_RESTART_NO,
diff --git a/src/core/show-status.h b/src/grp-system/libcore/include/core/show-status.h
index 9a29e72645..08d6b7f6e1 100644
--- a/src/core/show-status.h
+++ b/src/grp-system/libcore/include/core/show-status.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
/* Manager status */
diff --git a/src/core/slice.h b/src/grp-system/libcore/include/core/slice.h
index c9f3f61067..c9f3f61067 100644
--- a/src/core/slice.h
+++ b/src/grp-system/libcore/include/core/slice.h
diff --git a/src/core/smack-setup.h b/src/grp-system/libcore/include/core/smack-setup.h
index 78164c85e6..78164c85e6 100644
--- a/src/core/smack-setup.h
+++ b/src/grp-system/libcore/include/core/smack-setup.h
diff --git a/src/core/socket.h b/src/grp-system/libcore/include/core/socket.h
index 89f4664510..feba21dab3 100644
--- a/src/core/socket.h
+++ b/src/grp-system/libcore/include/core/socket.h
@@ -19,12 +19,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/socket-util.h"
+
typedef struct Socket Socket;
typedef struct SocketPeer SocketPeer;
#include "mount.h"
#include "service.h"
-#include "socket-util.h"
typedef enum SocketExecCommand {
SOCKET_EXEC_START_PRE,
diff --git a/src/core/swap.h b/src/grp-system/libcore/include/core/swap.h
index b0ef50f1e8..64db3267b2 100644
--- a/src/core/swap.h
+++ b/src/grp-system/libcore/include/core/swap.h
@@ -20,7 +20,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "libudev.h"
+#include <libudev.h>
typedef struct Swap Swap;
diff --git a/src/core/target.h b/src/grp-system/libcore/include/core/target.h
index 339aea154e..339aea154e 100644
--- a/src/core/target.h
+++ b/src/grp-system/libcore/include/core/target.h
diff --git a/src/core/timer.h b/src/grp-system/libcore/include/core/timer.h
index 9c4b64f898..9cb30249e3 100644
--- a/src/core/timer.h
+++ b/src/grp-system/libcore/include/core/timer.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Timer Timer;
+#include "systemd-basic/calendarspec.h"
-#include "calendarspec.h"
+typedef struct Timer Timer;
typedef enum TimerBase {
TIMER_ACTIVE,
diff --git a/src/core/unit.h b/src/grp-system/libcore/include/core/unit.h
index 991543664b..6864b71183 100644
--- a/src/core/unit.h
+++ b/src/grp-system/libcore/include/core/unit.h
@@ -23,16 +23,17 @@
#include <stdlib.h>
#include <unistd.h>
+#include "systemd-basic/list.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/condition.h"
+#include "systemd-shared/install.h"
+
typedef struct Unit Unit;
-typedef struct UnitVTable UnitVTable;
typedef struct UnitRef UnitRef;
typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
+typedef struct UnitVTable UnitVTable;
-#include "condition.h"
#include "emergency-action.h"
-#include "install.h"
-#include "list.h"
-#include "unit-name.h"
typedef enum KillOperation {
KILL_TERMINATE,
diff --git a/src/grp-system/libcore/src/GNUmakefile b/src/grp-system/libcore/src/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-system/libcore/src/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/libcore/src/Makefile b/src/grp-system/libcore/src/Makefile
new file mode 100644
index 0000000000..cd63651f2a
--- /dev/null
+++ b/src/grp-system/libcore/src/Makefile
@@ -0,0 +1,170 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+noinst_LTLIBRARIES += \
+ libcore.la
+
+libcore_la_SOURCES = \
+ src/core/unit.c \
+ src/core/unit.h \
+ src/core/unit-printf.c \
+ src/core/unit-printf.h \
+ src/core/job.c \
+ src/core/job.h \
+ src/core/manager.c \
+ src/core/manager.h \
+ src/core/transaction.c \
+ src/core/transaction.h \
+ src/core/load-fragment.c \
+ src/core/load-fragment.h \
+ src/core/service.c \
+ src/core/service.h \
+ src/core/socket.c \
+ src/core/socket.h \
+ src/core/busname.c \
+ src/core/busname.h \
+ src/core/bus-policy.c \
+ src/core/bus-policy.h \
+ src/core/target.c \
+ src/core/target.h \
+ src/core/device.c \
+ src/core/device.h \
+ src/core/mount.c \
+ src/core/mount.h \
+ src/core/automount.c \
+ src/core/automount.h \
+ src/core/swap.c \
+ src/core/swap.h \
+ src/core/timer.c \
+ src/core/timer.h \
+ src/core/path.c \
+ src/core/path.h \
+ src/core/slice.c \
+ src/core/slice.h \
+ src/core/scope.c \
+ src/core/scope.h \
+ src/core/load-dropin.c \
+ src/core/load-dropin.h \
+ src/core/execute.c \
+ src/core/execute.h \
+ src/core/dynamic-user.c \
+ src/core/dynamic-user.h \
+ src/core/kill.c \
+ src/core/kill.h \
+ src/core/dbus.c \
+ src/core/dbus.h \
+ src/core/dbus-manager.c \
+ src/core/dbus-manager.h \
+ src/core/dbus-unit.c \
+ src/core/dbus-unit.h \
+ src/core/dbus-job.c \
+ src/core/dbus-job.h \
+ src/core/dbus-service.c \
+ src/core/dbus-service.h \
+ src/core/dbus-socket.c \
+ src/core/dbus-socket.h \
+ src/core/dbus-busname.c \
+ src/core/dbus-busname.h \
+ src/core/dbus-target.c \
+ src/core/dbus-target.h \
+ src/core/dbus-device.c \
+ src/core/dbus-device.h \
+ src/core/dbus-mount.c \
+ src/core/dbus-mount.h \
+ src/core/dbus-automount.c \
+ src/core/dbus-automount.h \
+ src/core/dbus-swap.c \
+ src/core/dbus-swap.h \
+ src/core/dbus-timer.c \
+ src/core/dbus-timer.h \
+ src/core/dbus-path.c \
+ src/core/dbus-path.h \
+ src/core/dbus-slice.c \
+ src/core/dbus-slice.h \
+ src/core/dbus-scope.c \
+ src/core/dbus-scope.h \
+ src/core/dbus-execute.c \
+ src/core/dbus-execute.h \
+ src/core/dbus-kill.c \
+ src/core/dbus-kill.h \
+ src/core/dbus-cgroup.c \
+ src/core/dbus-cgroup.h \
+ src/core/cgroup.c \
+ src/core/cgroup.h \
+ src/core/selinux-access.c \
+ src/core/selinux-access.h \
+ src/core/selinux-setup.c \
+ src/core/selinux-setup.h \
+ src/core/smack-setup.c \
+ src/core/smack-setup.h \
+ src/core/ima-setup.c \
+ src/core/ima-setup.h \
+ src/core/locale-setup.h \
+ src/core/locale-setup.c \
+ src/core/hostname-setup.c \
+ src/core/hostname-setup.h \
+ src/core/machine-id-setup.c \
+ src/core/machine-id-setup.h \
+ src/core/mount-setup.c \
+ src/core/mount-setup.h \
+ src/core/kmod-setup.c \
+ src/core/kmod-setup.h \
+ src/core/loopback-setup.h \
+ src/core/loopback-setup.c \
+ src/core/namespace.c \
+ src/core/namespace.h \
+ src/core/killall.h \
+ src/core/killall.c \
+ src/core/audit-fd.c \
+ src/core/audit-fd.h \
+ src/core/show-status.c \
+ src/core/show-status.h \
+ src/core/emergency-action.c \
+ src/core/emergency-action.h
+
+nodist_libcore_la_SOURCES = \
+ src/core/load-fragment-gperf.c \
+ src/core/load-fragment-gperf-nulstr.c
+
+libcore_la_CFLAGS = \
+ $(PAM_CFLAGS) \
+ $(AUDIT_CFLAGS) \
+ $(KMOD_CFLAGS) \
+ $(APPARMOR_CFLAGS) \
+ $(MOUNT_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+
+libcore_la_LIBADD = \
+ libsystemd-shared.la \
+ $(PAM_LIBS) \
+ $(AUDIT_LIBS) \
+ $(KMOD_LIBS) \
+ $(APPARMOR_LIBS) \
+ $(MOUNT_LIBS)
+
+$(outdir)/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
+ $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/core/audit-fd.c b/src/grp-system/libcore/src/audit-fd.c
index 76afe3fe15..12509951b7 100644
--- a/src/core/audit-fd.c
+++ b/src/grp-system/libcore/src/audit-fd.c
@@ -27,9 +27,9 @@
#include <libaudit.h>
#include <stdbool.h>
-#include "fd-util.h"
-#include "log.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
static bool initialized = false;
static int audit_fd;
diff --git a/src/core/audit-fd.h b/src/grp-system/libcore/src/audit-fd.h
index 0eccb59210..0eccb59210 100644
--- a/src/core/audit-fd.h
+++ b/src/grp-system/libcore/src/audit-fd.h
diff --git a/src/core/automount.c b/src/grp-system/libcore/src/automount.c
index 7d7a0a6e46..e0ba6f68a9 100644
--- a/src/core/automount.c
+++ b/src/grp-system/libcore/src/automount.c
@@ -20,35 +20,37 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
-#include <linux/auto_dev-ioctl.h>
-#include <linux/auto_fs4.h>
#include <sys/epoll.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "async.h"
-#include "automount.h"
-#include "bus-error.h"
-#include "bus-util.h"
+#include <linux/auto_dev-ioctl.h>
+#include <linux/auto_fs4.h>
+
+#include "core/automount.h"
+#include "core/mount.h"
+#include "core/unit.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+
#include "dbus-automount.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "io-util.h"
-#include "label.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "mount.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "special.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "unit-name.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = {
[AUTOMOUNT_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/bus-policy.c b/src/grp-system/libcore/src/bus-policy.c
index 4907c268e8..d5bba61a93 100644
--- a/src/core/bus-policy.c
+++ b/src/grp-system/libcore/src/bus-policy.c
@@ -19,13 +19,13 @@
#include <stdlib.h>
-#include "alloc-util.h"
-#include "bus-kernel.h"
-#include "bus-policy.h"
-#include "kdbus.h"
-#include "string-table.h"
-#include "user-util.h"
-#include "util.h"
+#include "core/bus-policy.h"
+#include "sd-bus/bus-kernel.h"
+#include "sd-bus/kdbus.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
int bus_kernel_translate_access(BusPolicyAccess access) {
assert(access >= 0);
diff --git a/src/core/busname.c b/src/grp-system/libcore/src/busname.c
index b96ec09e67..3d365530bf 100644
--- a/src/core/busname.c
+++ b/src/grp-system/libcore/src/busname.c
@@ -19,23 +19,24 @@
#include <sys/mman.h>
-#include "alloc-util.h"
-#include "bus-internal.h"
-#include "bus-kernel.h"
-#include "bus-policy.h"
-#include "bus-util.h"
-#include "busname.h"
+#include "core/bus-policy.h"
+#include "core/busname.h"
+#include "core/service.h"
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-kernel.h"
+#include "sd-bus/bus-util.h"
+#include "sd-bus/kdbus.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+
#include "dbus-busname.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "kdbus.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "service.h"
-#include "signal-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
static const UnitActiveState state_translation_table[_BUSNAME_STATE_MAX] = {
[BUSNAME_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/cgroup.c b/src/grp-system/libcore/src/cgroup.c
index 23a92f9651..62222903fe 100644
--- a/src/core/cgroup.c
+++ b/src/grp-system/libcore/src/cgroup.c
@@ -20,19 +20,19 @@
#include <fcntl.h>
#include <fnmatch.h>
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "cgroup.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "stdio-util.h"
+#include "core/cgroup.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
#define CGROUP_CPU_QUOTA_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
diff --git a/src/core/dbus-automount.c b/src/grp-system/libcore/src/dbus-automount.c
index 26212b3a95..05e248758f 100644
--- a/src/core/dbus-automount.c
+++ b/src/grp-system/libcore/src/dbus-automount.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "automount.h"
-#include "bus-util.h"
+#include "core/automount.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/string-util.h"
+
#include "dbus-automount.h"
-#include "string-util.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, automount_result, AutomountResult);
diff --git a/src/core/dbus-automount.h b/src/grp-system/libcore/src/dbus-automount.h
index f41adda2a6..f41adda2a6 100644
--- a/src/core/dbus-automount.h
+++ b/src/grp-system/libcore/src/dbus-automount.h
diff --git a/src/core/dbus-busname.c b/src/grp-system/libcore/src/dbus-busname.c
index cf816ba15b..d1324e66bd 100644
--- a/src/core/dbus-busname.c
+++ b/src/grp-system/libcore/src/dbus-busname.c
@@ -17,11 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "bus-util.h"
-#include "busname.h"
+#include "core/busname.h"
+#include "core/unit.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/string-util.h"
+
#include "dbus-busname.h"
-#include "string-util.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, busname_result, BusNameResult);
diff --git a/src/core/dbus-busname.h b/src/grp-system/libcore/src/dbus-busname.h
index 8643d1a404..8643d1a404 100644
--- a/src/core/dbus-busname.h
+++ b/src/grp-system/libcore/src/dbus-busname.h
diff --git a/src/core/dbus-cgroup.c b/src/grp-system/libcore/src/dbus-cgroup.c
index c4067a95bf..875dc35e87 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/grp-system/libcore/src/dbus-cgroup.c
@@ -17,14 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "cgroup.h"
+#include "core/cgroup.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/path-util.h"
+
#include "dbus-cgroup.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "path-util.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
diff --git a/src/core/dbus-cgroup.h b/src/grp-system/libcore/src/dbus-cgroup.h
index b2212fe44e..b61ca2fcef 100644
--- a/src/core/dbus-cgroup.h
+++ b/src/grp-system/libcore/src/dbus-cgroup.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "cgroup.h"
+#include "core/cgroup.h"
extern const sd_bus_vtable bus_cgroup_vtable[];
diff --git a/src/core/dbus-device.c b/src/grp-system/libcore/src/dbus-device.c
index e1a12224d3..75e9beb55e 100644
--- a/src/core/dbus-device.c
+++ b/src/grp-system/libcore/src/dbus-device.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/device.h"
+#include "core/unit.h"
+
#include "dbus-device.h"
-#include "device.h"
-#include "unit.h"
const sd_bus_vtable bus_device_vtable[] = {
SD_BUS_VTABLE_START(0),
diff --git a/src/core/dbus-device.h b/src/grp-system/libcore/src/dbus-device.h
index eb1d8c3278..84b7ed56ec 100644
--- a/src/core/dbus-device.h
+++ b/src/grp-system/libcore/src/dbus-device.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_device_vtable[];
diff --git a/src/core/dbus-execute.c b/src/grp-system/libcore/src/dbus-execute.c
index 1a7f770db1..2e447e8043 100644
--- a/src/core/dbus-execute.c
+++ b/src/grp-system/libcore/src/dbus-execute.c
@@ -23,29 +23,30 @@
#include <seccomp.h>
#endif
-#include "af-list.h"
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "capability-util.h"
+#include "core/execute.h"
+#include "core/namespace.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/ioprio.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rlimit-util.h"
+
#include "dbus-execute.h"
-#include "env-util.h"
-#include "execute.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "ioprio.h"
-#include "missing.h"
-#include "namespace.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "rlimit-util.h"
#ifdef HAVE_SECCOMP
-#include "seccomp-util.h"
+#include "systemd-shared/seccomp-util.h"
#endif
-#include "strv.h"
-#include "syslog-util.h"
-#include "user-util.h"
-#include "utf8.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/utf8.h"
BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
diff --git a/src/core/dbus-execute.h b/src/grp-system/libcore/src/dbus-execute.h
index d0aa8e1dd5..25137d9516 100644
--- a/src/core/dbus-execute.h
+++ b/src/grp-system/libcore/src/dbus-execute.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "execute.h"
+#include "core/execute.h"
#define BUS_EXEC_STATUS_VTABLE(prefix, offset, flags) \
BUS_PROPERTY_DUAL_TIMESTAMP(prefix "StartTimestamp", (offset) + offsetof(ExecStatus, start_timestamp), flags), \
diff --git a/src/core/dbus-job.c b/src/grp-system/libcore/src/dbus-job.c
index ccf7453d47..0eddfe60d7 100644
--- a/src/core/dbus-job.c
+++ b/src/grp-system/libcore/src/dbus-job.c
@@ -17,15 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "core/job.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
-#include "alloc-util.h"
#include "dbus-job.h"
#include "dbus.h"
-#include "job.h"
-#include "log.h"
#include "selinux-access.h"
-#include "string-util.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, job_type, JobType);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_state, job_state, JobState);
diff --git a/src/core/dbus-job.h b/src/grp-system/libcore/src/dbus-job.h
index 024d06719e..4e2d4f086d 100644
--- a/src/core/dbus-job.h
+++ b/src/grp-system/libcore/src/dbus-job.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "job.h"
+#include "core/job.h"
extern const sd_bus_vtable bus_job_vtable[];
diff --git a/src/core/dbus-kill.c b/src/grp-system/libcore/src/dbus-kill.c
index 8c65be65fa..71337306a6 100644
--- a/src/core/dbus-kill.c
+++ b/src/grp-system/libcore/src/dbus-kill.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "bus-util.h"
+#include "core/kill.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/signal-util.h"
+
#include "dbus-kill.h"
-#include "kill.h"
-#include "signal-util.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_kill_mode, kill_mode, KillMode);
diff --git a/src/core/dbus-kill.h b/src/grp-system/libcore/src/dbus-kill.h
index b9b18811e3..3f908c40d9 100644
--- a/src/core/dbus-kill.h
+++ b/src/grp-system/libcore/src/dbus-kill.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "kill.h"
-#include "unit.h"
+#include "core/kill.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_kill_vtable[];
diff --git a/src/core/dbus-manager.c b/src/grp-system/libcore/src/dbus-manager.c
index d7d3d3c8ce..b704dd02cb 100644
--- a/src/core/dbus-manager.c
+++ b/src/grp-system/libcore/src/dbus-manager.c
@@ -21,31 +21,32 @@
#include <sys/prctl.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "architecture.h"
-#include "build.h"
-#include "bus-common-errors.h"
-#include "clock-util.h"
+#include "core/dbus-manager.h"
+#include "sd-bus/bus-common-errors.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/build.h"
+#include "systemd-basic/clock-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/watchdog.h"
+
#include "dbus-execute.h"
#include "dbus-job.h"
-#include "dbus-manager.h"
#include "dbus-unit.h"
#include "dbus.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "install.h"
-#include "log.h"
-#include "path-util.h"
#include "selinux-access.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "syslog-util.h"
-#include "user-util.h"
-#include "virt.h"
-#include "watchdog.h"
static UnitFileFlags unit_file_bools_to_flags(bool runtime, bool force) {
return (runtime ? UNIT_FILE_RUNTIME : 0) |
diff --git a/src/core/dbus-mount.c b/src/grp-system/libcore/src/dbus-mount.c
index 76a7a7ce97..f9f396ec70 100644
--- a/src/core/dbus-mount.c
+++ b/src/grp-system/libcore/src/dbus-mount.c
@@ -17,14 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "bus-util.h"
+#include "core/mount.h"
+#include "core/unit.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/string-util.h"
+
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-kill.h"
#include "dbus-mount.h"
-#include "mount.h"
-#include "string-util.h"
-#include "unit.h"
static int property_get_what(
sd_bus *bus,
diff --git a/src/core/dbus-mount.h b/src/grp-system/libcore/src/dbus-mount.h
index ec16166d36..81ef769a44 100644
--- a/src/core/dbus-mount.h
+++ b/src/grp-system/libcore/src/dbus-mount.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_mount_vtable[];
diff --git a/src/core/dbus-path.c b/src/grp-system/libcore/src/dbus-path.c
index 1e153e503f..ed57c2133a 100644
--- a/src/core/dbus-path.c
+++ b/src/grp-system/libcore/src/dbus-path.c
@@ -17,11 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "bus-util.h"
+#include "core/path.h"
+#include "core/unit.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/string-util.h"
+
#include "dbus-path.h"
-#include "path.h"
-#include "string-util.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, path_result, PathResult);
diff --git a/src/core/dbus-path.h b/src/grp-system/libcore/src/dbus-path.h
index d3c19e0c2b..d3c19e0c2b 100644
--- a/src/core/dbus-path.h
+++ b/src/grp-system/libcore/src/dbus-path.h
diff --git a/src/core/dbus-scope.c b/src/grp-system/libcore/src/dbus-scope.c
index 1abaf9f658..da930418d5 100644
--- a/src/core/dbus-scope.c
+++ b/src/grp-system/libcore/src/dbus-scope.c
@@ -17,18 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-internal.h"
-#include "bus-util.h"
+#include "core/scope.h"
+#include "core/unit.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+
#include "dbus-cgroup.h"
#include "dbus-kill.h"
#include "dbus-scope.h"
#include "dbus-unit.h"
#include "dbus.h"
-#include "scope.h"
#include "selinux-access.h"
-#include "unit.h"
static int bus_scope_abandon(sd_bus_message *message, void *userdata, sd_bus_error *error) {
Scope *s = userdata;
diff --git a/src/core/dbus-scope.h b/src/grp-system/libcore/src/dbus-scope.h
index 270306f508..ad1cb52adc 100644
--- a/src/core/dbus-scope.h
+++ b/src/grp-system/libcore/src/dbus-scope.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_scope_vtable[];
diff --git a/src/core/dbus-service.c b/src/grp-system/libcore/src/dbus-service.c
index 61b83d2d62..da8a2298a2 100644
--- a/src/core/dbus-service.c
+++ b/src/grp-system/libcore/src/dbus-service.c
@@ -17,20 +17,21 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "async.h"
-#include "bus-util.h"
+#include "core/service.h"
+#include "core/unit.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-kill.h"
#include "dbus-service.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "path-util.h"
-#include "service.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, service_type, ServiceType);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, service_result, ServiceResult);
diff --git a/src/core/dbus-service.h b/src/grp-system/libcore/src/dbus-service.h
index 769a53769e..1d3df67bf0 100644
--- a/src/core/dbus-service.h
+++ b/src/grp-system/libcore/src/dbus-service.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_service_vtable[];
diff --git a/src/core/dbus-slice.c b/src/grp-system/libcore/src/dbus-slice.c
index e37f50b283..ce357cadae 100644
--- a/src/core/dbus-slice.c
+++ b/src/grp-system/libcore/src/dbus-slice.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/slice.h"
+#include "core/unit.h"
+
#include "dbus-cgroup.h"
#include "dbus-slice.h"
-#include "slice.h"
-#include "unit.h"
const sd_bus_vtable bus_slice_vtable[] = {
SD_BUS_VTABLE_START(0),
diff --git a/src/core/dbus-slice.h b/src/grp-system/libcore/src/dbus-slice.h
index 52ceebb135..fa039b2c0b 100644
--- a/src/core/dbus-slice.h
+++ b/src/grp-system/libcore/src/dbus-slice.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_slice_vtable[];
diff --git a/src/core/dbus-socket.c b/src/grp-system/libcore/src/dbus-socket.c
index 21adb64e15..4bd973a882 100644
--- a/src/core/dbus-socket.c
+++ b/src/grp-system/libcore/src/dbus-socket.c
@@ -17,14 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-util.h"
+#include "core/socket.h"
+#include "core/unit.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-socket.h"
-#include "socket.h"
-#include "string-util.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, socket_result, SocketResult);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_bind_ipv6_only, socket_address_bind_ipv6_only, SocketAddressBindIPv6Only);
diff --git a/src/core/dbus-socket.h b/src/grp-system/libcore/src/dbus-socket.h
index 7a792c7a89..e68d33ace7 100644
--- a/src/core/dbus-socket.h
+++ b/src/grp-system/libcore/src/dbus-socket.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_socket_vtable[];
diff --git a/src/core/dbus-swap.c b/src/grp-system/libcore/src/dbus-swap.c
index 85a2c26b98..6e40d59808 100644
--- a/src/core/dbus-swap.c
+++ b/src/grp-system/libcore/src/dbus-swap.c
@@ -18,13 +18,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "bus-util.h"
+#include "core/swap.h"
+#include "core/unit.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/string-util.h"
+
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-swap.h"
-#include "string-util.h"
-#include "swap.h"
-#include "unit.h"
static int property_get_priority(
sd_bus *bus,
diff --git a/src/core/dbus-swap.h b/src/grp-system/libcore/src/dbus-swap.h
index 5238471f98..6c1b862665 100644
--- a/src/core/dbus-swap.h
+++ b/src/grp-system/libcore/src/dbus-swap.h
@@ -20,9 +20,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_swap_vtable[];
diff --git a/src/core/dbus-target.c b/src/grp-system/libcore/src/dbus-target.c
index 6858b1ce72..5a846432d0 100644
--- a/src/core/dbus-target.c
+++ b/src/grp-system/libcore/src/dbus-target.c
@@ -17,8 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/unit.h"
+
#include "dbus-target.h"
-#include "unit.h"
const sd_bus_vtable bus_target_vtable[] = {
SD_BUS_VTABLE_START(0),
diff --git a/src/core/dbus-target.h b/src/grp-system/libcore/src/dbus-target.h
index 9be5ce06b7..c97a9d626e 100644
--- a/src/core/dbus-target.h
+++ b/src/grp-system/libcore/src/dbus-target.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
extern const sd_bus_vtable bus_target_vtable[];
diff --git a/src/core/dbus-timer.c b/src/grp-system/libcore/src/dbus-timer.c
index efbb0e8915..6b00168361 100644
--- a/src/core/dbus-timer.c
+++ b/src/grp-system/libcore/src/dbus-timer.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-util.h"
+#include "core/timer.h"
+#include "core/unit.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/strv.h"
+
#include "dbus-timer.h"
-#include "strv.h"
-#include "timer.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, timer_result, TimerResult);
diff --git a/src/core/dbus-timer.h b/src/grp-system/libcore/src/dbus-timer.h
index 39053dc4a2..5e366918f8 100644
--- a/src/core/dbus-timer.h
+++ b/src/grp-system/libcore/src/dbus-timer.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_timer_vtable[];
diff --git a/src/core/dbus-unit.c b/src/grp-system/libcore/src/dbus-unit.c
index 69e249c844..93391c2c6e 100644
--- a/src/core/dbus-unit.c
+++ b/src/grp-system/libcore/src/dbus-unit.c
@@ -17,23 +17,24 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "cgroup-util.h"
#include "dbus-unit.h"
#include "dbus.h"
-#include "fd-util.h"
-#include "locale-util.h"
-#include "log.h"
-#include "process-util.h"
#include "selinux-access.h"
-#include "signal-util.h"
-#include "special.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_load_state, unit_load_state, UnitLoadState);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_job_mode, job_mode, JobMode);
diff --git a/src/core/dbus-unit.h b/src/grp-system/libcore/src/dbus-unit.h
index b280de7a1d..5133bec287 100644
--- a/src/core/dbus-unit.h
+++ b/src/grp-system/libcore/src/dbus-unit.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_unit_vtable[];
extern const sd_bus_vtable bus_unit_cgroup_vtable[];
diff --git a/src/core/dbus.c b/src/grp-system/libcore/src/dbus.c
index 070974fe66..77b5dc81cb 100644
--- a/src/core/dbus.c
+++ b/src/grp-system/libcore/src/dbus.c
@@ -21,30 +21,31 @@
#include <sys/epoll.h>
#include <unistd.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "core/dbus-manager.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/user-util.h"
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-internal.h"
-#include "bus-util.h"
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-job.h"
#include "dbus-kill.h"
-#include "dbus-manager.h"
#include "dbus-unit.h"
#include "dbus.h"
-#include "fd-util.h"
-#include "log.h"
-#include "missing.h"
-#include "mkdir.h"
#include "selinux-access.h"
-#include "special.h"
-#include "string-util.h"
-#include "strv.h"
-#include "strxcpyx.h"
-#include "user-util.h"
#define CONNECTIONS_MAX 4096
diff --git a/src/core/dbus.h b/src/grp-system/libcore/src/dbus.h
index a092ed9d76..9f892599cc 100644
--- a/src/core/dbus.h
+++ b/src/grp-system/libcore/src/dbus.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "manager.h"
+#include "core/manager.h"
int bus_send_queued_message(Manager *m);
diff --git a/src/core/device.c b/src/grp-system/libcore/src/device.c
index 4b9e84aeb6..f7865195d7 100644
--- a/src/core/device.c
+++ b/src/grp-system/libcore/src/device.c
@@ -20,20 +20,21 @@
#include <errno.h>
#include <sys/epoll.h>
-#include "libudev.h"
+#include <libudev.h>
+
+#include "core/device.h"
+#include "core/swap.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/udev-util.h"
-#include "alloc-util.h"
#include "dbus-device.h"
-#include "device.h"
-#include "log.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "swap.h"
-#include "udev-util.h"
-#include "unit-name.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
[DEVICE_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/dynamic-user.c b/src/grp-system/libcore/src/dynamic-user.c
index e1846e1adb..9a1ea09e03 100644
--- a/src/core/dynamic-user.c
+++ b/src/grp-system/libcore/src/dynamic-user.c
@@ -21,15 +21,15 @@
#include <pwd.h>
#include <sys/file.h>
-#include "dynamic-user.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "parse-util.h"
-#include "random-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "fileio.h"
+#include "core/dynamic-user.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
/* Takes a value generated randomly or by hashing and turns it into a UID in the right range */
#define UID_CLAMP_INTO_RANGE(rnd) (((uid_t) (rnd) % (DYNAMIC_UID_MAX - DYNAMIC_UID_MIN + 1)) + DYNAMIC_UID_MIN)
diff --git a/src/core/emergency-action.c b/src/grp-system/libcore/src/emergency-action.c
index 90232bc57a..2c85702970 100644
--- a/src/core/emergency-action.c
+++ b/src/grp-system/libcore/src/emergency-action.c
@@ -19,14 +19,15 @@
***/
#include <sys/reboot.h>
+
#include <linux/reboot.h>
-#include "bus-error.h"
-#include "bus-util.h"
-#include "emergency-action.h"
-#include "special.h"
-#include "string-table.h"
-#include "terminal-util.h"
+#include "core/emergency-action.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/terminal-util.h"
static void log_and_status(Manager *m, const char *message, const char *reason) {
log_warning("%s: %s", message, reason);
diff --git a/src/core/execute.c b/src/grp-system/libcore/src/execute.c
index 85ee82c3e1..cbe772bf9f 100644
--- a/src/core/execute.c
+++ b/src/grp-system/libcore/src/execute.c
@@ -53,56 +53,56 @@
#include <sys/apparmor.h>
#endif
-#include "sd-messages.h"
+#include <systemd/sd-messages.h>
-#include "af-list.h"
-#include "alloc-util.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
#ifdef HAVE_APPARMOR
-#include "apparmor-util.h"
+#include "systemd-shared/apparmor-util.h"
#endif
-#include "async.h"
-#include "barrier.h"
-#include "cap-list.h"
-#include "capability-util.h"
-#include "def.h"
-#include "env-util.h"
-#include "errno-list.h"
-#include "execute.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "glob-util.h"
-#include "io-util.h"
-#include "ioprio.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "namespace.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "rlimit-util.h"
-#include "rm-rf.h"
+#include "core/execute.h"
+#include "core/namespace.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/barrier.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/errno-list.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/ioprio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/rm-rf.h"
#ifdef HAVE_SECCOMP
-#include "seccomp-util.h"
+#include "systemd-shared/seccomp-util.h"
#endif
-#include "securebits.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "smack-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "syslog-util.h"
-#include "terminal-util.h"
-#include "unit.h"
-#include "user-util.h"
-#include "util.h"
-#include "utmp-wtmp.h"
+#include "core/unit.h"
+#include "systemd-basic/securebits.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/utmp-wtmp.h"
#define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
#define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
diff --git a/src/core/hostname-setup.c b/src/grp-system/libcore/src/hostname-setup.c
index 68be52856b..6170d5e030 100644
--- a/src/core/hostname-setup.c
+++ b/src/grp-system/libcore/src/hostname-setup.c
@@ -21,14 +21,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include "alloc-util.h"
-#include "fileio.h"
-#include "hostname-setup.h"
-#include "hostname-util.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "util.h"
+#include "core/hostname-setup.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
int hostname_setup(void) {
int r;
diff --git a/src/core/ima-setup.c b/src/grp-system/libcore/src/ima-setup.c
index d1b0ce76ef..d1ec4852c9 100644
--- a/src/core/ima-setup.c
+++ b/src/grp-system/libcore/src/ima-setup.c
@@ -22,11 +22,11 @@
#include <errno.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "fileio.h"
-#include "ima-setup.h"
-#include "log.h"
-#include "util.h"
+#include "core/ima-setup.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
#define IMA_SECFS_DIR "/sys/kernel/security/ima"
#define IMA_SECFS_POLICY IMA_SECFS_DIR "/policy"
diff --git a/src/core/job.c b/src/grp-system/libcore/src/job.c
index ac6910a906..69f5ae5cfc 100644
--- a/src/core/job.c
+++ b/src/grp-system/libcore/src/job.c
@@ -19,27 +19,28 @@
#include <errno.h>
-#include "sd-id128.h"
-#include "sd-messages.h"
+#include <systemd/sd-id128.h>
+#include <systemd/sd-messages.h>
+
+#include "core/job.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/virt.h"
-#include "alloc-util.h"
-#include "async.h"
#include "dbus-job.h"
#include "dbus.h"
-#include "escape.h"
-#include "job.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "set.h"
-#include "special.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "unit.h"
-#include "virt.h"
Job* job_new_raw(Unit *unit) {
Job *j;
diff --git a/src/core/kill.c b/src/grp-system/libcore/src/kill.c
index 6854587d54..2f6d81f4eb 100644
--- a/src/core/kill.c
+++ b/src/grp-system/libcore/src/kill.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "kill.h"
-#include "signal-util.h"
-#include "string-table.h"
-#include "util.h"
+#include "core/kill.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/util.h"
void kill_context_init(KillContext *c) {
assert(c);
diff --git a/src/core/killall.c b/src/grp-system/libcore/src/killall.c
index a8b814e868..3e4b5e5186 100644
--- a/src/core/killall.c
+++ b/src/grp-system/libcore/src/killall.c
@@ -22,17 +22,17 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "def.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "killall.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "set.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "core/killall.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
static bool ignore_proc(pid_t pid, bool warn_rootfs) {
_cleanup_fclose_ FILE *f = NULL;
diff --git a/src/core/kmod-setup.c b/src/grp-system/libcore/src/kmod-setup.c
index fd1021f706..0f935380b2 100644
--- a/src/core/kmod-setup.c
+++ b/src/grp-system/libcore/src/kmod-setup.c
@@ -24,10 +24,10 @@
#include <libkmod.h>
#endif
-#include "bus-util.h"
-#include "capability-util.h"
-#include "kmod-setup.h"
-#include "macro.h"
+#include "core/kmod-setup.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/macro.h"
#ifdef HAVE_KMOD
static void systemd_kmod_log(
diff --git a/src/shared/linux/auto_dev-ioctl.h b/src/grp-system/libcore/src/linux/auto_dev-ioctl.h
index aeaeb3ea7a..aeaeb3ea7a 100644
--- a/src/shared/linux/auto_dev-ioctl.h
+++ b/src/grp-system/libcore/src/linux/auto_dev-ioctl.h
diff --git a/src/core/load-dropin.c b/src/grp-system/libcore/src/load-dropin.c
index f83fa09301..4374a1fc25 100644
--- a/src/core/load-dropin.c
+++ b/src/grp-system/libcore/src/load-dropin.c
@@ -18,13 +18,14 @@
***/
-#include "conf-parser.h"
+#include "core/load-fragment.h"
+#include "core/unit.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/conf-parser.h"
+
#include "load-dropin.h"
-#include "load-fragment.h"
-#include "log.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "unit.h"
static int add_dependency_consumer(
UnitDependency dependency,
diff --git a/src/core/load-dropin.h b/src/grp-system/libcore/src/load-dropin.h
index 942d26724e..aa0fa024de 100644
--- a/src/core/load-dropin.h
+++ b/src/grp-system/libcore/src/load-dropin.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "dropin.h"
-#include "unit.h"
+#include "core/unit.h"
+#include "systemd-shared/dropin.h"
/* Read service data supplementary drop-in directories */
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/grp-system/libcore/src/load-fragment-gperf.gperf.m4
index af2f9d960b..11b5dd5dc2 100644
--- a/src/core/load-fragment-gperf.gperf.m4
+++ b/src/grp-system/libcore/src/load-fragment-gperf.gperf.m4
@@ -1,8 +1,9 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
-#include "load-fragment.h"
-#include "missing.h"
+
+#include "core/load-fragment.h"
+#include "systemd-basic/missing.h"
+#include "systemd-shared/conf-parser.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/core/load-fragment.c b/src/grp-system/libcore/src/load-fragment.c
index cbc826809e..927615360e 100644
--- a/src/core/load-fragment.c
+++ b/src/grp-system/libcore/src/load-fragment.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <fcntl.h>
+
#include <linux/fs.h>
#include <linux/oom.h>
#ifdef HAVE_SECCOMP
@@ -30,43 +31,44 @@
#include <sys/resource.h>
#include <sys/stat.h>
-#include "af-list.h"
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-internal.h"
-#include "bus-util.h"
-#include "cap-list.h"
-#include "capability-util.h"
-#include "cgroup.h"
-#include "conf-parser.h"
-#include "cpu-set-util.h"
-#include "env-util.h"
-#include "errno-list.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "ioprio.h"
-#include "load-fragment.h"
-#include "log.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "rlimit-util.h"
+#include "core/cgroup.h"
+#include "core/load-fragment.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/cpu-set-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/errno-list.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/ioprio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-shared/conf-parser.h"
#ifdef HAVE_SECCOMP
-#include "seccomp-util.h"
+#include "systemd-shared/seccomp-util.h"
#endif
-#include "securebits.h"
-#include "signal-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
+#include "core/unit.h"
+#include "systemd-basic/securebits.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/web-util.h"
+
#include "unit-printf.h"
-#include "unit.h"
-#include "user-util.h"
-#include "utf8.h"
-#include "web-util.h"
int config_parse_warn_compat(
const char *unit,
diff --git a/src/core/locale-setup.c b/src/grp-system/libcore/src/locale-setup.c
index ccf61d29fb..1794b474b8 100644
--- a/src/core/locale-setup.c
+++ b/src/grp-system/libcore/src/locale-setup.c
@@ -20,14 +20,15 @@
#include <errno.h>
#include <stdlib.h>
-#include "env-util.h"
-#include "fileio.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+
#include "locale-setup.h"
-#include "locale-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
-#include "virt.h"
int locale_setup(char ***environment) {
char **add;
diff --git a/src/core/locale-setup.h b/src/grp-system/libcore/src/locale-setup.h
index 3b97497afe..3b97497afe 100644
--- a/src/core/locale-setup.h
+++ b/src/grp-system/libcore/src/locale-setup.h
diff --git a/src/core/loopback-setup.c b/src/grp-system/libcore/src/loopback-setup.c
index 04062a7910..8eb6251bd7 100644
--- a/src/core/loopback-setup.c
+++ b/src/grp-system/libcore/src/loopback-setup.c
@@ -20,11 +20,10 @@
#include <net/if.h>
#include <stdlib.h>
-#include "sd-netlink.h"
-
-#include "loopback-setup.h"
-#include "missing.h"
-#include "netlink-util.h"
+#include "core/loopback-setup.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-staging/sd-netlink.h"
static int start_loopback(sd_netlink *rtnl) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
diff --git a/src/core/machine-id-setup.c b/src/grp-system/libcore/src/machine-id-setup.c
index 76dfcfa6d7..a8c6ae046c 100644
--- a/src/core/machine-id-setup.c
+++ b/src/grp-system/libcore/src/machine-id-setup.c
@@ -22,24 +22,24 @@
#include <sys/mount.h>
#include <unistd.h>
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "id128-util.h"
-#include "log.h"
-#include "machine-id-setup.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "umask-util.h"
-#include "util.h"
-#include "virt.h"
+#include <systemd/sd-id128.h>
+
+#include "core/machine-id-setup.h"
+#include "sd-id128/id128-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
static int generate_machine_id(const char *root, sd_id128_t *ret) {
const char *dbus_machine_id;
diff --git a/src/core/manager.c b/src/grp-system/libcore/src/manager.c
index ffccfdcd5e..bad8cf0dbb 100644
--- a/src/core/manager.c
+++ b/src/grp-system/libcore/src/manager.c
@@ -20,7 +20,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/kd.h>
#include <signal.h>
#include <string.h>
#include <sys/epoll.h>
@@ -31,61 +30,64 @@
#include <sys/wait.h>
#include <unistd.h>
+#include <linux/kd.h>
+
#ifdef HAVE_AUDIT
#include <libaudit.h>
#endif
-#include "sd-daemon.h"
-#include "sd-messages.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-messages.h>
+
+#include "core/dbus-manager.h"
+#include "core/manager.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-kernel.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/boot-timestamps.h"
+#include "systemd-shared/clean-ipc.h"
+#include "systemd-shared/path-lookup.h"
+#include "systemd-shared/watchdog.h"
-#include "alloc-util.h"
#include "audit-fd.h"
-#include "boot-timestamps.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-kernel.h"
-#include "bus-util.h"
-#include "clean-ipc.h"
#include "dbus-job.h"
-#include "dbus-manager.h"
#include "dbus-unit.h"
#include "dbus.h"
-#include "dirent-util.h"
-#include "env-util.h"
-#include "escape.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "io-util.h"
#include "locale-setup.h"
-#include "log.h"
-#include "macro.h"
-#include "manager.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-lookup.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "ratelimit.h"
-#include "rm-rf.h"
-#include "signal-util.h"
-#include "special.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "time-util.h"
#include "transaction.h"
-#include "umask-util.h"
-#include "unit-name.h"
-#include "user-util.h"
-#include "util.h"
-#include "virt.h"
-#include "watchdog.h"
#define NOTIFY_RCVBUF_SIZE (8*1024*1024)
#define CGROUPS_AGENT_RCVBUF_SIZE (8*1024*1024)
diff --git a/src/core/mount-setup.c b/src/grp-system/libcore/src/mount-setup.c
index ca63a93e8b..46e6f71425 100644
--- a/src/core/mount-setup.c
+++ b/src/grp-system/libcore/src/mount-setup.c
@@ -23,26 +23,26 @@
#include <sys/mount.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "dev-setup.h"
-#include "efivars.h"
-#include "fs-util.h"
-#include "label.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "mount-setup.h"
-#include "mount-util.h"
-#include "path-util.h"
-#include "set.h"
-#include "smack-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
-#include "virt.h"
+#include "core/mount-setup.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/dev-setup.h"
+#include "systemd-shared/efivars.h"
typedef enum MountMode {
MNT_NONE = 0,
diff --git a/src/core/mount.c b/src/grp-system/libcore/src/mount.c
index d749e49df5..06e8313e3d 100644
--- a/src/core/mount.c
+++ b/src/grp-system/libcore/src/mount.c
@@ -22,29 +22,30 @@
#include <stdio.h>
#include <sys/epoll.h>
-#include "sd-messages.h"
+#include <systemd/sd-messages.h>
+
+#include "core/manager.h"
+#include "core/mount-setup.h"
+#include "core/mount.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/fstab-util.h"
-#include "alloc-util.h"
#include "dbus-mount.h"
-#include "escape.h"
-#include "exit-status.h"
-#include "formats-util.h"
-#include "fstab-util.h"
-#include "log.h"
-#include "manager.h"
-#include "mkdir.h"
-#include "mount-setup.h"
-#include "mount-util.h"
-#include "mount.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "unit.h"
#define RETRY_UMOUNT_MAX 32
diff --git a/src/core/namespace.c b/src/grp-system/libcore/src/namespace.c
index 1195e9a854..988516d775 100644
--- a/src/core/namespace.c
+++ b/src/grp-system/libcore/src/namespace.c
@@ -24,26 +24,27 @@
#include <sys/mount.h>
#include <sys/stat.h>
#include <unistd.h>
+
#include <linux/fs.h>
-#include "alloc-util.h"
-#include "dev-setup.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "loopback-setup.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "namespace.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "socket-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "umask-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "core/loopback-setup.h"
+#include "core/namespace.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/dev-setup.h"
#define DEV_MOUNT_OPTIONS (MS_NOSUID|MS_STRICTATIME|MS_NOEXEC)
diff --git a/src/core/path.c b/src/grp-system/libcore/src/path.c
index 83f794be89..a1b0bdd042 100644
--- a/src/core/path.c
+++ b/src/grp-system/libcore/src/path.c
@@ -22,21 +22,22 @@
#include <sys/inotify.h>
#include <unistd.h>
-#include "bus-error.h"
-#include "bus-util.h"
+#include "core/path.h"
+#include "core/unit.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+
#include "dbus-path.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "glob-util.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path.h"
-#include "special.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "unit-name.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_PATH_STATE_MAX] = {
[PATH_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/scope.c b/src/grp-system/libcore/src/scope.c
index d6e1f8e392..da1aad4a32 100644
--- a/src/core/scope.c
+++ b/src/grp-system/libcore/src/scope.c
@@ -20,17 +20,18 @@
#include <errno.h>
#include <unistd.h>
-#include "alloc-util.h"
+#include "core/scope.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+
#include "dbus-scope.h"
#include "load-dropin.h"
-#include "log.h"
-#include "scope.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_SCOPE_STATE_MAX] = {
[SCOPE_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/selinux-access.c b/src/grp-system/libcore/src/selinux-access.c
index 2b96a9551b..6807af86c1 100644
--- a/src/core/selinux-access.c
+++ b/src/grp-system/libcore/src/selinux-access.c
@@ -29,17 +29,18 @@
#include <libaudit.h>
#endif
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "audit-fd.h"
-#include "bus-util.h"
-#include "log.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "stdio-util.h"
-#include "strv.h"
-#include "util.h"
static bool initialized = false;
diff --git a/src/core/selinux-access.h b/src/grp-system/libcore/src/selinux-access.h
index f46370d020..6cd37bed3d 100644
--- a/src/core/selinux-access.h
+++ b/src/grp-system/libcore/src/selinux-access.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "bus-util.h"
-#include "manager.h"
+#include "core/manager.h"
+#include "sd-bus/bus-util.h"
int mac_selinux_generic_access_check(sd_bus_message *message, const char *path, const char *permission, sd_bus_error *error);
diff --git a/src/core/selinux-setup.c b/src/grp-system/libcore/src/selinux-setup.c
index 527aa8add0..d81a8e7fa1 100644
--- a/src/core/selinux-setup.c
+++ b/src/grp-system/libcore/src/selinux-setup.c
@@ -25,12 +25,12 @@
#include <selinux/selinux.h>
#endif
-#include "log.h"
-#include "macro.h"
-#include "selinux-setup.h"
-#include "selinux-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "core/selinux-setup.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#ifdef HAVE_SELINUX
_printf_(2,3)
diff --git a/src/core/service.c b/src/grp-system/libcore/src/service.c
index a7274a758f..0defd0cc35 100644
--- a/src/core/service.c
+++ b/src/grp-system/libcore/src/service.c
@@ -21,38 +21,39 @@
#include <signal.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "async.h"
-#include "bus-error.h"
-#include "bus-kernel.h"
-#include "bus-util.h"
+#include "core/load-fragment.h"
+#include "core/manager.h"
+#include "core/service.h"
+#include "core/unit.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-kernel.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+
#include "dbus-service.h"
-#include "def.h"
-#include "env-util.h"
-#include "escape.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
#include "load-dropin.h"
-#include "load-fragment.h"
-#include "log.h"
-#include "manager.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "service.h"
-#include "signal-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
#include "unit-printf.h"
-#include "unit.h"
-#include "utf8.h"
-#include "util.h"
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/show-status.c b/src/grp-system/libcore/src/show-status.c
index 65f9cb888a..1b2a7480d5 100644
--- a/src/core/show-status.c
+++ b/src/grp-system/libcore/src/show-status.c
@@ -17,14 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "parse-util.h"
-#include "show-status.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "core/show-status.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
int parse_show_status(const char *v, ShowStatus *ret) {
int r;
diff --git a/src/core/slice.c b/src/grp-system/libcore/src/slice.c
index ed5d3fd701..8bb47534fc 100644
--- a/src/core/slice.c
+++ b/src/grp-system/libcore/src/slice.c
@@ -19,15 +19,16 @@
#include <errno.h>
-#include "alloc-util.h"
+#include "core/slice.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+
#include "dbus-slice.h"
-#include "log.h"
-#include "slice.h"
-#include "special.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = {
[SLICE_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/smack-setup.c b/src/grp-system/libcore/src/smack-setup.c
index 5a6d11cfa1..5d94873419 100644
--- a/src/core/smack-setup.c
+++ b/src/grp-system/libcore/src/smack-setup.c
@@ -26,15 +26,15 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
-#include "smack-setup.h"
-#include "string-util.h"
-#include "util.h"
+#include "core/smack-setup.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#ifdef HAVE_SMACK
diff --git a/src/core/socket.c b/src/grp-system/libcore/src/socket.c
index 0b1c4acfec..9d7a72ef5f 100644
--- a/src/core/socket.c
+++ b/src/grp-system/libcore/src/socket.c
@@ -26,38 +26,40 @@
#include <sys/epoll.h>
#include <sys/stat.h>
#include <unistd.h>
+
#include <linux/sctp.h>
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "copy.h"
+#include "core/socket.h"
+#include "core/unit.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+
#include "dbus-socket.h"
-#include "def.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "io-util.h"
-#include "label.h"
-#include "log.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "smack-util.h"
-#include "socket.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
#include "unit-printf.h"
-#include "unit.h"
-#include "user-util.h"
-#include "in-addr-util.h"
struct SocketPeer {
unsigned n_ref;
diff --git a/src/core/swap.c b/src/grp-system/libcore/src/swap.c
index 2228a254bb..85f789e12b 100644
--- a/src/core/swap.c
+++ b/src/grp-system/libcore/src/swap.c
@@ -22,26 +22,27 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "libudev.h"
+#include <libudev.h>
+
+#include "core/swap.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/fstab-util.h"
+#include "systemd-shared/udev-util.h"
-#include "alloc-util.h"
#include "dbus-swap.h"
-#include "escape.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "fstab-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "swap.h"
-#include "udev-util.h"
-#include "unit-name.h"
-#include "unit.h"
-#include "virt.h"
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/target.c b/src/grp-system/libcore/src/target.c
index 765c1f3fa4..1e5212d75d 100644
--- a/src/core/target.c
+++ b/src/grp-system/libcore/src/target.c
@@ -17,13 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/target.h"
+#include "core/unit.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+
#include "dbus-target.h"
-#include "log.h"
-#include "special.h"
-#include "string-util.h"
-#include "unit-name.h"
-#include "unit.h"
-#include "target.h"
static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = {
[TARGET_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/timer.c b/src/grp-system/libcore/src/timer.c
index 2469a517ea..8789dce022 100644
--- a/src/core/timer.c
+++ b/src/grp-system/libcore/src/timer.c
@@ -19,21 +19,22 @@
#include <errno.h>
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
+#include "core/timer.h"
+#include "core/unit.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/virt.h"
+
#include "dbus-timer.h"
-#include "fs-util.h"
-#include "parse-util.h"
-#include "random-util.h"
-#include "special.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "timer.h"
-#include "unit-name.h"
-#include "unit.h"
-#include "user-util.h"
-#include "virt.h"
static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = {
[TIMER_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/transaction.c b/src/grp-system/libcore/src/transaction.c
index e22e3b30c2..b9b28900e9 100644
--- a/src/core/transaction.c
+++ b/src/grp-system/libcore/src/transaction.c
@@ -20,12 +20,13 @@
#include <fcntl.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "terminal-util.h"
-#include "transaction.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/terminal-util.h"
+
#include "dbus-unit.h"
+#include "transaction.h"
static void transaction_unlink_job(Transaction *tr, Job *j, bool delete_dependencies);
diff --git a/src/core/transaction.h b/src/grp-system/libcore/src/transaction.h
index 6a3f927b0f..e4066a0963 100644
--- a/src/core/transaction.h
+++ b/src/grp-system/libcore/src/transaction.h
@@ -19,12 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Transaction Transaction;
+#include "core/job.h"
+#include "core/manager.h"
+#include "core/unit.h"
+#include "systemd-basic/hashmap.h"
-#include "hashmap.h"
-#include "job.h"
-#include "manager.h"
-#include "unit.h"
+typedef struct Transaction Transaction;
struct Transaction {
/* Jobs to be added */
diff --git a/src/core/unit-printf.c b/src/grp-system/libcore/src/unit-printf.c
index f11df42af3..2f73214295 100644
--- a/src/core/unit-printf.c
+++ b/src/grp-system/libcore/src/unit-printf.c
@@ -17,17 +17,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "formats-util.h"
-#include "macro.h"
-#include "specifier.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/specifier.h"
+
#include "unit-printf.h"
-#include "unit.h"
-#include "user-util.h"
static int specifier_prefix_and_instance(char specifier, void *data, void *userdata, char **ret) {
Unit *u = userdata;
diff --git a/src/core/unit-printf.h b/src/grp-system/libcore/src/unit-printf.h
index 4fc8531228..7ef76e5bb9 100644
--- a/src/core/unit-printf.h
+++ b/src/grp-system/libcore/src/unit-printf.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "unit.h"
+#include "core/unit.h"
int unit_name_printf(Unit *u, const char* text, char **ret);
int unit_full_printf(Unit *u, const char *text, char **ret);
diff --git a/src/core/unit.c b/src/grp-system/libcore/src/unit.c
index e664e23892..364208dbad 100644
--- a/src/core/unit.c
+++ b/src/grp-system/libcore/src/unit.c
@@ -23,42 +23,43 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "sd-id128.h"
-#include "sd-messages.h"
+#include <systemd/sd-id128.h>
+#include <systemd/sd-messages.h>
+
+#include "core/execute.h"
+#include "core/load-fragment.h"
+#include "core/unit.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-util.h"
+#include "sd-id128/id128-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/dropin.h"
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
#include "dbus-unit.h"
#include "dbus.h"
-#include "dropin.h"
-#include "escape.h"
-#include "execute.h"
-#include "fileio-label.h"
-#include "formats-util.h"
-#include "id128-util.h"
#include "load-dropin.h"
-#include "load-fragment.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "set.h"
-#include "signal-util.h"
-#include "special.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "umask-util.h"
-#include "unit-name.h"
-#include "unit.h"
-#include "user-util.h"
-#include "virt.h"
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = &service_vtable,
diff --git a/shell-completion/zsh/.gitignore b/src/grp-system/systemctl/.gitignore
index 75f13ad6d1..ebd59d3c9e 100644
--- a/shell-completion/zsh/.gitignore
+++ b/src/grp-system/systemctl/.gitignore
@@ -1 +1,2 @@
+/systemctl
/_systemctl
diff --git a/src/grp-system/systemctl/GNUmakefile b/src/grp-system/systemctl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemctl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemctl/Makefile b/src/grp-system/systemctl/Makefile
new file mode 100644
index 0000000000..3551118514
--- /dev/null
+++ b/src/grp-system/systemctl/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += systemctl
+systemctl_SOURCES = \
+ src/systemctl/systemctl.c
+
+systemctl_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/man/halt.xml b/src/grp-system/systemctl/halt.xml
index e3fa60a915..e3fa60a915 100644
--- a/man/halt.xml
+++ b/src/grp-system/systemctl/halt.xml
diff --git a/man/runlevel.xml b/src/grp-system/systemctl/runlevel.xml
index ca29c7c22c..ca29c7c22c 100644
--- a/man/runlevel.xml
+++ b/src/grp-system/systemctl/runlevel.xml
diff --git a/man/shutdown.xml b/src/grp-system/systemctl/shutdown.xml
index a8af387c67..a8af387c67 100644
--- a/man/shutdown.xml
+++ b/src/grp-system/systemctl/shutdown.xml
diff --git a/src/systemctl/systemctl.c b/src/grp-system/systemctl/systemctl.c
index dd3b931cd6..086c9b494b 100644
--- a/src/systemctl/systemctl.c
+++ b/src/grp-system/systemctl/systemctl.c
@@ -21,7 +21,6 @@
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
-#include <linux/reboot.h>
#include <locale.h>
#include <stdbool.h>
#include <stddef.h>
@@ -31,60 +30,62 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-daemon.h"
-#include "sd-login.h"
-
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-message.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
-#include "cgroup-show.h"
-#include "cgroup-util.h"
-#include "copy.h"
-#include "dropin.h"
-#include "efivars.h"
-#include "env-util.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "glob-util.h"
-#include "hostname-util.h"
-#include "initreq.h"
-#include "install.h"
-#include "io-util.h"
-#include "list.h"
-#include "locale-util.h"
-#include "log.h"
-#include "logs-show.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "path-lookup.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "rlimit-util.h"
-#include "set.h"
-#include "sigbus.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "spawn-ask-password-agent.h"
-#include "spawn-polkit-agent.h"
-#include "special.h"
-#include "stat-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "user-util.h"
-#include "util.h"
-#include "utmp-wtmp.h"
-#include "verbs.h"
-#include "virt.h"
+#include <linux/reboot.h>
+
+#include <systemd/sd-bus.h>
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-login.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-message.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/bus-unit-util.h"
+#include "systemd-shared/cgroup-show.h"
+#include "systemd-shared/dropin.h"
+#include "systemd-shared/efivars.h"
+#include "systemd-shared/initreq.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/logs-show.h"
+#include "systemd-shared/pager.h"
+#include "systemd-shared/path-lookup.h"
+#include "systemd-shared/spawn-ask-password-agent.h"
+#include "systemd-shared/spawn-polkit-agent.h"
+#include "systemd-shared/utmp-wtmp.h"
/* The init script exit status codes
0 program is running or service is OK
diff --git a/shell-completion/bash/systemctl.in b/src/grp-system/systemctl/systemctl.completion.bash.in
index dcf71a1f51..dcf71a1f51 100644
--- a/shell-completion/bash/systemctl.in
+++ b/src/grp-system/systemctl/systemctl.completion.bash.in
diff --git a/shell-completion/zsh/_systemctl.in b/src/grp-system/systemctl/systemctl.completion.zsh.in
index 03a1c930b0..03a1c930b0 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/src/grp-system/systemctl/systemctl.completion.zsh.in
diff --git a/man/systemctl.xml b/src/grp-system/systemctl/systemctl.xml
index dfa00e0c03..dfa00e0c03 100644
--- a/man/systemctl.xml
+++ b/src/grp-system/systemctl/systemctl.xml
diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/grp-system/systemctl/systemd-sysv-install.SKELETON
index a53a3e6221..a53a3e6221 100755
--- a/src/systemctl/systemd-sysv-install.SKELETON
+++ b/src/grp-system/systemctl/systemd-sysv-install.SKELETON
diff --git a/man/systemd.preset.xml b/src/grp-system/systemctl/systemd.preset.xml
index d09167baaf..d09167baaf 100644
--- a/man/systemd.preset.xml
+++ b/src/grp-system/systemctl/systemd.preset.xml
diff --git a/man/telinit.xml b/src/grp-system/systemctl/telinit.xml
index 02d31fbd46..02d31fbd46 100644
--- a/man/telinit.xml
+++ b/src/grp-system/systemctl/telinit.xml
diff --git a/src/grp-system/systemd-cgroups-agent/GNUmakefile b/src/grp-system/systemd-cgroups-agent/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemd-cgroups-agent/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemd-cgroups-agent/Makefile b/src/grp-system/systemd-cgroups-agent/Makefile
new file mode 100644
index 0000000000..5d49f891fd
--- /dev/null
+++ b/src/grp-system/systemd-cgroups-agent/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-cgroups-agent
+systemd_cgroups_agent_SOURCES = \
+ src/cgroups-agent/cgroups-agent.c
+
+systemd_cgroups_agent_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/cgroups-agent/cgroups-agent.c b/src/grp-system/systemd-cgroups-agent/cgroups-agent.c
index d7c722ac3d..1475334fc1 100644
--- a/src/cgroups-agent/cgroups-agent.c
+++ b/src/grp-system/systemd-cgroups-agent/cgroups-agent.c
@@ -20,9 +20,9 @@
#include <stdlib.h>
#include <sys/socket.h>
-#include "fd-util.h"
-#include "log.h"
-#include "socket-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/socket-util.h"
int main(int argc, char *argv[]) {
diff --git a/src/grp-system/systemd-shutdown/GNUmakefile b/src/grp-system/systemd-shutdown/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemd-shutdown/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemd-shutdown/Makefile b/src/grp-system/systemd-shutdown/Makefile
new file mode 100644
index 0000000000..f68758174a
--- /dev/null
+++ b/src/grp-system/systemd-shutdown/Makefile
@@ -0,0 +1,39 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-shutdown
+systemd_shutdown_SOURCES = \
+ src/core/umount.c \
+ src/core/umount.h \
+ src/core/shutdown.c \
+ src/core/mount-setup.c \
+ src/core/mount-setup.h \
+ src/core/killall.h \
+ src/core/killall.c
+
+systemd_shutdown_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/halt.target b/src/grp-system/systemd-shutdown/halt.target
index a21d984b26..a21d984b26 100644
--- a/units/halt.target
+++ b/src/grp-system/systemd-shutdown/halt.target
diff --git a/units/kexec.target b/src/grp-system/systemd-shutdown/kexec.target
index 90795d0c5a..90795d0c5a 100644
--- a/units/kexec.target
+++ b/src/grp-system/systemd-shutdown/kexec.target
diff --git a/units/poweroff.target b/src/grp-system/systemd-shutdown/poweroff.target
index dd92d816ca..dd92d816ca 100644
--- a/units/poweroff.target
+++ b/src/grp-system/systemd-shutdown/poweroff.target
diff --git a/units/reboot.target b/src/grp-system/systemd-shutdown/reboot.target
index 668b98d9e4..668b98d9e4 100644
--- a/units/reboot.target
+++ b/src/grp-system/systemd-shutdown/reboot.target
diff --git a/src/core/shutdown.c b/src/grp-system/systemd-shutdown/shutdown.c
index a795d875bb..11e2143089 100644
--- a/src/core/shutdown.c
+++ b/src/grp-system/systemd-shutdown/shutdown.c
@@ -19,7 +19,6 @@
#include <errno.h>
#include <getopt.h>
-#include <linux/reboot.h>
#include <signal.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -29,22 +28,25 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "def.h"
-#include "fileio.h"
-#include "killall.h"
-#include "log.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "string-util.h"
-#include "switch-root.h"
-#include "terminal-util.h"
+#include <linux/reboot.h>
+
+#include "core/killall.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/switch-root.h"
+#include "systemd-shared/watchdog.h"
+
#include "umount.h"
-#include "util.h"
-#include "virt.h"
-#include "watchdog.h"
#define FINALIZE_ATTEMPTS 50
diff --git a/units/systemd-halt.service.in b/src/grp-system/systemd-shutdown/systemd-halt.service.in
index d55d622c1c..d55d622c1c 100644
--- a/units/systemd-halt.service.in
+++ b/src/grp-system/systemd-shutdown/systemd-halt.service.in
diff --git a/units/systemd-kexec.service.in b/src/grp-system/systemd-shutdown/systemd-kexec.service.in
index 61303f917f..61303f917f 100644
--- a/units/systemd-kexec.service.in
+++ b/src/grp-system/systemd-shutdown/systemd-kexec.service.in
diff --git a/units/systemd-poweroff.service.in b/src/grp-system/systemd-shutdown/systemd-poweroff.service.in
index 3630719733..3630719733 100644
--- a/units/systemd-poweroff.service.in
+++ b/src/grp-system/systemd-shutdown/systemd-poweroff.service.in
diff --git a/units/systemd-reboot.service.in b/src/grp-system/systemd-shutdown/systemd-reboot.service.in
index d99bd3e701..d99bd3e701 100644
--- a/units/systemd-reboot.service.in
+++ b/src/grp-system/systemd-shutdown/systemd-reboot.service.in
diff --git a/man/systemd-halt.service.xml b/src/grp-system/systemd-shutdown/systemd-shutdown.xml
index d16e5d628f..d16e5d628f 100644
--- a/man/systemd-halt.service.xml
+++ b/src/grp-system/systemd-shutdown/systemd-shutdown.xml
diff --git a/src/core/umount.c b/src/grp-system/systemd-shutdown/umount.c
index 1e5459ed80..1947b58c99 100644
--- a/src/core/umount.c
+++ b/src/grp-system/systemd-shutdown/umount.c
@@ -19,26 +19,28 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/dm-ioctl.h>
-#include <linux/loop.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/swap.h>
-#include "libudev.h"
-
-#include "alloc-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fstab-util.h"
-#include "list.h"
-#include "mount-setup.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "udev-util.h"
+#include <linux/dm-ioctl.h>
+#include <linux/loop.h>
+
+#include <libudev.h>
+
+#include "core/mount-setup.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/fstab-util.h"
+#include "systemd-shared/udev-util.h"
+
#include "umount.h"
-#include "util.h"
-#include "virt.h"
typedef struct MountPoint {
char *path;
diff --git a/src/core/umount.h b/src/grp-system/systemd-shutdown/umount.h
index 4e2215a47d..4e2215a47d 100644
--- a/src/core/umount.h
+++ b/src/grp-system/systemd-shutdown/umount.h
diff --git a/xorg/50-systemd-user.sh b/src/grp-system/systemd/50-systemd-user.xorg
index 4d49767228..4d49767228 100755
--- a/xorg/50-systemd-user.sh
+++ b/src/grp-system/systemd/50-systemd-user.xorg
diff --git a/src/grp-system/systemd/GNUmakefile b/src/grp-system/systemd/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-system/systemd/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-system/systemd/Makefile b/src/grp-system/systemd/Makefile
new file mode 100644
index 0000000000..7f7fbb963e
--- /dev/null
+++ b/src/grp-system/systemd/Makefile
@@ -0,0 +1,73 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd
+systemd_SOURCES = \
+ src/core/main.c
+
+systemd_CFLAGS = \
+ $(SECCOMP_CFLAGS) \
+ $(MOUNT_CFLAGS)
+
+systemd_LDADD = \
+ libcore.la
+
+dist_pkgsysconf_DATA += \
+ src/core/system.conf \
+ src/core/user.conf
+
+dist_dbuspolicy_DATA += \
+ src/core/org.freedesktop.systemd1.conf
+
+dist_dbussystemservice_DATA += \
+ src/core/org.freedesktop.systemd1.service
+
+polkitpolicy_in_in_files += \
+ src/core/org.freedesktop.systemd1.policy.in.in
+
+pkgconfigdata_DATA += \
+ src/core/systemd.pc
+
+nodist_rpmmacros_DATA = \
+ src/core/macros.systemd
+
+BUILT_SOURCES += \
+ src/core/triggers.systemd
+
+EXTRA_DIST += \
+ src/core/systemd.pc.in \
+ src/core/macros.systemd.in \
+ src/core/triggers.systemd.in
+
+dist_xinitrc_SCRIPTS = \
+ xorg/50-systemd-user.sh
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.systemd1.busname
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.systemd1.busname
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/core/macros.systemd.in b/src/grp-system/systemd/macros.systemd.in
index 6e8a3b3e3d..6e8a3b3e3d 100644
--- a/src/core/macros.systemd.in
+++ b/src/grp-system/systemd/macros.systemd.in
diff --git a/src/core/main.c b/src/grp-system/systemd/main.c
index f07ed71b31..be97cef6a1 100644
--- a/src/core/main.c
+++ b/src/grp-system/systemd/main.c
@@ -35,61 +35,61 @@
#include <valgrind/valgrind.h>
#endif
-#include "sd-bus.h"
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "architecture.h"
-#include "build.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "capability-util.h"
-#include "clock-util.h"
-#include "conf-parser.h"
-#include "cpu-set-util.h"
-#include "dbus-manager.h"
-#include "def.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fdset.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "hostname-setup.h"
-#include "ima-setup.h"
-#include "killall.h"
-#include "kmod-setup.h"
-#include "load-fragment.h"
-#include "log.h"
-#include "loopback-setup.h"
-#include "machine-id-setup.h"
-#include "manager.h"
-#include "missing.h"
-#include "mount-setup.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "raw-clone.h"
-#include "rlimit-util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-daemon.h>
+
+#include "core/dbus-manager.h"
+#include "core/hostname-setup.h"
+#include "core/ima-setup.h"
+#include "core/killall.h"
+#include "core/kmod-setup.h"
+#include "core/load-fragment.h"
+#include "core/loopback-setup.h"
+#include "core/machine-id-setup.h"
+#include "core/manager.h"
+#include "core/mount-setup.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/build.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/clock-util.h"
+#include "systemd-basic/cpu-set-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/raw-clone.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/fdset.h"
+#include "systemd-shared/pager.h"
#ifdef HAVE_SECCOMP
-#include "seccomp-util.h"
+#include "systemd-shared/seccomp-util.h"
#endif
-#include "selinux-setup.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "smack-setup.h"
-#include "special.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "strv.h"
-#include "switch-root.h"
-#include "terminal-util.h"
-#include "umask-util.h"
-#include "user-util.h"
-#include "virt.h"
-#include "watchdog.h"
-#include "emergency-action.h"
+#include "core/emergency-action.h"
+#include "core/selinux-setup.h"
+#include "core/smack-setup.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/switch-root.h"
+#include "systemd-shared/watchdog.h"
static enum {
ACTION_RUN,
diff --git a/src/core/org.freedesktop.systemd1.conf b/src/grp-system/systemd/org.freedesktop.systemd1.conf
index a61677e645..a61677e645 100644
--- a/src/core/org.freedesktop.systemd1.conf
+++ b/src/grp-system/systemd/org.freedesktop.systemd1.conf
diff --git a/src/core/org.freedesktop.systemd1.policy.in.in b/src/grp-system/systemd/org.freedesktop.systemd1.policy.in.in
index cc39a9e1c3..cc39a9e1c3 100644
--- a/src/core/org.freedesktop.systemd1.policy.in.in
+++ b/src/grp-system/systemd/org.freedesktop.systemd1.policy.in.in
diff --git a/src/core/org.freedesktop.systemd1.service b/src/grp-system/systemd/org.freedesktop.systemd1.service
index d4df3e93a2..d4df3e93a2 100644
--- a/src/core/org.freedesktop.systemd1.service
+++ b/src/grp-system/systemd/org.freedesktop.systemd1.service
diff --git a/src/core/system.conf b/src/grp-system/systemd/system.conf
index 746572b7ff..746572b7ff 100644
--- a/src/core/system.conf
+++ b/src/grp-system/systemd/system.conf
diff --git a/man/systemd-system.conf.xml b/src/grp-system/systemd/systemd-system.conf.xml
index e4e81f7f2e..e4e81f7f2e 100644
--- a/man/systemd-system.conf.xml
+++ b/src/grp-system/systemd/systemd-system.conf.xml
diff --git a/tmpfiles.d/systemd-tmpfs.conf b/src/grp-system/systemd/systemd-tmpfs.tmpfiles
index 98050d329d..98050d329d 100644
--- a/tmpfiles.d/systemd-tmpfs.conf
+++ b/src/grp-system/systemd/systemd-tmpfs.tmpfiles
diff --git a/man/systemd.automount.xml b/src/grp-system/systemd/systemd.automount.xml
index a43dc981bd..a43dc981bd 100644
--- a/man/systemd.automount.xml
+++ b/src/grp-system/systemd/systemd.automount.xml
diff --git a/man/systemd.device.xml b/src/grp-system/systemd/systemd.device.xml
index effed098dd..effed098dd 100644
--- a/man/systemd.device.xml
+++ b/src/grp-system/systemd/systemd.device.xml
diff --git a/man/systemd.exec.xml b/src/grp-system/systemd/systemd.exec.xml
index 3c350df11f..3c350df11f 100644
--- a/man/systemd.exec.xml
+++ b/src/grp-system/systemd/systemd.exec.xml
diff --git a/man/systemd.generator.xml b/src/grp-system/systemd/systemd.generator.xml
index b268104c9d..b268104c9d 100644
--- a/man/systemd.generator.xml
+++ b/src/grp-system/systemd/systemd.generator.xml
diff --git a/man/systemd.journal-fields.xml b/src/grp-system/systemd/systemd.journal-fields.xml
index 494f97aad1..494f97aad1 100644
--- a/man/systemd.journal-fields.xml
+++ b/src/grp-system/systemd/systemd.journal-fields.xml
diff --git a/man/systemd.kill.xml b/src/grp-system/systemd/systemd.kill.xml
index 13b7ab14df..13b7ab14df 100644
--- a/man/systemd.kill.xml
+++ b/src/grp-system/systemd/systemd.kill.xml
diff --git a/man/systemd.link.xml b/src/grp-system/systemd/systemd.link.xml
index 8edbe758d9..8edbe758d9 100644
--- a/man/systemd.link.xml
+++ b/src/grp-system/systemd/systemd.link.xml
diff --git a/man/systemd.mount.xml b/src/grp-system/systemd/systemd.mount.xml
index b0f156f6df..b0f156f6df 100644
--- a/man/systemd.mount.xml
+++ b/src/grp-system/systemd/systemd.mount.xml
diff --git a/man/systemd.netdev.xml b/src/grp-system/systemd/systemd.netdev.xml
index ffb66e735b..ffb66e735b 100644
--- a/man/systemd.netdev.xml
+++ b/src/grp-system/systemd/systemd.netdev.xml
diff --git a/man/systemd.network.xml b/src/grp-system/systemd/systemd.network.xml
index 2fb4907634..2fb4907634 100644
--- a/man/systemd.network.xml
+++ b/src/grp-system/systemd/systemd.network.xml
diff --git a/man/systemd.nspawn.xml b/src/grp-system/systemd/systemd.nspawn.xml
index b1344d6c10..b1344d6c10 100644
--- a/man/systemd.nspawn.xml
+++ b/src/grp-system/systemd/systemd.nspawn.xml
diff --git a/man/systemd.offline-updates.xml b/src/grp-system/systemd/systemd.offline-updates.xml
index 07a5225512..07a5225512 100644
--- a/man/systemd.offline-updates.xml
+++ b/src/grp-system/systemd/systemd.offline-updates.xml
diff --git a/man/systemd.path.xml b/src/grp-system/systemd/systemd.path.xml
index 7200c8fe27..7200c8fe27 100644
--- a/man/systemd.path.xml
+++ b/src/grp-system/systemd/systemd.path.xml
diff --git a/src/core/systemd.pc.in b/src/grp-system/systemd/systemd.pc.in
index ac52b30dd3..ac52b30dd3 100644
--- a/src/core/systemd.pc.in
+++ b/src/grp-system/systemd/systemd.pc.in
diff --git a/man/systemd.resource-control.xml b/src/grp-system/systemd/systemd.resource-control.xml
index 02878b28a0..02878b28a0 100644
--- a/man/systemd.resource-control.xml
+++ b/src/grp-system/systemd/systemd.resource-control.xml
diff --git a/man/systemd.scope.xml b/src/grp-system/systemd/systemd.scope.xml
index f69b2ef635..f69b2ef635 100644
--- a/man/systemd.scope.xml
+++ b/src/grp-system/systemd/systemd.scope.xml
diff --git a/man/systemd.service.xml b/src/grp-system/systemd/systemd.service.xml
index 5c65957bda..5c65957bda 100644
--- a/man/systemd.service.xml
+++ b/src/grp-system/systemd/systemd.service.xml
diff --git a/man/systemd.slice.xml b/src/grp-system/systemd/systemd.slice.xml
index eee98d99ee..eee98d99ee 100644
--- a/man/systemd.slice.xml
+++ b/src/grp-system/systemd/systemd.slice.xml
diff --git a/man/systemd.socket.xml b/src/grp-system/systemd/systemd.socket.xml
index 0ce1203cfb..0ce1203cfb 100644
--- a/man/systemd.socket.xml
+++ b/src/grp-system/systemd/systemd.socket.xml
diff --git a/man/systemd.special.xml b/src/grp-system/systemd/systemd.special.xml
index d977298cd8..d977298cd8 100644
--- a/man/systemd.special.xml
+++ b/src/grp-system/systemd/systemd.special.xml
diff --git a/man/systemd.swap.xml b/src/grp-system/systemd/systemd.swap.xml
index cf4e1ba839..cf4e1ba839 100644
--- a/man/systemd.swap.xml
+++ b/src/grp-system/systemd/systemd.swap.xml
diff --git a/man/systemd.target.xml b/src/grp-system/systemd/systemd.target.xml
index b3cccd4e52..b3cccd4e52 100644
--- a/man/systemd.target.xml
+++ b/src/grp-system/systemd/systemd.target.xml
diff --git a/man/systemd.time.xml b/src/grp-system/systemd/systemd.time.xml
index 47229b4a4e..47229b4a4e 100644
--- a/man/systemd.time.xml
+++ b/src/grp-system/systemd/systemd.time.xml
diff --git a/man/systemd.timer.xml b/src/grp-system/systemd/systemd.timer.xml
index 4fe140e4bc..4fe140e4bc 100644
--- a/man/systemd.timer.xml
+++ b/src/grp-system/systemd/systemd.timer.xml
diff --git a/tmpfiles.d/systemd.conf b/src/grp-system/systemd/systemd.tmpfiles
index 00951c92c9..00951c92c9 100644
--- a/tmpfiles.d/systemd.conf
+++ b/src/grp-system/systemd/systemd.tmpfiles
diff --git a/man/systemd.unit.xml b/src/grp-system/systemd/systemd.unit.xml
index 40c4cfd854..40c4cfd854 100644
--- a/man/systemd.unit.xml
+++ b/src/grp-system/systemd/systemd.unit.xml
diff --git a/man/systemd.xml b/src/grp-system/systemd/systemd.xml
index 79d8aedbbc..79d8aedbbc 100644
--- a/man/systemd.xml
+++ b/src/grp-system/systemd/systemd.xml
diff --git a/src/core/triggers.systemd.in b/src/grp-system/systemd/triggers.systemd.in
index 0d8c303136..0d8c303136 100644
--- a/src/core/triggers.systemd.in
+++ b/src/grp-system/systemd/triggers.systemd.in
diff --git a/src/core/user.conf b/src/grp-system/systemd/user.conf
index b427f1ef6d..b427f1ef6d 100644
--- a/src/core/user.conf
+++ b/src/grp-system/systemd/user.conf
diff --git a/src/grp-timedate/GNUmakefile b/src/grp-timedate/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-timedate/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-timedate/Makefile b/src/grp-timedate/Makefile
new file mode 100644
index 0000000000..b9277c7c64
--- /dev/null
+++ b/src/grp-timedate/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += systemd-timedated
+nested.subdirs += timedatectl
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/timedate/.gitignore b/src/grp-timedate/systemd-timedated/.gitignore
index 48757f0968..48757f0968 100644
--- a/src/timedate/.gitignore
+++ b/src/grp-timedate/systemd-timedated/.gitignore
diff --git a/src/grp-timedate/systemd-timedated/GNUmakefile b/src/grp-timedate/systemd-timedated/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-timedate/systemd-timedated/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-timedate/systemd-timedated/Makefile b/src/grp-timedate/systemd-timedated/Makefile
new file mode 100644
index 0000000000..d06142536e
--- /dev/null
+++ b/src/grp-timedate/systemd-timedated/Makefile
@@ -0,0 +1,65 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_TIMEDATED),)
+systemd_timedated_SOURCES = \
+ src/timedate/timedated.c
+
+systemd_timedated_LDADD = \
+ libsystemd-shared.la
+
+rootlibexec_PROGRAMS += \
+ systemd-timedated
+
+dist_dbussystemservice_DATA += \
+ src/timedate/org.freedesktop.timedate1.service
+
+dist_dbuspolicy_DATA += \
+ src/timedate/org.freedesktop.timedate1.conf
+
+nodist_systemunit_DATA += \
+ units/systemd-timedated.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.timedate1.busname
+
+polkitpolicy_files += \
+ src/timedate/org.freedesktop.timedate1.policy
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-timedated.service dbus-org.freedesktop.timedate1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.timedate1.busname
+
+endif # ENABLE_TIMEDATED
+
+polkitpolicy_in_files += \
+ src/timedate/org.freedesktop.timedate1.policy.in
+
+EXTRA_DIST += \
+ units/systemd-timedated.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/timedate/org.freedesktop.timedate1.conf b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.conf
index 36557d5841..36557d5841 100644
--- a/src/timedate/org.freedesktop.timedate1.conf
+++ b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.conf
diff --git a/src/timedate/org.freedesktop.timedate1.policy.in b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.policy.in
index aa30b70831..aa30b70831 100644
--- a/src/timedate/org.freedesktop.timedate1.policy.in
+++ b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.policy.in
diff --git a/src/timedate/org.freedesktop.timedate1.service b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.service
index 875f4bec78..875f4bec78 100644
--- a/src/timedate/org.freedesktop.timedate1.service
+++ b/src/grp-timedate/systemd-timedated/org.freedesktop.timedate1.service
diff --git a/units/systemd-timedated.service.in b/src/grp-timedate/systemd-timedated/systemd-timedated.service.in
index e8c4d5ed4b..e8c4d5ed4b 100644
--- a/units/systemd-timedated.service.in
+++ b/src/grp-timedate/systemd-timedated/systemd-timedated.service.in
diff --git a/man/systemd-timedated.service.xml b/src/grp-timedate/systemd-timedated/systemd-timedated.service.xml
index e44163aefb..e44163aefb 100644
--- a/man/systemd-timedated.service.xml
+++ b/src/grp-timedate/systemd-timedated/systemd-timedated.service.xml
diff --git a/src/timedate/timedated.c b/src/grp-timedate/systemd-timedated/timedated.c
index 490929e93b..9984a5b4f3 100644
--- a/src/timedate/timedated.c
+++ b/src/grp-timedate/systemd-timedated/timedated.c
@@ -21,23 +21,23 @@
#include <string.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-event.h"
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "clock-util.h"
-#include "def.h"
-#include "fileio-label.h"
-#include "fs-util.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-messages.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/clock-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
#define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n"
#define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n"
diff --git a/src/grp-timedate/timedatectl/GNUmakefile b/src/grp-timedate/timedatectl/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-timedate/timedatectl/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-timedate/timedatectl/Makefile b/src/grp-timedate/timedatectl/Makefile
new file mode 100644
index 0000000000..b1093dad9b
--- /dev/null
+++ b/src/grp-timedate/timedatectl/Makefile
@@ -0,0 +1,43 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_TIMEDATED),)
+timedatectl_SOURCES = \
+ src/timedate/timedatectl.c
+
+timedatectl_LDADD = \
+ libsystemd-shared.la
+
+bin_PROGRAMS += \
+ timedatectl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/timedatectl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_timedatectl
+endif # ENABLE_TIMEDATED
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/timedate/timedatectl.c b/src/grp-timedate/timedatectl/timedatectl.c
index 553ef67011..ae011a7433 100644
--- a/src/timedate/timedatectl.c
+++ b/src/grp-timedate/timedatectl/timedatectl.c
@@ -23,16 +23,16 @@
#include <stdbool.h>
#include <stdlib.h>
-#include "sd-bus.h"
-
-#include "bus-error.h"
-#include "bus-util.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "spawn-polkit-agent.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/pager.h"
+#include "systemd-shared/spawn-polkit-agent.h"
static bool arg_no_pager = false;
static bool arg_ask_password = true;
diff --git a/shell-completion/bash/timedatectl b/src/grp-timedate/timedatectl/timedatectl.completion.bash
index a57fbd2546..a57fbd2546 100644
--- a/shell-completion/bash/timedatectl
+++ b/src/grp-timedate/timedatectl/timedatectl.completion.bash
diff --git a/shell-completion/zsh/_timedatectl b/src/grp-timedate/timedatectl/timedatectl.completion.zsh
index dfdcfebb3c..dfdcfebb3c 100644
--- a/shell-completion/zsh/_timedatectl
+++ b/src/grp-timedate/timedatectl/timedatectl.completion.zsh
diff --git a/man/timedatectl.xml b/src/grp-timedate/timedatectl/timedatectl.xml
index 415e2c799a..415e2c799a 100644
--- a/man/timedatectl.xml
+++ b/src/grp-timedate/timedatectl/timedatectl.xml
diff --git a/src/udev/.gitignore b/src/grp-udev/.gitignore
index f5d8be3dc1..f8e0aae978 100644
--- a/src/udev/.gitignore
+++ b/src/grp-udev/.gitignore
@@ -2,3 +2,4 @@
/keyboard-keys-from-name.gperf
/keyboard-keys-from-name.h
/keyboard-keys-list.txt
+/99-systemd.rules
diff --git a/rules/50-udev-default.rules b/src/grp-udev/50-udev-default.rules
index e9eeb8518e..e9eeb8518e 100644
--- a/rules/50-udev-default.rules
+++ b/src/grp-udev/50-udev-default.rules
diff --git a/rules/60-block.rules b/src/grp-udev/60-block.rules
index 42c75974a5..42c75974a5 100644
--- a/rules/60-block.rules
+++ b/src/grp-udev/60-block.rules
diff --git a/rules/60-drm.rules b/src/grp-udev/60-drm.rules
index 1ed3e445f2..1ed3e445f2 100644
--- a/rules/60-drm.rules
+++ b/src/grp-udev/60-drm.rules
diff --git a/rules/60-evdev.rules b/src/grp-udev/60-evdev.rules
index ade7e7f646..ade7e7f646 100644
--- a/rules/60-evdev.rules
+++ b/src/grp-udev/60-evdev.rules
diff --git a/rules/60-persistent-alsa.rules b/src/grp-udev/60-persistent-alsa.rules
index 8154e2dbb5..8154e2dbb5 100644
--- a/rules/60-persistent-alsa.rules
+++ b/src/grp-udev/60-persistent-alsa.rules
diff --git a/rules/60-persistent-input.rules b/src/grp-udev/60-persistent-input.rules
index 607144bf8a..607144bf8a 100644
--- a/rules/60-persistent-input.rules
+++ b/src/grp-udev/60-persistent-input.rules
diff --git a/rules/60-persistent-storage-tape.rules b/src/grp-udev/60-persistent-storage-tape.rules
index b604864ee8..b604864ee8 100644
--- a/rules/60-persistent-storage-tape.rules
+++ b/src/grp-udev/60-persistent-storage-tape.rules
diff --git a/rules/60-persistent-storage.rules b/src/grp-udev/60-persistent-storage.rules
index c13d05cdb1..c13d05cdb1 100644
--- a/rules/60-persistent-storage.rules
+++ b/src/grp-udev/60-persistent-storage.rules
diff --git a/rules/60-serial.rules b/src/grp-udev/60-serial.rules
index f303e27fd5..f303e27fd5 100644
--- a/rules/60-serial.rules
+++ b/src/grp-udev/60-serial.rules
diff --git a/rules/64-btrfs.rules b/src/grp-udev/64-btrfs.rules
index fe0100131e..fe0100131e 100644
--- a/rules/64-btrfs.rules
+++ b/src/grp-udev/64-btrfs.rules
diff --git a/rules/70-mouse.rules b/src/grp-udev/70-mouse.rules
index 3ea743aff9..3ea743aff9 100644
--- a/rules/70-mouse.rules
+++ b/src/grp-udev/70-mouse.rules
diff --git a/rules/70-touchpad.rules b/src/grp-udev/70-touchpad.rules
index 7bede02dec..7bede02dec 100644
--- a/rules/70-touchpad.rules
+++ b/src/grp-udev/70-touchpad.rules
diff --git a/rules/75-net-description.rules b/src/grp-udev/75-net-description.rules
index 7e62f8b26b..7e62f8b26b 100644
--- a/rules/75-net-description.rules
+++ b/src/grp-udev/75-net-description.rules
diff --git a/rules/78-sound-card.rules b/src/grp-udev/78-sound-card.rules
index 04740e8b97..04740e8b97 100644
--- a/rules/78-sound-card.rules
+++ b/src/grp-udev/78-sound-card.rules
diff --git a/rules/80-drivers.rules b/src/grp-udev/80-drivers.rules
index 8551f47a4b..8551f47a4b 100644
--- a/rules/80-drivers.rules
+++ b/src/grp-udev/80-drivers.rules
diff --git a/rules/80-net-setup-link.rules b/src/grp-udev/80-net-setup-link.rules
index 6e411a91f0..6e411a91f0 100644
--- a/rules/80-net-setup-link.rules
+++ b/src/grp-udev/80-net-setup-link.rules
diff --git a/rules/99-systemd.rules.in b/src/grp-udev/99-systemd.rules.in
index ca52cf165b..ca52cf165b 100644
--- a/rules/99-systemd.rules.in
+++ b/src/grp-udev/99-systemd.rules.in
diff --git a/src/grp-udev/GNUmakefile b/src/grp-udev/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-udev/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/Makefile b/src/grp-udev/Makefile
new file mode 100644
index 0000000000..79a4dc59ea
--- /dev/null
+++ b/src/grp-udev/Makefile
@@ -0,0 +1,86 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+INSTALL_DIRS += \
+ $(sysconfdir)/udev/rules.d
+
+dist_udevrules_DATA += \
+ rules/50-udev-default.rules \
+ rules/60-block.rules \
+ rules/60-drm.rules \
+ rules/60-evdev.rules \
+ rules/60-persistent-storage-tape.rules \
+ rules/60-persistent-input.rules \
+ rules/60-persistent-alsa.rules \
+ rules/60-persistent-storage.rules \
+ rules/60-serial.rules \
+ rules/64-btrfs.rules \
+ rules/70-mouse.rules \
+ rules/70-touchpad.rules \
+ rules/75-net-description.rules \
+ rules/78-sound-card.rules \
+ rules/80-net-setup-link.rules
+
+nodist_udevrules_DATA += \
+ rules/99-systemd.rules
+
+pkgconfigdata_DATA += \
+ src/udev/udev.pc
+
+EXTRA_DIST += \
+ rules/99-systemd.rules.in \
+ src/udev/udev.pc.in
+
+EXTRA_DIST += \
+ units/systemd-udevd.service.in \
+ units/systemd-udev-trigger.service.in \
+ units/systemd-udev-settle.service.in
+
+SOCKETS_TARGET_WANTS += \
+ systemd-udevd-control.socket \
+ systemd-udevd-kernel.socket
+
+SYSINIT_TARGET_WANTS += \
+ systemd-udevd.service \
+ systemd-udev-trigger.service
+
+ifneq ($(HAVE_KMOD),)
+dist_udevrules_DATA += \
+ rules/80-drivers.rules
+endif # HAVE_KMOD
+
+nested.subdirs += ata_id
+nested.subdirs += cdrom_id
+nested.subdirs += collect
+nested.subdirs += hwdb
+nested.subdirs += libudev-core
+nested.subdirs += mtd_probe
+nested.subdirs += scsi_id
+nested.subdirs += systemd-hwdb
+nested.subdirs += systemd-udevd
+nested.subdirs += udevadm
+nested.subdirs += v4l_id
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-udev/ata_id/GNUmakefile b/src/grp-udev/ata_id/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/ata_id/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/ata_id/Makefile b/src/grp-udev/ata_id/Makefile
new file mode 100644
index 0000000000..d920f9b2aa
--- /dev/null
+++ b/src/grp-udev/ata_id/Makefile
@@ -0,0 +1,35 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ata_id_SOURCES = \
+ src/udev/ata_id/ata_id.c
+
+ata_id_LDADD = \
+ libsystemd-shared.la
+
+udevlibexec_PROGRAMS += \
+ ata_id
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/ata_id/ata_id.c b/src/grp-udev/ata_id/ata_id.c
index 1e414664ce..9770afb538 100644
--- a/src/udev/ata_id/ata_id.c
+++ b/src/grp-udev/ata_id/ata_id.c
@@ -23,8 +23,6 @@
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
-#include <linux/bsg.h>
-#include <linux/hdreg.h>
#include <scsi/scsi.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/sg.h>
@@ -37,12 +35,15 @@
#include <sys/types.h>
#include <unistd.h>
-#include "libudev.h"
+#include <linux/bsg.h>
+#include <linux/hdreg.h>
+
+#include <libudev.h>
-#include "fd-util.h"
#include "libudev-private.h"
-#include "log.h"
-#include "udev-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-shared/udev-util.h"
#define COMMAND_TIMEOUT_MSEC (30 * 1000)
diff --git a/rules/60-cdrom_id.rules b/src/grp-udev/cdrom_id/60-cdrom_id.rules
index 5c3b52ebb9..5c3b52ebb9 100644
--- a/rules/60-cdrom_id.rules
+++ b/src/grp-udev/cdrom_id/60-cdrom_id.rules
diff --git a/src/grp-udev/cdrom_id/GNUmakefile b/src/grp-udev/cdrom_id/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/cdrom_id/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/cdrom_id/Makefile b/src/grp-udev/cdrom_id/Makefile
new file mode 100644
index 0000000000..87865dd938
--- /dev/null
+++ b/src/grp-udev/cdrom_id/Makefile
@@ -0,0 +1,38 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+cdrom_id_SOURCES = \
+ src/udev/cdrom_id/cdrom_id.c
+
+cdrom_id_LDADD = \
+ libsystemd-shared.la
+
+udevlibexec_PROGRAMS += \
+ cdrom_id
+
+dist_udevrules_DATA += \
+ rules/60-cdrom_id.rules
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/grp-udev/cdrom_id/cdrom_id.c
index 72f284f710..4bd3ab0be0 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/grp-udev/cdrom_id/cdrom_id.c
@@ -21,7 +21,6 @@
#include <fcntl.h>
#include <getopt.h>
#include <limits.h>
-#include <linux/cdrom.h>
#include <scsi/sg.h>
#include <stddef.h>
#include <stdio.h>
@@ -34,10 +33,12 @@
#include <time.h>
#include <unistd.h>
-#include "libudev.h"
+#include <linux/cdrom.h>
+
+#include <libudev.h>
#include "libudev-private.h"
-#include "random-util.h"
+#include "systemd-basic/random-util.h"
/* device info */
static unsigned int cd_cd_rom;
diff --git a/src/grp-udev/collect/GNUmakefile b/src/grp-udev/collect/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/collect/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/collect/Makefile b/src/grp-udev/collect/Makefile
new file mode 100644
index 0000000000..6692f42878
--- /dev/null
+++ b/src/grp-udev/collect/Makefile
@@ -0,0 +1,35 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+collect_SOURCES = \
+ src/udev/collect/collect.c
+
+collect_LDADD = \
+ libsystemd-shared.la
+
+udevlibexec_PROGRAMS += \
+ collect
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/collect/collect.c b/src/grp-udev/collect/collect.c
index 0e973cd521..f1e326820f 100644
--- a/src/udev/collect/collect.c
+++ b/src/grp-udev/collect/collect.c
@@ -24,11 +24,11 @@
#include <stddef.h>
#include <stdio.h>
-#include "alloc-util.h"
#include "libudev-private.h"
-#include "macro.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
#define BUFSIZE 16
#define UDEV_ALARM_TIMEOUT 180
diff --git a/hwdb/.gitignore b/src/grp-udev/hwdb/.gitignore
index c4796815d2..c4796815d2 100644
--- a/hwdb/.gitignore
+++ b/src/grp-udev/hwdb/.gitignore
diff --git a/hwdb/20-OUI.hwdb b/src/grp-udev/hwdb/20-OUI.hwdb
index 6bce57305d..6bce57305d 100644
--- a/hwdb/20-OUI.hwdb
+++ b/src/grp-udev/hwdb/20-OUI.hwdb
diff --git a/hwdb/20-acpi-vendor.hwdb b/src/grp-udev/hwdb/20-acpi-vendor.hwdb
index c0fe421c11..c0fe421c11 100644
--- a/hwdb/20-acpi-vendor.hwdb
+++ b/src/grp-udev/hwdb/20-acpi-vendor.hwdb
diff --git a/hwdb/20-acpi-vendor.hwdb.patch b/src/grp-udev/hwdb/20-acpi-vendor.hwdb.patch
index 734dc59422..734dc59422 100644
--- a/hwdb/20-acpi-vendor.hwdb.patch
+++ b/src/grp-udev/hwdb/20-acpi-vendor.hwdb.patch
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/src/grp-udev/hwdb/20-bluetooth-vendor-product.hwdb
index 9cba3bfc05..9cba3bfc05 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/src/grp-udev/hwdb/20-bluetooth-vendor-product.hwdb
diff --git a/hwdb/20-net-ifname.hwdb b/src/grp-udev/hwdb/20-net-ifname.hwdb
index 2408dc172f..2408dc172f 100644
--- a/hwdb/20-net-ifname.hwdb
+++ b/src/grp-udev/hwdb/20-net-ifname.hwdb
diff --git a/hwdb/20-pci-classes.hwdb b/src/grp-udev/hwdb/20-pci-classes.hwdb
index 3c0c465e5f..3c0c465e5f 100644
--- a/hwdb/20-pci-classes.hwdb
+++ b/src/grp-udev/hwdb/20-pci-classes.hwdb
diff --git a/hwdb/20-pci-vendor-model.hwdb b/src/grp-udev/hwdb/20-pci-vendor-model.hwdb
index ea190ff7ca..ea190ff7ca 100644
--- a/hwdb/20-pci-vendor-model.hwdb
+++ b/src/grp-udev/hwdb/20-pci-vendor-model.hwdb
diff --git a/hwdb/20-sdio-classes.hwdb b/src/grp-udev/hwdb/20-sdio-classes.hwdb
index 72cce9d898..72cce9d898 100644
--- a/hwdb/20-sdio-classes.hwdb
+++ b/src/grp-udev/hwdb/20-sdio-classes.hwdb
diff --git a/hwdb/20-sdio-vendor-model.hwdb b/src/grp-udev/hwdb/20-sdio-vendor-model.hwdb
index 9cf34b2a39..9cf34b2a39 100644
--- a/hwdb/20-sdio-vendor-model.hwdb
+++ b/src/grp-udev/hwdb/20-sdio-vendor-model.hwdb
diff --git a/hwdb/20-usb-classes.hwdb b/src/grp-udev/hwdb/20-usb-classes.hwdb
index 418d39bb84..418d39bb84 100644
--- a/hwdb/20-usb-classes.hwdb
+++ b/src/grp-udev/hwdb/20-usb-classes.hwdb
diff --git a/hwdb/20-usb-vendor-model.hwdb b/src/grp-udev/hwdb/20-usb-vendor-model.hwdb
index ec0c26fc35..ec0c26fc35 100644
--- a/hwdb/20-usb-vendor-model.hwdb
+++ b/src/grp-udev/hwdb/20-usb-vendor-model.hwdb
diff --git a/hwdb/60-evdev.hwdb b/src/grp-udev/hwdb/60-evdev.hwdb
index 0b692a1b5d..0b692a1b5d 100644
--- a/hwdb/60-evdev.hwdb
+++ b/src/grp-udev/hwdb/60-evdev.hwdb
diff --git a/hwdb/60-keyboard.hwdb b/src/grp-udev/hwdb/60-keyboard.hwdb
index 9c87aecd30..9c87aecd30 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/src/grp-udev/hwdb/60-keyboard.hwdb
diff --git a/hwdb/70-mouse.hwdb b/src/grp-udev/hwdb/70-mouse.hwdb
index bf3d134c46..bf3d134c46 100644
--- a/hwdb/70-mouse.hwdb
+++ b/src/grp-udev/hwdb/70-mouse.hwdb
diff --git a/hwdb/70-pointingstick.hwdb b/src/grp-udev/hwdb/70-pointingstick.hwdb
index e18ef28290..e18ef28290 100644
--- a/hwdb/70-pointingstick.hwdb
+++ b/src/grp-udev/hwdb/70-pointingstick.hwdb
diff --git a/hwdb/70-touchpad.hwdb b/src/grp-udev/hwdb/70-touchpad.hwdb
index 11f3f96f04..11f3f96f04 100644
--- a/hwdb/70-touchpad.hwdb
+++ b/src/grp-udev/hwdb/70-touchpad.hwdb
diff --git a/src/grp-udev/hwdb/GNUmakefile b/src/grp-udev/hwdb/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/hwdb/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/hwdb/Makefile b/src/grp-udev/hwdb/Makefile
new file mode 100644
index 0000000000..c5d8528013
--- /dev/null
+++ b/src/grp-udev/hwdb/Makefile
@@ -0,0 +1,71 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+dist_udevhwdb_DATA = \
+ hwdb/20-pci-vendor-model.hwdb \
+ hwdb/20-pci-classes.hwdb \
+ hwdb/20-usb-vendor-model.hwdb \
+ hwdb/20-usb-classes.hwdb \
+ hwdb/20-sdio-vendor-model.hwdb \
+ hwdb/20-sdio-classes.hwdb \
+ hwdb/20-bluetooth-vendor-product.hwdb \
+ hwdb/20-acpi-vendor.hwdb \
+ hwdb/20-OUI.hwdb \
+ hwdb/20-net-ifname.hwdb \
+ hwdb/60-evdev.hwdb \
+ hwdb/60-keyboard.hwdb \
+ hwdb/70-mouse.hwdb \
+ hwdb/70-pointingstick.hwdb \
+ hwdb/70-touchpad.hwdb
+
+# Update hwdb on installation. Do not bother if installing
+# in DESTDIR, since this is likely for packaging purposes.
+hwdb-update-hook: $(DESTDIR)$(rootbindir)/systemd-hwdb
+ -test -n "$(DESTDIR)" || $(rootbindir)/systemd-hwdb update
+
+INSTALL_DATA_HOOKS += \
+ hwdb-update-hook
+
+hwdb-remove-hook:
+ -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
+EXTRA_DIST += \
+ hwdb/ids-update.pl \
+ hwdb/sdio.ids
+
+.PHONY: hwdb-update
+hwdb-update:
+ ( cd $(top_srcdir)/hwdb && \
+ wget -O usb.ids 'http://www.linux-usb.org/usb.ids' && \
+ wget -O pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids' && \
+ wget -O ma-large.txt 'http://standards.ieee.org/develop/regauth/oui/oui.txt' && \
+ wget -O ma-medium.txt 'http://standards.ieee.org/develop/regauth/oui28/mam.txt' && \
+ wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt' && \
+ wget -O pnp_id_registry.html 'http://www.uefi.org/uefi-pnp-export' && \
+ wget -O acpi_id_registry.html 'http://www.uefi.org/uefi-acpi-export' && \
+ ./ids-update.pl && \
+ ./acpi-update.py > 20-acpi-vendor.hwdb.base && \
+ patch -p0 -o- 20-acpi-vendor.hwdb.base < 20-acpi-vendor.hwdb.patch > 20-acpi-vendor.hwdb )
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/hwdb/acpi-update.py b/src/grp-udev/hwdb/acpi-update.py
index 2dc8c7c064..2dc8c7c064 100755
--- a/hwdb/acpi-update.py
+++ b/src/grp-udev/hwdb/acpi-update.py
diff --git a/hwdb/ids-update.pl b/src/grp-udev/hwdb/ids-update.pl
index 03dd00b38d..03dd00b38d 100755
--- a/hwdb/ids-update.pl
+++ b/src/grp-udev/hwdb/ids-update.pl
diff --git a/hwdb/parse_hwdb.py b/src/grp-udev/hwdb/parse_hwdb.py
index 5d4c5ea64d..5d4c5ea64d 100755
--- a/hwdb/parse_hwdb.py
+++ b/src/grp-udev/hwdb/parse_hwdb.py
diff --git a/hwdb/sdio.ids b/src/grp-udev/hwdb/sdio.ids
index d61729744e..d61729744e 100644
--- a/hwdb/sdio.ids
+++ b/src/grp-udev/hwdb/sdio.ids
diff --git a/src/grp-udev/libudev-core/GNUmakefile b/src/grp-udev/libudev-core/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/libudev-core/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/libudev-core/Makefile b/src/grp-udev/libudev-core/Makefile
new file mode 100644
index 0000000000..14d4e827a0
--- /dev/null
+++ b/src/grp-udev/libudev-core/Makefile
@@ -0,0 +1,99 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+noinst_LTLIBRARIES += \
+ libudev-core.la
+
+$(outdir)/keyboard-keys-list.txt:
+ $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@
+
+$(outdir)/keyboard-keys-from-name.gperf: $(outdir)/keyboard-keys-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
+
+$(outdir)/keyboard-keys-from-name.h: $(outdir)/keyboard-keys-from-name.gperf
+ $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
+
+gperf_txt_sources += \
+ src/udev/keyboard-keys-list.txt
+
+libudev_core_la_SOURCES = \
+ src/udev/udev.h \
+ src/udev/udev-event.c \
+ src/udev/udev-watch.c \
+ src/udev/udev-node.c \
+ src/udev/udev-rules.c \
+ src/udev/udev-ctrl.c \
+ src/udev/udev-builtin.c \
+ src/udev/udev-builtin-btrfs.c \
+ src/udev/udev-builtin-hwdb.c \
+ src/udev/udev-builtin-input_id.c \
+ src/udev/udev-builtin-keyboard.c \
+ src/udev/udev-builtin-net_id.c \
+ src/udev/udev-builtin-net_setup_link.c \
+ src/udev/udev-builtin-path_id.c \
+ src/udev/udev-builtin-usb_id.c \
+ src/udev/net/link-config.h \
+ src/udev/net/link-config.c \
+ src/udev/net/ethtool-util.h \
+ src/udev/net/ethtool-util.c
+
+nodist_libudev_core_la_SOURCES = \
+ src/udev/keyboard-keys-from-name.h \
+ src/udev/net/link-config-gperf.c
+
+gperf_gperf_sources += \
+ src/udev/net/link-config-gperf.gperf
+
+libudev_core_la_CFLAGS = \
+ $(BLKID_CFLAGS) \
+ $(KMOD_CFLAGS)
+
+libudev_core_la_LIBADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la \
+ $(BLKID_LIBS) \
+ $(KMOD_LIBS)
+
+ifneq ($(HAVE_KMOD),)
+libudev_core_la_SOURCES += \
+ src/udev/udev-builtin-kmod.c
+endif # HAVE_KMOD
+
+ifneq ($(HAVE_BLKID),)
+libudev_core_la_SOURCES += \
+ src/udev/udev-builtin-blkid.c
+endif # HAVE_BLKID
+
+ifneq ($(HAVE_ACL),)
+libudev_core_la_SOURCES += \
+ src/udev/udev-builtin-uaccess.c \
+ src/login/logind-acl.c \
+ src/libsystemd/sd-login/sd-login.c \
+ src/systemd/sd-login.h
+endif # HAVE_ACL
+
+nested.subdirs += net
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-udev/libudev-core/logind-acl.c b/src/grp-udev/libudev-core/logind-acl.c
new file mode 120000
index 0000000000..dd15b7973f
--- /dev/null
+++ b/src/grp-udev/libudev-core/logind-acl.c
@@ -0,0 +1 @@
+../../grp-login/systemd-logind/logind-acl.c \ No newline at end of file
diff --git a/src/grp-udev/libudev-core/logind-acl.h b/src/grp-udev/libudev-core/logind-acl.h
new file mode 120000
index 0000000000..6065dde301
--- /dev/null
+++ b/src/grp-udev/libudev-core/logind-acl.h
@@ -0,0 +1 @@
+../../grp-login/systemd-logind/logind-acl.h \ No newline at end of file
diff --git a/src/udev/net/.gitignore b/src/grp-udev/libudev-core/net/.gitignore
index 9ca85bacc9..9ca85bacc9 100644
--- a/src/udev/net/.gitignore
+++ b/src/grp-udev/libudev-core/net/.gitignore
diff --git a/src/grp-udev/libudev-core/net/GNUmakefile b/src/grp-udev/libudev-core/net/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/grp-udev/libudev-core/net/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/libudev-core/net/Makefile b/src/grp-udev/libudev-core/net/Makefile
new file mode 100644
index 0000000000..ac615aad3b
--- /dev/null
+++ b/src/grp-udev/libudev-core/net/Makefile
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+sd.CPPFLAGS += $(libsystemd-shared.CPPFLAGS)
+sd.CPPFLAGS += $(libsystemd-network.CPPFLAGS)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/net/ethtool-util.c b/src/grp-udev/libudev-core/net/ethtool-util.c
index 708a665576..05d6ecb953 100644
--- a/src/udev/net/ethtool-util.c
+++ b/src/grp-udev/libudev-core/net/ethtool-util.c
@@ -19,16 +19,18 @@
#include <net/if.h>
#include <sys/ioctl.h>
+
#include <linux/ethtool.h>
#include <linux/sockios.h>
-#include "conf-parser.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
+
#include "ethtool-util.h"
-#include "log.h"
-#include "socket-util.h"
-#include "string-table.h"
-#include "strxcpyx.h"
-#include "util.h"
static const char* const duplex_table[_DUP_MAX] = {
[DUP_FULL] = "full",
diff --git a/src/udev/net/ethtool-util.h b/src/grp-udev/libudev-core/net/ethtool-util.h
index 0744164653..6b5dfdd513 100644
--- a/src/udev/net/ethtool-util.h
+++ b/src/grp-udev/libudev-core/net/ethtool-util.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <macro.h>
+#include "systemd-basic/macro.h"
/* we can't use DUPLEX_ prefix, as it
* clashes with <linux/ethtool.h> */
diff --git a/src/udev/net/link-config-gperf.gperf b/src/grp-udev/libudev-core/net/link-config-gperf.gperf
index f8b85cbd13..89184782ed 100644
--- a/src/udev/net/link-config-gperf.gperf
+++ b/src/grp-udev/libudev-core/net/link-config-gperf.gperf
@@ -1,9 +1,11 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
-#include "network-internal.h"
-#include "link-config.h"
+
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/conf-parser.h"
+
#include "ethtool-util.h"
+#include "link-config.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/udev/net/link-config.c b/src/grp-udev/libudev-core/net/link-config.c
index ece9248c2a..df37c63169 100644
--- a/src/udev/net/link-config.c
+++ b/src/grp-udev/libudev-core/net/link-config.c
@@ -19,28 +19,28 @@
#include <netinet/ether.h>
-#include "sd-netlink.h"
+#include "libudev-private.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-staging/sd-netlink.h"
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "conf-parser.h"
#include "ethtool-util.h"
-#include "fd-util.h"
-#include "libudev-private.h"
#include "link-config.h"
-#include "log.h"
-#include "missing.h"
-#include "netlink-util.h"
-#include "network-internal.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "random-util.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
struct link_config_ctx {
LIST_HEAD(link_config, links);
diff --git a/src/udev/net/link-config.h b/src/grp-udev/libudev-core/net/link-config.h
index b0d8ceb76a..0040dd2b42 100644
--- a/src/udev/net/link-config.h
+++ b/src/grp-udev/libudev-core/net/link-config.h
@@ -19,11 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "libudev.h"
+#include <libudev.h>
+
+#include "systemd-basic/list.h"
+#include "systemd-shared/condition.h"
-#include "condition.h"
#include "ethtool-util.h"
-#include "list.h"
typedef struct link_config_ctx link_config_ctx;
typedef struct link_config link_config;
diff --git a/src/grp-udev/libudev-core/sd-login.c b/src/grp-udev/libudev-core/sd-login.c
new file mode 120000
index 0000000000..913dcedc6a
--- /dev/null
+++ b/src/grp-udev/libudev-core/sd-login.c
@@ -0,0 +1 @@
+../../libsystemd/src/sd-login/sd-login.c \ No newline at end of file
diff --git a/src/udev/udev-builtin-blkid.c b/src/grp-udev/libudev-core/udev-builtin-blkid.c
index 3c58445836..b56ffa62a3 100644
--- a/src/udev/udev-builtin-blkid.c
+++ b/src/grp-udev/libudev-core/udev-builtin-blkid.c
@@ -27,13 +27,13 @@
#include <string.h>
#include <sys/stat.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
-#include "alloc-util.h"
-#include "efivars.h"
-#include "fd-util.h"
-#include "gpt.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/efivars.h"
+#include "systemd-shared/gpt.h"
#include "udev.h"
static void print_property(struct udev_device *dev, bool test, const char *name, const char *value) {
diff --git a/src/udev/udev-builtin-btrfs.c b/src/grp-udev/libudev-core/udev-builtin-btrfs.c
index cfaa463804..dbaf65d8f9 100644
--- a/src/udev/udev-builtin-btrfs.c
+++ b/src/grp-udev/libudev-core/udev-builtin-btrfs.c
@@ -25,9 +25,9 @@
#include <linux/btrfs.h>
#endif
-#include "fd-util.h"
-#include "missing.h"
-#include "string-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) {
diff --git a/src/udev/udev-builtin-hwdb.c b/src/grp-udev/libudev-core/udev-builtin-hwdb.c
index f4a065a97d..9587845ac2 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/grp-udev/libudev-core/udev-builtin-hwdb.c
@@ -22,12 +22,11 @@
#include <stdio.h>
#include <stdlib.h>
-#include "sd-hwdb.h"
-
-#include "alloc-util.h"
-#include "hwdb-util.h"
-#include "string-util.h"
-#include "udev-util.h"
+#include "sd-hwdb/hwdb-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/udev-util.h"
+#include "systemd-staging/sd-hwdb.h"
#include "udev.h"
static sd_hwdb *hwdb;
diff --git a/src/udev/udev-builtin-input_id.c b/src/grp-udev/libudev-core/udev-builtin-input_id.c
index 59b9804dc4..d4ba49addd 100644
--- a/src/udev/udev-builtin-input_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-input_id.c
@@ -27,14 +27,15 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
#include <linux/limits.h>
#include <linux/input.h>
-#include "fd-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#include "udev.h"
-#include "util.h"
/* we must use this kernel-compatible implementation */
#define BITS_PER_LONG (sizeof(unsigned long) * 8)
diff --git a/src/udev/udev-builtin-keyboard.c b/src/grp-udev/libudev-core/udev-builtin-keyboard.c
index 09024116f2..32792260c8 100644
--- a/src/udev/udev-builtin-keyboard.c
+++ b/src/grp-udev/libudev-core/udev-builtin-keyboard.c
@@ -21,12 +21,13 @@
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
+
#include <linux/input.h>
-#include "fd-util.h"
-#include "parse-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static const struct key *keyboard_lookup_key(const char *str, GPERF_LEN_TYPE len);
diff --git a/src/udev/udev-builtin-kmod.c b/src/grp-udev/libudev-core/udev-builtin-kmod.c
index 9665f678fd..91732bbfa4 100644
--- a/src/udev/udev-builtin-kmod.c
+++ b/src/grp-udev/libudev-core/udev-builtin-kmod.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "string-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static struct kmod_ctx *ctx = NULL;
diff --git a/src/udev/udev-builtin-net_id.c b/src/grp-udev/libudev-core/udev-builtin-net_id.c
index fe9d6f4482..3bd321ceeb 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-net_id.c
@@ -98,12 +98,13 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+
#include <linux/pci_regs.h>
-#include "fd-util.h"
-#include "fileio.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
#define ONBOARD_INDEX_MAX (16*1024-1)
diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c
index 8e47775135..38d0955f3d 100644
--- a/src/udev/udev-builtin-net_setup_link.c
+++ b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
#include "link-config.h"
-#include "log.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
#include "udev.h"
static link_config_ctx *ctx = NULL;
diff --git a/src/udev/udev-builtin-path_id.c b/src/grp-udev/libudev-core/udev-builtin-path_id.c
index 1825ee75a7..df1a999683 100644
--- a/src/udev/udev-builtin-path_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-path_id.c
@@ -30,8 +30,8 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
_printf_(2,3)
diff --git a/src/udev/udev-builtin-uaccess.c b/src/grp-udev/libudev-core/udev-builtin-uaccess.c
index 3ebe36f043..64773b90f5 100644
--- a/src/udev/udev-builtin-uaccess.c
+++ b/src/grp-udev/libudev-core/udev-builtin-uaccess.c
@@ -22,12 +22,13 @@
#include <stdio.h>
#include <stdlib.h>
-#include "sd-login.h"
+#include <systemd/sd-login.h>
-#include "login-util.h"
-#include "logind-acl.h"
+#include "systemd-basic/login-util.h"
+#include "systemd-basic/util.h"
#include "udev.h"
-#include "util.h"
+
+#include "logind-acl.h"
static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool test) {
int r;
diff --git a/src/udev/udev-builtin-usb_id.c b/src/grp-udev/libudev-core/udev-builtin-usb_id.c
index 587649eff0..68989580f2 100644
--- a/src/udev/udev-builtin-usb_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-usb_id.c
@@ -29,9 +29,9 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static void set_usb_iftype(char *to, int if_class_num, size_t len) {
diff --git a/src/udev/udev-builtin.c b/src/grp-udev/libudev-core/udev-builtin.c
index e6b36f124f..fb80e715ad 100644
--- a/src/udev/udev-builtin.c
+++ b/src/grp-udev/libudev-core/udev-builtin.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <string.h>
-#include "string-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static bool initialized;
diff --git a/src/udev/udev-ctrl.c b/src/grp-udev/libudev-core/udev-ctrl.c
index 7717ac7924..616ba7d199 100644
--- a/src/udev/udev-ctrl.c
+++ b/src/grp-udev/libudev-core/udev-ctrl.c
@@ -18,10 +18,10 @@
#include <sys/un.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "socket-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/socket-util.h"
#include "udev.h"
/* wire protocol magic must match */
diff --git a/src/udev/udev-event.c b/src/grp-udev/libudev-core/udev-event.c
index 54cd741bb1..f553b8b73d 100644
--- a/src/udev/udev-event.c
+++ b/src/grp-udev/libudev-core/udev-event.c
@@ -30,13 +30,13 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "netlink-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "string-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
typedef struct Spawn {
diff --git a/src/udev/udev-node.c b/src/grp-udev/libudev-core/udev-node.c
index 43004bc0bc..9577ae069e 100644
--- a/src/udev/udev-node.c
+++ b/src/grp-udev/libudev-core/udev-node.c
@@ -25,12 +25,12 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "formats-util.h"
-#include "fs-util.h"
-#include "selinux-util.h"
-#include "smack-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static int node_symlink(struct udev_device *dev, const char *node, const char *slink) {
diff --git a/src/udev/udev-rules.c b/src/grp-udev/libudev-core/udev-rules.c
index f6c416bf70..68b5ffc90d 100644
--- a/src/udev/udev-rules.c
+++ b/src/grp-udev/libudev-core/udev-rules.c
@@ -29,22 +29,22 @@
#include <time.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "glob-util.h"
-#include "path-util.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "strbuf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "sysctl-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/strbuf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/sysctl-util.h"
#include "udev.h"
-#include "user-util.h"
-#include "util.h"
#define PREALLOC_TOKEN 2048
diff --git a/src/udev/udev-watch.c b/src/grp-udev/libudev-core/udev-watch.c
index bc9096ed0c..ba3e7b979b 100644
--- a/src/udev/udev-watch.c
+++ b/src/grp-udev/libudev-core/udev-watch.c
@@ -24,7 +24,7 @@
#include <sys/inotify.h>
#include <unistd.h>
-#include "stdio-util.h"
+#include "systemd-basic/stdio-util.h"
#include "udev.h"
static int inotify_fd = -1;
diff --git a/rules/75-probe_mtd.rules b/src/grp-udev/mtd_probe/75-probe_mtd.rules
index 8848aeeaed..8848aeeaed 100644
--- a/rules/75-probe_mtd.rules
+++ b/src/grp-udev/mtd_probe/75-probe_mtd.rules
diff --git a/src/grp-udev/mtd_probe/GNUmakefile b/src/grp-udev/mtd_probe/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/mtd_probe/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/mtd_probe/Makefile b/src/grp-udev/mtd_probe/Makefile
new file mode 100644
index 0000000000..d7392a8a3b
--- /dev/null
+++ b/src/grp-udev/mtd_probe/Makefile
@@ -0,0 +1,37 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+mtd_probe_SOURCES = \
+ src/udev/mtd_probe/mtd_probe.c \
+ src/udev/mtd_probe/mtd_probe.h \
+ src/udev/mtd_probe/probe_smartmedia.c
+
+dist_udevrules_DATA += \
+ rules/75-probe_mtd.rules
+
+udevlibexec_PROGRAMS += \
+ mtd_probe
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/mtd_probe/mtd_probe.c b/src/grp-udev/mtd_probe/mtd_probe.c
index 462fab7623..462fab7623 100644
--- a/src/udev/mtd_probe/mtd_probe.c
+++ b/src/grp-udev/mtd_probe/mtd_probe.c
diff --git a/src/udev/mtd_probe/mtd_probe.h b/src/grp-udev/mtd_probe/mtd_probe.h
index 68e4954537..402d59bd9d 100644
--- a/src/udev/mtd_probe/mtd_probe.h
+++ b/src/grp-udev/mtd_probe/mtd_probe.h
@@ -21,7 +21,7 @@
#include <mtd/mtd-user.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
/* Full oob structure as written on the flash */
struct sm_oob {
diff --git a/src/udev/mtd_probe/probe_smartmedia.c b/src/grp-udev/mtd_probe/probe_smartmedia.c
index 2a7ba17637..2a7ba17637 100644
--- a/src/udev/mtd_probe/probe_smartmedia.c
+++ b/src/grp-udev/mtd_probe/probe_smartmedia.c
diff --git a/src/udev/scsi_id/.gitignore b/src/grp-udev/scsi_id/.gitignore
index 6aebddd809..6aebddd809 100644
--- a/src/udev/scsi_id/.gitignore
+++ b/src/grp-udev/scsi_id/.gitignore
diff --git a/src/grp-udev/scsi_id/GNUmakefile b/src/grp-udev/scsi_id/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/scsi_id/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/scsi_id/Makefile b/src/grp-udev/scsi_id/Makefile
new file mode 100644
index 0000000000..a2d159f052
--- /dev/null
+++ b/src/grp-udev/scsi_id/Makefile
@@ -0,0 +1,41 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+scsi_id_SOURCES =\
+ src/udev/scsi_id/scsi_id.c \
+ src/udev/scsi_id/scsi_serial.c \
+ src/udev/scsi_id/scsi.h \
+ src/udev/scsi_id/scsi_id.h
+
+scsi_id_LDADD = \
+ libsystemd-shared.la
+
+udevlibexec_PROGRAMS += \
+ scsi_id
+
+EXTRA_DIST += \
+ src/udev/scsi_id/README
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/scsi_id/README b/src/grp-udev/scsi_id/README
index 9cfe73991c..9cfe73991c 100644
--- a/src/udev/scsi_id/README
+++ b/src/grp-udev/scsi_id/README
diff --git a/src/udev/scsi_id/scsi.h b/src/grp-udev/scsi_id/scsi.h
index a27a84a40a..a27a84a40a 100644
--- a/src/udev/scsi_id/scsi.h
+++ b/src/grp-udev/scsi_id/scsi.h
diff --git a/src/udev/scsi_id/scsi_id.c b/src/grp-udev/scsi_id/scsi_id.c
index 4655691642..30611137d5 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/grp-udev/scsi_id/scsi_id.c
@@ -29,13 +29,14 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "libudev.h"
+#include <libudev.h>
-#include "fd-util.h"
#include "libudev-private.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/udev-util.h"
+
#include "scsi_id.h"
-#include "string-util.h"
-#include "udev-util.h"
static const struct option options[] = {
{ "device", required_argument, NULL, 'd' },
diff --git a/src/udev/scsi_id/scsi_id.h b/src/grp-udev/scsi_id/scsi_id.h
index 5c2e1c28ee..5c2e1c28ee 100644
--- a/src/udev/scsi_id/scsi_id.h
+++ b/src/grp-udev/scsi_id/scsi_id.h
diff --git a/src/udev/scsi_id/scsi_serial.c b/src/grp-udev/scsi_id/scsi_serial.c
index e079e28698..d2960086d5 100644
--- a/src/udev/scsi_id/scsi_serial.c
+++ b/src/grp-udev/scsi_id/scsi_serial.c
@@ -20,8 +20,6 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <linux/bsg.h>
-#include <linux/types.h>
#include <scsi/scsi.h>
#include <scsi/sg.h>
#include <stdio.h>
@@ -33,13 +31,17 @@
#include <time.h>
#include <unistd.h>
-#include "libudev.h"
+#include <linux/bsg.h>
+#include <linux/types.h>
+
+#include <libudev.h>
#include "libudev-private.h"
-#include "random-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/string-util.h"
+
#include "scsi.h"
#include "scsi_id.h"
-#include "string-util.h"
/*
* A priority based list of id, naa, and binary/ascii for the identifier
diff --git a/src/grp-udev/systemd-hwdb/GNUmakefile b/src/grp-udev/systemd-hwdb/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/systemd-hwdb/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/systemd-hwdb/Makefile b/src/grp-udev/systemd-hwdb/Makefile
new file mode 100644
index 0000000000..6f6731b3be
--- /dev/null
+++ b/src/grp-udev/systemd-hwdb/Makefile
@@ -0,0 +1,48 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_HWDB),)
+INSTALL_DIRS += \
+ $(sysconfdir)/udev/hwdb.d
+
+systemd_hwdb_SOURCES = \
+ src/libsystemd/sd-hwdb/hwdb-internal.h \
+ src/hwdb/hwdb.c
+
+systemd_hwdb_LDADD = \
+ libsystemd-shared.la
+
+rootbin_PROGRAMS += \
+ systemd-hwdb
+
+SYSINIT_TARGET_WANTS += \
+ systemd-hwdb-update.service
+
+endif # ENABLE_HWDB
+
+EXTRA_DIST += \
+ units/systemd-hwdb-update.service.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/hwdb/hwdb.c b/src/grp-udev/systemd-hwdb/hwdb.c
index ab1feb435b..5893fde05d 100644
--- a/src/hwdb/hwdb.c
+++ b/src/grp-udev/systemd-hwdb/hwdb.c
@@ -22,21 +22,21 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hwdb-internal.h"
-#include "hwdb-util.h"
-#include "label.h"
-#include "mkdir.h"
-#include "selinux-util.h"
-#include "strbuf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
-#include "verbs.h"
+#include "sd-hwdb/hwdb-internal.h"
+#include "sd-hwdb/hwdb-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/strbuf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/verbs.h"
/*
* Generic udev properties, key/value database based on modalias strings.
diff --git a/man/hwdb.xml b/src/grp-udev/systemd-hwdb/hwdb.xml
index 2b1e60fb22..2b1e60fb22 100644
--- a/man/hwdb.xml
+++ b/src/grp-udev/systemd-hwdb/hwdb.xml
diff --git a/man/systemd-hwdb.xml b/src/grp-udev/systemd-hwdb/systemd-hwdb.xml
index 2b363c77f2..2b363c77f2 100644
--- a/man/systemd-hwdb.xml
+++ b/src/grp-udev/systemd-hwdb/systemd-hwdb.xml
diff --git a/src/grp-udev/systemd-udevd/GNUmakefile b/src/grp-udev/systemd-udevd/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/systemd-udevd/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/systemd-udevd/Makefile b/src/grp-udev/systemd-udevd/Makefile
new file mode 100644
index 0000000000..fce845e78e
--- /dev/null
+++ b/src/grp-udev/systemd-udevd/Makefile
@@ -0,0 +1,40 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+udevconfdir = $(sysconfdir)/udev
+dist_udevconf_DATA = \
+ src/udev/udev.conf
+
+rootlibexec_PROGRAMS += \
+ systemd-udevd
+
+systemd_udevd_SOURCES = \
+ src/udev/udevd.c
+
+systemd_udevd_LDADD = \
+ libudev-core.la \
+ libsystemd-basic.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/systemd-udevd.service.in b/src/grp-udev/systemd-udevd/systemd-udevd.service.in
index 46d637883b..46d637883b 100644
--- a/units/systemd-udevd.service.in
+++ b/src/grp-udev/systemd-udevd/systemd-udevd.service.in
diff --git a/man/systemd-udevd.service.xml b/src/grp-udev/systemd-udevd/systemd-udevd.service.xml
index 243fd06471..243fd06471 100644
--- a/man/systemd-udevd.service.xml
+++ b/src/grp-udev/systemd-udevd/systemd-udevd.service.xml
diff --git a/src/udev/udev.conf b/src/grp-udev/systemd-udevd/udev.conf
index 47d1433002..47d1433002 100644
--- a/src/udev/udev.conf
+++ b/src/grp-udev/systemd-udevd/udev.conf
diff --git a/man/udev.conf.xml b/src/grp-udev/systemd-udevd/udev.conf.xml
index e104e53f5d..e104e53f5d 100644
--- a/man/udev.conf.xml
+++ b/src/grp-udev/systemd-udevd/udev.conf.xml
diff --git a/src/udev/udevd.c b/src/grp-udev/systemd-udevd/udevd.c
index badbab6205..ce50235c1b 100644
--- a/src/udev/udevd.c
+++ b/src/grp-udev/systemd-udevd/udevd.c
@@ -40,31 +40,31 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "sd-daemon.h"
-#include "sd-event.h"
-
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "cpu-set-util.h"
-#include "dev-setup.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "io-util.h"
-#include "netlink-util.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "udev-util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/cpu-set-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/dev-setup.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
-#include "user-util.h"
static bool arg_debug = false;
static int arg_daemonize = false;
diff --git a/src/udev/udev.pc.in b/src/grp-udev/udev.pc.in
index a0c2e82d47..a0c2e82d47 100644
--- a/src/udev/udev.pc.in
+++ b/src/grp-udev/udev.pc.in
diff --git a/man/udev.xml b/src/grp-udev/udev.xml
index 3359fb0865..3359fb0865 100644
--- a/man/udev.xml
+++ b/src/grp-udev/udev.xml
diff --git a/src/grp-udev/udevadm/GNUmakefile b/src/grp-udev/udevadm/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/udevadm/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/udevadm/Makefile b/src/grp-udev/udevadm/Makefile
new file mode 100644
index 0000000000..8f723e3a58
--- /dev/null
+++ b/src/grp-udev/udevadm/Makefile
@@ -0,0 +1,46 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += \
+ udevadm
+
+udevadm_SOURCES = \
+ src/udev/udevadm.c \
+ src/udev/udevadm-info.c \
+ src/udev/udevadm-control.c \
+ src/udev/udevadm-monitor.c \
+ src/udev/udevadm-hwdb.c \
+ src/udev/udevadm-settle.c \
+ src/udev/udevadm-trigger.c \
+ src/udev/udevadm-test.c \
+ src/udev/udevadm-test-builtin.c \
+ src/udev/udevadm-util.c \
+ src/udev/udevadm-util.h
+
+udevadm_LDADD = \
+ libudev-core.la \
+ libsystemd-basic.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/udevadm-control.c b/src/grp-udev/udevadm/udevadm-control.c
index 6f8e96a123..415da614f4 100644
--- a/src/udev/udevadm-control.c
+++ b/src/grp-udev/udevadm/udevadm-control.c
@@ -20,8 +20,8 @@
#include <string.h>
#include <unistd.h>
-#include "time-util.h"
-#include "udev-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
static void print_help(void) {
diff --git a/src/udev/udevadm-hwdb.c b/src/grp-udev/udevadm/udevadm-hwdb.c
index 1bffe8e8ab..365f23fdff 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/grp-udev/udevadm/udevadm-hwdb.c
@@ -22,18 +22,18 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hwdb-internal.h"
-#include "hwdb-util.h"
-#include "label.h"
-#include "mkdir.h"
-#include "strbuf.h"
-#include "string-util.h"
+#include "sd-hwdb/hwdb-internal.h"
+#include "sd-hwdb/hwdb-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/strbuf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#include "udev.h"
-#include "util.h"
/*
* Generic udev properties, key/value database based on modalias strings.
diff --git a/src/udev/udevadm-info.c b/src/grp-udev/udevadm/udevadm-info.c
index 6753c52005..38233de223 100644
--- a/src/udev/udevadm-info.c
+++ b/src/grp-udev/udevadm/udevadm-info.c
@@ -26,10 +26,11 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "string-util.h"
-#include "udev-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
+
#include "udevadm-util.h"
static bool skip_attribute(const char *name) {
diff --git a/src/udev/udevadm-monitor.c b/src/grp-udev/udevadm/udevadm-monitor.c
index f656c2198e..3503b19a21 100644
--- a/src/udev/udevadm-monitor.c
+++ b/src/grp-udev/udevadm/udevadm-monitor.c
@@ -25,9 +25,9 @@
#include <sys/time.h>
#include <time.h>
-#include "fd-util.h"
-#include "formats-util.h"
-#include "udev-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
static bool udev_exit;
diff --git a/src/udev/udevadm-settle.c b/src/grp-udev/udevadm/udevadm-settle.c
index 6a5dc6e9e4..1d2ee5ba26 100644
--- a/src/udev/udevadm-settle.c
+++ b/src/grp-udev/udevadm/udevadm-settle.c
@@ -26,9 +26,9 @@
#include <string.h>
#include <unistd.h>
-#include "parse-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/util.h"
#include "udev.h"
-#include "util.h"
static void help(void) {
printf("%s settle OPTIONS\n\n"
diff --git a/src/udev/udevadm-test-builtin.c b/src/grp-udev/udevadm/udevadm-test-builtin.c
index 0b180d03eb..1f65b3ed8b 100644
--- a/src/udev/udevadm-test-builtin.c
+++ b/src/grp-udev/udevadm/udevadm-test-builtin.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "string-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static void help(struct udev *udev) {
diff --git a/src/udev/udevadm-test.c b/src/grp-udev/udevadm/udevadm-test.c
index 702dbe5282..00b326d2cb 100644
--- a/src/udev/udevadm-test.c
+++ b/src/grp-udev/udevadm/udevadm-test.c
@@ -25,8 +25,8 @@
#include <sys/signalfd.h>
#include <unistd.h>
-#include "string-util.h"
-#include "udev-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
static void help(void) {
diff --git a/src/udev/udevadm-trigger.c b/src/grp-udev/udevadm/udevadm-trigger.c
index 9d52345d92..150b1e5a9a 100644
--- a/src/udev/udevadm-trigger.c
+++ b/src/grp-udev/udevadm/udevadm-trigger.c
@@ -23,11 +23,12 @@
#include <string.h>
#include <unistd.h>
-#include "string-util.h"
-#include "udev-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
+
#include "udevadm-util.h"
-#include "util.h"
static int verbose;
static int dry_run;
diff --git a/src/udev/udevadm-util.c b/src/grp-udev/udevadm/udevadm-util.c
index 3539c1d6ab..c972959888 100644
--- a/src/udev/udevadm-util.c
+++ b/src/grp-udev/udevadm/udevadm-util.c
@@ -15,7 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "string-util.h"
+#include "systemd-basic/string-util.h"
+
#include "udevadm-util.h"
struct udev_device *find_device(struct udev *udev,
diff --git a/src/udev/udevadm-util.h b/src/grp-udev/udevadm/udevadm-util.h
index dc712b0d93..dc712b0d93 100644
--- a/src/udev/udevadm-util.h
+++ b/src/grp-udev/udevadm/udevadm-util.h
diff --git a/src/udev/udevadm.c b/src/grp-udev/udevadm/udevadm.c
index a6a873e5de..4f61722836 100644
--- a/src/udev/udevadm.c
+++ b/src/grp-udev/udevadm/udevadm.c
@@ -20,8 +20,8 @@
#include <stddef.h>
#include <stdio.h>
-#include "selinux-util.h"
-#include "string-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/string-util.h"
#include "udev.h"
static int adm_version(struct udev *udev, int argc, char *argv[]) {
diff --git a/shell-completion/bash/udevadm b/src/grp-udev/udevadm/udevadm.completion.bash
index b828b8dd7c..b828b8dd7c 100644
--- a/shell-completion/bash/udevadm
+++ b/src/grp-udev/udevadm/udevadm.completion.bash
diff --git a/shell-completion/zsh/_udevadm b/src/grp-udev/udevadm/udevadm.completion.zsh
index bb23e64d24..bb23e64d24 100644
--- a/shell-completion/zsh/_udevadm
+++ b/src/grp-udev/udevadm/udevadm.completion.zsh
diff --git a/man/udevadm.xml b/src/grp-udev/udevadm/udevadm.xml
index 1c7921f5bd..1c7921f5bd 100644
--- a/man/udevadm.xml
+++ b/src/grp-udev/udevadm/udevadm.xml
diff --git a/rules/60-persistent-v4l.rules b/src/grp-udev/v4l_id/60-persistent-v4l.rules
index 93c5ee8c27..93c5ee8c27 100644
--- a/rules/60-persistent-v4l.rules
+++ b/src/grp-udev/v4l_id/60-persistent-v4l.rules
diff --git a/src/grp-udev/v4l_id/GNUmakefile b/src/grp-udev/v4l_id/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-udev/v4l_id/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-udev/v4l_id/Makefile b/src/grp-udev/v4l_id/Makefile
new file mode 100644
index 0000000000..5ba9e88afe
--- /dev/null
+++ b/src/grp-udev/v4l_id/Makefile
@@ -0,0 +1,38 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+v4l_id_SOURCES = \
+ src/udev/v4l_id/v4l_id.c
+
+v4l_id_LDADD = \
+ libsystemd-shared.la
+
+udevlibexec_PROGRAMS += \
+ v4l_id
+
+dist_udevrules_DATA += \
+ rules/60-persistent-v4l.rules
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/udev/v4l_id/v4l_id.c b/src/grp-udev/v4l_id/v4l_id.c
index aec6676a33..639682a04e 100644
--- a/src/udev/v4l_id/v4l_id.c
+++ b/src/grp-udev/v4l_id/v4l_id.c
@@ -24,10 +24,11 @@
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
+
#include <linux/videodev2.h>
-#include "fd-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
static const struct option options[] = {
diff --git a/src/grp-utils/GNUmakefile b/src/grp-utils/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/grp-utils/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-utils/Makefile b/src/grp-utils/Makefile
new file mode 100644
index 0000000000..9d510cf3cc
--- /dev/null
+++ b/src/grp-utils/Makefile
@@ -0,0 +1,32 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += systemd-ac-power
+nested.subdirs += systemd-escape
+nested.subdirs += systemd-notify
+nested.subdirs += systemd-path
+nested.subdirs += systemd-socket-activate
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-utils/systemd-ac-power/GNUmakefile b/src/grp-utils/systemd-ac-power/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-utils/systemd-ac-power/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-utils/systemd-ac-power/Makefile b/src/grp-utils/systemd-ac-power/Makefile
new file mode 100644
index 0000000000..4586f01612
--- /dev/null
+++ b/src/grp-utils/systemd-ac-power/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-ac-power
+systemd_ac_power_SOURCES = \
+ src/ac-power/ac-power.c
+
+systemd_ac_power_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/ac-power/ac-power.c b/src/grp-utils/systemd-ac-power/ac-power.c
index c5277884a8..4b9190f8c9 100644
--- a/src/ac-power/ac-power.c
+++ b/src/grp-utils/systemd-ac-power/ac-power.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "util.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
int r;
diff --git a/src/grp-utils/systemd-escape/GNUmakefile b/src/grp-utils/systemd-escape/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-utils/systemd-escape/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-utils/systemd-escape/Makefile b/src/grp-utils/systemd-escape/Makefile
new file mode 100644
index 0000000000..b59575db9b
--- /dev/null
+++ b/src/grp-utils/systemd-escape/Makefile
@@ -0,0 +1,34 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += systemd-escape
+
+systemd_escape_SOURCES = \
+ src/escape/escape.c
+
+systemd_escape_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/escape/escape.c b/src/grp-utils/systemd-escape/escape.c
index 9f39049577..5e186d75e2 100644
--- a/src/escape/escape.c
+++ b/src/grp-utils/systemd-escape/escape.c
@@ -21,11 +21,11 @@
#include <stdio.h>
#include <stdlib.h>
-#include "alloc-util.h"
-#include "log.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
static enum {
ACTION_ESCAPE,
diff --git a/man/systemd-escape.xml b/src/grp-utils/systemd-escape/systemd-escape.xml
index 5e95e22536..5e95e22536 100644
--- a/man/systemd-escape.xml
+++ b/src/grp-utils/systemd-escape/systemd-escape.xml
diff --git a/src/grp-utils/systemd-notify/GNUmakefile b/src/grp-utils/systemd-notify/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-utils/systemd-notify/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-utils/systemd-notify/Makefile b/src/grp-utils/systemd-notify/Makefile
new file mode 100644
index 0000000000..c46897b9e7
--- /dev/null
+++ b/src/grp-utils/systemd-notify/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += systemd-notify
+systemd_notify_SOURCES = \
+ src/notify/notify.c
+
+systemd_notify_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/notify/notify.c b/src/grp-utils/systemd-notify/notify.c
index 49f97c61d9..c347c110a9 100644
--- a/src/notify/notify.c
+++ b/src/grp-utils/systemd-notify/notify.c
@@ -23,16 +23,16 @@
#include <stdlib.h>
#include <unistd.h>
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "env-util.h"
-#include "formats-util.h"
-#include "log.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static bool arg_ready = false;
static pid_t arg_pid = 0;
diff --git a/src/grp-utils/systemd-notify/systemd-notify.completion.zsh b/src/grp-utils/systemd-notify/systemd-notify.completion.zsh
new file mode 100644
index 0000000000..910ddfa34c
--- /dev/null
+++ b/src/grp-utils/systemd-notify/systemd-notify.completion.zsh
@@ -0,0 +1,12 @@
+#compdef systemd-notify
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--version[Show package version]' \
+ '--ready[Inform the init system about service start-up completion.]' \
+ '--pid=[Inform the init system about the main PID of the daemon]:daemon main PID:_pids' \
+ '--status=[Send a free-form status string for the daemon to the init systemd]:status string:' \
+ '--booted[Returns 0 if the system was booted up with systemd]'
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-notify.xml b/src/grp-utils/systemd-notify/systemd-notify.xml
index a5f4077166..a5f4077166 100644
--- a/man/systemd-notify.xml
+++ b/src/grp-utils/systemd-notify/systemd-notify.xml
diff --git a/src/grp-utils/systemd-path/GNUmakefile b/src/grp-utils/systemd-path/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-utils/systemd-path/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-utils/systemd-path/Makefile b/src/grp-utils/systemd-path/Makefile
new file mode 100644
index 0000000000..e2e40e0121
--- /dev/null
+++ b/src/grp-utils/systemd-path/Makefile
@@ -0,0 +1,34 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-path
+
+systemd_path_SOURCES = \
+ src/path/path.c
+
+systemd_path_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-utils/systemd-path/_sd-common.h b/src/grp-utils/systemd-path/_sd-common.h
new file mode 120000
index 0000000000..d2b5d6f4e4
--- /dev/null
+++ b/src/grp-utils/systemd-path/_sd-common.h
@@ -0,0 +1 @@
+../../libsystemd/include/systemd/_sd-common.h \ No newline at end of file
diff --git a/src/path/path.c b/src/grp-utils/systemd-path/path.c
index 61d877fcf8..3c5323862f 100644
--- a/src/path/path.c
+++ b/src/grp-utils/systemd-path/path.c
@@ -22,13 +22,13 @@
#include <stdio.h>
#include <stdlib.h>
-#include "sd-path.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "util.h"
+#include "sd-path.h"
static const char *arg_suffix = NULL;
diff --git a/src/libsystemd/sd-path/sd-path.c b/src/grp-utils/systemd-path/sd-path.c
index b7aec1f20a..b36bc34e58 100644
--- a/src/libsystemd/sd-path/sd-path.c
+++ b/src/grp-utils/systemd-path/sd-path.c
@@ -17,18 +17,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-path.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
-#include "architecture.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "missing.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
+#include "sd-path.h"
static int from_environment(const char *envname, const char *fallback, const char **ret) {
assert(ret);
diff --git a/src/systemd/sd-path.h b/src/grp-utils/systemd-path/sd-path.h
index be6abdcd03..be6abdcd03 100644
--- a/src/systemd/sd-path.h
+++ b/src/grp-utils/systemd-path/sd-path.h
diff --git a/shell-completion/bash/systemd-path b/src/grp-utils/systemd-path/systemd-path.completion.bash
index 2f0c5f5bd7..2f0c5f5bd7 100644
--- a/shell-completion/bash/systemd-path
+++ b/src/grp-utils/systemd-path/systemd-path.completion.bash
diff --git a/man/systemd-path.xml b/src/grp-utils/systemd-path/systemd-path.xml
index e2b23eec51..e2b23eec51 100644
--- a/man/systemd-path.xml
+++ b/src/grp-utils/systemd-path/systemd-path.xml
diff --git a/src/grp-utils/systemd-socket-activate/GNUmakefile b/src/grp-utils/systemd-socket-activate/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/grp-utils/systemd-socket-activate/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/grp-utils/systemd-socket-activate/Makefile b/src/grp-utils/systemd-socket-activate/Makefile
new file mode 100644
index 0000000000..dd3e95a5e8
--- /dev/null
+++ b/src/grp-utils/systemd-socket-activate/Makefile
@@ -0,0 +1,35 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += \
+ systemd-socket-activate
+
+systemd_socket_activate_SOURCES = \
+ src/activate/activate.c
+
+systemd_socket_activate_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/activate/activate.c b/src/grp-utils/systemd-socket-activate/activate.c
index a0cfc22000..35a51b2fcc 100644
--- a/src/activate/activate.c
+++ b/src/grp-utils/systemd-socket-activate/activate.c
@@ -24,17 +24,17 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "strv.h"
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
static char** arg_listen = NULL;
static bool arg_accept = false;
diff --git a/man/systemd-socket-activate.xml b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.xml
index 1c0619a840..1c0619a840 100644
--- a/man/systemd-socket-activate.xml
+++ b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.xml
diff --git a/src/hibernate-resume/Makefile b/src/hibernate-resume/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/hibernate-resume/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/hostname/Makefile b/src/hostname/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/hostname/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/hwdb/Makefile b/src/hwdb/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/hwdb/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/import/Makefile b/src/import/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/import/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/initctl/Makefile b/src/initctl/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/initctl/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/journal-remote/Makefile b/src/journal-remote/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/journal-remote/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/journal/Makefile b/src/journal/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/journal/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/kernel-install/Makefile b/src/kernel-install/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/kernel-install/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/libsystemd-basic/GNUmakefile b/src/libsystemd-basic/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/libsystemd-basic/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-basic/Makefile b/src/libsystemd-basic/Makefile
new file mode 100644
index 0000000000..369b265ff7
--- /dev/null
+++ b/src/libsystemd-basic/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/basic/MurmurHash2.h b/src/libsystemd-basic/include/systemd-basic/MurmurHash2.h
index 93362dd485..93362dd485 100644
--- a/src/basic/MurmurHash2.h
+++ b/src/libsystemd-basic/include/systemd-basic/MurmurHash2.h
diff --git a/src/basic/af-list.h b/src/libsystemd-basic/include/systemd-basic/af-list.h
index 6a4cc03839..6a4cc03839 100644
--- a/src/basic/af-list.h
+++ b/src/libsystemd-basic/include/systemd-basic/af-list.h
diff --git a/src/basic/alloc-util.h b/src/libsystemd-basic/include/systemd-basic/alloc-util.h
index a44dd473c1..a44dd473c1 100644
--- a/src/basic/alloc-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/alloc-util.h
diff --git a/src/basic/architecture.h b/src/libsystemd-basic/include/systemd-basic/architecture.h
index 5a77c31932..5a77c31932 100644
--- a/src/basic/architecture.h
+++ b/src/libsystemd-basic/include/systemd-basic/architecture.h
diff --git a/src/basic/arphrd-list.h b/src/libsystemd-basic/include/systemd-basic/arphrd-list.h
index c0f8758dbe..c0f8758dbe 100644
--- a/src/basic/arphrd-list.h
+++ b/src/libsystemd-basic/include/systemd-basic/arphrd-list.h
diff --git a/src/basic/async.h b/src/libsystemd-basic/include/systemd-basic/async.h
index 9bd13ff6e0..9bd13ff6e0 100644
--- a/src/basic/async.h
+++ b/src/libsystemd-basic/include/systemd-basic/async.h
diff --git a/src/basic/audit-util.h b/src/libsystemd-basic/include/systemd-basic/audit-util.h
index e048503991..e048503991 100644
--- a/src/basic/audit-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/audit-util.h
diff --git a/src/basic/barrier.h b/src/libsystemd-basic/include/systemd-basic/barrier.h
index 6347fddc4d..6347fddc4d 100644
--- a/src/basic/barrier.h
+++ b/src/libsystemd-basic/include/systemd-basic/barrier.h
diff --git a/src/basic/bitmap.h b/src/libsystemd-basic/include/systemd-basic/bitmap.h
index 63fdbe8bea..63fdbe8bea 100644
--- a/src/basic/bitmap.h
+++ b/src/libsystemd-basic/include/systemd-basic/bitmap.h
diff --git a/src/basic/btrfs-ctree.h b/src/libsystemd-basic/include/systemd-basic/btrfs-ctree.h
index 66bdf9736e..66bdf9736e 100644
--- a/src/basic/btrfs-ctree.h
+++ b/src/libsystemd-basic/include/systemd-basic/btrfs-ctree.h
diff --git a/src/basic/btrfs-util.h b/src/libsystemd-basic/include/systemd-basic/btrfs-util.h
index 1d852d502c..db431f5b74 100644
--- a/src/basic/btrfs-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/btrfs-util.h
@@ -23,7 +23,7 @@
#include <stdint.h>
#include <sys/types.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
#include "time-util.h"
diff --git a/src/basic/build.h b/src/libsystemd-basic/include/systemd-basic/build.h
index 633c2aaccb..633c2aaccb 100644
--- a/src/basic/build.h
+++ b/src/libsystemd-basic/include/systemd-basic/build.h
diff --git a/src/basic/bus-label.h b/src/libsystemd-basic/include/systemd-basic/bus-label.h
index 62fb2c450c..62fb2c450c 100644
--- a/src/basic/bus-label.h
+++ b/src/libsystemd-basic/include/systemd-basic/bus-label.h
diff --git a/src/basic/calendarspec.h b/src/libsystemd-basic/include/systemd-basic/calendarspec.h
index c6087228fd..c6087228fd 100644
--- a/src/basic/calendarspec.h
+++ b/src/libsystemd-basic/include/systemd-basic/calendarspec.h
diff --git a/src/basic/cap-list.h b/src/libsystemd-basic/include/systemd-basic/cap-list.h
index c1f6b94ad3..c1f6b94ad3 100644
--- a/src/basic/cap-list.h
+++ b/src/libsystemd-basic/include/systemd-basic/cap-list.h
diff --git a/src/basic/capability-util.h b/src/libsystemd-basic/include/systemd-basic/capability-util.h
index 35a896e229..35a896e229 100644
--- a/src/basic/capability-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/capability-util.h
diff --git a/src/basic/cgroup-util.h b/src/libsystemd-basic/include/systemd-basic/cgroup-util.h
index 0aa27c4cd7..0aa27c4cd7 100644
--- a/src/basic/cgroup-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/cgroup-util.h
diff --git a/src/basic/chattr-util.h b/src/libsystemd-basic/include/systemd-basic/chattr-util.h
index 960cf6d5b3..960cf6d5b3 100644
--- a/src/basic/chattr-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/chattr-util.h
diff --git a/src/basic/clock-util.h b/src/libsystemd-basic/include/systemd-basic/clock-util.h
index 8830cd2f38..8830cd2f38 100644
--- a/src/basic/clock-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/clock-util.h
diff --git a/src/basic/conf-files.h b/src/libsystemd-basic/include/systemd-basic/conf-files.h
index e00e0e81fb..e00e0e81fb 100644
--- a/src/basic/conf-files.h
+++ b/src/libsystemd-basic/include/systemd-basic/conf-files.h
diff --git a/src/basic/copy.h b/src/libsystemd-basic/include/systemd-basic/copy.h
index b5d08ebafe..b5d08ebafe 100644
--- a/src/basic/copy.h
+++ b/src/libsystemd-basic/include/systemd-basic/copy.h
diff --git a/src/basic/cpu-set-util.h b/src/libsystemd-basic/include/systemd-basic/cpu-set-util.h
index 6f49d9afb0..6f49d9afb0 100644
--- a/src/basic/cpu-set-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/cpu-set-util.h
diff --git a/src/basic/def.h b/src/libsystemd-basic/include/systemd-basic/def.h
index 2266eff650..2266eff650 100644
--- a/src/basic/def.h
+++ b/src/libsystemd-basic/include/systemd-basic/def.h
diff --git a/src/basic/device-nodes.h b/src/libsystemd-basic/include/systemd-basic/device-nodes.h
index 94f385abcb..94f385abcb 100644
--- a/src/basic/device-nodes.h
+++ b/src/libsystemd-basic/include/systemd-basic/device-nodes.h
diff --git a/src/basic/dirent-util.h b/src/libsystemd-basic/include/systemd-basic/dirent-util.h
index b91d04908f..b91d04908f 100644
--- a/src/basic/dirent-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/dirent-util.h
diff --git a/src/basic/env-util.h b/src/libsystemd-basic/include/systemd-basic/env-util.h
index b1fef704c2..b1fef704c2 100644
--- a/src/basic/env-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/env-util.h
diff --git a/src/basic/errno-list.h b/src/libsystemd-basic/include/systemd-basic/errno-list.h
index 4eec0cc786..4eec0cc786 100644
--- a/src/basic/errno-list.h
+++ b/src/libsystemd-basic/include/systemd-basic/errno-list.h
diff --git a/src/basic/escape.h b/src/libsystemd-basic/include/systemd-basic/escape.h
index deaa4def28..6e58f61e19 100644
--- a/src/basic/escape.h
+++ b/src/libsystemd-basic/include/systemd-basic/escape.h
@@ -25,8 +25,8 @@
#include <sys/types.h>
#include <uchar.h>
-#include "string-util.h"
#include "missing.h"
+#include "string-util.h"
/* What characters are special in the shell? */
/* must be escaped outside and inside double-quotes */
diff --git a/src/basic/ether-addr-util.h b/src/libsystemd-basic/include/systemd-basic/ether-addr-util.h
index 74e125a95f..74e125a95f 100644
--- a/src/basic/ether-addr-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/ether-addr-util.h
diff --git a/src/basic/exit-status.h b/src/libsystemd-basic/include/systemd-basic/exit-status.h
index 0cfdfd7891..0cfdfd7891 100644
--- a/src/basic/exit-status.h
+++ b/src/libsystemd-basic/include/systemd-basic/exit-status.h
diff --git a/src/basic/extract-word.h b/src/libsystemd-basic/include/systemd-basic/extract-word.h
index 21db5ef33f..21db5ef33f 100644
--- a/src/basic/extract-word.h
+++ b/src/libsystemd-basic/include/systemd-basic/extract-word.h
diff --git a/src/basic/fd-util.h b/src/libsystemd-basic/include/systemd-basic/fd-util.h
index 34b98d4aec..34b98d4aec 100644
--- a/src/basic/fd-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/fd-util.h
diff --git a/src/basic/fileio-label.h b/src/libsystemd-basic/include/systemd-basic/fileio-label.h
index fe7543013d..fe7543013d 100644
--- a/src/basic/fileio-label.h
+++ b/src/libsystemd-basic/include/systemd-basic/fileio-label.h
diff --git a/src/basic/fileio.h b/src/libsystemd-basic/include/systemd-basic/fileio.h
index b58c83e64a..b58c83e64a 100644
--- a/src/basic/fileio.h
+++ b/src/libsystemd-basic/include/systemd-basic/fileio.h
diff --git a/src/basic/formats-util.h b/src/libsystemd-basic/include/systemd-basic/formats-util.h
index 39a185f59b..39a185f59b 100644
--- a/src/basic/formats-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/formats-util.h
diff --git a/src/basic/fs-util.h b/src/libsystemd-basic/include/systemd-basic/fs-util.h
index 31df47cf1e..31df47cf1e 100644
--- a/src/basic/fs-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/fs-util.h
diff --git a/src/basic/glob-util.h b/src/libsystemd-basic/include/systemd-basic/glob-util.h
index 5d8fb47a26..5d8fb47a26 100644
--- a/src/basic/glob-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/glob-util.h
diff --git a/src/basic/gunicode.h b/src/libsystemd-basic/include/systemd-basic/gunicode.h
index 5975bc8fc9..5975bc8fc9 100644
--- a/src/basic/gunicode.h
+++ b/src/libsystemd-basic/include/systemd-basic/gunicode.h
diff --git a/src/basic/hash-funcs.h b/src/libsystemd-basic/include/systemd-basic/hash-funcs.h
index 299189d143..299189d143 100644
--- a/src/basic/hash-funcs.h
+++ b/src/libsystemd-basic/include/systemd-basic/hash-funcs.h
diff --git a/src/basic/hashmap.h b/src/libsystemd-basic/include/systemd-basic/hashmap.h
index 6d1ae48b21..6d1ae48b21 100644
--- a/src/basic/hashmap.h
+++ b/src/libsystemd-basic/include/systemd-basic/hashmap.h
diff --git a/src/basic/hexdecoct.h b/src/libsystemd-basic/include/systemd-basic/hexdecoct.h
index 1ba2f69ebd..1ba2f69ebd 100644
--- a/src/basic/hexdecoct.h
+++ b/src/libsystemd-basic/include/systemd-basic/hexdecoct.h
diff --git a/src/basic/hostname-util.h b/src/libsystemd-basic/include/systemd-basic/hostname-util.h
index 7af4e6c7ec..7af4e6c7ec 100644
--- a/src/basic/hostname-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/hostname-util.h
diff --git a/src/basic/in-addr-util.h b/src/libsystemd-basic/include/systemd-basic/in-addr-util.h
index d60064aef8..d60064aef8 100644
--- a/src/basic/in-addr-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/in-addr-util.h
diff --git a/src/basic/io-util.h b/src/libsystemd-basic/include/systemd-basic/io-util.h
index 4684ed3bfc..4684ed3bfc 100644
--- a/src/basic/io-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/io-util.h
diff --git a/src/basic/ioprio.h b/src/libsystemd-basic/include/systemd-basic/ioprio.h
index d8bb6eb497..d8bb6eb497 100644
--- a/src/basic/ioprio.h
+++ b/src/libsystemd-basic/include/systemd-basic/ioprio.h
diff --git a/src/basic/label.h b/src/libsystemd-basic/include/systemd-basic/label.h
index 3e9251aa71..3e9251aa71 100644
--- a/src/basic/label.h
+++ b/src/libsystemd-basic/include/systemd-basic/label.h
diff --git a/src/basic/list.h b/src/libsystemd-basic/include/systemd-basic/list.h
index c3771a177f..c3771a177f 100644
--- a/src/basic/list.h
+++ b/src/libsystemd-basic/include/systemd-basic/list.h
diff --git a/src/basic/locale-util.h b/src/libsystemd-basic/include/systemd-basic/locale-util.h
index 0630a034ab..0630a034ab 100644
--- a/src/basic/locale-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/locale-util.h
diff --git a/src/basic/lockfile-util.h b/src/libsystemd-basic/include/systemd-basic/lockfile-util.h
index 22491ee8e1..22491ee8e1 100644
--- a/src/basic/lockfile-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/lockfile-util.h
diff --git a/src/basic/log.h b/src/libsystemd-basic/include/systemd-basic/log.h
index 2afee20bb5..f5f62e1c23 100644
--- a/src/basic/log.h
+++ b/src/libsystemd-basic/include/systemd-basic/log.h
@@ -27,7 +27,7 @@
#include <sys/socket.h>
#include <syslog.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
#include "macro.h"
diff --git a/src/basic/login-util.h b/src/libsystemd-basic/include/systemd-basic/login-util.h
index b01ee25c88..b01ee25c88 100644
--- a/src/basic/login-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/login-util.h
diff --git a/src/basic/macro.h b/src/libsystemd-basic/include/systemd-basic/macro.h
index 6b2aeb933f..6b2aeb933f 100644
--- a/src/basic/macro.h
+++ b/src/libsystemd-basic/include/systemd-basic/macro.h
diff --git a/src/basic/memfd-util.h b/src/libsystemd-basic/include/systemd-basic/memfd-util.h
index 46d4989e4c..46d4989e4c 100644
--- a/src/basic/memfd-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/memfd-util.h
diff --git a/src/basic/mempool.h b/src/libsystemd-basic/include/systemd-basic/mempool.h
index 0618b8dd22..0618b8dd22 100644
--- a/src/basic/mempool.h
+++ b/src/libsystemd-basic/include/systemd-basic/mempool.h
diff --git a/src/basic/missing.h b/src/libsystemd-basic/include/systemd-basic/missing.h
index 4c013be608..85d086eb9b 100644
--- a/src/basic/missing.h
+++ b/src/libsystemd-basic/include/systemd-basic/missing.h
@@ -23,6 +23,13 @@
#include <errno.h>
#include <fcntl.h>
+#include <net/ethernet.h>
+#include <stdlib.h>
+#include <sys/resource.h>
+#include <sys/syscall.h>
+#include <uchar.h>
+#include <unistd.h>
+
#include <linux/audit.h>
#include <linux/capability.h>
#include <linux/if_link.h>
@@ -31,12 +38,6 @@
#include <linux/neighbour.h>
#include <linux/oom.h>
#include <linux/rtnetlink.h>
-#include <net/ethernet.h>
-#include <stdlib.h>
-#include <sys/resource.h>
-#include <sys/syscall.h>
-#include <uchar.h>
-#include <unistd.h>
#ifdef HAVE_AUDIT
#include <libaudit.h>
diff --git a/src/basic/missing_syscall.h b/src/libsystemd-basic/include/systemd-basic/missing_syscall.h
index e6fd67cb9d..e6fd67cb9d 100644
--- a/src/basic/missing_syscall.h
+++ b/src/libsystemd-basic/include/systemd-basic/missing_syscall.h
diff --git a/src/basic/mkdir.h b/src/libsystemd-basic/include/systemd-basic/mkdir.h
index d564a3547f..d564a3547f 100644
--- a/src/basic/mkdir.h
+++ b/src/libsystemd-basic/include/systemd-basic/mkdir.h
diff --git a/src/basic/mount-util.h b/src/libsystemd-basic/include/systemd-basic/mount-util.h
index 4f305df19f..4f305df19f 100644
--- a/src/basic/mount-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/mount-util.h
diff --git a/src/basic/nss-util.h b/src/libsystemd-basic/include/systemd-basic/nss-util.h
index e7844fff96..e7844fff96 100644
--- a/src/basic/nss-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/nss-util.h
diff --git a/src/basic/ordered-set.h b/src/libsystemd-basic/include/systemd-basic/ordered-set.h
index e1dfc86380..e1dfc86380 100644
--- a/src/basic/ordered-set.h
+++ b/src/libsystemd-basic/include/systemd-basic/ordered-set.h
diff --git a/src/basic/parse-util.h b/src/libsystemd-basic/include/systemd-basic/parse-util.h
index 461e1cd4d8..461e1cd4d8 100644
--- a/src/basic/parse-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/parse-util.h
diff --git a/src/basic/path-util.h b/src/libsystemd-basic/include/systemd-basic/path-util.h
index 66545f52d9..66545f52d9 100644
--- a/src/basic/path-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/path-util.h
diff --git a/src/basic/prioq.h b/src/libsystemd-basic/include/systemd-basic/prioq.h
index 113c73d040..113c73d040 100644
--- a/src/basic/prioq.h
+++ b/src/libsystemd-basic/include/systemd-basic/prioq.h
diff --git a/src/basic/proc-cmdline.h b/src/libsystemd-basic/include/systemd-basic/proc-cmdline.h
index 6d6ee95c11..6d6ee95c11 100644
--- a/src/basic/proc-cmdline.h
+++ b/src/libsystemd-basic/include/systemd-basic/proc-cmdline.h
diff --git a/src/basic/process-util.h b/src/libsystemd-basic/include/systemd-basic/process-util.h
index 2568e3834f..aa51357172 100644
--- a/src/basic/process-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/process-util.h
@@ -25,8 +25,8 @@
#include <stddef.h>
#include <stdio.h>
#include <string.h>
-#include <sys/types.h>
#include <sys/resource.h>
+#include <sys/types.h>
#include "formats-util.h"
#include "macro.h"
diff --git a/src/basic/random-util.h b/src/libsystemd-basic/include/systemd-basic/random-util.h
index 3cee4c5014..3cee4c5014 100644
--- a/src/basic/random-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/random-util.h
diff --git a/src/basic/ratelimit.h b/src/libsystemd-basic/include/systemd-basic/ratelimit.h
index 9c8dddf5ad..9c8dddf5ad 100644
--- a/src/basic/ratelimit.h
+++ b/src/libsystemd-basic/include/systemd-basic/ratelimit.h
diff --git a/src/basic/raw-clone.h b/src/libsystemd-basic/include/systemd-basic/raw-clone.h
index d473828999..d473828999 100644
--- a/src/basic/raw-clone.h
+++ b/src/libsystemd-basic/include/systemd-basic/raw-clone.h
diff --git a/src/basic/refcnt.h b/src/libsystemd-basic/include/systemd-basic/refcnt.h
index 1d77a6445a..1d77a6445a 100644
--- a/src/basic/refcnt.h
+++ b/src/libsystemd-basic/include/systemd-basic/refcnt.h
diff --git a/src/basic/replace-var.h b/src/libsystemd-basic/include/systemd-basic/replace-var.h
index 78412910b2..78412910b2 100644
--- a/src/basic/replace-var.h
+++ b/src/libsystemd-basic/include/systemd-basic/replace-var.h
diff --git a/src/basic/rlimit-util.h b/src/libsystemd-basic/include/systemd-basic/rlimit-util.h
index d4594eccd6..d4594eccd6 100644
--- a/src/basic/rlimit-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/rlimit-util.h
diff --git a/src/basic/rm-rf.h b/src/libsystemd-basic/include/systemd-basic/rm-rf.h
index f693a5bb7c..f693a5bb7c 100644
--- a/src/basic/rm-rf.h
+++ b/src/libsystemd-basic/include/systemd-basic/rm-rf.h
diff --git a/src/basic/securebits.h b/src/libsystemd-basic/include/systemd-basic/securebits.h
index 98fbe0d433..98fbe0d433 100644
--- a/src/basic/securebits.h
+++ b/src/libsystemd-basic/include/systemd-basic/securebits.h
diff --git a/src/basic/selinux-util.h b/src/libsystemd-basic/include/systemd-basic/selinux-util.h
index ce6bc8e44c..ce6bc8e44c 100644
--- a/src/basic/selinux-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/selinux-util.h
diff --git a/src/basic/set.h b/src/libsystemd-basic/include/systemd-basic/set.h
index a5f8beb0c4..a5f8beb0c4 100644
--- a/src/basic/set.h
+++ b/src/libsystemd-basic/include/systemd-basic/set.h
diff --git a/src/basic/sigbus.h b/src/libsystemd-basic/include/systemd-basic/sigbus.h
index 980243d9ce..980243d9ce 100644
--- a/src/basic/sigbus.h
+++ b/src/libsystemd-basic/include/systemd-basic/sigbus.h
diff --git a/src/basic/signal-util.h b/src/libsystemd-basic/include/systemd-basic/signal-util.h
index dfd6eb564d..dfd6eb564d 100644
--- a/src/basic/signal-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/signal-util.h
diff --git a/src/basic/siphash24.h b/src/libsystemd-basic/include/systemd-basic/siphash24.h
index 54e2420cc6..54e2420cc6 100644
--- a/src/basic/siphash24.h
+++ b/src/libsystemd-basic/include/systemd-basic/siphash24.h
diff --git a/src/basic/smack-util.h b/src/libsystemd-basic/include/systemd-basic/smack-util.h
index f90ba0a027..f90ba0a027 100644
--- a/src/basic/smack-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/smack-util.h
diff --git a/src/basic/socket-util.h b/src/libsystemd-basic/include/systemd-basic/socket-util.h
index 2ef572badb..7f1a87bc3e 100644
--- a/src/basic/socket-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/socket-util.h
@@ -26,6 +26,7 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
+
#include <linux/netlink.h>
#include <linux/if_packet.h>
diff --git a/src/basic/sparse-endian.h b/src/libsystemd-basic/include/systemd-basic/sparse-endian.h
index a3573b84a9..a3573b84a9 100644
--- a/src/basic/sparse-endian.h
+++ b/src/libsystemd-basic/include/systemd-basic/sparse-endian.h
diff --git a/src/basic/special.h b/src/libsystemd-basic/include/systemd-basic/special.h
index 5276bcf598..5276bcf598 100644
--- a/src/basic/special.h
+++ b/src/libsystemd-basic/include/systemd-basic/special.h
diff --git a/src/basic/stat-util.h b/src/libsystemd-basic/include/systemd-basic/stat-util.h
index 56d28f791e..56d28f791e 100644
--- a/src/basic/stat-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/stat-util.h
diff --git a/src/basic/stdio-util.h b/src/libsystemd-basic/include/systemd-basic/stdio-util.h
index bd1144b4c9..bd1144b4c9 100644
--- a/src/basic/stdio-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/stdio-util.h
diff --git a/src/basic/strbuf.h b/src/libsystemd-basic/include/systemd-basic/strbuf.h
index a1632da0e8..a1632da0e8 100644
--- a/src/basic/strbuf.h
+++ b/src/libsystemd-basic/include/systemd-basic/strbuf.h
diff --git a/src/basic/string-table.h b/src/libsystemd-basic/include/systemd-basic/string-table.h
index 369610efc8..369610efc8 100644
--- a/src/basic/string-table.h
+++ b/src/libsystemd-basic/include/systemd-basic/string-table.h
diff --git a/src/basic/string-util.h b/src/libsystemd-basic/include/systemd-basic/string-util.h
index d029d538bd..d029d538bd 100644
--- a/src/basic/string-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/string-util.h
diff --git a/src/basic/strv.h b/src/libsystemd-basic/include/systemd-basic/strv.h
index 385ad17779..385ad17779 100644
--- a/src/basic/strv.h
+++ b/src/libsystemd-basic/include/systemd-basic/strv.h
diff --git a/src/basic/strxcpyx.h b/src/libsystemd-basic/include/systemd-basic/strxcpyx.h
index 80ff58726b..80ff58726b 100644
--- a/src/basic/strxcpyx.h
+++ b/src/libsystemd-basic/include/systemd-basic/strxcpyx.h
diff --git a/src/basic/syslog-util.h b/src/libsystemd-basic/include/systemd-basic/syslog-util.h
index 5cb606a1bf..5cb606a1bf 100644
--- a/src/basic/syslog-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/syslog-util.h
diff --git a/src/basic/terminal-util.h b/src/libsystemd-basic/include/systemd-basic/terminal-util.h
index b862bfaf05..b862bfaf05 100644
--- a/src/basic/terminal-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/terminal-util.h
diff --git a/src/basic/time-util.h b/src/libsystemd-basic/include/systemd-basic/time-util.h
index 558b0b5b7f..558b0b5b7f 100644
--- a/src/basic/time-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/time-util.h
diff --git a/src/basic/umask-util.h b/src/libsystemd-basic/include/systemd-basic/umask-util.h
index 359d87d27c..359d87d27c 100644
--- a/src/basic/umask-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/umask-util.h
diff --git a/src/basic/unaligned.h b/src/libsystemd-basic/include/systemd-basic/unaligned.h
index 7c847a3ccb..7c847a3ccb 100644
--- a/src/basic/unaligned.h
+++ b/src/libsystemd-basic/include/systemd-basic/unaligned.h
diff --git a/src/basic/unit-name.h b/src/libsystemd-basic/include/systemd-basic/unit-name.h
index 44eadf0347..44eadf0347 100644
--- a/src/basic/unit-name.h
+++ b/src/libsystemd-basic/include/systemd-basic/unit-name.h
diff --git a/src/basic/user-util.h b/src/libsystemd-basic/include/systemd-basic/user-util.h
index dfea561bde..dfea561bde 100644
--- a/src/basic/user-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/user-util.h
diff --git a/src/basic/utf8.h b/src/libsystemd-basic/include/systemd-basic/utf8.h
index f9b9c9468b..f9b9c9468b 100644
--- a/src/basic/utf8.h
+++ b/src/libsystemd-basic/include/systemd-basic/utf8.h
diff --git a/src/basic/util.h b/src/libsystemd-basic/include/systemd-basic/util.h
index bb2fc318ef..bb2fc318ef 100644
--- a/src/basic/util.h
+++ b/src/libsystemd-basic/include/systemd-basic/util.h
diff --git a/src/basic/verbs.h b/src/libsystemd-basic/include/systemd-basic/verbs.h
index 7b5e18510f..7b5e18510f 100644
--- a/src/basic/verbs.h
+++ b/src/libsystemd-basic/include/systemd-basic/verbs.h
diff --git a/src/basic/virt.h b/src/libsystemd-basic/include/systemd-basic/virt.h
index 7d15169112..7d15169112 100644
--- a/src/basic/virt.h
+++ b/src/libsystemd-basic/include/systemd-basic/virt.h
diff --git a/src/basic/web-util.h b/src/libsystemd-basic/include/systemd-basic/web-util.h
index e6bb6b53f5..e6bb6b53f5 100644
--- a/src/basic/web-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/web-util.h
diff --git a/src/basic/xattr-util.h b/src/libsystemd-basic/include/systemd-basic/xattr-util.h
index 6fa097bf7e..6fa097bf7e 100644
--- a/src/basic/xattr-util.h
+++ b/src/libsystemd-basic/include/systemd-basic/xattr-util.h
diff --git a/src/basic/xml.h b/src/libsystemd-basic/include/systemd-basic/xml.h
index 41cb69f0dc..41cb69f0dc 100644
--- a/src/basic/xml.h
+++ b/src/libsystemd-basic/include/systemd-basic/xml.h
diff --git a/src/basic/.gitignore b/src/libsystemd-basic/src/.gitignore
index e22411e484..e22411e484 100644
--- a/src/basic/.gitignore
+++ b/src/libsystemd-basic/src/.gitignore
diff --git a/src/libsystemd-basic/src/GNUmakefile b/src/libsystemd-basic/src/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libsystemd-basic/src/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-basic/src/Makefile b/src/libsystemd-basic/src/Makefile
new file mode 100644
index 0000000000..76336dca63
--- /dev/null
+++ b/src/libsystemd-basic/src/Makefile
@@ -0,0 +1,274 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+noinst_LTLIBRARIES += \
+ libsystemd-basic.la
+
+libsystemd_basic_la_SOURCES = \
+ src/basic/missing.h \
+ src/basic/missing_syscall.h \
+ src/basic/raw-clone.h \
+ src/basic/capability-util.c \
+ src/basic/capability-util.h \
+ src/basic/conf-files.c \
+ src/basic/conf-files.h \
+ src/basic/stdio-util.h \
+ src/basic/hostname-util.h \
+ src/basic/hostname-util.c \
+ src/basic/unit-name.c \
+ src/basic/unit-name.h \
+ src/basic/ioprio.h \
+ src/basic/securebits.h \
+ src/basic/special.h \
+ src/basic/list.h \
+ src/basic/unaligned.h \
+ src/basic/macro.h \
+ src/basic/def.h \
+ src/basic/sparse-endian.h \
+ src/basic/refcnt.h \
+ src/basic/util.c \
+ src/basic/util.h \
+ src/basic/io-util.c \
+ src/basic/io-util.h \
+ src/basic/string-util.c \
+ src/basic/string-util.h \
+ src/basic/fd-util.c \
+ src/basic/fd-util.h \
+ src/basic/parse-util.c \
+ src/basic/parse-util.h \
+ src/basic/user-util.c \
+ src/basic/user-util.h \
+ src/basic/rlimit-util.c \
+ src/basic/rlimit-util.h \
+ src/basic/dirent-util.c \
+ src/basic/dirent-util.h \
+ src/basic/xattr-util.c \
+ src/basic/xattr-util.h \
+ src/basic/chattr-util.c \
+ src/basic/chattr-util.h \
+ src/basic/proc-cmdline.c \
+ src/basic/proc-cmdline.h \
+ src/basic/fs-util.c \
+ src/basic/fs-util.h \
+ src/basic/syslog-util.c \
+ src/basic/syslog-util.h \
+ src/basic/stat-util.c \
+ src/basic/stat-util.h \
+ src/basic/mount-util.c \
+ src/basic/mount-util.h \
+ src/basic/hexdecoct.c \
+ src/basic/hexdecoct.h \
+ src/basic/glob-util.h \
+ src/basic/glob-util.c \
+ src/basic/extract-word.c \
+ src/basic/extract-word.h \
+ src/basic/escape.c \
+ src/basic/escape.h \
+ src/basic/cpu-set-util.c \
+ src/basic/cpu-set-util.h \
+ src/basic/lockfile-util.c \
+ src/basic/lockfile-util.h \
+ src/basic/path-util.c \
+ src/basic/path-util.h \
+ src/basic/time-util.c \
+ src/basic/time-util.h \
+ src/basic/locale-util.c \
+ src/basic/locale-util.h \
+ src/basic/umask-util.h \
+ src/basic/signal-util.c \
+ src/basic/signal-util.h \
+ src/basic/string-table.c \
+ src/basic/string-table.h \
+ src/basic/mempool.c \
+ src/basic/mempool.h \
+ src/basic/hashmap.c \
+ src/basic/hashmap.h \
+ src/basic/hash-funcs.c \
+ src/basic/hash-funcs.h \
+ src/basic/siphash24.c \
+ src/basic/siphash24.h \
+ src/basic/set.h \
+ src/basic/ordered-set.h \
+ src/basic/ordered-set.c \
+ src/basic/bitmap.c \
+ src/basic/bitmap.h \
+ src/basic/prioq.c \
+ src/basic/prioq.h \
+ src/basic/web-util.c \
+ src/basic/web-util.h \
+ src/basic/strv.c \
+ src/basic/strv.h \
+ src/basic/env-util.c \
+ src/basic/env-util.h \
+ src/basic/strbuf.c \
+ src/basic/strbuf.h \
+ src/basic/strxcpyx.c \
+ src/basic/strxcpyx.h \
+ src/basic/log.c \
+ src/basic/log.h \
+ src/basic/bus-label.c \
+ src/basic/bus-label.h \
+ src/basic/ratelimit.h \
+ src/basic/ratelimit.c \
+ src/basic/exit-status.c \
+ src/basic/exit-status.h \
+ src/basic/virt.c \
+ src/basic/virt.h \
+ src/basic/architecture.c \
+ src/basic/architecture.h \
+ src/basic/smack-util.c \
+ src/basic/smack-util.h \
+ src/basic/device-nodes.c \
+ src/basic/device-nodes.h \
+ src/basic/utf8.c \
+ src/basic/utf8.h \
+ src/basic/gunicode.c \
+ src/basic/gunicode.h \
+ src/basic/socket-util.c \
+ src/basic/socket-util.h \
+ src/basic/in-addr-util.c \
+ src/basic/in-addr-util.h \
+ src/basic/ether-addr-util.h \
+ src/basic/ether-addr-util.c \
+ src/basic/replace-var.c \
+ src/basic/replace-var.h \
+ src/basic/clock-util.c \
+ src/basic/clock-util.h \
+ src/basic/calendarspec.c \
+ src/basic/calendarspec.h \
+ src/basic/fileio.c \
+ src/basic/fileio.h \
+ src/basic/MurmurHash2.c \
+ src/basic/MurmurHash2.h \
+ src/basic/mkdir.c \
+ src/basic/mkdir.h \
+ src/basic/cgroup-util.c \
+ src/basic/cgroup-util.h \
+ src/basic/errno-list.c \
+ src/basic/errno-list.h \
+ src/basic/af-list.c \
+ src/basic/af-list.h \
+ src/basic/arphrd-list.c \
+ src/basic/arphrd-list.h \
+ src/basic/terminal-util.c \
+ src/basic/terminal-util.h \
+ src/basic/login-util.h \
+ src/basic/login-util.c \
+ src/basic/cap-list.c \
+ src/basic/cap-list.h \
+ src/basic/audit-util.c \
+ src/basic/audit-util.h \
+ src/basic/xml.c \
+ src/basic/xml.h \
+ src/basic/barrier.c \
+ src/basic/barrier.h \
+ src/basic/async.c \
+ src/basic/async.h \
+ src/basic/memfd-util.c \
+ src/basic/memfd-util.h \
+ src/basic/process-util.c \
+ src/basic/process-util.h \
+ src/basic/random-util.c \
+ src/basic/random-util.h \
+ src/basic/verbs.c \
+ src/basic/verbs.h \
+ src/basic/sigbus.c \
+ src/basic/sigbus.h \
+ src/basic/build.h \
+ src/basic/socket-label.c \
+ src/basic/label.c \
+ src/basic/label.h \
+ src/basic/btrfs-util.c \
+ src/basic/btrfs-util.h \
+ src/basic/btrfs-ctree.h \
+ src/basic/selinux-util.c \
+ src/basic/selinux-util.h \
+ src/basic/mkdir-label.c \
+ src/basic/fileio-label.c \
+ src/basic/fileio-label.h \
+ src/basic/rm-rf.c \
+ src/basic/rm-rf.h \
+ src/basic/copy.c \
+ src/basic/copy.h \
+ src/basic/alloc-util.h \
+ src/basic/alloc-util.c \
+ src/basic/formats-util.h \
+ src/basic/nss-util.h
+
+nodist_libsystemd_basic_la_SOURCES = \
+ src/basic/errno-from-name.h \
+ src/basic/errno-to-name.h \
+ src/basic/af-from-name.h \
+ src/basic/af-to-name.h \
+ src/basic/arphrd-from-name.h \
+ src/basic/arphrd-to-name.h \
+ src/basic/cap-from-name.h \
+ src/basic/cap-to-name.h
+
+libsystemd_basic_la_CFLAGS = \
+ $(SELINUX_CFLAGS) \
+ $(CAP_CFLAGS) \
+ -pthread
+
+libsystemd_basic_la_LIBADD = \
+ $(SELINUX_LIBS) \
+ $(CAP_LIBS) \
+ -lrt \
+ -lm
+
+$(outdir)/errno-list.txt:
+ $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
+
+$(outdir)/errno-to-name.h: $(outdir)/errno-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
+
+$(outdir)/af-list.txt:
+ $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
+
+$(outdir)/af-to-name.h: $(outdir)/af-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
+
+$(outdir)/arphrd-list.txt:
+ $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
+
+$(outdir)/arphrd-to-name.h: $(outdir)/arphrd-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
+
+$(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
+
+$(outdir)/cap-list.txt:
+ $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
+
+$(outdir)/cap-to-name.h: $(outdir)/cap-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
+
+$(outdir)/cap-from-name.gperf: $(outdir)/cap-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
+
+$(outdir)/cap-from-name.h: $(outdir)/cap-from-name.gperf
+ $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/basic/MurmurHash2.c b/src/libsystemd-basic/src/MurmurHash2.c
index 9020793930..9adcfa2eaf 100644
--- a/src/basic/MurmurHash2.c
+++ b/src/libsystemd-basic/src/MurmurHash2.c
@@ -13,7 +13,7 @@
// 2. It will not produce the same results on little-endian and big-endian
// machines.
-#include "MurmurHash2.h"
+#include "systemd-basic/MurmurHash2.h"
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
diff --git a/src/basic/af-list.c b/src/libsystemd-basic/src/af-list.c
index 4b291d177b..5d55313ff9 100644
--- a/src/basic/af-list.c
+++ b/src/libsystemd-basic/src/af-list.c
@@ -20,8 +20,8 @@
#include <string.h>
#include <sys/socket.h>
-#include "af-list.h"
-#include "macro.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/macro.h"
static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
diff --git a/src/basic/alloc-util.c b/src/libsystemd-basic/src/alloc-util.c
index b540dcddf5..ea4c40f55f 100644
--- a/src/basic/alloc-util.c
+++ b/src/libsystemd-basic/src/alloc-util.c
@@ -20,9 +20,9 @@
#include <stdint.h>
#include <string.h>
-#include "alloc-util.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
void* memdup(const void *p, size_t l) {
void *r;
diff --git a/src/basic/architecture.c b/src/libsystemd-basic/src/architecture.c
index b74dc0db78..c76d38b2a7 100644
--- a/src/basic/architecture.c
+++ b/src/libsystemd-basic/src/architecture.c
@@ -19,10 +19,10 @@
#include <sys/utsname.h>
-#include "architecture.h"
-#include "macro.h"
-#include "string-table.h"
-#include "string-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
int uname_architecture(void) {
diff --git a/src/basic/arphrd-list.c b/src/libsystemd-basic/src/arphrd-list.c
index 2d598dc66f..db500c60c0 100644
--- a/src/basic/arphrd-list.c
+++ b/src/libsystemd-basic/src/arphrd-list.c
@@ -20,8 +20,8 @@
#include <net/if_arp.h>
#include <string.h>
-#include "arphrd-list.h"
-#include "macro.h"
+#include "systemd-basic/arphrd-list.h"
+#include "systemd-basic/macro.h"
static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
diff --git a/src/basic/async.c b/src/libsystemd-basic/src/async.c
index a1f163f27b..152010330e 100644
--- a/src/basic/async.c
+++ b/src/libsystemd-basic/src/async.c
@@ -22,11 +22,11 @@
#include <stddef.h>
#include <unistd.h>
-#include "async.h"
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
int asynchronous_job(void* (*func)(void *p), void *arg) {
pthread_attr_t a;
diff --git a/src/basic/audit-util.c b/src/libsystemd-basic/src/audit-util.c
index d1c9695973..0f43f8fb33 100644
--- a/src/basic/audit-util.c
+++ b/src/libsystemd-basic/src/audit-util.c
@@ -18,18 +18,19 @@
***/
#include <errno.h>
-#include <linux/netlink.h>
#include <stdio.h>
#include <sys/socket.h>
-#include "alloc-util.h"
-#include "audit-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "user-util.h"
+#include <linux/netlink.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/user-util.h"
int audit_session_from_pid(pid_t pid, uint32_t *id) {
_cleanup_free_ char *s = NULL;
diff --git a/src/basic/barrier.c b/src/libsystemd-basic/src/barrier.c
index 2da633b311..903cbd56e2 100644
--- a/src/basic/barrier.c
+++ b/src/libsystemd-basic/src/barrier.c
@@ -27,9 +27,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include "barrier.h"
-#include "fd-util.h"
-#include "macro.h"
+#include "systemd-basic/barrier.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
/**
* Barriers
diff --git a/src/basic/bitmap.c b/src/libsystemd-basic/src/bitmap.c
index f6212e6151..f2e3c2e35b 100644
--- a/src/basic/bitmap.c
+++ b/src/libsystemd-basic/src/bitmap.c
@@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "bitmap.h"
-#include "hashmap.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bitmap.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
struct Bitmap {
uint64_t *bitmaps;
diff --git a/src/basic/btrfs-util.c b/src/libsystemd-basic/src/btrfs-util.c
index 359d85f2e8..9782eee336 100644
--- a/src/basic/btrfs-util.c
+++ b/src/libsystemd-basic/src/btrfs-util.c
@@ -20,7 +20,6 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <linux/loop.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@@ -31,27 +30,29 @@
#include <sys/sysmacros.h>
#include <unistd.h>
+#include <linux/loop.h>
+
#ifdef HAVE_LINUX_BTRFS_H
#include <linux/btrfs.h>
#endif
-#include "alloc-util.h"
-#include "btrfs-ctree.h"
-#include "btrfs-util.h"
-#include "copy.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "io-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "smack-util.h"
-#include "sparse-endian.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "time-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-ctree.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
/* WARNING: Be careful with file system ioctls! When we get an fd, we
* need to make sure it either refers to only a regular file or
diff --git a/src/basic/bus-label.c b/src/libsystemd-basic/src/bus-label.c
index d4531c7947..ec25168e32 100644
--- a/src/basic/bus-label.c
+++ b/src/libsystemd-basic/src/bus-label.c
@@ -19,10 +19,10 @@
#include <stdlib.h>
-#include "alloc-util.h"
-#include "bus-label.h"
-#include "hexdecoct.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
char *bus_label_escape(const char *s) {
char *r, *t;
diff --git a/src/basic/calendarspec.c b/src/libsystemd-basic/src/calendarspec.c
index fda293fcb9..2093e200f3 100644
--- a/src/basic/calendarspec.c
+++ b/src/libsystemd-basic/src/calendarspec.c
@@ -25,12 +25,12 @@
#include <string.h>
#include <time.h>
-#include "alloc-util.h"
-#include "calendarspec.h"
-#include "fileio.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/calendarspec.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
/* Longest valid date/time range is 1970..2199 */
#define MAX_RANGE_LEN 230
diff --git a/src/basic/cap-list.c b/src/libsystemd-basic/src/cap-list.c
index d68cc78d05..3f943e1ef4 100644
--- a/src/basic/cap-list.c
+++ b/src/libsystemd-basic/src/cap-list.c
@@ -20,11 +20,11 @@
#include <errno.h>
#include <string.h>
-#include "cap-list.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "util.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/util.h"
static const struct capability_name* lookup_capability(register const char *str, register GPERF_LEN_TYPE len);
diff --git a/src/basic/capability-util.c b/src/libsystemd-basic/src/capability-util.c
index c3de20a0e8..9f104b0ba1 100644
--- a/src/basic/capability-util.c
+++ b/src/libsystemd-basic/src/capability-util.c
@@ -25,14 +25,14 @@
#include <sys/prctl.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "capability-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
int have_effective_cap(int value) {
_cleanup_cap_free_ cap_t cap;
diff --git a/src/basic/cgroup-util.c b/src/libsystemd-basic/src/cgroup-util.c
index 134e6e3664..cf9c682599 100644
--- a/src/basic/cgroup-util.c
+++ b/src/libsystemd-basic/src/cgroup-util.c
@@ -31,32 +31,32 @@
#include <sys/xattr.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "def.h"
-#include "dirent-util.h"
-#include "extract-word.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "log.h"
-#include "login-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "set.h"
-#include "special.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "unit-name.h"
-#include "user-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/login-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) {
_cleanup_free_ char *fs = NULL;
diff --git a/src/basic/chattr-util.c b/src/libsystemd-basic/src/chattr-util.c
index 2896a729af..a5be95c865 100644
--- a/src/basic/chattr-util.c
+++ b/src/libsystemd-basic/src/chattr-util.c
@@ -21,11 +21,12 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
+
#include <linux/fs.h>
-#include "chattr-util.h"
-#include "fd-util.h"
-#include "macro.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
int chattr_fd(int fd, unsigned value, unsigned mask) {
unsigned old_attr, new_attr;
diff --git a/src/basic/clock-util.c b/src/libsystemd-basic/src/clock-util.c
index 7fe8d35ea5..959af6c569 100644
--- a/src/basic/clock-util.c
+++ b/src/libsystemd-basic/src/clock-util.c
@@ -21,17 +21,18 @@
#include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
-#include <time.h>
-#include <linux/rtc.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/time.h>
+#include <time.h>
+
+#include <linux/rtc.h>
-#include "clock-util.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/clock-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
int clock_get_hwclock(struct tm *tm) {
_cleanup_close_ int fd = -1;
diff --git a/src/basic/conf-files.c b/src/libsystemd-basic/src/conf-files.c
index c781610e14..39df2c97e4 100644
--- a/src/basic/conf-files.c
+++ b/src/libsystemd-basic/src/conf-files.c
@@ -24,17 +24,17 @@
#include <stdlib.h>
#include <string.h>
-#include "conf-files.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "hashmap.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static int files_add(Hashmap *h, const char *root, const char *path, const char *suffix) {
_cleanup_closedir_ DIR *dir = NULL;
diff --git a/src/basic/copy.c b/src/libsystemd-basic/src/copy.c
index 9883f5fa31..3767dee646 100644
--- a/src/basic/copy.c
+++ b/src/libsystemd-basic/src/copy.c
@@ -30,22 +30,22 @@
#include <time.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "chattr-util.h"
-#include "copy.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "io-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
-#include "umask-util.h"
-#include "xattr-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/xattr-util.h"
#define COPY_BUFFER_SIZE (16*1024u)
diff --git a/src/basic/cpu-set-util.c b/src/libsystemd-basic/src/cpu-set-util.c
index 95ed6928ff..b9671b094f 100644
--- a/src/basic/cpu-set-util.c
+++ b/src/libsystemd-basic/src/cpu-set-util.c
@@ -22,13 +22,13 @@
#include <stddef.h>
#include <syslog.h>
-#include "alloc-util.h"
-#include "cpu-set-util.h"
-#include "extract-word.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cpu-set-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
cpu_set_t* cpu_set_malloc(unsigned *ncpus) {
cpu_set_t *c;
diff --git a/src/basic/device-nodes.c b/src/libsystemd-basic/src/device-nodes.c
index 38c0628a90..3a1bf54189 100644
--- a/src/basic/device-nodes.c
+++ b/src/libsystemd-basic/src/device-nodes.c
@@ -21,8 +21,8 @@
#include <stdio.h>
#include <string.h>
-#include "device-nodes.h"
-#include "utf8.h"
+#include "systemd-basic/device-nodes.h"
+#include "systemd-basic/utf8.h"
int whitelisted_char_for_devnode(char c, const char *white) {
diff --git a/src/basic/dirent-util.c b/src/libsystemd-basic/src/dirent-util.c
index 59067121b7..72f85ca57b 100644
--- a/src/basic/dirent-util.c
+++ b/src/libsystemd-basic/src/dirent-util.c
@@ -20,9 +20,9 @@
#include <fcntl.h>
#include <sys/stat.h>
-#include "dirent-util.h"
-#include "path-util.h"
-#include "string-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
int dirent_ensure_type(DIR *d, struct dirent *de) {
struct stat st;
diff --git a/src/basic/env-util.c b/src/libsystemd-basic/src/env-util.c
index b74290d6fd..0238b53067 100644
--- a/src/basic/env-util.c
+++ b/src/libsystemd-basic/src/env-util.c
@@ -24,14 +24,14 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "env-util.h"
-#include "extract-word.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/utf8.h"
#define VALID_CHARS_ENV_NAME \
DIGITS LETTERS \
diff --git a/src/basic/errno-list.c b/src/libsystemd-basic/src/errno-list.c
index c6a01eec8b..b6a414410d 100644
--- a/src/basic/errno-list.c
+++ b/src/libsystemd-basic/src/errno-list.c
@@ -19,8 +19,8 @@
#include <string.h>
-#include "errno-list.h"
-#include "macro.h"
+#include "systemd-basic/errno-list.h"
+#include "systemd-basic/macro.h"
static const struct errno_name* lookup_errno(register const char *str,
register GPERF_LEN_TYPE len);
diff --git a/src/basic/escape.c b/src/libsystemd-basic/src/escape.c
index 4a1ec4505e..d2cc8bfd6e 100644
--- a/src/basic/escape.c
+++ b/src/libsystemd-basic/src/escape.c
@@ -21,11 +21,11 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "escape.h"
-#include "hexdecoct.h"
-#include "macro.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/utf8.h"
size_t cescape_char(char c, char *buf) {
char * buf_old = buf;
diff --git a/src/basic/ether-addr-util.c b/src/libsystemd-basic/src/ether-addr-util.c
index 5697e8d132..28523a505e 100644
--- a/src/basic/ether-addr-util.c
+++ b/src/libsystemd-basic/src/ether-addr-util.c
@@ -21,9 +21,9 @@
#include <stdio.h>
#include <sys/types.h>
-#include "ether-addr-util.h"
-#include "macro.h"
-#include "string-util.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]) {
assert(addr);
diff --git a/src/basic/exit-status.c b/src/libsystemd-basic/src/exit-status.c
index 59557f8afe..cd3e43bff8 100644
--- a/src/basic/exit-status.c
+++ b/src/libsystemd-basic/src/exit-status.c
@@ -20,9 +20,9 @@
#include <signal.h>
#include <stdlib.h>
-#include "exit-status.h"
-#include "macro.h"
-#include "set.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/set.h"
const char* exit_status_to_string(int status, ExitStatusLevel level) {
diff --git a/src/basic/extract-word.c b/src/libsystemd-basic/src/extract-word.c
index d6c1228463..f1605109db 100644
--- a/src/basic/extract-word.c
+++ b/src/libsystemd-basic/src/extract-word.c
@@ -26,13 +26,13 @@
#include <string.h>
#include <syslog.h>
-#include "alloc-util.h"
-#include "escape.h"
-#include "extract-word.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/utf8.h"
int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags) {
_cleanup_free_ char *s = NULL;
diff --git a/src/basic/fd-util.c b/src/libsystemd-basic/src/fd-util.c
index 5c820332a5..6e372274f5 100644
--- a/src/basic/fd-util.c
+++ b/src/libsystemd-basic/src/fd-util.c
@@ -24,15 +24,15 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "socket-util.h"
-#include "stdio-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/util.h"
int close_nointr(int fd) {
assert(fd >= 0);
diff --git a/src/basic/fileio-label.c b/src/libsystemd-basic/src/fileio-label.c
index 66dbc0fe1e..0d0941d599 100644
--- a/src/basic/fileio-label.c
+++ b/src/libsystemd-basic/src/fileio-label.c
@@ -20,9 +20,9 @@
#include <sys/stat.h>
-#include "fileio-label.h"
-#include "fileio.h"
-#include "selinux-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/selinux-util.h"
int write_string_file_atomic_label(const char *fn, const char *line) {
int r;
diff --git a/src/basic/fileio.c b/src/libsystemd-basic/src/fileio.c
index 1cfb7a98f5..76b2a6f20c 100644
--- a/src/basic/fileio.c
+++ b/src/libsystemd-basic/src/fileio.c
@@ -17,6 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
@@ -28,25 +29,24 @@
#include <sys/types.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "ctype.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hexdecoct.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "random-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
-#include "umask-util.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/utf8.h"
#define READ_FULL_BYTES_MAX (4U*1024U*1024U)
diff --git a/src/basic/fs-util.c b/src/libsystemd-basic/src/fs-util.c
index 48952a1c26..070be9c568 100644
--- a/src/basic/fs-util.c
+++ b/src/libsystemd-basic/src/fs-util.c
@@ -27,24 +27,24 @@
#include <time.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
int unlink_noerrno(const char *path) {
PROTECT_ERRNO;
diff --git a/src/basic/glob-util.c b/src/libsystemd-basic/src/glob-util.c
index 007198c269..c2d0245db3 100644
--- a/src/basic/glob-util.c
+++ b/src/libsystemd-basic/src/glob-util.c
@@ -20,9 +20,9 @@
#include <errno.h>
#include <glob.h>
-#include "glob-util.h"
-#include "macro.h"
-#include "strv.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/strv.h"
int glob_exists(const char *path) {
_cleanup_globfree_ glob_t g = {};
diff --git a/src/basic/gunicode.c b/src/libsystemd-basic/src/gunicode.c
index e6ac0545a4..c10b59867f 100644
--- a/src/basic/gunicode.c
+++ b/src/libsystemd-basic/src/gunicode.c
@@ -6,7 +6,7 @@
#include <stdlib.h>
-#include "gunicode.h"
+#include "systemd-basic/gunicode.h"
#define unichar uint32_t
diff --git a/src/basic/hash-funcs.c b/src/libsystemd-basic/src/hash-funcs.c
index c3a4a011b5..8989c1c737 100644
--- a/src/basic/hash-funcs.c
+++ b/src/libsystemd-basic/src/hash-funcs.c
@@ -18,7 +18,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hash-funcs.h"
+#include "systemd-basic/hash-funcs.h"
void string_hash_func(const void *p, struct siphash *state) {
siphash24_compress(p, strlen(p) + 1, state);
diff --git a/src/basic/hashmap.c b/src/libsystemd-basic/src/hashmap.c
index 50fefb0b54..84e26976f1 100644
--- a/src/basic/hashmap.c
+++ b/src/libsystemd-basic/src/hashmap.c
@@ -23,20 +23,21 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "hashmap.h"
-#include "macro.h"
-#include "mempool.h"
-#include "process-util.h"
-#include "random-util.h"
-#include "set.h"
-#include "siphash24.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mempool.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
#ifdef ENABLE_DEBUG_HASHMAP
#include <pthread.h>
-#include "list.h"
+
+#include "systemd-basic/list.h"
#endif
/*
diff --git a/src/basic/hexdecoct.c b/src/libsystemd-basic/src/hexdecoct.c
index c5bda6c4d6..3160130ac6 100644
--- a/src/basic/hexdecoct.c
+++ b/src/libsystemd-basic/src/hexdecoct.c
@@ -22,10 +22,10 @@
#include <stdint.h>
#include <stdlib.h>
-#include "alloc-util.h"
-#include "hexdecoct.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
char octchar(int x) {
return '0' + (x & 7);
diff --git a/src/basic/hostname-util.c b/src/libsystemd-basic/src/hostname-util.c
index e44a357287..8beec182eb 100644
--- a/src/basic/hostname-util.c
+++ b/src/libsystemd-basic/src/hostname-util.c
@@ -24,11 +24,11 @@
#include <sys/utsname.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "fileio.h"
-#include "hostname-util.h"
-#include "macro.h"
-#include "string-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
bool hostname_is_set(void) {
struct utsname u;
diff --git a/src/basic/in-addr-util.c b/src/libsystemd-basic/src/in-addr-util.c
index aa7ccd1afd..ad9f9fb071 100644
--- a/src/basic/in-addr-util.c
+++ b/src/libsystemd-basic/src/in-addr-util.c
@@ -24,11 +24,11 @@
#include <stdint.h>
#include <stdlib.h>
-#include "alloc-util.h"
-#include "in-addr-util.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/util.h"
bool in4_addr_is_null(const struct in_addr *a) {
return a->s_addr == 0;
diff --git a/src/basic/io-util.c b/src/libsystemd-basic/src/io-util.c
index cc6dfa8c1b..0f16344b8d 100644
--- a/src/basic/io-util.c
+++ b/src/libsystemd-basic/src/io-util.c
@@ -24,8 +24,8 @@
#include <time.h>
#include <unistd.h>
-#include "io-util.h"
-#include "time-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/time-util.h"
int flush_fd(int fd) {
struct pollfd pollfd = {
diff --git a/src/basic/label.c b/src/libsystemd-basic/src/label.c
index f5ab855d32..61c621e296 100644
--- a/src/basic/label.c
+++ b/src/libsystemd-basic/src/label.c
@@ -21,10 +21,10 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "label.h"
-#include "macro.h"
-#include "selinux-util.h"
-#include "smack-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/smack-util.h"
int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
int r, q;
diff --git a/src/basic/locale-util.c b/src/libsystemd-basic/src/locale-util.c
index ada0a28cd8..4bb35650b0 100644
--- a/src/basic/locale-util.c
+++ b/src/libsystemd-basic/src/locale-util.c
@@ -30,16 +30,16 @@
#include <sys/mman.h>
#include <sys/stat.h>
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "hashmap.h"
-#include "locale-util.h"
-#include "path-util.h"
-#include "set.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "utf8.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/utf8.h"
static int add_locales_from_archive(Set *locales) {
/* Stolen from glibc... */
diff --git a/src/basic/lockfile-util.c b/src/libsystemd-basic/src/lockfile-util.c
index 3ee4191e4d..127f43ed12 100644
--- a/src/basic/lockfile-util.c
+++ b/src/libsystemd-basic/src/lockfile-util.c
@@ -24,12 +24,12 @@
#include <sys/file.h>
#include <sys/stat.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "lockfile-util.h"
-#include "macro.h"
-#include "path-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/lockfile-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
int make_lock_file(const char *p, int operation, LockFile *ret) {
_cleanup_close_ int fd = -1;
diff --git a/src/basic/log.c b/src/libsystemd-basic/src/log.c
index 4919d175da..878594299e 100644
--- a/src/basic/log.c
+++ b/src/libsystemd-basic/src/log.c
@@ -33,27 +33,27 @@
#include <time.h>
#include <unistd.h>
-#include "sd-messages.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "io-util.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "syslog-util.h"
-#include "terminal-util.h"
-#include "time-util.h"
-#include "util.h"
+#include <systemd/sd-messages.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
#define SNDBUF_SIZE (8*1024*1024)
diff --git a/src/basic/login-util.c b/src/libsystemd-basic/src/login-util.c
index 339e94f12d..38026aea1d 100644
--- a/src/basic/login-util.c
+++ b/src/libsystemd-basic/src/login-util.c
@@ -19,8 +19,8 @@
#include <string.h>
-#include "login-util.h"
-#include "string-util.h"
+#include "systemd-basic/login-util.h"
+#include "systemd-basic/string-util.h"
bool session_id_valid(const char *id) {
diff --git a/src/basic/memfd-util.c b/src/libsystemd-basic/src/memfd-util.c
index 8c8cc78ebf..ccc4488ec0 100644
--- a/src/basic/memfd-util.c
+++ b/src/libsystemd-basic/src/memfd-util.c
@@ -28,13 +28,13 @@
#include <sys/mman.h>
#include <sys/prctl.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "memfd-util.h"
-#include "missing.h"
-#include "string-util.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/memfd-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/utf8.h"
int memfd_new(const char *name) {
_cleanup_free_ char *g = NULL;
diff --git a/src/basic/mempool.c b/src/libsystemd-basic/src/mempool.c
index f95e2beb0f..b4acc1d6e3 100644
--- a/src/basic/mempool.c
+++ b/src/libsystemd-basic/src/mempool.c
@@ -21,9 +21,9 @@
#include <stdint.h>
#include <stdlib.h>
-#include "macro.h"
-#include "mempool.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mempool.h"
+#include "systemd-basic/util.h"
struct pool {
struct pool *next;
diff --git a/src/basic/mkdir-label.c b/src/libsystemd-basic/src/mkdir-label.c
index aa6878cdf0..f0b8cf4eb7 100644
--- a/src/basic/mkdir-label.c
+++ b/src/libsystemd-basic/src/mkdir-label.c
@@ -22,8 +22,8 @@
#include <sys/types.h>
#include <unistd.h>
-#include "label.h"
-#include "mkdir.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/mkdir.h"
int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) {
return mkdir_safe_internal(path, mode, uid, gid, mkdir_label);
diff --git a/src/basic/mkdir.c b/src/libsystemd-basic/src/mkdir.c
index 6b1a98402c..dee03c1ced 100644
--- a/src/basic/mkdir.c
+++ b/src/libsystemd-basic/src/mkdir.c
@@ -22,12 +22,12 @@
#include <string.h>
#include <sys/stat.h>
-#include "fs-util.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "stat-util.h"
-#include "user-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/user-util.h"
int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) {
struct stat st;
diff --git a/src/basic/mount-util.c b/src/libsystemd-basic/src/mount-util.c
index c8f8022578..3148dd0ef2 100644
--- a/src/basic/mount-util.c
+++ b/src/libsystemd-basic/src/mount-util.c
@@ -25,18 +25,18 @@
#include <sys/statvfs.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hashmap.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "set.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id) {
char path[strlen("/proc/self/fdinfo/") + DECIMAL_STR_MAX(int)];
diff --git a/src/basic/ordered-set.c b/src/libsystemd-basic/src/ordered-set.c
index 2e0bdf6488..d75a5687a4 100644
--- a/src/basic/ordered-set.c
+++ b/src/libsystemd-basic/src/ordered-set.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "ordered-set.h"
-#include "strv.h"
+#include "systemd-basic/ordered-set.h"
+#include "systemd-basic/strv.h"
int ordered_set_consume(OrderedSet *s, void *p) {
int r;
diff --git a/src/basic/parse-util.c b/src/libsystemd-basic/src/parse-util.c
index c98815b9bc..2b68a68f4d 100644
--- a/src/basic/parse-util.c
+++ b/src/libsystemd-basic/src/parse-util.c
@@ -25,12 +25,12 @@
#include <string.h>
#include <xlocale.h>
-#include "alloc-util.h"
-#include "extract-word.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
int parse_boolean(const char *v) {
assert(v);
diff --git a/src/basic/path-util.c b/src/libsystemd-basic/src/path-util.c
index fd38f51c4c..8fdaf497f2 100644
--- a/src/basic/path-util.c
+++ b/src/libsystemd-basic/src/path-util.c
@@ -31,19 +31,19 @@
#include <libgen.h>
#undef basename
-#include "alloc-util.h"
-#include "extract-word.h"
-#include "fs-util.h"
-#include "glob-util.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
bool path_is_absolute(const char *p) {
return p[0] == '/';
diff --git a/src/basic/prioq.c b/src/libsystemd-basic/src/prioq.c
index 4570b8e4ba..4f43f973c3 100644
--- a/src/basic/prioq.c
+++ b/src/libsystemd-basic/src/prioq.c
@@ -30,9 +30,9 @@
#include <errno.h>
#include <stdlib.h>
-#include "alloc-util.h"
-#include "hashmap.h"
-#include "prioq.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/prioq.h"
struct prioq_item {
void *data;
diff --git a/src/basic/proc-cmdline.c b/src/libsystemd-basic/src/proc-cmdline.c
index 8297a222b7..3eb0e0e184 100644
--- a/src/basic/proc-cmdline.c
+++ b/src/libsystemd-basic/src/proc-cmdline.c
@@ -21,17 +21,17 @@
#include <stddef.h>
#include <string.h>
-#include "alloc-util.h"
-#include "extract-word.h"
-#include "fileio.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "process-util.h"
-#include "special.h"
-#include "string-util.h"
-#include "util.h"
-#include "virt.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
int proc_cmdline(char **ret) {
assert(ret);
diff --git a/src/basic/process-util.c b/src/libsystemd-basic/src/process-util.c
index 54b644ad56..aa1c31a089 100644
--- a/src/basic/process-util.c
+++ b/src/libsystemd-basic/src/process-util.c
@@ -20,7 +20,6 @@
#include <ctype.h>
#include <errno.h>
#include <limits.h>
-#include <linux/oom.h>
#include <sched.h>
#include <signal.h>
#include <stdbool.h>
@@ -33,28 +32,30 @@
#include <sys/wait.h>
#include <syslog.h>
#include <unistd.h>
+
+#include <linux/oom.h>
#ifdef HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
#endif
-#include "alloc-util.h"
-#include "architecture.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "ioprio.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "process-util.h"
-#include "raw-clone.h"
-#include "signal-util.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/ioprio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/raw-clone.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
int get_process_state(pid_t pid) {
const char *p;
diff --git a/src/basic/random-util.c b/src/libsystemd-basic/src/random-util.c
index ad7b3eedf2..95731cc884 100644
--- a/src/basic/random-util.c
+++ b/src/libsystemd-basic/src/random-util.c
@@ -21,20 +21,21 @@
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
+#include <stdint.h>
#include <stdlib.h>
#include <sys/time.h>
+
#include <linux/random.h>
-#include <stdint.h>
#ifdef HAVE_SYS_AUXV_H
#include <sys/auxv.h>
#endif
-#include "fd-util.h"
-#include "io-util.h"
-#include "missing.h"
-#include "random-util.h"
-#include "time-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/time-util.h"
int dev_urandom(void *p, size_t n) {
static int have_syscall = -1;
diff --git a/src/basic/ratelimit.c b/src/libsystemd-basic/src/ratelimit.c
index 3ca5625e4d..e3db7477e5 100644
--- a/src/basic/ratelimit.c
+++ b/src/libsystemd-basic/src/ratelimit.c
@@ -20,8 +20,8 @@
#include <sys/time.h>
-#include "macro.h"
-#include "ratelimit.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/ratelimit.h"
/* Modelled after Linux' lib/ratelimit.c by Dave Young
* <hidave.darkstar@gmail.com>, which is licensed GPLv2. */
diff --git a/src/basic/replace-var.c b/src/libsystemd-basic/src/replace-var.c
index 0d21423a9c..20c1245462 100644
--- a/src/basic/replace-var.c
+++ b/src/libsystemd-basic/src/replace-var.c
@@ -22,10 +22,10 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "macro.h"
-#include "replace-var.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/replace-var.h"
+#include "systemd-basic/string-util.h"
/*
* Generic infrastructure for replacing @FOO@ style variables in
diff --git a/src/basic/rlimit-util.c b/src/libsystemd-basic/src/rlimit-util.c
index ee063720ed..88792292da 100644
--- a/src/basic/rlimit-util.c
+++ b/src/libsystemd-basic/src/rlimit-util.c
@@ -20,14 +20,14 @@
#include <errno.h>
#include <sys/resource.h>
-#include "alloc-util.h"
-#include "extract-word.h"
-#include "formats-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "rlimit-util.h"
-#include "string-table.h"
-#include "time-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/time-util.h"
int setrlimit_closest(int resource, const struct rlimit *rlim) {
struct rlimit highest, fixed;
diff --git a/src/basic/rm-rf.c b/src/libsystemd-basic/src/rm-rf.c
index baa70c2c8d..b6410d52d5 100644
--- a/src/basic/rm-rf.c
+++ b/src/libsystemd-basic/src/rm-rf.c
@@ -26,16 +26,16 @@
#include <sys/statfs.h>
#include <unistd.h>
-#include "btrfs-util.h"
-#include "cgroup-util.h"
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "mount-util.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "stat-util.h"
-#include "string-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
static bool is_physical_fs(const struct statfs *sfs) {
return !is_temporary_fs(sfs) && !is_cgroup_fs(sfs);
diff --git a/src/basic/selinux-util.c b/src/libsystemd-basic/src/selinux-util.c
index bc07654668..ae7385d745 100644
--- a/src/basic/selinux-util.c
+++ b/src/libsystemd-basic/src/selinux-util.c
@@ -32,13 +32,13 @@
#include <selinux/selinux.h>
#endif
-#include "alloc-util.h"
-#include "log.h"
-#include "macro.h"
-#include "path-util.h"
-#include "selinux-util.h"
-#include "time-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
#ifdef HAVE_SELINUX
DEFINE_TRIVIAL_CLEANUP_FUNC(char*, freecon);
diff --git a/src/basic/sigbus.c b/src/libsystemd-basic/src/sigbus.c
index 0ce4f75684..785876c31e 100644
--- a/src/basic/sigbus.c
+++ b/src/libsystemd-basic/src/sigbus.c
@@ -22,9 +22,9 @@
#include <stddef.h>
#include <sys/mman.h>
-#include "macro.h"
-#include "sigbus.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/util.h"
#define SIGBUS_QUEUE_MAX 64
diff --git a/src/basic/signal-util.c b/src/libsystemd-basic/src/signal-util.c
index 280b5c3251..b28c4a680a 100644
--- a/src/basic/signal-util.c
+++ b/src/libsystemd-basic/src/signal-util.c
@@ -21,12 +21,12 @@
#include <stdarg.h>
#include <stdio.h>
-#include "macro.h"
-#include "parse-util.h"
-#include "signal-util.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
int reset_all_signal_handlers(void) {
static const struct sigaction sa = {
diff --git a/src/basic/siphash24.c b/src/libsystemd-basic/src/siphash24.c
index 8c1cdc3db6..91a789268b 100644
--- a/src/basic/siphash24.c
+++ b/src/libsystemd-basic/src/siphash24.c
@@ -19,9 +19,9 @@
#include <stdio.h>
-#include "macro.h"
-#include "siphash24.h"
-#include "unaligned.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/unaligned.h"
static inline uint64_t rotate_left(uint64_t x, uint8_t b) {
assert(b < 64);
diff --git a/src/basic/smack-util.c b/src/libsystemd-basic/src/smack-util.c
index 3a3df987df..2ec415ea7f 100644
--- a/src/basic/smack-util.c
+++ b/src/libsystemd-basic/src/smack-util.c
@@ -25,15 +25,15 @@
#include <sys/xattr.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "smack-util.h"
-#include "string-table.h"
-#include "xattr-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/xattr-util.h"
#ifdef HAVE_SMACK
bool mac_smack_use(void) {
diff --git a/src/basic/socket-label.c b/src/libsystemd-basic/src/socket-label.c
index 6d1dc83874..c129f30da5 100644
--- a/src/basic/socket-label.c
+++ b/src/libsystemd-basic/src/socket-label.c
@@ -26,15 +26,15 @@
#include <sys/un.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "selinux-util.h"
-#include "socket-util.h"
-#include "umask-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/umask-util.h"
int socket_address_listen(
const SocketAddress *a,
diff --git a/src/basic/socket-util.c b/src/libsystemd-basic/src/socket-util.c
index 1662c04705..549db55ec9 100644
--- a/src/basic/socket-util.c
+++ b/src/libsystemd-basic/src/socket-util.c
@@ -31,22 +31,22 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "socket-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "utf8.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
int socket_address_parse(SocketAddress *a, const char *s) {
char *e, *n;
diff --git a/src/basic/stat-util.c b/src/libsystemd-basic/src/stat-util.c
index 309e84b93d..94bfbae1c7 100644
--- a/src/basic/stat-util.c
+++ b/src/libsystemd-basic/src/stat-util.c
@@ -21,17 +21,18 @@
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
-#include <sys/types.h>
-#include <linux/magic.h>
#include <sys/statvfs.h>
+#include <sys/types.h>
#include <unistd.h>
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "stat-util.h"
-#include "string-util.h"
+#include <linux/magic.h>
+
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
int is_symlink(const char *path) {
struct stat info;
diff --git a/src/basic/strbuf.c b/src/libsystemd-basic/src/strbuf.c
index 00aaf9e621..855ad1718f 100644
--- a/src/basic/strbuf.c
+++ b/src/libsystemd-basic/src/strbuf.c
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "strbuf.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/strbuf.h"
/*
* Strbuf stores given strings in a single continuous allocated memory
diff --git a/src/basic/string-table.c b/src/libsystemd-basic/src/string-table.c
index a1499ab126..1974ee0513 100644
--- a/src/basic/string-table.c
+++ b/src/libsystemd-basic/src/string-table.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "string-table.h"
-#include "string-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) {
size_t i;
diff --git a/src/basic/string-util.c b/src/libsystemd-basic/src/string-util.c
index 6b06e643c9..8cf3f7aa53 100644
--- a/src/basic/string-util.c
+++ b/src/libsystemd-basic/src/string-util.c
@@ -24,12 +24,12 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "gunicode.h"
-#include "macro.h"
-#include "string-util.h"
-#include "utf8.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/gunicode.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
int strcmp_ptr(const char *a, const char *b) {
diff --git a/src/basic/strv.c b/src/libsystemd-basic/src/strv.c
index 0eec868eed..765985dd5a 100644
--- a/src/basic/strv.c
+++ b/src/libsystemd-basic/src/strv.c
@@ -24,13 +24,13 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "escape.h"
-#include "extract-word.h"
-#include "fileio.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
char *strv_find(char **l, const char *name) {
char **i;
diff --git a/src/basic/strxcpyx.c b/src/libsystemd-basic/src/strxcpyx.c
index aaf11d21f6..525f375f04 100644
--- a/src/basic/strxcpyx.c
+++ b/src/libsystemd-basic/src/strxcpyx.c
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <string.h>
-#include "strxcpyx.h"
+#include "systemd-basic/strxcpyx.h"
size_t strpcpy(char **dest, size_t size, const char *src) {
size_t len;
diff --git a/src/basic/syslog-util.c b/src/libsystemd-basic/src/syslog-util.c
index db3405154e..743c8c06d3 100644
--- a/src/basic/syslog-util.c
+++ b/src/libsystemd-basic/src/syslog-util.c
@@ -20,10 +20,10 @@
#include <string.h>
#include <syslog.h>
-#include "hexdecoct.h"
-#include "macro.h"
-#include "string-table.h"
-#include "syslog-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/syslog-util.h"
int syslog_parse_priority(const char **p, int *priority, bool with_facility) {
int a = 0, b = 0, c = 0;
diff --git a/src/basic/terminal-util.c b/src/libsystemd-basic/src/terminal-util.c
index eafdea9eb3..05729e72eb 100644
--- a/src/basic/terminal-util.c
+++ b/src/libsystemd-basic/src/terminal-util.c
@@ -20,41 +20,42 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
+#include <poll.h>
+#include <signal.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/inotify.h>
+#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/sysmacros.h>
#include <sys/time.h>
-#include <linux/kd.h>
-#include <linux/tiocl.h>
-#include <linux/vt.h>
-#include <poll.h>
-#include <signal.h>
-#include <sys/ioctl.h>
#include <sys/types.h>
#include <termios.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "io-util.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "socket-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "time-util.h"
-#include "util.h"
+#include <linux/kd.h>
+#include <linux/tiocl.h>
+#include <linux/vt.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
static volatile unsigned cached_columns = 0;
static volatile unsigned cached_lines = 0;
diff --git a/src/basic/time-util.c b/src/libsystemd-basic/src/time-util.c
index fedff1362c..530cef5506 100644
--- a/src/basic/time-util.c
+++ b/src/libsystemd-basic/src/time-util.c
@@ -28,17 +28,17 @@
#include <sys/types.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
static clockid_t map_clock_id(clockid_t c) {
diff --git a/src/basic/unit-name.c b/src/libsystemd-basic/src/unit-name.c
index fe883b95c7..40418b5b7a 100644
--- a/src/basic/unit-name.c
+++ b/src/libsystemd-basic/src/unit-name.c
@@ -23,16 +23,16 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "bus-label.h"
-#include "glob-util.h"
-#include "hexdecoct.h"
-#include "macro.h"
-#include "path-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
/* Characters valid in a unit name. */
#define VALID_CHARS \
diff --git a/src/basic/user-util.c b/src/libsystemd-basic/src/user-util.c
index de6c93056e..be849dfa5e 100644
--- a/src/basic/user-util.c
+++ b/src/libsystemd-basic/src/user-util.c
@@ -31,18 +31,18 @@
#include <unistd.h>
#include <utmp.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/utf8.h"
bool uid_is_valid(uid_t uid) {
diff --git a/src/basic/utf8.c b/src/libsystemd-basic/src/utf8.c
index 6eae2b983d..e84048bf2b 100644
--- a/src/basic/utf8.c
+++ b/src/libsystemd-basic/src/utf8.c
@@ -46,10 +46,10 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "hexdecoct.h"
-#include "macro.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/utf8.h"
bool unichar_is_valid(char32_t ch) {
diff --git a/src/basic/util.c b/src/libsystemd-basic/src/util.c
index ec7939dc83..00cb2692cd 100644
--- a/src/basic/util.c
+++ b/src/libsystemd-basic/src/util.c
@@ -34,31 +34,31 @@
#include <sys/types.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "build.h"
-#include "cgroup-util.h"
-#include "def.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "hashmap.h"
-#include "hostname-util.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "set.h"
-#include "signal-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
-#include "umask-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/build.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
/* Put this test here for a lack of better place */
assert_cc(EAGAIN == EWOULDBLOCK);
diff --git a/src/basic/verbs.c b/src/libsystemd-basic/src/verbs.c
index d9cdb38d65..fcc6c35987 100644
--- a/src/basic/verbs.c
+++ b/src/libsystemd-basic/src/verbs.c
@@ -22,11 +22,11 @@
#include <stdbool.h>
#include <stddef.h>
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "verbs.h"
-#include "virt.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/verbs.h"
+#include "systemd-basic/virt.h"
int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
const Verb *verb;
diff --git a/src/basic/virt.c b/src/libsystemd-basic/src/virt.c
index d8d57381ad..4ba244b7b0 100644
--- a/src/basic/virt.c
+++ b/src/libsystemd-basic/src/virt.c
@@ -23,17 +23,17 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "macro.h"
-#include "process-util.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "virt.h"
-#include "env-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/virt.h"
static int detect_vm_cpuid(void) {
diff --git a/src/basic/web-util.c b/src/libsystemd-basic/src/web-util.c
index 595688ed93..7f71b1e6fd 100644
--- a/src/basic/web-util.c
+++ b/src/libsystemd-basic/src/web-util.c
@@ -19,9 +19,9 @@
#include <stdbool.h>
-#include "string-util.h"
-#include "utf8.h"
-#include "web-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/web-util.h"
bool http_etag_is_valid(const char *etag) {
if (isempty(etag))
diff --git a/src/basic/xattr-util.c b/src/libsystemd-basic/src/xattr-util.c
index 8256899eda..df06effbc2 100644
--- a/src/basic/xattr-util.c
+++ b/src/libsystemd-basic/src/xattr-util.c
@@ -25,13 +25,13 @@
#include <sys/time.h>
#include <sys/xattr.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "sparse-endian.h"
-#include "stdio-util.h"
-#include "time-util.h"
-#include "xattr-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/xattr-util.h"
int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink) {
char *v;
diff --git a/src/basic/xml.c b/src/libsystemd-basic/src/xml.c
index 1dbeac7324..ced4c1f44a 100644
--- a/src/basic/xml.c
+++ b/src/libsystemd-basic/src/xml.c
@@ -21,9 +21,9 @@
#include <stddef.h>
#include <string.h>
-#include "macro.h"
-#include "string-util.h"
-#include "xml.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/xml.h"
enum {
STATE_NULL,
diff --git a/src/basic/blkid-util.h b/src/libsystemd-blkid/include/systemd-blkid/blkid-util.h
index 7aa75eb091..f476c313b0 100644
--- a/src/basic/blkid-util.h
+++ b/src/libsystemd-blkid/include/systemd-blkid/blkid-util.h
@@ -23,7 +23,7 @@
#include <blkid/blkid.h>
#endif
-#include "util.h"
+#include "systemd-basic/util.h"
#ifdef HAVE_BLKID
DEFINE_TRIVIAL_CLEANUP_FUNC(blkid_probe, blkid_free_probe);
diff --git a/src/libsystemd-firewall/GNUmakefile b/src/libsystemd-firewall/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/libsystemd-firewall/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-firewall/Makefile b/src/libsystemd-firewall/Makefile
new file mode 100644
index 0000000000..369b265ff7
--- /dev/null
+++ b/src/libsystemd-firewall/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/shared/firewall-util.h b/src/libsystemd-firewall/include/systemd-firewall/firewall-util.h
index c39b34cf8f..9121718bff 100644
--- a/src/shared/firewall-util.h
+++ b/src/libsystemd-firewall/include/systemd-firewall/firewall-util.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <stdint.h>
-#include "in-addr-util.h"
+#include "systemd-basic/in-addr-util.h"
#ifdef HAVE_LIBIPTC
diff --git a/src/libsystemd-firewall/src/GNUmakefile b/src/libsystemd-firewall/src/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libsystemd-firewall/src/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-firewall/src/Makefile b/src/libsystemd-firewall/src/Makefile
new file mode 100644
index 0000000000..b52d1fdad0
--- /dev/null
+++ b/src/libsystemd-firewall/src/Makefile
@@ -0,0 +1,41 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_LIBIPTC),)
+noinst_LTLIBRARIES += \
+ libsystemd-firewall.la
+
+libsystemd_firewall_la_SOURCES = \
+ src/shared/firewall-util.h \
+ src/shared/firewall-util.c
+
+libsystemd_firewall_la_CFLAGS = \
+ $(LIBIPTC_CFLAGS)
+
+libsystemd_firewall_la_LIBADD = \
+ $(LIBIPTC_LIBS)
+endif # HAVE_LIBIPTC
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/shared/firewall-util.c b/src/libsystemd-firewall/src/firewall-util.c
index f73108eaa3..5102695c4b 100644
--- a/src/shared/firewall-util.c
+++ b/src/libsystemd-firewall/src/firewall-util.c
@@ -25,24 +25,25 @@
#include <arpa/inet.h>
#include <endian.h>
#include <errno.h>
+#include <net/if.h>
#include <stddef.h>
#include <string.h>
#include <sys/socket.h>
-#include <net/if.h>
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
#endif
+#include <libiptc/libiptc.h>
+
#include <linux/if.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter/nf_nat.h>
#include <linux/netfilter/xt_addrtype.h>
-#include <libiptc/libiptc.h>
-#include "alloc-util.h"
-#include "firewall-util.h"
-#include "in-addr-util.h"
-#include "macro.h"
-#include "socket-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-firewall/firewall-util.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(struct xtc_handle*, iptc_free);
diff --git a/src/libsystemd-gcrypt/GNUmakefile b/src/libsystemd-gcrypt/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/libsystemd-gcrypt/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-gcrypt/Makefile b/src/libsystemd-gcrypt/Makefile
new file mode 100644
index 0000000000..369b265ff7
--- /dev/null
+++ b/src/libsystemd-gcrypt/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/shared/gcrypt-util.h b/src/libsystemd-gcrypt/include/systemd-gcrypt/gcrypt-util.h
index 1da12a32be..1da12a32be 100644
--- a/src/shared/gcrypt-util.h
+++ b/src/libsystemd-gcrypt/include/systemd-gcrypt/gcrypt-util.h
diff --git a/src/libsystemd-gcrypt/src/GNUmakefile b/src/libsystemd-gcrypt/src/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libsystemd-gcrypt/src/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-gcrypt/src/Makefile b/src/libsystemd-gcrypt/src/Makefile
new file mode 100644
index 0000000000..8166d5a253
--- /dev/null
+++ b/src/libsystemd-gcrypt/src/Makefile
@@ -0,0 +1,26 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/shared/gcrypt-util.c b/src/libsystemd-gcrypt/src/gcrypt-util.c
index 39b544b6f0..42b922571f 100644
--- a/src/shared/gcrypt-util.c
+++ b/src/libsystemd-gcrypt/src/gcrypt-util.c
@@ -22,8 +22,8 @@
#ifdef HAVE_GCRYPT
#include <gcrypt.h>
-#include "gcrypt-util.h"
-#include "hexdecoct.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-gcrypt/gcrypt-util.h"
void initialize_libgcrypt(bool secmem) {
const char *p;
diff --git a/src/libsystemd-network/GNUmakefile b/src/libsystemd-network/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/libsystemd-network/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-network/Makefile b/src/libsystemd-network/Makefile
index d0b0e8e008..8ba25db413 120000..100644
--- a/src/libsystemd-network/Makefile
+++ b/src/libsystemd-network/Makefile
@@ -1 +1,29 @@
-../Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+nested.subdirs += test
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd-network/include/systemd-network/_sd-common.h b/src/libsystemd-network/include/systemd-network/_sd-common.h
new file mode 120000
index 0000000000..653327c267
--- /dev/null
+++ b/src/libsystemd-network/include/systemd-network/_sd-common.h
@@ -0,0 +1 @@
+../../../libsystemd/include/systemd/_sd-common.h \ No newline at end of file
diff --git a/src/libsystemd-network/arp-util.h b/src/libsystemd-network/include/systemd-network/arp-util.h
index 3ef56b002a..790085a05b 100644
--- a/src/libsystemd-network/arp-util.h
+++ b/src/libsystemd-network/include/systemd-network/arp-util.h
@@ -21,8 +21,8 @@
#include <netinet/if_ether.h>
-#include "socket-util.h"
-#include "sparse-endian.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/sparse-endian.h"
int arp_network_bind_raw_socket(int index, be32_t address, const struct ether_addr *eth_mac);
diff --git a/src/libsystemd-network/dhcp-identifier.h b/src/libsystemd-network/include/systemd-network/dhcp-identifier.h
index 1cc0f9fb71..187780e7b0 100644
--- a/src/libsystemd-network/dhcp-identifier.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-identifier.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
-#include "macro.h"
-#include "sparse-endian.h"
-#include "unaligned.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/unaligned.h"
typedef enum DUIDType {
DUID_TYPE_LLT = 1,
diff --git a/src/libsystemd-network/dhcp-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-internal.h
index 99f690897d..f2f44918cb 100644
--- a/src/libsystemd-network/dhcp-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-internal.h
@@ -20,15 +20,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/if_packet.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <stdint.h>
-#include "sd-dhcp-client.h"
+#include <linux/if_packet.h>
+
+#include "systemd-basic/socket-util.h"
#include "dhcp-protocol.h"
-#include "socket-util.h"
+#include "sd-dhcp-client.h"
int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
uint32_t xid, const uint8_t *mac_addr,
diff --git a/src/libsystemd-network/dhcp-lease-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h
index 82cae2300a..92dd668876 100644
--- a/src/libsystemd-network/dhcp-lease-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h
@@ -21,13 +21,14 @@
***/
#include <stdint.h>
+
#include <linux/if_packet.h>
-#include "sd-dhcp-client.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/util.h"
#include "dhcp-protocol.h"
-#include "list.h"
-#include "util.h"
+#include "sd-dhcp-client.h"
struct sd_dhcp_route {
struct in_addr dst_addr;
diff --git a/src/libsystemd-network/dhcp-protocol.h b/src/libsystemd-network/include/systemd-network/dhcp-protocol.h
index 5cf7abbff9..7b083afa8b 100644
--- a/src/libsystemd-network/dhcp-protocol.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-protocol.h
@@ -23,8 +23,8 @@
#include <netinet/udp.h>
#include <stdint.h>
-#include "macro.h"
-#include "sparse-endian.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
struct DHCPMessage {
uint8_t op;
diff --git a/src/libsystemd-network/dhcp-server-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h
index 0c76956fad..bdbe63c450 100644
--- a/src/libsystemd-network/dhcp-server-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h
@@ -20,13 +20,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-dhcp-server.h"
-#include "sd-event.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
#include "dhcp-internal.h"
-#include "hashmap.h"
-#include "log.h"
-#include "util.h"
+#include "sd-dhcp-server.h"
typedef struct DHCPClientId {
size_t length;
diff --git a/src/libsystemd-network/dhcp6-internal.h b/src/libsystemd-network/include/systemd-network/dhcp6-internal.h
index 945c3b9721..6d3178e2d6 100644
--- a/src/libsystemd-network/dhcp6-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp6-internal.h
@@ -22,11 +22,11 @@
#include <net/ethernet.h>
#include <netinet/in.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "list.h"
-#include "macro.h"
-#include "sparse-endian.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
typedef struct DHCP6Address DHCP6Address;
diff --git a/src/libsystemd-network/dhcp6-lease-internal.h b/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h
index 14e708ef63..9da270e9a9 100644
--- a/src/libsystemd-network/dhcp6-lease-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h
@@ -22,9 +22,8 @@
#include <stdint.h>
-#include "sd-dhcp6-lease.h"
-
#include "dhcp6-internal.h"
+#include "sd-dhcp6-lease.h"
struct sd_dhcp6_lease {
unsigned n_ref;
diff --git a/src/libsystemd-network/dhcp6-protocol.h b/src/libsystemd-network/include/systemd-network/dhcp6-protocol.h
index 2487c470ab..7449b2b20d 100644
--- a/src/libsystemd-network/dhcp6-protocol.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp6-protocol.h
@@ -22,8 +22,8 @@
#include <netinet/ip6.h>
#include <netinet/udp.h>
-#include "macro.h"
-#include "sparse-endian.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
struct DHCP6Message {
union {
diff --git a/src/libsystemd-network/icmp6-util.h b/src/libsystemd-network/include/systemd-network/icmp6-util.h
index 2b4dbc76ce..2b4dbc76ce 100644
--- a/src/libsystemd-network/icmp6-util.h
+++ b/src/libsystemd-network/include/systemd-network/icmp6-util.h
diff --git a/src/libsystemd-network/lldp-internal.h b/src/libsystemd-network/include/systemd-network/lldp-internal.h
index becc162fab..e28b9702a0 100644
--- a/src/libsystemd-network/lldp-internal.h
+++ b/src/libsystemd-network/include/systemd-network/lldp-internal.h
@@ -20,12 +20,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
-#include "sd-lldp.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/prioq.h"
-#include "hashmap.h"
-#include "log.h"
-#include "prioq.h"
+#include "sd-lldp.h"
struct sd_lldp {
unsigned n_ref;
diff --git a/src/libsystemd-network/lldp-neighbor.h b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h
index c1a7606d06..392a0a268b 100644
--- a/src/libsystemd-network/lldp-neighbor.h
+++ b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h
@@ -23,11 +23,11 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "sd-lldp.h"
+#include "systemd-basic/hash-funcs.h"
+#include "systemd-basic/time-util.h"
-#include "hash-funcs.h"
#include "lldp-internal.h"
-#include "time-util.h"
+#include "sd-lldp.h"
typedef struct LLDPNeighborID {
/* The spec calls this an "MSAP identifier" */
diff --git a/src/libsystemd-network/lldp-network.h b/src/libsystemd-network/include/systemd-network/lldp-network.h
index c4cf8c79f1..43ed54b3b2 100644
--- a/src/libsystemd-network/lldp-network.h
+++ b/src/libsystemd-network/include/systemd-network/lldp-network.h
@@ -20,6 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
int lldp_network_bind_raw_socket(int ifindex);
diff --git a/src/libsystemd-network/ndisc-internal.h b/src/libsystemd-network/include/systemd-network/ndisc-internal.h
index 60e183ff8c..0f7f69a33d 100644
--- a/src/libsystemd-network/ndisc-internal.h
+++ b/src/libsystemd-network/include/systemd-network/ndisc-internal.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "log.h"
+#include "systemd-basic/log.h"
#include "sd-ndisc.h"
diff --git a/src/libsystemd-network/ndisc-router.h b/src/libsystemd-network/include/systemd-network/ndisc-router.h
index 1fe703da63..2f1df49198 100644
--- a/src/libsystemd-network/ndisc-router.h
+++ b/src/libsystemd-network/include/systemd-network/ndisc-router.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-ndisc.h"
+#include "systemd-basic/time-util.h"
-#include "time-util.h"
+#include "sd-ndisc.h"
struct sd_ndisc_router {
unsigned n_ref;
diff --git a/src/libsystemd-network/network-internal.h b/src/libsystemd-network/include/systemd-network/network-internal.h
index 5bcd577167..3d0554f12c 100644
--- a/src/libsystemd-network/network-internal.h
+++ b/src/libsystemd-network/include/systemd-network/network-internal.h
@@ -21,11 +21,11 @@
#include <stdbool.h>
-#include "sd-dhcp-lease.h"
-
-#include "condition.h"
+#include "systemd-shared/condition.h"
#include "udev.h"
+#include "sd-dhcp-lease.h"
+
bool net_match_config(const struct ether_addr *match_mac,
char * const *match_path,
char * const *match_driver,
diff --git a/src/systemd/sd-dhcp-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
index 9a90c2ed42..ce1145a575 100644
--- a/src/systemd/sd-dhcp-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
@@ -25,10 +25,10 @@
#include <netinet/in.h>
#include <sys/types.h>
-#include "sd-dhcp-lease.h"
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "_sd-common.h"
+#include "sd-dhcp-lease.h"
_SD_BEGIN_DECLARATIONS;
@@ -83,7 +83,6 @@ enum {
};
typedef struct sd_dhcp_client sd_dhcp_client;
-
typedef void (*sd_dhcp_client_callback_t)(sd_dhcp_client *client, int event, void *userdata);
int sd_dhcp_client_set_callback(
sd_dhcp_client *client,
diff --git a/src/systemd/sd-dhcp-lease.h b/src/libsystemd-network/include/systemd-network/sd-dhcp-lease.h
index 2f565ca825..2f565ca825 100644
--- a/src/systemd/sd-dhcp-lease.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-lease.h
diff --git a/src/systemd/sd-dhcp-server.h b/src/libsystemd-network/include/systemd-network/sd-dhcp-server.h
index d4517a26d6..bbb2bb203c 100644
--- a/src/systemd/sd-dhcp-server.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-server.h
@@ -24,7 +24,7 @@
#include <inttypes.h>
#include <netinet/in.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "_sd-common.h"
diff --git a/src/systemd/sd-dhcp6-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
index 7819f0d2de..cfd5f35135 100644
--- a/src/systemd/sd-dhcp6-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
@@ -24,10 +24,10 @@
#include <net/ethernet.h>
#include <sys/types.h>
-#include "sd-dhcp6-lease.h"
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "_sd-common.h"
+#include "sd-dhcp6-lease.h"
_SD_BEGIN_DECLARATIONS;
@@ -75,7 +75,6 @@ enum {
};
typedef struct sd_dhcp6_client sd_dhcp6_client;
-
typedef void (*sd_dhcp6_client_callback_t)(sd_dhcp6_client *client, int event, void *userdata);
int sd_dhcp6_client_set_callback(
sd_dhcp6_client *client,
diff --git a/src/systemd/sd-dhcp6-lease.h b/src/libsystemd-network/include/systemd-network/sd-dhcp6-lease.h
index 184fbb8e0d..184fbb8e0d 100644
--- a/src/systemd/sd-dhcp6-lease.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp6-lease.h
diff --git a/src/systemd/sd-ipv4acd.h b/src/libsystemd-network/include/systemd-network/sd-ipv4acd.h
index 16d99983a8..e5ccb4b971 100644
--- a/src/systemd/sd-ipv4acd.h
+++ b/src/libsystemd-network/include/systemd-network/sd-ipv4acd.h
@@ -24,7 +24,7 @@
#include <net/ethernet.h>
#include <netinet/in.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "_sd-common.h"
diff --git a/src/systemd/sd-ipv4ll.h b/src/libsystemd-network/include/systemd-network/sd-ipv4ll.h
index 1109ec52e0..cff1865d05 100644
--- a/src/systemd/sd-ipv4ll.h
+++ b/src/libsystemd-network/include/systemd-network/sd-ipv4ll.h
@@ -23,7 +23,7 @@
#include <net/ethernet.h>
#include <netinet/in.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "_sd-common.h"
diff --git a/src/systemd/sd-lldp.h b/src/libsystemd-network/include/systemd-network/sd-lldp.h
index 3f35eebea3..928f77f0ab 100644
--- a/src/systemd/sd-lldp.h
+++ b/src/libsystemd-network/include/systemd-network/sd-lldp.h
@@ -25,7 +25,7 @@
#include <net/ethernet.h>
#include <sys/types.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "_sd-common.h"
diff --git a/src/systemd/sd-ndisc.h b/src/libsystemd-network/include/systemd-network/sd-ndisc.h
index 9f7d4ef71a..de2329458a 100644
--- a/src/systemd/sd-ndisc.h
+++ b/src/libsystemd-network/include/systemd-network/sd-ndisc.h
@@ -25,7 +25,7 @@
#include <netinet/in.h>
#include <sys/types.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
#include "_sd-common.h"
diff --git a/src/libsystemd-network/src/GNUmakefile b/src/libsystemd-network/src/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libsystemd-network/src/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-network/src/Makefile b/src/libsystemd-network/src/Makefile
new file mode 100644
index 0000000000..c636e3cab1
--- /dev/null
+++ b/src/libsystemd-network/src/Makefile
@@ -0,0 +1,83 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+noinst_LTLIBRARIES += \
+ libsystemd-network.la
+
+libsystemd_network_la_CFLAGS = \
+ $(KMOD_CFLAGS)
+
+libsystemd_network_la_SOURCES = \
+ src/systemd/sd-dhcp-client.h \
+ src/systemd/sd-dhcp-server.h \
+ src/systemd/sd-dhcp-lease.h \
+ src/systemd/sd-ipv4ll.h \
+ src/systemd/sd-ipv4acd.h \
+ src/systemd/sd-ndisc.h \
+ src/systemd/sd-dhcp6-client.h \
+ src/systemd/sd-dhcp6-lease.h \
+ src/systemd/sd-lldp.h \
+ src/libsystemd-network/sd-dhcp-client.c \
+ src/libsystemd-network/sd-dhcp-server.c \
+ src/libsystemd-network/dhcp-network.c \
+ src/libsystemd-network/dhcp-option.c \
+ src/libsystemd-network/dhcp-packet.c \
+ src/libsystemd-network/dhcp-internal.h \
+ src/libsystemd-network/dhcp-server-internal.h \
+ src/libsystemd-network/dhcp-protocol.h \
+ src/libsystemd-network/dhcp-lease-internal.h \
+ src/libsystemd-network/sd-dhcp-lease.c \
+ src/libsystemd-network/sd-ipv4ll.c \
+ src/libsystemd-network/sd-ipv4acd.c \
+ src/libsystemd-network/arp-util.h \
+ src/libsystemd-network/arp-util.c \
+ src/libsystemd-network/network-internal.c \
+ src/libsystemd-network/network-internal.h \
+ src/libsystemd-network/sd-ndisc.c \
+ src/libsystemd-network/ndisc-internal.h \
+ src/libsystemd-network/ndisc-router.h \
+ src/libsystemd-network/ndisc-router.c \
+ src/libsystemd-network/icmp6-util.h \
+ src/libsystemd-network/icmp6-util.c \
+ src/libsystemd-network/sd-dhcp6-client.c \
+ src/libsystemd-network/dhcp6-internal.h \
+ src/libsystemd-network/dhcp6-protocol.h \
+ src/libsystemd-network/dhcp6-network.c \
+ src/libsystemd-network/dhcp6-option.c \
+ src/libsystemd-network/dhcp6-lease-internal.h \
+ src/libsystemd-network/sd-dhcp6-lease.c \
+ src/libsystemd-network/dhcp-identifier.h \
+ src/libsystemd-network/dhcp-identifier.c \
+ src/libsystemd-network/lldp-internal.h \
+ src/libsystemd-network/lldp-network.h \
+ src/libsystemd-network/lldp-network.c \
+ src/libsystemd-network/lldp-neighbor.h \
+ src/libsystemd-network/lldp-neighbor.c \
+ src/libsystemd-network/sd-lldp.c
+
+libsystemd_network_la_LIBADD = \
+ $(KMOD_LIBS)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd-network/arp-util.c b/src/libsystemd-network/src/arp-util.c
index 02028bf28a..2edb97be32 100644
--- a/src/libsystemd-network/arp-util.c
+++ b/src/libsystemd-network/src/arp-util.c
@@ -18,12 +18,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/filter.h>
#include <arpa/inet.h>
-#include "arp-util.h"
-#include "fd-util.h"
-#include "util.h"
+#include <linux/filter.h>
+
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/arp-util.h"
int arp_network_bind_raw_socket(int ifindex, be32_t address, const struct ether_addr *eth_mac) {
struct sock_filter filter[] = {
diff --git a/src/libsystemd-network/dhcp-identifier.c b/src/libsystemd-network/src/dhcp-identifier.c
index a21efc4d06..afe0b9a404 100644
--- a/src/libsystemd-network/dhcp-identifier.c
+++ b/src/libsystemd-network/src/dhcp-identifier.c
@@ -17,16 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "libudev.h"
-#include "sd-id128.h"
-
-#include "dhcp-identifier.h"
-#include "dhcp6-protocol.h"
-#include "network-internal.h"
-#include "siphash24.h"
-#include "sparse-endian.h"
-#include "udev-util.h"
-#include "virt.h"
+#include <libudev.h>
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/virt.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-shared/udev-util.h"
#define SYSTEMD_PEN 43793
#define HASH_KEY SD_ID128_MAKE(80,11,8c,c2,fe,4a,03,ee,3e,d6,0c,6f,36,39,14,09)
diff --git a/src/libsystemd-network/dhcp-network.c b/src/libsystemd-network/src/dhcp-network.c
index a9f5a0a5de..2cdadee730 100644
--- a/src/libsystemd-network/dhcp-network.c
+++ b/src/libsystemd-network/src/dhcp-network.c
@@ -23,13 +23,14 @@
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
+
#include <linux/filter.h>
#include <linux/if_infiniband.h>
#include <linux/if_packet.h>
-#include "dhcp-internal.h"
-#include "fd-util.h"
-#include "socket-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-network/dhcp-internal.h"
static int _bind_raw_socket(int ifindex, union sockaddr_union *link,
uint32_t xid, const uint8_t *mac_addr,
diff --git a/src/libsystemd-network/dhcp-option.c b/src/libsystemd-network/src/dhcp-option.c
index c105196334..a848ed2841 100644
--- a/src/libsystemd-network/dhcp-option.c
+++ b/src/libsystemd-network/src/dhcp-option.c
@@ -22,10 +22,9 @@
#include <stdio.h>
#include <string.h>
-#include "alloc-util.h"
-#include "utf8.h"
-
-#include "dhcp-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-network/dhcp-internal.h"
static int option_append(uint8_t options[], size_t size, size_t *offset,
uint8_t code, size_t optlen, const void *optval) {
diff --git a/src/libsystemd-network/dhcp-packet.c b/src/libsystemd-network/src/dhcp-packet.c
index 8be774061d..cdb54caedc 100644
--- a/src/libsystemd-network/dhcp-packet.c
+++ b/src/libsystemd-network/src/dhcp-packet.c
@@ -23,8 +23,8 @@
#include <net/if_arp.h>
#include <string.h>
-#include "dhcp-internal.h"
-#include "dhcp-protocol.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-protocol.h"
#define DHCP_CLIENT_MIN_OPTIONS_SIZE 312
diff --git a/src/libsystemd-network/dhcp6-network.c b/src/libsystemd-network/src/dhcp6-network.c
index fd2d60c9d5..469e3ddfdf 100644
--- a/src/libsystemd-network/dhcp6-network.c
+++ b/src/libsystemd-network/src/dhcp6-network.c
@@ -25,12 +25,13 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
+
#include <linux/if_packet.h>
-#include "dhcp6-internal.h"
-#include "dhcp6-protocol.h"
-#include "fd-util.h"
-#include "socket-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
int dhcp6_network_bind_udp_socket(int index, struct in6_addr *local_address) {
union sockaddr_union src = {
diff --git a/src/libsystemd-network/dhcp6-option.c b/src/libsystemd-network/src/dhcp6-option.c
index 5462e03476..ecbf201661 100644
--- a/src/libsystemd-network/dhcp6-option.c
+++ b/src/libsystemd-network/src/dhcp6-option.c
@@ -21,16 +21,15 @@
#include <netinet/in.h>
#include <string.h>
-#include "sd-dhcp6-client.h"
-
-#include "alloc-util.h"
-#include "dhcp6-internal.h"
-#include "dhcp6-protocol.h"
-#include "dns-domain.h"
-#include "sparse-endian.h"
-#include "strv.h"
-#include "unaligned.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unaligned.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/sd-dhcp6-client.h"
+#include "systemd-shared/dns-domain.h"
#define DHCP6_OPTION_IA_NA_LEN 12
#define DHCP6_OPTION_IA_TA_LEN 4
diff --git a/src/libsystemd-network/icmp6-util.c b/src/libsystemd-network/src/icmp6-util.c
index c2e4b0e9e3..4280d32e3d 100644
--- a/src/libsystemd-network/icmp6-util.c
+++ b/src/libsystemd-network/src/icmp6-util.c
@@ -18,6 +18,7 @@
***/
#include <errno.h>
+#include <net/if.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
@@ -26,12 +27,12 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
-#include <net/if.h>
+
#include <linux/if_packet.h>
-#include "fd-util.h"
-#include "icmp6-util.h"
-#include "socket-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-network/icmp6-util.h"
#define IN6ADDR_ALL_ROUTERS_MULTICAST_INIT \
{ { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
diff --git a/src/libsystemd-network/lldp-neighbor.c b/src/libsystemd-network/src/lldp-neighbor.c
index 53e29377b3..6509b1479d 100644
--- a/src/libsystemd-network/lldp-neighbor.c
+++ b/src/libsystemd-network/src/lldp-neighbor.c
@@ -17,14 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "escape.h"
-#include "ether-addr-util.h"
-#include "hexdecoct.h"
-#include "in-addr-util.h"
-#include "lldp-internal.h"
-#include "lldp-neighbor.h"
-#include "unaligned.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/unaligned.h"
+#include "systemd-network/lldp-internal.h"
+#include "systemd-network/lldp-neighbor.h"
static void lldp_neighbor_id_hash_func(const void *p, struct siphash *state) {
const LLDPNeighborID *id = p;
diff --git a/src/libsystemd-network/lldp-network.c b/src/libsystemd-network/src/lldp-network.c
index 59c25598e9..6c9ed81e69 100644
--- a/src/libsystemd-network/lldp-network.c
+++ b/src/libsystemd-network/src/lldp-network.c
@@ -18,12 +18,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/filter.h>
#include <netinet/if_ether.h>
-#include "fd-util.h"
-#include "lldp-network.h"
-#include "socket-util.h"
+#include <linux/filter.h>
+
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-network/lldp-network.h"
int lldp_network_bind_raw_socket(int ifindex) {
diff --git a/src/libsystemd-network/ndisc-router.c b/src/libsystemd-network/src/ndisc-router.c
index 41ff2b353a..a1051dadc5 100644
--- a/src/libsystemd-network/ndisc-router.c
+++ b/src/libsystemd-network/src/ndisc-router.c
@@ -19,15 +19,14 @@
#include <netinet/icmp6.h>
-#include "sd-ndisc.h"
-
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "hostname-util.h"
-#include "missing.h"
-#include "ndisc-internal.h"
-#include "ndisc-router.h"
-#include "strv.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/strv.h"
+#include "systemd-network/ndisc-internal.h"
+#include "systemd-network/ndisc-router.h"
+#include "systemd-network/sd-ndisc.h"
+#include "systemd-shared/dns-domain.h"
_public_ sd_ndisc_router* sd_ndisc_router_ref(sd_ndisc_router *rt) {
if (!rt)
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/src/network-internal.c
index 9d78b953fc..13b3bad81b 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/src/network-internal.c
@@ -18,26 +18,26 @@
***/
#include <arpa/inet.h>
-#include <linux/if.h>
#include <netinet/ether.h>
-#include "sd-ndisc.h"
-
-#include "alloc-util.h"
-#include "condition.h"
-#include "conf-parser.h"
-#include "dhcp-lease-internal.h"
-#include "ether-addr-util.h"
-#include "hexdecoct.h"
-#include "log.h"
-#include "network-internal.h"
-#include "parse-util.h"
-#include "siphash24.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "utf8.h"
-#include "util.h"
+#include <linux/if.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-network/sd-ndisc.h"
+#include "systemd-shared/condition.h"
+#include "systemd-shared/conf-parser.h"
const char *net_get_name(struct udev_device *device) {
const char *name, *field;
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/src/sd-dhcp-client.c
index 5ccb23922c..fa6393a2e2 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/src/sd-dhcp-client.c
@@ -24,21 +24,21 @@
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
+
#include <linux/if_infiniband.h>
-#include "sd-dhcp-client.h"
-
-#include "alloc-util.h"
-#include "async.h"
-#include "dhcp-identifier.h"
-#include "dhcp-internal.h"
-#include "dhcp-lease-internal.h"
-#include "dhcp-protocol.h"
-#include "dns-domain.h"
-#include "hostname-util.h"
-#include "random-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/dhcp-protocol.h"
+#include "systemd-network/sd-dhcp-client.h"
+#include "systemd-shared/dns-domain.h"
#define MAX_CLIENT_ID_LEN (sizeof(uint32_t) + MAX_DUID_LEN) /* Arbitrary limit */
#define MAX_MAC_ADDR_LEN CONST_MAX(INFINIBAND_ALEN, ETH_ALEN)
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/src/sd-dhcp-lease.c
index 8387b185c0..26f8a61cab 100644
--- a/src/libsystemd-network/sd-dhcp-lease.c
+++ b/src/libsystemd-network/src/sd-dhcp-lease.c
@@ -24,22 +24,21 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-dhcp-lease.h"
-
-#include "alloc-util.h"
-#include "dhcp-lease-internal.h"
-#include "dhcp-protocol.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hexdecoct.h"
-#include "hostname-util.h"
-#include "in-addr-util.h"
-#include "network-internal.h"
-#include "parse-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "unaligned.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unaligned.h"
+#include "systemd-network/dhcp-lease-internal.h"
+#include "systemd-network/dhcp-protocol.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-network/sd-dhcp-lease.h"
+#include "systemd-shared/dns-domain.h"
int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr) {
assert_return(lease, -EINVAL);
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/src/sd-dhcp-server.c
index f16314a37f..b92093ab05 100644
--- a/src/libsystemd-network/sd-dhcp-server.c
+++ b/src/libsystemd-network/src/sd-dhcp-server.c
@@ -20,16 +20,15 @@
#include <sys/ioctl.h>
-#include "sd-dhcp-server.h"
-
-#include "alloc-util.h"
-#include "dhcp-internal.h"
-#include "dhcp-server-internal.h"
-#include "fd-util.h"
-#include "in-addr-util.h"
-#include "siphash24.h"
-#include "string-util.h"
-#include "unaligned.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unaligned.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-server-internal.h"
+#include "systemd-network/sd-dhcp-server.h"
#define DHCP_DEFAULT_LEASE_TIME_USEC USEC_PER_HOUR
#define DHCP_MAX_LEASE_TIME_USEC (USEC_PER_HOUR*12)
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/src/sd-dhcp6-client.c
index e81215f7d7..d2c83e4043 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/src/sd-dhcp6-client.c
@@ -20,22 +20,22 @@
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
+
#include <linux/if_infiniband.h>
-#include "sd-dhcp6-client.h"
-
-#include "alloc-util.h"
-#include "dhcp-identifier.h"
-#include "dhcp6-internal.h"
-#include "dhcp6-lease-internal.h"
-#include "dhcp6-protocol.h"
-#include "fd-util.h"
-#include "in-addr-util.h"
-#include "network-internal.h"
-#include "random-util.h"
-#include "socket-util.h"
-#include "string-table.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-lease-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/network-internal.h"
+#include "systemd-network/sd-dhcp6-client.h"
#define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
diff --git a/src/libsystemd-network/sd-dhcp6-lease.c b/src/libsystemd-network/src/sd-dhcp6-lease.c
index ab59977a3f..bd1d4026f5 100644
--- a/src/libsystemd-network/sd-dhcp6-lease.c
+++ b/src/libsystemd-network/src/sd-dhcp6-lease.c
@@ -20,11 +20,11 @@
#include <errno.h>
-#include "alloc-util.h"
-#include "dhcp6-lease-internal.h"
-#include "dhcp6-protocol.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/dhcp6-lease-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
int dhcp6_lease_clear_timers(DHCP6IA *ia) {
assert_return(ia, -EINVAL);
diff --git a/src/libsystemd-network/sd-ipv4acd.c b/src/libsystemd-network/src/sd-ipv4acd.c
index 4dd343c101..90ffc8ccea 100644
--- a/src/libsystemd-network/sd-ipv4acd.c
+++ b/src/libsystemd-network/src/sd-ipv4acd.c
@@ -24,18 +24,17 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-ipv4acd.h"
-
-#include "alloc-util.h"
-#include "arp-util.h"
-#include "ether-addr-util.h"
-#include "fd-util.h"
-#include "in-addr-util.h"
-#include "list.h"
-#include "random-util.h"
-#include "siphash24.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/arp-util.h"
+#include "systemd-network/sd-ipv4acd.h"
/* Constants from the RFC */
#define PROBE_WAIT_USEC (1U * USEC_PER_SEC)
diff --git a/src/libsystemd-network/sd-ipv4ll.c b/src/libsystemd-network/src/sd-ipv4ll.c
index 13209261f9..35d3a972b2 100644
--- a/src/libsystemd-network/sd-ipv4ll.c
+++ b/src/libsystemd-network/src/sd-ipv4ll.c
@@ -24,18 +24,17 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-ipv4acd.h"
-#include "sd-ipv4ll.h"
-
-#include "alloc-util.h"
-#include "ether-addr-util.h"
-#include "in-addr-util.h"
-#include "list.h"
-#include "random-util.h"
-#include "siphash24.h"
-#include "sparse-endian.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/sd-ipv4acd.h"
+#include "systemd-network/sd-ipv4ll.h"
#define IPV4LL_NETWORK UINT32_C(0xA9FE0000)
#define IPV4LL_NETMASK UINT32_C(0xFFFF0000)
diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/src/sd-lldp.c
index 0702241506..b271c88786 100644
--- a/src/libsystemd-network/sd-lldp.c
+++ b/src/libsystemd-network/src/sd-lldp.c
@@ -20,15 +20,14 @@
#include <arpa/inet.h>
-#include "sd-lldp.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "lldp-internal.h"
-#include "lldp-neighbor.h"
-#include "lldp-network.h"
-#include "socket-util.h"
-#include "ether-addr-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-network/lldp-internal.h"
+#include "systemd-network/lldp-neighbor.h"
+#include "systemd-network/lldp-network.h"
+#include "systemd-network/sd-lldp.h"
#define LLDP_DEFAULT_NEIGHBORS_MAX 128U
diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/src/sd-ndisc.c
index 1d3be9b862..7f3bcbd7e2 100644
--- a/src/libsystemd-network/sd-ndisc.c
+++ b/src/libsystemd-network/src/sd-ndisc.c
@@ -20,17 +20,16 @@
#include <netinet/icmp6.h>
#include <netinet/in.h>
-#include "sd-ndisc.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "icmp6-util.h"
-#include "in-addr-util.h"
-#include "ndisc-internal.h"
-#include "ndisc-router.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/icmp6-util.h"
+#include "systemd-network/ndisc-internal.h"
+#include "systemd-network/ndisc-router.h"
+#include "systemd-network/sd-ndisc.h"
#define NDISC_ROUTER_SOLICITATION_INTERVAL (4U * USEC_PER_SEC)
#define NDISC_MAX_ROUTER_SOLICITATIONS 3U
diff --git a/src/libsystemd-network/test/GNUmakefile b/src/libsystemd-network/test/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libsystemd-network/test/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-network/test/Makefile b/src/libsystemd-network/test/Makefile
new file mode 100644
index 0000000000..8cc38bb547
--- /dev/null
+++ b/src/libsystemd-network/test/Makefile
@@ -0,0 +1,118 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+test_dhcp_option_SOURCES = \
+ src/libsystemd-network/dhcp-protocol.h \
+ src/libsystemd-network/dhcp-internal.h \
+ src/libsystemd-network/test-dhcp-option.c
+
+test_dhcp_option_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+test_dhcp_client_SOURCES = \
+ src/systemd/sd-dhcp-client.h \
+ src/libsystemd-network/dhcp-protocol.h \
+ src/libsystemd-network/dhcp-internal.h \
+ src/libsystemd-network/test-dhcp-client.c
+
+test_dhcp_client_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+test_dhcp_server_SOURCES = \
+ src/libsystemd-network/test-dhcp-server.c
+
+test_dhcp_server_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+test_ipv4ll_SOURCES = \
+ src/systemd/sd-ipv4ll.h \
+ src/libsystemd-network/arp-util.h \
+ src/libsystemd-network/test-ipv4ll.c
+
+test_ipv4ll_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+test_ipv4ll_manual_SOURCES = \
+ src/systemd/sd-ipv4ll.h \
+ src/libsystemd-network/test-ipv4ll-manual.c
+
+test_ipv4ll_manual_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+test_acd_SOURCES = \
+ src/systemd/sd-ipv4acd.h \
+ src/libsystemd-network/test-acd.c
+
+test_acd_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+test_ndisc_rs_SOURCES = \
+ src/systemd/sd-dhcp6-client.h \
+ src/systemd/sd-ndisc.h \
+ src/libsystemd-network/icmp6-util.h \
+ src/libsystemd-network/test-ndisc-rs.c \
+ src/libsystemd-network/dhcp-identifier.h \
+ src/libsystemd-network/dhcp-identifier.c
+
+test_ndisc_rs_LDADD = \
+ libsystemd-network.la \
+ libudev.la \
+ libsystemd-shared.la
+
+test_dhcp6_client_SOURCES = \
+ src/systemd/sd-dhcp6-client.h \
+ src/libsystemd-network/dhcp6-internal.h \
+ src/libsystemd-network/test-dhcp6-client.c \
+ src/libsystemd-network/dhcp-identifier.h \
+ src/libsystemd-network/dhcp-identifier.c
+
+test_dhcp6_client_LDADD = \
+ libsystemd-network.la \
+ libudev.la \
+ libsystemd-shared.la
+
+test_lldp_SOURCES = \
+ src/libsystemd-network/test-lldp.c
+
+test_lldp_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+tests += \
+ test-dhcp-option \
+ test-dhcp-client \
+ test-dhcp-server \
+ test-ipv4ll \
+ test-ndisc-rs \
+ test-dhcp6-client \
+ test-lldp
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd-network/test-acd.c b/src/libsystemd-network/test/test-acd.c
index 27fcc332a3..26480a2012 100644
--- a/src/libsystemd-network/test-acd.c
+++ b/src/libsystemd-network/test/test-acd.c
@@ -18,19 +18,19 @@
***/
#include <errno.h>
+#include <net/if.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/veth.h>
-#include <net/if.h>
-#include "sd-event.h"
-#include "sd-ipv4acd.h"
-#include "sd-netlink.h"
+#include <systemd/sd-event.h>
-#include "in-addr-util.h"
-#include "netlink-util.h"
-#include "util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/sd-ipv4acd.h"
+#include "systemd-staging/sd-netlink.h"
static void acd_handler(sd_ipv4acd *acd, int event, void *userdata) {
assert_se(acd);
diff --git a/src/libsystemd-network/test-dhcp-client.c b/src/libsystemd-network/test/test-dhcp-client.c
index 2a101cb1fe..e58491293c 100644
--- a/src/libsystemd-network/test-dhcp-client.c
+++ b/src/libsystemd-network/test/test-dhcp-client.c
@@ -22,15 +22,15 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "sd-dhcp-client.h"
-#include "sd-event.h"
-
-#include "alloc-util.h"
-#include "dhcp-identifier.h"
-#include "dhcp-internal.h"
-#include "dhcp-protocol.h"
-#include "fd-util.h"
-#include "util.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/dhcp-identifier.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-protocol.h"
+#include "systemd-network/sd-dhcp-client.h"
static uint8_t mac_addr[] = {'A', 'B', 'C', '1', '2', '3'};
diff --git a/src/libsystemd-network/test-dhcp-option.c b/src/libsystemd-network/test/test-dhcp-option.c
index d84859c053..2dfbb557c0 100644
--- a/src/libsystemd-network/test-dhcp-option.c
+++ b/src/libsystemd-network/test/test-dhcp-option.c
@@ -3,11 +3,11 @@
#include <stdio.h>
#include <string.h>
-#include "alloc-util.h"
-#include "dhcp-internal.h"
-#include "dhcp-protocol.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/dhcp-internal.h"
+#include "systemd-network/dhcp-protocol.h"
struct option_desc {
uint8_t sname[64];
diff --git a/src/libsystemd-network/test-dhcp-server.c b/src/libsystemd-network/test/test-dhcp-server.c
index e81c508c7f..0796a98707 100644
--- a/src/libsystemd-network/test-dhcp-server.c
+++ b/src/libsystemd-network/test/test-dhcp-server.c
@@ -20,10 +20,10 @@
#include <errno.h>
-#include "sd-dhcp-server.h"
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "dhcp-server-internal.h"
+#include "systemd-network/dhcp-server-internal.h"
+#include "systemd-network/sd-dhcp-server.h"
static void test_pool(struct in_addr *address, unsigned size, int ret) {
_cleanup_(sd_dhcp_server_unrefp) sd_dhcp_server *server = NULL;
diff --git a/src/libsystemd-network/test-dhcp6-client.c b/src/libsystemd-network/test/test-dhcp6-client.c
index bd289fa802..84bb9f9013 100644
--- a/src/libsystemd-network/test-dhcp6-client.c
+++ b/src/libsystemd-network/test/test-dhcp6-client.c
@@ -24,16 +24,16 @@
#include <sys/types.h>
#include <unistd.h>
-#include "sd-dhcp6-client.h"
-#include "sd-event.h"
-
-#include "dhcp6-internal.h"
-#include "dhcp6-lease-internal.h"
-#include "dhcp6-protocol.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "socket-util.h"
-#include "virt.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-network/dhcp6-internal.h"
+#include "systemd-network/dhcp6-lease-internal.h"
+#include "systemd-network/dhcp6-protocol.h"
+#include "systemd-network/sd-dhcp6-client.h"
static struct ether_addr mac_addr = {
.ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'}
diff --git a/src/libsystemd-network/test-ipv4ll-manual.c b/src/libsystemd-network/test/test-ipv4ll-manual.c
index 2b1387fa91..f67a8fe16c 100644
--- a/src/libsystemd-network/test-ipv4ll-manual.c
+++ b/src/libsystemd-network/test/test-ipv4ll-manual.c
@@ -21,18 +21,19 @@
#include <net/if.h>
#include <stdlib.h>
#include <unistd.h>
+
#include <linux/veth.h>
-#include "sd-event.h"
-#include "sd-ipv4ll.h"
-#include "sd-netlink.h"
+#include <systemd/sd-event.h>
-#include "alloc-util.h"
-#include "in-addr-util.h"
-#include "netlink-util.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/sd-ipv4ll.h"
+#include "systemd-staging/sd-netlink.h"
static void ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
_cleanup_free_ char *address = NULL;
diff --git a/src/libsystemd-network/test-ipv4ll.c b/src/libsystemd-network/test/test-ipv4ll.c
index fe70697075..58912a1bf5 100644
--- a/src/libsystemd-network/test-ipv4ll.c
+++ b/src/libsystemd-network/test/test-ipv4ll.c
@@ -25,12 +25,11 @@
#include <sys/types.h>
#include <unistd.h>
-#include "sd-ipv4ll.h"
-
-#include "arp-util.h"
-#include "fd-util.h"
-#include "socket-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-network/arp-util.h"
+#include "systemd-network/sd-ipv4ll.h"
static bool verbose = false;
static bool extended = false;
diff --git a/src/libsystemd-network/test-lldp.c b/src/libsystemd-network/test/test-lldp.c
index 6bcd65de0a..27b6711916 100644
--- a/src/libsystemd-network/test-lldp.c
+++ b/src/libsystemd-network/test/test-lldp.c
@@ -24,14 +24,14 @@
#include <string.h>
#include <unistd.h>
-#include "sd-event.h"
-#include "sd-lldp.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "lldp-network.h"
-#include "macro.h"
-#include "string-util.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-network/lldp-network.h"
+#include "systemd-network/sd-lldp.h"
#define TEST_LLDP_PORT "em1"
#define TEST_LLDP_TYPE_SYSTEM_NAME "systemd-lldp"
diff --git a/src/libsystemd-network/test-ndisc-rs.c b/src/libsystemd-network/test/test-ndisc-rs.c
index d9669488be..eb2dad5ab8 100644
--- a/src/libsystemd-network/test-ndisc-rs.c
+++ b/src/libsystemd-network/test/test-ndisc-rs.c
@@ -17,16 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <netinet/icmp6.h>
#include <arpa/inet.h>
+#include <netinet/icmp6.h>
-#include "sd-ndisc.h"
-
-#include "alloc-util.h"
-#include "hexdecoct.h"
-#include "icmp6-util.h"
-#include "socket-util.h"
-#include "strv.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-network/icmp6-util.h"
+#include "systemd-network/sd-ndisc.h"
static struct ether_addr mac_addr = {
.ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'}
diff --git a/src/libsystemd-shared/GNUmakefile b/src/libsystemd-shared/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/libsystemd-shared/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-shared/Makefile b/src/libsystemd-shared/Makefile
new file mode 100644
index 0000000000..369b265ff7
--- /dev/null
+++ b/src/libsystemd-shared/Makefile
@@ -0,0 +1,28 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/shared/acl-util.h b/src/libsystemd-shared/include/systemd-shared/acl-util.h
index 396e9e067e..8310519aff 100644
--- a/src/shared/acl-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/acl-util.h
@@ -25,7 +25,7 @@
#include <stdbool.h>
#include <sys/acl.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry);
int calc_acl_mask_if_needed(acl_t *acl_p);
diff --git a/src/shared/acpi-fpdt.h b/src/libsystemd-shared/include/systemd-shared/acpi-fpdt.h
index fc28175d0a..365dd908bb 100644
--- a/src/shared/acpi-fpdt.h
+++ b/src/libsystemd-shared/include/systemd-shared/acpi-fpdt.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <time-util.h>
+#include "systemd-basic/time-util.h"
int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit);
diff --git a/src/shared/apparmor-util.h b/src/libsystemd-shared/include/systemd-shared/apparmor-util.h
index 524f740152..524f740152 100644
--- a/src/shared/apparmor-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/apparmor-util.h
diff --git a/src/shared/ask-password-api.h b/src/libsystemd-shared/include/systemd-shared/ask-password-api.h
index 9d7f65130c..cdc18c52ad 100644
--- a/src/shared/ask-password-api.h
+++ b/src/libsystemd-shared/include/systemd-shared/ask-password-api.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "time-util.h"
+#include "systemd-basic/time-util.h"
typedef enum AskPasswordFlags {
ASK_PASSWORD_ACCEPT_CACHED = 1,
diff --git a/src/shared/base-filesystem.h b/src/libsystemd-shared/include/systemd-shared/base-filesystem.h
index 49599f0a60..49599f0a60 100644
--- a/src/shared/base-filesystem.h
+++ b/src/libsystemd-shared/include/systemd-shared/base-filesystem.h
diff --git a/src/shared/boot-timestamps.h b/src/libsystemd-shared/include/systemd-shared/boot-timestamps.h
index 6f691026be..f67d4f25b1 100644
--- a/src/shared/boot-timestamps.h
+++ b/src/libsystemd-shared/include/systemd-shared/boot-timestamps.h
@@ -20,6 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <time-util.h>
+#include "systemd-basic/time-util.h"
int boot_timestamps(const dual_timestamp *n, dual_timestamp *firmware, dual_timestamp *loader);
diff --git a/src/shared/bus-unit-util.h b/src/libsystemd-shared/include/systemd-shared/bus-unit-util.h
index d102ea180e..af99c71c3f 100644
--- a/src/shared/bus-unit-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/bus-unit-util.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "output-mode.h"
#include "install.h"
+#include "output-mode.h"
typedef struct UnitInfo {
const char *machine;
diff --git a/src/shared/cgroup-show.h b/src/libsystemd-shared/include/systemd-shared/cgroup-show.h
index 5c1d6e6d98..5c1d6e6d98 100644
--- a/src/shared/cgroup-show.h
+++ b/src/libsystemd-shared/include/systemd-shared/cgroup-show.h
diff --git a/src/shared/clean-ipc.h b/src/libsystemd-shared/include/systemd-shared/clean-ipc.h
index 6ca57f44fd..6ca57f44fd 100644
--- a/src/shared/clean-ipc.h
+++ b/src/libsystemd-shared/include/systemd-shared/clean-ipc.h
diff --git a/src/shared/condition.h b/src/libsystemd-shared/include/systemd-shared/condition.h
index bdda04b770..a94705768c 100644
--- a/src/shared/condition.h
+++ b/src/libsystemd-shared/include/systemd-shared/condition.h
@@ -22,8 +22,8 @@
#include <stdbool.h>
#include <stdio.h>
-#include "list.h"
-#include "macro.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/macro.h"
typedef enum ConditionType {
CONDITION_ARCHITECTURE,
diff --git a/src/shared/conf-parser.h b/src/libsystemd-shared/include/systemd-shared/conf-parser.h
index 26ff3df16f..b5fd4c1787 100644
--- a/src/shared/conf-parser.h
+++ b/src/libsystemd-shared/include/systemd-shared/conf-parser.h
@@ -25,9 +25,9 @@
#include <stdio.h>
#include <syslog.h>
-#include "alloc-util.h"
-#include "log.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
/* An abstract parser for simple, line based, shallow configuration
* files consisting of variable assignments only. */
diff --git a/src/shared/dev-setup.h b/src/libsystemd-shared/include/systemd-shared/dev-setup.h
index 5766a62060..5766a62060 100644
--- a/src/shared/dev-setup.h
+++ b/src/libsystemd-shared/include/systemd-shared/dev-setup.h
diff --git a/src/shared/dns-domain.h b/src/libsystemd-shared/include/systemd-shared/dns-domain.h
index af780f0b8b..6a68cbbe9f 100644
--- a/src/shared/dns-domain.h
+++ b/src/libsystemd-shared/include/systemd-shared/dns-domain.h
@@ -24,8 +24,8 @@
#include <stddef.h>
#include <stdint.h>
-#include "hashmap.h"
-#include "in-addr-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/in-addr-util.h"
/* Length of a single label, with all escaping removed, excluding any trailing dot or NUL byte */
#define DNS_LABEL_MAX 63
diff --git a/src/shared/dropin.h b/src/libsystemd-shared/include/systemd-shared/dropin.h
index c1936f397b..4ce904460d 100644
--- a/src/shared/dropin.h
+++ b/src/libsystemd-shared/include/systemd-shared/dropin.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hashmap.h"
-#include "macro.h"
-#include "set.h"
-#include "unit-name.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/unit-name.h"
int drop_in_file(const char *dir, const char *unit, unsigned level,
const char *name, char **_p, char **_q);
diff --git a/src/shared/efivars.h b/src/libsystemd-shared/include/systemd-shared/efivars.h
index b61d14c4ec..2bf245607a 100644
--- a/src/shared/efivars.h
+++ b/src/libsystemd-shared/include/systemd-shared/efivars.h
@@ -23,9 +23,9 @@
#include <stddef.h>
#include <stdint.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
-#include "time-util.h"
+#include "systemd-basic/time-util.h"
#define EFI_VENDOR_LOADER SD_ID128_MAKE(4a,67,b0,82,0a,4c,41,cf,b6,c7,44,0b,29,bb,8c,4f)
#define EFI_VENDOR_GLOBAL SD_ID128_MAKE(8b,e4,df,61,93,ca,11,d2,aa,0d,00,e0,98,03,2b,8c)
diff --git a/src/shared/fdset.h b/src/libsystemd-shared/include/systemd-shared/fdset.h
index 16efe5bdf2..0b2a9926e3 100644
--- a/src/shared/fdset.h
+++ b/src/libsystemd-shared/include/systemd-shared/fdset.h
@@ -21,9 +21,9 @@
#include <stdbool.h>
-#include "hashmap.h"
-#include "macro.h"
-#include "set.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/set.h"
typedef struct FDSet FDSet;
diff --git a/src/shared/fstab-util.h b/src/libsystemd-shared/include/systemd-shared/fstab-util.h
index 679f6902f7..3e82d9bb4a 100644
--- a/src/shared/fstab-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/fstab-util.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <stddef.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
bool fstab_is_mount_point(const char *mount);
diff --git a/src/shared/generator.h b/src/libsystemd-shared/include/systemd-shared/generator.h
index a6017c1b76..a6017c1b76 100644
--- a/src/shared/generator.h
+++ b/src/libsystemd-shared/include/systemd-shared/generator.h
diff --git a/src/shared/gpt.h b/src/libsystemd-shared/include/systemd-shared/gpt.h
index 55b41bbcd8..07153b51f4 100644
--- a/src/shared/gpt.h
+++ b/src/libsystemd-shared/include/systemd-shared/gpt.h
@@ -21,7 +21,7 @@
#include <endian.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
/* We only support root disk discovery for x86, x86-64, Itanium and ARM for
* now, since EFI for anything else doesn't really exist, and we only
diff --git a/src/shared/ima-util.h b/src/libsystemd-shared/include/systemd-shared/ima-util.h
index 5be94761fd..5be94761fd 100644
--- a/src/shared/ima-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/ima-util.h
diff --git a/src/shared/import-util.h b/src/libsystemd-shared/include/systemd-shared/import-util.h
index 77b17d91f3..a5ceb52b8f 100644
--- a/src/shared/import-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/import-util.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef enum ImportVerify {
IMPORT_VERIFY_NO,
diff --git a/src/shared/initreq.h b/src/libsystemd-shared/include/systemd-shared/initreq.h
index 710037d84b..710037d84b 100644
--- a/src/shared/initreq.h
+++ b/src/libsystemd-shared/include/systemd-shared/initreq.h
diff --git a/src/shared/install-printf.h b/src/libsystemd-shared/include/systemd-shared/install-printf.h
index 8a570fc265..8a570fc265 100644
--- a/src/shared/install-printf.h
+++ b/src/libsystemd-shared/include/systemd-shared/install-printf.h
diff --git a/src/shared/install.h b/src/libsystemd-shared/include/systemd-shared/install.h
index 7a5859e729..1b94cd59f7 100644
--- a/src/shared/install.h
+++ b/src/libsystemd-shared/include/systemd-shared/install.h
@@ -19,23 +19,24 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef enum UnitFileScope UnitFileScope;
-typedef enum UnitFileState UnitFileState;
-typedef enum UnitFilePresetMode UnitFilePresetMode;
+#include <stdbool.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+
typedef enum UnitFileChangeType UnitFileChangeType;
typedef enum UnitFileFlags UnitFileFlags;
+typedef enum UnitFilePresetMode UnitFilePresetMode;
+typedef enum UnitFileScope UnitFileScope;
+typedef enum UnitFileState UnitFileState;
typedef enum UnitFileType UnitFileType;
typedef struct UnitFileChange UnitFileChange;
-typedef struct UnitFileList UnitFileList;
typedef struct UnitFileInstallInfo UnitFileInstallInfo;
+typedef struct UnitFileList UnitFileList;
-#include <stdbool.h>
-
-#include "hashmap.h"
-#include "macro.h"
#include "path-lookup.h"
-#include "strv.h"
-#include "unit-name.h"
enum UnitFileScope {
UNIT_FILE_SYSTEM,
diff --git a/src/shared/logs-show.h b/src/libsystemd-shared/include/systemd-shared/logs-show.h
index 6643440881..1596a5875a 100644
--- a/src/shared/logs-show.h
+++ b/src/libsystemd-shared/include/systemd-shared/logs-show.h
@@ -24,12 +24,13 @@
#include <stdio.h>
#include <sys/types.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
+
+#include "systemd-basic/macro.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
-#include "macro.h"
#include "output-mode.h"
-#include "time-util.h"
-#include "util.h"
int output_journal(
FILE *f,
diff --git a/src/shared/machine-image.h b/src/libsystemd-shared/include/systemd-shared/machine-image.h
index 7410168c4f..7c46fd6996 100644
--- a/src/shared/machine-image.h
+++ b/src/libsystemd-shared/include/systemd-shared/machine-image.h
@@ -22,12 +22,12 @@
#include <stdbool.h>
#include <stdint.h>
-#include "hashmap.h"
-#include "lockfile-util.h"
-#include "macro.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "time-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/lockfile-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/time-util.h"
typedef enum ImageType {
IMAGE_DIRECTORY,
diff --git a/src/shared/machine-pool.h b/src/libsystemd-shared/include/systemd-shared/machine-pool.h
index 40fe5ecb3a..fe99b7e0ae 100644
--- a/src/shared/machine-pool.h
+++ b/src/libsystemd-shared/include/systemd-shared/machine-pool.h
@@ -21,7 +21,7 @@
#include <stdint.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
/* Grow the /var/lib/machines directory after each 10MiB written */
#define GROW_INTERVAL_BYTES (UINT64_C(10) * UINT64_C(1024) * UINT64_C(1024))
diff --git a/src/shared/output-mode.h b/src/libsystemd-shared/include/systemd-shared/output-mode.h
index ff29dafcb5..c3e7942777 100644
--- a/src/shared/output-mode.h
+++ b/src/libsystemd-shared/include/systemd-shared/output-mode.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef enum OutputMode {
OUTPUT_SHORT,
diff --git a/src/shared/pager.h b/src/libsystemd-shared/include/systemd-shared/pager.h
index 893e1d2bb6..57bba54d92 100644
--- a/src/shared/pager.h
+++ b/src/libsystemd-shared/include/systemd-shared/pager.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
int pager_open(bool no_pager, bool jump_to_end);
void pager_close(void);
diff --git a/src/shared/path-lookup.h b/src/libsystemd-shared/include/systemd-shared/path-lookup.h
index f9bb2fe237..43179fd9af 100644
--- a/src/shared/path-lookup.h
+++ b/src/libsystemd-shared/include/systemd-shared/path-lookup.h
@@ -21,10 +21,11 @@
#include <stdbool.h>
+#include "systemd-basic/macro.h"
+
typedef struct LookupPaths LookupPaths;
#include "install.h"
-#include "macro.h"
typedef enum LookupPathsFlags {
LOOKUP_PATHS_EXCLUDE_GENERATED = 1,
diff --git a/src/shared/ptyfwd.h b/src/libsystemd-shared/include/systemd-shared/ptyfwd.h
index bd5d5fec0d..b57f421eb3 100644
--- a/src/shared/ptyfwd.h
+++ b/src/libsystemd-shared/include/systemd-shared/ptyfwd.h
@@ -21,9 +21,9 @@
#include <stdbool.h>
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef struct PTYForward PTYForward;
diff --git a/src/shared/resolve-util.h b/src/libsystemd-shared/include/systemd-shared/resolve-util.h
index 8636a6c134..2a6173d79a 100644
--- a/src/shared/resolve-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/resolve-util.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
typedef enum ResolveSupport ResolveSupport;
typedef enum DnssecMode DnssecMode;
diff --git a/src/shared/seccomp-util.h b/src/libsystemd-shared/include/systemd-shared/seccomp-util.h
index 8e209efef2..8e209efef2 100644
--- a/src/shared/seccomp-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/seccomp-util.h
diff --git a/src/shared/sleep-config.h b/src/libsystemd-shared/include/systemd-shared/sleep-config.h
index ad10039ff4..ad10039ff4 100644
--- a/src/shared/sleep-config.h
+++ b/src/libsystemd-shared/include/systemd-shared/sleep-config.h
diff --git a/src/shared/spawn-ask-password-agent.h b/src/libsystemd-shared/include/systemd-shared/spawn-ask-password-agent.h
index fb0749b13f..fb0749b13f 100644
--- a/src/shared/spawn-ask-password-agent.h
+++ b/src/libsystemd-shared/include/systemd-shared/spawn-ask-password-agent.h
diff --git a/src/shared/spawn-polkit-agent.h b/src/libsystemd-shared/include/systemd-shared/spawn-polkit-agent.h
index 42b2989ded..42b2989ded 100644
--- a/src/shared/spawn-polkit-agent.h
+++ b/src/libsystemd-shared/include/systemd-shared/spawn-polkit-agent.h
diff --git a/src/shared/specifier.h b/src/libsystemd-shared/include/systemd-shared/specifier.h
index 6b1623ee61..6b1623ee61 100644
--- a/src/shared/specifier.h
+++ b/src/libsystemd-shared/include/systemd-shared/specifier.h
diff --git a/src/shared/switch-root.h b/src/libsystemd-shared/include/systemd-shared/switch-root.h
index a7a080b3e8..a7a080b3e8 100644
--- a/src/shared/switch-root.h
+++ b/src/libsystemd-shared/include/systemd-shared/switch-root.h
diff --git a/src/shared/sysctl-util.h b/src/libsystemd-shared/include/systemd-shared/sysctl-util.h
index 2decb39f58..2decb39f58 100644
--- a/src/shared/sysctl-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/sysctl-util.h
diff --git a/src/shared/test-tables.h b/src/libsystemd-shared/include/systemd-shared/test-tables.h
index 228e510104..228e510104 100644
--- a/src/shared/test-tables.h
+++ b/src/libsystemd-shared/include/systemd-shared/test-tables.h
diff --git a/src/shared/tests.h b/src/libsystemd-shared/include/systemd-shared/tests.h
index 93f09013a1..93f09013a1 100644
--- a/src/shared/tests.h
+++ b/src/libsystemd-shared/include/systemd-shared/tests.h
diff --git a/src/shared/udev-util.h b/src/libsystemd-shared/include/systemd-shared/udev-util.h
index ca0889f8a6..a4cfbf5ba2 100644
--- a/src/shared/udev-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/udev-util.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/util.h"
#include "udev.h"
-#include "util.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref);
diff --git a/src/shared/uid-range.h b/src/libsystemd-shared/include/systemd-shared/uid-range.h
index 4044eb4c9c..4044eb4c9c 100644
--- a/src/shared/uid-range.h
+++ b/src/libsystemd-shared/include/systemd-shared/uid-range.h
diff --git a/src/shared/utmp-wtmp.h b/src/libsystemd-shared/include/systemd-shared/utmp-wtmp.h
index 438e270a26..abc9e5dd10 100644
--- a/src/shared/utmp-wtmp.h
+++ b/src/libsystemd-shared/include/systemd-shared/utmp-wtmp.h
@@ -22,8 +22,8 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "time-util.h"
-#include "util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
#ifdef HAVE_UTMP
int utmp_get_runlevel(int *runlevel, int *previous);
diff --git a/src/shared/vlan-util.h b/src/libsystemd-shared/include/systemd-shared/vlan-util.h
index ce6763b3a3..b7c2f03383 100644
--- a/src/shared/vlan-util.h
+++ b/src/libsystemd-shared/include/systemd-shared/vlan-util.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdbool.h>
#include <inttypes.h>
+#include <stdbool.h>
#define VLANID_MAX 4094
#define VLANID_INVALID UINT16_MAX
diff --git a/src/shared/watchdog.h b/src/libsystemd-shared/include/systemd-shared/watchdog.h
index f6ec178ea1..fd13cce283 100644
--- a/src/shared/watchdog.h
+++ b/src/libsystemd-shared/include/systemd-shared/watchdog.h
@@ -21,8 +21,8 @@
#include <stdbool.h>
-#include "time-util.h"
-#include "util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
int watchdog_set_timeout(usec_t *usec);
int watchdog_ping(void);
diff --git a/src/libsystemd-shared/src/GNUmakefile b/src/libsystemd-shared/src/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libsystemd-shared/src/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd-shared/src/Makefile b/src/libsystemd-shared/src/Makefile
new file mode 100644
index 0000000000..601daf855c
--- /dev/null
+++ b/src/libsystemd-shared/src/Makefile
@@ -0,0 +1,182 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+noinst_LTLIBRARIES += \
+ libsystemd-shared.la
+
+libsystemd_shared_la_SOURCES = \
+ src/shared/output-mode.h \
+ src/shared/output-mode.c \
+ src/shared/gpt.h \
+ src/shared/udev-util.h \
+ src/shared/linux/auto_dev-ioctl.h \
+ src/shared/initreq.h \
+ src/shared/dns-domain.c \
+ src/shared/dns-domain.h \
+ src/shared/efivars.c \
+ src/shared/efivars.h \
+ src/shared/fstab-util.c \
+ src/shared/fstab-util.h \
+ src/shared/sleep-config.c \
+ src/shared/sleep-config.h \
+ src/shared/conf-parser.c \
+ src/shared/conf-parser.h \
+ src/shared/pager.c \
+ src/shared/pager.h \
+ src/shared/spawn-polkit-agent.c \
+ src/shared/spawn-polkit-agent.h \
+ src/shared/apparmor-util.c \
+ src/shared/apparmor-util.h \
+ src/shared/ima-util.c \
+ src/shared/ima-util.h \
+ src/shared/ptyfwd.c \
+ src/shared/ptyfwd.h \
+ src/shared/base-filesystem.c \
+ src/shared/base-filesystem.h \
+ src/shared/uid-range.c \
+ src/shared/uid-range.h \
+ src/shared/install.c \
+ src/shared/install.h \
+ src/shared/install-printf.c \
+ src/shared/install-printf.h \
+ src/shared/path-lookup.c \
+ src/shared/path-lookup.h \
+ src/shared/specifier.c \
+ src/shared/specifier.h \
+ src/shared/dev-setup.c \
+ src/shared/dev-setup.h \
+ src/shared/dropin.c \
+ src/shared/dropin.h \
+ src/shared/condition.c \
+ src/shared/condition.h \
+ src/shared/clean-ipc.c \
+ src/shared/clean-ipc.h \
+ src/shared/generator.h \
+ src/shared/generator.c \
+ src/shared/acpi-fpdt.h \
+ src/shared/acpi-fpdt.c \
+ src/shared/boot-timestamps.h \
+ src/shared/boot-timestamps.c \
+ src/shared/cgroup-show.c \
+ src/shared/cgroup-show.h \
+ src/shared/utmp-wtmp.h \
+ src/shared/watchdog.c \
+ src/shared/watchdog.h \
+ src/shared/spawn-ask-password-agent.c \
+ src/shared/spawn-ask-password-agent.h \
+ src/shared/ask-password-api.c \
+ src/shared/ask-password-api.h \
+ src/shared/switch-root.h \
+ src/shared/switch-root.c \
+ src/shared/import-util.c \
+ src/shared/import-util.h \
+ src/shared/sysctl-util.c \
+ src/shared/sysctl-util.h \
+ src/shared/bus-util.c \
+ src/shared/bus-util.h \
+ src/shared/logs-show.c \
+ src/shared/logs-show.h \
+ src/shared/machine-image.c \
+ src/shared/machine-image.h \
+ src/shared/machine-pool.c \
+ src/shared/machine-pool.h \
+ src/shared/resolve-util.c \
+ src/shared/resolve-util.h \
+ src/shared/bus-unit-util.c \
+ src/shared/bus-unit-util.h \
+ src/shared/vlan-util.h \
+ src/shared/vlan-util.c \
+ src/shared/tests.h \
+ src/shared/tests.c \
+ src/shared/fdset.c \
+ src/shared/fdset.h
+
+ifneq ($(HAVE_UTMP),)
+libsystemd_shared_la_SOURCES += \
+ src/shared/utmp-wtmp.c
+endif # HAVE_UTMP
+
+ifneq ($(HAVE_SECCOMP),)
+libsystemd_shared_la_SOURCES += \
+ src/shared/seccomp-util.h \
+ src/shared/seccomp-util.c
+endif # HAVE_SECCOMP
+
+ifneq ($(HAVE_ACL),)
+libsystemd_shared_la_SOURCES += \
+ src/shared/acl-util.c \
+ src/shared/acl-util.h
+endif # HAVE_ACL
+
+libsystemd_shared_la_CFLAGS = \
+ $(ACL_CFLAGS) \
+ $(LIBIDN_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+
+libsystemd_shared_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la \
+ libsystemd-journal-internal.la \
+ libudev-internal.la \
+ $(ACL_LIBS) \
+ $(LIBIDN_LIBS) \
+ $(SECCOMP_LIBS)
+
+rootlibexec_LTLIBRARIES += \
+ libsystemd-shared.la
+
+libsystemd_shared_la_SOURCES = \
+ $(libsystemd_basic_la_SOURCES) \
+ $(libsystemd_shared_la_SOURCES) \
+ $(libsystemd_internal_la_SOURCES) \
+ $(libsystemd_journal_internal_la_SOURCES) \
+ $(libudev_internal_la_SOURCES)
+
+libsystemd_shared_la_CFLAGS = \
+ $(libsystemd_basic_la_CFLAGS) \
+ $(libsystemd_shared_la_CFLAGS) \
+ $(libsystemd_internal_la_CFLAGS) \
+ $(libsystemd_journal_internal_la_CFLAGS) \
+ $(libudev_internal_la_CFLAGS) \
+ $(ACL_CFLAGS) \
+ $(LIBIDN_CFLAGS) \
+ $(SECCOMP_CFLAGS) \
+ -fvisibility=default
+
+# We can't use libsystemd_shared_la_LIBADD here because it would
+# pull in libsystemd*-internal.la
+libsystemd_shared_la_LIBADD = \
+ libsystemd-basic.la \
+ libsystemd_internal.la \
+ libsystemd_journal_internal.la \
+ libudev_internal.la \
+ $(ACL_LIBS) \
+ $(LIBIDN_LIBS) \
+ $(SECCOMP_LIBS)
+
+libsystemd_shared_la_LDFLAGS = \
+ -release $(PACKAGE_VERSION)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/shared/acl-util.c b/src/libsystemd-shared/src/acl-util.c
index 2aa951fce9..97081c125a 100644
--- a/src/shared/acl-util.c
+++ b/src/libsystemd-shared/src/acl-util.c
@@ -20,12 +20,12 @@
#include <errno.h>
#include <stdbool.h>
-#include "acl-util.h"
-#include "alloc-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/acl-util.h"
int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry) {
acl_entry_t i;
diff --git a/src/shared/acpi-fpdt.c b/src/libsystemd-shared/src/acpi-fpdt.c
index 6779691c28..e71c05d488 100644
--- a/src/shared/acpi-fpdt.c
+++ b/src/libsystemd-shared/src/acpi-fpdt.c
@@ -24,11 +24,11 @@
#include <string.h>
#include <unistd.h>
-#include "acpi-fpdt.h"
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "time-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-shared/acpi-fpdt.h"
struct acpi_table_header {
char signature[4];
diff --git a/src/shared/apparmor-util.c b/src/libsystemd-shared/src/apparmor-util.c
index edd695fd23..b43b31095e 100644
--- a/src/shared/apparmor-util.c
+++ b/src/libsystemd-shared/src/apparmor-util.c
@@ -19,10 +19,10 @@
#include <stddef.h>
-#include "alloc-util.h"
-#include "apparmor-util.h"
-#include "fileio.h"
-#include "parse-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-shared/apparmor-util.h"
bool mac_apparmor_use(void) {
static int cached_use = -1;
diff --git a/src/shared/ask-password-api.c b/src/libsystemd-shared/src/ask-password-api.c
index 2597cfc648..b7f020b298 100644
--- a/src/shared/ask-password-api.c
+++ b/src/libsystemd-shared/src/ask-password-api.c
@@ -39,26 +39,26 @@
#include <termios.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "ask-password-api.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "io-util.h"
-#include "log.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "random-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "time-util.h"
-#include "umask-util.h"
-#include "utf8.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/ask-password-api.h"
#define KEYRING_TIMEOUT_USEC ((5 * USEC_PER_MINUTE) / 2)
diff --git a/src/shared/base-filesystem.c b/src/libsystemd-shared/src/base-filesystem.c
index 59a34a9d11..d0a601e918 100644
--- a/src/shared/base-filesystem.c
+++ b/src/libsystemd-shared/src/base-filesystem.c
@@ -25,15 +25,15 @@
#include <syslog.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "base-filesystem.h"
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "umask-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/base-filesystem.h"
typedef struct BaseFilesystem {
const char *dir;
diff --git a/src/shared/boot-timestamps.c b/src/libsystemd-shared/src/boot-timestamps.c
index 7e0152761c..e6a4392bd5 100644
--- a/src/shared/boot-timestamps.c
+++ b/src/libsystemd-shared/src/boot-timestamps.c
@@ -18,11 +18,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "acpi-fpdt.h"
-#include "boot-timestamps.h"
-#include "efivars.h"
-#include "macro.h"
-#include "time-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-shared/acpi-fpdt.h"
+#include "systemd-shared/boot-timestamps.h"
+#include "systemd-shared/efivars.h"
int boot_timestamps(const dual_timestamp *n, dual_timestamp *firmware, dual_timestamp *loader) {
usec_t x = 0, y = 0, a;
diff --git a/src/shared/bus-unit-util.c b/src/libsystemd-shared/src/bus-unit-util.c
index f639e0e832..41db672584 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/libsystemd-shared/src/bus-unit-util.c
@@ -17,26 +17,26 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "bus-internal.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "env-util.h"
-#include "escape.h"
-#include "hashmap.h"
-#include "list.h"
-#include "locale-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "rlimit-util.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "syslog-util.h"
-#include "terminal-util.h"
-#include "utf8.h"
-#include "util.h"
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/bus-unit-util.h"
int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
assert(message);
diff --git a/src/shared/cgroup-show.c b/src/libsystemd-shared/src/cgroup-show.c
index 3e451db715..78560e1262 100644
--- a/src/shared/cgroup-show.c
+++ b/src/libsystemd-shared/src/cgroup-show.c
@@ -24,18 +24,18 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "cgroup-show.h"
-#include "cgroup-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "locale-util.h"
-#include "macro.h"
-#include "output-mode.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-shared/cgroup-show.h"
+#include "systemd-shared/output-mode.h"
static void show_pid_array(
pid_t pids[],
diff --git a/src/shared/clean-ipc.c b/src/libsystemd-shared/src/clean-ipc.c
index d5db604f03..f7b8b94d8e 100644
--- a/src/shared/clean-ipc.c
+++ b/src/libsystemd-shared/src/clean-ipc.c
@@ -32,16 +32,16 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "clean-ipc.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/clean-ipc.h"
static bool match_uid_gid(uid_t subject_uid, gid_t subject_gid, uid_t delete_uid, gid_t delete_gid) {
diff --git a/src/shared/condition.c b/src/libsystemd-shared/src/condition.c
index 8bd6a51a99..b9a955a99b 100644
--- a/src/shared/condition.c
+++ b/src/libsystemd-shared/src/condition.c
@@ -27,33 +27,33 @@
#include <time.h>
#include <unistd.h>
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "apparmor-util.h"
-#include "architecture.h"
-#include "audit-util.h"
-#include "cap-list.h"
-#include "condition.h"
-#include "extract-word.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "glob-util.h"
-#include "hostname-util.h"
-#include "ima-util.h"
-#include "list.h"
-#include "macro.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "selinux-util.h"
-#include "smack-util.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "util.h"
-#include "virt.h"
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/apparmor-util.h"
+#include "systemd-shared/condition.h"
+#include "systemd-shared/ima-util.h"
Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) {
Condition *c;
diff --git a/src/shared/conf-parser.c b/src/libsystemd-shared/src/conf-parser.c
index 2ec0155b71..81c40a8891 100644
--- a/src/shared/conf-parser.c
+++ b/src/libsystemd-shared/src/conf-parser.c
@@ -25,24 +25,24 @@
#include <string.h>
#include <sys/types.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "conf-parser.h"
-#include "extract-word.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "syslog-util.h"
-#include "time-util.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-shared/conf-parser.h"
int config_item_table_lookup(
const void *table,
diff --git a/src/shared/dev-setup.c b/src/libsystemd-shared/src/dev-setup.c
index b2d464c117..b8f68fcfd2 100644
--- a/src/shared/dev-setup.c
+++ b/src/libsystemd-shared/src/dev-setup.c
@@ -21,13 +21,13 @@
#include <stdlib.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "dev-setup.h"
-#include "label.h"
-#include "log.h"
-#include "path-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/dev-setup.h"
int dev_setup(const char *prefix, uid_t uid, gid_t gid) {
static const char symlinks[] =
diff --git a/src/shared/dns-domain.c b/src/libsystemd-shared/src/dns-domain.c
index 892f0aadf5..b0c6707c04 100644
--- a/src/shared/dns-domain.c
+++ b/src/libsystemd-shared/src/dns-domain.c
@@ -28,16 +28,16 @@
#include <string.h>
#include <sys/socket.h>
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "hashmap.h"
-#include "hexdecoct.h"
-#include "in-addr-util.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "utf8.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-shared/dns-domain.h"
int dns_label_unescape(const char **name, char *dest, size_t sz) {
const char *n;
diff --git a/src/shared/dropin.c b/src/libsystemd-shared/src/dropin.c
index b9cd952ac8..2fb64a7f2c 100644
--- a/src/shared/dropin.c
+++ b/src/libsystemd-shared/src/dropin.c
@@ -23,21 +23,21 @@
#include <stdio.h>
#include <stdlib.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "dropin.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio-label.h"
-#include "hashmap.h"
-#include "log.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "set.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio-label.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/dropin.h"
int drop_in_file(const char *dir, const char *unit, unsigned level,
const char *name, char **_p, char **_q) {
diff --git a/src/shared/efivars.c b/src/libsystemd-shared/src/efivars.c
index 8631a5a5d9..5bc5870ebf 100644
--- a/src/shared/efivars.c
+++ b/src/libsystemd-shared/src/efivars.c
@@ -27,20 +27,20 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "efivars.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "stdio-util.h"
-#include "time-util.h"
-#include "utf8.h"
-#include "util.h"
-#include "virt.h"
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/efivars.h"
#ifdef ENABLE_EFI
diff --git a/src/shared/fdset.c b/src/libsystemd-shared/src/fdset.c
index 527f27bc67..5f89fc631f 100644
--- a/src/shared/fdset.c
+++ b/src/libsystemd-shared/src/fdset.c
@@ -23,15 +23,15 @@
#include <fcntl.h>
#include <stddef.h>
-#include "sd-daemon.h"
-
-#include "fd-util.h"
-#include "fdset.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "set.h"
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-shared/fdset.h"
#define MAKE_SET(s) ((Set*) s)
#define MAKE_FDSET(s) ((FDSet*) s)
diff --git a/src/shared/fstab-util.c b/src/libsystemd-shared/src/fstab-util.c
index a4e0cd3267..531fcb2f0e 100644
--- a/src/shared/fstab-util.c
+++ b/src/libsystemd-shared/src/fstab-util.c
@@ -23,16 +23,16 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "device-nodes.h"
-#include "fstab-util.h"
-#include "macro.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/device-nodes.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/fstab-util.h"
bool fstab_is_mount_point(const char *mount) {
_cleanup_endmntent_ FILE *f = NULL;
diff --git a/src/shared/generator.c b/src/libsystemd-shared/src/generator.c
index 70afc6a285..c720094cde 100644
--- a/src/shared/generator.c
+++ b/src/libsystemd-shared/src/generator.c
@@ -20,22 +20,22 @@
#include <errno.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "dropin.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fstab-util.h"
-#include "generator.h"
-#include "log.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "special.h"
-#include "string-util.h"
-#include "time-util.h"
-#include "unit-name.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/dropin.h"
+#include "systemd-shared/fstab-util.h"
+#include "systemd-shared/generator.h"
static int write_fsck_sysroot_service(const char *dir, const char *what) {
_cleanup_free_ char *device = NULL, *escaped = NULL;
diff --git a/src/shared/ima-util.c b/src/libsystemd-shared/src/ima-util.c
index 789064d653..5b591c0c10 100644
--- a/src/shared/ima-util.c
+++ b/src/libsystemd-shared/src/ima-util.c
@@ -19,7 +19,7 @@
#include <unistd.h>
-#include "ima-util.h"
+#include "systemd-shared/ima-util.h"
static int use_ima_cached = -1;
diff --git a/src/shared/import-util.c b/src/libsystemd-shared/src/import-util.c
index ab701ad8b2..a2f701acb5 100644
--- a/src/shared/import-util.c
+++ b/src/libsystemd-shared/src/import-util.c
@@ -20,15 +20,15 @@
#include <errno.h>
#include <string.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "import-util.h"
-#include "log.h"
-#include "macro.h"
-#include "path-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/import-util.h"
int import_url_last_component(const char *url, char **ret) {
const char *e, *p;
diff --git a/src/shared/install-printf.c b/src/libsystemd-shared/src/install-printf.c
index cbdf66827f..cbb92dc803 100644
--- a/src/shared/install-printf.c
+++ b/src/libsystemd-shared/src/install-printf.c
@@ -22,14 +22,14 @@
#include <string.h>
#include <unistd.h>
-#include "formats-util.h"
-#include "install-printf.h"
-#include "install.h"
-#include "macro.h"
-#include "specifier.h"
-#include "string-util.h"
-#include "unit-name.h"
-#include "user-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/install-printf.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/specifier.h"
static int specifier_prefix_and_instance(char specifier, void *data, void *userdata, char **ret) {
const UnitFileInstallInfo *i = userdata;
diff --git a/src/shared/install.c b/src/libsystemd-shared/src/install.c
index 96fba6e25b..1710a20e48 100644
--- a/src/shared/install.c
+++ b/src/libsystemd-shared/src/install.c
@@ -29,31 +29,31 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "conf-parser.h"
-#include "dirent-util.h"
-#include "extract-word.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "install-printf.h"
-#include "install.h"
-#include "locale-util.h"
-#include "log.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-lookup.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "set.h"
-#include "special.h"
-#include "stat-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/install-printf.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/path-lookup.h"
#define UNIT_FILE_FOLLOW_SYMLINK_MAX 64
diff --git a/src/shared/logs-show.c b/src/libsystemd-shared/src/logs-show.c
index f9d9c4ed62..5649717af2 100644
--- a/src/shared/logs-show.c
+++ b/src/libsystemd-shared/src/logs-show.c
@@ -28,30 +28,30 @@
#include <time.h>
#include <unistd.h>
-#include "sd-id128.h"
-#include "sd-journal.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "hashmap.h"
-#include "hostname-util.h"
-#include "io-util.h"
-#include "journal-internal.h"
-#include "log.h"
-#include "logs-show.h"
-#include "macro.h"
-#include "output-mode.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "sparse-endian.h"
-#include "stdio-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "time-util.h"
-#include "utf8.h"
-#include "util.h"
+#include <systemd/sd-id128.h>
+#include <systemd/sd-journal.h>
+
+#include "sd-journal/journal-internal.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/logs-show.h"
+#include "systemd-shared/output-mode.h"
/* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
#define PRINT_LINE_THRESHOLD 3
diff --git a/src/shared/machine-image.c b/src/libsystemd-shared/src/machine-image.c
index 060f8d50c7..fd6fe5215b 100644
--- a/src/shared/machine-image.c
+++ b/src/libsystemd-shared/src/machine-image.c
@@ -26,29 +26,31 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
+
#include <linux/fs.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "chattr-util.h"
-#include "copy.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "lockfile-util.h"
-#include "log.h"
-#include "macro.h"
-#include "machine-image.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
-#include "utf8.h"
-#include "util.h"
-#include "xattr-util.h"
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/lockfile-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/xattr-util.h"
+#include "systemd-shared/machine-image.h"
static const char image_search_path[] =
"/var/lib/machines\0"
diff --git a/src/shared/machine-pool.c b/src/libsystemd-shared/src/machine-pool.c
index 23890c63a0..239b5233e8 100644
--- a/src/shared/machine-pool.c
+++ b/src/libsystemd-shared/src/machine-pool.c
@@ -19,7 +19,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/loop.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
@@ -33,27 +32,29 @@
#include <sys/statvfs.h>
#include <unistd.h>
-#include "sd-bus-protocol.h"
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "lockfile-util.h"
-#include "log.h"
-#include "machine-pool.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "stat-util.h"
-#include "string-util.h"
+#include <linux/loop.h>
+
+#include <systemd/sd-bus-protocol.h>
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/lockfile-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/machine-pool.h"
#define VAR_LIB_MACHINES_SIZE_START (1024UL*1024UL*500UL)
#define VAR_LIB_MACHINES_FREE_MIN (1024UL*1024UL*750UL)
diff --git a/src/shared/output-mode.c b/src/libsystemd-shared/src/output-mode.c
index 67d8208ad2..aa8f8fcbed 100644
--- a/src/shared/output-mode.c
+++ b/src/libsystemd-shared/src/output-mode.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "output-mode.h"
-#include "string-table.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-shared/output-mode.h"
static const char *const output_mode_table[_OUTPUT_MODE_MAX] = {
[OUTPUT_SHORT] = "short",
diff --git a/src/shared/pager.c b/src/libsystemd-shared/src/pager.c
index 09672a4abf..7fb715c618 100644
--- a/src/shared/pager.c
+++ b/src/libsystemd-shared/src/pager.c
@@ -27,17 +27,17 @@
#include <sys/prctl.h>
#include <unistd.h>
-#include "copy.h"
-#include "fd-util.h"
-#include "locale-util.h"
-#include "log.h"
-#include "macro.h"
-#include "pager.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-shared/pager.h"
static pid_t pager_pid = 0;
diff --git a/src/shared/path-lookup.c b/src/libsystemd-shared/src/path-lookup.c
index 862096ae7b..58a9408b87 100644
--- a/src/shared/path-lookup.c
+++ b/src/libsystemd-shared/src/path-lookup.c
@@ -22,18 +22,18 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "install.h"
-#include "log.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-lookup.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/path-lookup.h"
static int user_runtime_dir(char **ret, const char *suffix) {
const char *e;
diff --git a/src/shared/ptyfwd.c b/src/libsystemd-shared/src/ptyfwd.c
index 293c6673fc..ae55879149 100644
--- a/src/shared/ptyfwd.c
+++ b/src/libsystemd-shared/src/ptyfwd.c
@@ -30,14 +30,14 @@
#include <termios.h>
#include <unistd.h>
-#include "sd-event.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "ptyfwd.h"
-#include "time-util.h"
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-shared/ptyfwd.h"
struct PTYForward {
sd_event *event;
diff --git a/src/shared/resolve-util.c b/src/libsystemd-shared/src/resolve-util.c
index e2da81bab7..ff49cdbccd 100644
--- a/src/shared/resolve-util.c
+++ b/src/libsystemd-shared/src/resolve-util.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "conf-parser.h"
-#include "resolve-util.h"
-#include "string-table.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/resolve-util.h"
DEFINE_CONFIG_PARSE_ENUM(config_parse_resolve_support, resolve_support, ResolveSupport, "Failed to parse resolve support setting");
DEFINE_CONFIG_PARSE_ENUM(config_parse_dnssec_mode, dnssec_mode, DnssecMode, "Failed to parse DNSSEC mode setting");
diff --git a/src/shared/seccomp-util.c b/src/libsystemd-shared/src/seccomp-util.c
index c9b24f1065..bcb55e3777 100644
--- a/src/shared/seccomp-util.c
+++ b/src/libsystemd-shared/src/seccomp-util.c
@@ -21,12 +21,13 @@
#include <seccomp.h>
#include <stddef.h>
#include <sys/prctl.h>
+
#include <linux/seccomp.h>
-#include "macro.h"
-#include "seccomp-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/seccomp-util.h"
const char* seccomp_arch_to_string(uint32_t c) {
/* Maintain order used in <seccomp.h>.
diff --git a/src/shared/sleep-config.c b/src/libsystemd-shared/src/sleep-config.c
index ed31a80c8d..5be19e13a9 100644
--- a/src/shared/sleep-config.c
+++ b/src/libsystemd-shared/src/sleep-config.c
@@ -25,18 +25,18 @@
#include <syslog.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "def.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "sleep-config.h"
-#include "string-util.h"
-#include "strv.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/sleep-config.h"
#define USE(x, y) do { (x) = (y); (y) = NULL; } while (0)
diff --git a/src/shared/spawn-ask-password-agent.c b/src/libsystemd-shared/src/spawn-ask-password-agent.c
index a46b7525f0..2ba48157d0 100644
--- a/src/shared/spawn-ask-password-agent.c
+++ b/src/libsystemd-shared/src/spawn-ask-password-agent.c
@@ -21,10 +21,10 @@
#include <stdlib.h>
#include <unistd.h>
-#include "log.h"
-#include "process-util.h"
-#include "spawn-ask-password-agent.h"
-#include "util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/spawn-ask-password-agent.h"
static pid_t agent_pid = 0;
diff --git a/src/shared/spawn-polkit-agent.c b/src/libsystemd-shared/src/spawn-polkit-agent.c
index 7dae4d14fe..5f4f518abf 100644
--- a/src/shared/spawn-polkit-agent.c
+++ b/src/libsystemd-shared/src/spawn-polkit-agent.c
@@ -23,15 +23,15 @@
#include <stdlib.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "io-util.h"
-#include "log.h"
-#include "macro.h"
-#include "process-util.h"
-#include "spawn-polkit-agent.h"
-#include "stdio-util.h"
-#include "time-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/spawn-polkit-agent.h"
#ifdef ENABLE_POLKIT
static pid_t agent_pid = 0;
diff --git a/src/shared/specifier.c b/src/libsystemd-shared/src/specifier.c
index 1c17eb5251..8946e08c6a 100644
--- a/src/shared/specifier.c
+++ b/src/libsystemd-shared/src/specifier.c
@@ -24,13 +24,13 @@
#include <string.h>
#include <sys/utsname.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
-#include "alloc-util.h"
-#include "hostname-util.h"
-#include "macro.h"
-#include "specifier.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/specifier.h"
/*
* Generic infrastructure for replacing %x style specifiers in
diff --git a/src/shared/switch-root.c b/src/libsystemd-shared/src/switch-root.c
index 4eff4f692e..c10d6f4cbb 100644
--- a/src/shared/switch-root.c
+++ b/src/libsystemd-shared/src/switch-root.c
@@ -26,18 +26,18 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "base-filesystem.h"
-#include "fd-util.h"
-#include "log.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "switch-root.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/base-filesystem.h"
+#include "systemd-shared/switch-root.h"
int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, unsigned long mountflags) {
diff --git a/src/shared/sysctl-util.c b/src/libsystemd-shared/src/sysctl-util.c
index e1ccb3294c..89f0b51d20 100644
--- a/src/shared/sysctl-util.c
+++ b/src/libsystemd-shared/src/sysctl-util.c
@@ -20,11 +20,11 @@
#include <stdio.h>
#include <string.h>
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "sysctl-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/sysctl-util.h"
char *sysctl_normalize(char *s) {
char *n;
diff --git a/src/shared/tests.c b/src/libsystemd-shared/src/tests.c
index 409116290d..72176a36cd 100644
--- a/src/shared/tests.c
+++ b/src/libsystemd-shared/src/tests.c
@@ -18,9 +18,9 @@
***/
#include <stdlib.h>
-#include <util.h>
-#include "tests.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/tests.h"
char* setup_fake_runtime_dir(void) {
char t[] = "/tmp/fake-xdg-runtime-XXXXXX", *p;
diff --git a/src/shared/uid-range.c b/src/libsystemd-shared/src/uid-range.c
index b6ec474390..ec08299d02 100644
--- a/src/shared/uid-range.c
+++ b/src/libsystemd-shared/src/uid-range.c
@@ -21,9 +21,9 @@
#include <stdlib.h>
#include <string.h>
-#include "macro.h"
-#include "uid-range.h"
-#include "user-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/uid-range.h"
static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
assert(range);
diff --git a/src/shared/utmp-wtmp.c b/src/libsystemd-shared/src/utmp-wtmp.c
index 9750dcd817..e0654ab15a 100644
--- a/src/shared/utmp-wtmp.c
+++ b/src/libsystemd-shared/src/utmp-wtmp.c
@@ -29,17 +29,17 @@
#include <unistd.h>
#include <utmpx.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "hostname-util.h"
-#include "macro.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "time-util.h"
-#include "user-util.h"
-#include "util.h"
-#include "utmp-wtmp.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/utmp-wtmp.h"
int utmp_get_runlevel(int *runlevel, int *previous) {
struct utmpx *found, lookup = { .ut_type = RUN_LVL };
diff --git a/src/shared/vlan-util.c b/src/libsystemd-shared/src/vlan-util.c
index 78d66dd3d9..0b66e577ef 100644
--- a/src/shared/vlan-util.c
+++ b/src/libsystemd-shared/src/vlan-util.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "vlan-util.h"
-#include "parse-util.h"
-#include "conf-parser.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/vlan-util.h"
int parse_vlanid(const char *p, uint16_t *ret) {
uint16_t id;
diff --git a/src/shared/watchdog.c b/src/libsystemd-shared/src/watchdog.c
index 4f3e0125f3..95e327cea0 100644
--- a/src/shared/watchdog.c
+++ b/src/libsystemd-shared/src/watchdog.c
@@ -22,12 +22,13 @@
#include <sys/ioctl.h>
#include <syslog.h>
#include <unistd.h>
+
#include <linux/watchdog.h>
-#include "fd-util.h"
-#include "log.h"
-#include "time-util.h"
-#include "watchdog.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-shared/watchdog.h"
static int watchdog_fd = -1;
static usec_t watchdog_timeout = USEC_INFINITY;
diff --git a/src/libsystemd/GNUmakefile b/src/libsystemd/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/libsystemd/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile
index d0b0e8e008..be66c9c898 120000..100644
--- a/src/libsystemd/Makefile
+++ b/src/libsystemd/Makefile
@@ -1 +1,109 @@
-../Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+LIBSYSTEMD_CURRENT=17
+LIBSYSTEMD_REVISION=0
+LIBSYSTEMD_AGE=17
+
+EXTRA_DIST += \
+ src/libsystemd/libsystemd.pc.in \
+ src/libsystemd/sd-bus/DIFFERENCES \
+ src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
+
+libsystemd_la_SOURCES =
+
+libsystemd_la_LDFLAGS = \
+ -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \
+ -Wl,--version-script=$(srcdir)/libsystemd.sym
+
+libsystemd_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la \
+ libsystemd-journal-internal.la
+
+pkgconfiglib_DATA += \
+ src/libsystemd/libsystemd.pc
+
+pkginclude_HEADERS += \
+ src/systemd/sd-bus.h \
+ src/systemd/sd-bus-protocol.h \
+ src/systemd/sd-bus-vtable.h \
+ src/systemd/sd-event.h \
+ src/systemd/sd-login.h \
+ src/systemd/sd-id128.h \
+ src/systemd/sd-daemon.h
+
+rootlib_LTLIBRARIES += \
+ libsystemd.la
+
+# ------------------------------------------------------------------------------
+
+tests += \
+ test-bus-marshal \
+ test-bus-signature \
+ test-bus-benchmark \
+ test-bus-chat \
+ test-bus-cleanup \
+ test-bus-server \
+ test-bus-match \
+ test-bus-kernel \
+ test-bus-kernel-bloom \
+ test-bus-zero-copy \
+ test-bus-introspect \
+ test-bus-objects \
+ test-bus-error \
+ test-bus-creds \
+ test-bus-gvariant \
+ test-bus-track \
+ test-event \
+ test-netlink \
+ test-local-addresses \
+ test-resolve
+
+pkginclude_HEADERS += \
+ src/systemd/sd-journal.h \
+ src/systemd/sd-messages.h \
+ src/systemd/_sd-common.h
+
+test-libsystemd-sym.c: \
+ $(top_builddir)/src/libsystemd/libsystemd.sym \
+ src/systemd/sd-journal.h \
+ src/systemd/sd-daemon.h \
+ src/systemd/sd-login.h \
+ src/systemd/sd-bus.h \
+ src/systemd/sd-utf8.h \
+ src/systemd/sd-resolve.h \
+ src/systemd/sd-path.h \
+ src/systemd/sd-event.h
+ $(generate-sym-test)
+
+nodist_test_libsystemd_sym_SOURCES = \
+ test-libsystemd-sym.c
+test_libsystemd_sym_LDADD = \
+ libsystemd.la
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/systemd/sd-device.h b/src/libsystemd/include-staging/systemd-staging/sd-device.h
index c1d07561d7..5e32fc6110 100644
--- a/src/systemd/sd-device.h
+++ b/src/libsystemd/include-staging/systemd-staging/sd-device.h
@@ -25,7 +25,7 @@
#include <sys/sysmacros.h>
#include <sys/types.h>
-#include "_sd-common.h"
+#include <systemd/_sd-common.h>
_SD_BEGIN_DECLARATIONS;
diff --git a/src/systemd/sd-hwdb.h b/src/libsystemd/include-staging/systemd-staging/sd-hwdb.h
index 7105920492..f46d7ad561 100644
--- a/src/systemd/sd-hwdb.h
+++ b/src/libsystemd/include-staging/systemd-staging/sd-hwdb.h
@@ -21,7 +21,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "_sd-common.h"
+#include <systemd/_sd-common.h>
_SD_BEGIN_DECLARATIONS;
diff --git a/src/systemd/sd-netlink.h b/src/libsystemd/include-staging/systemd-staging/sd-netlink.h
index 7efa8ebe5a..8a8c85a004 100644
--- a/src/systemd/sd-netlink.h
+++ b/src/libsystemd/include-staging/systemd-staging/sd-netlink.h
@@ -23,12 +23,12 @@
#include <inttypes.h>
#include <netinet/ether.h>
#include <netinet/in.h>
+
#include <linux/rtnetlink.h>
#include <linux/neighbour.h>
-#include "sd-event.h"
-
-#include "_sd-common.h"
+#include <systemd/_sd-common.h>
+#include <systemd/sd-event.h>
_SD_BEGIN_DECLARATIONS;
diff --git a/src/systemd/sd-network.h b/src/libsystemd/include-staging/systemd-staging/sd-network.h
index 0f13e2bae7..ac2660de45 100644
--- a/src/systemd/sd-network.h
+++ b/src/libsystemd/include-staging/systemd-staging/sd-network.h
@@ -24,7 +24,7 @@
#include <inttypes.h>
#include <sys/types.h>
-#include "_sd-common.h"
+#include <systemd/_sd-common.h>
/*
* A few points:
diff --git a/src/systemd/sd-resolve.h b/src/libsystemd/include-staging/systemd-staging/sd-resolve.h
index 1c792dab39..1996ae401a 100644
--- a/src/systemd/sd-resolve.h
+++ b/src/libsystemd/include-staging/systemd-staging/sd-resolve.h
@@ -25,9 +25,8 @@
#include <sys/socket.h>
#include <sys/types.h>
-#include "sd-event.h"
-
-#include "_sd-common.h"
+#include <systemd/_sd-common.h>
+#include <systemd/sd-event.h>
_SD_BEGIN_DECLARATIONS;
diff --git a/src/systemd/_sd-common.h b/src/libsystemd/include/systemd/_sd-common.h
index 3bb886be75..3bb886be75 100644
--- a/src/systemd/_sd-common.h
+++ b/src/libsystemd/include/systemd/_sd-common.h
diff --git a/src/systemd/sd-bus-protocol.h b/src/libsystemd/include/systemd/sd-bus-protocol.h
index 623cee0c50..623cee0c50 100644
--- a/src/systemd/sd-bus-protocol.h
+++ b/src/libsystemd/include/systemd/sd-bus-protocol.h
diff --git a/src/systemd/sd-bus-vtable.h b/src/libsystemd/include/systemd/sd-bus-vtable.h
index e8f84eb545..e8f84eb545 100644
--- a/src/systemd/sd-bus-vtable.h
+++ b/src/libsystemd/include/systemd/sd-bus-vtable.h
diff --git a/src/systemd/sd-bus.h b/src/libsystemd/include/systemd/sd-bus.h
index c47459c9ad..dd50162f9f 100644
--- a/src/systemd/sd-bus.h
+++ b/src/libsystemd/include/systemd/sd-bus.h
@@ -25,11 +25,10 @@
#include <sys/types.h>
#include <sys/uio.h>
+#include "_sd-common.h"
#include "sd-event.h"
#include "sd-id128.h"
-#include "_sd-common.h"
-
_SD_BEGIN_DECLARATIONS;
/* Types */
@@ -101,10 +100,10 @@ enum {
/* Callbacks */
typedef int (*sd_bus_message_handler_t)(sd_bus_message *m, void *userdata, sd_bus_error *ret_error);
+typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error);
+typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error);
typedef int (*sd_bus_property_get_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error);
typedef int (*sd_bus_property_set_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *value, void *userdata, sd_bus_error *ret_error);
-typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error);
-typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error);
typedef int (*sd_bus_track_handler_t) (sd_bus_track *track, void *userdata);
#include "sd-bus-protocol.h"
diff --git a/src/systemd/sd-daemon.h b/src/libsystemd/include/systemd/sd-daemon.h
index 740b176903..740b176903 100644
--- a/src/systemd/sd-daemon.h
+++ b/src/libsystemd/include/systemd/sd-daemon.h
diff --git a/src/systemd/sd-event.h b/src/libsystemd/include/systemd/sd-event.h
index cc26b7df55..cc26b7df55 100644
--- a/src/systemd/sd-event.h
+++ b/src/libsystemd/include/systemd/sd-event.h
diff --git a/src/systemd/sd-id128.h b/src/libsystemd/include/systemd/sd-id128.h
index ee011b1861..ee011b1861 100644
--- a/src/systemd/sd-id128.h
+++ b/src/libsystemd/include/systemd/sd-id128.h
diff --git a/src/systemd/sd-journal.h b/src/libsystemd/include/systemd/sd-journal.h
index 9c36b27157..b684cf073c 100644
--- a/src/systemd/sd-journal.h
+++ b/src/libsystemd/include/systemd/sd-journal.h
@@ -26,9 +26,8 @@
#include <sys/uio.h>
#include <syslog.h>
-#include "sd-id128.h"
-
#include "_sd-common.h"
+#include "sd-id128.h"
/* Journal APIs. See sd-journal(3) for more information. */
diff --git a/src/systemd/sd-login.h b/src/libsystemd/include/systemd/sd-login.h
index e3ecbd8378..e3ecbd8378 100644
--- a/src/systemd/sd-login.h
+++ b/src/libsystemd/include/systemd/sd-login.h
diff --git a/src/systemd/sd-messages.h b/src/libsystemd/include/systemd/sd-messages.h
index 79246ae060..68d7fa2ca9 100644
--- a/src/systemd/sd-messages.h
+++ b/src/libsystemd/include/systemd/sd-messages.h
@@ -20,9 +20,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-id128.h"
-
#include "_sd-common.h"
+#include "sd-id128.h"
_SD_BEGIN_DECLARATIONS;
diff --git a/src/systemd/sd-utf8.h b/src/libsystemd/include/systemd/sd-utf8.h
index 6781983878..6781983878 100644
--- a/src/systemd/sd-utf8.h
+++ b/src/libsystemd/include/systemd/sd-utf8.h
diff --git a/man/libsystemd-pkgconfig.xml b/src/libsystemd/libsystemd-pkgconfig.xml
index 272da64cd7..272da64cd7 100644
--- a/man/libsystemd-pkgconfig.xml
+++ b/src/libsystemd/libsystemd-pkgconfig.xml
diff --git a/man/sd-bus-errors.xml b/src/libsystemd/sd-bus-errors.xml
index d2b81f4e4a..d2b81f4e4a 100644
--- a/man/sd-bus-errors.xml
+++ b/src/libsystemd/sd-bus-errors.xml
diff --git a/man/sd-bus.xml b/src/libsystemd/sd-bus.xml
index 66b1c96c15..66b1c96c15 100644
--- a/man/sd-bus.xml
+++ b/src/libsystemd/sd-bus.xml
diff --git a/src/libsystemd/sd-bus/Makefile b/src/libsystemd/sd-bus/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/libsystemd/sd-bus/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/man/sd-daemon.xml b/src/libsystemd/sd-daemon.xml
index b06d99f346..b06d99f346 100644
--- a/man/sd-daemon.xml
+++ b/src/libsystemd/sd-daemon.xml
diff --git a/src/libsystemd/sd-daemon/Makefile b/src/libsystemd/sd-daemon/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/libsystemd/sd-daemon/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/libsystemd/sd-device/Makefile b/src/libsystemd/sd-device/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/libsystemd/sd-device/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/man/sd-event.xml b/src/libsystemd/sd-event.xml
index 24a69bb645..24a69bb645 100644
--- a/man/sd-event.xml
+++ b/src/libsystemd/sd-event.xml
diff --git a/src/libsystemd/sd-event/Makefile b/src/libsystemd/sd-event/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/libsystemd/sd-event/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/libsystemd/sd-hwdb/Makefile b/src/libsystemd/sd-hwdb/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/libsystemd/sd-hwdb/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/man/sd-id128.xml b/src/libsystemd/sd-id128.xml
index 5f24feff8e..5f24feff8e 100644
--- a/man/sd-id128.xml
+++ b/src/libsystemd/sd-id128.xml
diff --git a/src/libsystemd/sd-id128/Makefile b/src/libsystemd/sd-id128/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/libsystemd/sd-id128/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/man/sd-journal.xml b/src/libsystemd/sd-journal.xml
index 0f4b3e8eea..0f4b3e8eea 100644
--- a/man/sd-journal.xml
+++ b/src/libsystemd/sd-journal.xml
diff --git a/man/sd-login.xml b/src/libsystemd/sd-login.xml
index 328f71164d..328f71164d 100644
--- a/man/sd-login.xml
+++ b/src/libsystemd/sd-login.xml
diff --git a/src/libsystemd/sd-login/Makefile b/src/libsystemd/sd-login/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/libsystemd/sd-login/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/libsystemd/sd-netlink/Makefile b/src/libsystemd/sd-netlink/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/libsystemd/sd-netlink/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/libsystemd/sd-network/Makefile b/src/libsystemd/sd-network/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/libsystemd/sd-network/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/libsystemd/sd-path/Makefile b/src/libsystemd/sd-path/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/libsystemd/sd-path/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/libsystemd/sd-resolve/Makefile b/src/libsystemd/sd-resolve/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/libsystemd/sd-resolve/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/libsystemd/sd-utf8/Makefile b/src/libsystemd/sd-utf8/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/libsystemd/sd-utf8/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/man/sd_booted.xml b/src/libsystemd/sd_booted.xml
index 4dd674b8ea..4dd674b8ea 100644
--- a/man/sd_booted.xml
+++ b/src/libsystemd/sd_booted.xml
diff --git a/man/sd_bus_add_match.xml b/src/libsystemd/sd_bus_add_match.xml
index 8bcf7164a0..8bcf7164a0 100644
--- a/man/sd_bus_add_match.xml
+++ b/src/libsystemd/sd_bus_add_match.xml
diff --git a/man/sd_bus_creds_get_pid.xml b/src/libsystemd/sd_bus_creds_get_pid.xml
index 9e68d5e8c7..9e68d5e8c7 100644
--- a/man/sd_bus_creds_get_pid.xml
+++ b/src/libsystemd/sd_bus_creds_get_pid.xml
diff --git a/man/sd_bus_creds_new_from_pid.xml b/src/libsystemd/sd_bus_creds_new_from_pid.xml
index b4d7d61d0f..b4d7d61d0f 100644
--- a/man/sd_bus_creds_new_from_pid.xml
+++ b/src/libsystemd/sd_bus_creds_new_from_pid.xml
diff --git a/man/sd_bus_default.xml b/src/libsystemd/sd_bus_default.xml
index 6d5a90de72..6d5a90de72 100644
--- a/man/sd_bus_default.xml
+++ b/src/libsystemd/sd_bus_default.xml
diff --git a/man/sd_bus_error.xml b/src/libsystemd/sd_bus_error.xml
index c2d7ee389b..c2d7ee389b 100644
--- a/man/sd_bus_error.xml
+++ b/src/libsystemd/sd_bus_error.xml
diff --git a/man/sd_bus_error_add_map.xml b/src/libsystemd/sd_bus_error_add_map.xml
index 7dc1ef6c90..7dc1ef6c90 100644
--- a/man/sd_bus_error_add_map.xml
+++ b/src/libsystemd/sd_bus_error_add_map.xml
diff --git a/man/sd_bus_get_fd.xml b/src/libsystemd/sd_bus_get_fd.xml
index 9f7019069f..9f7019069f 100644
--- a/man/sd_bus_get_fd.xml
+++ b/src/libsystemd/sd_bus_get_fd.xml
diff --git a/man/sd_bus_message_append.xml b/src/libsystemd/sd_bus_message_append.xml
index c222d0fd0e..c222d0fd0e 100644
--- a/man/sd_bus_message_append.xml
+++ b/src/libsystemd/sd_bus_message_append.xml
diff --git a/man/sd_bus_message_append_array.xml b/src/libsystemd/sd_bus_message_append_array.xml
index 27db2a96c3..27db2a96c3 100644
--- a/man/sd_bus_message_append_array.xml
+++ b/src/libsystemd/sd_bus_message_append_array.xml
diff --git a/man/sd_bus_message_append_basic.xml b/src/libsystemd/sd_bus_message_append_basic.xml
index 276953af69..276953af69 100644
--- a/man/sd_bus_message_append_basic.xml
+++ b/src/libsystemd/sd_bus_message_append_basic.xml
diff --git a/man/sd_bus_message_append_string_memfd.xml b/src/libsystemd/sd_bus_message_append_string_memfd.xml
index 9e99999bf3..9e99999bf3 100644
--- a/man/sd_bus_message_append_string_memfd.xml
+++ b/src/libsystemd/sd_bus_message_append_string_memfd.xml
diff --git a/man/sd_bus_message_append_strv.xml b/src/libsystemd/sd_bus_message_append_strv.xml
index 0f77adcc8b..0f77adcc8b 100644
--- a/man/sd_bus_message_append_strv.xml
+++ b/src/libsystemd/sd_bus_message_append_strv.xml
diff --git a/man/sd_bus_message_get_cookie.xml b/src/libsystemd/sd_bus_message_get_cookie.xml
index 3328eead3d..3328eead3d 100644
--- a/man/sd_bus_message_get_cookie.xml
+++ b/src/libsystemd/sd_bus_message_get_cookie.xml
diff --git a/man/sd_bus_message_get_monotonic_usec.xml b/src/libsystemd/sd_bus_message_get_monotonic_usec.xml
index 2c0a8a5d54..2c0a8a5d54 100644
--- a/man/sd_bus_message_get_monotonic_usec.xml
+++ b/src/libsystemd/sd_bus_message_get_monotonic_usec.xml
diff --git a/man/sd_bus_message_read_basic.xml b/src/libsystemd/sd_bus_message_read_basic.xml
index 6a46403159..6a46403159 100644
--- a/man/sd_bus_message_read_basic.xml
+++ b/src/libsystemd/sd_bus_message_read_basic.xml
diff --git a/man/sd_bus_negotiate_fds.xml b/src/libsystemd/sd_bus_negotiate_fds.xml
index 1501e1427d..1501e1427d 100644
--- a/man/sd_bus_negotiate_fds.xml
+++ b/src/libsystemd/sd_bus_negotiate_fds.xml
diff --git a/man/sd_bus_new.xml b/src/libsystemd/sd_bus_new.xml
index d281b5dd44..d281b5dd44 100644
--- a/man/sd_bus_new.xml
+++ b/src/libsystemd/sd_bus_new.xml
diff --git a/man/sd_bus_path_encode.xml b/src/libsystemd/sd_bus_path_encode.xml
index 3088243e45..3088243e45 100644
--- a/man/sd_bus_path_encode.xml
+++ b/src/libsystemd/sd_bus_path_encode.xml
diff --git a/man/sd_bus_process.xml b/src/libsystemd/sd_bus_process.xml
index 4b9f52e52f..4b9f52e52f 100644
--- a/man/sd_bus_process.xml
+++ b/src/libsystemd/sd_bus_process.xml
diff --git a/man/sd_bus_request_name.xml b/src/libsystemd/sd_bus_request_name.xml
index f07ae09555..f07ae09555 100644
--- a/man/sd_bus_request_name.xml
+++ b/src/libsystemd/sd_bus_request_name.xml
diff --git a/man/sd_bus_track_add_name.xml b/src/libsystemd/sd_bus_track_add_name.xml
index 6a5e344cb1..6a5e344cb1 100644
--- a/man/sd_bus_track_add_name.xml
+++ b/src/libsystemd/sd_bus_track_add_name.xml
diff --git a/man/sd_bus_track_new.xml b/src/libsystemd/sd_bus_track_new.xml
index 60e2e77f75..60e2e77f75 100644
--- a/man/sd_bus_track_new.xml
+++ b/src/libsystemd/sd_bus_track_new.xml
diff --git a/man/sd_event_add_child.xml b/src/libsystemd/sd_event_add_child.xml
index bc732db7fa..bc732db7fa 100644
--- a/man/sd_event_add_child.xml
+++ b/src/libsystemd/sd_event_add_child.xml
diff --git a/man/sd_event_add_defer.xml b/src/libsystemd/sd_event_add_defer.xml
index d9ebd3b179..d9ebd3b179 100644
--- a/man/sd_event_add_defer.xml
+++ b/src/libsystemd/sd_event_add_defer.xml
diff --git a/man/sd_event_add_io.xml b/src/libsystemd/sd_event_add_io.xml
index c3749164cd..c3749164cd 100644
--- a/man/sd_event_add_io.xml
+++ b/src/libsystemd/sd_event_add_io.xml
diff --git a/man/sd_event_add_signal.xml b/src/libsystemd/sd_event_add_signal.xml
index e98f1d2682..e98f1d2682 100644
--- a/man/sd_event_add_signal.xml
+++ b/src/libsystemd/sd_event_add_signal.xml
diff --git a/man/sd_event_add_time.xml b/src/libsystemd/sd_event_add_time.xml
index 5496b71529..5496b71529 100644
--- a/man/sd_event_add_time.xml
+++ b/src/libsystemd/sd_event_add_time.xml
diff --git a/man/sd_event_exit.xml b/src/libsystemd/sd_event_exit.xml
index 9846a3eaf4..9846a3eaf4 100644
--- a/man/sd_event_exit.xml
+++ b/src/libsystemd/sd_event_exit.xml
diff --git a/man/glib-event-glue.c b/src/libsystemd/sd_event_get_fd-glib-example.c
index 8f3168d0ea..8f3168d0ea 100644
--- a/man/glib-event-glue.c
+++ b/src/libsystemd/sd_event_get_fd-glib-example.c
diff --git a/man/sd_event_get_fd.xml b/src/libsystemd/sd_event_get_fd.xml
index f68752dd0e..f68752dd0e 100644
--- a/man/sd_event_get_fd.xml
+++ b/src/libsystemd/sd_event_get_fd.xml
diff --git a/man/sd_event_new.xml b/src/libsystemd/sd_event_new.xml
index c0a5e98177..c0a5e98177 100644
--- a/man/sd_event_new.xml
+++ b/src/libsystemd/sd_event_new.xml
diff --git a/man/sd_event_now.xml b/src/libsystemd/sd_event_now.xml
index 2c83b0bcb5..2c83b0bcb5 100644
--- a/man/sd_event_now.xml
+++ b/src/libsystemd/sd_event_now.xml
diff --git a/man/sd_event_run.xml b/src/libsystemd/sd_event_run.xml
index 5b68959165..5b68959165 100644
--- a/man/sd_event_run.xml
+++ b/src/libsystemd/sd_event_run.xml
diff --git a/man/sd_event_set_watchdog.xml b/src/libsystemd/sd_event_set_watchdog.xml
index cbc5bc0836..cbc5bc0836 100644
--- a/man/sd_event_set_watchdog.xml
+++ b/src/libsystemd/sd_event_set_watchdog.xml
diff --git a/man/sd_event_source_get_event.xml b/src/libsystemd/sd_event_source_get_event.xml
index 2fdbd411bd..2fdbd411bd 100644
--- a/man/sd_event_source_get_event.xml
+++ b/src/libsystemd/sd_event_source_get_event.xml
diff --git a/man/sd_event_source_get_pending.xml b/src/libsystemd/sd_event_source_get_pending.xml
index 7f88bd1b87..7f88bd1b87 100644
--- a/man/sd_event_source_get_pending.xml
+++ b/src/libsystemd/sd_event_source_get_pending.xml
diff --git a/man/sd_event_source_set_description.xml b/src/libsystemd/sd_event_source_set_description.xml
index b9488a622f..b9488a622f 100644
--- a/man/sd_event_source_set_description.xml
+++ b/src/libsystemd/sd_event_source_set_description.xml
diff --git a/man/sd_event_source_set_enabled.xml b/src/libsystemd/sd_event_source_set_enabled.xml
index 6844f29a49..6844f29a49 100644
--- a/man/sd_event_source_set_enabled.xml
+++ b/src/libsystemd/sd_event_source_set_enabled.xml
diff --git a/man/sd_event_source_set_prepare.xml b/src/libsystemd/sd_event_source_set_prepare.xml
index 24861d01d9..24861d01d9 100644
--- a/man/sd_event_source_set_prepare.xml
+++ b/src/libsystemd/sd_event_source_set_prepare.xml
diff --git a/man/sd_event_source_set_priority.xml b/src/libsystemd/sd_event_source_set_priority.xml
index b6bab6d316..b6bab6d316 100644
--- a/man/sd_event_source_set_priority.xml
+++ b/src/libsystemd/sd_event_source_set_priority.xml
diff --git a/man/sd_event_source_set_userdata.xml b/src/libsystemd/sd_event_source_set_userdata.xml
index 533d491b13..533d491b13 100644
--- a/man/sd_event_source_set_userdata.xml
+++ b/src/libsystemd/sd_event_source_set_userdata.xml
diff --git a/man/sd_event_source_unref.xml b/src/libsystemd/sd_event_source_unref.xml
index 2c4d450763..2c4d450763 100644
--- a/man/sd_event_source_unref.xml
+++ b/src/libsystemd/sd_event_source_unref.xml
diff --git a/man/sd_event_wait.xml b/src/libsystemd/sd_event_wait.xml
index 26327dc688..26327dc688 100644
--- a/man/sd_event_wait.xml
+++ b/src/libsystemd/sd_event_wait.xml
diff --git a/man/sd_get_seats.xml b/src/libsystemd/sd_get_seats.xml
index 37eb3fc894..37eb3fc894 100644
--- a/man/sd_get_seats.xml
+++ b/src/libsystemd/sd_get_seats.xml
diff --git a/man/sd_id128_get_machine.xml b/src/libsystemd/sd_id128_get_machine.xml
index 9a86c24aed..9a86c24aed 100644
--- a/man/sd_id128_get_machine.xml
+++ b/src/libsystemd/sd_id128_get_machine.xml
diff --git a/man/sd_id128_randomize.xml b/src/libsystemd/sd_id128_randomize.xml
index ab449d2937..ab449d2937 100644
--- a/man/sd_id128_randomize.xml
+++ b/src/libsystemd/sd_id128_randomize.xml
diff --git a/man/sd_id128_to_string.xml b/src/libsystemd/sd_id128_to_string.xml
index 927d1ad5f2..927d1ad5f2 100644
--- a/man/sd_id128_to_string.xml
+++ b/src/libsystemd/sd_id128_to_string.xml
diff --git a/man/sd_is_fifo.xml b/src/libsystemd/sd_is_fifo.xml
index 7ff02cbfec..7ff02cbfec 100644
--- a/man/sd_is_fifo.xml
+++ b/src/libsystemd/sd_is_fifo.xml
diff --git a/man/sd_journal_add_match.xml b/src/libsystemd/sd_journal_add_match.xml
index 7c64329aed..7c64329aed 100644
--- a/man/sd_journal_add_match.xml
+++ b/src/libsystemd/sd_journal_add_match.xml
diff --git a/man/sd_journal_enumerate_fields.xml b/src/libsystemd/sd_journal_enumerate_fields.xml
index bc2c21ed4b..bc2c21ed4b 100644
--- a/man/sd_journal_enumerate_fields.xml
+++ b/src/libsystemd/sd_journal_enumerate_fields.xml
diff --git a/man/sd_journal_get_catalog.xml b/src/libsystemd/sd_journal_get_catalog.xml
index 35ec46f63e..35ec46f63e 100644
--- a/man/sd_journal_get_catalog.xml
+++ b/src/libsystemd/sd_journal_get_catalog.xml
diff --git a/man/sd_journal_get_cursor.xml b/src/libsystemd/sd_journal_get_cursor.xml
index b7aa05f8b2..b7aa05f8b2 100644
--- a/man/sd_journal_get_cursor.xml
+++ b/src/libsystemd/sd_journal_get_cursor.xml
diff --git a/man/sd_journal_get_cutoff_realtime_usec.xml b/src/libsystemd/sd_journal_get_cutoff_realtime_usec.xml
index 0950e11b44..0950e11b44 100644
--- a/man/sd_journal_get_cutoff_realtime_usec.xml
+++ b/src/libsystemd/sd_journal_get_cutoff_realtime_usec.xml
diff --git a/man/sd_journal_get_data.xml b/src/libsystemd/sd_journal_get_data.xml
index 1321114de0..1321114de0 100644
--- a/man/sd_journal_get_data.xml
+++ b/src/libsystemd/sd_journal_get_data.xml
diff --git a/man/sd_journal_get_fd.xml b/src/libsystemd/sd_journal_get_fd.xml
index 61293f7f99..61293f7f99 100644
--- a/man/sd_journal_get_fd.xml
+++ b/src/libsystemd/sd_journal_get_fd.xml
diff --git a/man/sd_journal_get_realtime_usec.xml b/src/libsystemd/sd_journal_get_realtime_usec.xml
index 607d74666b..607d74666b 100644
--- a/man/sd_journal_get_realtime_usec.xml
+++ b/src/libsystemd/sd_journal_get_realtime_usec.xml
diff --git a/man/sd_journal_get_usage.xml b/src/libsystemd/sd_journal_get_usage.xml
index 06b0ff534d..06b0ff534d 100644
--- a/man/sd_journal_get_usage.xml
+++ b/src/libsystemd/sd_journal_get_usage.xml
diff --git a/man/sd_journal_has_runtime_files.xml b/src/libsystemd/sd_journal_has_runtime_files.xml
index 3f6d56ca77..3f6d56ca77 100644
--- a/man/sd_journal_has_runtime_files.xml
+++ b/src/libsystemd/sd_journal_has_runtime_files.xml
diff --git a/man/sd_journal_next.xml b/src/libsystemd/sd_journal_next.xml
index 7c385de260..7c385de260 100644
--- a/man/sd_journal_next.xml
+++ b/src/libsystemd/sd_journal_next.xml
diff --git a/man/sd_journal_open.xml b/src/libsystemd/sd_journal_open.xml
index 25b3048f2e..25b3048f2e 100644
--- a/man/sd_journal_open.xml
+++ b/src/libsystemd/sd_journal_open.xml
diff --git a/man/sd_journal_print.xml b/src/libsystemd/sd_journal_print.xml
index 2d8dd635aa..2d8dd635aa 100644
--- a/man/sd_journal_print.xml
+++ b/src/libsystemd/sd_journal_print.xml
diff --git a/man/sd_journal_query_unique.xml b/src/libsystemd/sd_journal_query_unique.xml
index d7a41a039c..d7a41a039c 100644
--- a/man/sd_journal_query_unique.xml
+++ b/src/libsystemd/sd_journal_query_unique.xml
diff --git a/man/sd_journal_seek_head.xml b/src/libsystemd/sd_journal_seek_head.xml
index 985073496c..985073496c 100644
--- a/man/sd_journal_seek_head.xml
+++ b/src/libsystemd/sd_journal_seek_head.xml
diff --git a/man/sd_journal_stream_fd.xml b/src/libsystemd/sd_journal_stream_fd.xml
index db88eba1bc..db88eba1bc 100644
--- a/man/sd_journal_stream_fd.xml
+++ b/src/libsystemd/sd_journal_stream_fd.xml
diff --git a/man/sd_listen_fds.xml b/src/libsystemd/sd_listen_fds.xml
index 93bf8d853f..93bf8d853f 100644
--- a/man/sd_listen_fds.xml
+++ b/src/libsystemd/sd_listen_fds.xml
diff --git a/man/sd_login_monitor_new.xml b/src/libsystemd/sd_login_monitor_new.xml
index 5625ab9207..5625ab9207 100644
--- a/man/sd_login_monitor_new.xml
+++ b/src/libsystemd/sd_login_monitor_new.xml
diff --git a/man/sd_machine_get_class.xml b/src/libsystemd/sd_machine_get_class.xml
index ef604139da..ef604139da 100644
--- a/man/sd_machine_get_class.xml
+++ b/src/libsystemd/sd_machine_get_class.xml
diff --git a/man/sd_notify.xml b/src/libsystemd/sd_notify.xml
index 94542b80b8..94542b80b8 100644
--- a/man/sd_notify.xml
+++ b/src/libsystemd/sd_notify.xml
diff --git a/man/sd_pid_get_session.xml b/src/libsystemd/sd_pid_get_session.xml
index 806cff34e4..806cff34e4 100644
--- a/man/sd_pid_get_session.xml
+++ b/src/libsystemd/sd_pid_get_session.xml
diff --git a/man/sd_seat_get_active.xml b/src/libsystemd/sd_seat_get_active.xml
index c5e6ddab02..c5e6ddab02 100644
--- a/man/sd_seat_get_active.xml
+++ b/src/libsystemd/sd_seat_get_active.xml
diff --git a/man/sd_session_is_active.xml b/src/libsystemd/sd_session_is_active.xml
index a6076b177a..a6076b177a 100644
--- a/man/sd_session_is_active.xml
+++ b/src/libsystemd/sd_session_is_active.xml
diff --git a/man/sd_uid_get_state.xml b/src/libsystemd/sd_uid_get_state.xml
index 130af761da..130af761da 100644
--- a/man/sd_uid_get_state.xml
+++ b/src/libsystemd/sd_uid_get_state.xml
diff --git a/man/sd_watchdog_enabled.xml b/src/libsystemd/sd_watchdog_enabled.xml
index 3de9899453..3de9899453 100644
--- a/man/sd_watchdog_enabled.xml
+++ b/src/libsystemd/sd_watchdog_enabled.xml
diff --git a/src/libsystemd/src/GNUmakefile b/src/libsystemd/src/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libsystemd/src/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile
new file mode 100644
index 0000000000..a7c1b4789a
--- /dev/null
+++ b/src/libsystemd/src/Makefile
@@ -0,0 +1,203 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+libsystemd_internal_la_SOURCES = \
+ src/systemd/sd-bus.h \
+ src/systemd/sd-bus-protocol.h \
+ src/systemd/sd-bus-vtable.h \
+ src/systemd/sd-utf8.h \
+ src/systemd/sd-event.h \
+ src/systemd/sd-netlink.h \
+ src/systemd/sd-resolve.h \
+ src/systemd/sd-login.h \
+ src/systemd/sd-id128.h \
+ src/systemd/sd-daemon.h \
+ src/systemd/sd-path.h \
+ src/systemd/sd-network.h \
+ src/systemd/sd-hwdb.h \
+ src/systemd/sd-device.h \
+ src/libsystemd/libsystemd.sym \
+ src/libsystemd/sd-bus/sd-bus.c \
+ src/libsystemd/sd-bus/bus-control.c \
+ src/libsystemd/sd-bus/bus-control.h \
+ src/libsystemd/sd-bus/bus-error.c \
+ src/libsystemd/sd-bus/bus-error.h \
+ src/libsystemd/sd-bus/bus-common-errors.h \
+ src/libsystemd/sd-bus/bus-common-errors.c \
+ src/libsystemd/sd-bus/bus-internal.c \
+ src/libsystemd/sd-bus/bus-internal.h \
+ src/libsystemd/sd-bus/bus-socket.c \
+ src/libsystemd/sd-bus/bus-socket.h \
+ src/libsystemd/sd-bus/bus-kernel.c \
+ src/libsystemd/sd-bus/bus-kernel.h \
+ src/libsystemd/sd-bus/bus-container.c \
+ src/libsystemd/sd-bus/bus-container.h \
+ src/libsystemd/sd-bus/bus-message.c \
+ src/libsystemd/sd-bus/bus-message.h \
+ src/libsystemd/sd-bus/bus-creds.c \
+ src/libsystemd/sd-bus/bus-creds.h \
+ src/libsystemd/sd-bus/bus-signature.c \
+ src/libsystemd/sd-bus/bus-signature.h \
+ src/libsystemd/sd-bus/bus-type.c \
+ src/libsystemd/sd-bus/bus-type.h \
+ src/libsystemd/sd-bus/bus-match.c \
+ src/libsystemd/sd-bus/bus-match.h \
+ src/libsystemd/sd-bus/bus-bloom.c \
+ src/libsystemd/sd-bus/bus-bloom.h \
+ src/libsystemd/sd-bus/bus-introspect.c \
+ src/libsystemd/sd-bus/bus-introspect.h \
+ src/libsystemd/sd-bus/bus-objects.c \
+ src/libsystemd/sd-bus/bus-objects.h \
+ src/libsystemd/sd-bus/bus-gvariant.c \
+ src/libsystemd/sd-bus/bus-gvariant.h \
+ src/libsystemd/sd-bus/bus-convenience.c \
+ src/libsystemd/sd-bus/bus-track.c \
+ src/libsystemd/sd-bus/bus-track.h \
+ src/libsystemd/sd-bus/bus-slot.c \
+ src/libsystemd/sd-bus/bus-slot.h \
+ src/libsystemd/sd-bus/bus-protocol.h \
+ src/libsystemd/sd-bus/kdbus.h \
+ src/libsystemd/sd-bus/bus-dump.c \
+ src/libsystemd/sd-bus/bus-dump.h \
+ src/libsystemd/sd-utf8/sd-utf8.c \
+ src/libsystemd/sd-event/sd-event.c \
+ src/libsystemd/sd-netlink/sd-netlink.c \
+ src/libsystemd/sd-netlink/netlink-internal.h \
+ src/libsystemd/sd-netlink/netlink-message.c \
+ src/libsystemd/sd-netlink/netlink-socket.c \
+ src/libsystemd/sd-netlink/rtnl-message.c \
+ src/libsystemd/sd-netlink/netlink-types.h \
+ src/libsystemd/sd-netlink/netlink-types.c \
+ src/libsystemd/sd-netlink/netlink-util.h \
+ src/libsystemd/sd-netlink/netlink-util.c \
+ src/libsystemd/sd-netlink/local-addresses.h \
+ src/libsystemd/sd-netlink/local-addresses.c \
+ src/libsystemd/sd-id128/sd-id128.c \
+ src/libsystemd/sd-id128/id128-util.h \
+ src/libsystemd/sd-id128/id128-util.c \
+ src/libsystemd/sd-daemon/sd-daemon.c \
+ src/libsystemd/sd-login/sd-login.c \
+ src/libsystemd/sd-path/sd-path.c \
+ src/libsystemd/sd-network/sd-network.c \
+ src/libsystemd/sd-network/network-util.h \
+ src/libsystemd/sd-network/network-util.c \
+ src/libsystemd/sd-hwdb/sd-hwdb.c \
+ src/libsystemd/sd-hwdb/hwdb-util.h \
+ src/libsystemd/sd-hwdb/hwdb-internal.h \
+ src/libsystemd/sd-device/device-internal.h \
+ src/libsystemd/sd-device/device-util.h \
+ src/libsystemd/sd-device/device-enumerator.c \
+ src/libsystemd/sd-device/device-enumerator-private.h \
+ src/libsystemd/sd-device/sd-device.c \
+ src/libsystemd/sd-device/device-private.c \
+ src/libsystemd/sd-device/device-private.h \
+ src/libsystemd/sd-resolve/sd-resolve.c
+
+libsystemd_internal_la_LIBADD = \
+ -lresolv
+
+noinst_LTLIBRARIES += \
+ libsystemd-internal.la
+
+libsystemd_journal_internal_la_SOURCES = \
+ src/journal/sd-journal.c \
+ src/systemd/sd-journal.h \
+ src/systemd/_sd-common.h \
+ src/journal/journal-file.c \
+ src/journal/journal-file.h \
+ src/journal/journal-vacuum.c \
+ src/journal/journal-vacuum.h \
+ src/journal/journal-verify.c \
+ src/journal/journal-verify.h \
+ src/journal/lookup3.c \
+ src/journal/lookup3.h \
+ src/journal/journal-send.c \
+ src/journal/journal-def.h \
+ src/journal/compress.h \
+ src/journal/catalog.c \
+ src/journal/catalog.h \
+ src/journal/mmap-cache.c \
+ src/journal/mmap-cache.h \
+ src/journal/compress.c \
+ src/journal/audit-type.h \
+ src/journal/audit-type.c \
+ src/shared/gcrypt-util.h \
+ src/shared/gcrypt-util.c
+
+nodist_libsystemd_journal_internal_la_SOURCES = \
+ src/journal/audit_type-to-name.h
+
+gperf_txt_sources += \
+ src/journal/audit_type-list.txt
+
+# using _CFLAGS = in the conditional below would suppress AM_CFLAGS
+libsystemd_journal_internal_la_CFLAGS = \
+
+libsystemd_journal_internal_la_LIBADD =
+
+ifneq ($(HAVE_XZ),)
+libsystemd_journal_internal_la_CFLAGS += \
+ $(XZ_CFLAGS)
+
+libsystemd_journal_internal_la_LIBADD += \
+ $(XZ_LIBS)
+endif # HAVE_XZ
+
+ifneq ($(HAVE_LZ4),)
+libsystemd_journal_internal_la_CFLAGS += \
+ $(LZ4_CFLAGS)
+
+libsystemd_journal_internal_la_LIBADD += \
+ $(LZ4_LIBS)
+endif # HAVE_LZ4
+
+ifneq ($(HAVE_GCRYPT),)
+libsystemd_journal_internal_la_SOURCES += \
+ src/journal/journal-authenticate.c \
+ src/journal/journal-authenticate.h \
+ src/journal/fsprg.c \
+ src/journal/fsprg.h
+
+libsystemd_journal_internal_la_LIBADD += \
+ $(GCRYPT_LIBS)
+
+endif # HAVE_GCRYPT
+
+noinst_LTLIBRARIES += \
+ libsystemd-journal-internal.la
+
+nested.subdirs += sd-bus
+nested.subdirs += sd-daemon
+nested.subdirs += sd-device
+nested.subdirs += sd-event
+nested.subdirs += sd-hwdb
+nested.subdirs += sd-id128
+nested.subdirs += sd-journal
+nested.subdirs += sd-login
+nested.subdirs += sd-netlink
+nested.subdirs += sd-network
+nested.subdirs += sd-resolve
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/sd-bus/DIFFERENCES b/src/libsystemd/src/sd-bus/DIFFERENCES
index db269675a7..db269675a7 100644
--- a/src/libsystemd/sd-bus/DIFFERENCES
+++ b/src/libsystemd/src/sd-bus/DIFFERENCES
diff --git a/src/libsystemd/src/sd-bus/GNUmakefile b/src/libsystemd/src/sd-bus/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/libsystemd/src/sd-bus/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd/sd-bus/GVARIANT-SERIALIZATION b/src/libsystemd/src/sd-bus/GVARIANT-SERIALIZATION
index 6aeb11364a..6aeb11364a 100644
--- a/src/libsystemd/sd-bus/GVARIANT-SERIALIZATION
+++ b/src/libsystemd/src/sd-bus/GVARIANT-SERIALIZATION
diff --git a/src/libsystemd/src/sd-bus/Makefile b/src/libsystemd/src/sd-bus/Makefile
new file mode 100644
index 0000000000..60150788d8
--- /dev/null
+++ b/src/libsystemd/src/sd-bus/Makefile
@@ -0,0 +1,26 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/sd-bus/PORTING-DBUS1 b/src/libsystemd/src/sd-bus/PORTING-DBUS1
index 2dedb28bcf..2dedb28bcf 100644
--- a/src/libsystemd/sd-bus/PORTING-DBUS1
+++ b/src/libsystemd/src/sd-bus/PORTING-DBUS1
diff --git a/src/libsystemd/sd-bus/bus-bloom.c b/src/libsystemd/src/sd-bus/bus-bloom.c
index 112769fcb6..7441c1a7aa 100644
--- a/src/libsystemd/sd-bus/bus-bloom.c
+++ b/src/libsystemd/src/sd-bus/bus-bloom.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/util.h"
+
#include "bus-bloom.h"
-#include "siphash24.h"
-#include "util.h"
static inline void set_bit(uint64_t filter[], unsigned long b) {
filter[b >> 6] |= 1ULL << (b & 63);
diff --git a/src/libsystemd/sd-bus/bus-bloom.h b/src/libsystemd/src/sd-bus/bus-bloom.h
index c824622b95..c824622b95 100644
--- a/src/libsystemd/sd-bus/bus-bloom.h
+++ b/src/libsystemd/src/sd-bus/bus-bloom.h
diff --git a/src/libsystemd/sd-bus/bus-common-errors.c b/src/libsystemd/src/sd-bus/bus-common-errors.c
index d2a826bf6e..be589f8582 100644
--- a/src/libsystemd/sd-bus/bus-common-errors.c
+++ b/src/libsystemd/src/sd-bus/bus-common-errors.c
@@ -19,7 +19,7 @@
#include <errno.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
#include "bus-common-errors.h"
#include "bus-error.h"
diff --git a/src/libsystemd/sd-bus/bus-common-errors.h b/src/libsystemd/src/sd-bus/bus-common-errors.h
index 525b79fa77..525b79fa77 100644
--- a/src/libsystemd/sd-bus/bus-common-errors.h
+++ b/src/libsystemd/src/sd-bus/bus-common-errors.h
diff --git a/src/libsystemd/sd-bus/bus-container.c b/src/libsystemd/src/sd-bus/bus-container.c
index 3191d27ded..2f91ffc8dd 100644
--- a/src/libsystemd/sd-bus/bus-container.c
+++ b/src/libsystemd/src/sd-bus/bus-container.c
@@ -20,12 +20,13 @@
#include <fcntl.h>
#include <unistd.h>
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/util.h"
+
#include "bus-container.h"
#include "bus-internal.h"
#include "bus-socket.h"
-#include "fd-util.h"
-#include "process-util.h"
-#include "util.h"
int bus_container_connect_socket(sd_bus *b) {
_cleanup_close_pair_ int pair[2] = { -1, -1 };
diff --git a/src/libsystemd/sd-bus/bus-container.h b/src/libsystemd/src/sd-bus/bus-container.h
index 509ef45624..5cd6d15ede 100644
--- a/src/libsystemd/sd-bus/bus-container.h
+++ b/src/libsystemd/src/sd-bus/bus-container.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
int bus_container_connect_socket(sd_bus *b);
int bus_container_connect_kernel(sd_bus *b);
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/src/sd-bus/bus-control.c
index 52128e7b5c..606cdc44ba 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/src/sd-bus/bus-control.c
@@ -24,19 +24,20 @@
#include <errno.h>
#include <stddef.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
-#include "alloc-util.h"
#include "bus-bloom.h"
#include "bus-control.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "capability-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
_public_ int sd_bus_get_unique_name(sd_bus *bus, const char **unique) {
int r;
diff --git a/src/libsystemd/sd-bus/bus-control.h b/src/libsystemd/src/sd-bus/bus-control.h
index c181aa7959..229c95efb0 100644
--- a/src/libsystemd/sd-bus/bus-control.h
+++ b/src/libsystemd/src/sd-bus/bus-control.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
#include "bus-match.h"
diff --git a/src/libsystemd/sd-bus/bus-convenience.c b/src/libsystemd/src/sd-bus/bus-convenience.c
index 2d06bf541f..e6a92679cf 100644
--- a/src/libsystemd/sd-bus/bus-convenience.c
+++ b/src/libsystemd/src/sd-bus/bus-convenience.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/string-util.h"
+
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-signature.h"
#include "bus-type.h"
#include "bus-util.h"
-#include "string-util.h"
_public_ int sd_bus_emit_signal(
sd_bus *bus,
diff --git a/src/libsystemd/sd-bus/bus-creds.c b/src/libsystemd/src/sd-bus/bus-creds.c
index c4f693dee9..3b4ebe9ee0 100644
--- a/src/libsystemd/sd-bus/bus-creds.c
+++ b/src/libsystemd/src/sd-bus/bus-creds.c
@@ -17,28 +17,30 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/capability.h>
#include <stdlib.h>
-#include "alloc-util.h"
-#include "audit-util.h"
+#include <linux/capability.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "bus-creds.h"
-#include "bus-label.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "capability-util.h"
-#include "cgroup-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "hexdecoct.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "user-util.h"
-#include "util.h"
enum {
CAP_OFFSET_INHERITABLE = 0,
diff --git a/src/libsystemd/sd-bus/bus-creds.h b/src/libsystemd/src/sd-bus/bus-creds.h
index df8a1f1005..3e2311f91d 100644
--- a/src/libsystemd/sd-bus/bus-creds.h
+++ b/src/libsystemd/src/sd-bus/bus-creds.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
struct sd_bus_creds {
bool allocated;
diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/src/sd-bus/bus-dump.c
index 21a6b20a11..447aa5d9d7 100644
--- a/src/libsystemd/sd-bus/bus-dump.c
+++ b/src/libsystemd/src/sd-bus/bus-dump.c
@@ -17,21 +17,22 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+
#include "bus-dump.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-type.h"
-#include "cap-list.h"
-#include "capability-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "locale-util.h"
-#include "macro.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "util.h"
static char *indent(unsigned level, unsigned flags) {
char *p;
diff --git a/src/libsystemd/sd-bus/bus-dump.h b/src/libsystemd/src/sd-bus/bus-dump.h
index 874e86d09c..68fa043786 100644
--- a/src/libsystemd/sd-bus/bus-dump.h
+++ b/src/libsystemd/src/sd-bus/bus-dump.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <stdio.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
enum {
BUS_MESSAGE_DUMP_WITH_HEADER = 1,
diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/src/sd-bus/bus-error.c
index 378f7a377a..f07560c4e5 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/src/sd-bus/bus-error.c
@@ -24,13 +24,14 @@
#include <stdlib.h>
#include <string.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/errno-list.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-error.h"
-#include "errno-list.h"
-#include "string-util.h"
-#include "util.h"
BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.Failed", EACCES),
diff --git a/src/libsystemd/sd-bus/bus-error.h b/src/libsystemd/src/sd-bus/bus-error.h
index e2c4cf4b3f..308cf92f24 100644
--- a/src/libsystemd/sd-bus/bus-error.h
+++ b/src/libsystemd/src/sd-bus/bus-error.h
@@ -21,9 +21,9 @@
#include <stdbool.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
bool bus_error_is_dirty(sd_bus_error *e);
diff --git a/src/libsystemd/sd-bus/bus-gvariant.c b/src/libsystemd/src/sd-bus/bus-gvariant.c
index 58782767fa..58782767fa 100644
--- a/src/libsystemd/sd-bus/bus-gvariant.c
+++ b/src/libsystemd/src/sd-bus/bus-gvariant.c
diff --git a/src/libsystemd/sd-bus/bus-gvariant.h b/src/libsystemd/src/sd-bus/bus-gvariant.h
index 6da637fb05..45afe01631 100644
--- a/src/libsystemd/sd-bus/bus-gvariant.h
+++ b/src/libsystemd/src/sd-bus/bus-gvariant.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
int bus_gvariant_get_size(const char *signature) _pure_;
int bus_gvariant_get_alignment(const char *signature) _pure_;
diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/src/sd-bus/bus-internal.c
index caca679086..bd63e453e4 100644
--- a/src/libsystemd/sd-bus/bus-internal.c
+++ b/src/libsystemd/src/sd-bus/bus-internal.c
@@ -17,11 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/string-util.h"
+
#include "bus-internal.h"
#include "bus-message.h"
-#include "hexdecoct.h"
-#include "string-util.h"
bool object_path_is_valid(const char *p) {
const char *q;
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/src/sd-bus/bus-internal.h
index bb0414c4d6..4b313fd24d 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/src/sd-bus/bus-internal.h
@@ -22,18 +22,19 @@
#include <pthread.h>
#include <sys/socket.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/prioq.h"
+#include "systemd-basic/refcnt.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/util.h"
#include "bus-error.h"
#include "bus-kernel.h"
#include "bus-match.h"
-#include "hashmap.h"
#include "kdbus.h"
-#include "list.h"
-#include "prioq.h"
-#include "refcnt.h"
-#include "socket-util.h"
-#include "util.h"
struct reply_callback {
sd_bus_message_handler_t callback;
diff --git a/src/libsystemd/sd-bus/bus-introspect.c b/src/libsystemd/src/sd-bus/bus-introspect.c
index 8f93edb8da..85400c865f 100644
--- a/src/libsystemd/sd-bus/bus-introspect.c
+++ b/src/libsystemd/src/sd-bus/bus-introspect.c
@@ -17,14 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+
#include "bus-internal.h"
#include "bus-introspect.h"
#include "bus-protocol.h"
#include "bus-signature.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "string-util.h"
-#include "util.h"
int introspect_begin(struct introspect *i, bool trusted) {
assert(i);
diff --git a/src/libsystemd/sd-bus/bus-introspect.h b/src/libsystemd/src/sd-bus/bus-introspect.h
index 8e2f3800ca..4a83e2aa38 100644
--- a/src/libsystemd/sd-bus/bus-introspect.h
+++ b/src/libsystemd/src/sd-bus/bus-introspect.h
@@ -21,9 +21,9 @@
#include <stdio.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "set.h"
+#include "systemd-basic/set.h"
struct introspect {
FILE *f;
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/src/sd-bus/bus-kernel.c
index 59398b841d..3321a54a51 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/src/sd-bus/bus-kernel.c
@@ -32,24 +32,25 @@
#include <libgen.h>
#undef basename
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/memfd-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "bus-bloom.h"
#include "bus-internal.h"
#include "bus-kernel.h"
-#include "bus-label.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "capability-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "memfd-util.h"
-#include "parse-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
#define UNIQUE_NAME_MAX (3+DECIMAL_STR_MAX(uint64_t))
diff --git a/src/libsystemd/sd-bus/bus-kernel.h b/src/libsystemd/src/sd-bus/bus-kernel.h
index 53ba3bdcf3..2927ba26a5 100644
--- a/src/libsystemd/sd-bus/bus-kernel.h
+++ b/src/libsystemd/src/sd-bus/bus-kernel.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
#define KDBUS_ITEM_NEXT(item) \
(typeof(item))(((uint8_t *)item) + ALIGN8((item)->size))
diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/src/sd-bus/bus-match.c
index db01f21135..37a391b46a 100644
--- a/src/libsystemd/sd-bus/bus-match.c
+++ b/src/libsystemd/src/sd-bus/bus-match.c
@@ -17,16 +17,17 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+
#include "bus-internal.h"
#include "bus-match.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hexdecoct.h"
-#include "string-util.h"
-#include "strv.h"
/* Example:
*
diff --git a/src/libsystemd/sd-bus/bus-match.h b/src/libsystemd/src/sd-bus/bus-match.h
index 8cbbb63b11..54b40d5be8 100644
--- a/src/libsystemd/sd-bus/bus-match.h
+++ b/src/libsystemd/src/sd-bus/bus-match.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "hashmap.h"
+#include "systemd-basic/hashmap.h"
enum bus_match_node_type {
BUS_MATCH_ROOT,
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/src/sd-bus/bus-message.c
index 5cec804e32..181f6bccb2 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/src/sd-bus/bus-message.c
@@ -21,23 +21,24 @@
#include <fcntl.h>
#include <sys/mman.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/memfd-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-gvariant.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-signature.h"
#include "bus-type.h"
#include "bus-util.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "memfd-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
-#include "utf8.h"
-#include "util.h"
static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
diff --git a/src/libsystemd/sd-bus/bus-message.h b/src/libsystemd/src/sd-bus/bus-message.h
index 4710c106b9..93bbb9b00d 100644
--- a/src/libsystemd/sd-bus/bus-message.h
+++ b/src/libsystemd/src/sd-bus/bus-message.h
@@ -23,12 +23,13 @@
#include <stdbool.h>
#include <sys/socket.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/macro.h"
+#include "systemd-basic/time-util.h"
#include "bus-creds.h"
#include "bus-protocol.h"
-#include "macro.h"
-#include "time-util.h"
struct bus_container {
char enclosing;
diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/src/sd-bus/bus-objects.c
index 9bd07ffcab..a732a0a928 100644
--- a/src/libsystemd/sd-bus/bus-objects.c
+++ b/src/libsystemd/src/sd-bus/bus-objects.c
@@ -17,7 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+
#include "bus-internal.h"
#include "bus-introspect.h"
#include "bus-message.h"
@@ -26,9 +30,6 @@
#include "bus-slot.h"
#include "bus-type.h"
#include "bus-util.h"
-#include "set.h"
-#include "string-util.h"
-#include "strv.h"
static int node_vtable_get_userdata(
sd_bus *bus,
diff --git a/src/libsystemd/sd-bus/bus-objects.h b/src/libsystemd/src/sd-bus/bus-objects.h
index e0b8c534ed..e0b8c534ed 100644
--- a/src/libsystemd/sd-bus/bus-objects.h
+++ b/src/libsystemd/src/sd-bus/bus-objects.h
diff --git a/src/libsystemd/sd-bus/bus-protocol.h b/src/libsystemd/src/sd-bus/bus-protocol.h
index 9d180cb284..732b512d3f 100644
--- a/src/libsystemd/sd-bus/bus-protocol.h
+++ b/src/libsystemd/src/sd-bus/bus-protocol.h
@@ -21,7 +21,7 @@
#include <endian.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
/* Packet header */
diff --git a/src/libsystemd/sd-bus/bus-signature.c b/src/libsystemd/src/sd-bus/bus-signature.c
index 7bc243494a..4e7cf02ec1 100644
--- a/src/libsystemd/sd-bus/bus-signature.c
+++ b/src/libsystemd/src/sd-bus/bus-signature.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <util.h>
+#include "systemd-basic/util.h"
#include "bus-signature.h"
#include "bus-type.h"
diff --git a/src/libsystemd/sd-bus/bus-signature.h b/src/libsystemd/src/sd-bus/bus-signature.h
index 1e0cd7f587..1e0cd7f587 100644
--- a/src/libsystemd/sd-bus/bus-signature.h
+++ b/src/libsystemd/src/sd-bus/bus-signature.h
diff --git a/src/libsystemd/sd-bus/bus-slot.c b/src/libsystemd/src/sd-bus/bus-slot.c
index 33590c31ac..c9c7a1c96e 100644
--- a/src/libsystemd/sd-bus/bus-slot.c
+++ b/src/libsystemd/src/sd-bus/bus-slot.c
@@ -17,13 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
-#include "alloc-util.h"
#include "bus-control.h"
#include "bus-objects.h"
#include "bus-slot.h"
-#include "string-util.h"
sd_bus_slot *bus_slot_allocate(
sd_bus *bus,
diff --git a/src/libsystemd/sd-bus/bus-slot.h b/src/libsystemd/src/sd-bus/bus-slot.h
index 3b8b94dc6b..b862799d1c 100644
--- a/src/libsystemd/sd-bus/bus-slot.h
+++ b/src/libsystemd/src/sd-bus/bus-slot.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
#include "bus-internal.h"
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/src/sd-bus/bus-socket.c
index cfd7753139..9beb7dffb3 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/src/sd-bus/bus-socket.c
@@ -22,25 +22,26 @@
#include <stdlib.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-daemon.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-socket.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "hexdecoct.h"
-#include "macro.h"
-#include "missing.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "utf8.h"
-#include "util.h"
#define SNDBUF_SIZE (8*1024*1024)
diff --git a/src/libsystemd/sd-bus/bus-socket.h b/src/libsystemd/src/sd-bus/bus-socket.h
index 684feead74..6e1d32e6a7 100644
--- a/src/libsystemd/sd-bus/bus-socket.h
+++ b/src/libsystemd/src/sd-bus/bus-socket.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
void bus_socket_setup(sd_bus *b);
diff --git a/src/libsystemd/sd-bus/bus-track.c b/src/libsystemd/src/sd-bus/bus-track.c
index 4acaf24793..73cecfe543 100644
--- a/src/libsystemd/sd-bus/bus-track.c
+++ b/src/libsystemd/src/sd-bus/bus-track.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
-#include "alloc-util.h"
#include "bus-internal.h"
#include "bus-track.h"
#include "bus-util.h"
diff --git a/src/libsystemd/sd-bus/bus-track.h b/src/libsystemd/src/sd-bus/bus-track.h
index 26bd05f5c7..26bd05f5c7 100644
--- a/src/libsystemd/sd-bus/bus-track.h
+++ b/src/libsystemd/src/sd-bus/bus-track.h
diff --git a/src/libsystemd/sd-bus/bus-type.c b/src/libsystemd/src/sd-bus/bus-type.c
index c692afc580..c692afc580 100644
--- a/src/libsystemd/sd-bus/bus-type.c
+++ b/src/libsystemd/src/sd-bus/bus-type.c
diff --git a/src/libsystemd/sd-bus/bus-type.h b/src/libsystemd/src/sd-bus/bus-type.h
index 5c87eb5f08..a9cfa6ef36 100644
--- a/src/libsystemd/sd-bus/bus-type.h
+++ b/src/libsystemd/src/sd-bus/bus-type.h
@@ -21,9 +21,9 @@
#include <stdbool.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
bool bus_type_is_valid(char c) _const_;
bool bus_type_is_valid_in_signature(char c) _const_;
diff --git a/src/shared/bus-util.c b/src/libsystemd/src/sd-bus/bus-util.c
index bb90c89cc2..af44c0f9a4 100644
--- a/src/shared/bus-util.c
+++ b/src/libsystemd/src/sd-bus/bus-util.c
@@ -28,27 +28,28 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "sd-bus-protocol.h"
-#include "sd-bus.h"
-#include "sd-daemon.h"
-#include "sd-event.h"
-#include "sd-id128.h"
+#include <systemd/sd-bus-protocol.h>
+#include <systemd/sd-bus.h>
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
-#include "alloc-util.h"
#include "bus-internal.h"
-#include "bus-label.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "def.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "rlimit-util.h"
-#include "stdio-util.h"
-#include "strv.h"
-#include "user-util.h"
static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
sd_event *e = userdata;
diff --git a/src/shared/bus-util.h b/src/libsystemd/src/sd-bus/bus-util.h
index 934e0b5b77..01dba4807d 100644
--- a/src/shared/bus-util.h
+++ b/src/libsystemd/src/sd-bus/bus-util.h
@@ -24,12 +24,12 @@
#include <stdint.h>
#include <sys/types.h>
-#include "sd-bus.h"
-#include "sd-event.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
-#include "hashmap.h"
-#include "macro.h"
-#include "string-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
typedef enum BusTransport {
BUS_TRANSPORT_LOCAL,
diff --git a/src/libsystemd/sd-bus/kdbus.h b/src/libsystemd/src/sd-bus/kdbus.h
index ecffc6b13c..ecffc6b13c 100644
--- a/src/libsystemd/sd-bus/kdbus.h
+++ b/src/libsystemd/src/sd-bus/kdbus.h
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/src/sd-bus/sd-bus.c
index d746348544..e9b2bac003 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/src/sd-bus/sd-bus.c
@@ -25,14 +25,26 @@
#include <sys/mman.h>
#include <unistd.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-container.h"
#include "bus-control.h"
#include "bus-internal.h"
#include "bus-kernel.h"
-#include "bus-label.h"
#include "bus-message.h"
#include "bus-objects.h"
#include "bus-protocol.h"
@@ -41,17 +53,6 @@
#include "bus-track.h"
#include "bus-type.h"
#include "bus-util.h"
-#include "cgroup-util.h"
-#include "def.h"
-#include "fd-util.h"
-#include "hexdecoct.h"
-#include "hostname-util.h"
-#include "macro.h"
-#include "missing.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
#define log_debug_bus_message(m) \
do { \
diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/src/sd-bus/test-bus-benchmark.c
index 56ac2ab3dd..4561e830c7 100644
--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
+++ b/src/libsystemd/src/sd-bus/test-bus-benchmark.c
@@ -19,16 +19,17 @@
#include <sys/wait.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-internal.h"
#include "bus-kernel.h"
#include "bus-util.h"
-#include "def.h"
-#include "fd-util.h"
-#include "time-util.h"
-#include "util.h"
#define MAX_SIZE (2*1024*1024)
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/src/sd-bus/test-bus-chat.c
index fc60830059..2e394c56e2 100644
--- a/src/libsystemd/sd-bus/test-bus-chat.c
+++ b/src/libsystemd/src/sd-bus/test-bus-chat.c
@@ -22,18 +22,19 @@
#include <stdlib.h>
#include <unistd.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-error.h"
#include "bus-internal.h"
#include "bus-match.h"
#include "bus-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "log.h"
-#include "macro.h"
-#include "util.h"
static int match_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
log_info("Match triggered! interface=%s member=%s", strna(sd_bus_message_get_interface(m)), strna(sd_bus_message_get_member(m)));
diff --git a/src/libsystemd/sd-bus/test-bus-cleanup.c b/src/libsystemd/src/sd-bus/test-bus-cleanup.c
index 250a5b2908..1a461032cc 100644
--- a/src/libsystemd/sd-bus/test-bus-cleanup.c
+++ b/src/libsystemd/src/sd-bus/test-bus-cleanup.c
@@ -19,12 +19,13 @@
#include <stdio.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/refcnt.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "refcnt.h"
static void test_bus_new(void) {
_cleanup_(sd_bus_unrefp) sd_bus *bus = NULL;
diff --git a/src/libsystemd/sd-bus/test-bus-creds.c b/src/libsystemd/src/sd-bus/test-bus-creds.c
index 6fdcfa4128..ae4f4804d4 100644
--- a/src/libsystemd/sd-bus/test-bus-creds.c
+++ b/src/libsystemd/src/sd-bus/test-bus-creds.c
@@ -17,11 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/cgroup-util.h"
#include "bus-dump.h"
#include "bus-util.h"
-#include "cgroup-util.h"
int main(int argc, char *argv[]) {
_cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL;
diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/src/sd-bus/test-bus-error.c
index 66a3874f10..dbc120b4df 100644
--- a/src/libsystemd/sd-bus/test-bus-error.c
+++ b/src/libsystemd/src/sd-bus/test-bus-error.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/errno-list.h"
#include "bus-common-errors.h"
#include "bus-error.h"
#include "bus-util.h"
-#include "errno-list.h"
static void test_error(void) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL, second = SD_BUS_ERROR_NULL;
diff --git a/src/libsystemd/sd-bus/test-bus-gvariant.c b/src/libsystemd/src/sd-bus/test-bus-gvariant.c
index 83f114a0fe..ca396bd426 100644
--- a/src/libsystemd/sd-bus/test-bus-gvariant.c
+++ b/src/libsystemd/src/sd-bus/test-bus-gvariant.c
@@ -21,16 +21,17 @@
#include <glib.h>
#endif
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-dump.h"
#include "bus-gvariant.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "macro.h"
-#include "util.h"
static void test_bus_gvariant_is_fixed_size(void) {
assert_se(bus_gvariant_is_fixed_size("") > 0);
diff --git a/src/libsystemd/sd-bus/test-bus-introspect.c b/src/libsystemd/src/sd-bus/test-bus-introspect.c
index 4425cfae26..76a33fee67 100644
--- a/src/libsystemd/sd-bus/test-bus-introspect.c
+++ b/src/libsystemd/src/sd-bus/test-bus-introspect.c
@@ -17,8 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/log.h"
+
#include "bus-introspect.h"
-#include "log.h"
static int prop_get(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) {
return -EINVAL;
diff --git a/src/libsystemd/sd-bus/test-bus-kernel-bloom.c b/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c
index eb6179d7d2..ace45d770d 100644
--- a/src/libsystemd/sd-bus/test-bus-kernel-bloom.c
+++ b/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c
@@ -17,14 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-kernel.h"
#include "bus-util.h"
-#include "fd-util.h"
-#include "log.h"
-#include "util.h"
static int test_match(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
int *found = userdata;
diff --git a/src/libsystemd/sd-bus/test-bus-kernel.c b/src/libsystemd/src/sd-bus/test-bus-kernel.c
index 2214817312..040bfe0dcf 100644
--- a/src/libsystemd/sd-bus/test-bus-kernel.c
+++ b/src/libsystemd/src/sd-bus/test-bus-kernel.c
@@ -19,15 +19,16 @@
#include <fcntl.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-dump.h"
#include "bus-kernel.h"
#include "bus-util.h"
-#include "fd-util.h"
-#include "log.h"
-#include "util.h"
int main(int argc, char *argv[]) {
_cleanup_close_ int bus_ref = -1;
diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/src/sd-bus/test-bus-marshal.c
index a28cc5b79e..9c66ba4538 100644
--- a/src/libsystemd/sd-bus/test-bus-marshal.c
+++ b/src/libsystemd/src/sd-bus/test-bus-marshal.c
@@ -28,17 +28,18 @@
#include <dbus/dbus.h>
#endif
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/bus-label.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-dump.h"
-#include "bus-label.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "fd-util.h"
-#include "hexdecoct.h"
-#include "log.h"
-#include "util.h"
static void test_bus_path_encode_unique(void) {
_cleanup_free_ char *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL;
diff --git a/src/libsystemd/sd-bus/test-bus-match.c b/src/libsystemd/src/sd-bus/test-bus-match.c
index 29c4529f95..bedc4d41bd 100644
--- a/src/libsystemd/sd-bus/test-bus-match.c
+++ b/src/libsystemd/src/sd-bus/test-bus-match.c
@@ -17,12 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+
#include "bus-match.h"
#include "bus-message.h"
#include "bus-slot.h"
#include "bus-util.h"
-#include "log.h"
-#include "macro.h"
static bool mask[32];
diff --git a/src/libsystemd/sd-bus/test-bus-objects.c b/src/libsystemd/src/sd-bus/test-bus-objects.c
index f11cafd888..379c6f85ee 100644
--- a/src/libsystemd/sd-bus/test-bus-objects.c
+++ b/src/libsystemd/src/sd-bus/test-bus-objects.c
@@ -20,17 +20,18 @@
#include <pthread.h>
#include <stdlib.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-dump.h"
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "log.h"
-#include "macro.h"
-#include "strv.h"
-#include "util.h"
struct context {
int fds[2];
diff --git a/src/libsystemd/sd-bus/test-bus-server.c b/src/libsystemd/src/sd-bus/test-bus-server.c
index b6272efc30..ce78faaefb 100644
--- a/src/libsystemd/sd-bus/test-bus-server.c
+++ b/src/libsystemd/src/sd-bus/test-bus-server.c
@@ -20,13 +20,14 @@
#include <pthread.h>
#include <stdlib.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
#include "bus-internal.h"
#include "bus-util.h"
-#include "log.h"
-#include "macro.h"
-#include "util.h"
struct context {
int fds[2];
diff --git a/src/libsystemd/sd-bus/test-bus-signature.c b/src/libsystemd/src/sd-bus/test-bus-signature.c
index 4f4fd093bf..ae50f50f08 100644
--- a/src/libsystemd/sd-bus/test-bus-signature.c
+++ b/src/libsystemd/src/sd-bus/test-bus-signature.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+
#include "bus-internal.h"
#include "bus-signature.h"
-#include "log.h"
-#include "string-util.h"
int main(int argc, char *argv[]) {
char prefix[256];
diff --git a/src/libsystemd/sd-bus/test-bus-track.c b/src/libsystemd/src/sd-bus/test-bus-track.c
index 4beb61f05a..ad87e7f8e0 100644
--- a/src/libsystemd/sd-bus/test-bus-track.c
+++ b/src/libsystemd/src/sd-bus/test-bus-track.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sd-bus.h>
+#include <systemd/sd-bus.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
static bool track_cb_called_x = false;
static bool track_cb_called_y = false;
diff --git a/src/libsystemd/sd-bus/test-bus-zero-copy.c b/src/libsystemd/src/sd-bus/test-bus-zero-copy.c
index 3380e8500a..32ff9c0364 100644
--- a/src/libsystemd/sd-bus/test-bus-zero-copy.c
+++ b/src/libsystemd/src/sd-bus/test-bus-zero-copy.c
@@ -19,17 +19,18 @@
#include <sys/mman.h>
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/memfd-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "bus-dump.h"
#include "bus-kernel.h"
#include "bus-message.h"
-#include "fd-util.h"
-#include "log.h"
-#include "memfd-util.h"
-#include "string-util.h"
-#include "util.h"
#define FIRST_ARRAY 17
#define SECOND_ARRAY 33
diff --git a/src/libsystemd/src/sd-daemon/Makefile b/src/libsystemd/src/sd-daemon/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-daemon/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/src/sd-daemon/sd-daemon.c
index b20a7ebb4c..1424d60a78 100644
--- a/src/libsystemd/sd-daemon/sd-daemon.c
+++ b/src/libsystemd/src/sd-daemon/sd-daemon.c
@@ -31,16 +31,16 @@
#include <sys/un.h>
#include <unistd.h>
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "socket-util.h"
-#include "strv.h"
-#include "util.h"
+#include <systemd/sd-daemon.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
#define SNDBUF_SIZE (8*1024*1024)
diff --git a/src/libsystemd/src/sd-device/Makefile b/src/libsystemd/src/sd-device/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-device/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-device/device-enumerator-private.h b/src/libsystemd/src/sd-device/device-enumerator-private.h
index eb06f9542d..7bf39d188a 100644
--- a/src/libsystemd/sd-device/device-enumerator-private.h
+++ b/src/libsystemd/src/sd-device/device-enumerator-private.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-device.h"
+#include "systemd-staging/sd-device.h"
int device_enumerator_scan_devices(sd_device_enumerator *enumeartor);
int device_enumerator_scan_subsystems(sd_device_enumerator *enumeartor);
diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/src/sd-device/device-enumerator.c
index 62d03ae00d..b4577a5a39 100644
--- a/src/libsystemd/sd-device/device-enumerator.c
+++ b/src/libsystemd/src/sd-device/device-enumerator.c
@@ -18,18 +18,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-device.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/prioq.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-device.h"
-#include "alloc-util.h"
#include "device-enumerator-private.h"
#include "device-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "prioq.h"
-#include "set.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
#define DEVICE_ENUMERATE_MAX_DEPTH 256
diff --git a/src/libsystemd/sd-device/device-internal.h b/src/libsystemd/src/sd-device/device-internal.h
index 9fad388953..c2539feb89 100644
--- a/src/libsystemd/sd-device/device-internal.h
+++ b/src/libsystemd/src/sd-device/device-internal.h
@@ -20,8 +20,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hashmap.h"
-#include "set.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/set.h"
struct sd_device {
uint64_t n_ref;
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/src/sd-device/device-private.c
index 9082d377f4..03c04b5eae 100644
--- a/src/libsystemd/sd-device/device-private.c
+++ b/src/libsystemd/src/sd-device/device-private.c
@@ -22,28 +22,28 @@
#include <net/if.h>
#include <sys/types.h>
-#include "sd-device.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/refcnt.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-device.h"
-#include "alloc-util.h"
#include "device-internal.h"
#include "device-private.h"
#include "device-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "refcnt.h"
-#include "set.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "strxcpyx.h"
-#include "user-util.h"
-#include "util.h"
int device_add_property(sd_device *device, const char *key, const char *value) {
int r;
diff --git a/src/libsystemd/sd-device/device-private.h b/src/libsystemd/src/sd-device/device-private.h
index 29b3e155fb..504507e3cb 100644
--- a/src/libsystemd/sd-device/device-private.h
+++ b/src/libsystemd/src/sd-device/device-private.h
@@ -23,7 +23,7 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "sd-device.h"
+#include "systemd-staging/sd-device.h"
int device_new_from_nulstr(sd_device **ret, uint8_t *nulstr, size_t len);
int device_new_from_strv(sd_device **ret, char **strv);
diff --git a/src/libsystemd/sd-device/device-util.h b/src/libsystemd/src/sd-device/device-util.h
index 5b42e11de6..40bfa62de1 100644
--- a/src/libsystemd/sd-device/device-util.h
+++ b/src/libsystemd/src/sd-device/device-util.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "util.h"
+#include "systemd-basic/util.h"
#define FOREACH_DEVICE_PROPERTY(device, key, value) \
for (key = sd_device_get_property_first(device, &(value)); \
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/src/sd-device/sd-device.c
index 411453e08d..ba654eac14 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/src/sd-device/sd-device.c
@@ -22,26 +22,26 @@
#include <net/if.h>
#include <sys/types.h>
-#include "sd-device.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-device.h"
-#include "alloc-util.h"
#include "device-internal.h"
#include "device-private.h"
#include "device-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "set.h"
-#include "socket-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "strxcpyx.h"
-#include "util.h"
int device_new_aux(sd_device **ret) {
_cleanup_(sd_device_unrefp) sd_device *device = NULL;
diff --git a/src/libsystemd/src/sd-event/Makefile b/src/libsystemd/src/sd-event/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-event/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/src/sd-event/sd-event.c
index 9857f8b1fc..3dcf70999c 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/src/sd-event/sd-event.c
@@ -21,24 +21,24 @@
#include <sys/timerfd.h>
#include <sys/wait.h>
-#include "sd-daemon.h"
-#include "sd-event.h"
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "hashmap.h"
-#include "list.h"
-#include "macro.h"
-#include "missing.h"
-#include "prioq.h"
-#include "process-util.h"
-#include "set.h"
-#include "signal-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "time-util.h"
-#include "util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/prioq.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
#define DEFAULT_ACCURACY_USEC (250 * USEC_PER_MSEC)
diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/src/sd-event/test-event.c
index 289114490c..7c1289423f 100644
--- a/src/libsystemd/sd-event/test-event.c
+++ b/src/libsystemd/src/sd-event/test-event.c
@@ -17,13 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
+#include <systemd/sd-event.h>
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "signal-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/util.h"
static int prepare_handler(sd_event_source *s, void *userdata) {
log_info("preparing %c", PTR_TO_INT(userdata));
diff --git a/src/libsystemd/src/sd-hwdb/GNUmakefile b/src/libsystemd/src/sd-hwdb/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/libsystemd/src/sd-hwdb/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd/src/sd-hwdb/Makefile b/src/libsystemd/src/sd-hwdb/Makefile
new file mode 100644
index 0000000000..60150788d8
--- /dev/null
+++ b/src/libsystemd/src/sd-hwdb/Makefile
@@ -0,0 +1,26 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/sd-hwdb/hwdb-internal.h b/src/libsystemd/src/sd-hwdb/hwdb-internal.h
index 4fff94ec76..78f430e869 100644
--- a/src/libsystemd/sd-hwdb/hwdb-internal.h
+++ b/src/libsystemd/src/sd-hwdb/hwdb-internal.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sparse-endian.h"
-#include "util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/util.h"
#define HWDB_SIG { 'K', 'S', 'L', 'P', 'H', 'H', 'R', 'H' }
diff --git a/src/libsystemd/sd-hwdb/hwdb-util.h b/src/libsystemd/src/sd-hwdb/hwdb-util.h
index 5e21e5008b..5585965c83 100644
--- a/src/libsystemd/sd-hwdb/hwdb-util.h
+++ b/src/libsystemd/src/sd-hwdb/hwdb-util.h
@@ -19,8 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-hwdb.h"
-
-#include "util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-hwdb.h"
bool hwdb_validate(sd_hwdb *hwdb);
diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/src/sd-hwdb/sd-hwdb.c
index 488e101ea8..8303879455 100644
--- a/src/libsystemd/sd-hwdb/sd-hwdb.c
+++ b/src/libsystemd/src/sd-hwdb/sd-hwdb.c
@@ -27,15 +27,15 @@
#include <string.h>
#include <sys/mman.h>
-#include "sd-hwdb.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/refcnt.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-staging/sd-hwdb.h"
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "hashmap.h"
#include "hwdb-internal.h"
#include "hwdb-util.h"
-#include "refcnt.h"
-#include "string-util.h"
struct sd_hwdb {
RefCount n_ref;
diff --git a/src/libsystemd/src/sd-id128/Makefile b/src/libsystemd/src/sd-id128/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-id128/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-id128/id128-util.c b/src/libsystemd/src/sd-id128/id128-util.c
index 337eae24b4..0314127684 100644
--- a/src/libsystemd/sd-id128/id128-util.c
+++ b/src/libsystemd/src/sd-id128/id128-util.c
@@ -20,11 +20,12 @@
#include <fcntl.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "hexdecoct.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/stdio-util.h"
+
#include "id128-util.h"
-#include "io-util.h"
-#include "stdio-util.h"
char *id128_to_uuid_string(sd_id128_t id, char s[37]) {
unsigned n, k = 0;
diff --git a/src/libsystemd/sd-id128/id128-util.h b/src/libsystemd/src/sd-id128/id128-util.h
index 6b3855acbb..7ca482a727 100644
--- a/src/libsystemd/sd-id128/id128-util.h
+++ b/src/libsystemd/src/sd-id128/id128-util.h
@@ -21,10 +21,10 @@
#include <stdbool.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
-#include "hash-funcs.h"
-#include "macro.h"
+#include "systemd-basic/hash-funcs.h"
+#include "systemd-basic/macro.h"
char *id128_to_uuid_string(sd_id128_t id, char s[37]);
diff --git a/src/libsystemd/sd-id128/sd-id128.c b/src/libsystemd/src/sd-id128/sd-id128.c
index d4450c70a0..275949c651 100644
--- a/src/libsystemd/sd-id128/sd-id128.c
+++ b/src/libsystemd/src/sd-id128/sd-id128.c
@@ -21,15 +21,16 @@
#include <fcntl.h>
#include <unistd.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/util.h"
-#include "fd-util.h"
-#include "hexdecoct.h"
#include "id128-util.h"
-#include "io-util.h"
-#include "macro.h"
-#include "random-util.h"
-#include "util.h"
_public_ char *sd_id128_to_string(sd_id128_t id, char s[SD_ID128_STRING_MAX]) {
unsigned n;
diff --git a/src/libsystemd/src/sd-journal/GNUmakefile b/src/libsystemd/src/sd-journal/GNUmakefile
new file mode 120000
index 0000000000..13308a50cd
--- /dev/null
+++ b/src/libsystemd/src/sd-journal/GNUmakefile
@@ -0,0 +1 @@
+../../../../GNUmakefile \ No newline at end of file
diff --git a/src/libsystemd/src/sd-journal/Makefile b/src/libsystemd/src/sd-journal/Makefile
new file mode 100644
index 0000000000..d0415fb0d3
--- /dev/null
+++ b/src/libsystemd/src/sd-journal/Makefile
@@ -0,0 +1,42 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+audit_list_includes = -include linux/audit.h -include missing.h
+ifneq ($(HAVE_AUDIT),)
+audit_list_includes += -include libaudit.h
+endif # HAVE_AUDIT
+
+$(outdir)/audit_type-list.txt:
+ $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@
+
+$(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt
+ $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@
+
+# fsprg.c is a drop-in file using void pointer arithmetic
+libsystemd_journal_internal_la_CFLAGS += \
+ $(GCRYPT_CFLAGS) \
+ -Wno-pointer-arith
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c
index 71e8790ca8..1644e3f1b1 100644
--- a/src/journal/audit-type.c
+++ b/src/libsystemd/src/sd-journal/audit-type.c
@@ -18,12 +18,14 @@
***/
#include <stdio.h>
+
#include <linux/audit.h>
#ifdef HAVE_AUDIT
# include <libaudit.h>
#endif
-#include "missing.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+
#include "audit-type.h"
#include "audit_type-to-name.h"
-#include "macro.h"
diff --git a/src/journal/audit-type.h b/src/libsystemd/src/sd-journal/audit-type.h
index 1dd2163707..0b4748b01f 100644
--- a/src/journal/audit-type.h
+++ b/src/libsystemd/src/sd-journal/audit-type.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
const char *audit_type_to_string(int type);
int audit_type_from_string(const char *s);
diff --git a/src/journal/catalog.c b/src/libsystemd/src/sd-journal/catalog.c
index 886f6efd8b..fce4649f6f 100644
--- a/src/journal/catalog.c
+++ b/src/libsystemd/src/sd-journal/catalog.c
@@ -25,23 +25,24 @@
#include <sys/mman.h>
#include <unistd.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/strbuf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
-#include "alloc-util.h"
#include "catalog.h"
-#include "conf-files.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hashmap.h"
-#include "log.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "siphash24.h"
-#include "sparse-endian.h"
-#include "strbuf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
const char * const catalog_file_dirs[] = {
"/usr/local/lib/systemd/catalog/",
diff --git a/src/journal/catalog.h b/src/libsystemd/src/sd-journal/catalog.h
index 1b1014b335..49fec555a4 100644
--- a/src/journal/catalog.h
+++ b/src/libsystemd/src/sd-journal/catalog.h
@@ -21,10 +21,10 @@
#include <stdbool.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
-#include "hashmap.h"
-#include "strbuf.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/strbuf.h"
int catalog_import_file(Hashmap *h, const char *path);
int catalog_update(const char* database, const char* root, const char* const* dirs);
diff --git a/src/journal/compress.c b/src/libsystemd/src/sd-journal/compress.c
index ba734b5561..c6c5f3c500 100644
--- a/src/journal/compress.c
+++ b/src/libsystemd/src/sd-journal/compress.c
@@ -32,16 +32,17 @@
#include <lz4frame.h>
#endif
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+
#include "compress.h"
-#include "fd-util.h"
-#include "io-util.h"
#include "journal-def.h"
-#include "macro.h"
-#include "sparse-endian.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "util.h"
#ifdef HAVE_LZ4
DEFINE_TRIVIAL_CLEANUP_FUNC(LZ4F_compressionContext_t, LZ4F_freeCompressionContext);
diff --git a/src/journal/compress.h b/src/libsystemd/src/sd-journal/compress.h
index c138099d9a..c138099d9a 100644
--- a/src/journal/compress.h
+++ b/src/libsystemd/src/sd-journal/compress.h
diff --git a/src/journal/fsprg.c b/src/libsystemd/src/sd-journal/fsprg.c
index 612b10f3a9..c0f59b28fd 100644
--- a/src/journal/fsprg.c
+++ b/src/libsystemd/src/sd-journal/fsprg.c
@@ -29,8 +29,9 @@
#include <gcrypt.h>
#include <string.h>
+#include "systemd-gcrypt/gcrypt-util.h"
+
#include "fsprg.h"
-#include "gcrypt-util.h"
#define ISVALID_SECPAR(secpar) (((secpar) % 16 == 0) && ((secpar) >= 16) && ((secpar) <= 16384))
#define VALIDATE_SECPAR(secpar) assert(ISVALID_SECPAR(secpar));
diff --git a/src/journal/fsprg.h b/src/libsystemd/src/sd-journal/fsprg.h
index 829b56e240..15a4e04fe8 100644
--- a/src/journal/fsprg.h
+++ b/src/libsystemd/src/sd-journal/fsprg.h
@@ -26,8 +26,8 @@
#include <inttypes.h>
#include <sys/types.h>
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/journal/journal-authenticate.c b/src/libsystemd/src/sd-journal/journal-authenticate.c
index d8af113d3f..f3a207d88d 100644
--- a/src/journal/journal-authenticate.c
+++ b/src/libsystemd/src/sd-journal/journal-authenticate.c
@@ -20,10 +20,11 @@
#include <fcntl.h>
#include <sys/mman.h>
-#include "fd-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-gcrypt/gcrypt-util.h"
+
#include "fsprg.h"
-#include "gcrypt-util.h"
-#include "hexdecoct.h"
#include "journal-authenticate.h"
#include "journal-def.h"
#include "journal-file.h"
diff --git a/src/journal/journal-authenticate.h b/src/libsystemd/src/sd-journal/journal-authenticate.h
index 6c87319ede..6c87319ede 100644
--- a/src/journal/journal-authenticate.h
+++ b/src/libsystemd/src/sd-journal/journal-authenticate.h
diff --git a/src/journal/journal-def.h b/src/libsystemd/src/sd-journal/journal-def.h
index 67edb43960..1c604487fb 100644
--- a/src/journal/journal-def.h
+++ b/src/libsystemd/src/sd-journal/journal-def.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
-#include "macro.h"
-#include "sparse-endian.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
/*
* If you change this file you probably should also change its documentation:
@@ -32,20 +32,16 @@
*/
typedef struct Header Header;
-
typedef struct ObjectHeader ObjectHeader;
typedef union Object Object;
-
typedef struct DataObject DataObject;
typedef struct FieldObject FieldObject;
typedef struct EntryObject EntryObject;
typedef struct HashTableObject HashTableObject;
typedef struct EntryArrayObject EntryArrayObject;
typedef struct TagObject TagObject;
-
typedef struct EntryItem EntryItem;
typedef struct HashItem HashItem;
-
typedef struct FSSHeader FSSHeader;
/* Object types */
diff --git a/src/journal/journal-file.c b/src/libsystemd/src/sd-journal/journal-file.c
index d3e0214731..10972869c8 100644
--- a/src/journal/journal-file.c
+++ b/src/libsystemd/src/sd-journal/journal-file.c
@@ -19,7 +19,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/fs.h>
#include <pthread.h>
#include <stddef.h>
#include <sys/mman.h>
@@ -27,22 +26,26 @@
#include <sys/uio.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "btrfs-util.h"
-#include "chattr-util.h"
+#include <linux/fs.h>
+
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/chattr-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/xattr-util.h"
+
#include "compress.h"
-#include "fd-util.h"
#include "journal-authenticate.h"
#include "journal-def.h"
#include "journal-file.h"
#include "lookup3.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "random-util.h"
-#include "sd-event.h"
-#include "set.h"
-#include "string-util.h"
-#include "xattr-util.h"
#define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
#define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
diff --git a/src/journal/journal-file.h b/src/libsystemd/src/sd-journal/journal-file.h
index 564e1a8179..054fe5794b 100644
--- a/src/journal/journal-file.h
+++ b/src/libsystemd/src/sd-journal/journal-file.h
@@ -25,14 +25,15 @@
#include <gcrypt.h>
#endif
-#include "sd-id128.h"
+#include <systemd/sd-event.h>
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sparse-endian.h"
-#include "hashmap.h"
#include "journal-def.h"
-#include "macro.h"
#include "mmap-cache.h"
-#include "sd-event.h"
-#include "sparse-endian.h"
typedef struct JournalMetrics {
/* For all these: -1 means "pick automatically", and 0 means "no limit enforced" */
diff --git a/src/journal/journal-internal.h b/src/libsystemd/src/sd-journal/journal-internal.h
index 34a48141f5..83f38b51ed 100644
--- a/src/journal/journal-internal.h
+++ b/src/libsystemd/src/sd-journal/journal-internal.h
@@ -23,14 +23,15 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "sd-id128.h"
-#include "sd-journal.h"
+#include <systemd/sd-id128.h>
+#include <systemd/sd-journal.h>
+
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/set.h"
-#include "hashmap.h"
#include "journal-def.h"
#include "journal-file.h"
-#include "list.h"
-#include "set.h"
typedef struct Match Match;
typedef struct Location Location;
diff --git a/src/journal/journal-send.c b/src/libsystemd/src/sd-journal/journal-send.c
index 440fba67ca..c168902e9a 100644
--- a/src/journal/journal-send.c
+++ b/src/libsystemd/src/sd-journal/journal-send.c
@@ -27,17 +27,17 @@
#define SD_JOURNAL_SUPPRESS_LOCATION
-#include "sd-journal.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "io-util.h"
-#include "memfd-util.h"
-#include "socket-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "util.h"
+#include <systemd/sd-journal.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/memfd-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#define SNDBUF_SIZE (8*1024*1024)
diff --git a/src/journal/journal-vacuum.c b/src/libsystemd/src/sd-journal/journal-vacuum.c
index 12ce2fd56c..e5d49f0b5d 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/libsystemd/src/sd-journal/journal-vacuum.c
@@ -21,18 +21,19 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/xattr-util.h"
-#include "alloc-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
#include "journal-def.h"
#include "journal-file.h"
#include "journal-vacuum.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "util.h"
-#include "xattr-util.h"
struct vacuum_info {
uint64_t usage;
diff --git a/src/journal/journal-vacuum.h b/src/libsystemd/src/sd-journal/journal-vacuum.h
index 1e750a2170..1e76aa856d 100644
--- a/src/journal/journal-vacuum.h
+++ b/src/libsystemd/src/sd-journal/journal-vacuum.h
@@ -22,6 +22,6 @@
#include <inttypes.h>
#include <stdbool.h>
-#include "time-util.h"
+#include "systemd-basic/time-util.h"
int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t n_max_files, usec_t max_retention_usec, usec_t *oldest_usec, bool verbose);
diff --git a/src/journal/journal-verify.c b/src/libsystemd/src/sd-journal/journal-verify.c
index 9e4d8a28a5..756dbdaa76 100644
--- a/src/journal/journal-verify.c
+++ b/src/libsystemd/src/sd-journal/journal-verify.c
@@ -22,19 +22,20 @@
#include <sys/mman.h>
#include <unistd.h>
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+
#include "compress.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
#include "journal-authenticate.h"
#include "journal-def.h"
#include "journal-file.h"
#include "journal-verify.h"
#include "lookup3.h"
-#include "macro.h"
-#include "terminal-util.h"
-#include "util.h"
static void draw_progress(uint64_t p, usec_t *last_usec) {
unsigned n, i, j, k;
diff --git a/src/journal/journal-verify.h b/src/libsystemd/src/sd-journal/journal-verify.h
index 8f0eaf6daa..8f0eaf6daa 100644
--- a/src/journal/journal-verify.h
+++ b/src/libsystemd/src/sd-journal/journal-verify.h
diff --git a/src/journal/lookup3.c b/src/libsystemd/src/sd-journal/lookup3.c
index d8f1a4977d..d8f1a4977d 100644
--- a/src/journal/lookup3.c
+++ b/src/libsystemd/src/sd-journal/lookup3.c
diff --git a/src/journal/lookup3.h b/src/libsystemd/src/sd-journal/lookup3.h
index 787921ffbf..0c8c0b0ae4 100644
--- a/src/journal/lookup3.h
+++ b/src/libsystemd/src/sd-journal/lookup3.h
@@ -3,7 +3,7 @@
#include <inttypes.h>
#include <sys/types.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
uint32_t jenkins_hashword(const uint32_t *k, size_t length, uint32_t initval) _pure_;
void jenkins_hashword2(const uint32_t *k, size_t length, uint32_t *pc, uint32_t *pb);
diff --git a/src/journal/mmap-cache.c b/src/libsystemd/src/sd-journal/mmap-cache.c
index d91247b524..3570aa1d44 100644
--- a/src/journal/mmap-cache.c
+++ b/src/libsystemd/src/sd-journal/mmap-cache.c
@@ -21,15 +21,16 @@
#include <stdlib.h>
#include <sys/mman.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "hashmap.h"
-#include "list.h"
-#include "log.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/util.h"
+
#include "mmap-cache.h"
-#include "sigbus.h"
-#include "util.h"
typedef struct Window Window;
typedef struct Context Context;
diff --git a/src/journal/mmap-cache.h b/src/libsystemd/src/sd-journal/mmap-cache.h
index 199d944647..199d944647 100644
--- a/src/journal/mmap-cache.h
+++ b/src/libsystemd/src/sd-journal/mmap-cache.h
diff --git a/src/journal/sd-journal.c b/src/libsystemd/src/sd-journal/sd-journal.c
index f2f8546086..68ef58b79b 100644
--- a/src/journal/sd-journal.c
+++ b/src/libsystemd/src/sd-journal/sd-journal.c
@@ -20,38 +20,40 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <linux/magic.h>
#include <poll.h>
#include <stddef.h>
#include <sys/inotify.h>
#include <sys/vfs.h>
#include <unistd.h>
-#include "sd-journal.h"
+#include <linux/magic.h>
+
+#include <systemd/sd-journal.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/replace-var.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
-#include "alloc-util.h"
#include "catalog.h"
#include "compress.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "hashmap.h"
-#include "hostname-util.h"
-#include "io-util.h"
#include "journal-def.h"
#include "journal-file.h"
#include "journal-internal.h"
-#include "list.h"
#include "lookup3.h"
-#include "missing.h"
-#include "path-util.h"
-#include "replace-var.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
#define JOURNAL_FILES_MAX 7168
diff --git a/src/libsystemd/src/sd-login/Makefile b/src/libsystemd/src/sd-login/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-login/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/src/sd-login/sd-login.c
index 3fcefada3f..9be4ec6c39 100644
--- a/src/libsystemd/sd-login/sd-login.c
+++ b/src/libsystemd/src/sd-login/sd-login.c
@@ -23,27 +23,27 @@
#include <sys/inotify.h>
#include <unistd.h>
-#include "sd-login.h"
-
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "dirent-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "hostname-util.h"
-#include "io-util.h"
-#include "login-util.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
+#include <systemd/sd-login.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/login-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
/* Error codes:
*
diff --git a/src/libsystemd/sd-login/test-login.c b/src/libsystemd/src/sd-login/test-login.c
index c1fd7dd33e..348ce1e790 100644
--- a/src/libsystemd/sd-login/test-login.c
+++ b/src/libsystemd/src/sd-login/test-login.c
@@ -20,14 +20,14 @@
#include <poll.h>
#include <string.h>
-#include "sd-login.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include <systemd/sd-login.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static void test_login(void) {
_cleanup_close_pair_ int pair[2] = { -1, -1 };
diff --git a/src/libsystemd/src/sd-netlink/Makefile b/src/libsystemd/src/sd-netlink/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-netlink/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-netlink/local-addresses.c b/src/libsystemd/src/sd-netlink/local-addresses.c
index ed9ee041ab..74e1b2c2bf 100644
--- a/src/libsystemd/sd-netlink/local-addresses.c
+++ b/src/libsystemd/src/sd-netlink/local-addresses.c
@@ -18,11 +18,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-staging/sd-netlink.h"
-#include "alloc-util.h"
#include "local-addresses.h"
-#include "macro.h"
#include "netlink-util.h"
static int address_compare(const void *_a, const void *_b) {
diff --git a/src/libsystemd/sd-netlink/local-addresses.h b/src/libsystemd/src/sd-netlink/local-addresses.h
index 18d71e797e..f1e91ccfd2 100644
--- a/src/libsystemd/sd-netlink/local-addresses.h
+++ b/src/libsystemd/src/sd-netlink/local-addresses.h
@@ -20,9 +20,8 @@
***/
-#include "sd-netlink.h"
-
-#include "in-addr-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-staging/sd-netlink.h"
struct local_address {
int family, ifindex;
diff --git a/src/libsystemd/sd-netlink/netlink-internal.h b/src/libsystemd/src/sd-netlink/netlink-internal.h
index dcfb080ad3..0df449a43c 100644
--- a/src/libsystemd/sd-netlink/netlink-internal.h
+++ b/src/libsystemd/src/sd-netlink/netlink-internal.h
@@ -21,12 +21,12 @@
#include <linux/netlink.h>
-#include "sd-netlink.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/prioq.h"
+#include "systemd-basic/refcnt.h"
+#include "systemd-staging/sd-netlink.h"
-#include "list.h"
#include "netlink-types.h"
-#include "prioq.h"
-#include "refcnt.h"
#define RTNL_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC))
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/src/sd-netlink/netlink-message.c
index df3b3c922e..73afe876b6 100644
--- a/src/libsystemd/sd-netlink/netlink-message.c
+++ b/src/libsystemd/src/sd-netlink/netlink-message.c
@@ -21,17 +21,17 @@
#include <stdbool.h>
#include <unistd.h>
-#include "sd-netlink.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/refcnt.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
-#include "alloc-util.h"
-#include "formats-util.h"
-#include "missing.h"
#include "netlink-internal.h"
#include "netlink-types.h"
#include "netlink-util.h"
-#include "refcnt.h"
-#include "socket-util.h"
-#include "util.h"
#define GET_CONTAINER(m, i) ((i) < (m)->n_containers ? (struct rtattr*)((uint8_t*)(m)->hdr + (m)->containers[i].offset) : NULL)
#define PUSH_CONTAINER(m, new) (m)->container_offsets[(m)->n_containers++] = (uint8_t*)(new) - (uint8_t*)(m)->hdr;
diff --git a/src/libsystemd/sd-netlink/netlink-socket.c b/src/libsystemd/src/sd-netlink/netlink-socket.c
index c165fa3359..f9a0df9f20 100644
--- a/src/libsystemd/sd-netlink/netlink-socket.c
+++ b/src/libsystemd/src/sd-netlink/netlink-socket.c
@@ -21,17 +21,17 @@
#include <stdbool.h>
#include <unistd.h>
-#include "sd-netlink.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/refcnt.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
-#include "alloc-util.h"
-#include "formats-util.h"
-#include "missing.h"
#include "netlink-internal.h"
#include "netlink-types.h"
#include "netlink-util.h"
-#include "refcnt.h"
-#include "socket-util.h"
-#include "util.h"
int socket_open(int family) {
int fd;
diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/src/sd-netlink/netlink-types.c
index 1c10dd55a7..fb881846a5 100644
--- a/src/libsystemd/sd-netlink/netlink-types.c
+++ b/src/libsystemd/src/sd-netlink/netlink-types.c
@@ -19,6 +19,7 @@
#include <stdint.h>
#include <sys/socket.h>
+
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/can/netlink.h>
@@ -31,11 +32,12 @@
#include <linux/if_link.h>
#include <linux/if_tunnel.h>
-#include "macro.h"
-#include "missing.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/string-table.h"
+#include "systemd-basic/util.h"
+
#include "netlink-types.h"
-#include "string-table.h"
-#include "util.h"
/* Maximum ARP IP target defined in kernel */
#define BOND_MAX_ARP_TARGETS 16
diff --git a/src/libsystemd/sd-netlink/netlink-types.h b/src/libsystemd/src/sd-netlink/netlink-types.h
index 42e96173de..df4ddcaf92 100644
--- a/src/libsystemd/sd-netlink/netlink-types.h
+++ b/src/libsystemd/src/sd-netlink/netlink-types.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
+#include "systemd-basic/macro.h"
enum {
NETLINK_TYPE_UNSPEC,
diff --git a/src/libsystemd/sd-netlink/netlink-util.c b/src/libsystemd/src/sd-netlink/netlink-util.c
index 73b9ac0258..4bb99b00af 100644
--- a/src/libsystemd/sd-netlink/netlink-util.c
+++ b/src/libsystemd/src/sd-netlink/netlink-util.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink.h"
+#include "systemd-staging/sd-netlink.h"
#include "netlink-internal.h"
#include "netlink-util.h"
diff --git a/src/libsystemd/sd-netlink/netlink-util.h b/src/libsystemd/src/sd-netlink/netlink-util.h
index f49bf4eaa6..9fc80af61d 100644
--- a/src/libsystemd/sd-netlink/netlink-util.h
+++ b/src/libsystemd/src/sd-netlink/netlink-util.h
@@ -19,9 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink.h"
-
-#include "util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
int rtnl_message_new_synthetic_error(int error, uint32_t serial, sd_netlink_message **ret);
uint32_t rtnl_message_get_serial(sd_netlink_message *m);
diff --git a/src/libsystemd/sd-netlink/rtnl-message.c b/src/libsystemd/src/sd-netlink/rtnl-message.c
index 09240c7b2a..315da4f0ca 100644
--- a/src/libsystemd/sd-netlink/rtnl-message.c
+++ b/src/libsystemd/src/sd-netlink/rtnl-message.c
@@ -21,16 +21,16 @@
#include <stdbool.h>
#include <unistd.h>
-#include "sd-netlink.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/refcnt.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
-#include "formats-util.h"
-#include "missing.h"
#include "netlink-internal.h"
#include "netlink-types.h"
#include "netlink-util.h"
-#include "refcnt.h"
-#include "socket-util.h"
-#include "util.h"
int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_message *m, unsigned char prefixlen) {
struct rtmsg *rtm;
diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/src/sd-netlink/sd-netlink.c
index 43114eb825..4999f59d24 100644
--- a/src/libsystemd/sd-netlink/sd-netlink.c
+++ b/src/libsystemd/src/sd-netlink/sd-netlink.c
@@ -20,17 +20,17 @@
#include <poll.h>
#include <sys/socket.h>
-#include "sd-netlink.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "hashmap.h"
-#include "macro.h"
-#include "missing.h"
#include "netlink-internal.h"
#include "netlink-util.h"
-#include "socket-util.h"
-#include "util.h"
static int sd_netlink_new(sd_netlink **ret) {
_cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
diff --git a/src/libsystemd/sd-netlink/test-local-addresses.c b/src/libsystemd/src/sd-netlink/test-local-addresses.c
index e0e28cc0cc..b08cac9907 100644
--- a/src/libsystemd/sd-netlink/test-local-addresses.c
+++ b/src/libsystemd/src/sd-netlink/test-local-addresses.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "af-list.h"
-#include "alloc-util.h"
-#include "in-addr-util.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/in-addr-util.h"
+
#include "local-addresses.h"
static void print_local_addresses(struct local_address *a, unsigned n) {
diff --git a/src/libsystemd/sd-netlink/test-netlink.c b/src/libsystemd/src/sd-netlink/test-netlink.c
index 58c2e892f5..b16419a3ab 100644
--- a/src/libsystemd/sd-netlink/test-netlink.c
+++ b/src/libsystemd/src/sd-netlink/test-netlink.c
@@ -20,15 +20,15 @@
#include <net/if.h>
#include <netinet/ether.h>
-#include "sd-netlink.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
-#include "ether-addr-util.h"
-#include "macro.h"
-#include "missing.h"
#include "netlink-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "util.h"
static void test_message_link_bridge(sd_netlink *rtnl) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL;
diff --git a/src/libsystemd/src/sd-network/Makefile b/src/libsystemd/src/sd-network/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-network/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-network/network-util.c b/src/libsystemd/src/sd-network/network-util.c
index a0d9b5f1a4..317a7ac804 100644
--- a/src/libsystemd/sd-network/network-util.c
+++ b/src/libsystemd/src/sd-network/network-util.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "fd-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/strv.h"
+
#include "network-util.h"
-#include "strv.h"
bool network_is_online(void) {
_cleanup_free_ char *state = NULL;
diff --git a/src/libsystemd/sd-network/network-util.h b/src/libsystemd/src/sd-network/network-util.h
index 26780dce28..4527ed7c0f 100644
--- a/src/libsystemd/sd-network/network-util.h
+++ b/src/libsystemd/src/sd-network/network-util.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-network.h"
+#include "systemd-staging/sd-network.h"
bool network_is_online(void);
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/src/sd-network/sd-network.c
index f8e18f23fd..2467fdb7ff 100644
--- a/src/libsystemd/sd-network/sd-network.c
+++ b/src/libsystemd/src/sd-network/sd-network.c
@@ -23,18 +23,17 @@
#include <string.h>
#include <sys/inotify.h>
-#include "sd-network.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-network.h"
_public_ int sd_network_get_operational_state(char **state) {
_cleanup_free_ char *s = NULL;
diff --git a/src/libsystemd/src/sd-resolve/Makefile b/src/libsystemd/src/sd-resolve/Makefile
new file mode 120000
index 0000000000..71a1159ce0
--- /dev/null
+++ b/src/libsystemd/src/sd-resolve/Makefile
@@ -0,0 +1 @@
+../subdir.mk \ No newline at end of file
diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/src/sd-resolve/sd-resolve.c
index 60aa55de3b..629eeb7799 100644
--- a/src/libsystemd/sd-resolve/sd-resolve.c
+++ b/src/libsystemd/src/sd-resolve/sd-resolve.c
@@ -29,15 +29,14 @@
#include <sys/prctl.h>
#include <unistd.h>
-#include "sd-resolve.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "list.h"
-#include "missing.h"
-#include "socket-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-resolve.h"
#define WORKERS_MIN 1U
#define WORKERS_MAX 16U
diff --git a/src/libsystemd/sd-resolve/test-resolve.c b/src/libsystemd/src/sd-resolve/test-resolve.c
index 1be1a7f8a7..0a5bba81cf 100644
--- a/src/libsystemd/sd-resolve/test-resolve.c
+++ b/src/libsystemd/src/sd-resolve/test-resolve.c
@@ -26,12 +26,11 @@
#include <string.h>
#include <sys/socket.h>
-#include "sd-resolve.h"
-
-#include "alloc-util.h"
-#include "macro.h"
-#include "socket-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-staging/sd-resolve.h"
static int getaddrinfo_handler(sd_resolve_query *q, int ret, const struct addrinfo *ai, void *userdata) {
const struct addrinfo *i;
diff --git a/src/libsystemd/sd-utf8/sd-utf8.c b/src/libsystemd/src/sd-utf8/sd-utf8.c
index 33a5a04ea1..e00ec94390 100644
--- a/src/libsystemd/sd-utf8/sd-utf8.c
+++ b/src/libsystemd/src/sd-utf8/sd-utf8.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-utf8.h"
+#include <systemd/sd-utf8.h>
-#include "utf8.h"
-#include "util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
_public_ const char *sd_utf8_is_valid(const char *s) {
assert_return(s, NULL);
diff --git a/src/libsystemd/src/subdir.mk b/src/libsystemd/src/subdir.mk
new file mode 100644
index 0000000000..605b592401
--- /dev/null
+++ b/src/libsystemd/src/subdir.mk
@@ -0,0 +1,29 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\"
+sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\"
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libsystemd/src/test.mk b/src/libsystemd/src/test.mk
new file mode 100644
index 0000000000..c823a360f2
--- /dev/null
+++ b/src/libsystemd/src/test.mk
@@ -0,0 +1,164 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+test_bus_marshal_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-marshal.c
+
+test_bus_marshal_LDADD = \
+ libsystemd-shared.la \
+ $(GLIB_LIBS) \
+ $(DBUS_LIBS)
+
+test_bus_marshal_CFLAGS = \
+ $(GLIB_CFLAGS) \
+ $(DBUS_CFLAGS)
+
+test_bus_signature_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-signature.c
+
+test_bus_signature_LDADD = \
+ libsystemd-shared.la
+
+test_bus_chat_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-chat.c
+
+test_bus_chat_LDADD = \
+ libsystemd-shared.la
+
+test_bus_cleanup_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-cleanup.c
+
+test_bus_cleanup_CFLAGS = \
+ $(SECCOMP_CFLAGS)
+
+test_bus_cleanup_LDADD = \
+ libsystemd-shared.la
+
+test_bus_track_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-track.c
+
+test_bus_track_CFLAGS = \
+ $(SECCOMP_CFLAGS)
+
+test_bus_track_LDADD = \
+ libsystemd-shared.la
+
+test_bus_server_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-server.c
+
+test_bus_server_LDADD = \
+ libsystemd-shared.la
+
+test_bus_objects_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-objects.c
+
+test_bus_objects_LDADD = \
+ libsystemd-shared.la
+
+test_bus_error_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-error.c
+
+# Link statically because this test uses BUS_ERROR_MAP_ELF_REGISTER
+test_bus_error_LDADD = \
+ libsystemd-shared.la
+
+test_bus_gvariant_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-gvariant.c
+
+test_bus_gvariant_LDADD = \
+ libsystemd-shared.la \
+ $(GLIB_LIBS)
+
+test_bus_gvariant_CFLAGS = \
+ $(GLIB_CFLAGS)
+
+test_bus_creds_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-creds.c
+
+test_bus_creds_LDADD = \
+ libsystemd-shared.la
+
+test_bus_match_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-match.c
+
+test_bus_match_LDADD = \
+ libsystemd-shared.la
+
+test_bus_kernel_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-kernel.c
+
+test_bus_kernel_LDADD = \
+ libsystemd-shared.la
+
+test_bus_kernel_bloom_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-kernel-bloom.c
+
+test_bus_kernel_bloom_LDADD = \
+ libsystemd-shared.la
+
+test_bus_benchmark_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-benchmark.c
+
+test_bus_benchmark_LDADD = \
+ libsystemd-shared.la
+
+test_bus_zero_copy_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-zero-copy.c
+
+test_bus_zero_copy_LDADD = \
+ libsystemd-shared.la
+
+test_bus_introspect_SOURCES = \
+ src/libsystemd/sd-bus/test-bus-introspect.c
+
+test_bus_introspect_LDADD = \
+ libsystemd-shared.la
+
+test_event_SOURCES = \
+ src/libsystemd/sd-event/test-event.c
+
+test_event_LDADD = \
+ libsystemd-shared.la
+
+test_netlink_SOURCES = \
+ src/libsystemd/sd-netlink/test-netlink.c
+
+test_netlink_LDADD = \
+ libsystemd-shared.la
+
+test_local_addresses_SOURCES = \
+ src/libsystemd/sd-netlink/test-local-addresses.c
+
+test_local_addresses_LDADD = \
+ libsystemd-shared.la
+
+test_resolve_SOURCES = \
+ src/libsystemd/sd-resolve/test-resolve.c
+
+test_resolve_LDADD = \
+ libsystemd-shared.la
+
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libudev/GNUmakefile b/src/libudev/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/libudev/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/libudev/Makefile b/src/libudev/Makefile
index d0b0e8e008..737a750e3a 120000..100644
--- a/src/libudev/Makefile
+++ b/src/libudev/Makefile
@@ -1 +1,64 @@
-../Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+LIBUDEV_CURRENT=7
+LIBUDEV_REVISION=5
+LIBUDEV_AGE=6
+
+include_HEADERS += \
+ src/libudev/libudev.h
+
+rootlib_LTLIBRARIES += \
+ libudev.la
+
+libudev_la_LDFLAGS = \
+ -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
+ -Wl,--version-script=$(srcdir)/libudev.sym
+
+libudev_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la
+
+pkgconfiglib_DATA += \
+ src/libudev/libudev.pc
+
+EXTRA_DIST += \
+ src/libudev/libudev.pc.in
+
+test-libudev-sym.c: \
+ src/libudev/libudev.sym \
+ src/udev/udev.h
+ $(generate-sym-test)
+
+nodist_test_libudev_sym_SOURCES = \
+ test-libudev-sym.c
+test_libudev_sym_CFLAGS = \
+ -Wno-deprecated-declarations
+test_libudev_sym_LDADD = \
+ libudev.la
+
+nested.subdirs += src
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libudev/libudev.h b/src/libudev/include/libudev.h
index 3f6d0ed16c..3f6d0ed16c 100644
--- a/src/libudev/libudev.h
+++ b/src/libudev/include/libudev.h
diff --git a/man/libudev.xml b/src/libudev/libudev.xml
index 53b68dcc89..53b68dcc89 100644
--- a/man/libudev.xml
+++ b/src/libudev/libudev.xml
diff --git a/src/libudev/src/GNUmakefile b/src/libudev/src/GNUmakefile
new file mode 120000
index 0000000000..95e5924740
--- /dev/null
+++ b/src/libudev/src/GNUmakefile
@@ -0,0 +1 @@
+../../../GNUmakefile \ No newline at end of file
diff --git a/src/libudev/src/Makefile b/src/libudev/src/Makefile
new file mode 100644
index 0000000000..46f122d52d
--- /dev/null
+++ b/src/libudev/src/Makefile
@@ -0,0 +1,45 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+libudev_la_SOURCES =\
+ src/libudev/libudev.sym \
+ src/libudev/libudev-private.h \
+ src/libudev/libudev-device-internal.h \
+ src/libudev/libudev.c \
+ src/libudev/libudev-list.c \
+ src/libudev/libudev-util.c \
+ src/libudev/libudev-device.c \
+ src/libudev/libudev-device-private.c \
+ src/libudev/libudev-enumerate.c \
+ src/libudev/libudev-monitor.c \
+ src/libudev/libudev-queue.c \
+ src/libudev/libudev-hwdb.c
+noinst_LTLIBRARIES += \
+ libudev-internal.la
+
+libudev_internal_la_SOURCES =\
+ $(libudev_la_SOURCES)
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/libudev/libudev-device-internal.h b/src/libudev/src/libudev-device-internal.h
index 0e9af8ec09..9987f80499 100644
--- a/src/libudev/libudev-device-internal.h
+++ b/src/libudev/src/libudev-device-internal.h
@@ -20,8 +20,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "libudev.h"
-#include "sd-device.h"
+#include <libudev.h>
+
+#include "systemd-staging/sd-device.h"
#include "libudev-private.h"
diff --git a/src/libudev/libudev-device-private.c b/src/libudev/src/libudev-device-private.c
index 2aae0726c1..97b60da3f1 100644
--- a/src/libudev/libudev-device-private.c
+++ b/src/libudev/src/libudev-device-private.c
@@ -18,9 +18,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "libudev.h"
+#include <libudev.h>
+
+#include "sd-device/device-private.h"
-#include "device-private.h"
#include "libudev-device-internal.h"
#include "libudev-private.h"
diff --git a/src/libudev/libudev-device.c b/src/libudev/src/libudev-device.c
index c5f36725dc..d6e2c5fa6e 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/src/libudev-device.c
@@ -22,7 +22,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/sockios.h>
#include <net/if.h>
#include <stdbool.h>
#include <stddef.h>
@@ -34,15 +33,18 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "libudev.h"
-#include "sd-device.h"
+#include <linux/sockios.h>
+
+#include <libudev.h>
+
+#include "sd-device/device-private.h"
+#include "sd-device/device-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-staging/sd-device.h"
-#include "alloc-util.h"
-#include "device-private.h"
-#include "device-util.h"
#include "libudev-device-internal.h"
#include "libudev-private.h"
-#include "parse-util.h"
/**
* SECTION:libudev-device
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/src/libudev-enumerate.c
index 3b8abfb260..53de8c1a41 100644
--- a/src/libudev/libudev-enumerate.c
+++ b/src/libudev/src/libudev-enumerate.c
@@ -28,12 +28,13 @@
#include <string.h>
#include <sys/stat.h>
-#include "libudev.h"
-#include "sd-device.h"
+#include <libudev.h>
+
+#include "sd-device/device-enumerator-private.h"
+#include "sd-device/device-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-staging/sd-device.h"
-#include "alloc-util.h"
-#include "device-enumerator-private.h"
-#include "device-util.h"
#include "libudev-device-internal.h"
/**
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/src/libudev-hwdb.c
index a53f000015..e381ffc62e 100644
--- a/src/libudev/libudev-hwdb.c
+++ b/src/libudev/src/libudev-hwdb.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-hwdb.h"
+#include "sd-hwdb/hwdb-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-staging/sd-hwdb.h"
-#include "alloc-util.h"
-#include "hwdb-util.h"
#include "libudev-private.h"
/**
diff --git a/src/libudev/libudev-list.c b/src/libudev/src/libudev-list.c
index 0d51322a15..3700ba2697 100644
--- a/src/libudev/libudev-list.c
+++ b/src/libudev/src/libudev-list.c
@@ -22,7 +22,8 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+
#include "libudev-private.h"
/**
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/src/libudev-monitor.c
index a1f2b33ad5..db433d6243 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/src/libudev-monitor.c
@@ -18,8 +18,6 @@
***/
#include <errno.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
#include <poll.h>
#include <stddef.h>
#include <stdio.h>
@@ -28,17 +26,21 @@
#include <sys/socket.h>
#include <unistd.h>
-#include "libudev.h"
+#include <linux/filter.h>
+#include <linux/netlink.h>
+
+#include <libudev.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
#include "libudev-private.h"
-#include "missing.h"
-#include "mount-util.h"
-#include "socket-util.h"
-#include "string-util.h"
/**
* SECTION:libudev-monitor
diff --git a/src/libudev/libudev-private.h b/src/libudev/src/libudev-private.h
index 52c5075110..da646370e6 100644
--- a/src/libudev/libudev-private.h
+++ b/src/libudev/src/libudev-private.h
@@ -24,12 +24,12 @@
#include <stdbool.h>
#include <stdint.h>
-#include "libudev.h"
+#include <libudev.h>
-#include "macro.h"
-#include "mkdir.h"
-#include "strxcpyx.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/util.h"
#define READ_END 0
#define WRITE_END 1
diff --git a/src/libudev/libudev-queue.c b/src/libudev/src/libudev-queue.c
index e3dffa6925..c2a1c55d1c 100644
--- a/src/libudev/libudev-queue.c
+++ b/src/libudev/src/libudev-queue.c
@@ -24,9 +24,10 @@
#include <sys/inotify.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "io-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+
#include "libudev-private.h"
/**
diff --git a/src/libudev/libudev-util.c b/src/libudev/src/libudev-util.c
index 574cfeac85..c881dffbc4 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/src/libudev-util.c
@@ -24,13 +24,14 @@
#include <string.h>
#include <unistd.h>
-#include "libudev.h"
+#include <libudev.h>
+
+#include "systemd-basic/MurmurHash2.h"
+#include "systemd-basic/device-nodes.h"
+#include "systemd-basic/syslog-util.h"
+#include "systemd-basic/utf8.h"
-#include "MurmurHash2.h"
-#include "device-nodes.h"
#include "libudev-private.h"
-#include "syslog-util.h"
-#include "utf8.h"
/**
* SECTION:libudev-util
diff --git a/src/libudev/libudev.c b/src/libudev/src/libudev.c
index 63fb05547d..97d263ef3e 100644
--- a/src/libudev/libudev.c
+++ b/src/libudev/src/libudev.c
@@ -24,13 +24,14 @@
#include <stdlib.h>
#include <string.h>
-#include "libudev.h"
+#include <libudev.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/string-util.h"
-#include "alloc-util.h"
-#include "fd-util.h"
#include "libudev-private.h"
-#include "missing.h"
-#include "string-util.h"
/**
* SECTION:libudev
diff --git a/src/udev/udev.h b/src/libudev/src/udev.h
index 8433e8d9f2..eeffef86bc 100644
--- a/src/udev/udev.h
+++ b/src/libudev/src/udev.h
@@ -22,14 +22,15 @@
#include <sys/sysmacros.h>
#include <sys/types.h>
-#include "libudev.h"
-#include "sd-netlink.h"
+#include <libudev.h>
+
+#include "systemd-basic/label.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
-#include "label.h"
#include "libudev-private.h"
-#include "macro.h"
-#include "strv.h"
-#include "util.h"
struct udev_event {
struct udev *udev;
diff --git a/man/udev_device_get_syspath.xml b/src/libudev/udev_device_get_syspath.xml
index 014f43b21c..014f43b21c 100644
--- a/man/udev_device_get_syspath.xml
+++ b/src/libudev/udev_device_get_syspath.xml
diff --git a/man/udev_device_has_tag.xml b/src/libudev/udev_device_has_tag.xml
index 480257343c..480257343c 100644
--- a/man/udev_device_has_tag.xml
+++ b/src/libudev/udev_device_has_tag.xml
diff --git a/man/udev_device_new_from_syspath.xml b/src/libudev/udev_device_new_from_syspath.xml
index 0bb71c8e91..0bb71c8e91 100644
--- a/man/udev_device_new_from_syspath.xml
+++ b/src/libudev/udev_device_new_from_syspath.xml
diff --git a/man/udev_enumerate_add_match_subsystem.xml b/src/libudev/udev_enumerate_add_match_subsystem.xml
index 5acce00bb0..5acce00bb0 100644
--- a/man/udev_enumerate_add_match_subsystem.xml
+++ b/src/libudev/udev_enumerate_add_match_subsystem.xml
diff --git a/man/udev_enumerate_new.xml b/src/libudev/udev_enumerate_new.xml
index b5856c5577..b5856c5577 100644
--- a/man/udev_enumerate_new.xml
+++ b/src/libudev/udev_enumerate_new.xml
diff --git a/man/udev_enumerate_scan_devices.xml b/src/libudev/udev_enumerate_scan_devices.xml
index e0b6bfba32..e0b6bfba32 100644
--- a/man/udev_enumerate_scan_devices.xml
+++ b/src/libudev/udev_enumerate_scan_devices.xml
diff --git a/man/udev_list_entry.xml b/src/libudev/udev_list_entry.xml
index a1b531d52a..a1b531d52a 100644
--- a/man/udev_list_entry.xml
+++ b/src/libudev/udev_list_entry.xml
diff --git a/man/udev_monitor_filter_update.xml b/src/libudev/udev_monitor_filter_update.xml
index f129595618..f129595618 100644
--- a/man/udev_monitor_filter_update.xml
+++ b/src/libudev/udev_monitor_filter_update.xml
diff --git a/man/udev_monitor_new_from_netlink.xml b/src/libudev/udev_monitor_new_from_netlink.xml
index d73a4acaec..d73a4acaec 100644
--- a/man/udev_monitor_new_from_netlink.xml
+++ b/src/libudev/udev_monitor_new_from_netlink.xml
diff --git a/man/udev_monitor_receive_device.xml b/src/libudev/udev_monitor_receive_device.xml
index 7e842f88df..7e842f88df 100644
--- a/man/udev_monitor_receive_device.xml
+++ b/src/libudev/udev_monitor_receive_device.xml
diff --git a/man/udev_new.xml b/src/libudev/udev_new.xml
index 587835a3ca..587835a3ca 100644
--- a/man/udev_new.xml
+++ b/src/libudev/udev_new.xml
diff --git a/src/locale/Makefile b/src/locale/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/locale/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/login/Makefile b/src/login/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/login/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/machine-id-setup/Makefile b/src/machine-id-setup/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/machine-id-setup/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/machine/Makefile b/src/machine/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/machine/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/manpages/GNUmakefile b/src/manpages/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/manpages/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/manpages/Makefile b/src/manpages/Makefile
new file mode 100644
index 0000000000..908e6e435c
--- /dev/null
+++ b/src/manpages/Makefile
@@ -0,0 +1,26 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/man/daemon.xml b/src/manpages/daemon.xml
index a649749683..a649749683 100644
--- a/man/daemon.xml
+++ b/src/manpages/daemon.xml
diff --git a/man/file-hierarchy.xml b/src/manpages/file-hierarchy.xml
index 538a592f8d..538a592f8d 100644
--- a/man/file-hierarchy.xml
+++ b/src/manpages/file-hierarchy.xml
diff --git a/man/hostname.xml b/src/manpages/hostname.xml
index 8a4c0d5ac0..8a4c0d5ac0 100644
--- a/man/hostname.xml
+++ b/src/manpages/hostname.xml
diff --git a/man/locale.conf.xml b/src/manpages/locale.conf.xml
index 2fe731113a..2fe731113a 100644
--- a/man/locale.conf.xml
+++ b/src/manpages/locale.conf.xml
diff --git a/man/localtime.xml b/src/manpages/localtime.xml
index 2827da6e93..2827da6e93 100644
--- a/man/localtime.xml
+++ b/src/manpages/localtime.xml
diff --git a/man/machine-id.xml b/src/manpages/machine-id.xml
index d318ec54ec..d318ec54ec 100644
--- a/man/machine-id.xml
+++ b/src/manpages/machine-id.xml
diff --git a/man/machine-info.xml b/src/manpages/machine-info.xml
index 351133670b..351133670b 100644
--- a/man/machine-info.xml
+++ b/src/manpages/machine-info.xml
diff --git a/man/os-release.xml b/src/manpages/os-release.xml
index 2811f434c5..2811f434c5 100644
--- a/man/os-release.xml
+++ b/src/manpages/os-release.xml
diff --git a/src/modules-load/Makefile b/src/modules-load/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/modules-load/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/mount/Makefile b/src/mount/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/mount/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/network/Makefile b/src/network/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/network/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/notify/Makefile b/src/notify/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/notify/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/nspawn/Makefile b/src/nspawn/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/nspawn/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/nss-myhostname/GNUmakefile b/src/nss-myhostname/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/nss-myhostname/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/nss-myhostname/Makefile b/src/nss-myhostname/Makefile
index d0b0e8e008..3f87158794 120000..100644
--- a/src/nss-myhostname/Makefile
+++ b/src/nss-myhostname/Makefile
@@ -1 +1,47 @@
-../Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_MYHOSTNAME),)
+libnss_myhostname_la_SOURCES = \
+ src/nss-myhostname/nss-myhostname.sym \
+ src/nss-myhostname/nss-myhostname.c
+
+libnss_myhostname_la_LDFLAGS = \
+ -module \
+ -export-dynamic \
+ -avoid-version \
+ -shared \
+ -shrext .so.2 \
+ -Wl,--version-script=$(srcdir)/nss-myhostname.sym
+
+libnss_myhostname_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la
+
+rootlib_LTLIBRARIES += \
+ libnss_myhostname.la
+endif # HAVE_MYHOSTNAME
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c
index 11c27575c0..862ad2fcb5 100644
--- a/src/nss-myhostname/nss-myhostname.c
+++ b/src/nss-myhostname/nss-myhostname.c
@@ -24,14 +24,14 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "hostname-util.h"
-#include "local-addresses.h"
-#include "macro.h"
-#include "nss-util.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "sd-netlink/local-addresses.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/nss-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
/* We use 127.0.0.2 as IPv4 address. This has the advantage over
* 127.0.0.1 that it can be translated back to the local hostname. For
diff --git a/man/nss-myhostname.xml b/src/nss-myhostname/nss-myhostname.xml
index c25476ecc8..c25476ecc8 100644
--- a/man/nss-myhostname.xml
+++ b/src/nss-myhostname/nss-myhostname.xml
diff --git a/src/nss-mymachines/Makefile b/src/nss-mymachines/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/nss-mymachines/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/nss-resolve/Makefile b/src/nss-resolve/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/nss-resolve/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/nss-systemd/GNUmakefile b/src/nss-systemd/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/nss-systemd/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/nss-systemd/Makefile b/src/nss-systemd/Makefile
index d0b0e8e008..90bd0ce886 120000..100644
--- a/src/nss-systemd/Makefile
+++ b/src/nss-systemd/Makefile
@@ -1 +1,45 @@
-../Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+libnss_systemd_la_SOURCES = \
+ src/nss-systemd/nss-systemd.sym \
+ src/nss-systemd/nss-systemd.c
+
+libnss_systemd_la_LDFLAGS = \
+ -module \
+ -export-dynamic \
+ -avoid-version \
+ -shared \
+ -shrext .so.2 \
+ -Wl,--version-script=$(srcdir)/nss-systemd.sym
+
+libnss_systemd_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-basic.la
+
+rootlib_LTLIBRARIES += \
+ libnss_systemd.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c
index 17d04e958d..b23f805631 100644
--- a/src/nss-systemd/nss-systemd.c
+++ b/src/nss-systemd/nss-systemd.c
@@ -19,19 +19,19 @@
#include <nss.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "env-util.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "nss-util.h"
-#include "signal-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-common-errors.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/nss-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
#ifndef NOBODY_USER_NAME
#define NOBODY_USER_NAME "nobody"
diff --git a/man/nss-systemd.xml b/src/nss-systemd/nss-systemd.xml
index 71aed4df83..71aed4df83 100644
--- a/man/nss-systemd.xml
+++ b/src/nss-systemd/nss-systemd.xml
diff --git a/src/path/Makefile b/src/path/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/path/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/quotacheck/Makefile b/src/quotacheck/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/quotacheck/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/random-seed/Makefile b/src/random-seed/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/random-seed/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/rc-local-generator/Makefile b/src/rc-local-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/rc-local-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/remount-fs/Makefile b/src/remount-fs/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/remount-fs/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/reply-password/Makefile b/src/reply-password/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/reply-password/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/resolve/Makefile b/src/resolve/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/resolve/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/rfkill/Makefile b/src/rfkill/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/rfkill/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/run/Makefile b/src/run/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/run/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/shared/Makefile b/src/shared/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/shared/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/sleep/Makefile b/src/sleep/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/sleep/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/socket-proxy/Makefile b/src/socket-proxy/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/socket-proxy/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/sysctl/Makefile b/src/sysctl/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/sysctl/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/system-update-generator/Makefile b/src/system-update-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/system-update-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/systemctl/Makefile b/src/systemctl/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/systemctl/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/systemd-ask-password/GNUmakefile b/src/systemd-ask-password/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-ask-password/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-ask-password/Makefile b/src/systemd-ask-password/Makefile
new file mode 100644
index 0000000000..9b23b41513
--- /dev/null
+++ b/src/systemd-ask-password/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += systemd-ask-password
+systemd_ask_password_SOURCES = \
+ src/ask-password/ask-password.c
+
+systemd_ask_password_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/ask-password/ask-password.c b/src/systemd-ask-password/ask-password.c
index 6d53dd982c..ee29d1c558 100644
--- a/src/ask-password/ask-password.c
+++ b/src/systemd-ask-password/ask-password.c
@@ -22,11 +22,11 @@
#include <stddef.h>
#include <unistd.h>
-#include "ask-password-api.h"
-#include "def.h"
-#include "log.h"
-#include "macro.h"
-#include "strv.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/ask-password-api.h"
static const char *arg_icon = NULL;
static const char *arg_id = NULL;
diff --git a/src/systemd-ask-password/systemd-ask-password.completion.zsh b/src/systemd-ask-password/systemd-ask-password.completion.zsh
new file mode 100644
index 0000000000..fa68159256
--- /dev/null
+++ b/src/systemd-ask-password/systemd-ask-password.completion.zsh
@@ -0,0 +1,12 @@
+#compdef systemd-ask-password
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--icon=[Icon name]:icon name:' \
+ '--timeout=[Timeout in sec]:timeout (seconds):' \
+ '--no-tty[Ask question via agent even on TTY]' \
+ '--accept-cached[Accept cached passwords]' \
+ '--multiple[List multiple passwords if available]'
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-ask-password.xml b/src/systemd-ask-password/systemd-ask-password.xml
index 2b6fb5a82f..2b6fb5a82f 100644
--- a/man/systemd-ask-password.xml
+++ b/src/systemd-ask-password/systemd-ask-password.xml
diff --git a/src/systemd-cgls/GNUmakefile b/src/systemd-cgls/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-cgls/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-cgls/Makefile b/src/systemd-cgls/Makefile
new file mode 100644
index 0000000000..1ef82d8aef
--- /dev/null
+++ b/src/systemd-cgls/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-cgls
+systemd_cgls_SOURCES = \
+ src/cgls/cgls.c
+
+systemd_cgls_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/cgls/cgls.c b/src/systemd-cgls/cgls.c
index adf488e8e1..818f3a6873 100644
--- a/src/cgls/cgls.c
+++ b/src/systemd-cgls/cgls.c
@@ -23,20 +23,20 @@
#include <string.h>
#include <unistd.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "cgroup-show.h"
-#include "cgroup-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "output-mode.h"
-#include "pager.h"
-#include "path-util.h"
-#include "unit-name.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/cgroup-show.h"
+#include "systemd-shared/output-mode.h"
+#include "systemd-shared/pager.h"
static bool arg_no_pager = false;
static bool arg_kernel_threads = false;
diff --git a/shell-completion/bash/systemd-cgls b/src/systemd-cgls/systemd-cgls.completion.bash
index 0570438660..0570438660 100644
--- a/shell-completion/bash/systemd-cgls
+++ b/src/systemd-cgls/systemd-cgls.completion.bash
diff --git a/src/systemd-cgls/systemd-cgls.completion.zsh b/src/systemd-cgls/systemd-cgls.completion.zsh
new file mode 100644
index 0000000000..c8f93fa732
--- /dev/null
+++ b/src/systemd-cgls/systemd-cgls.completion.zsh
@@ -0,0 +1,12 @@
+#compdef systemd-cgls
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--version[Show package version]' \
+ '--no-pager[Do not pipe output into a pager]' \
+ {-a,--all}'[Show all groups, including empty]' \
+ '-k[Include kernel threads in output]' \
+ ':cgroups:(cpuset cpu cpuacct memory devices freezer blkio)'
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-cgls.xml b/src/systemd-cgls/systemd-cgls.xml
index e8f0368f48..e8f0368f48 100644
--- a/man/systemd-cgls.xml
+++ b/src/systemd-cgls/systemd-cgls.xml
diff --git a/src/systemd-cgtop/GNUmakefile b/src/systemd-cgtop/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-cgtop/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-cgtop/Makefile b/src/systemd-cgtop/Makefile
new file mode 100644
index 0000000000..abebe7f3d0
--- /dev/null
+++ b/src/systemd-cgtop/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-cgtop
+systemd_cgtop_SOURCES = \
+ src/cgtop/cgtop.c
+
+systemd_cgtop_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/cgtop/cgtop.c b/src/systemd-cgtop/cgtop.c
index aba17c9829..53c8f1b848 100644
--- a/src/cgtop/cgtop.c
+++ b/src/systemd-cgtop/cgtop.c
@@ -26,22 +26,22 @@
#include <string.h>
#include <unistd.h>
-#include "sd-bus.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "cgroup-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hashmap.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "stdio-util.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
typedef struct Group {
char *path;
diff --git a/shell-completion/bash/systemd-cgtop b/src/systemd-cgtop/systemd-cgtop.completion.bash
index f1ed22fd55..f1ed22fd55 100644
--- a/shell-completion/bash/systemd-cgtop
+++ b/src/systemd-cgtop/systemd-cgtop.completion.bash
diff --git a/src/systemd-cgtop/systemd-cgtop.completion.zsh b/src/systemd-cgtop/systemd-cgtop.completion.zsh
new file mode 100644
index 0000000000..f6e1b2422a
--- /dev/null
+++ b/src/systemd-cgtop/systemd-cgtop.completion.zsh
@@ -0,0 +1,17 @@
+#compdef systemd-cgtop
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--version[Print version and exit]' \
+ '(-c -m -i -t)-p[Order by path]' \
+ '(-c -p -m -i)-t[Order by number of tasks]' \
+ '(-m -p -i -t)-c[Order by CPU load]' \
+ '(-c -p -i -t)-m[Order by memory load]' \
+ '(-c -m -p -t)-i[Order by IO load]' \
+ {-d+,--delay=}'[Specify delay]:delay:' \
+ {-n+,--iterations=}'[Run for N iterations before exiting]:number of iterations:' \
+ {-b,--batch}'[Run in batch mode, accepting no input]' \
+ '--depth=[Maximum traversal depth]:maximum depth:'
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-cgtop.xml b/src/systemd-cgtop/systemd-cgtop.xml
index be13631239..be13631239 100644
--- a/man/systemd-cgtop.xml
+++ b/src/systemd-cgtop/systemd-cgtop.xml
diff --git a/src/systemd-cryptsetup/GNUmakefile b/src/systemd-cryptsetup/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-cryptsetup/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-cryptsetup/Makefile b/src/systemd-cryptsetup/Makefile
new file mode 100644
index 0000000000..f4c8afad96
--- /dev/null
+++ b/src/systemd-cryptsetup/Makefile
@@ -0,0 +1,58 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_LIBCRYPTSETUP),)
+rootlibexec_PROGRAMS += \
+ systemd-cryptsetup
+
+systemgenerator_PROGRAMS += \
+ systemd-cryptsetup-generator
+
+dist_systemunit_DATA += \
+ units/cryptsetup.target \
+ units/cryptsetup-pre.target
+
+systemd_cryptsetup_SOURCES = \
+ src/cryptsetup/cryptsetup.c
+
+systemd_cryptsetup_CFLAGS = \
+ $(LIBCRYPTSETUP_CFLAGS)
+
+systemd_cryptsetup_LDADD = \
+ libsystemd-shared.la \
+ $(LIBCRYPTSETUP_LIBS)
+
+systemd_cryptsetup_generator_SOURCES = \
+ src/cryptsetup/cryptsetup-generator.c
+
+systemd_cryptsetup_generator_LDADD = \
+ libsystemd-shared.la
+
+SYSINIT_TARGET_WANTS += \
+ cryptsetup.target
+
+endif # HAVE_LIBCRYPTSETUP
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/systemd-cryptsetup/cryptsetup-generator.c
index e2dc4327fe..6356218ff4 100644
--- a/src/cryptsetup/cryptsetup-generator.c
+++ b/src/systemd-cryptsetup/cryptsetup-generator.c
@@ -19,22 +19,22 @@
#include <errno.h>
-#include "alloc-util.h"
-#include "dropin.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fstab-util.h"
-#include "generator.h"
-#include "hashmap.h"
-#include "log.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/dropin.h"
+#include "systemd-shared/fstab-util.h"
+#include "systemd-shared/generator.h"
typedef struct crypto_device {
char *uuid;
diff --git a/units/cryptsetup-pre.target b/src/systemd-cryptsetup/cryptsetup-pre.target
index 65353419fc..65353419fc 100644
--- a/units/cryptsetup-pre.target
+++ b/src/systemd-cryptsetup/cryptsetup-pre.target
diff --git a/src/cryptsetup/cryptsetup.c b/src/systemd-cryptsetup/cryptsetup.c
index ff5a3f36fb..c10299b0d4 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/systemd-cryptsetup/cryptsetup.c
@@ -23,20 +23,19 @@
#include <string.h>
#include <sys/mman.h>
-#include "sd-device.h"
-
-#include "alloc-util.h"
-#include "ask-password-api.h"
-#include "device-util.h"
-#include "escape.h"
-#include "fileio.h"
-#include "log.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "sd-device/device-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/ask-password-api.h"
+#include "systemd-staging/sd-device.h"
static const char *arg_type = NULL; /* CRYPT_LUKS1, CRYPT_TCRYPT or CRYPT_PLAIN */
static char *arg_cipher = NULL;
diff --git a/units/cryptsetup.target b/src/systemd-cryptsetup/cryptsetup.target
index 25d3e33f6a..25d3e33f6a 100644
--- a/units/cryptsetup.target
+++ b/src/systemd-cryptsetup/cryptsetup.target
diff --git a/man/crypttab.xml b/src/systemd-cryptsetup/crypttab.xml
index 17976f3704..17976f3704 100644
--- a/man/crypttab.xml
+++ b/src/systemd-cryptsetup/crypttab.xml
diff --git a/man/systemd-cryptsetup-generator.xml b/src/systemd-cryptsetup/systemd-cryptsetup-generator.xml
index f036ab9744..f036ab9744 100644
--- a/man/systemd-cryptsetup-generator.xml
+++ b/src/systemd-cryptsetup/systemd-cryptsetup-generator.xml
diff --git a/man/systemd-cryptsetup@.service.xml b/src/systemd-cryptsetup/systemd-cryptsetup@.service.xml
index ea524851eb..ea524851eb 100644
--- a/man/systemd-cryptsetup@.service.xml
+++ b/src/systemd-cryptsetup/systemd-cryptsetup@.service.xml
diff --git a/src/systemd-debug-generator/GNUmakefile b/src/systemd-debug-generator/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-debug-generator/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-debug-generator/Makefile b/src/systemd-debug-generator/Makefile
new file mode 100644
index 0000000000..542d8b5a5a
--- /dev/null
+++ b/src/systemd-debug-generator/Makefile
@@ -0,0 +1,34 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemgenerator_PROGRAMS += systemd-debug-generator
+
+systemd_debug_generator_SOURCES = \
+ src/debug-generator/debug-generator.c
+
+systemd_debug_generator_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/debug-generator/debug-generator.c b/src/systemd-debug-generator/debug-generator.c
index 7f11ec724d..88324894ac 100644
--- a/src/debug-generator/debug-generator.c
+++ b/src/systemd-debug-generator/debug-generator.c
@@ -17,15 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "mkdir.h"
-#include "parse-util.h"
-#include "proc-cmdline.h"
-#include "special.h"
-#include "string-util.h"
-#include "strv.h"
-#include "unit-name.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
static char *arg_default_unit = NULL;
static const char *arg_dest = "/tmp";
diff --git a/man/systemd-debug-generator.xml b/src/systemd-debug-generator/systemd-debug-generator.xml
index 5c5e9fc4a1..5c5e9fc4a1 100644
--- a/man/systemd-debug-generator.xml
+++ b/src/systemd-debug-generator/systemd-debug-generator.xml
diff --git a/src/systemd-getty-generator/GNUmakefile b/src/systemd-getty-generator/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-getty-generator/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-getty-generator/Makefile b/src/systemd-getty-generator/Makefile
new file mode 100644
index 0000000000..645dc189f7
--- /dev/null
+++ b/src/systemd-getty-generator/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemgenerator_PROGRAMS += systemd-getty-generator
+systemd_getty_generator_SOURCES = \
+ src/getty-generator/getty-generator.c
+
+systemd_getty_generator_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/getty-generator/getty-generator.c b/src/systemd-getty-generator/getty-generator.c
index b15c76b5b8..6e60cbab4f 100644
--- a/src/getty-generator/getty-generator.c
+++ b/src/systemd-getty-generator/getty-generator.c
@@ -22,18 +22,18 @@
#include <string.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "unit-name.h"
-#include "util.h"
-#include "virt.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
static const char *arg_dest = "/tmp";
diff --git a/man/systemd-getty-generator.xml b/src/systemd-getty-generator/systemd-getty-generator.xml
index 338925964d..338925964d 100644
--- a/man/systemd-getty-generator.xml
+++ b/src/systemd-getty-generator/systemd-getty-generator.xml
diff --git a/src/systemd-gpt-auto-generator/GNUmakefile b/src/systemd-gpt-auto-generator/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-gpt-auto-generator/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-gpt-auto-generator/Makefile b/src/systemd-gpt-auto-generator/Makefile
new file mode 100644
index 0000000000..ce6b56f998
--- /dev/null
+++ b/src/systemd-gpt-auto-generator/Makefile
@@ -0,0 +1,42 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(HAVE_BLKID),)
+systemgenerator_PROGRAMS += \
+ systemd-gpt-auto-generator
+
+systemd_gpt_auto_generator_SOURCES = \
+ src/gpt-auto-generator/gpt-auto-generator.c \
+ src/basic/blkid-util.h
+
+systemd_gpt_auto_generator_LDADD = \
+ libsystemd-shared.la \
+ $(BLKID_LIBS)
+
+systemd_gpt_auto_generator_CFLAGS = \
+ $(BLKID_CFLAGS)
+endif # HAVE_BLKID
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/systemd-gpt-auto-generator/gpt-auto-generator.c
index a098b27a8e..325b85b58e 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/systemd-gpt-auto-generator/gpt-auto-generator.c
@@ -22,32 +22,32 @@
#include <sys/statfs.h>
#include <unistd.h>
-#include "libudev.h"
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "blkid-util.h"
-#include "btrfs-util.h"
-#include "dirent-util.h"
-#include "efivars.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fstab-util.h"
-#include "generator.h"
-#include "gpt.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "proc-cmdline.h"
-#include "special.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "udev-util.h"
-#include "unit-name.h"
-#include "util.h"
-#include "virt.h"
+#include <libudev.h>
+#include <systemd/sd-id128.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-blkid/blkid-util.h"
+#include "systemd-shared/efivars.h"
+#include "systemd-shared/fstab-util.h"
+#include "systemd-shared/generator.h"
+#include "systemd-shared/gpt.h"
+#include "systemd-shared/udev-util.h"
static const char *arg_dest = "/tmp";
static bool arg_enabled = true;
diff --git a/man/systemd-gpt-auto-generator.xml b/src/systemd-gpt-auto-generator/systemd-gpt-auto-generator.xml
index d26206710f..d26206710f 100644
--- a/man/systemd-gpt-auto-generator.xml
+++ b/src/systemd-gpt-auto-generator/systemd-gpt-auto-generator.xml
diff --git a/src/systemd-initctl/GNUmakefile b/src/systemd-initctl/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-initctl/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-initctl/Makefile b/src/systemd-initctl/Makefile
new file mode 100644
index 0000000000..18d66993b7
--- /dev/null
+++ b/src/systemd-initctl/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-initctl
+systemd_initctl_SOURCES = \
+ src/initctl/initctl.c
+
+systemd_initctl_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/initctl/initctl.c b/src/systemd-initctl/initctl.c
index 41b2237d16..fa91d8f3a0 100644
--- a/src/initctl/initctl.c
+++ b/src/systemd-initctl/initctl.c
@@ -23,20 +23,20 @@
#include <sys/epoll.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "bus-error.h"
-#include "bus-util.h"
-#include "def.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "initreq.h"
-#include "list.h"
-#include "log.h"
-#include "special.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-daemon.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/initreq.h"
#define SERVER_FD_MAX 16
#define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC))
diff --git a/units/systemd-initctl.service.in b/src/systemd-initctl/systemd-initctl.service.in
index 27e663c8dc..27e663c8dc 100644
--- a/units/systemd-initctl.service.in
+++ b/src/systemd-initctl/systemd-initctl.service.in
diff --git a/man/systemd-initctl.service.xml b/src/systemd-initctl/systemd-initctl.service.xml
index 5c7f9a4a16..5c7f9a4a16 100644
--- a/man/systemd-initctl.service.xml
+++ b/src/systemd-initctl/systemd-initctl.service.xml
diff --git a/units/systemd-initctl.socket b/src/systemd-initctl/systemd-initctl.socket
index f628c2e867..f628c2e867 100644
--- a/units/systemd-initctl.socket
+++ b/src/systemd-initctl/systemd-initctl.socket
diff --git a/src/systemd-machine-id-setup/GNUmakefile b/src/systemd-machine-id-setup/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-machine-id-setup/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-machine-id-setup/Makefile b/src/systemd-machine-id-setup/Makefile
new file mode 100644
index 0000000000..4cbba418ff
--- /dev/null
+++ b/src/systemd-machine-id-setup/Makefile
@@ -0,0 +1,38 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += systemd-machine-id-setup
+systemd_machine_id_setup_SOURCES = \
+ src/machine-id-setup/machine-id-setup-main.c \
+ src/core/machine-id-setup.c \
+ src/core/machine-id-setup.h
+
+systemd_machine_id_setup_LDADD = \
+ libsystemd-shared.la
+
+SYSINIT_TARGET_WANTS += \
+ systemd-machine-id-commit.service
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/machine-id-setup/machine-id-setup-main.c b/src/systemd-machine-id-setup/machine-id-setup-main.c
index cc9b1b38fe..bde4d4faa6 100644
--- a/src/machine-id-setup/machine-id-setup-main.c
+++ b/src/systemd-machine-id-setup/machine-id-setup-main.c
@@ -22,10 +22,10 @@
#include <stdio.h>
#include <stdlib.h>
-#include "log.h"
-#include "machine-id-setup.h"
-#include "path-util.h"
-#include "util.h"
+#include "core/machine-id-setup.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/util.h"
static char *arg_root = NULL;
static bool arg_commit = false;
diff --git a/man/systemd-machine-id-commit.service.xml b/src/systemd-machine-id-setup/systemd-machine-id-commit.service.xml
index 39da1922cc..39da1922cc 100644
--- a/man/systemd-machine-id-commit.service.xml
+++ b/src/systemd-machine-id-setup/systemd-machine-id-commit.service.xml
diff --git a/src/systemd-machine-id-setup/systemd-machine-id-setup.completion.zsh b/src/systemd-machine-id-setup/systemd-machine-id-setup.completion.zsh
new file mode 100644
index 0000000000..d575649394
--- /dev/null
+++ b/src/systemd-machine-id-setup/systemd-machine-id-setup.completion.zsh
@@ -0,0 +1,8 @@
+#compdef systemd-machine-id-setup
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Show this help]' \
+ '--version[Show package version]'
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-machine-id-setup.xml b/src/systemd-machine-id-setup/systemd-machine-id-setup.xml
index 944e899bd4..944e899bd4 100644
--- a/man/systemd-machine-id-setup.xml
+++ b/src/systemd-machine-id-setup/systemd-machine-id-setup.xml
diff --git a/src/systemd-mount/GNUmakefile b/src/systemd-mount/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-mount/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-mount/Makefile b/src/systemd-mount/Makefile
new file mode 100644
index 0000000000..cbaa737f70
--- /dev/null
+++ b/src/systemd-mount/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-mount
+systemd_mount_SOURCES = \
+ src/mount/mount-tool.c
+
+systemd_mount_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/mount/mount-tool.c b/src/systemd-mount/mount-tool.c
index 80bba086e4..6c65fd45d1 100644
--- a/src/mount/mount-tool.c
+++ b/src/systemd-mount/mount-tool.c
@@ -19,22 +19,22 @@
#include <getopt.h>
-#include "libudev.h"
-#include "sd-bus.h"
-
-#include "bus-error.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
-#include "escape.h"
-#include "fstab-util.h"
-#include "pager.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "spawn-polkit-agent.h"
-#include "strv.h"
-#include "udev-util.h"
-#include "unit-name.h"
-#include "terminal-util.h"
+#include <libudev.h>
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-shared/bus-unit-util.h"
+#include "systemd-shared/fstab-util.h"
+#include "systemd-shared/pager.h"
+#include "systemd-shared/spawn-polkit-agent.h"
+#include "systemd-shared/udev-util.h"
enum {
ACTION_DEFAULT,
diff --git a/man/systemd-mount.xml b/src/systemd-mount/systemd-mount.xml
index 06b7c85bd8..06b7c85bd8 100644
--- a/man/systemd-mount.xml
+++ b/src/systemd-mount/systemd-mount.xml
diff --git a/src/nspawn/.gitignore b/src/systemd-nspawn/.gitignore
index 85c81fff24..85c81fff24 100644
--- a/src/nspawn/.gitignore
+++ b/src/systemd-nspawn/.gitignore
diff --git a/src/systemd-nspawn/GNUmakefile b/src/systemd-nspawn/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-nspawn/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile
new file mode 100644
index 0000000000..c0fc3bd98e
--- /dev/null
+++ b/src/systemd-nspawn/Makefile
@@ -0,0 +1,93 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-nspawn
+systemd_nspawn_SOURCES = \
+ src/nspawn/nspawn.c \
+ src/nspawn/nspawn-settings.c \
+ src/nspawn/nspawn-settings.h \
+ src/nspawn/nspawn-mount.c \
+ src/nspawn/nspawn-mount.h \
+ src/nspawn/nspawn-network.c \
+ src/nspawn/nspawn-network.h \
+ src/nspawn/nspawn-expose-ports.c \
+ src/nspawn/nspawn-expose-ports.h \
+ src/nspawn/nspawn-cgroup.c \
+ src/nspawn/nspawn-cgroup.h \
+ src/nspawn/nspawn-seccomp.c \
+ src/nspawn/nspawn-seccomp.h \
+ src/nspawn/nspawn-register.c \
+ src/nspawn/nspawn-register.h \
+ src/nspawn/nspawn-setuid.c \
+ src/nspawn/nspawn-setuid.h \
+ src/nspawn/nspawn-stub-pid1.c \
+ src/nspawn/nspawn-stub-pid1.h \
+ src/nspawn/nspawn-patch-uid.c \
+ src/nspawn/nspawn-patch-uid.h \
+ src/core/mount-setup.c \
+ src/core/mount-setup.h \
+ src/core/loopback-setup.c \
+ src/core/loopback-setup.h
+
+nodist_systemd_nspawn_SOURCES = \
+ src/nspawn/nspawn-gperf.c
+
+gperf_gperf_sources += \
+ src/nspawn/nspawn-gperf.gperf
+
+systemd_nspawn_CFLAGS = \
+ $(ACL_CFLAGS) \
+ $(BLKID_CFLAGS) \
+ $(SECCOMP_CFLAGS) \
+ $(SELINUX_CFLAGS)
+
+systemd_nspawn_LDADD = \
+ libsystemd-shared.la \
+ $(ACL_LIBS) \
+ $(BLKID_LIBS) \
+ $(SECCOMP_LIBS) \
+ $(SELINUX_LIBS)
+
+ifneq ($(HAVE_LIBIPTC),)
+systemd_nspawn_LDADD += \
+ libsystemd-firewall.la
+endif # HAVE_LIBIPTC
+
+test_patch_uid_SOURCES = \
+ src/nspawn/nspawn-patch-uid.c \
+ src/nspawn/nspawn-patch-uid.h \
+ src/nspawn/test-patch-uid.c
+
+test_patch_uid_CFLAGS = \
+ $(ACL_CFLAGS)
+
+test_patch_uid_LDADD = \
+ libsystemd-shared.la \
+ $(ACL_LIBS)
+
+manual_tests += \
+ test-patch-uid
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/nspawn/nspawn-cgroup.c b/src/systemd-nspawn/nspawn-cgroup.c
index 5274767b96..9e793d85f1 100644
--- a/src/nspawn/nspawn-cgroup.c
+++ b/src/systemd-nspawn/nspawn-cgroup.c
@@ -19,16 +19,17 @@
#include <sys/mount.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "mkdir.h"
-#include "mount-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+
#include "nspawn-cgroup.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
static int chown_cgroup_path(const char *path, uid_t uid_shift) {
_cleanup_close_ int fd = -1;
diff --git a/src/nspawn/nspawn-cgroup.h b/src/systemd-nspawn/nspawn-cgroup.h
index fa4321ab43..6c0ddfc7de 100644
--- a/src/nspawn/nspawn-cgroup.h
+++ b/src/systemd-nspawn/nspawn-cgroup.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "cgroup-util.h"
+#include "systemd-basic/cgroup-util.h"
int chown_cgroup(pid_t pid, uid_t uid_shift);
int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift);
diff --git a/src/nspawn/nspawn-expose-ports.c b/src/systemd-nspawn/nspawn-expose-ports.c
index 86124b8779..1ecebe8e30 100644
--- a/src/nspawn/nspawn-expose-ports.c
+++ b/src/systemd-nspawn/nspawn-expose-ports.c
@@ -17,19 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "firewall-util.h"
-#include "in-addr-util.h"
-#include "local-addresses.h"
-#include "netlink-util.h"
+#include "sd-netlink/local-addresses.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-firewall/firewall-util.h"
+#include "systemd-staging/sd-netlink.h"
+
#include "nspawn-expose-ports.h"
-#include "parse-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "util.h"
int expose_port_parse(ExposePort **l, const char *s) {
diff --git a/src/nspawn/nspawn-expose-ports.h b/src/systemd-nspawn/nspawn-expose-ports.h
index 741ad9765c..61134fcba6 100644
--- a/src/nspawn/nspawn-expose-ports.h
+++ b/src/systemd-nspawn/nspawn-expose-ports.h
@@ -21,11 +21,11 @@
#include <inttypes.h>
-#include "sd-event.h"
-#include "sd-netlink.h"
+#include <systemd/sd-event.h>
-#include "in-addr-util.h"
-#include "list.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-staging/sd-netlink.h"
typedef struct ExposePort {
int protocol;
diff --git a/src/nspawn/nspawn-gperf.gperf b/src/systemd-nspawn/nspawn-gperf.gperf
index 3231a48d5a..0c1dd98ff6 100644
--- a/src/nspawn/nspawn-gperf.gperf
+++ b/src/systemd-nspawn/nspawn-gperf.gperf
@@ -1,8 +1,10 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
-#include "nspawn-settings.h"
+
+#include "systemd-shared/conf-parser.h"
+
#include "nspawn-expose-ports.h"
+#include "nspawn-settings.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/nspawn/nspawn-mount.c b/src/systemd-nspawn/nspawn-mount.c
index 2dabe2ae5b..aac04efd4b 100644
--- a/src/nspawn/nspawn-mount.c
+++ b/src/systemd-nspawn/nspawn-mount.c
@@ -18,26 +18,28 @@
***/
#include <sys/mount.h>
+
#include <linux/magic.h>
-#include "alloc-util.h"
-#include "escape.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "label.h"
-#include "mkdir.h"
-#include "mount-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/label.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "nspawn-mount.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "set.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
CustomMount* custom_mount_add(CustomMount **l, unsigned *n, CustomMountType t) {
CustomMount *c, *ret;
diff --git a/src/nspawn/nspawn-mount.h b/src/systemd-nspawn/nspawn-mount.h
index 7307a838a5..0d58439df3 100644
--- a/src/nspawn/nspawn-mount.h
+++ b/src/systemd-nspawn/nspawn-mount.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "cgroup-util.h"
+#include "systemd-basic/cgroup-util.h"
typedef enum VolatileMode {
VOLATILE_NO,
diff --git a/src/nspawn/nspawn-network.c b/src/systemd-nspawn/nspawn-network.c
index 428cc04de0..2e0760ec86 100644
--- a/src/nspawn/nspawn-network.c
+++ b/src/systemd-nspawn/nspawn-network.c
@@ -17,24 +17,26 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/veth.h>
#include <net/if.h>
-#include "libudev.h"
-#include "sd-id128.h"
-#include "sd-netlink.h"
+#include <linux/veth.h>
+
+#include <libudev.h>
+#include <systemd/sd-id128.h>
+
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/ether-addr-util.h"
+#include "systemd-basic/lockfile-util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/udev-util.h"
+#include "systemd-staging/sd-netlink.h"
-#include "alloc-util.h"
-#include "ether-addr-util.h"
-#include "lockfile-util.h"
-#include "netlink-util.h"
#include "nspawn-network.h"
-#include "siphash24.h"
-#include "socket-util.h"
-#include "stat-util.h"
-#include "string-util.h"
-#include "udev-util.h"
-#include "util.h"
#define HOST_HASH_KEY SD_ID128_MAKE(1a,37,6f,c7,46,ec,45,0b,ad,a3,d5,31,06,60,5d,b1)
#define CONTAINER_HASH_KEY SD_ID128_MAKE(c3,c4,f9,19,b5,57,b2,1c,e6,cf,14,27,03,9c,ee,a2)
diff --git a/src/nspawn/nspawn-network.h b/src/systemd-nspawn/nspawn-network.h
index 3d8861e1e5..3d8861e1e5 100644
--- a/src/nspawn/nspawn-network.h
+++ b/src/systemd-nspawn/nspawn-network.h
diff --git a/src/nspawn/nspawn-patch-uid.c b/src/systemd-nspawn/nspawn-patch-uid.c
index ded5866d05..ef297ed915 100644
--- a/src/nspawn/nspawn-patch-uid.c
+++ b/src/systemd-nspawn/nspawn-patch-uid.c
@@ -18,6 +18,7 @@
***/
#include <fcntl.h>
+
#include <linux/magic.h>
#ifdef HAVE_ACL
#include <sys/acl.h>
@@ -26,16 +27,17 @@
#include <sys/vfs.h>
#include <unistd.h>
-#include "acl-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "missing.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/acl-util.h"
+
#include "nspawn-patch-uid.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
#ifdef HAVE_ACL
diff --git a/src/nspawn/nspawn-patch-uid.h b/src/systemd-nspawn/nspawn-patch-uid.h
index 55d0990016..55d0990016 100644
--- a/src/nspawn/nspawn-patch-uid.h
+++ b/src/systemd-nspawn/nspawn-patch-uid.h
diff --git a/src/nspawn/nspawn-register.c b/src/systemd-nspawn/nspawn-register.c
index 06c56d9ec8..de3ee23f09 100644
--- a/src/nspawn/nspawn-register.c
+++ b/src/systemd-nspawn/nspawn-register.c
@@ -17,15 +17,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
+
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/bus-unit-util.h"
-#include "bus-error.h"
-#include "bus-unit-util.h"
-#include "bus-util.h"
#include "nspawn-register.h"
-#include "stat-util.h"
-#include "strv.h"
-#include "util.h"
int register_machine(
const char *machine_name,
diff --git a/src/nspawn/nspawn-register.h b/src/systemd-nspawn/nspawn-register.h
index 304c5a485b..c7a50f7477 100644
--- a/src/nspawn/nspawn-register.h
+++ b/src/systemd-nspawn/nspawn-register.h
@@ -21,7 +21,7 @@
#include <sys/types.h>
-#include "sd-id128.h"
+#include <systemd/sd-id128.h>
#include "nspawn-mount.h"
diff --git a/src/nspawn/nspawn-seccomp.c b/src/systemd-nspawn/nspawn-seccomp.c
index 03a397d30c..e5cfe789a1 100644
--- a/src/nspawn/nspawn-seccomp.c
+++ b/src/systemd-nspawn/nspawn-seccomp.c
@@ -18,18 +18,19 @@
***/
#include <errno.h>
-#include <linux/netlink.h>
#include <sys/capability.h>
#include <sys/types.h>
+#include <linux/netlink.h>
+
#ifdef HAVE_SECCOMP
#include <seccomp.h>
#endif
-#include "log.h"
+#include "systemd-basic/log.h"
#ifdef HAVE_SECCOMP
-#include "seccomp-util.h"
+#include "systemd-shared/seccomp-util.h"
#endif
#include "nspawn-seccomp.h"
diff --git a/src/nspawn/nspawn-seccomp.h b/src/systemd-nspawn/nspawn-seccomp.h
index 5bde16faf9..5bde16faf9 100644
--- a/src/nspawn/nspawn-seccomp.h
+++ b/src/systemd-nspawn/nspawn-seccomp.h
diff --git a/src/nspawn/nspawn-settings.c b/src/systemd-nspawn/nspawn-settings.c
index 09c8f070ba..6c1614b276 100644
--- a/src/nspawn/nspawn-settings.c
+++ b/src/systemd-nspawn/nspawn-settings.c
@@ -17,18 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "cap-list.h"
-#include "conf-parser.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
+
#include "nspawn-network.h"
#include "nspawn-settings.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
int settings_load(FILE *f, const char *path, Settings **ret) {
_cleanup_(settings_freep) Settings *s = NULL;
diff --git a/src/nspawn/nspawn-settings.h b/src/systemd-nspawn/nspawn-settings.h
index 4ae34f8e28..2e57072eec 100644
--- a/src/nspawn/nspawn-settings.h
+++ b/src/systemd-nspawn/nspawn-settings.h
@@ -21,7 +21,8 @@
#include <stdio.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
+
#include "nspawn-expose-ports.h"
#include "nspawn-mount.h"
diff --git a/src/nspawn/nspawn-setuid.c b/src/systemd-nspawn/nspawn-setuid.c
index b8e8e091c8..129d3acc5f 100644
--- a/src/nspawn/nspawn-setuid.c
+++ b/src/systemd-nspawn/nspawn-setuid.c
@@ -21,15 +21,16 @@
#include <sys/types.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "mkdir.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "nspawn-setuid.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "util.h"
static int spawn_getent(const char *database, const char *key, pid_t *rpid) {
int pipe_fds[2];
diff --git a/src/nspawn/nspawn-setuid.h b/src/systemd-nspawn/nspawn-setuid.h
index b4968ba1fc..b4968ba1fc 100644
--- a/src/nspawn/nspawn-setuid.h
+++ b/src/systemd-nspawn/nspawn-setuid.h
diff --git a/src/nspawn/nspawn-stub-pid1.c b/src/systemd-nspawn/nspawn-stub-pid1.c
index 2de87e3c63..36d7bfc7c4 100644
--- a/src/nspawn/nspawn-stub-pid1.c
+++ b/src/systemd-nspawn/nspawn-stub-pid1.c
@@ -21,13 +21,14 @@
#include <sys/unistd.h>
#include <sys/wait.h>
-#include "fd-util.h"
-#include "log.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/time-util.h"
+
#include "nspawn-stub-pid1.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "time-util.h"
-#include "def.h"
int stub_pid1(void) {
enum {
diff --git a/src/nspawn/nspawn-stub-pid1.h b/src/systemd-nspawn/nspawn-stub-pid1.h
index 36c1aaf5dd..36c1aaf5dd 100644
--- a/src/nspawn/nspawn-stub-pid1.h
+++ b/src/systemd-nspawn/nspawn-stub-pid1.h
diff --git a/src/nspawn/nspawn.c b/src/systemd-nspawn/nspawn.c
index 3300c00373..5a3624fad1 100644
--- a/src/nspawn/nspawn.c
+++ b/src/systemd-nspawn/nspawn.c
@@ -23,9 +23,10 @@
#include <errno.h>
#include <getopt.h>
#include <grp.h>
-#include <linux/loop.h>
#include <pwd.h>
#include <sched.h>
+
+#include <linux/loop.h>
#ifdef HAVE_SELINUX
#include <selinux/selinux.h>
#endif
@@ -40,36 +41,56 @@
#include <sys/types.h>
#include <unistd.h>
-#include "sd-daemon.h"
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "barrier.h"
-#include "base-filesystem.h"
-#include "blkid-util.h"
-#include "btrfs-util.h"
-#include "cap-list.h"
-#include "capability-util.h"
-#include "cgroup-util.h"
-#include "copy.h"
-#include "dev-setup.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fdset.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "gpt.h"
-#include "hostname-util.h"
-#include "id128-util.h"
-#include "log.h"
-#include "loopback-setup.h"
-#include "machine-image.h"
-#include "macro.h"
-#include "missing.h"
-#include "mkdir.h"
-#include "mount-util.h"
-#include "netlink-util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-id128.h>
+
+#include "core/loopback-setup.h"
+#include "sd-id128/id128-util.h"
+#include "sd-netlink/netlink-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/barrier.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/raw-clone.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/umask-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-blkid/blkid-util.h"
+#include "systemd-shared/base-filesystem.h"
+#include "systemd-shared/dev-setup.h"
+#include "systemd-shared/fdset.h"
+#include "systemd-shared/gpt.h"
+#include "systemd-shared/machine-image.h"
+#include "systemd-shared/ptyfwd.h"
+#include "systemd-shared/udev-util.h"
+
#include "nspawn-cgroup.h"
#include "nspawn-expose-ports.h"
#include "nspawn-mount.h"
@@ -80,25 +101,6 @@
#include "nspawn-settings.h"
#include "nspawn-setuid.h"
#include "nspawn-stub-pid1.h"
-#include "parse-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "ptyfwd.h"
-#include "random-util.h"
-#include "raw-clone.h"
-#include "rm-rf.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "stat-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "udev-util.h"
-#include "umask-util.h"
-#include "user-util.h"
-#include "util.h"
/* Note that devpts's gid= parameter parses GIDs as signed values, hence we stay away from the upper half of the 32bit
* UID range here. We leave a bit of room at the lower end and a lot of room at the upper end, so that other subsystems
diff --git a/shell-completion/bash/systemd-nspawn b/src/systemd-nspawn/systemd-nspawn.completion.bash
index ea4a5e1f43..ea4a5e1f43 100644
--- a/shell-completion/bash/systemd-nspawn
+++ b/src/systemd-nspawn/systemd-nspawn.completion.bash
diff --git a/shell-completion/zsh/_systemd-nspawn b/src/systemd-nspawn/systemd-nspawn.completion.zsh
index 77b2e7cd7c..77b2e7cd7c 100644
--- a/shell-completion/zsh/_systemd-nspawn
+++ b/src/systemd-nspawn/systemd-nspawn.completion.zsh
diff --git a/tmpfiles.d/systemd-nspawn.conf b/src/systemd-nspawn/systemd-nspawn.tmpfiles
index 78bd1c670e..78bd1c670e 100644
--- a/tmpfiles.d/systemd-nspawn.conf
+++ b/src/systemd-nspawn/systemd-nspawn.tmpfiles
diff --git a/man/systemd-nspawn.xml b/src/systemd-nspawn/systemd-nspawn.xml
index c449edee89..c449edee89 100644
--- a/man/systemd-nspawn.xml
+++ b/src/systemd-nspawn/systemd-nspawn.xml
diff --git a/units/systemd-nspawn@.service.in b/src/systemd-nspawn/systemd-nspawn@.service.in
index c8141639b6..c8141639b6 100644
--- a/units/systemd-nspawn@.service.in
+++ b/src/systemd-nspawn/systemd-nspawn@.service.in
diff --git a/src/nspawn/test-patch-uid.c b/src/systemd-nspawn/test-patch-uid.c
index 11c5321788..4297fea6fe 100644
--- a/src/nspawn/test-patch-uid.c
+++ b/src/systemd-nspawn/test-patch-uid.c
@@ -19,10 +19,11 @@
#include <stdlib.h>
-#include "log.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "nspawn-patch-uid.h"
-#include "user-util.h"
-#include "util.h"
int main(int argc, char *argv[]) {
uid_t shift, range;
diff --git a/src/systemd-rc-local-generator/GNUmakefile b/src/systemd-rc-local-generator/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-rc-local-generator/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-rc-local-generator/Makefile b/src/systemd-rc-local-generator/Makefile
new file mode 100644
index 0000000000..0e17ae7d94
--- /dev/null
+++ b/src/systemd-rc-local-generator/Makefile
@@ -0,0 +1,32 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemd_rc_local_generator_SOURCES = \
+ src/rc-local-generator/rc-local-generator.c
+
+systemd_rc_local_generator_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/rc-local-generator/rc-local-generator.c b/src/systemd-rc-local-generator/rc-local-generator.c
index 618bbe428d..d51ce61ac3 100644
--- a/src/rc-local-generator/rc-local-generator.c
+++ b/src/systemd-rc-local-generator/rc-local-generator.c
@@ -22,11 +22,11 @@
#include <stdio.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "log.h"
-#include "mkdir.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#ifndef RC_LOCAL_SCRIPT_PATH_START
#define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.d/rc.local"
diff --git a/src/systemd-remount-fs/GNUmakefile b/src/systemd-remount-fs/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-remount-fs/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-remount-fs/Makefile b/src/systemd-remount-fs/Makefile
new file mode 100644
index 0000000000..55cc776cdb
--- /dev/null
+++ b/src/systemd-remount-fs/Makefile
@@ -0,0 +1,35 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-remount-fs
+systemd_remount_fs_SOURCES = \
+ src/remount-fs/remount-fs.c \
+ src/core/mount-setup.c \
+ src/core/mount-setup.h
+
+systemd_remount_fs_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/remount-fs/remount-fs.c b/src/systemd-remount-fs/remount-fs.c
index c3bdcaf1da..90ae2688a2 100644
--- a/src/remount-fs/remount-fs.c
+++ b/src/systemd-remount-fs/remount-fs.c
@@ -25,15 +25,15 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "exit-status.h"
-#include "log.h"
-#include "mount-setup.h"
-#include "mount-util.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "strv.h"
-#include "util.h"
+#include "core/mount-setup.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
/* Goes through /etc/fstab and remounts all API file systems, applying
* options that are in /etc/fstab that systemd might not have
diff --git a/units/systemd-remount-fs.service.in b/src/systemd-remount-fs/systemd-remount-fs.service.in
index 8d9daacaa5..8d9daacaa5 100644
--- a/units/systemd-remount-fs.service.in
+++ b/src/systemd-remount-fs/systemd-remount-fs.service.in
diff --git a/man/systemd-remount-fs.service.xml b/src/systemd-remount-fs/systemd-remount-fs.service.xml
index 176f2b2d20..176f2b2d20 100644
--- a/man/systemd-remount-fs.service.xml
+++ b/src/systemd-remount-fs/systemd-remount-fs.service.xml
diff --git a/src/systemd-reply-password/GNUmakefile b/src/systemd-reply-password/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-reply-password/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-reply-password/Makefile b/src/systemd-reply-password/Makefile
new file mode 100644
index 0000000000..18514df027
--- /dev/null
+++ b/src/systemd-reply-password/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-reply-password
+systemd_reply_password_SOURCES = \
+ src/reply-password/reply-password.c
+
+systemd_reply_password_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/reply-password/reply-password.c b/src/systemd-reply-password/reply-password.c
index 17eab9772e..febabfedf7 100644
--- a/src/reply-password/reply-password.c
+++ b/src/systemd-reply-password/reply-password.c
@@ -23,12 +23,12 @@
#include <sys/socket.h>
#include <sys/un.h>
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static int send_on_socket(int fd, const char *socket_name, const void *packet, size_t size) {
union sockaddr_union sa = {
diff --git a/src/systemd-socket-proxyd/GNUmakefile b/src/systemd-socket-proxyd/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-socket-proxyd/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-socket-proxyd/Makefile b/src/systemd-socket-proxyd/Makefile
new file mode 100644
index 0000000000..31261392f1
--- /dev/null
+++ b/src/systemd-socket-proxyd/Makefile
@@ -0,0 +1,34 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootlibexec_PROGRAMS += systemd-socket-proxyd
+
+systemd_socket_proxyd_SOURCES = \
+ src/socket-proxy/socket-proxyd.c
+
+systemd_socket_proxyd_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/socket-proxy/socket-proxyd.c b/src/systemd-socket-proxyd/socket-proxyd.c
index 52b4db8875..6a11804694 100644
--- a/src/socket-proxy/socket-proxyd.c
+++ b/src/systemd-socket-proxyd/socket-proxyd.c
@@ -28,18 +28,18 @@
#include <sys/un.h>
#include <unistd.h>
-#include "sd-daemon.h"
-#include "sd-event.h"
-#include "sd-resolve.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "log.h"
-#include "path-util.h"
-#include "set.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-resolve.h"
#define BUFFER_SIZE (256 * 1024)
#define CONNECTIONS_MAX 256
diff --git a/man/systemd-socket-proxyd.xml b/src/systemd-socket-proxyd/systemd-socket-proxyd.xml
index ae4217b910..ae4217b910 100644
--- a/man/systemd-socket-proxyd.xml
+++ b/src/systemd-socket-proxyd/systemd-socket-proxyd.xml
diff --git a/src/systemd-stdio-bridge/GNUmakefile b/src/systemd-stdio-bridge/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-stdio-bridge/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-stdio-bridge/Makefile b/src/systemd-stdio-bridge/Makefile
new file mode 100644
index 0000000000..096d94b90a
--- /dev/null
+++ b/src/systemd-stdio-bridge/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+bin_PROGRAMS += systemd-stdio-bridge
+systemd_stdio_bridge_SOURCES = \
+ src/stdio-bridge/stdio-bridge.c
+
+systemd_stdio_bridge_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/stdio-bridge/stdio-bridge.c b/src/systemd-stdio-bridge/stdio-bridge.c
index ce8efce3d5..9aa17e861c 100644
--- a/src/stdio-bridge/stdio-bridge.c
+++ b/src/systemd-stdio-bridge/stdio-bridge.c
@@ -24,14 +24,14 @@
#include <string.h>
#include <unistd.h>
-#include "sd-bus.h"
-#include "sd-daemon.h"
-
-#include "bus-internal.h"
-#include "bus-util.h"
-#include "build.h"
-#include "log.h"
-#include "util.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-daemon.h>
+
+#include "sd-bus/bus-internal.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/build.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
#define DEFAULT_BUS_PATH "unix:path=/run/dbus/system_bus_socket"
diff --git a/src/systemd-system-update-generator/GNUmakefile b/src/systemd-system-update-generator/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-system-update-generator/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-system-update-generator/Makefile b/src/systemd-system-update-generator/Makefile
new file mode 100644
index 0000000000..5e66309753
--- /dev/null
+++ b/src/systemd-system-update-generator/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+systemgenerator_PROGRAMS += systemd-system-update-generator
+systemd_system_update_generator_SOURCES = \
+ src/system-update-generator/system-update-generator.c
+
+systemd_system_update_generator_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/system-update-generator/system-update-generator.c b/src/systemd-system-update-generator/system-update-generator.c
index a3d677f068..f66993811c 100644
--- a/src/system-update-generator/system-update-generator.c
+++ b/src/systemd-system-update-generator/system-update-generator.c
@@ -20,10 +20,10 @@
#include <errno.h>
#include <unistd.h>
-#include "fs-util.h"
-#include "log.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
/*
* Implements the logic described in
diff --git a/man/systemd-system-update-generator.xml b/src/systemd-system-update-generator/systemd-system-update-generator.xml
index 833ed79646..833ed79646 100644
--- a/man/systemd-system-update-generator.xml
+++ b/src/systemd-system-update-generator/systemd-system-update-generator.xml
diff --git a/src/timesync/.gitignore b/src/systemd-timesyncd/.gitignore
index 35f4d76f79..35f4d76f79 100644
--- a/src/timesync/.gitignore
+++ b/src/systemd-timesyncd/.gitignore
diff --git a/system-preset/90-timesyncd.preset b/src/systemd-timesyncd/90-timesyncd.preset
index b42460ef5e..b42460ef5e 100644
--- a/system-preset/90-timesyncd.preset
+++ b/src/systemd-timesyncd/90-timesyncd.preset
diff --git a/src/systemd-timesyncd/GNUmakefile b/src/systemd-timesyncd/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-timesyncd/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-timesyncd/Makefile b/src/systemd-timesyncd/Makefile
new file mode 100644
index 0000000000..8bea585e8c
--- /dev/null
+++ b/src/systemd-timesyncd/Makefile
@@ -0,0 +1,65 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_TIMESYNCD),)
+systemd_timesyncd_SOURCES = \
+ src/timesync/timesyncd.c \
+ src/timesync/timesyncd-manager.c \
+ src/timesync/timesyncd-manager.h \
+ src/timesync/timesyncd-conf.c \
+ src/timesync/timesyncd-conf.h \
+ src/timesync/timesyncd-server.c \
+ src/timesync/timesyncd-server.h
+
+nodist_systemd_timesyncd_SOURCES = \
+ src/timesync/timesyncd-gperf.c
+
+systemd_timesyncd_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la \
+ -lm
+
+rootlibexec_PROGRAMS += \
+ systemd-timesyncd
+
+nodist_systemunit_DATA += \
+ units/systemd-timesyncd.service
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/systemd-timesyncd.service $(pkgsysconfdir)/system/sysinit.target.wants/systemd-timesyncd.service
+
+nodist_pkgsysconf_DATA += \
+ src/timesync/timesyncd.conf
+
+endif # ENABLE_TIMESYNCD
+
+gperf_gperf_sources += \
+ src/timesync/timesyncd-gperf.gperf
+
+EXTRA_DIST += \
+ units/systemd-timesyncd.service.in \
+ src/timesync/timesyncd.conf.in
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/units/systemd-timesyncd.service.in b/src/systemd-timesyncd/systemd-timesyncd.service.in
index 9a6c6ea60d..9a6c6ea60d 100644
--- a/units/systemd-timesyncd.service.in
+++ b/src/systemd-timesyncd/systemd-timesyncd.service.in
diff --git a/man/systemd-timesyncd.service.xml b/src/systemd-timesyncd/systemd-timesyncd.service.xml
index 6ec384313b..6ec384313b 100644
--- a/man/systemd-timesyncd.service.xml
+++ b/src/systemd-timesyncd/systemd-timesyncd.service.xml
diff --git a/sysusers.d/systemd-timesyncd.conf b/src/systemd-timesyncd/systemd-timesyncd.sysusers
index 4d7af7b3ae..4d7af7b3ae 100644
--- a/sysusers.d/systemd-timesyncd.conf
+++ b/src/systemd-timesyncd/systemd-timesyncd.sysusers
diff --git a/src/timesync/timesyncd-conf.c b/src/systemd-timesyncd/timesyncd-conf.c
index bf25b112e1..4bc87709d1 100644
--- a/src/timesync/timesyncd-conf.c
+++ b/src/systemd-timesyncd/timesyncd-conf.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "def.h"
-#include "extract-word.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/string-util.h"
+
#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
#include "timesyncd-server.h"
diff --git a/src/timesync/timesyncd-conf.h b/src/systemd-timesyncd/timesyncd-conf.h
index 0280697e9c..af3aa629d3 100644
--- a/src/timesync/timesyncd-conf.h
+++ b/src/systemd-timesyncd/timesyncd-conf.h
@@ -19,7 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "conf-parser.h"
+#include "systemd-shared/conf-parser.h"
+
#include "timesyncd-manager.h"
const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
diff --git a/src/timesync/timesyncd-gperf.gperf b/src/systemd-timesyncd/timesyncd-gperf.gperf
index 29a2cfeef6..8956cc773d 100644
--- a/src/timesync/timesyncd-gperf.gperf
+++ b/src/systemd-timesyncd/timesyncd-gperf.gperf
@@ -1,6 +1,8 @@
%{
#include <stddef.h>
-#include "conf-parser.h"
+
+#include "systemd-shared/conf-parser.h"
+
#include "timesyncd-conf.h"
%}
struct ConfigPerfItem;
diff --git a/src/timesync/timesyncd-manager.c b/src/systemd-timesyncd/timesyncd-manager.c
index d5e16db3a0..687ef09ff3 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/systemd-timesyncd/timesyncd-manager.c
@@ -29,24 +29,25 @@
#include <sys/types.h>
#include <time.h>
-#include "sd-daemon.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "list.h"
-#include "log.h"
-#include "missing.h"
-#include "network-util.h"
-#include "ratelimit.h"
-#include "socket-util.h"
-#include "sparse-endian.h"
-#include "string-util.h"
-#include "strv.h"
-#include "time-util.h"
+#include <systemd/sd-daemon.h>
+
+#include "sd-network/network-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
+
#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
-#include "util.h"
#ifndef ADJ_SETOFFSET
#define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */
diff --git a/src/timesync/timesyncd-manager.h b/src/systemd-timesyncd/timesyncd-manager.h
index efe3e60d3e..9012801cd0 100644
--- a/src/timesync/timesyncd-manager.h
+++ b/src/systemd-timesyncd/timesyncd-manager.h
@@ -19,12 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
-#include "sd-network.h"
-#include "sd-resolve.h"
+#include <systemd/sd-event.h>
-#include "list.h"
-#include "ratelimit.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-staging/sd-network.h"
+#include "systemd-staging/sd-resolve.h"
typedef struct Manager Manager;
diff --git a/src/timesync/timesyncd-server.c b/src/systemd-timesyncd/timesyncd-server.c
index 57a7bf2c25..1a2138589b 100644
--- a/src/timesync/timesyncd-server.c
+++ b/src/systemd-timesyncd/timesyncd-server.c
@@ -17,7 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
+#include "systemd-basic/alloc-util.h"
+
#include "timesyncd-server.h"
int server_address_new(
diff --git a/src/timesync/timesyncd-server.h b/src/systemd-timesyncd/timesyncd-server.h
index 8a19e41d67..0a5c2c8bc4 100644
--- a/src/timesync/timesyncd-server.h
+++ b/src/systemd-timesyncd/timesyncd-server.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "list.h"
-#include "socket-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/socket-util.h"
typedef struct ServerAddress ServerAddress;
typedef struct ServerName ServerName;
diff --git a/src/timesync/timesyncd.c b/src/systemd-timesyncd/timesyncd.c
index b67d672a6a..047f455d18 100644
--- a/src/timesync/timesyncd.c
+++ b/src/systemd-timesyncd/timesyncd.c
@@ -17,18 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-daemon.h"
-#include "sd-event.h"
-
-#include "capability-util.h"
-#include "clock-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "network-util.h"
-#include "signal-util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-event.h>
+
+#include "sd-network/network-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/clock-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/user-util.h"
+
#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
-#include "user-util.h"
static int load_clock_timestamp(uid_t uid, gid_t gid) {
_cleanup_close_ int fd = -1;
diff --git a/src/timesync/timesyncd.conf.in b/src/systemd-timesyncd/timesyncd.conf.in
index b6a2ada273..b6a2ada273 100644
--- a/src/timesync/timesyncd.conf.in
+++ b/src/systemd-timesyncd/timesyncd.conf.in
diff --git a/man/timesyncd.conf.xml b/src/systemd-timesyncd/timesyncd.conf.xml
index 8c86fd0074..8c86fd0074 100644
--- a/man/timesyncd.conf.xml
+++ b/src/systemd-timesyncd/timesyncd.conf.xml
diff --git a/src/systemd-tty-ask-password-agent/GNUmakefile b/src/systemd-tty-ask-password-agent/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/systemd-tty-ask-password-agent/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/systemd-tty-ask-password-agent/Makefile b/src/systemd-tty-ask-password-agent/Makefile
new file mode 100644
index 0000000000..3091527a7f
--- /dev/null
+++ b/src/systemd-tty-ask-password-agent/Makefile
@@ -0,0 +1,33 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+rootbin_PROGRAMS += systemd-tty-ask-password-agent
+systemd_tty_ask_password_agent_SOURCES = \
+ src/tty-ask-password-agent/tty-ask-password-agent.c
+
+systemd_tty_ask_password_agent_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/man/systemd-ask-password-console.service.xml b/src/systemd-tty-ask-password-agent/systemd-ask-password-console.service.xml
index 479e5f2e5b..479e5f2e5b 100644
--- a/man/systemd-ask-password-console.service.xml
+++ b/src/systemd-tty-ask-password-agent/systemd-ask-password-console.service.xml
diff --git a/src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.completion.zsh b/src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.completion.zsh
new file mode 100644
index 0000000000..e7c0684996
--- /dev/null
+++ b/src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.completion.zsh
@@ -0,0 +1,14 @@
+#compdef systemd-tty-ask-password-agent
+
+local curcontext="$curcontext" state lstate line
+_arguments \
+ {-h,--help}'[Prints a short help text and exits.]' \
+ '--version[Prints a short version string and exits.]' \
+ '--list[Lists all currently pending system password requests.]' \
+ '--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \
+ '--watch[Continuously process password requests.]' \
+ '--wall[Forward password requests to wall(1).]' \
+ '--plymouth[Ask question with plymouth(8).]' \
+ '--console[Ask question on /dev/console.]'
+
+#vim: set ft=zsh sw=4 ts=4 et
diff --git a/man/systemd-tty-ask-password-agent.xml b/src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.xml
index 2876fab644..2876fab644 100644
--- a/man/systemd-tty-ask-password-agent.xml
+++ b/src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.xml
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/systemd-tty-ask-password-agent/tty-ask-password-agent.c
index b45490be1a..609944d6a4 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/systemd-tty-ask-password-agent/tty-ask-password-agent.c
@@ -30,31 +30,31 @@
#include <sys/prctl.h>
#include <sys/signalfd.h>
#include <sys/socket.h>
-#include <sys/wait.h>
#include <sys/un.h>
+#include <sys/wait.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "ask-password-api.h"
-#include "conf-parser.h"
-#include "def.h"
-#include "dirent-util.h"
-#include "exit-status.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hashmap.h"
-#include "io-util.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "process-util.h"
-#include "signal-util.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "terminal-util.h"
-#include "util.h"
-#include "utmp-wtmp.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/exit-status.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/ask-password-api.h"
+#include "systemd-shared/conf-parser.h"
+#include "systemd-shared/utmp-wtmp.h"
static enum {
ACTION_LIST,
diff --git a/src/systemd/Makefile b/src/systemd/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/systemd/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/sysusers/Makefile b/src/sysusers/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/sysusers/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/sysv-generator/Makefile b/src/sysv-generator/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/sysv-generator/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/test/GNUmakefile b/src/test/GNUmakefile
new file mode 120000
index 0000000000..54fdd42278
--- /dev/null
+++ b/src/test/GNUmakefile
@@ -0,0 +1 @@
+../../GNUmakefile \ No newline at end of file
diff --git a/src/test/Makefile b/src/test/Makefile
index d0b0e8e008..7c50a983ea 120000..100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -1 +1,35 @@
-../Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+test_id128_SOURCES = \
+ src/test/test-id128.c
+
+test_id128_LDADD = \
+ libsystemd-shared.la
+
+tests += \
+ test-id128
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c
index 5b572bb0bf..28b2e5e38c 100644
--- a/src/test/test-acl-util.c
+++ b/src/test/test-acl-util.c
@@ -22,11 +22,11 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "acl-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "string-util.h"
-#include "user-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-shared/acl-util.h"
static void test_add_acls_for_user(void) {
char fn[] = "/tmp/test-empty.XXXXXX";
diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c
index e2479133de..3a2ad12595 100644
--- a/src/test/test-af-list.c
+++ b/src/test/test-af-list.c
@@ -20,15 +20,15 @@
#include <string.h>
#include <sys/socket.h>
-#include "macro.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
#include "af-from-name.h"
-#include "af-list.h"
#include "af-to-name.h"
+#include "systemd-basic/af-list.h"
int main(int argc, const char *argv[]) {
diff --git a/src/test/test-alloc-util.c b/src/test/test-alloc-util.c
index cc4821eaf5..6ab6a19c3e 100644
--- a/src/test/test-alloc-util.c
+++ b/src/test/test-alloc-util.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
static void test_alloca(void) {
static const uint8_t zero[997] = { };
diff --git a/src/test/test-architecture.c b/src/test/test-architecture.c
index f41e488d99..0f0525436b 100644
--- a/src/test/test-architecture.c
+++ b/src/test/test-architecture.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "architecture.h"
-#include "log.h"
-#include "util.h"
-#include "virt.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
int main(int argc, char *argv[]) {
int a, v;
diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c
index 8f4f342faa..e394c80e7f 100644
--- a/src/test/test-arphrd-list.c
+++ b/src/test/test-arphrd-list.c
@@ -20,15 +20,15 @@
#include <net/if_arp.h>
#include <string.h>
-#include "macro.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
#include "arphrd-from-name.h"
-#include "arphrd-list.h"
#include "arphrd-to-name.h"
+#include "systemd-basic/arphrd-list.h"
int main(int argc, const char *argv[]) {
diff --git a/src/test/test-ask-password-api.c b/src/test/test-ask-password-api.c
index 86666597c7..c33f714989 100644
--- a/src/test/test-ask-password-api.c
+++ b/src/test/test-ask-password-api.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "ask-password-api.h"
-#include "log.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-shared/ask-password-api.h"
static void ask_password(void) {
int r;
diff --git a/src/test/test-async.c b/src/test/test-async.c
index 4ebc27f0bd..ba69670fe0 100644
--- a/src/test/test-async.c
+++ b/src/test/test-async.c
@@ -19,10 +19,10 @@
#include <unistd.h>
-#include "async.h"
-#include "fileio.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
static bool test_async = false;
diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c
index e6aa3b5cfe..56a0de0e83 100644
--- a/src/test/test-barrier.c
+++ b/src/test/test-barrier.c
@@ -31,8 +31,8 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "barrier.h"
-#include "util.h"
+#include "systemd-basic/barrier.h"
+#include "systemd-basic/util.h"
/* 20ms to test deadlocks; All timings use multiples of this constant as
* alarm/sleep timers. If this timeout is too small for slow machines to perform
diff --git a/src/test/test-bitmap.c b/src/test/test-bitmap.c
index ff22117745..ef8470b2e6 100644
--- a/src/test/test-bitmap.c
+++ b/src/test/test-bitmap.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "bitmap.h"
+#include "systemd-basic/bitmap.h"
int main(int argc, const char *argv[]) {
_cleanup_bitmap_free_ Bitmap *b = NULL, *b2 = NULL;
diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c
index 8e68d6510d..2347547f66 100644
--- a/src/test/test-boot-timestamps.c
+++ b/src/test/test-boot-timestamps.c
@@ -18,11 +18,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "acpi-fpdt.h"
-#include "boot-timestamps.h"
-#include "efivars.h"
-#include "log.h"
-#include "util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/acpi-fpdt.h"
+#include "systemd-shared/boot-timestamps.h"
+#include "systemd-shared/efivars.h"
static int test_acpi_fpdt(void) {
usec_t loader_start;
diff --git a/src/test/test-btrfs.c b/src/test/test-btrfs.c
index ce29d88412..648fe2296b 100644
--- a/src/test/test-btrfs.c
+++ b/src/test/test-btrfs.c
@@ -19,13 +19,13 @@
#include <fcntl.h>
-#include "btrfs-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "parse-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/btrfs-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
BtrfsQuotaInfo quota;
diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c
index 59217b131c..031d41fa99 100644
--- a/src/test/test-calendarspec.c
+++ b/src/test/test-calendarspec.c
@@ -19,10 +19,10 @@
#include <string.h>
-#include "alloc-util.h"
-#include "calendarspec.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/calendarspec.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static void test_one(const char *input, const char *output) {
CalendarSpec *c;
diff --git a/src/test/test-cap-list.c b/src/test/test-cap-list.c
index 4132ec56fd..2fd1ee75d5 100644
--- a/src/test/test-cap-list.c
+++ b/src/test/test-cap-list.c
@@ -19,12 +19,12 @@
#include <sys/prctl.h>
-#include "alloc-util.h"
-#include "cap-list.h"
-#include "capability-util.h"
-#include "fileio.h"
-#include "parse-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cap-list.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/util.h"
/* verify the capability parser */
static void test_cap_list(void) {
diff --git a/src/test/test-capability.c b/src/test/test-capability.c
index 629bb63c81..5bd53246d7 100644
--- a/src/test/test-capability.c
+++ b/src/test/test-capability.c
@@ -25,10 +25,10 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "capability-util.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
static uid_t test_uid = -1;
static gid_t test_gid = -1;
diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c
index a027eb0fd2..e4db250153 100644
--- a/src/test/test-cgroup-mask.c
+++ b/src/test/test-cgroup-mask.c
@@ -19,12 +19,13 @@
#include <stdio.h>
-#include "macro.h"
-#include "manager.h"
-#include "rm-rf.h"
+#include "core/manager.h"
+#include "core/unit.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-shared/tests.h"
+
#include "test-helper.h"
-#include "tests.h"
-#include "unit.h"
static int test_cgroup_mask(void) {
Manager *m = NULL;
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index c24c784e9b..fe9636c5c1 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -17,18 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "cgroup-util.h"
-#include "dirent-util.h"
-#include "fd-util.h"
-#include "formats-util.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "stat-util.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/dirent-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stat-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+
#include "test-helper.h"
-#include "user-util.h"
-#include "util.h"
static void check_p_d_u(const char *path, int code, const char *result) {
_cleanup_free_ char *unit = NULL;
diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c
index 5336c19652..4daa59f367 100644
--- a/src/test/test-cgroup.c
+++ b/src/test/test-cgroup.c
@@ -20,10 +20,10 @@
#include <string.h>
#include <unistd.h>
-#include "cgroup-util.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
int main(int argc, char*argv[]) {
char *path;
diff --git a/src/test/test-clock.c b/src/test/test-clock.c
index 7d97328416..51a6aada55 100644
--- a/src/test/test-clock.c
+++ b/src/test/test-clock.c
@@ -17,14 +17,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <unistd.h>
#include <fcntl.h>
+#include <unistd.h>
-#include "clock-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
+#include "systemd-basic/clock-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
static void test_clock_is_localtime(void) {
char adjtime[] = "/tmp/test-adjtime.XXXXXX";
diff --git a/src/test/test-condition.c b/src/test/test-condition.c
index dd985f5863..bbb4cc1bdd 100644
--- a/src/test/test-condition.c
+++ b/src/test/test-condition.c
@@ -17,23 +17,23 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "apparmor-util.h"
-#include "architecture.h"
-#include "audit-util.h"
-#include "condition.h"
-#include "hostname-util.h"
-#include "id128-util.h"
-#include "ima-util.h"
-#include "log.h"
-#include "macro.h"
-#include "selinux-util.h"
-#include "smack-util.h"
-#include "strv.h"
-#include "virt.h"
-#include "util.h"
+#include <systemd/sd-id128.h>
+
+#include "sd-id128/id128-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/audit-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/smack-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/apparmor-util.h"
+#include "systemd-shared/condition.h"
+#include "systemd-shared/ima-util.h"
static void test_condition_test_path(void) {
Condition *condition;
diff --git a/src/test/test-conf-files.c b/src/test/test-conf-files.c
index 03b3a9fa5c..0736b55d98 100644
--- a/src/test/test-conf-files.c
+++ b/src/test/test-conf-files.c
@@ -20,16 +20,16 @@
#include <stdarg.h>
#include <stdio.h>
-#include "alloc-util.h"
-#include "conf-files.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/conf-files.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
static void setup_test_dir(char *tmp_dir, const char *files, ...) {
va_list ap;
diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
index be5d2611f8..ff949406e8 100644
--- a/src/test/test-conf-parser.c
+++ b/src/test/test-conf-parser.c
@@ -17,12 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "conf-parser.h"
-#include "log.h"
-#include "macro.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/conf-parser.h"
static void test_config_parse_path_one(const char *rvalue, const char *expected) {
char *path = NULL;
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index ed1ea51dbd..5f6bcf19ef 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -19,19 +19,19 @@
#include <unistd.h>
-#include "alloc-util.h"
-#include "copy.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "log.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/copy.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static void test_copy_file(void) {
_cleanup_free_ char *buf = NULL;
diff --git a/src/test/test-cpu-set-util.c b/src/test/test-cpu-set-util.c
index 8818d1ffb7..6fc4ab6404 100644
--- a/src/test/test-cpu-set-util.c
+++ b/src/test/test-cpu-set-util.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "cpu-set-util.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/cpu-set-util.h"
+#include "systemd-basic/macro.h"
static void test_parse_cpu_set(void) {
cpu_set_t *c = NULL;
diff --git a/src/test/test-daemon.c b/src/test/test-daemon.c
index a7cb426282..a3740195ec 100644
--- a/src/test/test-daemon.c
+++ b/src/test/test-daemon.c
@@ -19,9 +19,9 @@
#include <unistd.h>
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
-#include "strv.h"
+#include "systemd-basic/strv.h"
int main(int argc, char*argv[]) {
_cleanup_strv_free_ char **l = NULL;
diff --git a/src/test/test-date.c b/src/test/test-date.c
index 7f497bb7d5..6edc820f38 100644
--- a/src/test/test-date.c
+++ b/src/test/test-date.c
@@ -19,9 +19,9 @@
#include <string.h>
-#include "alloc-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static void test_should_pass(const char *p) {
usec_t t, q;
diff --git a/src/test/test-device-nodes.c b/src/test/test-device-nodes.c
index af75b38948..a13ff0e903 100644
--- a/src/test/test-device-nodes.c
+++ b/src/test/test-device-nodes.c
@@ -19,10 +19,10 @@
#include <sys/types.h>
-#include "alloc-util.h"
-#include "device-nodes.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/device-nodes.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
/* helpers for test_encode_devnode_name */
static char *do_encode_string(const char *in) {
diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c
index e2f097c95e..20c6f1b759 100644
--- a/src/test/test-dns-domain.c
+++ b/src/test/test-dns-domain.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "dns-domain.h"
-#include "macro.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/dns-domain.h"
static void test_dns_label_unescape_one(const char *what, const char *expect, size_t buffer_sz, int ret) {
char buffer[buffer_sz];
diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c
index d4f09b08a5..9ac1669537 100644
--- a/src/test/test-ellipsize.c
+++ b/src/test/test-ellipsize.c
@@ -19,11 +19,11 @@
#include <stdio.h>
-#include "alloc-util.h"
-#include "def.h"
-#include "string-util.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
static void test_one(const char *p) {
_cleanup_free_ char *t;
diff --git a/src/test/test-engine.c b/src/test/test-engine.c
index a651f6b683..2f12daecf3 100644
--- a/src/test/test-engine.c
+++ b/src/test/test-engine.c
@@ -21,11 +21,12 @@
#include <stdio.h>
#include <string.h>
-#include "bus-util.h"
-#include "manager.h"
-#include "rm-rf.h"
+#include "core/manager.h"
+#include "sd-bus/bus-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-shared/tests.h"
+
#include "test-helper.h"
-#include "tests.h"
int main(int argc, char *argv[]) {
_cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
diff --git a/src/test/test-env-util.c b/src/test/test-env-util.c
index 35bb62906e..a6bab469cd 100644
--- a/src/test/test-env-util.c
+++ b/src/test/test-env-util.c
@@ -20,10 +20,10 @@
#include <string.h>
-#include "env-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static void test_strv_env_delete(void) {
_cleanup_strv_free_ char **a = NULL, **b = NULL, **c = NULL, **d = NULL;
diff --git a/src/test/test-escape.c b/src/test/test-escape.c
index 6cbb8443fe..32abd73a7f 100644
--- a/src/test/test-escape.c
+++ b/src/test/test-escape.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "escape.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/escape.h"
+#include "systemd-basic/macro.h"
static void test_cescape(void) {
_cleanup_free_ char *escaped;
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 6029853e3e..be8160ed19 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -23,20 +23,21 @@
#include <sys/prctl.h>
#include <sys/types.h>
-#include "fileio.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "manager.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "rm-rf.h"
+#include "core/manager.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
#ifdef HAVE_SECCOMP
-#include "seccomp-util.h"
+#include "systemd-shared/seccomp-util.h"
#endif
+#include "core/unit.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+
#include "test-helper.h"
-#include "unit.h"
-#include "util.h"
-#include "virt.h"
typedef void (*test_function_t)(Manager *m);
diff --git a/src/test/test-extract-word.c b/src/test/test-extract-word.c
index 7a23fa7b7b..f3a6a6378e 100644
--- a/src/test/test-extract-word.c
+++ b/src/test/test-extract-word.c
@@ -21,9 +21,9 @@
#include <stdlib.h>
#include <string.h>
-#include "extract-word.h"
-#include "log.h"
-#include "string-util.h"
+#include "systemd-basic/extract-word.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
static void test_extract_first_word(void) {
const char *p, *original;
diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c
index f555bb976c..6fbb6e58f8 100644
--- a/src/test/test-fd-util.c
+++ b/src/test/test-fd-util.c
@@ -20,10 +20,10 @@
#include <fcntl.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
static void test_close_many(void) {
int fds[3];
diff --git a/src/test/test-fdset.c b/src/test/test-fdset.c
index adbf99a7ec..103e61a1c5 100644
--- a/src/test/test-fdset.c
+++ b/src/test/test-fdset.c
@@ -20,11 +20,11 @@
#include <fcntl.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "fdset.h"
-#include "fileio.h"
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/fdset.h"
static void test_fdset_new_fill(void) {
int fd = -1;
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index 92663ef66f..6e1056a466 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -17,22 +17,22 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "ctype.h"
-#include "def.h"
-#include "env-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "io-util.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/env-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static void test_parse_env_file(void) {
char t[] = "/tmp/test-fileio-in-XXXXXX",
diff --git a/src/test/test-firewall-util.c b/src/test/test-firewall-util.c
index 77e809c5bf..b1e679e6b1 100644
--- a/src/test/test-firewall-util.c
+++ b/src/test/test-firewall-util.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "firewall-util.h"
-#include "log.h"
+#include "systemd-basic/log.h"
+#include "systemd-firewall/firewall-util.h"
#define MAKE_IN_ADDR_UNION(a,b,c,d) (union in_addr_union) { .in.s_addr = htobe32((uint32_t) (a) << 24 | (uint32_t) (b) << 16 | (uint32_t) (c) << 8 | (uint32_t) (d))}
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c
index 53a3cdc663..280918fe57 100644
--- a/src/test/test-fs-util.c
+++ b/src/test/test-fs-util.c
@@ -19,17 +19,17 @@
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static void test_chase_symlinks(void) {
_cleanup_free_ char *result = NULL;
diff --git a/src/test/test-fstab-util.c b/src/test/test-fstab-util.c
index 63a4b8c243..7d73384d26 100644
--- a/src/test/test-fstab-util.c
+++ b/src/test/test-fstab-util.c
@@ -17,11 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "fstab-util.h"
-#include "log.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/fstab-util.h"
/*
int fstab_filter_options(const char *opts, const char *names,
diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
index 9eea3eb608..364549b9f4 100644
--- a/src/test/test-glob-util.c
+++ b/src/test/test-glob-util.c
@@ -20,10 +20,10 @@
#include <fcntl.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fileio.h"
-#include "glob-util.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/macro.h"
static void test_glob_exists(void) {
char name[] = "/tmp/test-glob_exists.XXXXXX";
diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c
index 1bd5c02f87..d1b3ac527b 100644
--- a/src/test/test-hashmap-plain.c
+++ b/src/test/test-hashmap-plain.c
@@ -17,11 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "hashmap.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
void test_hashmap_funcs(void);
diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c
index 83cea360e6..10de53ff41 100644
--- a/src/test/test-hashmap.c
+++ b/src/test/test-hashmap.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hashmap.h"
-#include "util.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/util.h"
void test_hashmap_funcs(void);
void test_ordered_hashmap_funcs(void);
diff --git a/src/test/test-helper.h b/src/test/test-helper.h
index ddb10f88fd..d5f44d53e3 100644
--- a/src/test/test-helper.h
+++ b/src/test/test-helper.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
-#include "macro.h"
+#include "systemd-basic/macro.h"
#define TEST_REQ_RUNNING_SYSTEMD(x) \
if (sd_booted() > 0) { \
diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
index 276f25d091..b3587b6645 100644
--- a/src/test/test-hexdecoct.c
+++ b/src/test/test-hexdecoct.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "hexdecoct.h"
-#include "macro.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
static void test_hexchar(void) {
assert_se(hexchar(0xa) == 'a');
diff --git a/src/test/test-hostname-util.c b/src/test/test-hostname-util.c
index d2c3ea5e0d..9992cb4766 100644
--- a/src/test/test-hostname-util.c
+++ b/src/test/test-hostname-util.c
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "fileio.h"
-#include "hostname-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static void test_hostname_is_valid(void) {
assert_se(hostname_is_valid("foobar", false));
diff --git a/src/test/test-hostname.c b/src/test/test-hostname.c
index b38507df5d..ffe09ae78d 100644
--- a/src/test/test-hostname.c
+++ b/src/test/test-hostname.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "hostname-setup.h"
-#include "util.h"
+#include "core/hostname-setup.h"
+#include "systemd-basic/util.h"
int main(int argc, char* argv[]) {
int r;
diff --git a/src/test/test-id128.c b/src/test/test-id128.c
index 1c8e5549da..23209f44c0 100644
--- a/src/test/test-id128.c
+++ b/src/test/test-id128.c
@@ -19,16 +19,16 @@
#include <string.h>
-#include "sd-daemon.h"
-#include "sd-id128.h"
-
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "id128-util.h"
-#include "macro.h"
-#include "string-util.h"
-#include "util.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-id128.h>
+
+#include "sd-id128/id128-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
#define ID128_WALDI SD_ID128_MAKE(01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f, 10)
#define STR_WALDI "0102030405060708090a0b0c0d0e0f10"
diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c
index a98de76b43..bf37f754a4 100644
--- a/src/test/test-install-root.c
+++ b/src/test/test-install-root.c
@@ -17,12 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "fileio.h"
-#include "install.h"
-#include "mkdir.h"
-#include "rm-rf.h"
-#include "string-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/install.h"
static void test_basic_mask_and_enable(const char *root) {
const char *p;
diff --git a/src/test/test-install.c b/src/test/test-install.c
index fb36aa83ca..936d606061 100644
--- a/src/test/test-install.c
+++ b/src/test/test-install.c
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <string.h>
-#include "install.h"
+#include "systemd-shared/install.h"
static void dump_changes(UnitFileChange *c, unsigned n) {
unsigned i;
diff --git a/src/test/test-io-util.c b/src/test/test-io-util.c
index 10bd3833bc..528517af31 100644
--- a/src/test/test-io-util.c
+++ b/src/test/test-io-util.c
@@ -21,10 +21,10 @@
#include <stdlib.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "io-util.h"
-#include "macro.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/io-util.h"
+#include "systemd-basic/macro.h"
static void test_sparse_write_one(int fd, const char *buffer, size_t n) {
char check[n];
diff --git a/src/test/test-ipcrm.c b/src/test/test-ipcrm.c
index 551eba7215..d7f9564d6a 100644
--- a/src/test/test-ipcrm.c
+++ b/src/test/test-ipcrm.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "clean-ipc.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/clean-ipc.h"
int main(int argc, char *argv[]) {
uid_t uid;
diff --git a/src/test/test-job-type.c b/src/test/test-job-type.c
index 7f0b9f253c..cfb75b12c7 100644
--- a/src/test/test-job-type.c
+++ b/src/test/test-job-type.c
@@ -19,9 +19,9 @@
#include <stdio.h>
-#include "job.h"
-#include "service.h"
-#include "unit.h"
+#include "core/job.h"
+#include "core/service.h"
+#include "core/unit.h"
int main(int argc, char*argv[]) {
JobType a, b, c, ab, bc, ab_c, bc_a, a_bc;
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c
index e28de9b37b..a76fbc3877 100644
--- a/src/test/test-libudev.c
+++ b/src/test/test-libudev.c
@@ -22,14 +22,14 @@
#include <sys/epoll.h>
#include <unistd.h>
-#include "libudev.h"
-
-#include "fd-util.h"
-#include "log.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "udev-util.h"
-#include "util.h"
+#include <libudev.h>
+
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/udev-util.h"
static void print_device(struct udev_device *device) {
const char *str;
diff --git a/src/test/test-list.c b/src/test/test-list.c
index 0ccd745cc9..4fb4173231 100644
--- a/src/test/test-list.c
+++ b/src/test/test-list.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "list.h"
-#include "util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/util.h"
int main(int argc, const char *argv[]) {
size_t i;
diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c
index 427c698d1d..2e5aa46f13 100644
--- a/src/test/test-locale-util.c
+++ b/src/test/test-locale-util.c
@@ -18,9 +18,9 @@
***/
-#include "locale-util.h"
-#include "macro.h"
-#include "strv.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/strv.h"
static void test_get_locales(void) {
_cleanup_strv_free_ char **locales = NULL;
diff --git a/src/test/test-log.c b/src/test/test-log.c
index 55a2f9d23b..5241ba8183 100644
--- a/src/test/test-log.c
+++ b/src/test/test-log.c
@@ -20,9 +20,9 @@
#include <stddef.h>
#include <unistd.h>
-#include "formats-util.h"
-#include "log.h"
-#include "util.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/util.h"
int main(int argc, char* argv[]) {
diff --git a/src/test/test-loopback.c b/src/test/test-loopback.c
index 7b67337331..01b450484a 100644
--- a/src/test/test-loopback.c
+++ b/src/test/test-loopback.c
@@ -20,8 +20,8 @@
#include <stdio.h>
#include <string.h>
-#include "log.h"
-#include "loopback-setup.h"
+#include "core/loopback-setup.h"
+#include "systemd-basic/log.h"
int main(int argc, char* argv[]) {
int r;
diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c
index ff9f35cecd..cab64c980b 100644
--- a/src/test/test-namespace.c
+++ b/src/test/test-namespace.c
@@ -19,12 +19,12 @@
#include <sys/socket.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "namespace.h"
-#include "process-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "core/namespace.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static void test_tmpdir(const char *id, const char *A, const char *B) {
_cleanup_free_ char *a, *b;
diff --git a/src/test/test-netlink-manual.c b/src/test/test-netlink-manual.c
index bc6dd0926c..3e82a7cc96 100644
--- a/src/test/test-netlink-manual.c
+++ b/src/test/test-netlink-manual.c
@@ -19,14 +19,14 @@
#include <arpa/inet.h>
#include <libkmod.h>
-#include <linux/ip.h>
#include <net/if.h>
-#include <linux/if_tunnel.h>
-#include "sd-netlink.h"
+#include <linux/ip.h>
+#include <linux/if_tunnel.h>
-#include "macro.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/util.h"
+#include "systemd-staging/sd-netlink.h"
static int load_module(const char *mod_name) {
struct kmod_ctx *ctx;
diff --git a/src/test/test-ns.c b/src/test/test-ns.c
index da7a8b0565..83e955430c 100644
--- a/src/test/test-ns.c
+++ b/src/test/test-ns.c
@@ -20,8 +20,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include "log.h"
-#include "namespace.h"
+#include "core/namespace.h"
+#include "systemd-basic/log.h"
int main(int argc, char *argv[]) {
const char * const writable[] = {
diff --git a/src/test/test-nss.c b/src/test/test-nss.c
index c43bda5917..1ccd0def3f 100644
--- a/src/test/test-nss.c
+++ b/src/test/test-nss.c
@@ -18,22 +18,22 @@
***/
#include <dlfcn.h>
-#include <stdlib.h>
#include <net/if.h>
+#include <stdlib.h>
-#include "log.h"
-#include "nss-util.h"
-#include "path-util.h"
-#include "string-util.h"
-#include "alloc-util.h"
-#include "in-addr-util.h"
-#include "hexdecoct.h"
-#include "af-list.h"
-#include "stdio-util.h"
-#include "strv.h"
-#include "errno-list.h"
-#include "hostname-util.h"
-#include "local-addresses.h"
+#include "sd-netlink/local-addresses.h"
+#include "systemd-basic/af-list.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/errno-list.h"
+#include "systemd-basic/hexdecoct.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/nss-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
static const char* nss_status_to_string(enum nss_status status, char *buf, size_t buf_len) {
switch (status) {
diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
index d08014100b..17f4d2c8b3 100644
--- a/src/test/test-parse-util.c
+++ b/src/test/test-parse-util.c
@@ -21,8 +21,8 @@
#include <locale.h>
#include <math.h>
-#include "log.h"
-#include "parse-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/parse-util.h"
static void test_parse_boolean(void) {
assert_se(parse_boolean("1") == 1);
diff --git a/src/test/test-path-lookup.c b/src/test/test-path-lookup.c
index 096326d176..0d94971580 100644
--- a/src/test/test-path-lookup.c
+++ b/src/test/test-path-lookup.c
@@ -20,11 +20,11 @@
#include <stdlib.h>
#include <sys/stat.h>
-#include "log.h"
-#include "path-lookup.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-shared/path-lookup.h"
static void test_paths(UnitFileScope scope) {
char template[] = "/tmp/test-path-lookup.XXXXXXX";
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index a6a09a0031..7221b1abde 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -21,15 +21,15 @@
#include <sys/mount.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "macro.h"
-#include "mount-util.h"
-#include "path-util.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mount-util.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
#define test_path_compare(a, b, result) { \
assert_se(path_compare(a, b) == result); \
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 4d3f0e9948..894102efc6 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -20,19 +20,20 @@
#include <stdbool.h>
#include <stdio.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "manager.h"
-#include "mkdir.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "strv.h"
+#include "core/manager.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/mkdir.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/tests.h"
+
#include "test-helper.h"
-#include "tests.h"
-#include "unit.h"
-#include "util.h"
typedef void (*test_function_t)(Manager *m);
diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c
index d81880a655..1f02df4375 100644
--- a/src/test/test-prioq.c
+++ b/src/test/test-prioq.c
@@ -19,11 +19,11 @@
#include <stdlib.h>
-#include "alloc-util.h"
-#include "prioq.h"
-#include "set.h"
-#include "siphash24.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/prioq.h"
+#include "systemd-basic/set.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/util.h"
#define SET_SIZE 1024*4
diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c
index 4101678f19..99cdb214bd 100644
--- a/src/test/test-proc-cmdline.c
+++ b/src/test/test-proc-cmdline.c
@@ -17,13 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "log.h"
-#include "macro.h"
-#include "proc-cmdline.h"
-#include "special.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/proc-cmdline.h"
+#include "systemd-basic/special.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static int obj;
diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c
index 9ada46b1e9..13dd72088e 100644
--- a/src/test/test-process-util.c
+++ b/src/test/test-process-util.c
@@ -30,19 +30,20 @@
#include <valgrind/valgrind.h>
#endif
-#include "alloc-util.h"
-#include "architecture.h"
-#include "fd-util.h"
-#include "log.h"
-#include "macro.h"
-#include "parse-util.h"
-#include "process-util.h"
-#include "stdio-util.h"
-#include "string-util.h"
-#include "terminal-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/stdio-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+
#include "test-helper.h"
-#include "util.h"
-#include "virt.h"
static void test_get_process_comm(pid_t pid) {
struct stat st;
diff --git a/src/test/test-ratelimit.c b/src/test/test-ratelimit.c
index 990b834c79..0b867d6801 100644
--- a/src/test/test-ratelimit.c
+++ b/src/test/test-ratelimit.c
@@ -19,9 +19,9 @@
#include <unistd.h>
-#include "macro.h"
-#include "ratelimit.h"
-#include "time-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/ratelimit.h"
+#include "systemd-basic/time-util.h"
static void test_ratelimit_test(void) {
int i;
diff --git a/src/test/test-replace-var.c b/src/test/test-replace-var.c
index 297effce79..fbd6b4fa94 100644
--- a/src/test/test-replace-var.c
+++ b/src/test/test-replace-var.c
@@ -19,10 +19,10 @@
#include <string.h>
-#include "macro.h"
-#include "replace-var.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/replace-var.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static char *lookup(const char *variable, void *userdata) {
return strjoin("<<<", variable, ">>>", NULL);
diff --git a/src/test/test-rlimit-util.c b/src/test/test-rlimit-util.c
index 62afd2de5e..6d5733b03d 100644
--- a/src/test/test-rlimit-util.c
+++ b/src/test/test-rlimit-util.c
@@ -17,12 +17,12 @@
#include <sys/resource.h>
-#include "alloc-util.h"
-#include "capability-util.h"
-#include "macro.h"
-#include "rlimit-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static void test_rlimit_parse_format(int resource, const char *string, rlim_t soft, rlim_t hard, int ret, const char *formatted) {
_cleanup_free_ char *f = NULL;
diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c
index 7b37910c33..17eea84e7e 100644
--- a/src/test/test-sched-prio.c
+++ b/src/test/test-sched-prio.c
@@ -19,11 +19,12 @@
#include <sched.h>
-#include "macro.h"
-#include "manager.h"
-#include "rm-rf.h"
+#include "core/manager.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-shared/tests.h"
+
#include "test-helper.h"
-#include "tests.h"
int main(int argc, char *argv[]) {
_cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
diff --git a/src/test/test-seccomp.c b/src/test/test-seccomp.c
index 43d1567288..c3f4798d15 100644
--- a/src/test/test-seccomp.c
+++ b/src/test/test-seccomp.c
@@ -21,12 +21,12 @@
#include <sys/eventfd.h>
#include <unistd.h>
-#include "fd-util.h"
-#include "macro.h"
-#include "process-util.h"
-#include "seccomp-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/process-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/seccomp-util.h"
static void test_seccomp_arch_to_string(void) {
uint32_t a, b;
diff --git a/src/test/test-selinux.c b/src/test/test-selinux.c
index 7545ad3764..244bc218d6 100644
--- a/src/test/test-selinux.c
+++ b/src/test/test-selinux.c
@@ -19,13 +19,13 @@
#include <sys/stat.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "log.h"
-#include "selinux-util.h"
-#include "string-util.h"
-#include "time-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/time-util.h"
+#include "systemd-basic/util.h"
static void test_testing(void) {
bool b;
diff --git a/src/test/test-set.c b/src/test/test-set.c
index 0ee5ddcc9f..7ba5524939 100644
--- a/src/test/test-set.c
+++ b/src/test/test-set.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "set.h"
+#include "systemd-basic/set.h"
static void test_set_steal_first(void) {
_cleanup_set_free_ Set *m = NULL;
diff --git a/src/test/test-sigbus.c b/src/test/test-sigbus.c
index 02b8e24308..8f71594952 100644
--- a/src/test/test-sigbus.c
+++ b/src/test/test-sigbus.c
@@ -19,9 +19,9 @@
#include <sys/mman.h>
-#include "fd-util.h"
-#include "sigbus.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/sigbus.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
_cleanup_close_ int fd = -1;
diff --git a/src/test/test-signal-util.c b/src/test/test-signal-util.c
index 671eb869cb..3feb681645 100644
--- a/src/test/test-signal-util.c
+++ b/src/test/test-signal-util.c
@@ -20,8 +20,8 @@
#include <signal.h>
#include <unistd.h>
-#include "macro.h"
-#include "signal-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/signal-util.h"
static void test_block_signals(void) {
sigset_t ss;
diff --git a/src/test/test-siphash24.c b/src/test/test-siphash24.c
index b74b7ad2dd..6ed4ce6e60 100644
--- a/src/test/test-siphash24.c
+++ b/src/test/test-siphash24.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "siphash24.h"
-#include "util.h"
+#include "systemd-basic/siphash24.h"
+#include "systemd-basic/util.h"
#define ITERATIONS 10000000ULL
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
index 8f99a13772..7330c8ba5b 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "log.h"
-#include "time-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/time-util.h"
/* Print information about various types. Useful when diagnosing
* gcc diagnostics on an unfamiliar architecture. */
diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c
index 97b6f3015d..0c78f68ca8 100644
--- a/src/test/test-sleep.c
+++ b/src/test/test-sleep.c
@@ -19,10 +19,10 @@
#include <stdio.h>
-#include "log.h"
-#include "sleep-config.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/sleep-config.h"
static void test_sleep(void) {
_cleanup_strv_free_ char
diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c
index 1f853a7f16..85a5ebcced 100644
--- a/src/test/test-socket-util.c
+++ b/src/test/test-socket-util.c
@@ -17,15 +17,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "async.h"
-#include "fd-util.h"
-#include "in-addr-util.h"
-#include "log.h"
-#include "macro.h"
-#include "socket-util.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/async.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/in-addr-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static void test_ifname_valid(void) {
assert(ifname_valid("foo"));
diff --git a/src/test/test-stat-util.c b/src/test/test-stat-util.c
index 6c34250a01..f973ce39a8 100644
--- a/src/test/test-stat-util.c
+++ b/src/test/test-stat-util.c
@@ -20,11 +20,11 @@
#include <fcntl.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "macro.h"
-#include "stat-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/stat-util.h"
static void test_files_same(void) {
_cleanup_close_ int fd = -1;
diff --git a/src/test/test-strbuf.c b/src/test/test-strbuf.c
index 513218c397..a9af4bc5a9 100644
--- a/src/test/test-strbuf.c
+++ b/src/test/test-strbuf.c
@@ -20,10 +20,10 @@
#include <stdlib.h>
#include <string.h>
-#include "strbuf.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/strbuf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
static ssize_t add_string(struct strbuf *sb, const char *s) {
return strbuf_add_string(sb, s, strlen(s));
diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c
index d0f84d70bc..52bc529a6e 100644
--- a/src/test/test-string-util.c
+++ b/src/test/test-string-util.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "macro.h"
-#include "string-util.h"
-#include "strv.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
static void test_string_erase(void) {
char *x;
diff --git a/src/test/test-strip-tab-ansi.c b/src/test/test-strip-tab-ansi.c
index 72b0f6fc11..33f06e04ef 100644
--- a/src/test/test-strip-tab-ansi.c
+++ b/src/test/test-strip-tab-ansi.c
@@ -19,9 +19,9 @@
#include <stdio.h>
-#include "string-util.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
int main(int argc, char *argv[]) {
char *p;
diff --git a/src/test/test-strv.c b/src/test/test-strv.c
index 88da69e2d7..266c6af814 100644
--- a/src/test/test-strv.c
+++ b/src/test/test-strv.c
@@ -20,11 +20,11 @@
#include <string.h>
-#include "alloc-util.h"
-#include "specifier.h"
-#include "string-util.h"
-#include "strv.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/specifier.h"
static void test_specifier_printf(void) {
static const Specifier table[] = {
diff --git a/src/test/test-strxcpyx.c b/src/test/test-strxcpyx.c
index 9bea770131..0e9c78d4a3 100644
--- a/src/test/test-strxcpyx.c
+++ b/src/test/test-strxcpyx.c
@@ -19,9 +19,9 @@
#include <string.h>
-#include "string-util.h"
-#include "strxcpyx.h"
-#include "util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strxcpyx.h"
+#include "systemd-basic/util.h"
static void test_strpcpy(void) {
char target[25];
diff --git a/src/test/test-tables.c b/src/test/test-tables.c
index 294d219869..6bc2b0d6e3 100644
--- a/src/test/test-tables.c
+++ b/src/test/test-tables.c
@@ -17,38 +17,38 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "architecture.h"
-#include "automount.h"
-#include "busname.h"
-#include "cgroup.h"
-#include "compress.h"
-#include "condition.h"
-#include "device.h"
-#include "execute.h"
-#include "install.h"
-#include "job.h"
-#include "journald-server.h"
-#include "kill.h"
+#include "core/automount.h"
+#include "core/busname.h"
+#include "core/cgroup.h"
+#include "core/device.h"
+#include "core/execute.h"
+#include "core/job.h"
+#include "core/kill.h"
+#include "core/mount.h"
+#include "core/path.h"
+#include "core/scope.h"
+#include "core/service.h"
+#include "core/slice.h"
+#include "core/socket.h"
+#include "core/swap.h"
+#include "core/target.h"
+#include "core/timer.h"
+#include "core/unit.h"
+#include "journal-core/journald-server.h"
#include "link-config.h"
-#include "locale-util.h"
-#include "log.h"
-#include "logs-show.h"
-#include "mount.h"
-#include "path.h"
-#include "rlimit-util.h"
-#include "scope.h"
-#include "service.h"
-#include "slice.h"
-#include "socket-util.h"
-#include "socket.h"
-#include "swap.h"
-#include "target.h"
-#include "test-tables.h"
-#include "timer.h"
-#include "unit-name.h"
-#include "unit.h"
-#include "util.h"
-#include "virt.h"
+#include "sd-journal/compress.h"
+#include "systemd-basic/architecture.h"
+#include "systemd-basic/locale-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/rlimit-util.h"
+#include "systemd-basic/socket-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/virt.h"
+#include "systemd-shared/condition.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/logs-show.h"
+#include "systemd-shared/test-tables.h"
int main(int argc, char **argv) {
test_table(architecture, ARCHITECTURE);
diff --git a/src/test/test-terminal-util.c b/src/test/test-terminal-util.c
index 373a1b70ba..ced2f969e0 100644
--- a/src/test/test-terminal-util.c
+++ b/src/test/test-terminal-util.c
@@ -21,12 +21,12 @@
#include <stdbool.h>
#include <stdio.h>
-#include "fd-util.h"
-#include "fileio.h"
-#include "log.h"
-#include "macro.h"
-#include "terminal-util.h"
-#include "util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/terminal-util.h"
+#include "systemd-basic/util.h"
static void test_default_term_for_tty(void) {
puts(default_term_for_tty("/dev/tty23"));
diff --git a/src/test/test-time.c b/src/test/test-time.c
index 7078a0374d..310506d7f5 100644
--- a/src/test/test-time.c
+++ b/src/test/test-time.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "strv.h"
-#include "time-util.h"
-#include "random-util.h"
+#include "systemd-basic/random-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/time-util.h"
static void test_parse_sec(void) {
usec_t u;
diff --git a/src/test/test-tmpfiles.c b/src/test/test-tmpfiles.c
index f35e6793b7..9e528e1e5e 100644
--- a/src/test/test-tmpfiles.c
+++ b/src/test/test-tmpfiles.c
@@ -22,14 +22,14 @@
#include <stdlib.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "formats-util.h"
-#include "fs-util.h"
-#include "log.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/formats-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
int main(int argc, char** argv) {
_cleanup_free_ char *cmd = NULL, *cmd2 = NULL, *ans = NULL, *ans2 = NULL, *d = NULL, *tmp = NULL, *line = NULL;
diff --git a/src/test/test-udev.c b/src/test/test-udev.c
index e965b4494a..042dfbd2fd 100644
--- a/src/test/test-udev.c
+++ b/src/test/test-udev.c
@@ -26,13 +26,13 @@
#include <sys/signalfd.h>
#include <unistd.h>
-#include "fs-util.h"
-#include "log.h"
-#include "missing.h"
-#include "selinux-util.h"
-#include "signal-util.h"
-#include "string-util.h"
-#include "udev-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/log.h"
+#include "systemd-basic/missing.h"
+#include "systemd-basic/selinux-util.h"
+#include "systemd-basic/signal-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-shared/udev-util.h"
#include "udev.h"
static int fake_filesystems(void) {
diff --git a/src/test/test-uid-range.c b/src/test/test-uid-range.c
index 41f06a5cec..6c9a7864f2 100644
--- a/src/test/test-uid-range.c
+++ b/src/test/test-uid-range.c
@@ -19,10 +19,10 @@
#include <stddef.h>
-#include "alloc-util.h"
-#include "uid-range.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/uid-range.h"
int main(int argc, char *argv[]) {
_cleanup_free_ UidRange *p = NULL;
diff --git a/src/test/test-unaligned.c b/src/test/test-unaligned.c
index 4f64398943..14a272c0b7 100644
--- a/src/test/test-unaligned.c
+++ b/src/test/test-unaligned.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sparse-endian.h"
-#include "unaligned.h"
-#include "util.h"
+#include "systemd-basic/sparse-endian.h"
+#include "systemd-basic/unaligned.h"
+#include "systemd-basic/util.h"
static uint8_t data[] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index 12f48bf435..0cc813db50 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -25,24 +25,25 @@
#include <sys/capability.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "capability-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "hashmap.h"
-#include "hostname-util.h"
-#include "install-printf.h"
-#include "install.h"
-#include "load-fragment.h"
-#include "macro.h"
-#include "rm-rf.h"
-#include "specifier.h"
-#include "string-util.h"
-#include "strv.h"
+#include "core/load-fragment.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/capability-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/hashmap.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/install-printf.h"
+#include "systemd-shared/install.h"
+#include "systemd-shared/specifier.h"
+#include "systemd-shared/tests.h"
+
#include "test-helper.h"
-#include "tests.h"
-#include "user-util.h"
-#include "util.h"
static int test_unit_file_get_set(void) {
int r;
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index 2fd83f321c..b2e833116a 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -24,20 +24,21 @@
#include <stdlib.h>
#include <string.h>
-#include "alloc-util.h"
-#include "glob-util.h"
-#include "hostname-util.h"
-#include "macro.h"
-#include "manager.h"
-#include "path-util.h"
-#include "specifier.h"
-#include "string-util.h"
-#include "test-helper.h"
-#include "unit-name.h"
+#include "core/manager.h"
+#include "core/unit.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/glob-util.h"
+#include "systemd-basic/hostname-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/path-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/unit-name.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-shared/specifier.h"
#include "unit-printf.h"
-#include "unit.h"
-#include "user-util.h"
-#include "util.h"
+
+#include "test-helper.h"
static void test_unit_name_is_valid(void) {
assert_se(unit_name_is_valid("foo.service", UNIT_NAME_ANY));
diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c
index 2a344a9f93..10523f5e07 100644
--- a/src/test/test-user-util.c
+++ b/src/test/test-user-util.c
@@ -17,11 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "macro.h"
-#include "string-util.h"
-#include "user-util.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/user-util.h"
+#include "systemd-basic/util.h"
static void test_uid_to_name_one(uid_t uid, const char *name) {
_cleanup_free_ char *t = NULL;
diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c
index 1ce5a5a24d..dcaedd632f 100644
--- a/src/test/test-utf8.c
+++ b/src/test/test-utf8.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "alloc-util.h"
-#include "string-util.h"
-#include "utf8.h"
-#include "util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/utf8.h"
+#include "systemd-basic/util.h"
static void test_utf8_is_printable(void) {
assert_se(utf8_is_printable("ascii is valid\tunicode", 22));
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 1b5cba86c1..45e5bfac18 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -23,14 +23,14 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "def.h"
-#include "fileio.h"
-#include "fs-util.h"
-#include "parse-util.h"
-#include "raw-clone.h"
-#include "rm-rf.h"
-#include "string-util.h"
-#include "util.h"
+#include "systemd-basic/def.h"
+#include "systemd-basic/fileio.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/parse-util.h"
+#include "systemd-basic/raw-clone.h"
+#include "systemd-basic/rm-rf.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
static void test_align_power2(void) {
unsigned long i, p2;
diff --git a/src/test/test-verbs.c b/src/test/test-verbs.c
index 0fcdd9e78d..c426f89ded 100644
--- a/src/test/test-verbs.c
+++ b/src/test/test-verbs.c
@@ -17,9 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
-#include "strv.h"
-#include "verbs.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/strv.h"
+#include "systemd-basic/verbs.h"
static int noop_dispatcher(int argc, char *argv[], void *userdata) {
return 0;
diff --git a/src/test/test-watchdog.c b/src/test/test-watchdog.c
index e3c19647fc..5a918b2658 100644
--- a/src/test/test-watchdog.c
+++ b/src/test/test-watchdog.c
@@ -19,8 +19,8 @@
#include <unistd.h>
-#include "log.h"
-#include "watchdog.h"
+#include "systemd-basic/log.h"
+#include "systemd-shared/watchdog.h"
int main(int argc, char *argv[]) {
usec_t t = 10 * USEC_PER_SEC;
diff --git a/src/test/test-web-util.c b/src/test/test-web-util.c
index 79a3a13af6..a95d3c7ec0 100644
--- a/src/test/test-web-util.c
+++ b/src/test/test-web-util.c
@@ -17,8 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "macro.h"
-#include "web-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/web-util.h"
static void test_is_valid_documentation_url(void) {
assert_se(documentation_url_is_valid("http://www.freedesktop.org/wiki/Software/systemd"));
diff --git a/src/test/test-xattr-util.c b/src/test/test-xattr-util.c
index 267f29426c..c067f2eaaf 100644
--- a/src/test/test-xattr-util.c
+++ b/src/test/test-xattr-util.c
@@ -23,12 +23,12 @@
#include <sys/xattr.h>
#include <unistd.h>
-#include "alloc-util.h"
-#include "fd-util.h"
-#include "fs-util.h"
-#include "macro.h"
-#include "string-util.h"
-#include "xattr-util.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/fd-util.h"
+#include "systemd-basic/fs-util.h"
+#include "systemd-basic/macro.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/xattr-util.h"
static void test_fgetxattrat_fake(void) {
char t[] = "/var/tmp/xattrtestXXXXXX";
diff --git a/src/test/test-xml.c b/src/test/test-xml.c
index b0b72fa78a..03c32d5102 100644
--- a/src/test/test-xml.c
+++ b/src/test/test-xml.c
@@ -19,10 +19,10 @@
#include <stdarg.h>
-#include "alloc-util.h"
-#include "string-util.h"
-#include "util.h"
-#include "xml.h"
+#include "systemd-basic/alloc-util.h"
+#include "systemd-basic/string-util.h"
+#include "systemd-basic/util.h"
+#include "systemd-basic/xml.h"
static void test_one(const char *data, ...) {
void *state = NULL;
diff --git a/src/timedate/Makefile b/src/timedate/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/timedate/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/timesync/Makefile b/src/timesync/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/timesync/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/tmpfiles/Makefile b/src/tmpfiles/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/tmpfiles/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/tty-ask-password-agent/Makefile b/src/tty-ask-password-agent/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/tty-ask-password-agent/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/udev/.vimrc b/src/udev/.vimrc
deleted file mode 100644
index 366fbdca4b..0000000000
--- a/src/udev/.vimrc
+++ /dev/null
@@ -1,4 +0,0 @@
-" 'set exrc' in ~/.vimrc will read .vimrc from the current directory
-set tabstop=8
-set shiftwidth=8
-set expandtab
diff --git a/src/udev/Makefile b/src/udev/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/udev/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/udev/ata_id/Makefile b/src/udev/ata_id/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/udev/ata_id/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/udev/cdrom_id/Makefile b/src/udev/cdrom_id/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/udev/cdrom_id/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/udev/collect/Makefile b/src/udev/collect/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/udev/collect/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/udev/mtd_probe/Makefile b/src/udev/mtd_probe/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/udev/mtd_probe/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/udev/net/Makefile b/src/udev/net/Makefile
deleted file mode 120000
index 94aaae2c4d..0000000000
--- a/src/udev/net/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/udev/scsi_id/Makefile b/src/udev/scsi_id/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/udev/scsi_id/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/udev/v4l_id/Makefile b/src/udev/v4l_id/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/udev/v4l_id/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/update-done/Makefile b/src/update-done/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/update-done/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/update-utmp/Makefile b/src/update-utmp/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/update-utmp/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/user-sessions/Makefile b/src/user-sessions/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/user-sessions/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/vconsole/Makefile b/src/vconsole/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/vconsole/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/shell-completion/zsh/_sd_hosts_or_user_at_host b/src/zsh-completion/_sd_hosts_or_user_at_host
index 282f7328e4..282f7328e4 100644
--- a/shell-completion/zsh/_sd_hosts_or_user_at_host
+++ b/src/zsh-completion/_sd_hosts_or_user_at_host
diff --git a/shell-completion/zsh/_sd_machines b/src/zsh-completion/_sd_machines
index a0039ee0f8..a0039ee0f8 100644
--- a/shell-completion/zsh/_sd_machines
+++ b/src/zsh-completion/_sd_machines
diff --git a/shell-completion/zsh/_sd_outputmodes b/src/zsh-completion/_sd_outputmodes
index 52617c6b7a..52617c6b7a 100644
--- a/shell-completion/zsh/_sd_outputmodes
+++ b/src/zsh-completion/_sd_outputmodes
diff --git a/shell-completion/zsh/_sd_unit_files b/src/zsh-completion/_sd_unit_files
index 3e7a4ee803..3e7a4ee803 100644
--- a/shell-completion/zsh/_sd_unit_files
+++ b/src/zsh-completion/_sd_unit_files
diff --git a/sysctl.d/Makefile b/sysctl.d/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/sysctl.d/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/system-preset/Makefile b/system-preset/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/system-preset/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/sysusers.d/Makefile b/sysusers.d/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/sysusers.d/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/test/GNUmakefile b/test/GNUmakefile
new file mode 120000
index 0000000000..bb60b1ed40
--- /dev/null
+++ b/test/GNUmakefile
@@ -0,0 +1 @@
+../GNUmakefile \ No newline at end of file
diff --git a/test/Makefile b/test/Makefile
index 987a32548f..b651e94e99 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,20 +1,955 @@
-# Just a little hook script to easy building when in this directory
-.PHONY: all check clean
-
-all:
- $(MAKE) -C ..
-
-clean:
- @for i in TEST-[0-9]*; do \
- [ -d $$i ] || continue ; \
- [ -f $$i/Makefile ] || continue ; \
- make -C $$i clean ; \
- done
-
-check:
- $(MAKE) -C .. all
- @for i in TEST-[0-9]*; do \
- [ -d $$i ] || continue ; \
- [ -f $$i/Makefile ] || continue ; \
- make -C $$i all ; \
- done
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+manual_tests += \
+ test-ns \
+ test-cgroup \
+ test-install \
+ test-btrfs \
+ test-acd \
+ test-ipv4ll-manual \
+ test-ask-password-api
+
+unsafe_tests = \
+ test-hostname \
+ test-ipcrm
+
+ifneq ($(HAVE_LIBIPTC),)
+manual_tests += \
+ test-firewall-util
+endif # HAVE_LIBIPTC
+
+ifneq ($(HAVE_KMOD),)
+manual_tests += \
+ test-netlink-manual
+endif # HAVE_KMOD
+
+tests += \
+ test-daemon \
+ test-log \
+ test-loopback \
+ test-engine \
+ test-watchdog \
+ test-cgroup-mask \
+ test-job-type \
+ test-env-util \
+ test-strbuf \
+ test-strv \
+ test-path \
+ test-path-util \
+ test-strxcpyx \
+ test-siphash24 \
+ test-unit-name \
+ test-unit-file \
+ test-utf8 \
+ test-ellipsize \
+ test-util \
+ test-cpu-set-util \
+ test-hexdecoct \
+ test-escape \
+ test-alloc-util \
+ test-proc-cmdline \
+ test-io-util \
+ test-glob-util \
+ test-xattr-util \
+ test-fs-util \
+ test-web-util \
+ test-stat-util \
+ test-fd-util \
+ test-string-util \
+ test-extract-word \
+ test-parse-util \
+ test-user-util \
+ test-hostname-util \
+ test-process-util \
+ test-terminal-util \
+ test-path-lookup \
+ test-barrier \
+ test-tmpfiles \
+ test-namespace \
+ test-date \
+ test-sleep \
+ test-replace-var \
+ test-sched-prio \
+ test-calendarspec \
+ test-strip-tab-ansi \
+ test-cgroup-util \
+ test-fstab-util \
+ test-prioq \
+ test-fileio \
+ test-time \
+ test-clock \
+ test-hashmap \
+ test-set \
+ test-bitmap \
+ test-list \
+ test-unaligned \
+ test-tables \
+ test-device-nodes \
+ test-xml \
+ test-architecture \
+ test-socket-util \
+ test-fdset \
+ test-conf-files \
+ test-conf-parser \
+ test-capability \
+ test-async \
+ test-ratelimit \
+ test-condition \
+ test-uid-range \
+ test-locale-util \
+ test-execute \
+ test-copy \
+ test-cap-list \
+ test-sigbus \
+ test-verbs \
+ test-af-list \
+ test-arphrd-list \
+ test-dns-domain \
+ test-install-root \
+ test-rlimit-util \
+ test-signal-util \
+ test-selinux \
+ test-sizeof
+
+ifneq ($(HAVE_ACL),)
+tests += \
+ test-acl-util
+endif # HAVE_ACL
+
+ifneq ($(HAVE_SECCOMP),)
+tests += \
+ test-seccomp
+endif
+
+EXTRA_DIST += \
+ test/a.service \
+ test/basic.target \
+ test/b.service \
+ test/c.service \
+ test/daughter.service \
+ test/d.service \
+ test/end.service \
+ test/e.service \
+ test/f.service \
+ test/grandchild.service \
+ test/g.service \
+ test/hello-after-sleep.target \
+ test/hello.service \
+ test/h.service \
+ test/parent-deep.slice \
+ test/parent.slice \
+ test/sched_idle_bad.service \
+ test/sched_idle_ok.service \
+ test/sched_rr_bad.service \
+ test/sched_rr_change.service \
+ test/sched_rr_ok.service \
+ test/shutdown.target \
+ test/sleep.service \
+ test/sockets.target \
+ test/son.service \
+ test/sysinit.target \
+ test/testsuite.target \
+ test/timers.target \
+ test/unstoppable.service \
+ test/test-path/paths.target \
+ test/test-path/basic.target \
+ test/test-path/sysinit.target \
+ test/test-path/path-changed.service \
+ test/test-path/path-directorynotempty.service \
+ test/test-path/path-existsglob.service \
+ test/test-path/path-exists.service \
+ test/test-path/path-makedirectory.service \
+ test/test-path/path-modified.service \
+ test/test-path/path-mycustomunit.service \
+ test/test-path/path-service.service \
+ test/test-path/path-changed.path \
+ test/test-path/path-directorynotempty.path \
+ test/test-path/path-existsglob.path \
+ test/test-path/path-exists.path \
+ test/test-path/path-makedirectory.path \
+ test/test-path/path-modified.path \
+ test/test-path/path-unit.path \
+ test/test-execute/exec-environment-empty.service \
+ test/test-execute/exec-environment-multiple.service \
+ test/test-execute/exec-environment.service \
+ test/test-execute/exec-passenvironment-absent.service \
+ test/test-execute/exec-passenvironment-empty.service \
+ test/test-execute/exec-passenvironment-repeated.service \
+ test/test-execute/exec-passenvironment.service \
+ test/test-execute/exec-group.service \
+ test/test-execute/exec-group-nfsnobody.service \
+ test/test-execute/exec-supplementarygroups.service \
+ test/test-execute/exec-supplementarygroups-single-group.service \
+ test/test-execute/exec-supplementarygroups-single-group-user.service \
+ test/test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service \
+ test/test-execute/exec-supplementarygroups-multiple-groups-withgid.service \
+ test/test-execute/exec-supplementarygroups-multiple-groups-withuid.service \
+ test/test-execute/exec-dynamicuser-fixeduser.service \
+ test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service \
+ test/test-execute/exec-dynamicuser-supplementarygroups.service \
+ test/test-execute/exec-ignoresigpipe-no.service \
+ test/test-execute/exec-ignoresigpipe-yes.service \
+ test/test-execute/exec-personality-x86-64.service \
+ test/test-execute/exec-personality-x86.service \
+ test/test-execute/exec-personality-s390.service \
+ test/test-execute/exec-personality-ppc64.service \
+ test/test-execute/exec-personality-ppc64le.service \
+ test/test-execute/exec-personality-aarch64.service \
+ test/test-execute/exec-privatedevices-no.service \
+ test/test-execute/exec-privatedevices-yes.service \
+ test/test-execute/exec-privatedevices-no-capability-mknod.service \
+ test/test-execute/exec-privatedevices-yes-capability-mknod.service \
+ test/test-execute/exec-protectkernelmodules-no-capabilities.service \
+ test/test-execute/exec-protectkernelmodules-yes-capabilities.service \
+ test/test-execute/exec-protectkernelmodules-yes-mount-propagation.service \
+ test/test-execute/exec-privatetmp-no.service \
+ test/test-execute/exec-privatetmp-yes.service \
+ test/test-execute/exec-readonlypaths.service \
+ test/test-execute/exec-readonlypaths-mount-propagation.service \
+ test/test-execute/exec-readwritepaths-mount-propagation.service \
+ test/test-execute/exec-inaccessiblepaths-mount-propagation.service \
+ test/test-execute/exec-spec-interpolation.service \
+ test/test-execute/exec-systemcallerrornumber.service \
+ test/test-execute/exec-systemcallfilter-failing2.service \
+ test/test-execute/exec-systemcallfilter-failing.service \
+ test/test-execute/exec-systemcallfilter-not-failing2.service \
+ test/test-execute/exec-systemcallfilter-not-failing.service \
+ test/test-execute/exec-systemcallfilter-system-user.service \
+ test/test-execute/exec-systemcallfilter-system-user-nfsnobody.service \
+ test/test-execute/exec-user.service \
+ test/test-execute/exec-user-nfsnobody.service \
+ test/test-execute/exec-workingdirectory.service \
+ test/test-execute/exec-umask-0177.service \
+ test/test-execute/exec-umask-default.service \
+ test/test-execute/exec-privatenetwork-yes.service \
+ test/test-execute/exec-environmentfile.service \
+ test/test-execute/exec-oomscoreadjust-positive.service \
+ test/test-execute/exec-oomscoreadjust-negative.service \
+ test/test-execute/exec-ioschedulingclass-best-effort.service \
+ test/test-execute/exec-ioschedulingclass-idle.service \
+ test/test-execute/exec-ioschedulingclass-none.service \
+ test/test-execute/exec-ioschedulingclass-realtime.service \
+ test/test-execute/exec-capabilityboundingset-invert.service \
+ test/test-execute/exec-capabilityboundingset-merge.service \
+ test/test-execute/exec-capabilityboundingset-reset.service \
+ test/test-execute/exec-capabilityboundingset-simple.service \
+ test/test-execute/exec-capabilityambientset.service \
+ test/test-execute/exec-capabilityambientset-nfsnobody.service \
+ test/test-execute/exec-capabilityambientset-merge.service \
+ test/test-execute/exec-capabilityambientset-merge-nfsnobody.service \
+ test/test-execute/exec-runtimedirectory.service \
+ test/test-execute/exec-runtimedirectory-mode.service \
+ test/test-execute/exec-runtimedirectory-owner.service \
+ test/test-execute/exec-runtimedirectory-owner-nfsnobody.service \
+ test/bus-policy/hello.conf \
+ test/bus-policy/methods.conf \
+ test/bus-policy/ownerships.conf \
+ test/bus-policy/signals.conf \
+ test/bus-policy/check-own-rules.conf \
+ test/bus-policy/many-rules.conf \
+ test/bus-policy/test.conf
+
+EXTRA_DIST += \
+ src/test/test-helper.h
+
+test_device_nodes_SOURCES = \
+ src/test/test-device-nodes.c
+
+test_device_nodes_LDADD = \
+ libsystemd-shared.la
+
+test_engine_SOURCES = \
+ src/test/test-engine.c
+
+test_engine_CFLAGS = \
+ $(SECCOMP_CFLAGS) \
+ $(MOUNT_CFLAGS)
+
+test_engine_LDADD = \
+ libcore.la
+
+test_job_type_SOURCES = \
+ src/test/test-job-type.c
+
+test_job_type_CFLAGS = \
+ $(SECCOMP_CFLAGS) \
+ $(MOUNT_CFLAGS)
+
+test_job_type_LDADD = \
+ libcore.la
+
+test_ns_SOURCES = \
+ src/test/test-ns.c
+
+test_ns_CFLAGS = \
+ $(SECCOMP_CFLAGS)
+
+test_ns_LDADD = \
+ libcore.la
+
+test_loopback_SOURCES = \
+ src/test/test-loopback.c
+
+test_loopback_LDADD = \
+ libcore.la
+
+test_hostname_SOURCES = \
+ src/test/test-hostname.c
+
+test_hostname_LDADD = \
+ libcore.la
+
+test_dns_domain_SOURCES = \
+ src/test/test-dns-domain.c
+
+test_dns_domain_LDADD = \
+ libsystemd-network.la \
+ libsystemd-shared.la
+
+ifneq ($(ENABLE_EFI),)
+tests += \
+ test-boot-timestamps
+
+test_boot_timestamps_SOURCES = \
+ src/test/test-boot-timestamps.c
+
+test_boot_timestamps_LDADD = \
+ libsystemd-shared.la
+endif # ENABLE_EFI
+
+test_unit_name_SOURCES = \
+ src/test/test-unit-name.c
+
+test_unit_name_CFLAGS = \
+ $(SECCOMP_CFLAGS) \
+ $(MOUNT_CFLAGS)
+
+test_unit_name_LDADD = \
+ libcore.la
+
+test_unit_file_SOURCES = \
+ src/test/test-unit-file.c
+
+test_unit_file_CFLAGS = \
+ $(SECCOMP_CFLAGS) \
+ $(MOUNT_CFLAGS)
+
+test_unit_file_LDADD = \
+ libcore.la
+
+test_utf8_SOURCES = \
+ src/test/test-utf8.c
+
+test_utf8_LDADD = \
+ libsystemd-shared.la
+
+test_capability_SOURCES = \
+ src/test/test-capability.c
+
+test_capability_CFLAGS = \
+ $(CAP_CFLAGS)
+
+test_capability_LDADD = \
+ libsystemd-shared.la \
+ $(CAP_LIBS)
+
+test_async_SOURCES = \
+ src/test/test-async.c
+
+test_async_LDADD = \
+ libsystemd-shared.la
+
+test_locale_util_SOURCES = \
+ src/test/test-locale-util.c
+
+test_locale_util_LDADD = \
+ libsystemd-shared.la
+
+test_copy_SOURCES = \
+ src/test/test-copy.c
+
+# Link statically to ensure file is large
+test_copy_LDADD = \
+ libsystemd-shared.la
+
+test_sigbus_SOURCES = \
+ src/test/test-sigbus.c
+
+test_sigbus_LDADD = \
+ libsystemd-shared.la
+
+test_condition_SOURCES = \
+ src/test/test-condition.c
+
+test_condition_LDADD = \
+ libsystemd-shared.la
+
+test_fdset_SOURCES = \
+ src/test/test-fdset.c
+
+test_fdset_LDADD = \
+ libsystemd-shared.la
+
+test_fstab_util_SOURCES = \
+ src/test/test-fstab-util.c
+
+test_fstab_util_LDADD = \
+ libsystemd-shared.la
+
+test_ratelimit_SOURCES = \
+ src/test/test-ratelimit.c
+
+test_ratelimit_LDADD = \
+ libsystemd-shared.la
+
+test_util_SOURCES = \
+ src/test/test-util.c
+
+test_util_LDADD = \
+ libsystemd-shared.la
+
+test_hexdecoct_SOURCES = \
+ src/test/test-hexdecoct.c
+
+test_hexdecoct_LDADD = \
+ libsystemd-shared.la
+
+test_alloc_util_SOURCES = \
+ src/test/test-alloc-util.c
+
+test_alloc_util_LDADD = \
+ libsystemd-shared.la
+
+test_xattr_util_SOURCES = \
+ src/test/test-xattr-util.c
+
+test_xattr_util_LDADD = \
+ libsystemd-shared.la
+
+test_io_util_SOURCES = \
+ src/test/test-io-util.c
+
+test_io_util_LDADD = \
+ libsystemd-shared.la
+
+test_glob_util_SOURCES = \
+ src/test/test-glob-util.c
+
+test_glob_util_LDADD = \
+ libsystemd-shared.la
+
+test_fs_util_SOURCES = \
+ src/test/test-fs-util.c
+
+test_fs_util_LDADD = \
+ libsystemd-shared.la
+
+test_proc_cmdline_SOURCES = \
+ src/test/test-proc-cmdline.c
+
+test_proc_cmdline_LDADD = \
+ libsystemd-shared.la
+
+test_fd_util_SOURCES = \
+ src/test/test-fd-util.c
+
+test_fd_util_LDADD = \
+ libsystemd-shared.la
+
+test_web_util_SOURCES = \
+ src/test/test-web-util.c
+
+test_web_util_LDADD = \
+ libsystemd-shared.la
+
+test_cpu_set_util_SOURCES = \
+ src/test/test-cpu-set-util.c
+
+test_cpu_set_util_LDADD = \
+ libsystemd-shared.la
+
+test_stat_util_SOURCES = \
+ src/test/test-stat-util.c
+
+test_stat_util_LDADD = \
+ libsystemd-shared.la
+
+test_escape_SOURCES = \
+ src/test/test-escape.c
+
+test_escape_LDADD = \
+ libsystemd-shared.la
+
+test_string_util_SOURCES = \
+ src/test/test-string-util.c
+
+test_string_util_LDADD = \
+ libsystemd-shared.la
+
+test_extract_word_SOURCES = \
+ src/test/test-extract-word.c
+
+test_extract_word_LDADD = \
+ libsystemd-shared.la
+
+test_parse_util_SOURCES = \
+ src/test/test-parse-util.c
+
+test_parse_util_LDADD = \
+ libsystemd-shared.la
+
+test_user_util_SOURCES = \
+ src/test/test-user-util.c
+
+test_user_util_LDADD = \
+ libsystemd-shared.la
+
+test_hostname_util_SOURCES = \
+ src/test/test-hostname-util.c
+
+test_hostname_util_LDADD = \
+ libsystemd-shared.la
+
+test_process_util_SOURCES = \
+ src/test/test-process-util.c
+
+test_process_util_LDADD = \
+ libsystemd-shared.la
+
+test_terminal_util_SOURCES = \
+ src/test/test-terminal-util.c
+
+test_terminal_util_LDADD = \
+ libsystemd-shared.la
+
+test_path_lookup_SOURCES = \
+ src/test/test-path-lookup.c
+
+test_path_lookup_LDADD = \
+ libsystemd-shared.la
+
+test_uid_range_SOURCES = \
+ src/test/test-uid-range.c
+
+test_uid_range_LDADD = \
+ libsystemd-shared.la
+
+test_cap_list_SOURCES = \
+ src/test/test-cap-list.c
+
+test_cap_list_CFLAGS = \
+ $(CAP_CFLAGS)
+
+test_cap_list_LDADD = \
+ libsystemd-shared.la \
+ $(CAP_LIBS)
+
+test_socket_util_SOURCES = \
+ src/test/test-socket-util.c
+
+test_socket_util_LDADD = \
+ libsystemd-shared.la
+
+test_barrier_SOURCES = \
+ src/test/test-barrier.c
+
+test_barrier_LDADD = \
+ libsystemd-shared.la
+
+test_tmpfiles_SOURCES = \
+ src/test/test-tmpfiles.c
+
+test_tmpfiles_LDADD = \
+ libsystemd-shared.la
+
+test_namespace_SOURCES = \
+ src/test/test-namespace.c
+
+test_verbs_SOURCES = \
+ src/test/test-verbs.c
+
+test_verbs_LDADD = \
+ libsystemd-shared.la
+
+test_install_root_SOURCES = \
+ src/test/test-install-root.c
+
+test_install_root_LDADD = \
+ libsystemd-shared.la
+
+test_acl_util_SOURCES = \
+ src/test/test-acl-util.c
+
+test_acl_util_LDADD = \
+ libsystemd-shared.la
+
+test_seccomp_SOURCES = \
+ src/test/test-seccomp.c
+
+test_seccomp_LDADD = \
+ libsystemd-shared.la
+
+test_namespace_LDADD = \
+ libcore.la
+
+test_rlimit_util_SOURCES = \
+ src/test/test-rlimit-util.c
+
+test_rlimit_util_LDADD = \
+ libsystemd-shared.la
+
+test_ask_password_api_SOURCES = \
+ src/test/test-ask-password-api.c
+
+test_ask_password_api_LDADD = \
+ libsystemd-shared.la
+
+test_signal_util_SOURCES = \
+ src/test/test-signal-util.c
+
+test_signal_util_LDADD = \
+ libsystemd-shared.la
+
+test_selinux_SOURCES = \
+ src/test/test-selinux.c
+
+test_selinux_LDADD = \
+ libsystemd-shared.la
+
+test_sizeof_SOURCES = \
+ src/test/test-sizeof.c
+
+test_sizeof_LDADD = \
+ libsystemd-shared.la
+
+BUILT_SOURCES += \
+ src/test/test-hashmap-ordered.c
+
+$(outdir)/test-hashmap-ordered.c: src/test/test-hashmap-plain.c
+ $(AM_V_GEN)$(AWK) 'BEGIN { print "/* GENERATED FILE */\n#define ORDERED" } \
+ { if (!match($$0, "^#include")) \
+ gsub(/hashmap/, "ordered_hashmap"); \
+ gsub(/HASHMAP/, "ORDERED_HASHMAP"); \
+ gsub(/Hashmap/, "OrderedHashmap"); \
+ print }' <$< >$@
+
+nodist_test_hashmap_SOURCES = \
+ src/test/test-hashmap-ordered.c
+
+test_hashmap_SOURCES = \
+ src/test/test-hashmap.c \
+ src/test/test-hashmap-plain.c
+
+test_hashmap_LDADD = \
+ libsystemd-shared.la
+
+test_set_SOURCES = \
+ src/test/test-set.c
+
+test_set_LDADD = \
+ libsystemd-shared.la
+
+test_bitmap_SOURCES = \
+ src/test/test-bitmap.c
+
+test_bitmap_LDADD = \
+ libsystemd-shared.la
+
+test_xml_SOURCES = \
+ src/test/test-xml.c
+
+test_xml_LDADD = \
+ libsystemd-shared.la
+
+test_list_SOURCES = \
+ src/test/test-list.c
+
+test_list_LDADD = \
+ libsystemd-shared.la
+
+test_unaligned_LDADD = \
+ libsystemd-shared.la
+
+test_unaligned_SOURCES = \
+ src/test/test-unaligned.c
+
+test_tables_SOURCES = \
+ src/test/test-tables.c \
+ src/shared/test-tables.h \
+ src/journal/journald-server.c \
+ src/journal/journald-server.h
+
+test_tables_CPPFLAGS = \
+
+test_tables_CFLAGS = \
+ $(SECCOMP_CFLAGS) \
+ $(MOUNT_CFLAGS)
+
+test_tables_LDADD = \
+ libjournal-core.la \
+ libcore.la \
+ libudev-core.la
+
+test_prioq_SOURCES = \
+ src/test/test-prioq.c
+
+test_prioq_LDADD = \
+ libsystemd-shared.la
+
+test_fileio_SOURCES = \
+ src/test/test-fileio.c
+
+test_fileio_LDADD = \
+ libsystemd-shared.la
+
+test_time_SOURCES = \
+ src/test/test-time.c
+
+test_time_LDADD = \
+ libsystemd-shared.la
+
+test_clock_SOURCES = \
+ src/test/test-clock.c
+
+test_clock_LDADD = \
+ libsystemd-shared.la
+
+test_architecture_SOURCES = \
+ src/test/test-architecture.c
+
+test_architecture_LDADD = \
+ libsystemd-shared.la
+
+test_log_SOURCES = \
+ src/test/test-log.c
+
+test_log_LDADD = \
+ libsystemd-shared.la
+
+test_ipcrm_SOURCES = \
+ src/test/test-ipcrm.c
+
+test_ipcrm_LDADD = \
+ libsystemd-shared.la
+
+test_btrfs_SOURCES = \
+ src/test/test-btrfs.c
+
+test_btrfs_LDADD = \
+ libsystemd-shared.la
+
+ifneq ($(HAVE_LIBIPTC),)
+test_firewall_util_SOURCES = \
+ src/test/test-firewall-util.c
+
+test_firewall_util_CFLAGS = \
+ $(LIBIPTC_CFLAGS)
+
+test_firewall_util_LDADD = \
+ libsystemd-firewall.la \
+ libsystemd-shared.la \
+ $(LIBIPTC_LIBS)
+endif # HAVE_LIBIPTC
+
+test_netlink_manual_SOURCES = \
+ src/test/test-netlink-manual.c
+
+test_netlink_manual_CFLAGS = \
+ $(KMOD_CFLAGS)
+
+test_netlink_manual_LDADD = \
+ libsystemd-shared.la \
+ $(KMOD_LIBS)
+
+test_ellipsize_SOURCES = \
+ src/test/test-ellipsize.c
+
+test_ellipsize_LDADD = \
+ libsystemd-shared.la
+
+test_date_SOURCES = \
+ src/test/test-date.c
+
+test_date_LDADD = \
+ libsystemd-shared.la
+
+test_sleep_SOURCES = \
+ src/test/test-sleep.c
+
+test_sleep_LDADD = \
+ libcore.la
+
+test_replace_var_SOURCES = \
+ src/test/test-replace-var.c
+
+test_replace_var_LDADD = \
+ libsystemd-shared.la
+
+test_calendarspec_SOURCES = \
+ src/test/test-calendarspec.c
+
+test_calendarspec_LDADD = \
+ libsystemd-shared.la
+
+test_strip_tab_ansi_SOURCES = \
+ src/test/test-strip-tab-ansi.c
+
+test_strip_tab_ansi_LDADD = \
+ libsystemd-shared.la
+
+test_daemon_SOURCES = \
+ src/test/test-daemon.c
+
+test_daemon_LDADD = \
+ libsystemd-shared.la
+
+test_cgroup_SOURCES = \
+ src/test/test-cgroup.c
+
+test_cgroup_LDADD = \
+ libsystemd-shared.la
+
+test_cgroup_mask_SOURCES = \
+ src/test/test-cgroup-mask.c
+
+test_cgroup_mask_CPPFLAGS = \
+ $(MOUNT_CFLAGS)
+
+test_cgroup_mask_CFLAGS = \
+ $(SECCOMP_CFLAGS)
+
+test_cgroup_mask_LDADD = \
+ libcore.la
+
+test_cgroup_util_SOURCES = \
+ src/test/test-cgroup-util.c
+
+test_cgroup_util_LDADD = \
+ libsystemd-shared.la
+
+test_env_util_SOURCES = \
+ src/test/test-env-util.c
+
+test_env_util_LDADD = \
+ libsystemd-shared.la
+
+test_strbuf_SOURCES = \
+ src/test/test-strbuf.c
+
+test_strbuf_LDADD = \
+ libsystemd-shared.la
+
+test_strv_SOURCES = \
+ src/test/test-strv.c
+
+test_strv_LDADD = \
+ libsystemd-shared.la
+
+test_path_util_SOURCES = \
+ src/test/test-path-util.c
+
+test_path_util_LDADD = \
+ libsystemd-shared.la
+
+test_path_SOURCES = \
+ src/test/test-path.c
+
+test_path_CFLAGS = \
+ $(MOUNT_CFLAGS)
+
+test_path_LDADD = \
+ libcore.la
+
+test_execute_SOURCES = \
+ src/test/test-execute.c
+
+test_execute_CFLAGS = \
+ $(MOUNT_CFLAGS)
+
+test_execute_LDADD = \
+ libcore.la
+
+test_siphash24_SOURCES = \
+ src/test/test-siphash24.c
+
+test_siphash24_LDADD = \
+ libsystemd-shared.la
+
+test_strxcpyx_SOURCES = \
+ src/test/test-strxcpyx.c
+
+test_strxcpyx_LDADD = \
+ libsystemd-shared.la
+
+test_install_SOURCES = \
+ src/test/test-install.c
+
+test_install_LDADD = \
+ libsystemd-shared.la
+
+test_watchdog_SOURCES = \
+ src/test/test-watchdog.c
+
+test_watchdog_LDADD = \
+ libsystemd-shared.la
+
+test_sched_prio_SOURCES = \
+ src/test/test-sched-prio.c
+
+test_sched_prio_CPPFLAGS = \
+ $(MOUNT_CFLAGS)
+
+test_sched_prio_CFLAGS = \
+ $(SECCOMP_CFLAGS)
+
+test_sched_prio_LDADD = \
+ libcore.la
+
+test_conf_files_SOURCES = \
+ src/test/test-conf-files.c
+
+test_conf_files_LDADD = \
+ libsystemd-shared.la
+
+test_conf_parser_SOURCES = \
+ src/test/test-conf-parser.c
+
+test_conf_parser_LDADD = \
+ libsystemd-shared.la
+
+test_af_list_SOURCES = \
+ src/test/test-af-list.c
+
+test_af_list_LDADD = \
+ libsystemd-shared.la
+
+test_arphrd_list_SOURCES = \
+ src/test/test-arphrd-list.c
+
+test_arphrd_list_LDADD = \
+ libsystemd-shared.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/test/TEST-01-BASIC/Makefile b/test/TEST-01-BASIC/Makefile
deleted file mode 100644
index 5e89a29eff..0000000000
--- a/test/TEST-01-BASIC/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-all:
- @make -s --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --all
-setup:
- @make --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --setup
-clean:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --clean
-run:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --run
diff --git a/test/TEST-02-CRYPTSETUP/Makefile b/test/TEST-02-CRYPTSETUP/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-02-CRYPTSETUP/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-03-JOBS/Makefile b/test/TEST-03-JOBS/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-03-JOBS/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-04-JOURNAL/Makefile b/test/TEST-04-JOURNAL/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-04-JOURNAL/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-05-RLIMITS/Makefile b/test/TEST-05-RLIMITS/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-05-RLIMITS/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-06-SELINUX/Makefile b/test/TEST-06-SELINUX/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-06-SELINUX/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-07-ISSUE-1981/Makefile b/test/TEST-07-ISSUE-1981/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-07-ISSUE-1981/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-08-ISSUE-2730/Makefile b/test/TEST-08-ISSUE-2730/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-08-ISSUE-2730/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-09-ISSUE-2691/Makefile b/test/TEST-09-ISSUE-2691/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-09-ISSUE-2691/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-10-ISSUE-2467/Makefile b/test/TEST-10-ISSUE-2467/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-10-ISSUE-2467/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-11-ISSUE-3166/Makefile b/test/TEST-11-ISSUE-3166/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-11-ISSUE-3166/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-12-ISSUE-3171/Makefile b/test/TEST-12-ISSUE-3171/Makefile
deleted file mode 120000
index e9f93b1104..0000000000
--- a/test/TEST-12-ISSUE-3171/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../TEST-01-BASIC/Makefile \ No newline at end of file
diff --git a/test/TEST-13-NSPAWN-SMOKE/Makefile b/test/TEST-13-NSPAWN-SMOKE/Makefile
deleted file mode 100644
index ff1470f852..0000000000
--- a/test/TEST-13-NSPAWN-SMOKE/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-all:
- @make -s --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --all
-setup:
- @make --no-print-directory -C ../.. all
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --setup
-clean:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --clean
- @rm -f has-overflow
-run:
- @basedir=../.. TEST_BASE_DIR=../ ./test.sh --run
diff --git a/tmpfiles.d/Makefile b/tmpfiles.d/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/tmpfiles.d/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/units/Makefile b/units/Makefile
deleted file mode 120000
index bd1047548b..0000000000
--- a/units/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../src/Makefile \ No newline at end of file
diff --git a/units/user/Makefile b/units/user/Makefile
deleted file mode 120000
index 50be21181f..0000000000
--- a/units/user/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../src/Makefile \ No newline at end of file