docker-distribution: get rid of unknown in version output

The '+unknown' is a deliberate design which is expected to be
overridden at build time by VERSION environment variable.

However, after the following commit, things cannot be overridden.

  a74cacf (version: export getter functions)

This is because variable beginning with small letter is a private
one and cannot be exported or overridden.

An issue has been filed for upstream:
https://github.com/distribution/distribution/issues/4627

Before that issue is resolved, we need to sed the file manually.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Chen Qi 2025-05-29 11:51:09 +08:00 committed by Bruce Ashfield
parent f762ab75d9
commit 51e50ba710

View File

@ -39,6 +39,8 @@ do_compile() {
cd ${S}
# See https://github.com/distribution/distribution/issues/4627
sed -i -e 's#+unknown##' version/version.go
oe_runmake binaries
}