mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Denis Osterland-Heim <denis.osterland@diehl.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] [PATCH 2/2] timezone: Support for zonetab1970
Date: Tue, 2 Nov 2021 05:56:54 +0000	[thread overview]
Message-ID: <532056888e9249b9926407fe40c4879965ff1805.camel@diehl.com> (raw)
In-Reply-To: <20211101113848.145063-3-g.schenk@eckelmann.de>

Hi,

Am Montag, den 01.11.2021, 12:38 +0100 schrieb Gavin Schenk:
> zonetab1970 contains a table where each row stands for a timezone where
> civil timestamps have agreed since 1970.
>
> zonetab1970 is used by systemd in the timedatectl list-timezones
> command that was broken without this data.
>
> zonetab1970 is intended to be delivered with the complete data set from
> tzdata package. Since PTXDIST offers the option to deliver timezones
> only partially, the solution is to correct the file during installation.
> Deselected timezone entries are removed from the file during INSTALL
> step.
>
> So save some more space, the comments in this file are also stripped.
>
> Signed-off-by: Gavin Schenk <g.schenk@eckelmann.de>
> ---
>  rules/host-tz-database.make | 2 +-
>  rules/timezone.in           | 9 +++++++++
>  rules/timezone.make         | 6 ++++++
>  3 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/rules/host-tz-database.make b/rules/host-tz-database.make
> index fe4d36467..006060496 100644
> --- a/rules/host-tz-database.make
> +++ b/rules/host-tz-database.make
> @@ -67,6 +67,6 @@ HOST_TZ_DATABASE_CONF_TOOL:= NO
>  HOST_TZ_DATABASE_MAKE_OPT:= \
>  zic TZDIR=/usr/share/zoneinfo CFLAGS=-DSTD_INSPIRED
>  HOST_TZ_DATABASE_INSTALL_OPT:= \
> -posix_only TZDIR=/usr/share/zoneinfo
> +REDO=posix_only TZDIR=/usr/share/zoneinfo install
>
>  # vim: syntax=make
> diff --git a/rules/timezone.in b/rules/timezone.in
> index ae26de02b..d351ac472 100644
> --- a/rules/timezone.in
> +++ b/rules/timezone.in
> @@ -252,4 +252,13 @@ config TIMEZONE_ZULU
>  bool
>  prompt "Zulu"
>
> +config TIMEZONE_ZONETAB_1970
> +bool
> +prompt "zone1970.tab"
I think `default y if SYSTEMD_TIMEDATE` would be useful here.

Regards Denis

> +help
> +   install zone1970.tab
> +
> +   This file is used by systemd's timedatectl to determine the available time
> +   zones.
> +
>  endif
> diff --git a/rules/timezone.make b/rules/timezone.make
> index c1fd3fbc3..2b3c1fb36 100644
> --- a/rules/timezone.make
> +++ b/rules/timezone.make
> @@ -87,6 +87,8 @@ $(STATEDIR)/timezone.install:
>  @for target in $(TIMEZONE-y); do \
>  $(call add_zoneinfo, $$target, $(TIMEZONE_PKGDIR)/usr/share, $(PTXDIST_SYSROOT_HOST)/usr); \
>  done
> +# Fix entries in zonetab to match the selected PTXCONF_TIMEZONE_* options.
> +@awk "\$$0 ~ /^#/ { next } {if (system(\"test -f '$(TIMEZONE_PKGDIR)/usr/share/zoneinfo/\" \$$3 \"'\") == 0) { print } }" $(PTXDIST_SYSROOT_HOST)/usr/share/zoneinfo/zone1970.tab >
> $(TIMEZONE_PKGDIR)/usr/share/zoneinfo/zone1970.tab
>  @$(call touch)
>
>  # ----------------------------------------------------------------------------
> @@ -116,6 +118,10 @@ ifneq ($(call remove_quotes,$(PTXCONF_TIMEZONE_LOCALTIME)),)
>  /etc/localtime)
>  endif
>
> +ifdef PTXCONF_TIMEZONE_ZONETAB_1970
> +$(call install_copy, timezone, 0, 0, 0644, -, /usr/share/zoneinfo/zone1970.tab)
> +endif
> +
>  @$(call install_finish, timezone)
>
>  @$(call touch)
Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315

________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.

- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter:

https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.

- For general information on data protection and your respective rights please visit:

https://www.diehl.com/group/en/transparency-and-information-obligations/


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

  reply	other threads:[~2021-11-02  5:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 11:38 [ptxdist] [PATCH 0/2] Using systemd/timedatectl to handle timedate Gavin Schenk
2021-11-01 11:38 ` [ptxdist] [PATCH 1/2] host-tz-database: Version bump 2020d -> 2021e Gavin Schenk
2021-11-01 12:46   ` Alexander Dahl
2021-12-17 14:59     ` Alexander Dahl
2021-12-18  7:35       ` [ptxdist] [PATCH v2 " Gavin Schenk
2021-12-18  7:42   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-11-01 11:38 ` [ptxdist] [PATCH 2/2] timezone: Support for zonetab1970 Gavin Schenk
2021-11-02  5:56   ` Denis Osterland-Heim [this message]
2021-11-02  8:34     ` Gavin Schenk
2021-11-22 11:32       ` Gavin Schenk
2021-11-25 15:52   ` Michael Olbrich
2021-12-03 15:23     ` [ptxdist] [PATCH v2] " Gavin Schenk
2021-12-08  7:40       ` Michael Olbrich
2021-12-15 13:50         ` [ptxdist] [PATCH v3] " Gavin Schenk
2021-12-17 13:27           ` [ptxdist] [APPLIED] " Michael Olbrich

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=532056888e9249b9926407fe40c4879965ff1805.camel@diehl.com \
    --to=denis.osterland@diehl.com \
    --cc=ptxdist@pengutronix.de \
    /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