Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package weave for openSUSE:Factory checked in at 2022-04-02 18:20:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/weave (Old) and /work/SRC/openSUSE:Factory/.weave.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "weave" Sat Apr 2 18:20:29 2022 rev:11 rq:965689 version:2.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/weave/weave.changes 2021-02-11 12:47:51.673530269 +0100 +++ /work/SRC/openSUSE:Factory/.weave.new.1900/weave.changes 2022-04-02 18:20:40.758181653 +0200 @@ -1,0 +2,7 @@ +Tue Mar 29 13:29:13 UTC 2022 - Fabian Vogt <fv...@suse.com> + +- Add patch to fix compatibility with runtimes using cni >= 1.0.0 + (boo#1197490, gh#weaveworks/weave#3936): + * 0001-cni-Add-cniVersion-to-Result.patch + +------------------------------------------------------------------- New: ---- 0001-cni-Add-cniVersion-to-Result.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ weave.spec ++++++ --- /var/tmp/diff_new_pack.bwM3yW/_old 2022-04-02 18:20:41.370174784 +0200 +++ /var/tmp/diff_new_pack.bwM3yW/_new 2022-04-02 18:20:41.378174694 +0200 @@ -1,7 +1,7 @@ # # spec file for package weave # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Source3: weave-rpmlintrc Patch0: Makefile.diff Patch1: disable-iptables-setup.patch +Patch2: 0001-cni-Add-cniVersion-to-Result.patch BuildRequires: binutils-gold BuildRequires: libpcap-devel BuildRequires: golang(API) >= 1.15 @@ -99,9 +100,7 @@ container runtimes. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 %build make %{?_smp_mflags} exes WEAVE_VERSION=%{version} ++++++ 0001-cni-Add-cniVersion-to-Result.patch ++++++ >From ef8fa923030d9b6da3ca014689871b0108486e31 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <fv...@suse.de> Date: Tue, 29 Mar 2022 15:24:49 +0200 Subject: [PATCH] cni: Add cniVersion to Result Backport of https://github.com/containernetworking/cni/commit/27a5b994c2a55d1fceca08ec88139b61d4ad55fd --- .../cni/pkg/types/020/types.go | 16 +++++++++------- .../cni/pkg/types/current/types.go | 11 ++++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go index 666cfe93..2833aba7 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go @@ -23,9 +23,9 @@ import ( "github.com/containernetworking/cni/pkg/types" ) -const implementedSpecVersion string = "0.2.0" +const ImplementedSpecVersion string = "0.2.0" -var SupportedVersions = []string{"", "0.1.0", implementedSpecVersion} +var SupportedVersions = []string{"", "0.1.0", ImplementedSpecVersion} // Compatibility types for CNI version 0.1.0 and 0.2.0 @@ -39,7 +39,7 @@ func NewResult(data []byte) (types.Result, error) { func GetResult(r types.Result) (*Result, error) { // We expect version 0.1.0/0.2.0 results - result020, err := r.GetAsVersion(implementedSpecVersion) + result020, err := r.GetAsVersion(ImplementedSpecVersion) if err != nil { return nil, err } @@ -52,18 +52,20 @@ func GetResult(r types.Result) (*Result, error) { // Result is what gets returned from the plugin (via stdout) to the caller type Result struct { - IP4 *IPConfig `json:"ip4,omitempty"` - IP6 *IPConfig `json:"ip6,omitempty"` - DNS types.DNS `json:"dns,omitempty"` + CNIVersion string `json:"cniVersion,omitempty"` + IP4 *IPConfig `json:"ip4,omitempty"` + IP6 *IPConfig `json:"ip6,omitempty"` + DNS types.DNS `json:"dns,omitempty"` } func (r *Result) Version() string { - return implementedSpecVersion + return ImplementedSpecVersion } func (r *Result) GetAsVersion(version string) (types.Result, error) { for _, supportedVersion := range SupportedVersions { if version == supportedVersion { + r.CNIVersion = version return r, nil } } diff --git a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go index b89a5d3a..26e1dd96 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go @@ -63,8 +63,9 @@ func convertFrom020(result types.Result) (*Result, error) { } newResult := &Result{ - DNS: oldResult.DNS, - Routes: []*types.Route{}, + CNIVersion: implementedSpecVersion, + DNS: oldResult.DNS, + Routes: []*types.Route{}, } if oldResult.IP4 != nil { @@ -117,6 +118,7 @@ func convertFrom030(result types.Result) (*Result, error) { if !ok { return nil, fmt.Errorf("failed to convert result") } + newResult.CNIVersion = implementedSpecVersion return newResult, nil } @@ -134,6 +136,7 @@ func NewResultFromResult(result types.Result) (*Result, error) { // Result is what gets returned from the plugin (via stdout) to the caller type Result struct { + CNIVersion string `json:"cniVersion,omitempty"` Interfaces []*Interface `json:"interfaces,omitempty"` IPs []*IPConfig `json:"ips,omitempty"` Routes []*types.Route `json:"routes,omitempty"` @@ -143,7 +146,8 @@ type Result struct { // Convert to the older 0.2.0 CNI spec Result type func (r *Result) convertTo020() (*types020.Result, error) { oldResult := &types020.Result{ - DNS: r.DNS, + CNIVersion: types020.ImplementedSpecVersion, + DNS: r.DNS, } for _, ip := range r.IPs { @@ -195,6 +199,7 @@ func (r *Result) Version() string { func (r *Result) GetAsVersion(version string) (types.Result, error) { switch version { case "0.3.0", implementedSpecVersion: + r.CNIVersion = version return r, nil case types020.SupportedVersions[0], types020.SupportedVersions[1], types020.SupportedVersions[2]: return r.convertTo020() -- 2.34.1