summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-aux/Makefile.each.tail/60-am.mk19
-rw-r--r--build-aux/Makefile.once.head/30-am.mk9
-rw-r--r--config.mk.in2
-rw-r--r--shell-completion/bash/.gitignore1
-rw-r--r--shell-completion/zsh/.gitignore1
-rw-r--r--shell-completion/zsh/_systemd82
-rw-r--r--src/grp-hostname/Makefile53
-rw-r--r--src/grp-hostname/hostnamectl/Makefile45
-rw-r--r--src/grp-hostname/hostnamectl/hostnamectl.c (renamed from src/grp-hostname/hostnamectl.c)0
-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/systemd-hostnamed/.gitignore (renamed from src/grp-hostname/.gitignore)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/Makefile65
-rw-r--r--src/grp-hostname/systemd-hostnamed/hostnamed.c (renamed from src/grp-hostname/hostnamed.c)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.conf (renamed from src/grp-hostname/org.freedesktop.hostname1.conf)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.policy.in (renamed from src/grp-hostname/org.freedesktop.hostname1.policy.in)0
-rw-r--r--src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.service (renamed from src/grp-hostname/org.freedesktop.hostname1.service)0
-rw-r--r--src/grp-initutils/systemd-detect-virt/systemd-detect-virt.completion.zsh11
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/Makefile9
-rw-r--r--src/grp-journal/systemd-cat/systemd-cat.completion.zsh12
-rw-r--r--src/grp-locale/.gitignore1
-rw-r--r--src/grp-locale/Makefile67
-rw-r--r--src/grp-locale/localectl/Makefile45
-rw-r--r--src/grp-locale/localectl/localectl.c (renamed from src/grp-locale/localectl.c)0
-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/systemd-localed/.gitignore1
-rw-r--r--src/grp-locale/systemd-localed/Makefile79
-rw-r--r--src/grp-locale/systemd-localed/kbd-model-map (renamed from src/grp-locale/kbd-model-map)0
-rw-r--r--src/grp-locale/systemd-localed/language-fallback-map (renamed from src/grp-locale/language-fallback-map)0
-rw-r--r--src/grp-locale/systemd-localed/localed.c (renamed from src/grp-locale/localed.c)0
-rw-r--r--src/grp-locale/systemd-localed/org.freedesktop.locale1.conf (renamed from src/grp-locale/org.freedesktop.locale1.conf)0
-rw-r--r--src/grp-locale/systemd-localed/org.freedesktop.locale1.policy.in (renamed from src/grp-locale/org.freedesktop.locale1.policy.in)0
-rw-r--r--src/grp-locale/systemd-localed/org.freedesktop.locale1.service (renamed from src/grp-locale/org.freedesktop.locale1.service)0
-rw-r--r--src/grp-resolve/Makefile3
-rw-r--r--src/grp-resolve/libbasic-dns/Makefile115
-rw-r--r--src/grp-resolve/libbasic-dns/dns-type.c (renamed from src/grp-resolve/systemd-resolved/dns-type.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/dns-type.h (renamed from src/grp-resolve/systemd-resolved/dns-type.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-def.h (renamed from src/grp-resolve/systemd-resolved/resolved-def.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-answer.c (renamed from src/grp-resolve/systemd-resolved/resolved-dns-answer.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-answer.h (renamed from src/grp-resolve/systemd-resolved/resolved-dns-answer.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c (renamed from src/grp-resolve/systemd-resolved/resolved-dns-dnssec.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h (renamed from src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-packet.c (renamed from src/grp-resolve/systemd-resolved/resolved-dns-packet.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-packet.h (renamed from src/grp-resolve/systemd-resolved/resolved-dns-packet.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-question.c (renamed from src/grp-resolve/systemd-resolved/resolved-dns-question.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-question.h (renamed from src/grp-resolve/systemd-resolved/resolved-dns-question.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-rr.c (renamed from src/grp-resolve/systemd-resolved/resolved-dns-rr.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-rr.h (renamed from src/grp-resolve/systemd-resolved/resolved-dns-rr.h)0
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/_443._tcp.fedoraproject.org.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/_443._tcp.fedoraproject.org.pkts)bin169 -> 169 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/_openpgpkey.fedoraproject.org.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/_openpgpkey.fedoraproject.org.pkts)bin986 -> 986 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/fake-caa.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/fake-caa.pkts)bin196 -> 196 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/fedoraproject.org.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/fedoraproject.org.pkts)bin1483 -> 1483 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/gandi.net.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/gandi.net.pkts)bin1010 -> 1010 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/google.com.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/google.com.pkts)bin747 -> 747 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/kyhwana.org.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/kyhwana.org.pkts)bin1803 -> 1803 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/root.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/root.pkts)bin1061 -> 1061 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts)bin330 -> 330 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/teamits.com.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/teamits.com.pkts)bin1021 -> 1021 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-data/zbyszek@fedoraproject.org.pkts (renamed from src/grp-resolve/systemd-resolved/test-data/zbyszek@fedoraproject.org.pkts)bin2533 -> 2533 bytes
-rw-r--r--src/grp-resolve/libbasic-dns/test-dns-packet.c (renamed from src/grp-resolve/systemd-resolved/test-dns-packet.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/test-dnssec-complex.c (renamed from src/grp-resolve/systemd-resolved/test-dnssec-complex.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/test-dnssec.c (renamed from src/grp-resolve/systemd-resolved/test-dnssec.c)0
-rw-r--r--src/grp-resolve/libbasic-dns/test-resolve-tables.c (renamed from src/grp-resolve/systemd-resolved/test-resolve-tables.c)0
-rw-r--r--src/grp-resolve/systemd-resolve/Makefile52
l---------src/grp-resolve/systemd-resolve/gcrypt-util.c1
l---------src/grp-resolve/systemd-resolve/gcrypt-util.h1
-rw-r--r--src/grp-resolve/systemd-resolve/resolve-tool.c (renamed from src/grp-resolve/systemd-resolved/resolve-tool.c)0
-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-resolved/Makefile109
-rw-r--r--src/grp-system/systemctl/.gitignore2
-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-utils/systemd-notify/systemd-notify.completion.zsh12
-rw-r--r--src/grp-utils/systemd-path/systemd-path.completion.zsh18
-rw-r--r--src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.bash0
-rw-r--r--src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.zsh0
-rw-r--r--src/systemd-ask-password/systemd-ask-password.completion.zsh12
-rw-r--r--src/systemd-cgls/systemd-cgls.completion.zsh12
-rw-r--r--src/systemd-cgtop/systemd-cgtop.completion.zsh17
-rw-r--r--src/systemd-machine-id-setup/systemd-machine-id-setup.completion.zsh8
-rw-r--r--src/systemd-stdio-bridge/systemd-stdio-bridge.completion.bash0
-rw-r--r--src/systemd-stdio-bridge/systemd-stdio-bridge.completion.zsh0
-rw-r--r--src/systemd-tty-ask-password-agent/systemd-tty-ask-password-agent.completion.zsh14
-rwxr-xr-xtools/move.sh25
86 files changed, 584 insertions, 319 deletions
diff --git a/build-aux/Makefile.each.tail/60-am.mk b/build-aux/Makefile.each.tail/60-am.mk
index ff3230776b..1a59397a25 100644
--- a/build-aux/Makefile.each.tail/60-am.mk
+++ b/build-aux/Makefile.each.tail/60-am.mk
@@ -1,5 +1,12 @@
mod.am.depends += files
+bin_PROGRAMS ?=
+bin_SCRIPTS ?=
+bashcompletion_DATA ?=
+zshcompletion_DATA ?=
+bashcompletion_DATA := $(sort $(bashcompletion_DATA) $(bin_PROGRAMS) $(bin_SCRIPTS))
+zshcompletion_DATA := $(sort $(zshcompletion_DATA) $(addprefix _,$(bin_PROGRAMS) $(bin_SCRIPTS)))
+
$(eval \
$(foreach p,$(am.primaries) ,$(call _am.per_primary,$p)$(at.nl)))
$(eval \
@@ -22,6 +29,18 @@ $(DESTDIR)$(sysctldir)/%.conf: $(srcdir)/%.sysctl
$(DESTDIR)$(sysctldir)/%.conf: $(outdir)/%.sysctl
@$(NORMAL_INSTALL)
$(am.INSTALL)
+$(DESTDIR)$(bashcompletiondir)/%: $(srcdir)/%.completion.bash
+ @$(NORMAL_INSTALL)
+ $(am.INSTALL)
+$(DESTDIR)$(bashcompletiondir)/%: $(outdir)/%.completion.bash
+ @$(NORMAL_INSTALL)
+ $(am.INSTALL)
+$(DESTDIR)$(zshcompletiondir)/_%: $(srcdir)/%.completion.zsh
+ @$(NORMAL_INSTALL)
+ $(am.INSTALL)
+$(DESTDIR)$(zshcompletiondir)/_%: $(outdir)/%.completion.zsh
+ @$(NORMAL_INSTALL)
+ $(am.INSTALL)
at.subdirs += $(am.subdirs)
files.sys.all += $(foreach p,$(am.primaries),$(am.inst_$p))
diff --git a/build-aux/Makefile.once.head/30-am.mk b/build-aux/Makefile.once.head/30-am.mk
index 65cbc33ed0..457a878688 100644
--- a/build-aux/Makefile.once.head/30-am.mk
+++ b/build-aux/Makefile.once.head/30-am.mk
@@ -1,10 +1,15 @@
mod.am.description = (systemd) Automake-to-Autothing magic
mod.am.depends += gnuconf
-am.inst2noinst_DATA = $(notdir \
+am.inst2noinst_DATA = \
+ $(patsubst %.completion.bash,$(abspath $(srcdir))/%.completion.bash,\
+ $(patsubst %.completion.zsh,$(abspath $(srcdir))/%.completion.zsh,\
+ $(notdir \
$(patsubst $(sysusersdir)/%.conf,%.sysusers,\
$(patsubst $(sysctldir)/%.conf,%.sysctl,\
- $1)))
+ $(patsubst $(bashcompletiondir)/%,%.completion.bash,\
+ $(patsubst $(zshcompletiondir)/_%,%.completion.zsh,\
+ $1)))))))
am.inst2noinst_HEADERS = $(abspath $(addprefix $(srcdir)/include/,$(notdir $1)))
am.var_PROGRAMS = $1_SOURCES nodist_$1_SOURCES $1_CFLAGS $1_CPPFLAGS $1_LDFLAGS $1_LDADD
diff --git a/config.mk.in b/config.mk.in
index 868df370c1..37587da320 100644
--- a/config.mk.in
+++ b/config.mk.in
@@ -132,6 +132,8 @@ libjournal-core.DEPENDS = $(topoutdir)/src/grp-journal/libjournal-core/libj
#libnetworkd-core.DEPENDS =
libudev-core.CPPFLAGS = -I$(topoutdir)/src/grp-udev/libudev-core $(libsystemd-network.CPPFLAGS) $(libshared.CPPFLAGS)
libudev-core.DEPENDS = $(topoutdir)/src/grp-udev/libudev-core/libudev-core.la
+libbasic-dns.CPPFLAGS = -I$(topoutdir)/src/grp-resolve/libbasic-dns -I$(topsrcdir)/src/grp-resolve/libbasic-dns
+libbasic-dns.DEPENDS = $(topoutdir)/src/grp-resolve/libbasic-dns/libbasic-dns.la
# NSS modules
libnss_myhostname.CPPFLAGS =
libnss_myhostname.DEPENDS =
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/zsh/.gitignore b/shell-completion/zsh/.gitignore
deleted file mode 100644
index 75f13ad6d1..0000000000
--- a/shell-completion/zsh/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/_systemctl
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/grp-hostname/Makefile b/src/grp-hostname/Makefile
index 911188454c..319c1d2c8e 100644
--- a/src/grp-hostname/Makefile
+++ b/src/grp-hostname/Makefile
@@ -23,57 +23,6 @@
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 = \
- libshared.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
-
-hostnamectl_SOURCES = \
- src/hostname/hostnamectl.c
-
-hostnamectl_LDADD = \
- libshared.la
-
-bin_PROGRAMS += \
- hostnamectl
-
-dist_bashcompletion_data += \
- shell-completion/bash/hostnamectl
-
-dist_zshcompletion_data += \
- shell-completion/zsh/_hostnamectl
-endif # ENABLE_HOSTNAMED
-
-polkitpolicy_in_files += \
- src/hostname/org.freedesktop.hostname1.policy.in
-
-EXTRA_DIST += \
- units/systemd-hostnamed.service.in
+nested.subdirs += systemd-hostnamed hostnamectl
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-hostname/hostnamectl/Makefile b/src/grp-hostname/hostnamectl/Makefile
new file mode 100644
index 0000000000..f684bde523
--- /dev/null
+++ b/src/grp-hostname/hostnamectl/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_HOSTNAMED),)
+
+hostnamectl_SOURCES = \
+ src/hostname/hostnamectl.c
+
+hostnamectl_LDADD = \
+ libshared.la
+
+bin_PROGRAMS += \
+ hostnamectl
+
+dist_bashcompletion_data += \
+ shell-completion/bash/hostnamectl
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_hostnamectl
+
+endif
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-hostname/hostnamectl.c b/src/grp-hostname/hostnamectl/hostnamectl.c
index 8a24813934..8a24813934 100644
--- a/src/grp-hostname/hostnamectl.c
+++ b/src/grp-hostname/hostnamectl/hostnamectl.c
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/src/grp-hostname/.gitignore b/src/grp-hostname/systemd-hostnamed/.gitignore
index 1ff281b231..1ff281b231 100644
--- a/src/grp-hostname/.gitignore
+++ b/src/grp-hostname/systemd-hostnamed/.gitignore
diff --git a/src/grp-hostname/systemd-hostnamed/Makefile b/src/grp-hostname/systemd-hostnamed/Makefile
new file mode 100644
index 0000000000..171bce55a4
--- /dev/null
+++ b/src/grp-hostname/systemd-hostnamed/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_HOSTNAMED),)
+systemd_hostnamed_SOURCES = \
+ src/hostname/hostnamed.c
+
+systemd_hostnamed_LDADD = \
+ libshared.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/grp-hostname/hostnamed.c b/src/grp-hostname/systemd-hostnamed/hostnamed.c
index 22eabc469b..22eabc469b 100644
--- a/src/grp-hostname/hostnamed.c
+++ b/src/grp-hostname/systemd-hostnamed/hostnamed.c
diff --git a/src/grp-hostname/org.freedesktop.hostname1.conf b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.conf
index 46b4aadc83..46b4aadc83 100644
--- a/src/grp-hostname/org.freedesktop.hostname1.conf
+++ b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.conf
diff --git a/src/grp-hostname/org.freedesktop.hostname1.policy.in b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.policy.in
index c32c1d4fda..c32c1d4fda 100644
--- a/src/grp-hostname/org.freedesktop.hostname1.policy.in
+++ b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.policy.in
diff --git a/src/grp-hostname/org.freedesktop.hostname1.service b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.service
index 6041ed60ca..6041ed60ca 100644
--- a/src/grp-hostname/org.freedesktop.hostname1.service
+++ b/src/grp-hostname/systemd-hostnamed/org.freedesktop.hostname1.service
diff --git a/src/grp-initutils/systemd-detect-virt/systemd-detect-virt.completion.zsh b/src/grp-initutils/systemd-detect-virt/systemd-detect-virt.completion.zsh
new file mode 100644
index 0000000000..a0c7df727c
--- /dev/null
+++ b/src/grp-initutils/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/src/grp-journal/grp-remote/systemd-journal-remote/Makefile b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
index 05af76afc2..b75eeedae8 100644
--- a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
@@ -66,12 +66,9 @@ dist_systemunit_DATA += \
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
+files.sys.all += /var/log/journal/remote
+$(DESTDIR)/var/log/journal/remote:
+ $(MKDIR_P) $@
nodist_pkgsysconf_DATA += \
src/journal-remote/journal-remote.conf
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/src/grp-locale/.gitignore b/src/grp-locale/.gitignore
deleted file mode 100644
index b1e0ba755e..0000000000
--- a/src/grp-locale/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-org.freedesktop.locale1.policy
diff --git a/src/grp-locale/Makefile b/src/grp-locale/Makefile
index 013c5289a5..6dc11dc2d8 100644
--- a/src/grp-locale/Makefile
+++ b/src/grp-locale/Makefile
@@ -23,71 +23,6 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-ifneq ($(ENABLE_LOCALED),)
-systemd_localed_SOURCES = \
- src/locale/localed.c
-
-systemd_localed_LDADD = \
- libshared.la \
- -ldl
-
-systemd_localed_CFLAGS = \
- $(AM_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
-
-localectl_SOURCES = \
- src/locale/localectl.c
-
-localectl_LDADD = \
- libshared.la
-
-bin_PROGRAMS += \
- localectl
-
-dist_bashcompletion_data += \
- shell-completion/bash/localectl
-
-dist_zshcompletion_data += \
- shell-completion/zsh/_localectl
-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
-
-sd.CPPFLAGS += -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\"
-sd.CPPFLAGS += -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\"
+nested.subdirs += systemd-localed localectl
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-locale/localectl/Makefile b/src/grp-locale/localectl/Makefile
new file mode 100644
index 0000000000..d0023df124
--- /dev/null
+++ b/src/grp-locale/localectl/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_LOCALED),)
+
+localectl_SOURCES = \
+ src/locale/localectl.c
+
+localectl_LDADD = \
+ libshared.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/grp-locale/localectl.c b/src/grp-locale/localectl/localectl.c
index 72ac1c0303..72ac1c0303 100644
--- a/src/grp-locale/localectl.c
+++ b/src/grp-locale/localectl/localectl.c
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 d8af4d1863..d8af4d1863 100644
--- a/shell-completion/zsh/_localectl
+++ b/src/grp-locale/localectl/localectl.completion.zsh
diff --git a/src/grp-locale/systemd-localed/.gitignore b/src/grp-locale/systemd-localed/.gitignore
new file mode 100644
index 0000000000..6d9d6089c0
--- /dev/null
+++ b/src/grp-locale/systemd-localed/.gitignore
@@ -0,0 +1 @@
+/org.freedesktop.locale1.policy
diff --git a/src/grp-locale/systemd-localed/Makefile b/src/grp-locale/systemd-localed/Makefile
new file mode 100644
index 0000000000..de38bb8576
--- /dev/null
+++ b/src/grp-locale/systemd-localed/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 ($(ENABLE_LOCALED),)
+systemd_localed_SOURCES = \
+ src/locale/localed.c
+
+systemd_localed_LDADD = \
+ libshared.la \
+ -ldl
+
+systemd_localed_CFLAGS = \
+ $(AM_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
+
+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
+
+sd.CPPFLAGS += -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\"
+sd.CPPFLAGS += -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\"
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-locale/kbd-model-map b/src/grp-locale/systemd-localed/kbd-model-map
index 8fa984f83b..8fa984f83b 100644
--- a/src/grp-locale/kbd-model-map
+++ b/src/grp-locale/systemd-localed/kbd-model-map
diff --git a/src/grp-locale/language-fallback-map b/src/grp-locale/systemd-localed/language-fallback-map
index d0b02a6b98..d0b02a6b98 100644
--- a/src/grp-locale/language-fallback-map
+++ b/src/grp-locale/systemd-localed/language-fallback-map
diff --git a/src/grp-locale/localed.c b/src/grp-locale/systemd-localed/localed.c
index 7bb7f1cf34..7bb7f1cf34 100644
--- a/src/grp-locale/localed.c
+++ b/src/grp-locale/systemd-localed/localed.c
diff --git a/src/grp-locale/org.freedesktop.locale1.conf b/src/grp-locale/systemd-localed/org.freedesktop.locale1.conf
index 79d0ecd2bb..79d0ecd2bb 100644
--- a/src/grp-locale/org.freedesktop.locale1.conf
+++ b/src/grp-locale/systemd-localed/org.freedesktop.locale1.conf
diff --git a/src/grp-locale/org.freedesktop.locale1.policy.in b/src/grp-locale/systemd-localed/org.freedesktop.locale1.policy.in
index df63845e9b..df63845e9b 100644
--- a/src/grp-locale/org.freedesktop.locale1.policy.in
+++ b/src/grp-locale/systemd-localed/org.freedesktop.locale1.policy.in
diff --git a/src/grp-locale/org.freedesktop.locale1.service b/src/grp-locale/systemd-localed/org.freedesktop.locale1.service
index 025f9a0fc2..025f9a0fc2 100644
--- a/src/grp-locale/org.freedesktop.locale1.service
+++ b/src/grp-locale/systemd-localed/org.freedesktop.locale1.service
diff --git a/src/grp-resolve/Makefile b/src/grp-resolve/Makefile
index 4cea7de4c6..7969cc1298 100644
--- a/src/grp-resolve/Makefile
+++ b/src/grp-resolve/Makefile
@@ -23,6 +23,7 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-nested.subdirs += systemd-resolved nss-resolve
+nested.subdirs += libbasic-dns
+nested.subdirs += systemd-resolved systemd-resolve nss-resolve
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/libbasic-dns/Makefile b/src/grp-resolve/libbasic-dns/Makefile
new file mode 100644
index 0000000000..3c9fe3e783
--- /dev/null
+++ b/src/grp-resolve/libbasic-dns/Makefile
@@ -0,0 +1,115 @@
+# -*- 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: $(srcdir)/dns-type.h
+ $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
+
+$(outdir)/dns_type-to-name.h: $(outdir)/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: $(outdir)/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 =
+libbasic_dns_la_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
+
+
+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_LDADD = \
+ libbasic-dns.la \
+ libshared.la
+
+test_dns_packet_SOURCES = \
+ src/resolve/test-dns-packet.c \
+ $(basic_dns_sources)
+
+test_dns_packet_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
+
+test_dns_packet_LDADD = \
+ libbasic-dns.la \
+ libshared.la
+
+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_LDADD = \
+ libbasic-dns.la \
+ libshared.la
+
+test_dnssec_complex_SOURCES = \
+ src/resolve/test-dnssec-complex.c \
+ src/resolve/dns-type.c \
+ src/resolve/dns-type.h
+
+test_dnssec_complex_LDADD = \
+ libshared.la
+
+noinst_LTLIBRARIES = libbasic-dns.la
+libbasic_dns_la_LIBADD = libshared.la
+$(outdir)/dns-type.lo: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/systemd-resolved/dns-type.c b/src/grp-resolve/libbasic-dns/dns-type.c
index 6d5b9d616f..6d5b9d616f 100644
--- a/src/grp-resolve/systemd-resolved/dns-type.c
+++ b/src/grp-resolve/libbasic-dns/dns-type.c
diff --git a/src/grp-resolve/systemd-resolved/dns-type.h b/src/grp-resolve/libbasic-dns/dns-type.h
index a8ee105e16..a8ee105e16 100644
--- a/src/grp-resolve/systemd-resolved/dns-type.h
+++ b/src/grp-resolve/libbasic-dns/dns-type.h
diff --git a/src/grp-resolve/systemd-resolved/resolved-def.h b/src/grp-resolve/libbasic-dns/resolved-def.h
index c4c1915b18..c4c1915b18 100644
--- a/src/grp-resolve/systemd-resolved/resolved-def.h
+++ b/src/grp-resolve/libbasic-dns/resolved-def.h
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-answer.c b/src/grp-resolve/libbasic-dns/resolved-dns-answer.c
index 1ade0507db..1ade0507db 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-answer.c
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-answer.c
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-answer.h b/src/grp-resolve/libbasic-dns/resolved-dns-answer.h
index 92557a410a..92557a410a 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-answer.h
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-answer.h
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.c b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c
index 39afbada25..39afbada25 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.c
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h
index 81879e287f..81879e287f 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-packet.c b/src/grp-resolve/libbasic-dns/resolved-dns-packet.c
index 37c0244b7e..37c0244b7e 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-packet.c
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-packet.c
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-packet.h b/src/grp-resolve/libbasic-dns/resolved-dns-packet.h
index 2e0eba83b6..2e0eba83b6 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-packet.h
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-packet.h
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-question.c b/src/grp-resolve/libbasic-dns/resolved-dns-question.c
index ee53dbff9d..ee53dbff9d 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-question.c
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-question.c
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-question.h b/src/grp-resolve/libbasic-dns/resolved-dns-question.h
index 320bf53488..320bf53488 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-question.h
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-question.h
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-rr.c b/src/grp-resolve/libbasic-dns/resolved-dns-rr.c
index c6a60b65b7..c6a60b65b7 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-rr.c
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-rr.c
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-rr.h b/src/grp-resolve/libbasic-dns/resolved-dns-rr.h
index daf9c8c210..daf9c8c210 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-rr.h
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-rr.h
diff --git a/src/grp-resolve/systemd-resolved/test-data/_443._tcp.fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test-data/_443._tcp.fedoraproject.org.pkts
index a383c6286d..a383c6286d 100644
--- a/src/grp-resolve/systemd-resolved/test-data/_443._tcp.fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/_443._tcp.fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/_openpgpkey.fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test-data/_openpgpkey.fedoraproject.org.pkts
index 15de02e997..15de02e997 100644
--- a/src/grp-resolve/systemd-resolved/test-data/_openpgpkey.fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/_openpgpkey.fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/fake-caa.pkts b/src/grp-resolve/libbasic-dns/test-data/fake-caa.pkts
index 1c3ecc5491..1c3ecc5491 100644
--- a/src/grp-resolve/systemd-resolved/test-data/fake-caa.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/fake-caa.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test-data/fedoraproject.org.pkts
index 17874844d9..17874844d9 100644
--- a/src/grp-resolve/systemd-resolved/test-data/fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/gandi.net.pkts b/src/grp-resolve/libbasic-dns/test-data/gandi.net.pkts
index 5ef51e0c8e..5ef51e0c8e 100644
--- a/src/grp-resolve/systemd-resolved/test-data/gandi.net.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/gandi.net.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/google.com.pkts b/src/grp-resolve/libbasic-dns/test-data/google.com.pkts
index f98c4cd855..f98c4cd855 100644
--- a/src/grp-resolve/systemd-resolved/test-data/google.com.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/google.com.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/kyhwana.org.pkts b/src/grp-resolve/libbasic-dns/test-data/kyhwana.org.pkts
index e28a725c9a..e28a725c9a 100644
--- a/src/grp-resolve/systemd-resolved/test-data/kyhwana.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/kyhwana.org.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/root.pkts b/src/grp-resolve/libbasic-dns/test-data/root.pkts
index 54ba668c75..54ba668c75 100644
--- a/src/grp-resolve/systemd-resolved/test-data/root.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/root.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts b/src/grp-resolve/libbasic-dns/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
index a854249532..a854249532 100644
--- a/src/grp-resolve/systemd-resolved/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/teamits.com.pkts b/src/grp-resolve/libbasic-dns/test-data/teamits.com.pkts
index 11deb39677..11deb39677 100644
--- a/src/grp-resolve/systemd-resolved/test-data/teamits.com.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/teamits.com.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-data/zbyszek@fedoraproject.org.pkts b/src/grp-resolve/libbasic-dns/test-data/zbyszek@fedoraproject.org.pkts
index f0a6f982df..f0a6f982df 100644
--- a/src/grp-resolve/systemd-resolved/test-data/zbyszek@fedoraproject.org.pkts
+++ b/src/grp-resolve/libbasic-dns/test-data/zbyszek@fedoraproject.org.pkts
Binary files differ
diff --git a/src/grp-resolve/systemd-resolved/test-dns-packet.c b/src/grp-resolve/libbasic-dns/test-dns-packet.c
index 18d04b930d..18d04b930d 100644
--- a/src/grp-resolve/systemd-resolved/test-dns-packet.c
+++ b/src/grp-resolve/libbasic-dns/test-dns-packet.c
diff --git a/src/grp-resolve/systemd-resolved/test-dnssec-complex.c b/src/grp-resolve/libbasic-dns/test-dnssec-complex.c
index ef78cd1ea5..ef78cd1ea5 100644
--- a/src/grp-resolve/systemd-resolved/test-dnssec-complex.c
+++ b/src/grp-resolve/libbasic-dns/test-dnssec-complex.c
diff --git a/src/grp-resolve/systemd-resolved/test-dnssec.c b/src/grp-resolve/libbasic-dns/test-dnssec.c
index 1f05196d8e..1f05196d8e 100644
--- a/src/grp-resolve/systemd-resolved/test-dnssec.c
+++ b/src/grp-resolve/libbasic-dns/test-dnssec.c
diff --git a/src/grp-resolve/systemd-resolved/test-resolve-tables.c b/src/grp-resolve/libbasic-dns/test-resolve-tables.c
index 0eaab70687..0eaab70687 100644
--- a/src/grp-resolve/systemd-resolved/test-resolve-tables.c
+++ b/src/grp-resolve/libbasic-dns/test-resolve-tables.c
diff --git a/src/grp-resolve/systemd-resolve/Makefile b/src/grp-resolve/systemd-resolve/Makefile
new file mode 100644
index 0000000000..46322830ac
--- /dev/null
+++ b/src/grp-resolve/systemd-resolve/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
+
+basic_dns_sources =
+
+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_LDADD = \
+ libshared.la
+
+bin_PROGRAMS += \
+ systemd-resolve
+
+dist_bashcompletion_data += \
+ shell-completion/bash/systemd-resolve
+
+dist_zshcompletion_data += \
+ shell-completion/zsh/_systemd-resolve
+
+systemd_resolve_LDADD += libbasic-dns.la
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/systemd-resolve/gcrypt-util.c b/src/grp-resolve/systemd-resolve/gcrypt-util.c
new file mode 120000
index 0000000000..5b2fae92e2
--- /dev/null
+++ b/src/grp-resolve/systemd-resolve/gcrypt-util.c
@@ -0,0 +1 @@
+../../libshared/src/gcrypt-util.c \ No newline at end of file
diff --git a/src/grp-resolve/systemd-resolve/gcrypt-util.h b/src/grp-resolve/systemd-resolve/gcrypt-util.h
new file mode 120000
index 0000000000..e1ad70b84f
--- /dev/null
+++ b/src/grp-resolve/systemd-resolve/gcrypt-util.h
@@ -0,0 +1 @@
+../../libshared/include/shared/gcrypt-util.h \ No newline at end of file
diff --git a/src/grp-resolve/systemd-resolved/resolve-tool.c b/src/grp-resolve/systemd-resolve/resolve-tool.c
index d9f28576b7..d9f28576b7 100644
--- a/src/grp-resolve/systemd-resolved/resolve-tool.c
+++ b/src/grp-resolve/systemd-resolve/resolve-tool.c
diff --git a/shell-completion/bash/systemd-resolve b/src/grp-resolve/systemd-resolve/systemd-resolve.completion.bash
index 0c501c9405..0c501c9405 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/src/grp-resolve/systemd-resolved/Makefile b/src/grp-resolve/systemd-resolved/Makefile
index 8574d3f71a..7a2cff2f2e 100644
--- a/src/grp-resolve/systemd-resolved/Makefile
+++ b/src/grp-resolve/systemd-resolved/Makefile
@@ -23,31 +23,7 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-
-$(outdir)/dns_type-list.txt: $(srcdir)/dns-type.h
- $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
-
-$(outdir)/dns_type-to-name.h: $(outdir)/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: $(outdir)/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 }' <$< >$@
-
-ifneq ($(ENABLE_RESOLVED),)
-
-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
+basic_dns_sources =
systemd_resolved_SOURCES = \
src/resolve/resolved.c \
@@ -130,87 +106,6 @@ GENERAL_ALIASES += \
nodist_pkgsysconf_DATA += \
src/resolve/resolved.conf
-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_LDADD = \
- libshared.la
-
-bin_PROGRAMS += \
- systemd-resolve
-
-dist_bashcompletion_data += \
- shell-completion/bash/systemd-resolve
-
-dist_zshcompletion_data += \
- shell-completion/zsh/_systemd-resolve
-
-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_LDADD = \
- libshared.la
-
-test_dns_packet_SOURCES = \
- src/resolve/test-dns-packet.c \
- $(basic_dns_sources)
-
-test_dns_packet_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\"
-
-test_dns_packet_LDADD = \
- libshared.la
-
-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_LDADD = \
- libshared.la
-
-test_dnssec_complex_SOURCES = \
- src/resolve/test-dnssec-complex.c \
- src/resolve/dns-type.c \
- src/resolve/dns-type.h
-
-test_dnssec_complex_LDADD = \
- libshared.la
-
-endif # ENABLE_RESOLVED
-
gperf_txt_sources += \
src/resolve/dns_type-list.txt
@@ -221,8 +116,8 @@ EXTRA_DIST += \
units/systemd-resolved.service.m4.in \
src/resolve/resolved.conf.in
+systemd_resolved_LDADD += libbasic-dns.la
-$(outdir)/dns-type.o: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h
sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/systemctl/.gitignore b/src/grp-system/systemctl/.gitignore
new file mode 100644
index 0000000000..89c7427edd
--- /dev/null
+++ b/src/grp-system/systemctl/.gitignore
@@ -0,0 +1,2 @@
+/systemctl.completion.bash
+/systemctl.completion.zsh
diff --git a/shell-completion/bash/systemctl.in b/src/grp-system/systemctl/systemctl.completion.bash.in
index 6f2b3f122c..6f2b3f122c 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 44c31b7833..44c31b7833 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/src/grp-system/systemctl/systemctl.completion.zsh.in
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/src/grp-utils/systemd-path/systemd-path.completion.zsh b/src/grp-utils/systemd-path/systemd-path.completion.zsh
new file mode 100644
index 0000000000..4919cf4250
--- /dev/null
+++ b/src/grp-utils/systemd-path/systemd-path.completion.zsh
@@ -0,0 +1,18 @@
+#compdef systemd-path
+
+__get_names() {
+ systemd-path | { while IFS=: read -r a b; do echo " $a"; done; }
+}
+
+__names() {
+ local -a _names
+ _names=(${(fo)"$(__get_names)"})
+ typeset -U _names
+ _describe 'names' _names
+}
+
+_arguments \
+ {-h,--help}'[Show help message]' \
+ '--version[Show package version]' \
+ '--host=[Sufix to append to paths]:suffix' \
+ '*:name:__names'
diff --git a/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.bash b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.bash
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.bash
diff --git a/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.zsh b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.zsh
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.zsh
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/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/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/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/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.bash b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.bash
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.bash
diff --git a/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.zsh b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.zsh
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.zsh
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/tools/move.sh b/tools/move.sh
index 06c4e7f5cf..ef41e28c10 100755
--- a/tools/move.sh
+++ b/tools/move.sh
@@ -348,6 +348,29 @@ fixup_makefiles() (
done
)
+breakup_zshcompletion() (
+ sed_expr='
+ 1 {
+ i #compdef %s
+ d
+ }
+ /^case/,/^esac/ {
+ /^ %s)/,/^ ;;/ {
+ s/^ //p
+ }
+ d
+ }
+ '
+
+ cd shell-completion/zsh
+ read -r _ cmds < _systemd
+ for cmd in $cmds; do
+ printf -v cmd_sed_expr "$sed_expr" $cmd $cmd
+ sed -e "$cmd_sed_expr" < _systemd > _$cmd
+ done
+ rm _systemd
+)
+
move() (
>&2 echo ' => move_files'
move_files
@@ -357,6 +380,8 @@ move() (
fixup_includes
>&2 echo ' => fixup_makefiles'
fixup_makefiles
+ >&2 echo ' => breakup_zshutils'
+ breakup_zshcompletion
)
main() {