mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
Meta: Use SHA-256 verification for downloaded TZDB files
This commit is contained in:
parent
4d65a073b5
commit
3b2c8d0af2
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/3b2c8d0af2 Pull-request: https://github.com/SerenityOS/serenity/pull/24407 Issue: https://github.com/SerenityOS/serenity/issues/24401 Reviewed-by: https://github.com/nico ✅
2 changed files with 9 additions and 6 deletions
|
@ -1,8 +1,9 @@
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)
|
||||
|
||||
set(TZDB_PATH "${SERENITY_CACHE_DIR}/TZDB" CACHE PATH "Download location for TZDB files")
|
||||
set(TZDB_VERSION "2024a")
|
||||
set(TZDB_SHA256 "0d0434459acbd2059a7a8da1f3304a84a86591f6ed69c6248fffa502b6edffe3")
|
||||
|
||||
set(TZDB_VERSION 2024a)
|
||||
set(TZDB_PATH "${SERENITY_CACHE_DIR}/TZDB" CACHE PATH "Download location for TZDB files")
|
||||
set(TZDB_VERSION_FILE "${TZDB_PATH}/version.txt")
|
||||
|
||||
set(TZDB_ZIP_URL "https://data.iana.org/time-zones/releases/tzdata${TZDB_VERSION}.tar.gz")
|
||||
|
@ -46,7 +47,7 @@ if (ENABLE_TIME_ZONE_DATABASE_DOWNLOAD)
|
|||
remove_path_if_version_changed("${TZDB_VERSION}" "${TZDB_VERSION_FILE}" "${TZDB_PATH}")
|
||||
|
||||
if (ENABLE_NETWORK_DOWNLOADS)
|
||||
download_file("${TZDB_ZIP_URL}" "${TZDB_ZIP_PATH}")
|
||||
download_file("${TZDB_ZIP_URL}" "${TZDB_ZIP_PATH}" SHA256 "${TZDB_SHA256}")
|
||||
extract_tzdb_file("${TZDB_AFRICA_SOURCE}" "${TZDB_AFRICA_PATH}")
|
||||
extract_tzdb_file("${TZDB_ANTARCTICA_SOURCE}" "${TZDB_ANTARCTICA_PATH}")
|
||||
extract_tzdb_file("${TZDB_ASIA_SOURCE}" "${TZDB_ASIA_PATH}")
|
||||
|
|
|
@ -11,14 +11,16 @@ declare_args() {
|
|||
|
||||
tzdb_cache = cache_path + "TZDB/"
|
||||
|
||||
tzdb_version = "2024a"
|
||||
|
||||
if (enable_timezone_database_download) {
|
||||
download_file("timezone_database_download") {
|
||||
version = "2024a"
|
||||
url =
|
||||
"https://data.iana.org/time-zones/releases/tzdata" + version + ".tar.gz"
|
||||
version = tzdb_version
|
||||
url = "https://data.iana.org/time-zones/releases/tzdata$version.tar.gz"
|
||||
cache = tzdb_cache
|
||||
output = "tzdb.tar.gz"
|
||||
version_file = "version.txt"
|
||||
sha256 = "0d0434459acbd2059a7a8da1f3304a84a86591f6ed69c6248fffa502b6edffe3"
|
||||
}
|
||||
extract_archive_contents("timezone_database_files") {
|
||||
deps = [ ":timezone_database_download" ]
|
||||
|
|
Loading…
Add table
Reference in a new issue