* [Buildroot] [PATCH v2] package/systemd: create /etc/resolv.conf only if resolvd is selected
@ 2019-10-26 16:17 unixmania at gmail.com
2019-10-26 16:56 ` Yann E. MORIN
2019-10-26 17:04 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: unixmania at gmail.com @ 2019-10-26 16:17 UTC (permalink / raw)
To: buildroot
From: Carlos Santos <unixmania@gmail.com>
Or else it becomes a dangling link to /run/systemd/resolve/resolv.conf,
which is never created. Even worst, it also prevents NewtorkManager from
updating resolv.conf.
Fixes:
https://bugs.busybox.net/show_bug.cgi?id=9881
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
CC: Michael Nosthoff <posted@heine.so>
---
Changes v1->v2:
- Rebase after bump to version 243
---
package/systemd/systemd.mk | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 5961d98b22..df40961fee 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -354,10 +354,6 @@ define SYSTEMD_INSTALL_SERVICE_NETWORKD
ln -sf ../../../../lib/systemd/system/systemd-network-generator.service \
$(TARGET_DIR)/etc/systemd/system/network-pre.target.wants/systemd-network-generator.service
endef
-define SYSTEMD_INSTALL_RESOLVCONF_HOOK
- ln -sf ../run/systemd/resolve/resolv.conf \
- $(TARGET_DIR)/etc/resolv.conf
-endef
SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
define SYSTEMD_INSTALL_NETWORK_CONFS
@@ -371,6 +367,10 @@ SYSTEMD_CONF_OPTS += -Dnetworkd=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
+define SYSTEMD_INSTALL_RESOLVCONF_HOOK
+ ln -sf ../run/systemd/resolve/resolv.conf \
+ $(TARGET_DIR)/etc/resolv.conf
+endef
SYSTEMD_CONF_OPTS += -Dresolve=true
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
define SYSTEMD_INSTALL_SERVICE_RESOLVED
--
2.18.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] package/systemd: create /etc/resolv.conf only if resolvd is selected
2019-10-26 16:17 [Buildroot] [PATCH v2] package/systemd: create /etc/resolv.conf only if resolvd is selected unixmania at gmail.com
@ 2019-10-26 16:56 ` Yann E. MORIN
2019-10-26 17:04 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2019-10-26 16:56 UTC (permalink / raw)
To: buildroot
Carlos, All,
On 2019-10-26 13:17 -0300, unixmania at gmail.com spake thusly:
> From: Carlos Santos <unixmania@gmail.com>
>
> Or else it becomes a dangling link to /run/systemd/resolve/resolv.conf,
> which is never created. Even worst, it also prevents NewtorkManager from
> updating resolv.conf.
>
> Fixes:
> https://bugs.busybox.net/show_bug.cgi?id=9881
>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> CC: Michael Nosthoff <posted@heine.so>
> ---
> Changes v1->v2:
> - Rebase after bump to version 243
> ---
> package/systemd/systemd.mk | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index 5961d98b22..df40961fee 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -354,10 +354,6 @@ define SYSTEMD_INSTALL_SERVICE_NETWORKD
> ln -sf ../../../../lib/systemd/system/systemd-network-generator.service \
> $(TARGET_DIR)/etc/systemd/system/network-pre.target.wants/systemd-network-generator.service
> endef
> -define SYSTEMD_INSTALL_RESOLVCONF_HOOK
> - ln -sf ../run/systemd/resolve/resolv.conf \
> - $(TARGET_DIR)/etc/resolv.conf
> -endef
> SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
> ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
> define SYSTEMD_INSTALL_NETWORK_CONFS
> @@ -371,6 +367,10 @@ SYSTEMD_CONF_OPTS += -Dnetworkd=false
> endif
>
> ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
> +define SYSTEMD_INSTALL_RESOLVCONF_HOOK
> + ln -sf ../run/systemd/resolve/resolv.conf \
> + $(TARGET_DIR)/etc/resolv.conf
> +endef
> SYSTEMD_CONF_OPTS += -Dresolve=true
> SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
> define SYSTEMD_INSTALL_SERVICE_RESOLVED
> --
> 2.18.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] package/systemd: create /etc/resolv.conf only if resolvd is selected
2019-10-26 16:17 [Buildroot] [PATCH v2] package/systemd: create /etc/resolv.conf only if resolvd is selected unixmania at gmail.com
2019-10-26 16:56 ` Yann E. MORIN
@ 2019-10-26 17:04 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-10-26 17:04 UTC (permalink / raw)
To: buildroot
On Sat, 26 Oct 2019 13:17:02 -0300
unixmania at gmail.com wrote:
> From: Carlos Santos <unixmania@gmail.com>
>
> Or else it becomes a dangling link to /run/systemd/resolve/resolv.conf,
> which is never created. Even worst, it also prevents NewtorkManager from
> updating resolv.conf.
>
> Fixes:
> https://bugs.busybox.net/show_bug.cgi?id=9881
>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
> CC: Michael Nosthoff <posted@heine.so>
> ---
> Changes v1->v2:
> - Rebase after bump to version 243
> ---
> package/systemd/systemd.mk | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-26 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-26 16:17 [Buildroot] [PATCH v2] package/systemd: create /etc/resolv.conf only if resolvd is selected unixmania at gmail.com
2019-10-26 16:56 ` Yann E. MORIN
2019-10-26 17:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox