summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorEero Aaltonen <eero.aaltonen@vaisala.com>2023-10-19 14:11:52 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-23 10:49:19 +0100
commite33267f8078bed37ac94afa2163e5e64408fb170 (patch)
treea0a81e075bfe8aac834f45fe26f790ac55ae44bb /meta/recipes-core/systemd
parent6f30e3586eb1b8e853cf23dd039f258d0dc0bc6b (diff)
downloadpoky-e33267f8078bed37ac94afa2163e5e64408fb170.tar.gz
systemd: add option to use stub-resolv.conf
Add option to use the stub-resolv.conf file, which is the systemd upstream's recommended default mode https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#/etc/resolv.conf This enables the resolution of Multicast DNS and Link-Local Multicast Name Resolution names for programs that do not use Name Service Switch. (From OE-Core rev: dfa541ee4ffab5c43ac4b3f23552b7f9db5cb362) Signed-off-by: Eero Aaltonen <eero.aaltonen@vaisala.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd_254.4.bb7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/recipes-core/systemd/systemd_254.4.bb b/meta/recipes-core/systemd/systemd_254.4.bb
index 76cc07e86f..ef29116bf9 100644
--- a/meta/recipes-core/systemd/systemd_254.4.bb
+++ b/meta/recipes-core/systemd/systemd_254.4.bb
@@ -227,6 +227,8 @@ PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
227PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" 227PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
228PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd" 228PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd"
229 229
230RESOLV_CONF ??= ""
231
230# Helper variables to clarify locations. This mirrors the logic in systemd's 232# Helper variables to clarify locations. This mirrors the logic in systemd's
231# build system. 233# build system.
232rootprefix ?= "${root_prefix}" 234rootprefix ?= "${root_prefix}"
@@ -338,8 +340,9 @@ do_install() {
338 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf 340 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
339 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd 341 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
340 else 342 else
341 sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf 343 resolv_conf="${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'run/systemd/resolve/stub-resolv.conf', 'run/systemd/resolve/resolv.conf', d)}"
342 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd 344 sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
345 ln -s ../${resolv_conf} ${D}${sysconfdir}/resolv-conf.systemd
343 fi 346 fi
344 if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then 347 if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
345 rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf 348 rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf