From: Eero Aaltonen <eero.aalto...@vaisala.com> 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. Signed-off-by: Eero Aaltonen <eero.aalto...@vaisala.com> --- meta/recipes-core/systemd/systemd_254.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/systemd/systemd_254.bb b/meta/recipes-core/systemd/systemd_254.bb index e0ee2da412..83cd854b87 100644 --- a/meta/recipes-core/systemd/systemd_254.bb +++ b/meta/recipes-core/systemd/systemd_254.bb @@ -228,6 +228,8 @@ PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd" +RESOLV_CONF ??= "" + # Helper variables to clarify locations. This mirrors the logic in systemd's # build system. rootprefix ?= "${root_prefix}" @@ -339,8 +341,9 @@ do_install() { echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd else - 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 - ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd + resolv_conf="${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'run/systemd/resolve/stub-resolv.conf', 'run/systemd/resolve/resolv.conf', d)}" + sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf + ln -s ../${resolv_conf} ${D}${sysconfdir}/resolv-conf.systemd fi if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#189446): https://lists.openembedded.org/g/openembedded-core/message/189446 Mute This Topic: https://lists.openembedded.org/mt/102057806/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-