From a0dfed9fa6925246df3df0cfe90d6e70830debeb Mon Sep 17 00:00:00 2001 From: Aapo Talvensaari Date: Thu, 30 May 2024 17:18:13 +0300 Subject: [PATCH] chore(deps): add (and bump) cross deps versions to .requirements ### Summary The cross deps versions placed directly to repective dep `repositories.bzl`. This commit moves the versions and SHA256 digests to `.requirerements`. It also bumps version of `libzlib` from `1.2.13` to `1.3.1`, and `libxcrypt` from `4.4.27` to `4.4.36`. Signed-off-by: Aapo Talvensaari --- .requirements | 7 +++++++ build/cross_deps/libxcrypt/repositories.bzl | 9 ++++++--- build/cross_deps/libyaml/repositories.bzl | 9 ++++++--- build/cross_deps/zlib/repositories.bzl | 11 +++++++---- changelog/unreleased/kong/bump-libxcrypt.yml | 3 +++ changelog/unreleased/kong/bump-zlib.yml | 3 +++ 6 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 changelog/unreleased/kong/bump-libxcrypt.yml create mode 100644 changelog/unreleased/kong/bump-zlib.yml diff --git a/.requirements b/.requirements index cb1e6e4b6f..f3d604f18c 100644 --- a/.requirements +++ b/.requirements @@ -8,8 +8,15 @@ OPENSSL=3.2.1 OPENSSL_SHA256=83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39 PCRE=10.43 PCRE_SHA256=889d16be5abb8d05400b33c25e151638b8d4bac0e2d9c76e9d6923118ae8a34e + +LIBZLIB=1.3.1 +LIBZLIB_SHA256=38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32 LIBEXPAT=2.6.2 LIBEXPAT_SHA256=d4cf38d26e21a56654ffe4acd9cd5481164619626802328506a2869afab29ab3 +LIBYAML=0.2.5 +LIBYAML_SHA256=c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4 +LIBXCRYPT=4.4.36 +LIBXCRYPT_SHA256=e5e1f4caee0a01de2aee26e3138807d6d3ca2b8e67287966d1fefd65e1fd8943 # Note: git repositories can be loaded from local path if path is set as value diff --git a/build/cross_deps/libxcrypt/repositories.bzl b/build/cross_deps/libxcrypt/repositories.bzl index f6c28d0224..ebca076b20 100644 --- a/build/cross_deps/libxcrypt/repositories.bzl +++ b/build/cross_deps/libxcrypt/repositories.bzl @@ -1,18 +1,21 @@ """A module defining the third party dependency OpenResty""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@kong_bindings//:variables.bzl", "KONG_VAR") def libxcrypt_repositories(): """Defines the libcrypt repository""" + version = KONG_VAR["LIBXCRYPT"] + # many distros starts replace glibc/libcrypt with libxcrypt # thus crypt.h and libcrypt.so.1 are missing from cross tool chain # ubuntu2004: 4.4.10 # ubuntu2204: 4.4.27 http_archive( name = "cross_deps_libxcrypt", - url = "https://github.com/besser82/libxcrypt/releases/download/v4.4.27/libxcrypt-4.4.27.tar.xz", - sha256 = "500898e80dc0d027ddaadb5637fa2bf1baffb9ccd73cd3ab51d92ef5b8a1f420", - strip_prefix = "libxcrypt-4.4.27", + url = "https://github.com/besser82/libxcrypt/releases/download/v" + version + "/libxcrypt-" + version + ".tar.xz", + sha256 = KONG_VAR["LIBXCRYPT_SHA256"], + strip_prefix = "libxcrypt-" + version, build_file = "//build/cross_deps/libxcrypt:BUILD.libxcrypt.bazel", ) diff --git a/build/cross_deps/libyaml/repositories.bzl b/build/cross_deps/libyaml/repositories.bzl index b7b2800cf9..bf92e27d71 100644 --- a/build/cross_deps/libyaml/repositories.bzl +++ b/build/cross_deps/libyaml/repositories.bzl @@ -2,14 +2,17 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@kong_bindings//:variables.bzl", "KONG_VAR") def libyaml_repositories(): """Defines the libyaml repository""" + version = KONG_VAR["LIBYAML"] + http_archive( name = "cross_deps_libyaml", - url = "https://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz", - sha256 = "c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4", - strip_prefix = "yaml-0.2.5", + url = "https://pyyaml.org/download/libyaml/yaml-" + version + ".tar.gz", + sha256 = KONG_VAR["LIBYAML_SHA256"], + strip_prefix = "yaml-" + version, build_file = "//build/cross_deps/libyaml:BUILD.libyaml.bazel", ) diff --git a/build/cross_deps/zlib/repositories.bzl b/build/cross_deps/zlib/repositories.bzl index 3185b65222..fb9d28642c 100644 --- a/build/cross_deps/zlib/repositories.bzl +++ b/build/cross_deps/zlib/repositories.bzl @@ -2,17 +2,20 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@kong_bindings//:variables.bzl", "KONG_VAR") def zlib_repositories(): """Defines the zlib repository""" + version = KONG_VAR["LIBZLIB"] + http_archive( name = "cross_deps_zlib", urls = [ - "https://zlib.net/zlib-1.2.13.tar.gz", - "https://zlib.net/fossils/zlib-1.2.13.tar.gz", + "https://zlib.net/zlib-" + version + ".tar.gz", + "https://zlib.net/fossils/zlib-" + version + ".tar.gz", ], - sha256 = "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30", - strip_prefix = "zlib-1.2.13", + sha256 = KONG_VAR["LIBZLIB_SHA256"], + strip_prefix = "zlib-" + version, build_file = "//build/cross_deps/zlib:BUILD.zlib.bazel", ) diff --git a/changelog/unreleased/kong/bump-libxcrypt.yml b/changelog/unreleased/kong/bump-libxcrypt.yml new file mode 100644 index 0000000000..9327b40487 --- /dev/null +++ b/changelog/unreleased/kong/bump-libxcrypt.yml @@ -0,0 +1,3 @@ +message: "Bumped libxcrypt to 4.4.36" +type: dependency +scope: Core diff --git a/changelog/unreleased/kong/bump-zlib.yml b/changelog/unreleased/kong/bump-zlib.yml new file mode 100644 index 0000000000..a37e27b45f --- /dev/null +++ b/changelog/unreleased/kong/bump-zlib.yml @@ -0,0 +1,3 @@ +message: "Bumped zlib to 1.3.1" +type: dependency +scope: Core