From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] tzdata_2011n: provide pkg_postinst and timezone defaults
Date: Mon, 23 Jan 2012 10:49:13 -0600 [thread overview]
Message-ID: <4F1D8F89.2050806@windriver.com> (raw)
In-Reply-To: <CAAQYJAupcHBBUNQWGyoCXV1OMcSpHH0UT0AzJWCsz5yMCoA_bA@mail.gmail.com>
On 1/23/12 8:21 AM, Andrea Adami wrote:
> On Sun, Jan 15, 2012 at 12:22 PM, Koen Kooi<koen@dominion.thruhere.net> wrote:
>>
>> Op 15 jan. 2012, om 12:17 heeft Andrea Adami het volgende geschreven:
>>
>>> On Sat, Jan 14, 2012 at 4:10 PM, Koen Kooi<koen@dominion.thruhere.net> wrote:
>>>>
>>>> Op 14 jan. 2012, om 14:07 heeft Andrea Adami het volgende geschreven:
>>>>
>>>>> * Take the extra bits in do_install from meta-openembedded
>>>>> * and add pkg_postinst script (adapted from Gentoo).
>>>>> * Default to 'Universal' timezone, present in the base package
>>>>> * and allow override using DEFAULT_TIMEZONE variable.
>>>>> * /etc/localtime and /etc/timezone are purposedly not packaged.
>>>>> * Bump PR
>>>>>
>>>>> Signed-off-by: Andrea Adami<andrea.adami@gmail.com>
>>>>> ---
>>>>> meta/recipes-extended/tzdata/tzdata_2011n.bb | 55 +++++++++++++++++++++++++-
>>>>> 1 files changed, 53 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/meta/recipes-extended/tzdata/tzdata_2011n.bb b/meta/recipes-extended/tzdata/tzdata_2011n.bb
>>>>> index de9281a..862a196 100644
>>>>> --- a/meta/recipes-extended/tzdata/tzdata_2011n.bb
>>>>> +++ b/meta/recipes-extended/tzdata/tzdata_2011n.bb
>>>>> @@ -5,7 +5,7 @@ LICENSE = "PD"
>>>>> LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234"
>>>>> DEPENDS = "tzcode-native"
>>>>>
>>>>> -PR = "r0"
>>>>> +PR = "r1"
>>>>>
>>>>> RCONFLICTS= "timezones timezone-africa timezone-america timezone-antarctica \
>>>>> timezone-arctic timezone-asia timezone-atlantic \
>>>>> @@ -19,6 +19,8 @@ SRC_URI[tzdata.sha256sum] = "a343e542486b2b8ebdeca474eed79f1c04f69420ca943c2b9bd
>>>>>
>>>>> S = "${WORKDIR}"
>>>>>
>>>>> +DEFAULT_TIMEZONE ?= "Universal"
>>>>> +
>>>>> TZONES= "africa antarctica asia australasia europe northamerica southamerica \
>>>>> factory solar87 solar88 solar89 etcetera backward systemv \
>>>>> "
>>>>> @@ -41,7 +43,56 @@ do_install () {
>>>>> # libc is removing zoneinfo files from package
>>>>> cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
>>>>> cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
>>>>> - chown -R root:root ${D}
>>>>> +
>>>>> + # Install defaults
>>>>> + install -d ${D}${sysconfdir}
>>>>> + echo ${DEFAULT_TIMEZONE}> ${D}${sysconfdir}/timezone
>>>>> + cp -pP ${S}/${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
>>>>
>>>> Shouldn't that be an 'ln -sf' instead of a 'cp'?
>>>>
>>> No, I don't think so.First reason is /usr may not be mounted, maybe
>>> living on another device..
>>> See first Google link about this:
>>> http://www.redhat.com/archives/rhl-devel-list/2006-April/msg00017.html
>>> Then, as you see, the postinst takes care of both cases.
>>
>> That only applies to non-UTC times in RTC, which we don't use. And furthermore, no machine has /usr on a seperate partition since support for that is broken.
>
> I try to bump the thread before the sources get renamed ;)
>
> About separation of exec_prefix, pls see
>
> http://lists.linuxtogo.org/pipermail/openembedded-core/2012-January/015672.html
> http://lists.linuxtogo.org/pipermail/openembedded-core/2012-January/015771.html
>
> So, what is the position to take? Symlink or copy?
On other systems I've used.. the rule has been: hardlink (same disk) or copy.
Since the symlink would point into /usr and that should usually be avoided (as
mentioned above).
I thought there used to be a tool that would do the hardlink, if possible and
then copy if not.. but I'm not sure if that is even reasonable with our image
creation... (so copy is likely best answer then)
--Mark
> 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
next prev parent reply other threads:[~2012-01-23 16:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-14 13:07 [PATCH] tzdata_2011n: provide pkg_postinst and timezone defaults Andrea Adami
2012-01-14 15:10 ` Koen Kooi
2012-01-14 15:54 ` Eric Bénard
2012-01-14 19:16 ` Koen Kooi
2012-01-15 11:17 ` Andrea Adami
2012-01-15 11:22 ` Koen Kooi
2012-01-23 14:21 ` Andrea Adami
2012-01-23 16:49 ` Mark Hatle [this message]
2012-01-27 8:56 ` Andrea Adami
2012-01-27 9:59 ` Richard Purdie
2012-01-28 7:57 ` [PATCH v2] " Andrea Adami
2012-01-28 8:26 ` Koen Kooi
2012-02-01 15:24 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F1D8F89.2050806@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox