* [Buildroot] [PATCH 1/2] package/zic: add hash for existing patch @ 2024-02-28 14:56 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:43 ` [Buildroot] [PATCH 1/2] package/zic: add hash for existing patch Thomas Petazzoni via buildroot 0 siblings, 2 replies; 8+ messages in thread From: Christian Hitz via buildroot @ 2024-02-28 14:56 UTC (permalink / raw) To: buildroot; +Cc: Christian Hitz, Martin Bark From: Christian Hitz <christian.hitz@bbv.ch> Signed-off-by: Christian Hitz <christian.hitz@bbv.ch> --- package/zic/zic.hash | 1 + 1 file changed, 1 insertion(+) diff --git a/package/zic/zic.hash b/package/zic/zic.hash index a2720a27ba..f2a48b1d2e 100644 --- a/package/zic/zic.hash +++ b/package/zic/zic.hash @@ -2,3 +2,4 @@ sha512 fa18bae9c0e7c061bc9d5f5f2eb9967f0e4ddb2baafdee9887fa30cd0c60f4aa6f21eacffb17df0d59d26ff54d08c5dcefa98159309eba497e86443624913a82 tzcode2023c.tar.gz # Locally computed: sha256 0613408568889f5739e5ae252b722a2659c02002839ad970a63dc5e9174b27cf LICENSE +sha256 9e3c665b2cf8ad1eeb3458ec736e644e3d0c86a5e2fa8bcc4f34d72317511958 0001-remove-dependency-check-on-version-file.patch -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] package/zic: enable installation on target 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 ` Christian Hitz via buildroot 2024-03-26 14:44 ` Thomas Petazzoni via buildroot 2024-03-26 16:37 ` [Buildroot] [PATCH v2] " Christian Hitz via buildroot 2024-03-26 14:43 ` [Buildroot] [PATCH 1/2] package/zic: add hash for existing patch Thomas Petazzoni via buildroot 1 sibling, 2 replies; 8+ messages in thread From: Christian Hitz via buildroot @ 2024-02-28 14:56 UTC (permalink / raw) To: buildroot; +Cc: Christian Hitz, Martin Bark, Thomas Petazzoni From: Christian Hitz <christian.hitz@bbv.ch> Signed-off-by: Christian Hitz <christian.hitz@bbv.ch> --- 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 diff --git a/package/Config.in b/package/Config.in index bf0fe078b9..909b716f16 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" 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 a915f6d256..12bb9e9943 100644 --- a/package/zic/zic.mk +++ b/package/zic/zic.mk @@ -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 -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/zic: enable installation on target 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:37 ` [Buildroot] [PATCH v2] " Christian Hitz via buildroot 1 sibling, 1 reply; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-03-26 14:44 UTC (permalink / raw) To: Christian Hitz via buildroot; +Cc: Christian Hitz, Christian Hitz, Martin Bark Hello Christian, On Wed, 28 Feb 2024 15:56:41 +0100 Christian Hitz via buildroot <buildroot@buildroot.org> wrote: > From: Christian Hitz <christian.hitz@bbv.ch> > > Signed-off-by: Christian Hitz <christian.hitz@bbv.ch> 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? > 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 No dependency on toolchain-specific features? Did you test this package with ./utils/test-pkg ? > diff --git a/package/zic/zic.mk b/package/zic/zic.mk > index a915f6d256..12bb9e9943 100644 > --- a/package/zic/zic.mk > +++ b/package/zic/zic.mk > @@ -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)" ? > +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 -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/zic: enable installation on target 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 0 siblings, 1 reply; 8+ messages in thread From: christian--- via buildroot @ 2024-03-26 16:03 UTC (permalink / raw) To: Thomas Petazzoni Cc: Christian Hitz, Martin Bark, Christian Hitz via buildroot Hello Thomas Am 2024-03-26 15:44, schrieb Thomas Petazzoni: > Hello Christian, > > On Wed, 28 Feb 2024 15:56:41 +0100 > Christian Hitz via buildroot <buildroot@buildroot.org> wrote: > >> From: Christian Hitz <christian.hitz@bbv.ch> >> >> Signed-off-by: Christian Hitz <christian.hitz@bbv.ch> > > 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. > >> 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 > > No dependency on toolchain-specific features? Did you test this package > with ./utils/test-pkg ? Yes, ./utils/test-pkg -a is successful. > >> diff --git a/package/zic/zic.mk b/package/zic/zic.mk >> index a915f6d256..12bb9e9943 100644 >> --- a/package/zic/zic.mk >> +++ b/package/zic/zic.mk >> @@ -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)" ? Yes, this works. > >> +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 buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/zic: enable installation on target 2024-03-26 16:03 ` christian--- via buildroot @ 2024-03-26 16:10 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-03-26 16:10 UTC (permalink / raw) To: christian; +Cc: Christian Hitz, Martin Bark, Christian Hitz via buildroot Hello Christian, On Tue, 26 Mar 2024 17:03:20 +0100 christian@klarinett.li wrote: > > 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. 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 :-) > >> +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. > Thanks for the review. I'll update the patch and will send a v2. Perfect, thanks! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH v2] package/zic: enable installation on target 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:37 ` Christian Hitz via buildroot 1 sibling, 0 replies; 8+ messages in thread From: Christian Hitz via buildroot @ 2024-03-26 16:37 UTC (permalink / raw) To: buildroot; +Cc: Christian Hitz, Martin Bark, Thomas Petazzoni 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> --- 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 diff --git a/package/Config.in b/package/Config.in index 410fe0f493..3963282aab 100644 --- a/package/Config.in +++ b/package/Config.in @@ -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" 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 95fa1eaa96..d116c5b773 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_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 -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/zic: add hash for existing patch 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:43 ` Thomas Petazzoni via buildroot 2024-03-26 16:06 ` christian--- via buildroot 1 sibling, 1 reply; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-03-26 14:43 UTC (permalink / raw) To: Christian Hitz via buildroot; +Cc: Christian Hitz, Christian Hitz, Martin Bark Hello Christian, On Wed, 28 Feb 2024 15:56:40 +0100 Christian Hitz via buildroot <buildroot@buildroot.org> wrote: > From: Christian Hitz <christian.hitz@bbv.ch> > > Signed-off-by: Christian Hitz <christian.hitz@bbv.ch> 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 -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/zic: add hash for existing patch 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 0 siblings, 0 replies; 8+ messages in thread From: christian--- via buildroot @ 2024-03-26 16:06 UTC (permalink / raw) To: Thomas Petazzoni Cc: Christian Hitz, Martin Bark, Christian Hitz via buildroot Hello Thomas Am 2024-03-26 15:43, schrieb Thomas Petazzoni: > Hello Christian, > > On Wed, 28 Feb 2024 15:56:40 +0100 > Christian Hitz via buildroot <buildroot@buildroot.org> wrote: > >> From: Christian Hitz <christian.hitz@bbv.ch> >> >> Signed-off-by: Christian Hitz <christian.hitz@bbv.ch> > > 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? 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 buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-26 16:38 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox