dockerd: Update to 20.10.14, and update version checking mechanism
authorAndy Dodd <atd7@cornell.edu>
Mon, 2 May 2022 17:54:18 +0000 (13:54 -0400)
committerRosen Penev <rosenp@gmail.com>
Sun, 15 May 2022 14:57:39 +0000 (07:57 -0700)
https://github.com/moby/moby/commit/a7a7c732c0dc02ee5b5515f4ca868ef50cafa4a1
changed package pinning from commit hash to version for some dependencies
(but not all, libnetwork is still referenced by commit)

Support the version-based pinning mechanism in addition to commit-based

Signed-off-by: Andy Dodd <atd7@cornell.edu>
(cherry picked from commit c3166c5a22a89bfdf4dd1edac25e4a8256717a68)

utils/dockerd/Makefile

index 3c37cb8ec87714c78a524566a23795ea06ac1fed..0cd48440bb2d8776e1bb2f66da429d7640ab34cc 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dockerd
-PKG_VERSION:=20.10.12
+PKG_VERSION:=20.10.14
 PKG_RELEASE:=$(AUTORELEASE)
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
@@ -10,8 +10,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_GIT_URL:=github.com/moby/moby
 PKG_GIT_REF:=v$(PKG_VERSION)
 PKG_SOURCE_URL:=https://codeload.$(PKG_GIT_URL)/tar.gz/$(PKG_GIT_REF)?
-PKG_HASH:=a8ee80d31c7b74f687a837cd2a8570578f118179fba0844c5ee88f90fe180155
-PKG_GIT_SHORT_COMMIT:=459d0df # SHA1 used within the docker executables
+PKG_HASH:=dbe1ae342351108b7b30232c4bce0559c81ad9fb6c978d7c8425d6aa53e476c1
+PKG_GIT_SHORT_COMMIT:=87a90dc # SHA1 used within the docker executables
 
 PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
 
@@ -55,6 +55,19 @@ TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 # $(1) = path to dependent package 'Makefile'
 # $(2) = relevant dependency '.installer' file
 define EnsureVendoredVersion
+       ( \
+               DEP_VER=$$$$( grep --only-matching --perl-regexp '(?<=PKG_VERSION:=)(.*)' "$(1)" ); \
+               VEN_VER=$$$$( grep --only-matching --perl-regexp '(?<=_VERSION:=v)(.*)(?=})' "$(PKG_BUILD_DIR)/hack/dockerfile/install/$(2)" ); \
+               if [ "$$$${VEN_VER}" != "$$$${DEP_VER}" ]; then \
+                       echo "ERROR: Expected 'PKG_VERSION:=$$$${VEN_VER}' in '$(1)', found 'PKG_VERSION:=$$$${DEP_VER}'"; \
+                       exit 1; \
+               fi \
+       )
+endef
+
+# $(1) = path to dependent package 'Makefile'
+# $(2) = relevant dependency '.installer' file
+define EnsureVendoredCommit
        ( \
                DEP_VER=$$$$( grep --only-matching --perl-regexp '(?<=PKG_SOURCE_VERSION:=)(.*)' "$(1)" ); \
                VEN_VER=$$$$( grep --only-matching --perl-regexp '(?<=_COMMIT:=)(.*)(?=})' "$(PKG_BUILD_DIR)/hack/dockerfile/install/$(2)" ); \
@@ -70,7 +83,7 @@ define Build/Prepare
 
        # Verify dependencies are the vendored version
        $(call EnsureVendoredVersion,../containerd/Makefile,containerd.installer)
-       $(call EnsureVendoredVersion,../libnetwork/Makefile,proxy.installer)
+       $(call EnsureVendoredCommit,../libnetwork/Makefile,proxy.installer)
        $(call EnsureVendoredVersion,../runc/Makefile,runc.installer)
        $(call EnsureVendoredVersion,../tini/Makefile,tini.installer)