Some CNI network plugins, maintained by the containernetworking team.
CentOS Sources
2019-01-31 93d6f76a11707f580a24b02cc8888c1071391948
commit | author | age
93d6f7 1 %global with_debug 1
95181b 2 %global with_check 0
CS 3
4 %if 0%{?with_debug}
5 %global _dwz_low_mem_die_limit 0
6 %else
7 %global debug_package   %{nil}
8 %endif
9
10 %if ! 0%{?gobuild:1}
93d6f7 11 %define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**};
95181b 12 %endif
CS 13
14 %global provider        github
15 %global provider_tld    com
16 %global project         containernetworking
17 %global repo            plugins
18 # https://github.com/containernetworking/plugins
19 %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
20 %global import_path     %{provider_prefix}
93d6f7 21 %global commit          9ebe139e77e82afb122e335328007bca86905ae4
95181b 22 %global shortcommit     %(c=%{commit}; echo ${c:0:7})
CS 23
24 Name:           containernetworking-plugins
93d6f7 25 Version:        0.7.4
ba6a76 26 Release:        1%{?dist}
95181b 27 Summary:        Some CNI network plugins, maintained by the containernetworking team.
CS 28 License:        ASL 2.0
29 URL:            https://%{provider_prefix}
30 Source0:        https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
93d6f7 31 ExclusiveArch:  aarch64 %{arm} ppc64le s390x x86_64
95181b 32
93d6f7 33 %if 0%{?fedora} || 0%{?centos}
CS 34 BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
35 %else
36 BuildRequires: go-toolset-1.10
37 BuildRequires: openssl-devel
38 %endif #fedora
95181b 39
93d6f7 40 Provides: containernetworking-cni = %{version}-%{release}
95181b 41
CS 42 %description
43 The CNI (Container Network Interface) project consists of a specification
44 and libraries for writing plugins to configure network interfaces in Linux
45 containers, along with a number of supported plugins. CNI concerns itself
46 only with network connectivity of containers and removing allocated resources
47 when the container is deleted.
48
93d6f7 49 %{?enable_gotoolset110}
95181b 50
CS 51 %prep
93d6f7 52 %autosetup -Sgit -n %{repo}-%{commit}
95181b 53
CS 54 %build
93d6f7 55 export ORG_PATH="%{provider}.%{provider_tld}/%{project}"
CS 56 export REPO_PATH="$ORG_PATH/%{repo}"
57
58 if [ ! -h gopath/src/${REPO_PATH} ]; then
59    mkdir -p gopath/src/${ORG_PATH}
60    ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
61 fi
62
63 export GOPATH=$(pwd)/gopath
64 mkdir -p $(pwd)/bin
65
66 echo "Building plugins"
67 export PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/sample"
68 for d in $PLUGINS; do
69    if [ -d "$d" ]; then
70       plugin="$(basename "$d")"
71       echo "  $plugin"
72       %gobuild -o "${PWD}/bin/$plugin" "$@" "$REPO_PATH"/$d
73    fi
74 done
95181b 75
CS 76 %install
77 install -d -p %{buildroot}%{_libexecdir}/cni/
78 install -p -m 0755 bin/* %{buildroot}/%{_libexecdir}/cni
79
80 %check
93d6f7 81 %if 0%{?with_check}
95181b 82
CS 83 %if ! 0%{?gotest:1}
84 %global gotest go test
85 %endif
86
87 %gotest %{import_path}/libcni
88 %gotest %{import_path}/pkg/invoke
89 %gotest %{import_path}/pkg/ip
90 %gotest %{import_path}/pkg/ipam
91 %gotest %{import_path}/pkg/ns
92 %gotest %{import_path}/pkg/skel
93 %gotest %{import_path}/pkg/types
94 %gotest %{import_path}/pkg/types/020
95 %gotest %{import_path}/pkg/types/current
96 %gotest %{import_path}/pkg/utils
97 %gotest %{import_path}/pkg/utils/hwaddr
98 %gotest %{import_path}/pkg/version
99 %gotest %{import_path}/pkg/version/legacy_examples
100 %gotest %{import_path}/pkg/version/testhelpers
101 %gotest %{import_path}/plugins/ipam/dhcp
102 %gotest %{import_path}/plugins/ipam/host-local
103 %gotest %{import_path}/plugins/ipam/host-local/backend/allocator
104 %gotest %{import_path}/plugins/main/bridge
105 %gotest %{import_path}/plugins/main/ipvlan
106 %gotest %{import_path}/plugins/main/loopback
107 %gotest %{import_path}/plugins/main/macvlan
108 %gotest %{import_path}/plugins/main/ptp
109 %gotest %{import_path}/plugins/meta/flannel
110 %gotest %{import_path}/plugins/test/noop
111 %endif
112
113 #define license tag if not already defined
114 %{!?_licensedir:%global license %doc}
115
116 %files
117 %license LICENSE
118 %doc *.md
119 %dir %{_libexecdir}/cni
120 %{_libexecdir}/cni/*
121
122 %changelog
93d6f7 123 * Mon Jan 07 2019 Lokesh Mandvekar <lsm5@redhat.com> - 0.7.4-1
CS 124 - Resolves: #1664009 - bump to v0.7.4
125 - remove unused devel and unit-test* packages
126 - update go build env
127
128 * Wed Nov 21 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.3-3
129 - buildrequires for centos
130
131 * Wed Oct 03 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.3-2
132 - rebase
133
134 * Wed Oct 03 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.1-2
135 - scl go toolset
136
ba6a76 137 * Mon Jul 23 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.1-1
CS 138 - rebase
139
95181b 140 * Thu May 10 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.0-101
CS 141 - rebase
142 - patches already upstream, removed
143
144 * Thu Apr 26 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.6.0-6
145 - Imported from Fedora
146 - Renamed CNI -> plugins
147
148 * Mon Apr  2 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.6.0-4
149 - Own the libexec cni directory
150
151 * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
152 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
153
154 * Tue Jan 23 2018 Dan Williams <dcbw@redhat.com> - 0.6.0-2
155 - skip settling IPv4 addresses
156
157 * Mon Jan 08 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.6.0-1
158 - rebased to 7480240de9749f9a0a5c8614b17f1f03e0c06ab9
159
160 * Fri Oct 13 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-7
161 - do not install to /opt (against Fedora Guidelines)
162
163 * Thu Aug 24 2017 Jan Chaloupka <jchaloup@redhat.com> - 0.5.2-6
164 - Enable devel subpackage
165
166 * Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-5
167 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
168
169 * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4
170 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
171
172 * Thu Jul 13 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-3
173 - excludearch: ppc64 as it's not in goarches anymore
174 - re-enable s390x
175
176 * Fri Jun 30 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-2
177 - upstream moved to github.com/containernetworking/plugins
178 - built commit dcf7368
179 - provides: containernetworking-plugins
180 - use vendored deps because they're a lot less of a PITA
181 - excludearch: s390x for now (rhbz#1466865)
182
183 * Mon Jun 12 2017 Timothy St. Clair <tstclair@heptio.com> - 0.5.2-1
184 - Update to 0.5.2 
185 - Softlink to default /opt/cni/bin directories
186
187 * Sun May 07 2017 Timothy St. Clair <tstclair@heptio.com> - 0.5.1-1
188 - Initial package
189