Skip to content

Commit 5d4fa03

Browse files
authoredMar 17, 2025
feat: add separate notice file for fips (#16265)
apm-server-fips has different dependencies than apm-server so generate a separate notice file and update the fips docker image to use it
1 parent 967e8b3 commit 5d4fa03

File tree

3 files changed

+15539
-2
lines changed

3 files changed

+15539
-2
lines changed
 

‎Makefile

+15-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ gofmt: add-headers
261261
MODULE_DEPS=$(sort $(shell \
262262
go list -deps -tags=darwin,linux,windows -f "{{with .Module}}{{if not .Main}}{{.Path}}{{end}}{{end}}" ./x-pack/apm-server))
263263

264-
notice: NOTICE.txt
264+
MODULE_DEPS_FIPS=$(sort $(shell \
265+
go list -deps -tags=darwin,linux,windows,requirefips -f "{{with .Module}}{{if not .Main}}{{.Path}}{{end}}{{end}}" ./x-pack/apm-server))
266+
267+
notice: NOTICE.txt NOTICE-fips.txt
265268
NOTICE.txt build/dependencies-$(APM_SERVER_VERSION).csv: go.mod
266269
mkdir -p build/
267270
go list -m -json $(MODULE_DEPS) | go tool go.elastic.co/go-licence-detector \
@@ -273,6 +276,17 @@ NOTICE.txt build/dependencies-$(APM_SERVER_VERSION).csv: go.mod
273276
-depsTemplate tools/notice/dependencies.csv.tmpl \
274277
-depsOut build/dependencies-$(APM_SERVER_VERSION).csv
275278

279+
NOTICE-fips.txt build/dependencies-$(APM_SERVER_VERSION)-fips.csv: go.mod
280+
mkdir -p build/
281+
go list -tags=requirefips -m -json $(MODULE_DEPS_FIPS) | go tool go.elastic.co/go-licence-detector \
282+
-includeIndirect \
283+
-overrides tools/notice/overrides.json \
284+
-rules tools/notice/rules.json \
285+
-noticeTemplate tools/notice/NOTICE.txt.tmpl \
286+
-noticeOut NOTICE-fips.txt \
287+
-depsTemplate tools/notice/dependencies.csv.tmpl \
288+
-depsOut build/dependencies-$(APM_SERVER_VERSION)-fips.csv
289+
276290
##############################################################################
277291
# Rules for creating and installing build tools.
278292
##############################################################################

0 commit comments

Comments
 (0)