diff --git a/VERSION-openeuler b/VERSION-openeuler index 5cf2da7..b42c236 100644 --- a/VERSION-openeuler +++ b/VERSION-openeuler @@ -1 +1 @@ -0.9.5-15 +0.9.5-16 diff --git a/git-commit b/git-commit index dbc6a54..62dae8a 100644 --- a/git-commit +++ b/git-commit @@ -1 +1 @@ -42f0c2f0f09f978ca9282ae085e68fa5446f231b +3c9ff8702cdcd34e26af32c4ab6bcffc178cfaf5 diff --git a/isula-build.spec b/isula-build.spec index 8bba570..4f91cc4 100644 --- a/isula-build.spec +++ b/isula-build.spec @@ -2,7 +2,7 @@ Name: isula-build Version: 0.9.5 -Release: 15 +Release: 16 Summary: A tool to build container images License: Mulan PSL V2 URL: https://gitee.com/openeuler/isula-build @@ -85,6 +85,12 @@ fi /usr/share/bash-completion/completions/isula-build %changelog +* Wed Nov 03 2021 DCCooper <1866858@gmail.com> - 0.9.5-16 +- Type:bugfix +- CVE:NA +- SUG:restart +- DESC:fix random sequence for saving separated image tarball + * Tue Nov 02 2021 lixiang - 0.9.5-15 - Type:requirement - CVE:NA diff --git a/patch/0086-bugfix-fix-random-sequence-for-saving-separated-imag.patch b/patch/0086-bugfix-fix-random-sequence-for-saving-separated-imag.patch new file mode 100644 index 0000000..b271e4e --- /dev/null +++ b/patch/0086-bugfix-fix-random-sequence-for-saving-separated-imag.patch @@ -0,0 +1,43 @@ +From d6c302a3d5563286614c59a442f4cd65a8351ce2 Mon Sep 17 00:00:00 2001 +From: DCCooper <1866858@gmail.com> +Date: Tue, 2 Nov 2021 20:54:24 +0800 +Subject: [PATCH 1/2] bugfix: fix random sequence for saving separated image + tarball + +reason: sort the map key and read the key in alohabetical orger + +Signed-off-by: DCCooper <1866858@gmail.com> +--- + daemon/save.go | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/daemon/save.go b/daemon/save.go +index ecac5b6..9ad4e03 100644 +--- a/daemon/save.go ++++ b/daemon/save.go +@@ -20,6 +20,7 @@ import ( + "io/ioutil" + "os" + "path/filepath" ++ "sort" + "strings" + + "github.com/containers/image/v5/docker/reference" +@@ -513,7 +514,13 @@ func (s *separatorSave) processImageLayers(imgInfos map[string]imageInfo) error + libImagesMap = make(imageLayersMap, 1) + appImagesMap = make(imageLayersMap, 1) + ) +- for _, info := range imgInfos { ++ var sortedKey []string ++ for k := range imgInfos { ++ sortedKey = append(sortedKey, k) ++ } ++ sort.Strings(sortedKey) ++ for _, k := range sortedKey { ++ info := imgInfos[k] + if err := s.clearDirs(true); err != nil { + return errors.Wrap(err, "clear tmp dirs failed") + } +-- +1.8.3.1 + diff --git a/series.conf b/series.conf index 451bf96..2bae5ae 100644 --- a/series.conf +++ b/series.conf @@ -48,3 +48,4 @@ patch/0082-test-optimize-scripts-in-hack.patch patch/0083-test-add-common-function-for-testing-separated-image.patch patch/0084-test-add-integration-tests-for-saving-and-loading-se.patch patch/0085-util-add-unit-test-for-increment-util-functions.patch +patch/0086-bugfix-fix-random-sequence-for-saving-separated-imag.patch