New Upstream Snapshot - golang-github-containerd-go-cni

Ready changes

Summary

Merged new upstream version: 1.1.7+git20221026.1.f108694 (was: 1.1.7).

Resulting package

Built on 2022-12-20T09:23 (took 3m0s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots golang-github-containerd-go-cni-dev

Lintian Result

Diff

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index aa92ca4..0000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,95 +0,0 @@
-name: CI
-
-on:
-  push:
-    branches: [ main ]
-  pull_request:
-    branches: [ main ]
-
-jobs:
-
-  checks:
-    name: Project Checks
-    runs-on: ubuntu-18.04
-    timeout-minutes: 5
-
-    steps:
-      - uses: actions/setup-go@v3
-        with:
-          go-version: 1.17.x
-
-      - name: Set env
-        shell: bash
-        run: |
-          echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
-          echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
-
-      - uses: actions/checkout@v3
-        with:
-          path: src/github.com/containerd/go-cni
-          fetch-depth: 25
-
-      - uses: containerd/project-checks@v1
-        with:
-          working-directory: src/github.com/containerd/go-cni
-
-      - uses: containerd/project-checks@v1
-        with:
-          working-directory: src/github.com/containerd/go-cni/integration
-
-  linters:
-    name: Linters
-    runs-on: ${{ matrix.os }}
-    timeout-minutes: 10
-
-    strategy:
-      matrix:
-        go-version: [1.17.x]
-        os: [ubuntu-18.04]
-
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          path: src/github.com/containerd/go-cni
-
-      - uses: actions/setup-go@v3
-        with:
-          go-version: ${{ matrix.go }}
-
-      - name: Set env
-        shell: bash
-        run: |
-          echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
-          echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
-
-      - uses: golangci/golangci-lint-action@v3
-        with:
-          version: v1.45.2
-          working-directory: src/github.com/containerd/go-cni
-
-  tests:
-    name: Tests
-    runs-on: ubuntu-18.04
-    timeout-minutes: 5
-
-    steps:
-      - uses: actions/checkout@v3
-        with:
-          path: src/github.com/containerd/go-cni
-
-      - uses: actions/setup-go@v3
-        with:
-          go-version: 1.17.x
-
-      - name: Set env
-        shell: bash
-        run: |
-          echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
-          echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
-
-      - run: |
-          bash -x script/install-cni
-          sudo make clean V=1
-          make test V=1
-          sudo make integration V=1
-        working-directory: src/github.com/containerd/go-cni
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 0424951..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/bin/
-coverage.txt
-profile.out
diff --git a/.golangci.yml b/.golangci.yml
index 673fd33..1e066a1 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,7 +1,5 @@
 linters:
   enable:
-    - structcheck
-    - varcheck
     - staticcheck
     - unconvert
     - gofmt
diff --git a/debian/changelog b/debian/changelog
index 861ec0f..c68b35c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-containerd-go-cni (1.1.7+git20221026.1.f108694-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Tue, 20 Dec 2022 09:21:43 -0000
+
 golang-github-containerd-go-cni (1.1.7-2) unstable; urgency=medium
 
   [ Shengjing Zhu ]
diff --git a/integration/cni_setup_teardown_linux_test.go b/integration/cni_setup_teardown_linux_test.go
index 612cc2f..a95bd12 100644
--- a/integration/cni_setup_teardown_linux_test.go
+++ b/integration/cni_setup_teardown_linux_test.go
@@ -35,7 +35,6 @@ import (
 	"context"
 	"crypto/rand"
 	"fmt"
-	"io/ioutil"
 	"os"
 	"path"
 	"runtime"
@@ -146,7 +145,7 @@ func TestBasicSetupAndRemove(t *testing.T) {
 	defer os.RemoveAll(tmpPluginConfDir)
 
 	assert.NoError(t,
-		ioutil.WriteFile(
+		os.WriteFile(
 			path.Join(tmpPluginConfDir, "10-gocni-test-net.conflist"),
 			[]byte(cniBridgePluginCfg),
 			0600,
@@ -231,7 +230,7 @@ func TestBasicSetupAndRemovePluginWithoutVersion(t *testing.T) {
 	defer os.RemoveAll(tmpPluginConfDir)
 
 	assert.NoError(t,
-		ioutil.WriteFile(
+		os.WriteFile(
 			path.Join(tmpPluginConfDir, "10-gocni-test-net.conflist"),
 			[]byte(cniBridgePluginCfgWithoutVersion),
 			0600,
diff --git a/result.go b/result.go
index 7bc1155..02957dd 100644
--- a/result.go
+++ b/result.go
@@ -32,13 +32,18 @@ type IPConfig struct {
 // Result contains the network information returned by CNI.Setup
 //
 // a) Interfaces list. Depending on the plugin, this can include the sandbox
-//    (eg, container or hypervisor) interface name and/or the host interface
-//    name, the hardware addresses of each interface, and details about the
-//    sandbox (if any) the interface is in.
+//
+//	(eg, container or hypervisor) interface name and/or the host interface
+//	name, the hardware addresses of each interface, and details about the
+//	sandbox (if any) the interface is in.
+//
 // b) IP configuration assigned to each  interface. The IPv4 and/or IPv6 addresses,
-//    gateways, and routes assigned to sandbox and/or host interfaces.
+//
+//	gateways, and routes assigned to sandbox and/or host interfaces.
+//
 // c) DNS information. Dictionary that includes DNS information for nameservers,
-//     domain, search domains and options.
+//
+//	domain, search domains and options.
 type Result struct {
 	Interfaces map[string]*Config
 	DNS        []types.DNS
diff --git a/testutils.go b/testutils.go
index d9453c8..0807e20 100644
--- a/testutils.go
+++ b/testutils.go
@@ -18,14 +18,13 @@ package cni
 
 import (
 	"fmt"
-	"io/ioutil"
 	"os"
 	"path"
 	"testing"
 )
 
 func makeTmpDir(prefix string) (string, error) {
-	tmpDir, err := ioutil.TempDir(os.TempDir(), prefix)
+	tmpDir, err := os.MkdirTemp("", prefix)
 	if err != nil {
 		return "", err
 	}
diff --git a/types.go b/types.go
index 0b7db1e..18616c0 100644
--- a/types.go
+++ b/types.go
@@ -17,12 +17,9 @@
 package cni
 
 const (
-	CNIPluginName        = "cni"
-	DefaultNetDir        = "/etc/cni/net.d"
-	DefaultCNIDir        = "/opt/cni/bin"
-	DefaultMaxConfNum    = 1
-	VendorCNIDirTemplate = "%s/opt/%s/bin"
-	DefaultPrefix        = "eth"
+	CNIPluginName     = "cni"
+	DefaultMaxConfNum = 1
+	DefaultPrefix     = "eth"
 )
 
 type config struct {
diff --git a/types_others.go b/types_others.go
new file mode 100644
index 0000000..4550ca5
--- /dev/null
+++ b/types_others.go
@@ -0,0 +1,25 @@
+//go:build !windows
+
+/*
+   Copyright The containerd Authors.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
+package cni
+
+const (
+	DefaultNetDir        = "/etc/cni/net.d"
+	DefaultCNIDir        = "/opt/cni/bin"
+	VendorCNIDirTemplate = "%s/opt/%s/bin"
+)
diff --git a/types_windows.go b/types_windows.go
new file mode 100644
index 0000000..5e174e0
--- /dev/null
+++ b/types_windows.go
@@ -0,0 +1,24 @@
+//go:build windows
+
+/*
+   Copyright The containerd Authors.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+*/
+
+package cni
+
+const (
+	DefaultNetDir = "C:\\Program Files\\containerd\\cni\\conf"
+	DefaultCNIDir = "C:\\Program Files\\containerd\\cni\\bin"
+)

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/share/gocode/src/github.com/containerd/go-cni/types_others.go
-rw-r--r--  root/root   /usr/share/gocode/src/github.com/containerd/go-cni/types_windows.go

No differences were encountered in the control files

More details

Full run details