From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@buildroot.org
Cc: Christian Hitz <christian@klarinett.li>,
Christian Hitz <christian.hitz@bbv.ch>,
Martin Bark <martin@barkynet.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v3] package/zic: enable installation on target
Date: Mon, 23 Nov 2026 20:58:38 +0100 [thread overview]
Message-ID: <20261123195838.3045677-1-angelo.compagnucci@gmail.com> (raw)
In-Reply-To: <20240326163750.2211753-1-christian@klarinett.li>
From: Christian Hitz <christian.hitz@bbv.ch>
When we configure a time zone on our device's GUI we use the standard
time zones. This gives us the usual benefits e.g. automatic daylight
saving time switching.
We also need to support an API that wants to set the "time zone" by
specifying the offset in minutes from GMT. The given information
is not enough to reliably selecting one of the existing time zones.
Instead, when the time zone is set over this API we dynamically create
and configure a "Custom" time zone with the given offset. For this
we use the `zic` tool on target.
Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Tested-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v2 -> v3:
- pass TARGET_CONFIGURE_OPTS as make arguments, like the host build
since 9139159d39 ("package/zic: fix host compile (needs
CC/HOST_CONFIGURE_OPTS set)")
- rebase on master
Changes v1 -> v2:
- dropped adding hash for patch
- dropped installing header file to staging
- added rationale to commit message
Supersedes v2: https://patchwork.buildroot.org/project/buildroot/patch/20240326163750.2211753-1-christian@klarinett.li/
package/Config.in | 1 +
package/zic/Config.in | 6 ++++++
package/zic/zic.mk | 9 +++++++++
3 files changed, 16 insertions(+)
create mode 100644 package/zic/Config.in
diff --git a/package/Config.in b/package/Config.in
index 49659b007e..dc683e7486 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2327,6 +2327,7 @@ endif
source "package/volk/Config.in"
source "package/xapian/Config.in"
source "package/xnnpack/Config.in"
+ source "package/zic/Config.in"
endmenu
menu "Security"
diff --git a/package/zic/Config.in b/package/zic/Config.in
new file mode 100644
index 0000000000..11a8c99a66
--- /dev/null
+++ b/package/zic/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_ZIC
+ bool "zic"
+ help
+ timezone information compiler (zic)
+
+ https://www.iana.org/time-zones
diff --git a/package/zic/zic.mk b/package/zic/zic.mk
index 43e74e64c8..99d2080ac2 100644
--- a/package/zic/zic.mk
+++ b/package/zic/zic.mk
@@ -11,6 +11,14 @@ ZIC_STRIP_COMPONENTS = 0
ZIC_LICENSE = Public domain
ZIC_LICENSE_FILES = LICENSE
+define ZIC_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) zic
+endef
+
+define ZIC_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 755 $(@D)/zic $(TARGET_DIR)/usr/sbin/zic
+endef
+
define HOST_ZIC_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) zic
endef
@@ -20,6 +28,7 @@ define HOST_ZIC_INSTALL_CMDS
$(INSTALL) -D -m 644 $(@D)/tzfile.h $(HOST_DIR)/include/tzfile.h
endef
+$(eval $(generic-package))
$(eval $(host-generic-package))
ZIC = $(HOST_DIR)/sbin/zic
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-11-23 19:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 14:56 [Buildroot] [PATCH 1/2] package/zic: add hash for existing patch Christian Hitz via buildroot
2024-02-28 14:56 ` [Buildroot] [PATCH 2/2] package/zic: enable installation on target Christian Hitz via buildroot
2024-03-26 14:44 ` Thomas Petazzoni via buildroot
2024-03-26 16:03 ` christian--- via buildroot
2024-03-26 16:10 ` Thomas Petazzoni via buildroot
2024-03-26 16:37 ` [Buildroot] [PATCH v2] " Christian Hitz via buildroot
2026-11-23 19:58 ` Angelo Compagnucci [this message]
2026-11-27 18:48 ` [Buildroot] [PATCH v3] " Marcus Hoffmann via buildroot
2024-03-26 14:43 ` [Buildroot] [PATCH 1/2] package/zic: add hash for existing patch Thomas Petazzoni via buildroot
2024-03-26 16:06 ` christian--- via buildroot
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=20261123195838.3045677-1-angelo.compagnucci@gmail.com \
--to=angelo.compagnucci@gmail.com \
--cc=buildroot@buildroot.org \
--cc=christian.hitz@bbv.ch \
--cc=christian@klarinett.li \
--cc=martin@barkynet.com \
--cc=thomas.petazzoni@bootlin.com \
/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