1efb7b9618
Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/1019385940 FAIL: test_run (tests.core.test_timezone.TestGlibcNonDefaultLimitedTimezone) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builds/buildroot.org/buildroot/support/testing/tests/core/test_timezone.py", line 66, in test_run self.assertEqual(tz[0].strip(), "EST") AssertionError: '' != 'EST' Commit7868289fd5
(package/zic: bump version to 2020f) bumped the zic version to 2020f, which changed the default output format from the classic "fat" format to the new "slim" format:6ba6f2117b
The slim format is unfortunately not supported by glibc < 2.28 or uClibc, so explicitly request the classic "fat" format. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
67 lines
2.0 KiB
Makefile
67 lines
2.0 KiB
Makefile
################################################################################
|
|
#
|
|
# tzdata
|
|
#
|
|
################################################################################
|
|
|
|
TZDATA_VERSION = 2020f
|
|
TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz
|
|
TZDATA_SITE = https://www.iana.org/time-zones/repository/releases
|
|
TZDATA_STRIP_COMPONENTS = 0
|
|
TZDATA_DEPENDENCIES = host-tzdata
|
|
HOST_TZDATA_DEPENDENCIES = host-zic
|
|
TZDATA_LICENSE = Public domain
|
|
TZDATA_LICENSE_FILES = LICENSE
|
|
|
|
# Take care when re-ordering this list since this might break zone
|
|
# dependencies
|
|
TZDATA_DEFAULT_ZONELIST = \
|
|
africa antarctica asia australasia europe northamerica \
|
|
southamerica etcetera backward factory
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default)
|
|
TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST)
|
|
else
|
|
TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST))
|
|
endif
|
|
|
|
TZDATA_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME))
|
|
ifneq ($(TZDATA_LOCALTIME),)
|
|
define TZDATA_SET_LOCALTIME
|
|
if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/$(TZDATA_LOCALTIME) ]; then \
|
|
printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \
|
|
"$(TZDATA_LOCALTIME)"; \
|
|
exit 1; \
|
|
fi
|
|
ln -sf ../usr/share/zoneinfo/$(TZDATA_LOCALTIME) $(TARGET_DIR)/etc/localtime
|
|
echo "$(TZDATA_LOCALTIME)" >$(TARGET_DIR)/etc/timezone
|
|
endef
|
|
endif
|
|
|
|
define TZDATA_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/zoneinfo
|
|
cp -a $(HOST_DIR)/share/zoneinfo/* $(TARGET_DIR)/usr/share/zoneinfo
|
|
cd $(TARGET_DIR)/usr/share/zoneinfo; \
|
|
for zone in posix/*; do \
|
|
ln -sfn "$${zone}" "$${zone##*/}"; \
|
|
done
|
|
$(TZDATA_SET_LOCALTIME)
|
|
endef
|
|
|
|
define HOST_TZDATA_BUILD_CMDS
|
|
(cd $(@D); \
|
|
for zone in $(TZDATA_ZONELIST); do \
|
|
$(ZIC) -b fat -d _output/posix $$zone || exit 1; \
|
|
$(ZIC) -b fat -d _output/right -L leapseconds $$zone || exit 1; \
|
|
done; \
|
|
)
|
|
endef
|
|
|
|
define HOST_TZDATA_INSTALL_CMDS
|
|
$(INSTALL) -d -m 0755 $(HOST_DIR)/share/zoneinfo
|
|
cp -a $(@D)/_output/* $(@D)/*.tab $(HOST_DIR)/share/zoneinfo
|
|
endef
|
|
|
|
$(eval $(generic-package))
|
|
$(eval $(host-generic-package))
|