summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/base-files')
-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_3.0.14.bb2
2 files changed, 33 insertions, 0 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
new file mode 100644
index 0000000000..a6e39e0956
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch
@@ -0,0 +1,31 @@
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_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 4d246126a2..9fab53ce63 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
@@ -23,6 +23,8 @@ SRC_URI = "file://rotation \
23 file://share/dot.profile \ 23 file://share/dot.profile \
24 file://licenses/GPL-2 \ 24 file://licenses/GPL-2 \
25 " 25 "
26SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}"
27
26S = "${WORKDIR}" 28S = "${WORKDIR}"
27 29
28INHIBIT_DEFAULT_DEPS = "1" 30INHIBIT_DEFAULT_DEPS = "1"