summaryrefslogtreecommitdiff
path: root/src/grp-resolve
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-resolve')
-rw-r--r--src/grp-resolve/Makefile3
-rw-r--r--src/grp-resolve/libbasic-dns/src/Makefile15
-rw-r--r--src/grp-resolve/libbasic-dns/test/Makefile3
-rw-r--r--src/grp-resolve/systemd-resolve/Makefile9
-rw-r--r--src/grp-resolve/systemd-resolved/Makefile11
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-scope.h1
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-server.h20
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-transaction.h2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-manager.c1
9 files changed, 42 insertions, 23 deletions
diff --git a/src/grp-resolve/Makefile b/src/grp-resolve/Makefile
index 8132573d49..5e90fec8c7 100644
--- a/src/grp-resolve/Makefile
+++ b/src/grp-resolve/Makefile
@@ -23,6 +23,9 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
+dist_systempreset_DATA = \
+ 90-resolved.preset
+
nested.subdirs += libbasic-dns
nested.subdirs += nss-resolve
nested.subdirs += systemd-resolve
diff --git a/src/grp-resolve/libbasic-dns/src/Makefile b/src/grp-resolve/libbasic-dns/src/Makefile
index d7f12fafd4..ac3551fc1f 100644
--- a/src/grp-resolve/libbasic-dns/src/Makefile
+++ b/src/grp-resolve/libbasic-dns/src/Makefile
@@ -23,16 +23,16 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-$(outdir)/dns_type-list.txt: src/resolve/dns-type.h
+$(outdir)/dns_type-list.txt: $(call at.path,$(srcdir)/../include/basic-dns/dns-type.h)
$(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@
-$(outdir)/dns_type-to-name.h: src/resolve/dns_type-list.txt
+$(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: src/resolve/dns_type-list.txt
+$(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 \
@@ -49,4 +49,11 @@ basic_dns_sources = \
gperf_txt_sources += \
src/resolve/dns_type-list.txt
+noinst_LTLIBRARIES = libbasic-dns.la
+libbasic_dns_la_LIBADD += \
+ libsystemd-gcrypt.la \
+ libsystemd-shared.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/libbasic-dns/test/Makefile b/src/grp-resolve/libbasic-dns/test/Makefile
index 165f401d26..4f4cbd42a3 100644
--- a/src/grp-resolve/libbasic-dns/test/Makefile
+++ b/src/grp-resolve/libbasic-dns/test/Makefile
@@ -42,6 +42,7 @@ test_resolve_tables_CFLAGS = \
$(GCRYPT_CFLAGS)
test_resolve_tables_LDADD = \
+ libbasic-dns.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm
@@ -57,6 +58,7 @@ test_dns_packet_CFLAGS = \
$(GCRYPT_CFLAGS)
test_dns_packet_LDADD = \
+ libbasic-dns.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm
@@ -82,6 +84,7 @@ test_dnssec_CFLAGS = \
$(GCRYPT_CFLAGS)
test_dnssec_LDADD = \
+ libbasic-dns.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm
diff --git a/src/grp-resolve/systemd-resolve/Makefile b/src/grp-resolve/systemd-resolve/Makefile
index 9d9b46d58d..ef8b1785dc 100644
--- a/src/grp-resolve/systemd-resolve/Makefile
+++ b/src/grp-resolve/systemd-resolve/Makefile
@@ -23,11 +23,11 @@
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
+ $(basic_dns_sources)
nodist_systemd_resolve_SOURCES = \
src/resolve/dns_type-from-name.h \
@@ -37,6 +37,9 @@ systemd_resolve_CFLAGS = \
$(GCRYPT_CFLAGS)
systemd_resolve_LDADD = \
+ libsystemd-internal.la \
+ libsystemd-gcrypt.la \
+ libbasic-dns.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
-lm
diff --git a/src/grp-resolve/systemd-resolved/Makefile b/src/grp-resolve/systemd-resolved/Makefile
index e8ae8ccc28..f1cd91483e 100644
--- a/src/grp-resolve/systemd-resolved/Makefile
+++ b/src/grp-resolve/systemd-resolved/Makefile
@@ -23,7 +23,7 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-ifneq ($(ENABLE_RESOLVED),)
+basic_dns_sources =
systemd_resolved_SOURCES = \
src/resolve/resolved.c \
@@ -68,9 +68,7 @@ systemd_resolved_SOURCES = \
src/resolve/resolved-dns-stub.h \
src/resolve/resolved-dns-stub.c \
src/resolve/resolved-etc-hosts.h \
- src/resolve/resolved-etc-hosts.c \
- src/shared/gcrypt-util.c \
- src/shared/gcrypt-util.h
+ src/resolve/resolved-etc-hosts.c
nodist_systemd_resolved_SOURCES = \
src/resolve/dns_type-from-name.h \
@@ -81,6 +79,8 @@ systemd_resolved_CFLAGS = \
$(GCRYPT_CFLAGS)
systemd_resolved_LDADD = \
+ libbasic-dns.la \
+ libsystemd-internal.la \
libsystemd-network.la \
libsystemd-shared.la \
$(GCRYPT_LIBS) \
@@ -113,7 +113,6 @@ GENERAL_ALIASES += \
nodist_pkgsysconf_DATA += \
src/resolve/resolved.conf
-endif # ENABLE_RESOLVED
gperf_gperf_sources += \
src/resolve/resolved-gperf.gperf
@@ -124,4 +123,6 @@ EXTRA_DIST += \
dist_rootlibexec_DATA += \
src/resolve/resolv.conf
+sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
+
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
index 26623b1878..69dd6320d3 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
@@ -32,6 +32,7 @@ typedef struct DnsScope DnsScope;
#include "resolved-dns-stream.h"
#include "resolved-dns-zone.h"
#include "resolved-link.h"
+#include "resolved-manager.h"
typedef enum DnsScopeMatch {
DNS_SCOPE_NO,
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-server.h b/src/grp-resolve/systemd-resolved/resolved-dns-server.h
index cb0ad80292..83d0d23bb4 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-server.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-server.h
@@ -23,16 +23,6 @@
typedef struct DnsServer DnsServer;
-typedef enum DnsServerType {
- DNS_SERVER_SYSTEM,
- DNS_SERVER_FALLBACK,
- DNS_SERVER_LINK,
-} DnsServerType;
-#define _DNS_SERVER_TYPE_MAX (DNS_SERVER_LINK + 1)
-
-const char* dns_server_type_to_string(DnsServerType i) _const_;
-DnsServerType dns_server_type_from_string(const char *s) _pure_;
-
typedef enum DnsServerFeatureLevel {
DNS_SERVER_FEATURE_LEVEL_TCP,
DNS_SERVER_FEATURE_LEVEL_UDP,
@@ -52,6 +42,16 @@ int dns_server_feature_level_from_string(const char *s) _pure_;
#include "resolved-link.h"
#include "resolved-manager.h"
+typedef enum DnsServerType {
+ DNS_SERVER_SYSTEM,
+ DNS_SERVER_FALLBACK,
+ DNS_SERVER_LINK,
+} DnsServerType;
+#define _DNS_SERVER_TYPE_MAX (DNS_SERVER_LINK + 1)
+
+const char* dns_server_type_to_string(DnsServerType i) _const_;
+DnsServerType dns_server_type_from_string(const char *s) _pure_;
+
struct DnsServer {
Manager *manager;
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
index 705336221d..babc206f7f 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
@@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <systemd/sd-event.h>
+
typedef struct DnsTransaction DnsTransaction;
typedef enum DnsTransactionState DnsTransactionState;
typedef enum DnsTransactionSource DnsTransactionSource;
diff --git a/src/grp-resolve/systemd-resolved/resolved-manager.c b/src/grp-resolve/systemd-resolved/resolved-manager.c
index 67bbe30f13..eea95a6fd9 100644
--- a/src/grp-resolve/systemd-resolved/resolved-manager.c
+++ b/src/grp-resolve/systemd-resolved/resolved-manager.c
@@ -21,7 +21,6 @@
#include <poll.h>
#include <sys/ioctl.h>
-#include "sd-netlink/netlink-util.h"
#include "systemd-basic/af-list.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/dirent-util.h"