Skip to content

Commit

Permalink
chore(deps): add (and bump) cross deps versions to .requirements
Browse files Browse the repository at this point in the history
### 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 <[email protected]>
  • Loading branch information
bungle authored and kikito committed Jul 5, 2024
1 parent 8f9b82d commit a0dfed9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .requirements
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 6 additions & 3 deletions build/cross_deps/libxcrypt/repositories.bzl
Original file line number Diff line number Diff line change
@@ -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",
)
9 changes: 6 additions & 3 deletions build/cross_deps/libyaml/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
11 changes: 7 additions & 4 deletions build/cross_deps/zlib/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/bump-libxcrypt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: "Bumped libxcrypt to 4.4.36"
type: dependency
scope: Core
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/bump-zlib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: "Bumped zlib to 1.3.1"
type: dependency
scope: Core

0 comments on commit a0dfed9

Please sign in to comment.