summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch31
-rw-r--r--meta/recipes-core/base-files/base-files/nsswitch-resolved.conf20
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb4
3 files changed, 22 insertions, 33 deletions
diff --git a/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch b/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch
deleted file mode 100644
index a6e39e0956..0000000000
--- a/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 830abe652428d9d31780c3ace121635ad7b64274 Mon Sep 17 00:00:00 2001
2From: Eero Aaltonen <eero.aaltonen@vaisala.com>
3Date: Wed Sep 27 15:50:48 2023 +0300
4Subject: [PATCH] Add nss-resolve to the Name Service Switch (NSS)
5
6Add `nss-resolve` so that `systemd-resolved` is used for name
7resolution with glibc `gethostbyname` calls.
8
9Upstream-Status: Inappropriate [no upstream, configuration].
10
11Signed-off-by: Eero Aaltonen <eero.aaltonen@vaisala.com>
12---
13 nsswitch.conf | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/nsswitch.conf b/nsswitch.conf
17index 06f03d2..34b165c 100644
18--- a/nsswitch.conf
19+++ b/nsswitch.conf
20@@ -8,7 +8,7 @@ passwd: compat
21 group: compat
22 shadow: compat
23
24-hosts: files dns
25+hosts: resolve [!UNAVAIL=return] files dns
26 networks: files
27
28 protocols: db files
29--
302.25.1
31
diff --git a/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf b/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf
new file mode 100644
index 0000000000..ec6ce156b5
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf
@@ -0,0 +1,20 @@
1# /etc/nsswitch.conf
2#
3# Example configuration of GNU Name Service Switch functionality.
4# If you have the `glibc-doc' and `info' packages installed, try:
5# `info libc "Name Service Switch"' for information about this file.
6
7passwd: compat
8group: compat
9shadow: compat
10gshadow: files
11
12hosts: resolve [!UNAVAIL=return] files dns
13networks: files
14
15protocols: db files
16services: db files
17ethers: db files
18rpc: db files
19
20netgroup: nis
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 60253fcd42..59b084d141 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
11 11
12SRC_URI = "file://rotation \ 12SRC_URI = "file://rotation \
13 file://nsswitch.conf \ 13 file://nsswitch.conf \
14 file://nsswitch-resolved.conf \
14 file://motd \ 15 file://motd \
15 file://hosts \ 16 file://hosts \
16 file://host.conf \ 17 file://host.conf \
@@ -23,7 +24,6 @@ SRC_URI = "file://rotation \
23 file://share/dot.profile \ 24 file://share/dot.profile \
24 file://licenses/GPL-2 \ 25 file://licenses/GPL-2 \
25 " 26 "
26SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}"
27 27
28S = "${WORKDIR}/sources" 28S = "${WORKDIR}/sources"
29UNPACKDIR = "${S}" 29UNPACKDIR = "${S}"
@@ -124,7 +124,7 @@ do_install () {
124} 124}
125 125
126do_install:append:libc-glibc () { 126do_install:append:libc-glibc () {
127 install -m 0644 ${S}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf 127 install -m 0644 ${S}/${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', 'nsswitch-resolved.conf', 'nsswitch.conf', d)} ${D}${sysconfdir}/nsswitch.conf
128} 128}
129 129
130DISTRO_VERSION[vardepsexclude] += "DATE" 130DISTRO_VERSION[vardepsexclude] += "DATE"