* how to set time zone @ 2011-10-28 5:41 Ni Qingliang 2011-10-28 6:32 ` Samuel Stirtzel 0 siblings, 1 reply; 15+ messages in thread From: Ni Qingliang @ 2011-10-28 5:41 UTC (permalink / raw) To: openembedded-core Hello All: what is the right way to set timezone? I have added tzdata into my image, and can find some variables in the etc, e.g. 'TZ'. on my archlinux, I can set TIMEZONE in the rc.conf, which is used in rc.sysvinit (which will link the /etc/localtime using TIMEZONE). what is the right place to locate similar setting code (e.g. link the /etc/localtime) in the yocto? thanks! -- Yi Qingliang niqingliang@insigma.com.cn http://niqingliang2003.wordpress.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-10-28 5:41 how to set time zone Ni Qingliang @ 2011-10-28 6:32 ` Samuel Stirtzel 2011-10-28 7:05 ` Ni Qingliang 0 siblings, 1 reply; 15+ messages in thread From: Samuel Stirtzel @ 2011-10-28 6:32 UTC (permalink / raw) To: niqingliang, Patches and discussions about the oe-core layer; +Cc: yocto 2011/10/28 Ni Qingliang <niqingliang@insigma.com.cn>: > Hello All: > > what is the right way to set timezone? > > I have added tzdata into my image, and can find some variables in the > etc, e.g. 'TZ'. > > on my archlinux, I can set TIMEZONE in the rc.conf, which is used in > rc.sysvinit (which will link the /etc/localtime using TIMEZONE). > > what is the right place to locate similar setting code (e.g. link > the /etc/localtime) in the yocto? > > thanks! > > > > -- > Yi Qingliang > niqingliang@insigma.com.cn > http://niqingliang2003.wordpress.com > > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > Hi, you could try the following: http://www.rwhitby.net/blog/nslu2-linux/setting-the-openmoko-timezone.html Well this is the first entry when using google with "openembedded time zone", so please consider using search engines first next time. Also this is the very same process like it is done on a desktop computer, googling for "set time zone linux command line" gives this result: http://www.cyberciti.biz/faq/howto-linux-unix-change-setup-timezone-tz-variable/ Which shows more precise steps at the headline "Set timezone using /etc/localtime configuration file [any Linux distro]". (Sorry for cross posting, but this was carried over to the OE-Core list) -- Regards Samuel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-10-28 6:32 ` Samuel Stirtzel @ 2011-10-28 7:05 ` Ni Qingliang 2011-10-28 8:22 ` Andrea Adami 0 siblings, 1 reply; 15+ messages in thread From: Ni Qingliang @ 2011-10-28 7:05 UTC (permalink / raw) To: Samuel Stirtzel Cc: yocto@yoctoproject.org, Patches and discussions about the oe-core layer THANKS! I still want the native support by oe-core/yocto:-). If no, I will try by myself. On Fri, 2011-10-28 at 14:32 +0800, Samuel Stirtzel wrote: > 2011/10/28 Ni Qingliang <niqingliang@insigma.com.cn>: > > Hello All: > > > > what is the right way to set timezone? > > > > I have added tzdata into my image, and can find some variables in the > > etc, e.g. 'TZ'. > > > > on my archlinux, I can set TIMEZONE in the rc.conf, which is used in > > rc.sysvinit (which will link the /etc/localtime using TIMEZONE). > > > > what is the right place to locate similar setting code (e.g. link > > the /etc/localtime) in the yocto? > > > > thanks! > > > > > > > > -- > > Yi Qingliang > > niqingliang@insigma.com.cn > > http://niqingliang2003.wordpress.com > > > > > > > > _______________________________________________ > > Openembedded-core mailing list > > Openembedded-core@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > > > Hi, > > you could try the following: > http://www.rwhitby.net/blog/nslu2-linux/setting-the-openmoko-timezone.html > > Well this is the first entry when using google with "openembedded time > zone", so please consider using search engines first next time. > > Also this is the very same process like it is done on a desktop > computer, googling for "set time zone linux command line" gives this > result: > http://www.cyberciti.biz/faq/howto-linux-unix-change-setup-timezone-tz-variable/ > Which shows more precise steps at the headline "Set timezone using > /etc/localtime configuration file [any Linux distro]". > > > (Sorry for cross posting, but this was carried over to the OE-Core list) > > -- > Regards > Samuel -- Yi Qingliang niqingliang@insigma.com.cn http://niqingliang2003.wordpress.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-10-28 7:05 ` Ni Qingliang @ 2011-10-28 8:22 ` Andrea Adami 2011-10-28 14:43 ` Mark Hatle 2011-10-28 16:15 ` Saul Wold 0 siblings, 2 replies; 15+ messages in thread From: Andrea Adami @ 2011-10-28 8:22 UTC (permalink / raw) To: niqingliang, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 951 bytes --] On Fri, Oct 28, 2011 at 9:05 AM, Ni Qingliang <niqingliang@insigma.com.cn>wrote: > THANKS! > > I still want the native support by oe-core/yocto:-). If no, I will try > by myself. > > I've asked three or four time the oe-core crow to improve the recipe...last one: On Wed, Oct 19, 2011 at 12:24 AM, Joshua Lock <josh@linux.intel.com> wrote: > Per mailing requests, here are updates to the tzdata and gst-plugins-good > recipes. > > Joshua > > The following changes since commit > 95d0ff5e070c690314ab87665200099a52d37ebf: > > tzdata: updated SRC_URI and update to 2011k (2011-10-18 11:16:58 -0700) > Thanks for the tzdata fix. Now, we have the same recipes in meta-oe with a slightly different do_install and packaging: I'm referring to /etc/localtime and /etc/timezone: which package do provide those in oe-core? (We'll remove the tzdata/tzcodes from meta-oe once the recipes are matching) Regards Andrea [-- Attachment #2: Type: text/html, Size: 1522 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-10-28 8:22 ` Andrea Adami @ 2011-10-28 14:43 ` Mark Hatle 2011-10-31 0:44 ` Ni Qingliang 2011-10-28 16:15 ` Saul Wold 1 sibling, 1 reply; 15+ messages in thread From: Mark Hatle @ 2011-10-28 14:43 UTC (permalink / raw) To: openembedded-core Setting the default TZ for the image is something that should be done in a post install script for the tzdata package or something similar. Since the /etc/localtime is usually a copy/hardlink or symlink to the timezone data we don't want to package it up. Instead we want to perform the actions that a program running on the target system itself would use to change the timezone. So I think the easiest approach is to add a system level configuration variable (set the default). Then use this variable to populate the configuration file that specifies the system timezone... and then use the post install process to check the contents of a text file. Alternatively do this via an initscript -- but for folks w/ read-only filesystems I'm not sure that will work. --Mark On 10/28/11 3:22 AM, Andrea Adami wrote: > On Fri, Oct 28, 2011 at 9:05 AM, Ni Qingliang <niqingliang@insigma.com.cn > <mailto:niqingliang@insigma.com.cn>> wrote: > > THANKS! > > I still want the native support by oe-core/yocto:-). If no, I will try > by myself. > > > I've asked three or four time the oe-core crow to improve the recipe...last one: > > On Wed, Oct 19, 2011 at 12:24 AM, Joshua Lock <josh@linux.intel.com > <mailto:josh@linux.intel.com>> wrote: > > Per mailing requests, here are updates to the tzdata and gst-plugins-good > recipes. > > Joshua > > The following changes since commit 95d0ff5e070c690314ab87665200099a52d37ebf: > > tzdata: updated SRC_URI and update to 2011k (2011-10-18 11:16:58 -0700) > > > Thanks for the tzdata fix. > Now, we have the same recipes in meta-oe with a slightly different do_install > and packaging: I'm referring to /etc/localtime and /etc/timezone: which package > do provide those in oe-core? > > (We'll remove the tzdata/tzcodes from meta-oe once the recipes are matching) > > Regards > > > > Andrea > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-10-28 14:43 ` Mark Hatle @ 2011-10-31 0:44 ` Ni Qingliang 2011-11-02 17:32 ` Andrea Adami 0 siblings, 1 reply; 15+ messages in thread From: Ni Qingliang @ 2011-10-31 0:44 UTC (permalink / raw) To: Patches and discussions about the oe-core layer I'd like the 'system level configuration' solution. the /etc/localtime/ link can be done when packaging rootfs (using the system level configuration). On Fri, 2011-10-28 at 22:43 +0800, Mark Hatle wrote: > Setting the default TZ for the image is something that should be done in a post > install script for the tzdata package or something similar. > > Since the /etc/localtime is usually a copy/hardlink or symlink to the timezone > data we don't want to package it up. Instead we want to perform the actions > that a program running on the target system itself would use to change the timezone. > > So I think the easiest approach is to add a system level configuration variable > (set the default). > > Then use this variable to populate the configuration file that specifies the > system timezone... and then use the post install process to check the contents > of a text file. > > Alternatively do this via an initscript -- but for folks w/ read-only > filesystems I'm not sure that will work. > > --Mark > > On 10/28/11 3:22 AM, Andrea Adami wrote: > > On Fri, Oct 28, 2011 at 9:05 AM, Ni Qingliang <niqingliang@insigma.com.cn > > <mailto:niqingliang@insigma.com.cn>> wrote: > > > > THANKS! > > > > I still want the native support by oe-core/yocto:-). If no, I will try > > by myself. > > > > > > I've asked three or four time the oe-core crow to improve the recipe...last one: > > > > On Wed, Oct 19, 2011 at 12:24 AM, Joshua Lock <josh@linux.intel.com > > <mailto:josh@linux.intel.com>> wrote: > > > > Per mailing requests, here are updates to the tzdata and gst-plugins-good > > recipes. > > > > Joshua > > > > The following changes since commit 95d0ff5e070c690314ab87665200099a52d37ebf: > > > > tzdata: updated SRC_URI and update to 2011k (2011-10-18 11:16:58 -0700) > > > > > > Thanks for the tzdata fix. > > Now, we have the same recipes in meta-oe with a slightly different do_install > > and packaging: I'm referring to /etc/localtime and /etc/timezone: which package > > do provide those in oe-core? > > > > (We'll remove the tzdata/tzcodes from meta-oe once the recipes are matching) > > > > Regards > > > > > > > > Andrea > > > > > > _______________________________________________ > > Openembedded-core mailing list > > Openembedded-core@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core -- Yi Qingliang niqingliang@insigma.com.cn http://niqingliang2003.wordpress.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-10-31 0:44 ` Ni Qingliang @ 2011-11-02 17:32 ` Andrea Adami 2011-11-02 19:15 ` Mark Hatle 0 siblings, 1 reply; 15+ messages in thread From: Andrea Adami @ 2011-11-02 17:32 UTC (permalink / raw) To: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 1818 bytes --] On Mon, Oct 31, 2011 at 1:44 AM, Ni Qingliang <niqingliang@insigma.com.cn>wrote: > I'd like the 'system level configuration' solution. > > the /etc/localtime/ link can be done when packaging rootfs (using the > system level configuration). > > On Fri, 2011-10-28 at 22:43 +0800, Mark Hatle wrote: > > Setting the default TZ for the image is something that should be done in > a post > > install script for the tzdata package or something similar. > > > > Since the /etc/localtime is usually a copy/hardlink or symlink to the > timezone > > data we don't want to package it up. Instead we want to perform the > actions > > that a program running on the target system itself would use to change > the timezone. > > > > So I think the easiest approach is to add a system level configuration > variable > > (set the default). > > > > Then use this variable to populate the configuration file that specifies > the > > system timezone... and then use the post install process to check the > contents > > of a text file. > > > > Alternatively do this via an initscript -- but for folks w/ read-only > > filesystems I'm not sure that will work. > > > > --Mark > <cut> Maybe I misunderstand "system level configuration" but in the meta-oe recipe we have DEFAULT_TIMEZONE ?= "Europe/London" Maybe UTC would be better? Note how the variable is weak thus can be overridden in local.conf. Secondly, why do it as post-install or at image do_rootfs stage when we have set the variable and are therefore able to provide sane defaults in do_install? Other points before starting to write a patch: -why is the recipe in oe-core doing chown -R root:root ${D} ? -the logic around # libc is removing zoneinfo files from package Is it only eglibc? Regards Andrea [-- Attachment #2: Type: text/html, Size: 2307 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-11-02 17:32 ` Andrea Adami @ 2011-11-02 19:15 ` Mark Hatle 2011-11-03 0:47 ` Ni Qingliang 2011-11-03 16:20 ` Andrea Adami 0 siblings, 2 replies; 15+ messages in thread From: Mark Hatle @ 2011-11-02 19:15 UTC (permalink / raw) To: openembedded-core On 11/2/11 12:32 PM, Andrea Adami wrote: > On Mon, Oct 31, 2011 at 1:44 AM, Ni Qingliang <niqingliang@insigma.com.cn > <mailto:niqingliang@insigma.com.cn>> wrote: > > I'd like the 'system level configuration' solution. > > the /etc/localtime/ link can be done when packaging rootfs (using the > system level configuration). > > On Fri, 2011-10-28 at 22:43 +0800, Mark Hatle wrote: > > Setting the default TZ for the image is something that should be done in a > post > > install script for the tzdata package or something similar. > > > > Since the /etc/localtime is usually a copy/hardlink or symlink to the timezone > > data we don't want to package it up. Instead we want to perform the actions > > that a program running on the target system itself would use to change the > timezone. > > > > So I think the easiest approach is to add a system level configuration > variable > > (set the default). > > > > Then use this variable to populate the configuration file that specifies the > > system timezone... and then use the post install process to check the contents > > of a text file. > > > > Alternatively do this via an initscript -- but for folks w/ read-only > > filesystems I'm not sure that will work. > > > > --Mark > > <cut> > > Maybe I misunderstand "system level configuration" but in the meta-oe recipe we have > > DEFAULT_TIMEZONE ?= "Europe/London" > > Maybe UTC would be better? To me no timezone (which is UTC) is preferable as the system designer can then set the timezone, externally to the package(s). > Note how the variable is weak thus can be overridden in local.conf. > > Secondly, why do it as post-install or at image do_rootfs stage when we have set > the variable and are therefore able to provide sane defaults in do_install? If it's done within a do_install, then the file (/etc/timezone) itself gets placed into the package. If it's in the package, then if/when someone upgrades the package from a feed the timezone gets reset to the previous value. That's a bug IMHO. If it's done as a post-install script, then the timezone configuration can be evaluated and if one isn't set -- or there is no timezone file -- then we can set it to UTC or a similar default timezone.. (the value in the DEFAULT_TIMEZONE variable is reasonable in this approach.) > Other points before starting to write a patch: > -why is the recipe in oe-core doing chown -R root:root ${D} ? There was an issue with the way the timezone data was extracted/constructed that it was have all of the build system's uid/gid preserved in the copy to the final install directory -- so when packaging incorrect usernames and groups were fed into the process causing issues. A simple chown -R root:root ${D} ensured that all of the timezone data was owned by the root user (on the target). > -the logic around # libc is removing zoneinfo files from package > Is it only eglibc? Timezone info is updated more often then the system libc. So the zoneinfo files are handled externally of the libc. This allows for easier updates over time.. (This is my guess, as I'm not familiar with exactly what this comment refers to.) > Regards > > Andrea > > | > | > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-11-02 19:15 ` Mark Hatle @ 2011-11-03 0:47 ` Ni Qingliang 2011-11-03 1:19 ` Otavio Salvador 2011-11-03 16:20 ` Andrea Adami 1 sibling, 1 reply; 15+ messages in thread From: Ni Qingliang @ 2011-11-03 0:47 UTC (permalink / raw) To: Patches and discussions about the oe-core layer maybe we can do the link in system booting, use the variable "TZ" to create the symlink /etc/localtime, just like archlinux. e.g. providing one script in /etc/rcS.d/ to create the symlink. On Thu, 2011-11-03 at 03:15 +0800, Mark Hatle wrote: > On 11/2/11 12:32 PM, Andrea Adami wrote: > > On Mon, Oct 31, 2011 at 1:44 AM, Ni Qingliang <niqingliang@insigma.com.cn > > <mailto:niqingliang@insigma.com.cn>> wrote: > > > > I'd like the 'system level configuration' solution. > > > > the /etc/localtime/ link can be done when packaging rootfs (using the > > system level configuration). > > > > On Fri, 2011-10-28 at 22:43 +0800, Mark Hatle wrote: > > > Setting the default TZ for the image is something that should be done in a > > post > > > install script for the tzdata package or something similar. > > > > > > Since the /etc/localtime is usually a copy/hardlink or symlink to the timezone > > > data we don't want to package it up. Instead we want to perform the actions > > > that a program running on the target system itself would use to change the > > timezone. > > > > > > So I think the easiest approach is to add a system level configuration > > variable > > > (set the default). > > > > > > Then use this variable to populate the configuration file that specifies the > > > system timezone... and then use the post install process to check the contents > > > of a text file. > > > > > > Alternatively do this via an initscript -- but for folks w/ read-only > > > filesystems I'm not sure that will work. > > > > > > --Mark > > > > <cut> > > > > Maybe I misunderstand "system level configuration" but in the meta-oe recipe we have > > > > DEFAULT_TIMEZONE ?= "Europe/London" > > > > Maybe UTC would be better? > > To me no timezone (which is UTC) is preferable as the system designer can then > set the timezone, externally to the package(s). > > > Note how the variable is weak thus can be overridden in local.conf. > > > > Secondly, why do it as post-install or at image do_rootfs stage when we have set > > the variable and are therefore able to provide sane defaults in do_install? > > If it's done within a do_install, then the file (/etc/timezone) itself gets > placed into the package. If it's in the package, then if/when someone upgrades > the package from a feed the timezone gets reset to the previous value. That's a > bug IMHO. > > If it's done as a post-install script, then the timezone configuration can be > evaluated and if one isn't set -- or there is no timezone file -- then we can > set it to UTC or a similar default timezone.. (the value in the DEFAULT_TIMEZONE > variable is reasonable in this approach.) > > > Other points before starting to write a patch: > > -why is the recipe in oe-core doing chown -R root:root ${D} ? > > There was an issue with the way the timezone data was extracted/constructed that > it was have all of the build system's uid/gid preserved in the copy to the final > install directory -- so when packaging incorrect usernames and groups were fed > into the process causing issues. > > A simple chown -R root:root ${D} ensured that all of the timezone data was owned > by the root user (on the target). > > > -the logic around # libc is removing zoneinfo files from package > > Is it only eglibc? > > Timezone info is updated more often then the system libc. So the zoneinfo files > are handled externally of the libc. This allows for easier updates over time.. > (This is my guess, as I'm not familiar with exactly what this comment refers to.) > > > Regards > > > > Andrea > > > > | > > | > > > > > > _______________________________________________ > > Openembedded-core mailing list > > Openembedded-core@lists.openembedded.org > > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core -- Yi Qingliang niqingliang@insigma.com.cn https://niqingliang2003.wordpress.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-11-03 0:47 ` Ni Qingliang @ 2011-11-03 1:19 ` Otavio Salvador 2011-11-03 1:35 ` Ni Qingliang 0 siblings, 1 reply; 15+ messages in thread From: Otavio Salvador @ 2011-11-03 1:19 UTC (permalink / raw) To: niqingliang, Patches and discussions about the oe-core layer On Wed, Nov 2, 2011 at 22:47, Ni Qingliang <niqingliang@insigma.com.cn> wrote: > maybe we can do the link in system booting, use the variable "TZ" to > create the symlink /etc/localtime, just like archlinux. > e.g. providing one script in /etc/rcS.d/ to create the symlink. This ought to be done by image IMO; so a kind of post rootfs generation hook might be use allowing it to be set per-image. I personally have this exactly use-case here at work. -- Otavio Salvador O.S. Systems E-mail: otavio@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-11-03 1:19 ` Otavio Salvador @ 2011-11-03 1:35 ` Ni Qingliang 2011-11-03 1:58 ` Philip Balister 0 siblings, 1 reply; 15+ messages in thread From: Ni Qingliang @ 2011-11-03 1:35 UTC (permalink / raw) To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer what is "IMO"? On Thu, 2011-11-03 at 09:19 +0800, Otavio Salvador wrote: > On Wed, Nov 2, 2011 at 22:47, Ni Qingliang <niqingliang@insigma.com.cn> wrote: > > maybe we can do the link in system booting, use the variable "TZ" to > > create the symlink /etc/localtime, just like archlinux. > > e.g. providing one script in /etc/rcS.d/ to create the symlink. > > This ought to be done by image IMO; so a kind of post rootfs > generation hook might be use allowing it to be set per-image. > > I personally have this exactly use-case here at work. > > -- > Otavio Salvador O.S. Systems > E-mail: otavio@ossystems.com.br http://www.ossystems.com.br > Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br -- Yi Qingliang niqingliang@insigma.com.cn https://niqingliang2003.wordpress.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-11-03 1:35 ` Ni Qingliang @ 2011-11-03 1:58 ` Philip Balister 2011-11-03 2:14 ` Ni Qingliang 0 siblings, 1 reply; 15+ messages in thread From: Philip Balister @ 2011-11-03 1:58 UTC (permalink / raw) To: niqingliang, Patches and discussions about the oe-core layer On 11/02/2011 09:35 PM, Ni Qingliang wrote: > what is "IMO"? "In my opinion" See http://www.internetslang.com/ I'm not suggesting reading the entire thing and using the slang in email though :) Philip > > On Thu, 2011-11-03 at 09:19 +0800, Otavio Salvador wrote: >> On Wed, Nov 2, 2011 at 22:47, Ni Qingliang <niqingliang@insigma.com.cn> wrote: >>> maybe we can do the link in system booting, use the variable "TZ" to >>> create the symlink /etc/localtime, just like archlinux. >>> e.g. providing one script in /etc/rcS.d/ to create the symlink. >> >> This ought to be done by image IMO; so a kind of post rootfs >> generation hook might be use allowing it to be set per-image. >> >> I personally have this exactly use-case here at work. >> >> -- >> Otavio Salvador O.S. Systems >> E-mail: otavio@ossystems.com.br http://www.ossystems.com.br >> Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-11-03 1:58 ` Philip Balister @ 2011-11-03 2:14 ` Ni Qingliang 0 siblings, 0 replies; 15+ messages in thread From: Ni Qingliang @ 2011-11-03 2:14 UTC (permalink / raw) To: Philip Balister; +Cc: Patches and discussions about the oe-core layer thanks! :) On Thu, 2011-11-03 at 09:58 +0800, Philip Balister wrote: > On 11/02/2011 09:35 PM, Ni Qingliang wrote: > > what is "IMO"? > > "In my opinion" > > See http://www.internetslang.com/ > > I'm not suggesting reading the entire thing and using the slang in email > though :) > > Philip > > > > > > On Thu, 2011-11-03 at 09:19 +0800, Otavio Salvador wrote: > >> On Wed, Nov 2, 2011 at 22:47, Ni Qingliang <niqingliang@insigma.com.cn> wrote: > >>> maybe we can do the link in system booting, use the variable "TZ" to > >>> create the symlink /etc/localtime, just like archlinux. > >>> e.g. providing one script in /etc/rcS.d/ to create the symlink. > >> > >> This ought to be done by image IMO; so a kind of post rootfs > >> generation hook might be use allowing it to be set per-image. > >> > >> I personally have this exactly use-case here at work. > >> > >> -- > >> Otavio Salvador O.S. Systems > >> E-mail: otavio@ossystems.com.br http://www.ossystems.com.br > >> Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br > > -- Yi Qingliang niqingliang@insigma.com.cn https://niqingliang2003.wordpress.com ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-11-02 19:15 ` Mark Hatle 2011-11-03 0:47 ` Ni Qingliang @ 2011-11-03 16:20 ` Andrea Adami 1 sibling, 0 replies; 15+ messages in thread From: Andrea Adami @ 2011-11-03 16:20 UTC (permalink / raw) To: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 4479 bytes --] On Wed, Nov 2, 2011 at 8:15 PM, Mark Hatle <mark.hatle@windriver.com> wrote: > On 11/2/11 12:32 PM, Andrea Adami wrote: > > On Mon, Oct 31, 2011 at 1:44 AM, Ni Qingliang < > niqingliang@insigma.com.cn > > <mailto:niqingliang@insigma.com.cn>> wrote: > > > > I'd like the 'system level configuration' solution. > > > > the /etc/localtime/ link can be done when packaging rootfs (using the > > system level configuration). > > > > On Fri, 2011-10-28 at 22:43 +0800, Mark Hatle wrote: > > > Setting the default TZ for the image is something that should be > done in a > > post > > > install script for the tzdata package or something similar. > > > > > > Since the /etc/localtime is usually a copy/hardlink or symlink to > the timezone > > > data we don't want to package it up. Instead we want to perform > the actions > > > that a program running on the target system itself would use to > change the > > timezone. > > > > > > So I think the easiest approach is to add a system level > configuration > > variable > > > (set the default). > > > > > > Then use this variable to populate the configuration file that > specifies the > > > system timezone... and then use the post install process to check > the contents > > > of a text file. > > > > > > Alternatively do this via an initscript -- but for folks w/ > read-only > > > filesystems I'm not sure that will work. > > > > > > --Mark > > > > <cut> > > > > Maybe I misunderstand "system level configuration" but in the meta-oe > recipe we have > > > > DEFAULT_TIMEZONE ?= "Europe/London" > > > > Maybe UTC would be better? > > To me no timezone (which is UTC) is preferable as the system designer can > then > set the timezone, externally to the package(s). > > > Note how the variable is weak thus can be overridden in local.conf. > > > > Secondly, why do it as post-install or at image do_rootfs stage when we > have set > > the variable and are therefore able to provide sane defaults in > do_install? > > If it's done within a do_install, then the file (/etc/timezone) itself gets > placed into the package. If it's in the package, then if/when someone > upgrades > the package from a feed the timezone gets reset to the previous value. > That's a > bug IMHO. > Sure, I overlooked that! > If it's done as a post-install script, then the timezone configuration can > be > evaluated and if one isn't set -- or there is no timezone file -- then we > can > set it to UTC or a similar default timezone.. (the value in the > DEFAULT_TIMEZONE > variable is reasonable in this approach.) > > maybe "Factory" then? See post-install script example: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/timezone-data-2011k.ebuild > > Other points before starting to write a patch: > > -why is the recipe in oe-core doing chown -R root:root ${D} ? > > There was an issue with the way the timezone data was > extracted/constructed that > it was have all of the build system's uid/gid preserved in the copy to the > final > install directory -- so when packaging incorrect usernames and groups were > fed > into the process causing issues. > > A simple chown -R root:root ${D} ensured that all of the timezone data was > owned > by the root user (on the target). > > > -the logic around # libc is removing zoneinfo files from package > > Is it only eglibc? > > Timezone info is updated more often then the system libc. So the zoneinfo > files > are handled externally of the libc. This allows for easier updates over > time.. > (This is my guess, as I'm not familiar with exactly what this comment > refers to.) > > Comments in meta-oe recipe would suggest that apparently only eglibc is removing zoneinfo file. # Only eglibc is removing zoneinfo files from package if [ "${LIBC}"x = "eglibc"x ] ; then cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo fi Being that we need the files on first boot, I'm not against providing 'Factory' settings during image do_rootfs or even in base-files. The settings of timezone and locale (and keyboard) are typically done by user on first boot, at least in graphical environments. Thanks for your comments! Regards Andrea [-- Attachment #2: Type: text/html, Size: 6098 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: how to set time zone 2011-10-28 8:22 ` Andrea Adami 2011-10-28 14:43 ` Mark Hatle @ 2011-10-28 16:15 ` Saul Wold 1 sibling, 0 replies; 15+ messages in thread From: Saul Wold @ 2011-10-28 16:15 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 10/28/2011 10:22 AM, Andrea Adami wrote: > On Fri, Oct 28, 2011 at 9:05 AM, Ni Qingliang > <niqingliang@insigma.com.cn <mailto:niqingliang@insigma.com.cn>> wrote: > > THANKS! > > I still want the native support by oe-core/yocto:-). If no, I will try > by myself. > > > I've asked three or four time the oe-core crow to improve the > recipe...last one: > > On Wed, Oct 19, 2011 at 12:24 AM, Joshua Lock <josh@linux.intel.com > <mailto:josh@linux.intel.com>> wrote: > > Per mailing requests, here are updates to the tzdata and > gst-plugins-good recipes. > > Joshua > > The following changes since commit > 95d0ff5e070c690314ab87665200099a52d37ebf: > > tzdata: updated SRC_URI and update to 2011k (2011-10-18 11:16:58 > -0700) > > > Thanks for the tzdata fix. > Now, we have the same recipes in meta-oe with a slightly different > do_install and packaging: I'm referring to /etc/localtime and > /etc/timezone: which package do provide those in oe-core? > > (We'll remove the tzdata/tzcodes from meta-oe once the recipes are matching) > I would welcome such a patch. Thanks Sau! > Regards > > > > Andrea > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-11-03 16:27 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-10-28 5:41 how to set time zone Ni Qingliang 2011-10-28 6:32 ` Samuel Stirtzel 2011-10-28 7:05 ` Ni Qingliang 2011-10-28 8:22 ` Andrea Adami 2011-10-28 14:43 ` Mark Hatle 2011-10-31 0:44 ` Ni Qingliang 2011-11-02 17:32 ` Andrea Adami 2011-11-02 19:15 ` Mark Hatle 2011-11-03 0:47 ` Ni Qingliang 2011-11-03 1:19 ` Otavio Salvador 2011-11-03 1:35 ` Ni Qingliang 2011-11-03 1:58 ` Philip Balister 2011-11-03 2:14 ` Ni Qingliang 2011-11-03 16:20 ` Andrea Adami 2011-10-28 16:15 ` Saul Wold
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox