package/zic: add hash for existing patch
PATCH 1/2 package/zic: add hash for existing patch
From: Christian Hitz <[email protected]>
--- package/zic/zic.hash | 1 + 1 file changed, 1 insertion(+)
package/zic/zic.hash +1 -0
@@ -2,3 +2,4 @@ sha512 fa18bae9c0e7c061bc9d5f5f2eb9967f0e4ddb2baafdee9887fa30cd0c60f4aa6f21eacffb17df0d59d26ff54d08c5dcefa98159309eba497e86443624913a82 tzcode2023c.tar.gz # Locally computed: sha256 0613408568889f5739e5ae252b722a2659c02002839ad970a63dc5e9174b27cf LICENSE +sha256 9e3c665b2cf8ad1eeb3458ec736e644e3d0c86a5e2fa8bcc4f34d72317511958 0001-remove-dependency-check-on-version-file.patch
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/zic: enable installation on target
From: Christian Hitz <[email protected]>
--- package/Config.in | 1 + package/zic/Config.in | 6 ++++++ package/zic/zic.mk | 14 ++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 package/zic/Config.in
package/Config.in +1 -0
@@ -2237,6 +2237,7 @@ endif source "package/uvw/Config.in" source "package/volk/Config.in" source "package/xapian/Config.in" + source "package/zic/Config.in" endmenu menu "Security"
package/zic/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_ZIC + bool "zic" + help + timezone information compiler (zic) + + https://www.iana.org/time-zones
package/zic/zic.mk +14 -0
@@ -10,6 +10,19 @@ ZIC_SITE = https://www.iana.org/time-zones/repository/releases ZIC_STRIP_COMPONENTS = 0 ZIC_LICENSE = Public domain ZIC_LICENSE_FILES = LICENSE +ZIC_INSTALL_STAGING = YES + +define ZIC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(@D) zic +endef + +define ZIC_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/tzfile.h $(TARGET_DIR)/usr/include/tzfile.h +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) -C $(@D) zic
@@ -20,6 +33,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
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/zic: enable installation on target
Hello Christian,
Quoted 3 lines · On Wed, 28 Feb 2024 15:56:41 +0100 Christian Hitz via buildroot…
From: Christian Hitz <[email protected]>
Signed-off-by Christian Hitz <[email protected]>
Thanks, but for a patch like this, we definitely need a non-empty commit log. Why do you need zic on the target, what is the use-case?
package/zic/Config.in line 3
Quoted 9 lines
package/zic/Config.in new file +3
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_ZIC + bool "zic" + help
No dependency on toolchain-specific features? Did you test this package with ./utils/test-pkg ?
package/zic/zic.mk ZIC_SITE = https://www.iana.org/time-zones/repository/releases · line 16
Quoted 12 lines
package/zic/zic.mk +4
-0@@ -10,6 +10,19 @@ ZIC_SITE = https://www.iana.org/time-zones/repository/releases ZIC_STRIP_COMPONENTS = 0 ZIC_LICENSE = Public domain ZIC_LICENSE_FILES = LICENSE +ZIC_INSTALL_STAGING = YES + +define ZIC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(@D) zic
Can we use $(TARGET_CONFIGURE_OPTS) instead of CC="$(TARGET_CC)" ?
package/zic/zic.mk ZIC_SITE = https://www.iana.org/time-zones/repository/releases · line 20
Quoted 2 lines
package/zic/zic.mk +2
-0+define ZIC_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/tzfile.h $(TARGET_DIR)/usr/include/tzfile.h
So just the header file is needed, no library is installed?
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/zic: enable installation on target
Hello Thomas
Am 2024-03-26 15:44, schrieb Thomas Petazzoni:
Quoted 11 lines
Hello Christian,
Quoted 3 lines · On Wed, 28 Feb 2024 15:56:41 +0100 Christian Hitz via buildroot…
From: Christian Hitz <[email protected]>
Signed-off-by Christian Hitz <[email protected]>Thanks, but for a patch like this, we definitely need a non-empty commit log. Why do you need zic on the target, what is the use-case?
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.
Quoted 13 lines
package/zic/Config.in line 3
Quoted 10 lines
package/zic/Config.in new file +3
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_ZIC + bool "zic" + helpNo dependency on toolchain-specific features? Did you test this package with ./utils/test-pkg ?
Yes, ./utils/test-pkg -a is successful.
Quoted 16 lines
Quoted 10 lines
package/zic/zic.mk +0
-0@@ -10,6 +10,19 @@ ZIC_SITE =https://www.iana.org/time-zones/repository/releases
ZIC_STRIP_COMPONENTS= 0
ZIC_LICENSE= Public domain
ZIC_LICENSE_FILES= LICENSEpackage/zic/zic.mk ZIC_SITE = https://www.iana.org/time-zones/repository/releases · line 16
Quoted 4 lines
package/zic/zic.mk +4
-0+ZIC_INSTALL_STAGING = YES + +define ZIC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(@D) zicCan we use $(TARGET_CONFIGURE_OPTS) instead of CC="$(TARGET_CC)" ?
Yes, this works.
Quoted 6 lines
Quoted 4 lines
package/zic/zic.mk +2
-0+define ZIC_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/tzfile.h$(TARGET_DIR)/usr/include/tzfile.h
So just the header file is needed, no library is installed?
Actually, this is not required at all. I'll drop it in v2.
Thanks for the review. I'll update the patch and will send a v2.
Regards,
Christian
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/zic: enable installation on target
Hello Christian,
Quoted 12 lines · On Tue, 26 Mar 2024 17:03:20 +0100 [email protected] wrote:
Quoted 2 lines
Thanks, but for a patch like this, we definitely need a non-empty commit log. Why do you need zic on the target, what is the use-case?
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 thezictool on target.
Thanks for the explanation. I'm not too familiar with time zone stuff (or in fact, I did have a look a long time ago, but I forgot the details of how it works), bu your explanation seems to make sense :-)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
(quoted diff) +2
-0+define ZIC_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/tzfile.h$(TARGET_DIR)/usr/include/tzfile.h
So just the header file is needed, no library is installed?
Actually, this is not required at all. I'll drop it in v2.
OK, then you can drop ZIC_INSTALL_STAGING = YES as well.
Quoted 1 line
Thanks for the review. I'll update the patch and will send a v2.
Perfect, thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/zic: enable installation on target
In reply to Christian Hitz via buildrootFrom: Christian Hitz <[email protected]>
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.
---
Changes v1 -> v2:
- dropped adding hash for patch
- dropped installing header file to staging
- added rationale to commit message
--- 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
package/Config.in +1 -0
@@ -2239,6 +2239,7 @@ endif source "package/uvw/Config.in" source "package/volk/Config.in" source "package/xapian/Config.in" + source "package/zic/Config.in" endmenu menu "Security"
package/zic/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_ZIC + bool "zic" + help + timezone information compiler (zic) + + https://www.iana.org/time-zones
package/zic/zic.mk +9 -0
@@ -11,6 +11,14 @@ ZIC_STRIP_COMPONENTS = 0 ZIC_LICENSE = Public domain ZIC_LICENSE_FILES = LICENSE +define ZIC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -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) -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
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 1/1 package/zic: enable installation on target
From: Christian Hitz <[email protected]>
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.
---
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/[email protected]/
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
package/Config.in +1 -0
@@ -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"
package/zic/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_ZIC + bool "zic" + help + timezone information compiler (zic) + + https://www.iana.org/time-zones
package/zic/zic.mk +9 -0
@@ -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
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Christian,
Quoted 3 lines · On Wed, 28 Feb 2024 15:56:40 +0100 Christian Hitz via buildroot…
From: Christian Hitz <[email protected]>
Signed-off-by Christian Hitz <[email protected]>
Thanks for the patch. However, could you explain why you think this is needed? We only have hashes for files downloaded by Buildroot. This patch is part of Buildroot itself, and we don't verify hashes of patches part of Buildroot itself.
Am I missing something obvious here? I don't even think we have some logic to check the hashes of patches stored in Buildroot itself.
Could you provide more details on what you're trying to achieve?
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas
Am 2024-03-26 15:43, schrieb Thomas Petazzoni:
Quoted 14 lines
Hello Christian,
Quoted 3 lines · On Wed, 28 Feb 2024 15:56:40 +0100 Christian Hitz via buildroot…
From: Christian Hitz <[email protected]>
Signed-off-by Christian Hitz <[email protected]>Thanks for the patch. However, could you explain why you think this is needed? We only have hashes for files downloaded by Buildroot. This patch is part of Buildroot itself, and we don't verify hashes of patches part of Buildroot itself.
Quoted 4 lines
Am I missing something obvious here? I don't even think we have some logic to check the hashes of patches stored in Buildroot itself.
Could you provide more details on what you're trying to achieve?
I believe to remember, that, at the time, I had issues with legal-info and this hash. However, re-testing shows that it's really not needed.
I'll drop this part in v2.
Thanks and Regards,
Christian
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot