Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Re: Connman problem with changing timezone on read-only
      rootfs (Philip Withnall)
   2. Re: [PATCH] timezone: Add support for setting timezone using
      timedated (Philip Withnall)


----------------------------------------------------------------------

Message: 1
Date: Wed, 07 Sep 2016 11:00:48 +0100
From: Philip Withnall <[email protected]>
To: [email protected]
Subject: Re: Connman problem with changing timezone on read-only
        rootfs
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

Hi,

On Tue, 2016-09-06 at 17:24 +0000, Viliam Lejcik wrote:
> Recently we started testing our yocto-based linux OS on a read-only root
> file system and we've run into a problem with changing a timezone. It
> happens because the /etc/localtime file is in the read-only partition and
> connman cannot overwrite it. We've solved the problem by changing the
> /etc/localtime file to a symlink pointing somewhere to a writeable
> partition (e.g. /var). In this case connman still tries to delete the
> /etc/localtime link on a timezone change request (see write_file()), but
> it doesn't care if it was successful, so the link file stays unchanged
> and the following open() call will overwrite the target file. If a
> developer temporarily remouted the filesystem to read-write mode and
> changed a timezone, the link is replaced with a regular file. Moreover,
> connman sets inotify_add_watch() for the /etc dir and if the localtime
> file is a link, it doesn't catch changes in the target file content.

This was discussed recently on the list (I ran into the same problem with
an effectively read-only root FS, due to use of systemd?s ProtectSystem
option):

https://lists.01.org/pipermail/connman/2016-July/000821.html

The conclusion I came to was that we cannot indirect /etc/localtime
further, as the man pages suggest to projects to read the target of
/etc/localtime (without resolving any further links) to find the timezone.

A more future-proof solution is to use systemd-timedated to set the
timezone:

https://lists.01.org/pipermail/connman/2016-August/000965.html

Philip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.01.org/pipermail/connman/attachments/20160907/c93a909d/attachment-0001.asc>

------------------------------

Message: 2
Date: Wed, 07 Sep 2016 11:07:55 +0100
From: Philip Withnall <[email protected]>
To: Slava Monich <[email protected]>, Marcel Holtmann
        <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] timezone: Add support for setting timezone using
        timedated
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

Hi,

On Sun, 2016-08-28 at 12:24 +0300, Slava Monich wrote:
> On 27/08/16 17:15, Marcel Holtmann wrote:
> > > If we are running under systemd, the ProtectSystem key in our
> > > .service
> > > file prevents us from writing to /etc/localtime. Instead, set the
> > > timezone by using org.freedesktop.timedate1 over D-Bus, if it is
> > > available. If it is not available, fall back to /etc/localtime.
> > > 
> > > Signed-off-by: Philip Withnall <[email protected]>
> > > ---
> > > ? src/timezone.c | 213
> > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> > > ? 1 file changed, 210 insertions(+), 3 deletions(-)
> > how hard would it to build a connman_timezone_driver_register
> > infrastructure? Hard coding systemd D-Bus APIs and a fallback seems
> > like the wrong approach. I think we should have a plugin to overwrite
> > default behavior. Similar to what we do with proxies and other
> > features.

It?s more effort than I have time to put in at the moment, sorry.
Hardcoding D-Bus APIs is (I believe) an acceptable approach, since the D-
Bus API itself provides the indirection layer ? the API can be implemented
by any system process. The ?fallback? (/etc/localtime) should work in 90%
of cases at the moment (as it always has done).

> +1
> 
> Sailfish OS is using timed which has a D-Bus API of its own.

Unless I?ve misunderstood, Sailfish also uses systemd extensively ? why not
use systemd-timedated?

Philip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.01.org/pipermail/connman/attachments/20160907/26e15251/attachment-0001.asc>

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 11, Issue 7
**************************************

Reply via email to