Hello community, here is the log from the commit of package docker-distribution for openSUSE:Factory checked in at 2020-10-14 15:39:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/docker-distribution (Old) and /work/SRC/openSUSE:Factory/.docker-distribution.new.3486 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "docker-distribution" Wed Oct 14 15:39:27 2020 rev:22 rq:841628 version:2.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/docker-distribution/docker-distribution.changes 2020-09-12 00:11:12.321139088 +0200 +++ /work/SRC/openSUSE:Factory/.docker-distribution.new.3486/docker-distribution.changes 2020-10-14 15:40:01.570379878 +0200 @@ -1,0 +2,6 @@ +Mon Oct 12 08:28:38 UTC 2020 - Dirk Mueller <dmuel...@suse.com> + +- add 0004-Make-ipfilteredby-not-required.patch + Make ipfilteredby optional + +------------------------------------------------------------------- New: ---- 0004-Make-ipfilteredby-not-required.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ docker-distribution.spec ++++++ --- /var/tmp/diff_new_pack.sJ1lKS/_old 2020-10-14 15:40:03.306380484 +0200 +++ /var/tmp/diff_new_pack.sJ1lKS/_new 2020-10-14 15:40:03.306380484 +0200 @@ -37,6 +37,8 @@ Patch1: 0002-Relax-filesystem-driver-folder-permissions-to-0777-cont.patch # PATCH-FIX-UPSTREAM https://github.com/docker/distribution/pull/2886 Patch2: 0003-Support-external-redis-sentinel-cluster.patch +# PATCH-FIX-UPSTREAM https://github.com/docker/distribution/pull/3088 +Patch3: 0004-Make-ipfilteredby-not-required.patch BuildRequires: go >= 1.13 BuildRequires: golang-packaging BuildRequires: systemd-rpm-macros @@ -63,9 +65,7 @@ %prep %setup -q -n distribution-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autopatch -p1 cp %{SOURCE4} . %build ++++++ 0004-Make-ipfilteredby-not-required.patch ++++++ >From afa91463d668a0e1d110593a86df466b7425c82d Mon Sep 17 00:00:00 2001 From: Vishesh Jindal <vishes...@gmail.com> Date: Wed, 30 Jan 2019 18:35:07 +0530 Subject: [PATCH] Bugfix: Make ipfilteredby not required Signed-off-by: Vishesh Jindal <vishes...@gmail.com> (cherry picked from commit f9a05061916d095e95566d23e968608ee0576446) Signed-off-by: Sebastiaan van Stijn <git...@gone.nl> --- .../middleware/cloudfront/middleware.go | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/registry/storage/driver/middleware/cloudfront/middleware.go b/registry/storage/driver/middleware/cloudfront/middleware.go index 83a36a72a..bd9031a99 100644 --- a/registry/storage/driver/middleware/cloudfront/middleware.go +++ b/registry/storage/driver/middleware/cloudfront/middleware.go @@ -138,27 +138,33 @@ func newCloudFrontStorageMiddleware(storageDriver storagedriver.StorageDriver, o // parse ipfilteredby var awsIPs *awsIPs - if ipFilteredBy := options["ipfilteredby"].(string); ok { - switch strings.ToLower(strings.TrimSpace(ipFilteredBy)) { - case "", "none": - awsIPs = nil - case "aws": - newAWSIPs(ipRangesURL, updateFrequency, nil) - case "awsregion": - var awsRegion []string - if regions, ok := options["awsregion"].(string); ok { - for _, awsRegions := range strings.Split(regions, ",") { - awsRegion = append(awsRegion, strings.ToLower(strings.TrimSpace(awsRegions))) + if i, ok := options["ipfilteredby"]; ok { + if ipFilteredBy, ok := i.(string); ok { + switch strings.ToLower(strings.TrimSpace(ipFilteredBy)) { + case "", "none": + awsIPs = nil + case "aws": + awsIPs = newAWSIPs(ipRangesURL, updateFrequency, nil) + case "awsregion": + var awsRegion []string + if i, ok := options["awsregion"]; ok { + if regions, ok := i.(string); ok { + for _, awsRegions := range strings.Split(regions, ",") { + awsRegion = append(awsRegion, strings.ToLower(strings.TrimSpace(awsRegions))) + } + awsIPs = newAWSIPs(ipRangesURL, updateFrequency, awsRegion) + } else { + return nil, fmt.Errorf("awsRegion must be a comma separated string of valid aws regions") + } + } else { + return nil, fmt.Errorf("awsRegion is not defined") } - awsIPs = newAWSIPs(ipRangesURL, updateFrequency, awsRegion) - } else { - return nil, fmt.Errorf("awsRegion must be a comma separated string of valid aws regions") + default: + return nil, fmt.Errorf("ipfilteredby only allows a string the following value: none|aws|awsregion") } - default: - return nil, fmt.Errorf("ipfilteredby only allows a string the following value: none|aws|awsregion") + } else { + return nil, fmt.Errorf("ipfilteredby only allows a string with the following value: none|aws|awsregion") } - } else { - return nil, fmt.Errorf("ipfilteredby only allows a string with the following value: none|aws|awsregion") } return &cloudFrontStorageMiddleware{