From febed4d2e41667e6369b84c5111fdf350c50f7f5 Mon Sep 17 00:00:00 2001 From: Paolo Chila Date: Thu, 10 Apr 2025 08:11:21 +0200 Subject: [PATCH] Restore qualifier=core for elastic-agent-core packaging specs Restore qualifier for elastic-agent-core packaging specs to avoid changing the rootDir name of the archives. The qualifier had been removed in PR #7690 trying to use the spec name: this worked to get the desired file name but changed the root Dir name which uses '{{.BeatName}}{{if .Qualifier}}-{{.Qualifier}}{{end}}' in the template definition instead of '{{.Name}}' which would render the spec name. --- dev-tools/packaging/packages.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dev-tools/packaging/packages.yml b/dev-tools/packaging/packages.yml index 9c7ac30449a..d50031e2701 100644 --- a/dev-tools/packaging/packages.yml +++ b/dev-tools/packaging/packages.yml @@ -1647,8 +1647,9 @@ specs: spec: <<: *common <<: *elastic_license_for_binaries - name: '{{.BeatName}}-core' version: '{{ beat_version }}' + # this is a way to place 'core' in the correct place for both the archive and the root dir, see defaultRootDir in dev-tools/mage/pkgtypes.go + qualifier: core files: '{{.BeatName}}{{.BinaryExt}}': source: ./build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} @@ -1658,8 +1659,8 @@ specs: spec: <<: *common <<: *elastic_license_for_binaries - name: '{{.BeatName}}-core' version: '{{ beat_version }}' + qualifier: core files: '{{.BeatName}}{{.BinaryExt}}': source: ./build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} @@ -1669,8 +1670,8 @@ specs: spec: <<: *common <<: *elastic_license_for_binaries - name: '{{.BeatName}}-core' version: '{{ beat_version }}' + qualifier: core files: '{{.BeatName}}{{.BinaryExt}}': source: ./build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} @@ -1680,8 +1681,8 @@ specs: spec: <<: *common <<: *elastic_license_for_binaries - name: '{{.BeatName}}-core' version: '{{ beat_version }}' + qualifier: core files: '{{.BeatName}}{{.BinaryExt}}': source: ./build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} @@ -1691,8 +1692,8 @@ specs: spec: <<: *common_fips <<: *elastic_license_for_binaries - name: '{{.BeatName}}-core-fips' version: '{{ beat_version }}' + qualifier: core files: '{{.BeatName}}{{.BinaryExt}}': source: ./build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} \ No newline at end of file