Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
curiositycasualty committed Sep 5, 2024
1 parent 7b4f198 commit 249e0ca
Show file tree
Hide file tree
Showing 12 changed files with 460 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/matrix-commitly.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# please see matrix-full.yml for meaning of each field
build-packages:
- label: ubuntu-22.04
image: ubuntu:22.04
- label: ubuntu-24.04
image: ubuntu:24.04
package: deb
check-manifest-suite: ubuntu-22.04-amd64
check-manifest-suite: docker-image-ubuntu-24.04

build-images:
- label: ubuntu
base-image: ubuntu:22.04
base-image: ubuntu:24.04
package: deb
artifact-from: ubuntu-22.04
artifact-from: ubuntu-24.04

smoke-tests:
- label: ubuntu
Expand Down
28 changes: 25 additions & 3 deletions .github/matrix-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ build-packages:
package: deb
bazel-args: --platforms=//:generic-crossbuild-aarch64
check-manifest-suite: ubuntu-22.04-arm64
- label: ubuntu-24.04
image: ubuntu:24.04
package: deb
check-manifest-suite: ubuntu-24.04-amd64
- label: ubuntu-24.04-arm64
image: ubuntu:24.04
package: deb
bazel-args: --platforms=//:generic-crossbuild-aarch64
check-manifest-suite: ubuntu-24.04-arm64

# Debian
- label: debian-11
Expand Down Expand Up @@ -78,11 +87,12 @@ build-images:

# Ubuntu
- label: ubuntu
base-image: ubuntu:22.04
base-image: ubuntu:24.04
package: deb
artifact-from: ubuntu-22.04
artifact-from-alt: ubuntu-22.04-arm64
artifact-from: ubuntu-24.04
artifact-from-alt: ubuntu-24.04-arm64
docker-platforms: linux/amd64, linux/arm64
check-manifest-suite: docker-image-ubuntu-24.04

# Debian
- label: debian
Expand Down Expand Up @@ -129,6 +139,18 @@ release-packages:
artifact-version: 22.04
artifact-type: ubuntu
artifact: kong.arm64.deb
- label: ubuntu-24.04
package: deb
artifact-from: ubuntu-24.04
artifact-version: 24.04
artifact-type: ubuntu
artifact: kong.amd64.deb
- label: ubuntu-24.04-arm64
package: deb
artifact-from: ubuntu-24.04-arm64
artifact-version: 24.04
artifact-type: ubuntu
artifact: kong.arm64.deb

# Debian
- label: debian-11
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,16 +420,21 @@ jobs:

- name: Verify
run: |
SUITE='docker-image'
if [ -n '${{ matrix.check-manifest-suite }}' ]; then
SUITE='${{ matrix.check-manifest-suite }}'
fi
cd scripts/explain_manifest
# docker image verify requires sudo to set correct permissions, so we
# also install deps for root
sudo -E pip install -r requirements.txt
sudo -H -E pip install -r requirements.txt
IMAGE=${{ env.PRERELEASE_DOCKER_REPOSITORY }}:${{ needs.metadata.outputs.commit-sha }}-${{ matrix.label }}
sudo -E python ./main.py --image $IMAGE -f docker_image_filelist.txt -s docker-image
sudo -H -E python ./main.py --image $IMAGE -f docker_image_filelist.txt -s "$SUITE"
if [[ ! -z "${{ matrix.docker-platforms }}" ]]; then
DOCKER_DEFAULT_PLATFORM=linux/arm64 sudo -E python ./main.py --image $IMAGE -f docker_image_filelist.txt -s docker-image
DOCKER_DEFAULT_PLATFORM=linux/arm64 sudo -E python ./main.py --image $IMAGE -f docker_image_filelist.txt -s "$SUITE"
fi
scan-images:
Expand Down
4 changes: 2 additions & 2 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Each targets under `//build:install` installs an independent component that
composes the Kong runtime environment. We can query `deps(//build:install, 1)`
recursively to find the target that only build and install specific component.
This would be useful if one is debugging the issue of a specific target without
the need to build whole Kong runtime environment.
the need to build whole Kong runtime environment.

We can use the target labels to build the dependency directly, for example:

Expand Down Expand Up @@ -220,7 +220,7 @@ time to control how the ngx_wasm_module repository is sourced:

## Cross compiling

Cross compiling is currently only tested on Ubuntu 22.04 x86_64 with following targeting platforms:
Cross compiling is currently only tested on Ubuntu 22.04/24.04 x86_64 with following targeting platforms:

- **//:generic-crossbuild-aarch64** Use the system installed aarch64 toolchain.
- Requires user to manually install `crossbuild-essential-arm64` on Debian/Ubuntu.
Expand Down
3 changes: 2 additions & 1 deletion build/cross_deps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ We currently do cross compile on following platforms:
- Amazonlinux 2023
- Ubuntu 18.04 (Version 3.4.x.x only)
- Ubuntu 22.04
- Ubuntu 24.04
- RHEL 9
- Debian 12

As we do not use different versions in different distros just for simplicity, the version
of those dependencies should remain the lowest among all distros originally shipped, to
allow the produced artifacts has lowest ABI/API to be compatible across all distros.
allow the produced artifacts has lowest ABI/API to be compatible across all distros.
1 change: 1 addition & 0 deletions build/cross_deps/libxcrypt/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def libxcrypt_repositories():
# thus crypt.h and libcrypt.so.1 are missing from cross tool chain
# ubuntu2004: 4.4.10
# ubuntu2204: 4.4.27
# ubuntu2204: 4.4.36
# NOTE: do not bump the following version, see build/cross_deps/README.md for detail.
http_archive(
name = "cross_deps_libxcrypt",
Expand Down
2 changes: 2 additions & 0 deletions changelog/unreleased/kong/add-noble-numbat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
message: "Add Ubuntu 24.04 (Noble Numbat) to build"
type: dependency
23 changes: 23 additions & 0 deletions scripts/explain_manifest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ def transform(f: FileInfo):
},
}
),
"ubuntu-24.04-amd64": ExpectSuite(
name="Ubuntu 24.04 (amd64)",
manifest="fixtures/ubuntu-24.04-amd64.txt",
tests={
common_suites: {},
libc_libcpp_suites: {
"libc_max_version": "2.35",
# gcc 11.2.0
"libcxx_max_version": "3.4.29",
"cxxabi_max_version": "1.3.13",
},
}
),
"debian-11-amd64": ExpectSuite(
name="Debian 11 (amd64)",
manifest="fixtures/debian-11-amd64.txt",
Expand Down Expand Up @@ -158,6 +171,16 @@ def transform(f: FileInfo):
docker_suites: {},
}
),
"docker-image-ubuntu-24.04": ExpectSuite(
name="Ubuntu 24.04 Docker Image",
manifest=None,
tests={
docker_suites: {
"kong_uid": 1001,
"kong_gid": 1001,
},
}
),
}

# populate arm64 and fips suites from amd64 suites
Expand Down
195 changes: 195 additions & 0 deletions scripts/explain_manifest/fixtures/ubuntu-24.04-amd64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
- Path : /etc/kong/kong.logrotate

- Path : /lib/systemd/system/kong.service

- Path : /usr/local/kong/gui
Type : directory

- Path : /usr/local/kong/include/google
Type : directory

- Path : /usr/local/kong/include/kong
Type : directory

- Path : /usr/local/kong/lib/engines-3/afalg.so
Needed :
- libstdc++.so.6
- libm.so.6
- libcrypto.so.3
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/kong/lib/engines-3/capi.so
Needed :
- libstdc++.so.6
- libm.so.6
- libcrypto.so.3
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/kong/lib/engines-3/loader_attic.so
Needed :
- libstdc++.so.6
- libm.so.6
- libcrypto.so.3
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/kong/lib/engines-3/padlock.so
Needed :
- libstdc++.so.6
- libm.so.6
- libcrypto.so.3
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/kong/lib/libcrypto.so.3
Needed :
- libstdc++.so.6
- libm.so.6
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/kong/lib/libexpat.so.1.9.2
Needed :
- libc.so.6

- Path : /usr/local/kong/lib/libsnappy.so
Needed :
- libstdc++.so.6
- libm.so.6
- libgcc_s.so.1
- libc.so.6

- Path : /usr/local/kong/lib/libssl.so.3
Needed :
- libstdc++.so.6
- libm.so.6
- libcrypto.so.3
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/kong/lib/ossl-modules/legacy.so
Needed :
- libstdc++.so.6
- libm.so.6
- libcrypto.so.3
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/lfs.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/lpeg.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/lsyslog.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/lua_pack.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/lua_system_constants.so
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/lxp.so
Needed :
- libexpat.so.1
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/mime/core.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/pb.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/socket/core.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/socket/serial.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/socket/unix.so
Needed :
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/ssl.so
Needed :
- libssl.so.3
- libcrypto.so.3
- libc.so.6
Runpath : /usr/local/kong/lib

- Path : /usr/local/lib/lua/5.1/yaml.so
Needed :
- libyaml-0.so.2
- libc.so.6

- Path : /usr/local/openresty/lualib/cjson.so
Needed :
- libc.so.6

- Path : /usr/local/openresty/lualib/librestysignal.so

- Path : /usr/local/openresty/lualib/rds/parser.so
Needed :
- libc.so.6

- Path : /usr/local/openresty/lualib/redis/parser.so
Needed :
- libc.so.6

- Path : /usr/local/openresty/nginx/modules/ngx_wasmx_module.so
Needed :
- libm.so.6
- libgcc_s.so.1
- libc.so.6
- ld-linux-x86-64.so.2
Runpath : /usr/local/openresty/luajit/lib:/usr/local/kong/lib:/usr/local/openresty/lualib

- Path : /usr/local/openresty/nginx/sbin/nginx
Needed :
- libcrypt.so.1
- libluajit-5.1.so.2
- libm.so.6
- libssl.so.3
- libcrypto.so.3
- libz.so.1
- libc.so.6
Runpath : /usr/local/openresty/luajit/lib:/usr/local/kong/lib:/usr/local/openresty/lualib
Modules :
- lua-kong-nginx-module
- lua-kong-nginx-module/stream
- lua-resty-events
- lua-resty-lmdb
- ngx_brotli
- ngx_wasmx_module
OpenSSL : OpenSSL 3.2.1 30 Jan 2024
DWARF : True
DWARF - ngx_http_request_t related DWARF DIEs: True

- Path : /usr/local/openresty/site/lualib/libatc_router.so
Needed :
- libgcc_s.so.1
- libm.so.6
- libc.so.6
- ld-linux-x86-64.so.2
- libstdc++.so.6
Loading

0 comments on commit 249e0ca

Please sign in to comment.