From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 08 Dec 2021 08:40:30 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1murZ0-0003Lx-OJ for lore@lore.pengutronix.de; Wed, 08 Dec 2021 08:40:30 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1murZ0-0000Np-G6; Wed, 08 Dec 2021 08:40:30 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1murYr-0000NR-3o; Wed, 08 Dec 2021 08:40:21 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1murYq-00025A-K6; Wed, 08 Dec 2021 08:40:20 +0100 Date: Wed, 8 Dec 2021 08:40:20 +0100 From: Michael Olbrich To: Gavin Schenk Message-ID: <20211208074020.GD15196@pengutronix.de> Mail-Followup-To: Gavin Schenk , ptxdist@pengutronix.de References: <20211203152337.82758-1-g.schenk@eckelmann.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211203152337.82758-1-g.schenk@eckelmann.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 08:39:27 up 293 days, 11:03, 134 users, load average: 0.00, 0.06, 0.07 User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] [PATCH v2] timezone: Support for zonetab1970 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Fri, Dec 03, 2021 at 04:23:37PM +0100, Gavin Schenk wrote: > 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. > > Signed-off-by: Gavin Schenk > --- > Changes since v1: > - Drop menuentry TIMEZONE_ZONETAB_1970 and install file always > - Use suggested algorithm that is more compact and forks less processes > ( Commented lines are not removed any more ) > > One idea for removing the commented lines is: > @grep "\($$(find TIMEZONE_PKGDIR)/usr/share/zoneinfo -type f -printf '%P\|')34987qiruhqwerkjb43kn5b3j4klrhqwekljrh\)" > > Maybe not important, if looking on the file size. With Zone Europe enabled > zone1970.tab contains 3557 bytes. With all zones enabled it increases to > 17593 bytes. > > I tested this with all timezones enabled and the long expression > does not exceed limits of shell. > > --- > rules/host-tz-database.make | 2 +- > rules/timezone.make | 7 ++++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > > 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.make b/rules/timezone.make > index c1fd3fbc3..68ec669c0 100644 > --- a/rules/timezone.make > +++ b/rules/timezone.make > @@ -87,7 +87,10 @@ $(STATEDIR)/timezone.install: > @for target in $(TIMEZONE-y); do \ > $(call add_zoneinfo, $$target, $(TIMEZONE_PKGDIR)/usr/share, $(PTXDIST_SYSROOT_HOST)/usr); \ > done > - @$(call touch) This should not be removed. Michael > +# Fix entries in zonetab to match the selected PTXCONF_TIMEZONE_* options. > + @grep "\($$(find $(TIMEZONE_PKGDIR)/usr/share/zoneinfo -type f -printf '%P\|')#\)" \ > + $(PTXDIST_SYSROOT_HOST)/usr/share/zoneinfo/zone1970.tab > \ > + $(TIMEZONE_PKGDIR)/usr/share/zoneinfo/zone1970.tab > > # ---------------------------------------------------------------------------- > # Target-Install > @@ -116,6 +119,8 @@ ifneq ($(call remove_quotes,$(PTXCONF_TIMEZONE_LOCALTIME)),) > /etc/localtime) > endif > > + $(call install_copy, timezone, 0, 0, 0644, -, /usr/share/zoneinfo/zone1970.tab) Don't for get the '@' at the beginning of the line. Michael > + > @$(call install_finish, timezone) > > @$(call touch) > -- > 2.30.2 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de