From c7fb1d223d748500383da660f7a867df86df1bdb Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Thu, 24 Nov 2022 11:46:52 +0800 Subject: [PATCH] docker: using VERSION-vendor to record version (cherry picked from commit 3cc77fa02d5a0efb77b71d4f506b44f209329b1d) --- VERSION-openeuler | 1 - VERSION-vendor | 1 + apply-patches | 4 ++-- docker.spec | 10 ++++++++-- gen-commit.sh | 2 +- git-commit | 2 +- patch/0141-docker-remove-logo-info.patch | 4 ++-- ...0164-docker-use-git-commit-to-store-commit-ID.patch | 4 ++-- 8 files changed, 17 insertions(+), 11 deletions(-) delete mode 100644 VERSION-openeuler create mode 100644 VERSION-vendor diff --git a/VERSION-openeuler b/VERSION-openeuler deleted file mode 100644 index 6356491..0000000 --- a/VERSION-openeuler +++ /dev/null @@ -1 +0,0 @@ -18.09.0.314 diff --git a/VERSION-vendor b/VERSION-vendor new file mode 100644 index 0000000..9decb1e --- /dev/null +++ b/VERSION-vendor @@ -0,0 +1 @@ +18.09.0.315 diff --git a/apply-patches b/apply-patches index cdf53b5..4947a96 100755 --- a/apply-patches +++ b/apply-patches @@ -39,8 +39,8 @@ if [ "$1" == "selinux" ]; then cp -rf $src/components/engine/contrib/selinux-euleros/docker-engine-selinux/* . else cp -rf $src/* . - cp -rf VERSION-openeuler $cwd/components/cli/ - cp -rf VERSION-openeuler $cwd/components/engine/ + cp -rf VERSION-vendor $cwd/components/cli/ + cp -rf VERSION-vendor $cwd/components/engine/ cp -rf git-commit $cwd/components/cli/ cp -rf git-commit $cwd/components/engine/ fi diff --git a/docker.spec b/docker.spec index 7de5421..76b8937 100644 --- a/docker.spec +++ b/docker.spec @@ -1,6 +1,6 @@ Name: docker-engine Version: 18.09.0 -Release: 314 +Release: 315 Epoch: 2 Summary: The open-source application container engine Group: Tools/Docker @@ -11,7 +11,7 @@ Source1: patch.tar.gz Source2: apply-patches Source3: git-commit Source4: series.conf -Source5: VERSION-openeuler +Source5: VERSION-vendor Source6: gen-commit.sh URL: https://mobyproject.org @@ -213,6 +213,12 @@ fi %endif %changelog +* Thu Nov 24 2022 chenjiankun - 18.09.0-315 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:using VERSION-vendor to record version + * Tue Nov 22 2022 chenjiankun - 18.09.0-314 - Type:bugfix - CVE:NA diff --git a/gen-commit.sh b/gen-commit.sh index a21db18..fd0bcbc 100755 --- a/gen-commit.sh +++ b/gen-commit.sh @@ -14,7 +14,7 @@ echo "${changeID}" > git-commit old_version=`head -n 10 docker.spec|grep Release|awk '{print $2}'` let new_version=$old_version+1 sed -i -e "s/^\Release: $old_version/Release: $new_version/g" ./*.spec -echo 18.09.0.$new_version > VERSION-openeuler +echo 18.09.0.$new_version > VERSION-vendor author=$(git config user.name) email=$(git config user.email) diff --git a/git-commit b/git-commit index c1bebba..7d98d06 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -eca9bca4da7991a3fc6397f580ffedeb25ccb15d +c8f038afd97f57b150946e88df14762a5d4dfc98 diff --git a/patch/0141-docker-remove-logo-info.patch b/patch/0141-docker-remove-logo-info.patch index aad52bf..51ccccb 100644 --- a/patch/0141-docker-remove-logo-info.patch +++ b/patch/0141-docker-remove-logo-info.patch @@ -21,7 +21,7 @@ index d504032..86d0e3a 100755 PLATFORM=${PLATFORM:-} VERSION=${VERSION:-"unknown-version"} -EULERVERSION=${EULERVERSION:-$(cat VERSION-EULER)} -+EULERVERSION=${EULERVERSION:-$(cat VERSION-openeuler)} ++EULERVERSION=${EULERVERSION:-$(cat VERSION-vendor)} GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)} BUILDTIME=${BUILDTIME:-$(date --utc --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')} @@ -34,7 +34,7 @@ index fa87d91..686e688 100755 ) -VERSION_EULER=$(< ./VERSION-EULER) -+VERSION_EULER=$(< ./VERSION-openeuler) ++VERSION_EULER=$(< ./VERSION-vendor) VERSION=${VERSION:-dev} ! BUILDTIME=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/') if [ "$DOCKER_GITCOMMIT" ]; then diff --git a/patch/0164-docker-use-git-commit-to-store-commit-ID.patch b/patch/0164-docker-use-git-commit-to-store-commit-ID.patch index b96c4ae..c3bcb05 100644 --- a/patch/0164-docker-use-git-commit-to-store-commit-ID.patch +++ b/patch/0164-docker-use-git-commit-to-store-commit-ID.patch @@ -16,7 +16,7 @@ index 86d0e3a..a23e379 100755 @@ -4,7 +4,7 @@ set -eu PLATFORM=${PLATFORM:-} VERSION=${VERSION:-"unknown-version"} - EULERVERSION=${EULERVERSION:-$(cat VERSION-openeuler)} + EULERVERSION=${EULERVERSION:-$(cat VERSION-vendor)} -GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)} +GITCOMMIT=${GITCOMMIT:-$(cat git-commit | head -c 7)} BUILDTIME=${BUILDTIME:-$(date --utc --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')} @@ -27,7 +27,7 @@ index 686e688..f4a51e7 100755 --- a/components/engine/hack/make.sh +++ b/components/engine/hack/make.sh @@ -68,6 +68,7 @@ DEFAULT_BUNDLES=( - VERSION_EULER=$(< ./VERSION-openeuler) + VERSION_EULER=$(< ./VERSION-vendor) VERSION=${VERSION:-dev} ! BUILDTIME=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/') +DOCKER_GITCOMMIT=$(cat git-commit | head -c 7) -- Gitee