Bind releases to licensing build signatures
This commit is contained in:
7 files changed
+96
-15
No files matched your search
@@ -332,6 +332,19 @@ if [[ -z ${SOURCE_DATE_EPOCH:-} ]]; then
|
||||
fi
|
||||
export SOURCE_DATE_EPOCH
|
||||
|
||||
source_revision=$(git -C "$source_dir" rev-parse HEAD) ||
|
||||
die "cannot determine release source revision"
|
||||
lock_digest=$(sha256sum "$source_dir/components.lock.json") ||
|
||||
die "cannot hash components.lock.json"
|
||||
lock_digest=${lock_digest%% *}
|
||||
build_signature="echoion:${version}:${source_revision}:${lock_digest}"
|
||||
license_root_key_id=${ECHOION_LICENSE_ROOT_KEY_ID:-}
|
||||
license_root_public_key=${ECHOION_LICENSE_ROOT_PUBLIC_KEY:-}
|
||||
if [[ -n $license_root_key_id || -n $license_root_public_key ]]; then
|
||||
[[ -n $license_root_key_id && -n $license_root_public_key ]] ||
|
||||
die "both ECHOION_LICENSE_ROOT_KEY_ID and ECHOION_LICENSE_ROOT_PUBLIC_KEY are required"
|
||||
fi
|
||||
|
||||
safe_remove_tree() {
|
||||
local path=$1
|
||||
case $path in
|
||||
@@ -355,9 +368,16 @@ configure_args=(
|
||||
-DECHOION_REPRODUCIBLE_BUILD=ON
|
||||
"-DECHOION_RELEASE_VERSION=$version"
|
||||
"-DECHOION_RUNTIME_VERSION=$version"
|
||||
"-DECHOION_BUILD_SIGNATURE=$build_signature"
|
||||
"-DECHOION_TOOLCHAIN_ABI=linux-x86_64-glibc-2.35-cxx26"
|
||||
"-DECHOION_COMPONENT_WORKSPACE=$component_workspace"
|
||||
)
|
||||
if [[ -n $license_root_key_id ]]; then
|
||||
configure_args+=(
|
||||
"-DECHOION_LICENSE_ROOT_KEY_ID=$license_root_key_id"
|
||||
"-DECHOION_LICENSE_ROOT_PUBLIC_KEY=$license_root_public_key"
|
||||
)
|
||||
fi
|
||||
for component_id in "${component_ids[@]}"; do
|
||||
configure_args+=(
|
||||
"-DCPM_${component_id}_SOURCE=$component_workspace/$component_id"
|
||||
@@ -583,6 +603,7 @@ python3 "$source_dir/scripts/generate-release-manifest.py" \
|
||||
--root "$stage" \
|
||||
--version "$version" \
|
||||
--build-type RelWithDebInfo \
|
||||
--build-signature "$build_signature" \
|
||||
--output "$stage/manifest.json"
|
||||
|
||||
# Installer helpers are mutable prefix-level files and intentionally are not
|
||||
|
||||
Reference in new issue
Block a user