Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] systemd: disable resolv.conf symlink unless resolved is enabled
@ 2014-09-18 15:16 Peter A. Bigot
  2014-09-23 21:42 ` Peter A. Bigot
  0 siblings, 1 reply; 3+ messages in thread
From: Peter A. Bigot @ 2014-09-18 15:16 UTC (permalink / raw)
  To: openembedded-core

The tmpfiles configuration in systemd unconditionally creates a symlink
from /etc/resolv.conf to the location where systemd's resolved service
will place the real file.  This link is only appropriate when resolved
is enabled and running: its presence prevents connman or other systems
from providing a working resolv.conf when systemd is not assigned that
responsibility.  OE has not yet enabled systemd's networkd or resolved
by default.

There is a TODO in the systemd source to fix this, but it has not been
addressed upstream.  This patch comments out the corresponding line when
resolved is not enabled in the package configuration.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
---
 ...es.d-etc.conf-disable-resolv.conf-symlink.patch | 35 ++++++++++++++++++++++
 meta/recipes-core/systemd/systemd_216.bb           |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch b/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch
new file mode 100644
index 0000000..7218322
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch
@@ -0,0 +1,35 @@
+From f0ab1600fb56d680e6aba3d0d51dfb9ffa3d9403 Mon Sep 17 00:00:00 2001
+From: "Peter A. Bigot" <pab@pabigot.com>
+Date: Thu, 18 Sep 2014 08:36:54 -0500
+Subject: [PATCH] tmpfiles.d/etc.conf: disable resolv.conf symlink
+
+This link is valid only if ENABLE_RESOLVED is configured for systemd.
+If left unconditional, the symlink is created preventing connman from
+storing the configuration it received from DHCP or other sources.
+
+Upstream has a TODO to fix this, but has not done so as of this date.
+Provide a temporary workaround for OE until this is done properly
+upstream.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: Peter A. Bigot <pab@pabigot.com>
+---
+ tmpfiles.d/etc.conf | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tmpfiles.d/etc.conf b/tmpfiles.d/etc.conf
+index b23272c..5364dd8 100644
+--- a/tmpfiles.d/etc.conf
++++ b/tmpfiles.d/etc.conf
+@@ -10,6 +10,7 @@
+ L /etc/os-release - - - - ../usr/lib/os-release
+ L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
+ L+ /etc/mtab - - - - ../proc/self/mounts
+-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
++# TODO: conditional on ENABLE_RESOLVED
++#L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
+ C /etc/nsswitch.conf - - - -
+ C /etc/pam.d - - - -
+-- 
+1.8.5.5
+
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index 331da99..ebf9395 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -36,6 +36,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
            file://00-create-volatile.conf \
            file://init \
            file://run-ptest \
+           ${@bb.utils.contains('PACKAGECONFIG', 'resolved', '', 'file://0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch', d)} \
           "
 
 S = "${WORKDIR}/git"
-- 
1.8.5.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] systemd: disable resolv.conf symlink unless resolved is enabled
  2014-09-18 15:16 [PATCH] systemd: disable resolv.conf symlink unless resolved is enabled Peter A. Bigot
@ 2014-09-23 21:42 ` Peter A. Bigot
  2014-09-24  9:58   ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Peter A. Bigot @ 2014-09-23 21:42 UTC (permalink / raw)
  To: openembedded-core

Ping?

This has missed a couple merges; if the focus is elsewhere or there's a 
problem with it fine, but I think this belongs in 1.7 as without it 
systemd+connman doesn't function as it did before the update to 216.

Peter

On 09/18/2014 10:16 AM, Peter A. Bigot wrote:
> The tmpfiles configuration in systemd unconditionally creates a symlink
> from /etc/resolv.conf to the location where systemd's resolved service
> will place the real file.  This link is only appropriate when resolved
> is enabled and running: its presence prevents connman or other systems
> from providing a working resolv.conf when systemd is not assigned that
> responsibility.  OE has not yet enabled systemd's networkd or resolved
> by default.
>
> There is a TODO in the systemd source to fix this, but it has not been
> addressed upstream.  This patch comments out the corresponding line when
> resolved is not enabled in the package configuration.
>
> Signed-off-by: Peter A. Bigot <pab@pabigot.com>
> ---
>   ...es.d-etc.conf-disable-resolv.conf-symlink.patch | 35 ++++++++++++++++++++++
>   meta/recipes-core/systemd/systemd_216.bb           |  1 +
>   2 files changed, 36 insertions(+)
>   create mode 100644 meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch
>
> diff --git a/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch b/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch
> new file mode 100644
> index 0000000..7218322
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch
> @@ -0,0 +1,35 @@
> +From f0ab1600fb56d680e6aba3d0d51dfb9ffa3d9403 Mon Sep 17 00:00:00 2001
> +From: "Peter A. Bigot" <pab@pabigot.com>
> +Date: Thu, 18 Sep 2014 08:36:54 -0500
> +Subject: [PATCH] tmpfiles.d/etc.conf: disable resolv.conf symlink
> +
> +This link is valid only if ENABLE_RESOLVED is configured for systemd.
> +If left unconditional, the symlink is created preventing connman from
> +storing the configuration it received from DHCP or other sources.
> +
> +Upstream has a TODO to fix this, but has not done so as of this date.
> +Provide a temporary workaround for OE until this is done properly
> +upstream.
> +
> +Upstream-Status: Inappropriate [OE-specific]
> +Signed-off-by: Peter A. Bigot <pab@pabigot.com>
> +---
> + tmpfiles.d/etc.conf | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/tmpfiles.d/etc.conf b/tmpfiles.d/etc.conf
> +index b23272c..5364dd8 100644
> +--- a/tmpfiles.d/etc.conf
> ++++ b/tmpfiles.d/etc.conf
> +@@ -10,6 +10,7 @@
> + L /etc/os-release - - - - ../usr/lib/os-release
> + L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
> + L+ /etc/mtab - - - - ../proc/self/mounts
> +-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
> ++# TODO: conditional on ENABLE_RESOLVED
> ++#L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
> + C /etc/nsswitch.conf - - - -
> + C /etc/pam.d - - - -
> +--
> +1.8.5.5
> +
> diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
> index 331da99..ebf9395 100644
> --- a/meta/recipes-core/systemd/systemd_216.bb
> +++ b/meta/recipes-core/systemd/systemd_216.bb
> @@ -36,6 +36,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
>              file://00-create-volatile.conf \
>              file://init \
>              file://run-ptest \
> +           ${@bb.utils.contains('PACKAGECONFIG', 'resolved', '', 'file://0001-tmpfiles.d-etc.conf-disable-resolv.conf-symlink.patch', d)} \
>             "
>   
>   S = "${WORKDIR}/git"



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] systemd: disable resolv.conf symlink unless resolved is enabled
  2014-09-23 21:42 ` Peter A. Bigot
@ 2014-09-24  9:58   ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2014-09-24  9:58 UTC (permalink / raw)
  To: Peter A. Bigot; +Cc: OE-core

On 23 September 2014 22:42, Peter A. Bigot <pab@pabigot.com> wrote:
> This has missed a couple merges; if the focus is elsewhere or there's a
> problem with it fine, but I think this belongs in 1.7 as without it
> systemd+connman doesn't function as it did before the update to 216.

Sorry, missed this.  Queued!

Thanks,
Ross


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-24  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-18 15:16 [PATCH] systemd: disable resolv.conf symlink unless resolved is enabled Peter A. Bigot
2014-09-23 21:42 ` Peter A. Bigot
2014-09-24  9:58   ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox