chiark / gitweb /
switch from udev keymaps to hwdb
[elogind.git] / Makefile.am
index 8569983..7e6361c 100644 (file)
@@ -32,28 +32,28 @@ SUBDIRS = . po
 .SECONDARY:
 
 LIBUDEV_CURRENT=4
-LIBUDEV_REVISION=0
+LIBUDEV_REVISION=6
 LIBUDEV_AGE=3
 
 LIBGUDEV_CURRENT=1
 LIBGUDEV_REVISION=3
 LIBGUDEV_AGE=1
 
-LIBSYSTEMD_LOGIN_CURRENT=4
+LIBSYSTEMD_LOGIN_CURRENT=8
 LIBSYSTEMD_LOGIN_REVISION=0
-LIBSYSTEMD_LOGIN_AGE=4
+LIBSYSTEMD_LOGIN_AGE=8
 
 LIBSYSTEMD_DAEMON_CURRENT=0
-LIBSYSTEMD_DAEMON_REVISION=7
+LIBSYSTEMD_DAEMON_REVISION=10
 LIBSYSTEMD_DAEMON_AGE=0
 
 LIBSYSTEMD_ID128_CURRENT=0
-LIBSYSTEMD_ID128_REVISION=17
+LIBSYSTEMD_ID128_REVISION=23
 LIBSYSTEMD_ID128_AGE=0
 
-LIBSYSTEMD_JOURNAL_CURRENT=8
+LIBSYSTEMD_JOURNAL_CURRENT=11
 LIBSYSTEMD_JOURNAL_REVISION=0
-LIBSYSTEMD_JOURNAL_AGE=8
+LIBSYSTEMD_JOURNAL_AGE=11
 
 # Dirs of external packages
 dbuspolicydir=@dbuspolicydir@
@@ -65,7 +65,7 @@ pkgconfigdatadir=$(datadir)/pkgconfig
 pkgconfiglibdir=$(libdir)/pkgconfig
 polkitpolicydir=$(datadir)/polkit-1/actions
 bashcompletiondir=@bashcompletiondir@
-rpmmacrosdir=$(sysconfdir)/rpm
+rpmmacrosdir=$(prefix)/lib/rpm/macros.d
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
 varlogdir=$(localstatedir)/log
@@ -90,6 +90,7 @@ udevhomedir=$(udevlibexecdir)
 udevrulesdir=$(udevlibexecdir)/rules.d
 udevhwdbdir=$(udevlibexecdir)/hwdb.d
 catalogdir=$(prefix)/lib/systemd/catalog
+kernelinstalldir = $(prefix)/lib/kernel/install.d
 
 # And these are the special ones for /
 rootprefix=@rootprefix@
@@ -97,6 +98,7 @@ rootbindir=$(rootprefix)/bin
 rootlibexecdir=$(rootprefix)/lib/systemd
 
 CLEANFILES = $(BUILT_SOURCES)
+DISTCLEANFILES =
 EXTRA_DIST =
 BUILT_SOURCES =
 INSTALL_EXEC_HOOKS =
@@ -123,22 +125,27 @@ dbusinterface_DATA =
 dist_dbussystemservice_DATA =
 check_PROGRAMS =
 check_DATA =
-noinst_tests=
-noinst_PROGRAMS = $(noinst_tests)
-TESTS = $(noinst_tests)
+tests=
+manual_tests =
+if ENABLE_TESTS
+noinst_PROGRAMS = $(manual_tests) $(tests)
+TESTS = $(tests)
+else
+noinst_PROGRAMS =
+TESTS =
+endif
 udevlibexec_PROGRAMS =
 
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
-       -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
+       -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_FILE=\"$(pkgsysconfdir)/user.conf\" \
        -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
        -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
-       -DCATALOG_PATH=\"$(catalogstatedir)\" \
+       -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" \
        -DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
        -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \
        -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
@@ -157,6 +164,8 @@ AM_CPPFLAGS = \
        -DX_SERVER=\"$(bindir)/X\" \
        -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \
        -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
+       -DQUOTACHECK=\"$(QUOTACHECK)\" \
+       -DKEXEC=\"$(KEXEC)\" \
        -I $(top_srcdir)/src \
        -I $(top_srcdir)/src/shared \
        -I $(top_srcdir)/src/login \
@@ -166,6 +175,8 @@ AM_CPPFLAGS = \
        -I $(top_srcdir)/src/core \
        -I $(top_srcdir)/src/libudev \
        -I $(top_srcdir)/src/udev \
+       -I $(top_builddir)/src/udev \
+       -I $(top_srcdir)/src/libsystemd-bus \
        $(OUR_CPPFLAGS)
 
 AM_CFLAGS = $(OUR_CFLAGS)
@@ -213,6 +224,7 @@ install-target-wants-hook:
        what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
        what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
        what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
+       what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
 
 define add-wants
        [ -z "$$what" ] || ( \
@@ -220,7 +232,7 @@ define add-wants
          $(MKDIR_P) -m 0755 $$dir && \
          cd $$dir && \
          rm -f $$what && \
-         for i in $$what; do ln -s ../$$i . || exit $$? ; done )
+         for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
 endef
 
 install-directories-hook:
@@ -235,10 +247,10 @@ install-aliases-hook:
                dir= && $(install-aliases)
 
 define install-aliases
-       $(MKDIR_P) /$(DESTDIR)$$dir && \
        while [ -n "$$1" ]; do \
+               $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
                rm -f $(DESTDIR)$$dir/$$2 && \
-               ln -s $$1 $(DESTDIR)$$dir/$$2 && \
+               $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
                shift 2 || exit $$?; \
        done
 endef
@@ -271,7 +283,6 @@ rootbin_PROGRAMS = \
        systemd-notify \
        systemd-ask-password \
        systemd-tty-ask-password-agent \
-       systemd-tmpfiles \
        systemd-machine-id-setup
 
 bin_PROGRAMS = \
@@ -281,13 +292,15 @@ bin_PROGRAMS = \
        systemd-nspawn \
        systemd-detect-virt \
        systemd-delta \
-       systemd-analyze
+       systemd-analyze \
+       systemd-run
 
-bin_SCRIPTS = \
+dist_bin_SCRIPTS = \
        src/kernel-install/kernel-install
 
-EXTRA_DIST += \
-       src/kernel-install/kernel-install
+dist_kernelinstall_SCRIPTS = \
+       src/kernel-install/50-depmod.install \
+       src/kernel-install/90-loaderentry.install
 
 rootlibexec_PROGRAMS = \
        systemd \
@@ -323,21 +336,12 @@ systemd_analyze_LDADD = \
 dist_bashcompletion_DATA = \
        shell-completion/bash/journalctl \
        shell-completion/bash/systemctl \
+       shell-completion/bash/systemd-analyze \
        shell-completion/bash/udevadm
 
-dist_tmpfiles_DATA = \
-       tmpfiles.d/systemd.conf \
-       tmpfiles.d/tmp.conf \
-       tmpfiles.d/x11.conf
-
 dist_sysctl_DATA = \
        sysctl.d/50-default.conf
 
-if HAVE_SYSV_COMPAT
-dist_tmpfiles_DATA += \
-       tmpfiles.d/legacy.conf
-endif
-
 dist_systemunit_DATA = \
        units/graphical.target \
        units/multi-user.target \
@@ -356,6 +360,7 @@ dist_systemunit_DATA = \
        units/remote-fs.target \
        units/remote-fs-pre.target \
        units/network.target \
+       units/network-online.target \
        units/nss-lookup.target \
        units/nss-user-lookup.target \
        units/hibernate.target \
@@ -375,6 +380,9 @@ dist_systemunit_DATA = \
        units/paths.target \
        units/suspend.target \
        units/swap.target \
+       units/slices.target \
+       units/system.slice \
+       units/x-.slice \
        units/systemd-initctl.socket \
        units/systemd-shutdownd.socket \
        units/syslog.socket \
@@ -388,8 +396,6 @@ dist_systemunit_DATA = \
        units/sound.target \
        units/bluetooth.target \
        units/smartcard.target \
-       units/systemd-tmpfiles-clean.timer \
-       units/quotaon.service \
        units/systemd-ask-password-wall.path \
        units/systemd-ask-password-console.path \
        units/systemd-udevd-control.socket \
@@ -405,10 +411,8 @@ nodist_systemunit_DATA = \
        units/systemd-initctl.service \
        units/systemd-shutdownd.service \
        units/systemd-remount-fs.service \
+       units/systemd-update-utmp.service \
        units/systemd-update-utmp-runlevel.service \
-       units/systemd-update-utmp-shutdown.service \
-       units/systemd-tmpfiles-setup.service \
-       units/systemd-tmpfiles-clean.service \
        units/systemd-ask-password-wall.service \
        units/systemd-ask-password-console.service \
        units/systemd-sysctl.service \
@@ -431,7 +435,8 @@ nodist_systemunit_DATA = \
        units/initrd-parse-etc.service \
        units/initrd-cleanup.service \
        units/initrd-udevadm-cleanup-db.service \
-       units/initrd-switch-root.service
+       units/initrd-switch-root.service \
+       units/systemd-nspawn@.service
 
 dist_userunit_DATA = \
        units/user/default.target \
@@ -449,10 +454,8 @@ EXTRA_DIST += \
        units/systemd-initctl.service.in \
        units/systemd-shutdownd.service.in \
        units/systemd-remount-fs.service.in \
+       units/systemd-update-utmp.service.in \
        units/systemd-update-utmp-runlevel.service.in \
-       units/systemd-update-utmp-shutdown.service.in \
-       units/systemd-tmpfiles-setup.service.in \
-       units/systemd-tmpfiles-clean.service.in \
        units/systemd-ask-password-wall.service.in \
        units/systemd-ask-password-console.service.in \
        units/systemd-sysctl.service.in \
@@ -477,6 +480,7 @@ EXTRA_DIST += \
        units/initrd-cleanup.service.in \
        units/initrd-udevadm-cleanup-db.service.in \
        units/initrd-switch-root.service.in \
+       units/systemd-nspawn@.service.in \
        introspect.awk
 
 CLEANFILES += \
@@ -497,6 +501,17 @@ EXTRA_DIST += \
        units/rc-local.service.in \
        units/halt-local.service.in
 
+# automake is broken and can't handle files with a dash in front
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14728#8
+units-install-hook:
+       mv $(DESTDIR)$(systemunitdir)/x-.slice $(DESTDIR)/$(systemunitdir)/-.slice
+
+units-uninstall-hook:
+       rm -f $(DESTDIR)/$(systemunitdir)/-.slice
+
+INSTALL_DATA_HOOKS += units-install-hook
+UNINSTALL_DATA_HOOKS += units-uninstall-hook
+
 dist_doc_DATA = \
        README \
        NEWS \
@@ -514,6 +529,9 @@ MANPAGES_ALIAS =
 
 include Makefile-man.am
 
+.PHONY: man
+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 = \
@@ -555,9 +573,10 @@ noinst_DATA += \
 CLEANFILES += \
        man/index.html
 
+XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_builddir)/man/*.xml)
 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
+SOURCE_XML_FILES = $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
 
-XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in $(top_builddir)/man/*.xml)
 update-man-list: make-man-rules.py $(XML_GLOB)
        $(AM_V_GEN)$(PYTHON) $^ > $(top_srcdir)/Makefile-man.tmp
        $(AM_V_at)mv $(top_srcdir)/Makefile-man.tmp $(top_srcdir)/Makefile-man.am
@@ -565,11 +584,11 @@ update-man-list: make-man-rules.py $(XML_GLOB)
 
 man/systemd.index.xml: make-man-index.py $(NON_INDEX_XML_FILES)
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(PYTHON) $^ > $@
+       $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
 
-man/systemd.directives.xml: make-directive-index.py $(filter-out man/systemd.directives.xml,$(NON_INDEX_XML_FILES))
+man/systemd.directives.xml: make-directive-index.py $(SOURCE_XML_FILES)
        $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(PYTHON) $^ > $@
+       $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
 
 EXTRA_DIST += \
        man/systemd.index.xml \
@@ -588,9 +607,10 @@ EXTRA_DIST += \
        $(XML_FILES) \
        $(HTML_FILES) \
        $(HTML_ALIAS) \
-       $(dist_MANS) \
+       $(man_MANS) \
        make-man-index.py \
-       make-directive-index.py
+       make-directive-index.py \
+       xml_helper.py
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -624,6 +644,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/fdset.h \
        src/shared/prioq.c \
        src/shared/prioq.h \
+       src/shared/sleep-config.c \
+       src/shared/sleep-config.h \
        src/shared/strv.c \
        src/shared/strv.h \
        src/shared/env-util.c \
@@ -673,7 +695,10 @@ libsystemd_shared_la_SOURCES = \
        src/shared/calendarspec.h \
        src/shared/fileio.c \
        src/shared/fileio.h \
-       src/shared/output-mode.h
+       src/shared/output-mode.h \
+       src/shared/MurmurHash3.c \
+       src/shared/MurmurHash3.h \
+       src/shared/refcnt.h
 
 #-------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -836,6 +861,10 @@ libsystemd_core_la_SOURCES = \
        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 \
@@ -868,12 +897,18 @@ libsystemd_core_la_SOURCES = \
        src/core/dbus-snapshot.h \
        src/core/dbus-device.c \
        src/core/dbus-device.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-path.c \
-       src/core/dbus-path.h \
+       src/core/dbus-cgroup.c \
+       src/core/dbus-cgroup.h \
        src/core/cgroup.c \
        src/core/cgroup.h \
        src/core/selinux-access.c \
@@ -900,10 +935,6 @@ libsystemd_core_la_SOURCES = \
        src/core/namespace.h \
        src/core/tcpwrap.c \
        src/core/tcpwrap.h \
-       src/core/cgroup-attr.c \
-       src/core/cgroup-attr.h \
-       src/core/cgroup-semantics.c \
-       src/core/cgroup-semantics.h \
        src/core/securebits.h \
        src/core/initreq.h \
        src/core/special.h \
@@ -1054,7 +1085,7 @@ CLEANFILES += \
        src/core/org.freedesktop.systemd1.policy.in
 
 # ------------------------------------------------------------------------------
-noinst_PROGRAMS += \
+manual_tests += \
        test-engine \
        test-ns \
        test-loopback \
@@ -1065,11 +1096,12 @@ noinst_PROGRAMS += \
        test-watchdog \
        test-log
 
-noinst_tests += \
+tests += \
        test-job-type \
        test-env-replace \
        test-strbuf \
        test-strv \
+       test-path-util \
        test-strxcpyx \
        test-unit-name \
        test-unit-file \
@@ -1081,7 +1113,12 @@ noinst_tests += \
        test-calendarspec \
        test-strip-tab-ansi \
        test-cgroup-util \
-       test-prioq
+       test-prioq \
+       test-fileio \
+       test-time \
+       test-hashmap \
+       test-list \
+       test-tables
 
 EXTRA_DIST += \
        test/sched_idle_bad.service \
@@ -1119,6 +1156,10 @@ test_ns_SOURCES = \
 test_ns_LDADD = \
        libsystemd-core.la
 
+test_ns_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
+
 test_loopback_SOURCES = \
        src/test/test-loopback.c
 
@@ -1133,7 +1174,7 @@ test_hostname_LDADD = \
        libsystemd-core.la
 
 if ENABLE_EFI
-noinst_PROGRAMS += \
+manual_tests += \
        test-efivars
 
 test_efivars_SOURCES = \
@@ -1172,6 +1213,36 @@ test_util_CFLAGS = \
 test_util_LDADD = \
        libsystemd-core.la
 
+test_hashmap_SOURCES = \
+       src/test/test-hashmap.c
+
+test_hashmap_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_hashmap_LDADD = \
+       libsystemd-core.la
+
+test_list_SOURCES = \
+       src/test/test-list.c
+
+test_list_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_list_LDADD = \
+       libsystemd-core.la
+
+test_tables_SOURCES = \
+       src/test/test-tables.c \
+       src/shared/test-tables.h
+
+test_tables_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+test_tables_LDADD = \
+       libsystemd-core.la \
+       libsystemd-logs.la
+
 test_prioq_SOURCES = \
        src/test/test-prioq.c
 
@@ -1181,6 +1252,24 @@ test_prioq_CFLAGS = \
 test_prioq_LDADD = \
        libsystemd-core.la
 
+test_fileio_SOURCES = \
+       src/test/test-fileio.c
+
+test_fileio_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_fileio_LDADD = \
+       libsystemd-core.la
+
+test_time_SOURCES = \
+       src/test/test-time.c
+
+test_time_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_time_LDADD = \
+       libsystemd-core.la
+
 test_log_SOURCES = \
        src/test/test-log.c
 
@@ -1258,6 +1347,12 @@ test_strv_LDADD = \
        libsystemd-units.la \
        libsystemd-id128-internal.la
 
+test_path_util_SOURCES = \
+       src/test/test-path-util.c
+
+test_path_util_LDADD = \
+       libsystemd-shared.la
+
 test_strxcpyx_SOURCES = \
        src/test/test-strxcpyx.c
 
@@ -1296,6 +1391,44 @@ test_sched_prio_LDADD = \
        libsystemd-daemon.la
 
 # ------------------------------------------------------------------------------
+## .PHONY so it always rebuilds it
+.PHONY: coverage lcov-run lcov-report
+
+# run lcov from scratch, always
+coverage:
+       $(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))'
+
+if 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
+       genhtml -t "systemd test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov.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
+
+# ------------------------------------------------------------------------------
 systemd_initctl_SOURCES = \
        src/initctl/initctl.c
 
@@ -1371,12 +1504,21 @@ nodist_systemunit_DATA += \
 SYSINIT_TARGET_WANTS += \
        systemd-modules-load.service
 
+if ENABLE_TMPFILES
+nodist_systemunit_DATA += \
+       units/kmod-static-nodes.service
+
+SYSINIT_TARGET_WANTS += \
+       kmod-static-nodes.service
+endif
 endif
 
 EXTRA_DIST += \
-       units/systemd-modules-load.service.in
+        units/systemd-modules-load.service.in \
+        units/kmod-static-nodes.service.in
 
 # ------------------------------------------------------------------------------
+if ENABLE_TMPFILES
 systemd_tmpfiles_SOURCES = \
        src/tmpfiles/tmpfiles.c
 
@@ -1385,6 +1527,44 @@ systemd_tmpfiles_LDADD = \
        libsystemd-shared.la \
        libsystemd-capability.la
 
+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
+
+dist_tmpfiles_DATA = \
+       tmpfiles.d/systemd.conf \
+       tmpfiles.d/tmp.conf \
+       tmpfiles.d/x11.conf
+
+if HAVE_SYSV_COMPAT
+dist_tmpfiles_DATA += \
+       tmpfiles.d/legacy.conf
+endif
+
+SYSINIT_TARGET_WANTS += \
+       systemd-tmpfiles-setup-dev.service \
+       systemd-tmpfiles-setup.service
+
+TIMERS_TARGET_WANTS += \
+       systemd-tmpfiles-clean.timer
+
+INSTALL_DIRS += \
+       $(tmpfilesdir) \
+       $(sysconfdir)/tmpfiles.d
+endif
+
+EXTRA_DIST += \
+       units/systemd-tmpfiles-setup-dev.service.in \
+       units/systemd-tmpfiles-setup.service.in \
+       units/systemd-tmpfiles-clean.service.in
+
 # ------------------------------------------------------------------------------
 systemd_machine_id_setup_SOURCES = \
        src/machine-id-setup/machine-id-setup-main.c \
@@ -1483,8 +1663,8 @@ systemd_system_update_generator_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
 
-# ------------------------------------------------------------------------------
 if ENABLE_EFI
+# ------------------------------------------------------------------------------
 systemgenerator_PROGRAMS +=  \
        systemd-efi-boot-generator
 
@@ -1494,6 +1674,22 @@ systemd_efi_boot_generator_SOURCES = \
 systemd_efi_boot_generator_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
+
+# ------------------------------------------------------------------------------
+bootctl_SOURCES = \
+       src/boot/boot.h \
+       src/boot/boot-loader.h \
+       src/boot/bootctl.c \
+       src/boot/boot-loader.c \
+       src/boot/boot-efi.c
+
+bootctl_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-id128.la \
+       libsystemd-daemon.la
+
+bin_PROGRAMS += \
+       bootctl
 endif
 
 # ------------------------------------------------------------------------------
@@ -1593,14 +1789,29 @@ systemd_nspawn_LDADD = \
        libsystemd-capability.la \
        libsystemd-shared.la \
        libsystemd-daemon.la \
-       libsystemd-id128-internal.la
+       libsystemd-id128-internal.la \
+       libsystemd-bus.la
+
+# ------------------------------------------------------------------------------
+systemd_run_SOURCES = \
+       src/run/run.c
+
+systemd_run_LDADD = \
+       libsystemd-label.la \
+       libsystemd-capability.la \
+       libsystemd-shared.la \
+       libsystemd-daemon.la \
+       libsystemd-id128-internal.la \
+       libsystemd-bus.la
 
 # ------------------------------------------------------------------------------
 systemd_stdio_bridge_SOURCES = \
        src/stdio-bridge/stdio-bridge.c
 
 systemd_stdio_bridge_LDADD = \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-daemon.la
 
 # ------------------------------------------------------------------------------
 systemd_tty_ask_password_agent_SOURCES = \
@@ -1655,34 +1866,56 @@ EXTRA_DIST += \
 
 # ------------------------------------------------------------------------------
 libsystemd_bus_la_SOURCES = \
+       src/systemd/sd-bus.h \
+       src/systemd/sd-bus-protocol.h \
+       src/systemd/sd-memfd.h \
        src/libsystemd-bus/sd-bus.c \
-       src/libsystemd-bus/sd-bus.h \
-       src/libsystemd-bus/sd-bus-protocol.h \
        src/libsystemd-bus/bus-control.c \
+       src/libsystemd-bus/bus-control.h \
        src/libsystemd-bus/bus-error.c \
        src/libsystemd-bus/bus-error.h \
        src/libsystemd-bus/bus-internal.c \
        src/libsystemd-bus/bus-internal.h \
        src/libsystemd-bus/bus-socket.c \
        src/libsystemd-bus/bus-socket.h \
+       src/libsystemd-bus/bus-kernel.c \
+       src/libsystemd-bus/bus-kernel.h \
        src/libsystemd-bus/bus-message.c \
        src/libsystemd-bus/bus-message.h \
        src/libsystemd-bus/bus-signature.c \
        src/libsystemd-bus/bus-signature.h \
        src/libsystemd-bus/bus-type.c \
-       src/libsystemd-bus/bus-type.h
+       src/libsystemd-bus/bus-type.h \
+       src/libsystemd-bus/bus-match.c \
+       src/libsystemd-bus/bus-match.h \
+       src/libsystemd-bus/bus-bloom.c \
+       src/libsystemd-bus/bus-bloom.h \
+       src/libsystemd-bus/kdbus.h \
+       src/libsystemd-bus/sd-memfd.c
 
 libsystemd_bus_la_LIBADD =  \
        libsystemd-id128-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-daemon.la
+
+libsystemd_bus_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
 
 noinst_LTLIBRARIES += \
        libsystemd-bus.la
 
-noinst_tests += \
+tests += \
        test-bus-marshal \
        test-bus-signature \
-       test-bus-chat
+       test-bus-chat \
+       test-bus-server \
+       test-bus-match \
+       test-bus-kernel \
+       test-bus-kernel-bloom \
+       test-bus-kernel-benchmark \
+       test-bus-memfd \
+       test-bus-zero-copy
 
 noinst_PROGRAMS += \
        busctl
@@ -1720,6 +1953,82 @@ test_bus_chat_LDADD = \
        libsystemd-bus.la \
        libsystemd-id128-internal.la
 
+test_bus_server_SOURCES = \
+       src/libsystemd-bus/test-bus-server.c
+
+test_bus_server_CFLAGS = \
+       $(AM_CFLAGS) \
+       -pthread
+
+test_bus_server_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
+test_bus_match_SOURCES = \
+       src/libsystemd-bus/test-bus-match.c
+
+test_bus_match_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_bus_match_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
+test_bus_kernel_SOURCES = \
+       src/libsystemd-bus/test-bus-kernel.c
+
+test_bus_kernel_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_bus_kernel_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
+test_bus_kernel_bloom_SOURCES = \
+       src/libsystemd-bus/test-bus-kernel-bloom.c
+
+test_bus_kernel_bloom_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_bus_kernel_bloom_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
+test_bus_kernel_benchmark_SOURCES = \
+       src/libsystemd-bus/test-bus-kernel-benchmark.c
+
+test_bus_kernel_benchmark_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_bus_kernel_benchmark_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la \
+       libsystemd-id128-internal.la
+
+test_bus_memfd_SOURCES = \
+       src/libsystemd-bus/test-bus-memfd.c
+
+test_bus_memfd_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_bus_memfd_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la
+
+test_bus_zero_copy_SOURCES = \
+       src/libsystemd-bus/test-bus-zero-copy.c
+
+test_bus_zero_copy_CFLAGS = \
+       $(AM_CFLAGS)
+
+test_bus_zero_copy_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-bus.la
+
 busctl_SOURCES = \
        src/libsystemd-bus/busctl.c
 
@@ -1766,6 +2075,7 @@ libudev_la_LDFLAGS = \
 
 libudev_la_LIBADD = \
        libsystemd-shared.la \
+       libsystemd-label.la \
        libsystemd-daemon-internal.la \
        libsystemd-id128-internal.la
 
@@ -1824,6 +2134,7 @@ dist_udevrules_DATA += \
        rules/99-systemd.rules \
        rules/42-usb-hid-pm.rules \
        rules/50-udev-default.rules \
+       rules/60-keyboard.rules \
        rules/60-persistent-storage-tape.rules \
        rules/60-persistent-serial.rules \
        rules/60-persistent-input.rules \
@@ -1843,7 +2154,8 @@ dist_udevhwdb_DATA = \
        hwdb/20-usb-classes.hwdb \
        hwdb/20-bluetooth-vendor-product.hwdb \
        hwdb/20-acpi-vendor.hwdb \
-       hwdb/20-OUI.hwdb
+       hwdb/20-OUI.hwdb \
+       hwdb/60-keyboard.hwdb
 
 udevconfdir = $(sysconfdir)/udev
 dist_udevconf_DATA = \
@@ -1887,6 +2199,19 @@ rootlibexec_PROGRAMS += \
 noinst_LTLIBRARIES += \
        libudev-core.la
 
+src/udev/keyboard-keys.txt: Makefile
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
+
+src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt Makefile
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
+
+src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf Makefile
+       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
+
+src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt Makefile
+       $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
+
 libudev_core_la_SOURCES = \
        src/udev/udev.h \
        src/udev/udev-event.c \
@@ -1898,10 +2223,22 @@ libudev_core_la_SOURCES = \
        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-path_id.c \
        src/udev/udev-builtin-usb_id.c
 
+nodist_libudev_core_la_SOURCES = \
+       src/udev/keyboard-keys-from-name.h \
+       src/udev/keyboard-keys-to-name.h
+
+BUILT_SOURCES += \
+       $(nodist_libudev_core_la_SOURCES)
+
+CLEANFILES += \
+       src/udev/keyboard-keys-from-name.gperf \
+       src/udev/keyboard-keys.txt
+
 libudev_core_la_CFLAGS = \
        $(AM_CFLAGS) \
        $(BLKID_CFLAGS) \
@@ -1987,7 +2324,7 @@ TESTS += \
        test/udev-test.pl \
        test/rules-test.sh
 
-noinst_PROGRAMS += \
+manual_tests += \
        test-libudev \
        test-udev
 
@@ -2267,137 +2604,6 @@ EXTRA_DIST += \
        src/gudev/seed-example.js
 
 # ------------------------------------------------------------------------------
-if ENABLE_KEYMAP
-keymap_SOURCES = \
-       src/udev/keymap/keymap.c
-
-keymap_CPPFLAGS = \
-       $(AM_CPPFLAGS) -I src/udev/keymap
-
-keymap_LDADD = \
-       libsystemd-shared.la
-
-nodist_keymap_SOURCES = \
-       src/udev/keymap/keys-from-name.h \
-       src/udev/keymap/keys-to-name.h
-
-BUILT_SOURCES += \
-       $(nodist_keymap_SOURCES)
-
-udevlibexec_PROGRAMS += \
-       keymap
-
-dist_doc_DATA += \
-       src/udev/keymap/README.keymap.txt
-
-dist_udevrules_DATA += \
-       src/udev/keymap/95-keymap.rules \
-       src/udev/keymap/95-keyboard-force-release.rules
-
-dist_udevhome_SCRIPTS = \
-       src/udev/keymap/findkeyboards \
-       src/udev/keymap/keyboard-force-release.sh
-
-TESTS += \
-       src/udev/keymap/check-keymaps.sh
-
-CLEANFILES += \
-       src/udev/keymap/keys.txt \
-       src/udev/keymap/keys-from-name.gperf \
-       src/udev/keymap/keyboard-force-release.sh
-
-udevkeymapdir = $(udevlibexecdir)/keymaps
-dist_udevkeymap_DATA = \
-       keymaps/acer \
-       keymaps/acer-aspire_5720 \
-       keymaps/acer-aspire_8930 \
-       keymaps/acer-aspire_5920g \
-       keymaps/acer-aspire_6920 \
-       keymaps/acer-travelmate_c300 \
-       keymaps/asus \
-       keymaps/compaq-e_evo \
-       keymaps/dell \
-       keymaps/dell-latitude-xt2 \
-       keymaps/everex-xt5000 \
-       keymaps/fujitsu-amilo_li_2732 \
-       keymaps/fujitsu-amilo_pa_2548 \
-       keymaps/fujitsu-amilo_pro_edition_v3505 \
-       keymaps/fujitsu-amilo_pro_v3205 \
-       keymaps/fujitsu-amilo_si_1520 \
-       keymaps/fujitsu-esprimo_mobile_v5 \
-       keymaps/fujitsu-esprimo_mobile_v6 \
-       keymaps/genius-slimstar-320 \
-       keymaps/hewlett-packard \
-       keymaps/hewlett-packard-2510p_2530p \
-       keymaps/hewlett-packard-compaq_elitebook \
-       keymaps/hewlett-packard-pavilion \
-       keymaps/hewlett-packard-presario-2100 \
-       keymaps/hewlett-packard-tablet \
-       keymaps/hewlett-packard-tx2 \
-       keymaps/hewlett-packard_elitebook-8440p \
-       keymaps/hewlett-packard-hdx9494nr \
-       keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
-       keymaps/inventec-symphony_6.0_7.0 \
-       keymaps/lenovo-3000 \
-       keymaps/lenovo-ideapad \
-       keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
-       keymaps/lenovo-thinkpad_x6_tablet \
-       keymaps/lenovo-thinkpad_x200_tablet \
-       keymaps/lg-x110 \
-       keymaps/logitech-wave \
-       keymaps/logitech-wave-cordless \
-       keymaps/logitech-wave-pro-cordless \
-       keymaps/maxdata-pro_7000 \
-       keymaps/medion-fid2060 \
-       keymaps/medionnb-a555 \
-       keymaps/micro-star \
-       keymaps/module-asus-w3j \
-       keymaps/module-ibm \
-       keymaps/module-lenovo \
-       keymaps/module-sony \
-       keymaps/module-sony-old \
-       keymaps/module-sony-vgn \
-       keymaps/module-sony-vpc \
-       keymaps/olpc-xo \
-       keymaps/onkyo \
-       keymaps/oqo-model2 \
-       keymaps/samsung-other \
-       keymaps/samsung-series-9 \
-       keymaps/samsung-sq1us \
-       keymaps/samsung-sx20s \
-       keymaps/toshiba-satellite_a100 \
-       keymaps/toshiba-satellite_a110 \
-       keymaps/toshiba-satellite_m30x \
-       keymaps/zepto-znote
-
-udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release
-dist_udevkeymapforcerel_DATA = \
-       keymaps-force-release/dell-touchpad \
-       keymaps-force-release/dell-xps \
-       keymaps-force-release/hp-other \
-       keymaps-force-release/samsung-other \
-       keymaps-force-release/samsung-series-9 \
-       keymaps-force-release/common-volume-keys
-
-src/udev/keymap/keys.txt: Makefile
-       $(AM_V_at)$(MKDIR_P) $(dir $@)
-       $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
-
-src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt Makefile
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
-
-src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf Makefile
-       $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
-
-src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt Makefile
-       $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
-endif
-
-EXTRA_DIST += \
-       src/udev/keymap/check-keymaps.sh \
-       src/udev/keymap/keyboard-force-release.sh.in
-
-# ------------------------------------------------------------------------------
 mtd_probe_SOURCES =  \
        src/udev/mtd_probe/mtd_probe.c \
        src/udev/mtd_probe/mtd_probe.h \
@@ -2426,7 +2632,9 @@ libsystemd_id128_la_LDFLAGS = \
        -Wl,--version-script=$(top_srcdir)/src/libsystemd-id128/libsystemd-id128.sym
 
 libsystemd_id128_la_LIBADD = \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-label.la \
+       libsystemd-daemon-internal.la
 
 libsystemd_id128_internal_la_SOURCES = \
        $(libsystemd_id128_la_SOURCES)
@@ -2438,7 +2646,7 @@ test_id128_LDADD = \
        libsystemd-shared.la \
        libsystemd-id128-internal.la
 
-noinst_tests += \
+tests += \
        test-id128
 
 pkginclude_HEADERS += \
@@ -2581,6 +2789,14 @@ test_journal_verify_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-id128-internal.la
 
+test_journal_interleaving_SOURCES = \
+       src/journal/test-journal-interleaving.c
+
+test_journal_interleaving_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-journal-internal.la \
+       libsystemd-id128-internal.la
+
 test_mmap_cache_SOURCES = \
        src/journal/test-mmap-cache.c
 
@@ -2746,18 +2962,19 @@ catalog-remove-hook:
 UNINSTALL_DATA_HOOKS += \
        catalog-remove-hook
 
-noinst_PROGRAMS += \
-       test-journal-enum \
-       test-catalog
+manual_tests += \
+       test-journal-enum
 
-noinst_tests += \
+tests += \
        test-journal \
        test-journal-send \
        test-journal-syslog \
        test-journal-match \
        test-journal-stream \
        test-journal-verify \
-       test-mmap-cache
+       test-journal-interleaving \
+       test-mmap-cache \
+       test-catalog
 
 pkginclude_HEADERS += \
        src/systemd/sd-journal.h \
@@ -2828,6 +3045,7 @@ systemd_journal_gatewayd_LDADD = \
        libsystemd-journal-internal.la \
        libsystemd-id128-internal.la \
        libsystemd-daemon.la \
+       libsystemd-bus.la \
        $(MICROHTTPD_LIBS)
 
 systemd_journal_gatewayd_CFLAGS = \
@@ -2991,7 +3209,8 @@ systemd_bootchart_SOURCES = \
        src/bootchart/svg.h
 
 systemd_bootchart_LDADD = \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-journal.la
 
 rootlibexec_PROGRAMS += \
        systemd-bootchart
@@ -3027,8 +3246,7 @@ rootlibexec_PROGRAMS += \
        systemd-random-seed
 
 nodist_systemunit_DATA += \
-       units/systemd-random-seed-save.service \
-       units/systemd-random-seed-load.service
+       units/systemd-random-seed.service
 
 systemd_random_seed_SOURCES = \
        src/random-seed/random-seed.c
@@ -3037,16 +3255,13 @@ systemd_random_seed_LDADD = \
        libsystemd-label.la \
        libsystemd-shared.la
 
-SHUTDOWN_TARGET_WANTS += \
-       systemd-random-seed-save.service
 SYSINIT_TARGET_WANTS += \
-       systemd-random-seed-load.service
+       systemd-random-seed.service
 
 endif
 
 EXTRA_DIST += \
-       units/systemd-random-seed-save.service.in \
-       units/systemd-random-seed-load.service.in
+       units/systemd-random-seed.service.in
 
 # ------------------------------------------------------------------------------
 if HAVE_LIBCRYPTSETUP
@@ -3297,24 +3512,6 @@ EXTRA_DIST += \
        units/systemd-timedated.service.in
 
 # ------------------------------------------------------------------------------
-if ENABLE_EFI
-bootctl_SOURCES = \
-       src/boot/boot.h \
-       src/boot/boot-loader.h \
-       src/boot/bootctl.c \
-       src/boot/boot-loader.c \
-       src/boot/boot-efi.c
-
-bootctl_LDADD = \
-       libsystemd-shared.la \
-       libsystemd-id128.la \
-       libsystemd-daemon.la
-
-bin_PROGRAMS += \
-       bootctl
-endif
-
-# ------------------------------------------------------------------------------
 if HAVE_MYHOSTNAME
 libnss_myhostname_la_SOURCES = \
        src/nss-myhostname/nss-myhostname.c \
@@ -3337,10 +3534,116 @@ lib_LTLIBRARIES += \
 endif
 
 # ------------------------------------------------------------------------------
+if ENABLE_MACHINED
+systemd_machined_SOURCES = \
+       src/machine/machined.c \
+       src/machine/machined.h
+
+systemd_machined_CFLAGS = \
+       $(libsystemd_machine_core_la_CFLAGS)
+
+systemd_machined_LDADD = \
+       libsystemd-machine-core.la \
+       $(libsystemd_machine_core_la_LIBADD)
+
+rootlibexec_PROGRAMS += \
+       systemd-machined
+
+libsystemd_machine_core_la_SOURCES = \
+       src/machine/machined-dbus.c \
+       src/machine/machine.c \
+       src/machine/machine.h \
+       src/machine/machine-dbus.c
+
+libsystemd_machine_core_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+libsystemd_machine_core_la_LIBADD = \
+       libsystemd-label.la \
+       libsystemd-audit.la \
+       libsystemd-shared.la \
+       libsystemd-daemon.la \
+       libsystemd-dbus.la \
+       libsystemd-id128-internal.la \
+       libudev.la
+
+noinst_LTLIBRARIES += \
+       libsystemd-machine-core.la
+
+machinectl_SOURCES = \
+       src/machine/machinectl.c
+
+machinectl_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+machinectl_LDADD = \
+       libsystemd-shared.la \
+       libsystemd-dbus.la \
+       libudev.la
+
+rootbin_PROGRAMS += \
+       machinectl
+
+test_machine_tables_SOURCES = \
+       src/machine/test-machine-tables.c
+
+test_machine_tables_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+test_machine_tables_LDADD = \
+       libsystemd-machine-core.la
+
+tests += \
+       test-machine-tables
+
+nodist_systemunit_DATA += \
+       units/systemd-machined.service
+
+dist_systemunit_DATA += \
+       units/machine.slice
+
+dist_dbussystemservice_DATA += \
+       src/machine/org.freedesktop.machine1.service
+
+dist_dbuspolicy_DATA += \
+       src/machine/org.freedesktop.machine1.conf
+
+SYSTEM_UNIT_ALIASES += \
+       systemd-machined.service dbus-org.freedesktop.machine1.service
+
+EXTRA_DIST += \
+       units/systemd-machined.service.in
+
+endif
+
+# ------------------------------------------------------------------------------
 if ENABLE_LOGIND
 systemd_logind_SOURCES = \
        src/login/logind.c \
-       src/login/logind.h \
+       src/login/logind.h
+
+nodist_systemd_logind_SOURCES = \
+       src/login/logind-gperf.c
+
+systemd_logind_CFLAGS = \
+       $(libsystemd_logind_core_la_CFLAGS)
+
+systemd_logind_LDADD = \
+       libsystemd-logind-core.la \
+       $(libsystemd_logind_core_la_LIBADD)
+
+if HAVE_ACL
+systemd_logind_SOURCES += \
+       src/login/logind-acl.c
+
+systemd_logind_LDADD += \
+       libsystemd-acl.la
+endif
+
+libsystemd_logind_core_la_SOURCES = \
        src/login/logind-dbus.c \
        src/login/logind-device.c \
        src/login/logind-device.h \
@@ -3361,28 +3664,21 @@ systemd_logind_SOURCES = \
        src/login/logind-user-dbus.c \
        src/login/logind-acl.h
 
-nodist_systemd_logind_SOURCES = \
-       src/login/logind-gperf.c
-
-systemd_logind_CFLAGS = \
+libsystemd_logind_core_la_CFLAGS = \
        $(AM_CFLAGS) \
-       $(DBUS_CFLAGS)
+        $(DBUS_CFLAGS)
 
-systemd_logind_LDADD = \
+libsystemd_logind_core_la_LIBADD = \
        libsystemd-label.la \
-       libsystemd-shared.la \
        libsystemd-audit.la \
+       libsystemd-shared.la \
        libsystemd-daemon.la \
        libsystemd-dbus.la \
+       libsystemd-id128-internal.la \
        libudev.la
 
-if HAVE_ACL
-systemd_logind_SOURCES += \
-       src/login/logind-acl.c
-
-systemd_logind_LDADD += \
-       libsystemd-acl.la
-endif
+noinst_LTLIBRARIES += \
+       libsystemd-logind-core.la
 
 systemd_user_sessions_SOURCES = \
        src/login/user-sessions.c
@@ -3445,10 +3741,23 @@ test_inhibit_CFLAGS = \
        $(AM_CFLAGS) \
        $(DBUS_CFLAGS)
 
-noinst_PROGRAMS += \
+test_login_tables_SOURCES = \
+       src/login/test-login-tables.c
+
+test_login_tables_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(DBUS_CFLAGS)
+
+test_login_tables_LDADD = \
+       libsystemd-logind-core.la
+
+manual_tests += \
        test-login \
        test-inhibit
 
+tests += \
+       test-login-tables
+
 libsystemd_login_la_SOURCES = \
        src/login/sd-login.c
 
@@ -3487,10 +3796,10 @@ pam_systemd_la_LDFLAGS = \
        -export-symbols-regex '^pam_sm_.*'
 
 pam_systemd_la_LIBADD = \
-       libsystemd-daemon.la \
        libsystemd-audit.la \
        libsystemd-dbus.la \
        libsystemd-shared.la \
+       libsystemd-daemon-internal.la \
        $(PAM_LIBS)
 
 pamlib_LTLIBRARIES = \
@@ -3511,6 +3820,9 @@ nodist_systemunit_DATA += \
        units/systemd-logind.service \
        units/systemd-user-sessions.service
 
+dist_systemunit_DATA += \
+       units/user.slice
+
 dist_dbussystemservice_DATA += \
        src/login/org.freedesktop.login1.service
 
@@ -3587,7 +3899,8 @@ pkgpyexec_LTLIBRARIES = \
        _journal.la \
        id128.la \
        _daemon.la \
-       _reader.la
+       _reader.la \
+       login.la
 
 _journal_la_SOURCES = \
        src/python-systemd/_journal.c
@@ -3670,7 +3983,31 @@ _reader_la_LIBADD = \
        $(PYTHON_LIBS) \
        libsystemd-journal.la \
        libsystemd-id128.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-daemon-internal.la
+
+login_la_SOURCES = \
+       src/python-systemd/login.c \
+       src/python-systemd/pyutil.c \
+       src/python-systemd/pyutil.h
+
+login_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       -fvisibility=default \
+       $(PYTHON_CFLAGS)
+
+login_la_LDFLAGS = \
+       $(AM_LDFLAGS) \
+       -shared \
+       -module \
+       -avoid-version
+
+login_la_LIBADD = \
+       $(PYTHON_LIBS) \
+       libsystemd-journal.la \
+       libsystemd-login.la \
+       libsystemd-shared.la \
+       libsystemd-daemon-internal.la
 
 dist_pkgpyexec_PYTHON = \
        src/python-systemd/journal.py \
@@ -3684,13 +4021,16 @@ src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
 BUILT_SOURCES += \
        src/python-systemd/id128-constants.h
 
-PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
-SPHINXOPTS = -D latex_paper_size=$(PAPER) -D version=$(VERSION) -D release=$(VERSION)
+SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
 sphinx-%:
        $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
        $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
        $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
 
+python-shell:
+       $(AM_V_at)echo "Starting python with $(DESTDIR)$(pyexecdir)"
+       $(AM_V_at)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(PYTHON)
+
 destdir-sphinx: all
        dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
                $(MAKE) DESTDIR="$$dir" install && \
@@ -3705,48 +4045,53 @@ clean-sphinx:
        -rm -rf docs/html/python-systemd/
 
 # ------------------------------------------------------------------------------
+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)|' \
+       '|sysctldir=$(sysctldir)|' \
+       '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
+       '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
+       '|PACKAGE_URL=$(PACKAGE_URL)|' \
+       '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \
+       '|prefix=$(prefix)|' \
+       '|exec_prefix=$(exec_prefix)|' \
+       '|libdir=$(libdir)|' \
+       '|includedir=$(includedir)|' \
+       '|VERSION=$(VERSION)|' \
+       '|rootprefix=$(rootprefix)|' \
+       '|udevlibexecdir=$(udevlibexecdir)|' \
+       '|SUSHELL=$(SUSHELL)|' \
+       '|DEBUGTTY=$(DEBUGTTY)|' \
+       '|KILL=$(KILL)|' \
+       '|KMOD=$(KMOD)|' \
+       '|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)|' \
+       '|PYTHON_BINARY=$(PYTHON_BINARY)|'
+
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
-       $(SED)  -e 's,@rootlibexecdir\@,$(rootlibexecdir),g' \
-               -e 's,@rootbindir\@,$(rootbindir),g' \
-               -e 's,@bindir\@,$(bindir),g' \
-               -e 's,@SYSTEMCTL\@,$(rootbindir)/systemctl,g' \
-               -e 's,@SYSTEMD_NOTIFY\@,$(rootbindir)/systemd-notify,g' \
-               -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
-               -e 's,@SYSTEM_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/system,g' \
-               -e 's,@USER_CONFIG_UNIT_PATH\@,$(pkgsysconfdir)/user,g' \
-               -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
-               -e 's,@systemunitdir\@,$(systemunitdir),g' \
-               -e 's,@userunitdir\@,$(userunitdir),g' \
-               -e 's,@systempresetdir\@,$(systempresetdir),g' \
-               -e 's,@userpresetdir\@,$(userpresetdir),g' \
-               -e 's,@udevhwdbdir\@,$(udevhwdbdir),g' \
-               -e 's,@udevrulesdir\@,$(udevrulesdir),g' \
-               -e 's,@catalogdir\@,$(catalogdir),g' \
-               -e 's,@tmpfilesdir\@,$(tmpfilesdir),g' \
-               -e 's,@sysctldir\@,$(sysctldir),g' \
-               -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
-               -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-               -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
-               -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
-               -e 's,@prefix\@,$(prefix),g' \
-               -e 's,@exec_prefix\@,$(exec_prefix),g' \
-               -e 's,@libdir\@,$(libdir),g' \
-               -e 's,@includedir\@,$(includedir),g' \
-               -e 's,@VERSION\@,$(VERSION),g' \
-               -e 's,@rootprefix\@,$(rootprefix),g' \
-               -e 's,@udevlibexecdir\@,$(udevlibexecdir),g' \
-               -e 's,@SUSHELL\@,$(SUSHELL),g' \
-               -e 's,@DEBUGTTY\@,$(DEBUGTTY),g' \
-               -e 's,@KILL\@,$(KILL),g' \
-               -e 's,@QUOTAON\@,$(QUOTAON),g' \
-               -e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \
-               -e 's,@SYSTEM_SYSVINIT_PATH\@,$(sysvinitdir),g' \
-               -e 's,@VARLOGDIR\@,$(varlogdir),g' \
-               -e 's,@RC_LOCAL_SCRIPT_PATH_START\@,$(RC_LOCAL_SCRIPT_PATH_START),g' \
-               -e 's,@RC_LOCAL_SCRIPT_PATH_STOP\@,$(RC_LOCAL_SCRIPT_PATH_STOP),g' \
-               -e 's,@PYTHON\@,$(PYTHON),g' \
-               -e 's,@PYTHON_BINARY\@,$(PYTHON_BINARY),g' \
+       $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
                < $< > $@
 
 units/%: units/%.in Makefile
@@ -3809,38 +4154,46 @@ CLEANFILES += \
 
 # ------------------------------------------------------------------------------
 if ENABLE_MANPAGES
+man/custom-entities.ent: Makefile
+       $(AM_V_GEN)$(MKDIR_P) $(dir $@)
+       $(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
+        echo '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">,$(substitutions))))') \
+        > $@ # '
+
+DISTCLEANFILES += \
+       man/custom-entities.ent
+
 XSLTPROC_FLAGS = \
        --nonet \
        --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)
+       --stringparam systemd.version $(VERSION) \
+       --path '$(builddir)/man:$(srcdir)/man'
 
 XSLTPROC_PROCESS_MAN = \
-       $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
-       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
+       $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $<
 
 XSLTPROC_PROCESS_HTML = \
-       $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
-       $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
+       $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
 
-man/%.1: man/%.xml man/custom-man.xsl
+man/%.1: man/%.xml man/custom-man.xsl man/custom-entities.ent
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.3: man/%.xml man/custom-man.xsl
+man/%.3: man/%.xml man/custom-man.xsl man/custom-entities.ent
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.5: man/%.xml man/custom-man.xsl
+man/%.5: man/%.xml man/custom-man.xsl man/custom-entities.ent
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.7: man/%.xml man/custom-man.xsl
+man/%.7: man/%.xml man/custom-man.xsl man/custom-entities.ent
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.8: man/%.xml man/custom-man.xsl
+man/%.8: man/%.xml man/custom-man.xsl man/custom-entities.ent
        $(XSLTPROC_PROCESS_MAN)
 
-man/%.html: man/%.xml man/custom-html.xsl
+man/%.html: man/%.xml man/custom-html.xsl man/custom-entities.ent
        $(XSLTPROC_PROCESS_HTML)
 
 define html-alias
@@ -3900,8 +4253,8 @@ RUNLEVEL4_TARGET_WANTS += \
 RUNLEVEL5_TARGET_WANTS += \
        systemd-update-utmp-runlevel.service
 endif
-SHUTDOWN_TARGET_WANTS += \
-       systemd-update-utmp-shutdown.service
+SYSINIT_TARGET_WANTS += \
+       systemd-update-utmp.service
 LOCAL_FS_TARGET_WANTS += \
        systemd-remount-fs.service \
        systemd-fsck-root.service \
@@ -3915,11 +4268,8 @@ SYSINIT_TARGET_WANTS += \
        sys-kernel-config.mount \
        sys-kernel-debug.mount \
        sys-fs-fuse-connections.mount \
-       systemd-tmpfiles-setup.service \
        systemd-sysctl.service \
        systemd-ask-password-console.path
-TIMERS_TARGET_WANTS += \
-       systemd-tmpfiles-clean.timer
 
 if HAVE_SYSV_COMPAT
 SYSTEM_UNIT_ALIASES += \
@@ -3944,7 +4294,8 @@ USER_UNIT_ALIASES += \
        $(systemunitdir)/paths.target paths.target \
        $(systemunitdir)/bluetooth.target bluetooth.target \
        $(systemunitdir)/printer.target printer.target \
-       $(systemunitdir)/sound.target sound.target
+       $(systemunitdir)/sound.target sound.target \
+       $(systemunitdir)/smartcard.target smartcard.target
 
 GENERAL_ALIASES += \
        $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \
@@ -3962,12 +4313,12 @@ INSTALL_DIRS += \
 endif
 
 INSTALL_DIRS += \
-       $(tmpfilesdir) \
-       $(sysconfdir)/tmpfiles.d \
        $(prefix)/lib/modules-load.d \
        $(sysconfdir)/modules-load.d \
        $(prefix)/lib/sysctl.d \
        $(sysconfdir)/sysctl.d \
+       $(prefix)/lib/kernel/install.d \
+       $(sysconfdir)/kernel/install.d \
        $(systemshutdowndir) \
        $(systemsleepdir) \
        $(systemgeneratordir) \
@@ -4027,6 +4378,10 @@ hwdb-update:
                http://standards.ieee.org/develop/regauth/iab/iab.txt && \
        ./ids-update.pl )
 
+kdbus-update:
+       ( cd $(top_srcdir)/src/libsystemd-bus/ && \
+       wget -N https://d-bus.googlecode.com/git/kdbus.h )
+
 upload: all distcheck
        cp -v systemd-$(VERSION).tar.xz /home/lennart/git.fedora/systemd/
        scp systemd-$(VERSION).tar.xz fdo:/srv/www.freedesktop.org/www/software/systemd/
@@ -4035,11 +4390,11 @@ upload: all distcheck
 www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
 doc-sync: all destdir-sphinx
        gtkdoc-rebase --html-dir=docs/libudev/html --online
-       rsync -av --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
+       rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
        gtkdoc-rebase --html-dir=docs/gudev/html --online
-       rsync -av --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
-       rsync -av --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
-       rsync -av --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
+       rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
+       rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
+       rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
 
 git-tag:
        git tag "v$(VERSION)" -m "systemd $(VERSION)"