File: cni_plugin_path.patch

package info (click to toggle)
singularity-container 4.1.5%2Bds4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,876 kB
  • sloc: asm: 14,840; sh: 3,190; ansic: 1,751; awk: 414; makefile: 413; python: 99
file content (38 lines) | stat: -rw-r--r-- 1,571 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Last-Update: 2019-11-14
Forwarded: not-needed
Author: Dmitry Smirnov <onlyjob@debian.org>
Description: set path to CNI plugins as provided by "containernetworking-plugins" package.

--- a/internal/pkg/runtime/engine/singularity/container_linux.go
+++ b/internal/pkg/runtime/engine/singularity/container_linux.go
@@ -62,7 +62,7 @@
 var defaultCNIConfPath = filepath.Join(buildcfg.SYSCONFDIR, "singularity", "network")
 
 // defaultCNIPluginPath is the default directory to CNI plugins executables.
-var defaultCNIPluginPath = filepath.Join(buildcfg.LIBEXECDIR, "singularity", "cni")
+var defaultCNIPluginPath = filepath.Join("/usr/lib/cni")
 
 type lastMount struct {
 	dest  string
--- a/internal/pkg/test/tool/require/require.go
+++ b/internal/pkg/test/tool/require/require.go
@@ -97,7 +97,7 @@
 
 		cniPath := new(network.CNIPath)
 		cniPath.Conf = filepath.Join(buildcfg.SYSCONFDIR, "singularity", "network")
-		cniPath.Plugin = filepath.Join(buildcfg.LIBEXECDIR, "singularity", "cni")
+		cniPath.Plugin = filepath.Join("/usr/lib/cni")
 
 		setup, err := network.NewSetup([]string{"bridge"}, "_test_", nsPath, cniPath)
 		if err != nil {
--- a/pkg/network/network_linux_test.go
+++ b/pkg/network/network_linux_test.go
@@ -112,7 +112,7 @@
 var defaultCNIConfPath = ""
 
 // defaultCNIPluginPath is the default directory to CNI plugins executables
-var defaultCNIPluginPath = filepath.Join(buildcfg.LIBEXECDIR, "singularity", "cni")
+var defaultCNIPluginPath = filepath.Join("/usr/lib/cni")
 
 // testNetworks will contains configured network
 var testNetworks []string