Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
# puts that directory on PATH so CMD can exec `stackstate-cluster-agent`
# by name. Flattening it to a bare binary breaks the image.
cp -r bin/stackstate-cluster-agent Dockerfiles/cluster-agent/
docker build -t "${LOCAL_IMAGE}" Dockerfiles/cluster-agent
docker build --pull -t "${LOCAL_IMAGE}" Dockerfiles/cluster-agent

- name: Smoke test cluster-agent image
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ jobs:
cp "${debs[0]}" Dockerfiles/agent/
# publish_image.sh also passes --build-arg S6_ARCH; the agent Dockerfile
# declares no such ARG, so it is dropped here rather than kept as a warning.
docker build --build-arg ARCH="${ARCH}" -t "${LOCAL_IMAGE}" Dockerfiles/agent
docker build --pull --build-arg ARCH="${ARCH}" -t "${LOCAL_IMAGE}" Dockerfiles/agent

- name: Smoke test agent image
run: |
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Go build tags control feature inclusion, some examples are:
- Release automation workflows

### Contributing
PRs should follow `.github/PULL_REQUEST_TEMPLATE.md` and the guidelines in
PRs should follow the guidelines in
`docs/public/guidelines/` (contributing, coding style, components, etc.). When
a PR changes behavior, configuration options, or APIs, update the corresponding
documentation in the same PR — not as a follow-up.
Expand Down
4 changes: 2 additions & 2 deletions deps/curl/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("//bazel/tools:generate_module_bazel.bzl", "generate_module_bazel")

VERSION = "8.21.0"
VERSION = "8.22.0"

generate_module_bazel(
name = "curl_module_bazel_new",
out = "curl.MODULE.bazel.new",
module = "curl",
sha256 = "d9b327997999045a24cda50f3983e69e51c516bd8be6ef9842fc7f99135e33bb",
sha256 = "d54dd598bf05927a726deb38df31c6a255ba83ff1de57c5d1464dac3ed8f44a1",
strip_prefix = "curl-%s" % VERSION,
tags = ["manual"],
target_compatible_with = ["@platforms//os:linux"],
Expand Down
2 changes: 1 addition & 1 deletion deps/curl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# A tool to look at configure output and create parts to support bazel targets
C2B=$(HOME)/ws/experimental/teams/agent-supply-chain/configure2bazel

PRISTINE=curl-8.18.0
PRISTINE=curl-8.22.0

next:
echo Do both steps on each platform.
Expand Down
6 changes: 3 additions & 3 deletions deps/curl/curl.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ http_archive(
"lib_contents.bzl": "//deps/curl:overlay/lib_contents.bzl",
"linux/lib/curl_config.h": "//deps/curl:overlay/linux/lib/curl_config.h",
},
sha256 = "d9b327997999045a24cda50f3983e69e51c516bd8be6ef9842fc7f99135e33bb",
strip_prefix = "curl-8.21.0",
url = "https://curl.haxx.se/download/curl-8.21.0.tar.gz",
sha256 = "d54dd598bf05927a726deb38df31c6a255ba83ff1de57c5d1464dac3ed8f44a1",
strip_prefix = "curl-8.22.0",
url = "https://curl.haxx.se/download/curl-8.22.0.tar.gz",
)
65 changes: 38 additions & 27 deletions deps/curl/overlay/lib_contents.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ PUBLIC_HDRS = [

HDRS = [
"lib/altsvc.h",
"lib/api.h",
"lib/curl_ed25519.h",
"lib/http_httpsig.h",
"lib/uint-hashset.h",
"lib/amigaos.h",
"lib/arpa_telnet.h",
"lib/asyn.h",
"lib/vdns/asyn.h",
"lib/bufq.h",
"lib/bufref.h",
"lib/cf-dns.h",
"lib/vdns/cf-dns.h",
"lib/cf-h1-proxy.h",
"lib/cf-h2-proxy.h",
"lib/cf-haproxy.h",
Expand All @@ -35,7 +39,6 @@ HDRS = [
"lib/cfilters.h",
"lib/config-mac.h",
"lib/config-os400.h",
"lib/config-riscos.h",
"lib/config-win32.h",
"lib/conncache.h",
"lib/connect.h",
Expand Down Expand Up @@ -89,8 +92,8 @@ HDRS = [
"lib/cw-out.h",
"lib/cw-pause.h",
"lib/dict.h",
"lib/dnscache.h",
"lib/doh.h",
"lib/vdns/dnscache.h",
"lib/vdns/doh.h",
"lib/dynhds.h",
"lib/easy_lock.h",
"lib/easyif.h",
Expand All @@ -108,7 +111,7 @@ HDRS = [
"lib/gopher.h",
"lib/hash.h",
"lib/headers.h",
"lib/hostip.h",
"lib/vdns/hostip.h",
"lib/hsts.h",
"lib/http_aws_sigv4.h",
"lib/http_chunks.h",
Expand All @@ -119,7 +122,7 @@ HDRS = [
"lib/http.h",
"lib/http1.h",
"lib/http2.h",
"lib/httpsrr.h",
"lib/vdns/httpsrr.h",
"lib/idn.h",
"lib/if2ip.h",
"lib/imap.h",
Expand Down Expand Up @@ -368,13 +371,17 @@ LIB_CURLTOOL_SRCS_LINUX = [

LIB_CURLU_SRCS_DARWIN = [
"lib/altsvc.c",
"lib/api.c",
"lib/curl_ed25519.c",
"lib/http_httpsig.c",
"lib/uint-hashset.c",
"lib/amigaos.c",
"lib/asyn-ares.c",
"lib/asyn-base.c",
"lib/asyn-thrdd.c",
"lib/vdns/asyn-ares.c",
"lib/vdns/asyn-base.c",
"lib/vdns/asyn-thrdd.c",
"lib/bufq.c",
"lib/bufref.c",
"lib/cf-dns.c",
"lib/vdns/cf-dns.c",
"lib/cf-h1-proxy.c",
"lib/cf-h2-proxy.c",
"lib/cf-haproxy.c",
Expand Down Expand Up @@ -426,8 +433,8 @@ LIB_CURLU_SRCS_DARWIN = [
"lib/cw-out.c",
"lib/cw-pause.c",
"lib/dict.c",
"lib/dnscache.c",
"lib/doh.c",
"lib/vdns/dnscache.c",
"lib/vdns/doh.c",
"lib/dynhds.c",
"lib/easy.c",
"lib/easygetopt.c",
Expand All @@ -445,9 +452,9 @@ LIB_CURLU_SRCS_DARWIN = [
"lib/hash.c",
"lib/headers.c",
"lib/hmac.c",
"lib/hostip.c",
"lib/hostip4.c",
"lib/hostip6.c",
"lib/vdns/hostip.c",
"lib/vdns/hostip4.c",
"lib/vdns/hostip6.c",
"lib/hsts.c",
"lib/http_aws_sigv4.c",
"lib/http_chunks.c",
Expand All @@ -458,7 +465,7 @@ LIB_CURLU_SRCS_DARWIN = [
"lib/http.c",
"lib/http1.c",
"lib/http2.c",
"lib/httpsrr.c",
"lib/vdns/httpsrr.c",
"lib/idn.c",
"lib/if2ip.c",
"lib/imap.c",
Expand Down Expand Up @@ -550,13 +557,17 @@ LIB_CURLU_SRCS_DARWIN = [

LIB_CURLU_SRCS_LINUX = [
"lib/altsvc.c",
"lib/api.c",
"lib/curl_ed25519.c",
"lib/http_httpsig.c",
"lib/uint-hashset.c",
"lib/amigaos.c",
"lib/asyn-ares.c",
"lib/asyn-base.c",
"lib/asyn-thrdd.c",
"lib/vdns/asyn-ares.c",
"lib/vdns/asyn-base.c",
"lib/vdns/asyn-thrdd.c",
"lib/bufq.c",
"lib/bufref.c",
"lib/cf-dns.c",
"lib/vdns/cf-dns.c",
"lib/cf-h1-proxy.c",
"lib/cf-h2-proxy.c",
"lib/cf-haproxy.c",
Expand Down Expand Up @@ -608,8 +619,8 @@ LIB_CURLU_SRCS_LINUX = [
"lib/cw-out.c",
"lib/cw-pause.c",
"lib/dict.c",
"lib/dnscache.c",
"lib/doh.c",
"lib/vdns/dnscache.c",
"lib/vdns/doh.c",
"lib/dynhds.c",
"lib/easy.c",
"lib/easygetopt.c",
Expand All @@ -627,9 +638,9 @@ LIB_CURLU_SRCS_LINUX = [
"lib/hash.c",
"lib/headers.c",
"lib/hmac.c",
"lib/hostip.c",
"lib/hostip4.c",
"lib/hostip6.c",
"lib/vdns/hostip.c",
"lib/vdns/hostip4.c",
"lib/vdns/hostip6.c",
"lib/hsts.c",
"lib/http_aws_sigv4.c",
"lib/http_chunks.c",
Expand All @@ -640,7 +651,7 @@ LIB_CURLU_SRCS_LINUX = [
"lib/http.c",
"lib/http1.c",
"lib/http2.c",
"lib/httpsrr.c",
"lib/vdns/httpsrr.c",
"lib/idn.c",
"lib/if2ip.c",
"lib/imap.c",
Expand Down
10 changes: 5 additions & 5 deletions deps/curl/overlay/overlay.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ package(
default_visibility = ["@@//packages:__subpackages__"],
)

VERSION = "8.18.0"

SO_VERSION = "4.8.0"

license(
Expand All @@ -33,8 +31,6 @@ license(
visibility = ["//visibility:public"],
)

SONAME = "libcurl.so.%s" % VERSION

PUBLIC_HEADERS = [
"include/curl/curl.h",
"include/curl/curlver.h",
Expand Down Expand Up @@ -66,7 +62,11 @@ LOCAL_DEFINES = [
"SM4_ASM",
"VPAES_ASM",
"VPSM4_ASM",
]
] + select({
# Match configure.ac: glibc extension prototypes require this feature macro.
"@platforms//os:linux": ["_GNU_SOURCE"],
"//conditions:default": [],
})

copy_file(
name = "copy_config_h",
Expand Down
10 changes: 10 additions & 0 deletions docs/dev/stac-24773-bazel-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ Also pass `flavor_flag` (`--//packages/agent:flavor=fips` or heroku) where upstr

## Core patterns

### Cache ownership

Keep `always_build true` in `datadog-agent-dependencies.rb`. Omnibus fingerprints
its Ruby recipes, but does not track the Bazel dependency manifests and overlays.
The stage must invoke Bazel on every package build so Bazel can validate its own
cache against those inputs. After a native dependency update, verify the version
inside the resulting DEB or image, including when Omnibus restores a warm cache.
Image builds using mutable base tags must pull those tags before building so
cached base images do not hide distribution security updates.

### Shared libraries → `install` + `replace_prefix`

**Do not** ship Bazel-built `.so` files only via `//packages/agent/dependencies:install` / `pkg_filegroup all_files` if they need to live under `/opt/stackstate-agent/embedded/lib` with embedded RPATH. That failed omnibus health check (C2 pipeline 2619669055): `DT_NEEDED` pointed at system `/lib` for `libz` / `liblzma`.
Expand Down
5 changes: 4 additions & 1 deletion omnibus/config/software/datadog-agent-dependencies.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name 'datadog-agent-dependencies'

description "Enforce building dependencies as soon as possible so they can be cached"
description "Build and install the Bazel-managed agent dependencies"

# Omnibus does not fingerprint Bazel inputs; let Bazel validate its own cache.
always_build true

# [sts] STAC-24773: Bazel migration. The remaining `dependency '...'` lines below
# (jmxfetch, libpcap, systemd, snmp-traps, procps-ng) are progressively replaced by
Expand Down
2 changes: 1 addition & 1 deletion omnibus/package-scripts/publish_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BUILD_TAG="${IMAGE_REPO}:${IMAGE_TAG}"
docker login -u "${quay_user}" -p "${quay_password}" "${REGISTRY}"
docker login -u "${REGISTRY_USER}" -p "${REGISTRY_PASSWORD}" "${REGISTRY_HOST}"

docker build --build-arg ARCH="${ARCH}" --build-arg S6_ARCH="${S6_ARCH}" -t "${BUILD_TAG}" "${DOCKERFILE_PATH}"
docker build --pull --build-arg ARCH="${ARCH}" --build-arg S6_ARCH="${S6_ARCH}" -t "${BUILD_TAG}" "${DOCKERFILE_PATH}"


DOCKER_TAG="${REGISTRY}/${ORGANIZATION}/${IMAGE_REPO}:${IMAGE_TAG}"
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/curl-8-22-0-7385f21bfe471ecc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
security:
- |
Update embedded curl to 8.22.0.
Loading