1
1
%global with_debug 1
2
+
2
3
%if 0%{?with_debug }
3
4
%global _find_debuginfo_dwz_opts %{nil }
4
5
%global _dwz_low_mem_die_limit 0
5
6
%else
6
7
%global debug_package %{nil }
7
8
%endif
9
+
8
10
%global provider github
9
11
%global provider_tld com
10
12
%global project containernetworking
11
13
%global repo plugins
12
14
%global provider_prefix %{provider }.%{provider_tld }/%{project }/%{repo }
13
15
%global import_path %{provider_prefix }
14
16
%global git0 https://%{import_path }
17
+
15
18
# Used for comparing with latest upstream tag
16
19
# to decide whether to autobuild (non-rawhide only)
17
20
%define built_tag v1.1.1
18
21
%define built_tag_strip %(b= %{built_tag }; echo ${b:1})
19
22
%global gen_version %(b= %{built_tag_strip }; echo ${b/-/"~"})
20
23
%define download_url %{git0 }/archive/%{built_tag }.tar.gz
21
- Summary: Libraries for writing CNI plugin
22
- Name: %{project }-%{repo }
23
- Version: 1.1.1
24
- Release: 4%{?dist }
25
- License: Apache-2.0 AND BSD AND MIT
26
- Vendor: Microsoft Corporation
27
- Distribution: Mariner
28
- URL: %{git0 }
29
- Source0: %{download_url }#/%{name}-%{version}.tar.gz
30
- BuildRequires: git
31
- BuildRequires: go-md2man
32
- BuildRequires: go-rpm-macros
24
+
25
+ Name: %{project }-%{repo }
26
+ Version: 1.1.1
27
+ Release: 3%{?dist }
28
+ Summary: Libraries for writing CNI plugin
29
+ License: ASL 2.0 and BSD and MIT
30
+ Vendor: Microsoft Corporation
31
+ Distribution: Mariner
32
+ URL: %{git0 }
33
+ Source0: %{download_url }#/%{name}-%{version}.tar.gz
33
34
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
34
- BuildRequires: golang
35
- BuildRequires: systemd-devel
36
- Requires: systemd
37
- Obsoletes: %{project }-cni < 0.7.1-2
38
- Provides: %{project }-cni = %{version }-%{release }
39
- Provides: kubernetes-cni
40
- Provides: container-network-stack = 1
35
+ BuildRequires: golang
36
+ BuildRequires: git
37
+ BuildRequires: go-md2man
38
+ BuildRequires: go-rpm-macros
39
+ BuildRequires: systemd-devel
40
+ Requires: systemd
41
+
42
+
43
+ Obsoletes: %{project }-cni < 0.7.1-2
44
+ Provides: %{project }-cni = %{version }-%{release }
45
+ Provides: kubernetes-cni
46
+ Provides: container-network-stack = 1
41
47
# vendored libraries
42
48
# awk '{print "Provides: bundled(golang("$1")) = "$2}' go.mod | sort | uniq | sed -e 's/-/_/g' -e '/bundled(golang())/d' -e '/bundled(golang(go\|module\|replace\|require))/d'
43
- Provides: bundled(golang(github.com/Microsoft/go_winio)) = v0.4.17
44
- Provides: bundled(golang(github.com/Microsoft/hcsshim)) = v0.8.20
45
- Provides: bundled(golang(github.com/alexflint/go_filemutex)) = v1.1.0
46
- Provides: bundled(golang(github.com/buger/jsonparser)) = v1.1.1
47
- Provides: bundled(golang(github.com/containerd/cgroups)) = v1.0.1
48
- Provides: bundled(golang(github.com/containernetworking/cni)) = v1.0.1
49
- Provides: bundled(golang(github.com/coreos/go_iptables)) = v0.6.0
50
- Provides: bundled(golang(github.com/coreos/go_systemd/v22)) = v22.3.2
51
- Provides: bundled(golang(github.com/d2g/dhcp4)) = v0.0.0_20170904100407_a1d1b6c41b1c
52
- Provides: bundled(golang(github.com/d2g/dhcp4client)) = v1.0.0
53
- Provides: bundled(golang(github.com/d2g/dhcp4server)) = v0.0.0_20181031114812_7d4a0a7f59a5
54
- Provides: bundled(golang(github.com/fsnotify/fsnotify)) = v1.4.9
55
- Provides: bundled(golang(github.com/godbus/dbus/v5)) = v5.0.4
56
- Provides: bundled(golang(github.com/gogo/protobuf)) = v1.3.2
57
- Provides: bundled(golang(github.com/golang/groupcache)) = v0.0.0_20200121045136_8c9f03a8e57e
58
- Provides: bundled(golang(github.com/mattn/go_shellwords)) = v1.0.12
59
- Provides: bundled(golang(github.com/networkplumbing/go_nft)) = v0.2.0
60
- Provides: bundled(golang(github.com/nxadm/tail)) = v1.4.8
61
- Provides: bundled(golang(github.com/onsi/ginkgo)) = v1.16.4
62
- Provides: bundled(golang(github.com/onsi/gomega)) = v1.15.0
63
- Provides: bundled(golang(github.com/pkg/errors)) = v0.9.1
64
- Provides: bundled(golang(github.com/safchain/ethtool)) = v0.0.0_20210803160452_9aa261dae9b1
65
- Provides: bundled(golang(github.com/sirupsen/logrus)) = v1.8.1
66
- Provides: bundled(golang(github.com/vishvananda/netlink)) = v1.1.1_0.20210330154013_f5de75959ad5
67
- Provides: bundled(golang(github.com/vishvananda/netns)) = v0.0.0_20210104183010_2eb08e3e575f
49
+ Provides: bundled(golang(github.com/Microsoft/go_winio)) = v0.4.17
50
+ Provides: bundled(golang(github.com/Microsoft/hcsshim)) = v0.8.20
51
+ Provides: bundled(golang(github.com/alexflint/go_filemutex)) = v1.1.0
52
+ Provides: bundled(golang(github.com/buger/jsonparser)) = v1.1.1
53
+ Provides: bundled(golang(github.com/containerd/cgroups)) = v1.0.1
54
+ Provides: bundled(golang(github.com/containernetworking/cni)) = v1.0.1
55
+ Provides: bundled(golang(github.com/coreos/go_iptables)) = v0.6.0
56
+ Provides: bundled(golang(github.com/coreos/go_systemd/v22)) = v22.3.2
57
+ Provides: bundled(golang(github.com/d2g/dhcp4)) = v0.0.0_20170904100407_a1d1b6c41b1c
58
+ Provides: bundled(golang(github.com/d2g/dhcp4client)) = v1.0.0
59
+ Provides: bundled(golang(github.com/d2g/dhcp4server)) = v0.0.0_20181031114812_7d4a0a7f59a5
60
+ Provides: bundled(golang(github.com/fsnotify/fsnotify)) = v1.4.9
61
+ Provides: bundled(golang(github.com/godbus/dbus/v5)) = v5.0.4
62
+ Provides: bundled(golang(github.com/gogo/protobuf)) = v1.3.2
63
+ Provides: bundled(golang(github.com/golang/groupcache)) = v0.0.0_20200121045136_8c9f03a8e57e
64
+ Provides: bundled(golang(github.com/mattn/go_shellwords)) = v1.0.12
65
+ Provides: bundled(golang(github.com/networkplumbing/go_nft)) = v0.2.0
66
+ Provides: bundled(golang(github.com/nxadm/tail)) = v1.4.8
67
+ Provides: bundled(golang(github.com/onsi/ginkgo)) = v1.16.4
68
+ Provides: bundled(golang(github.com/onsi/gomega)) = v1.15.0
69
+ Provides: bundled(golang(github.com/pkg/errors)) = v0.9.1
70
+ Provides: bundled(golang(github.com/safchain/ethtool)) = v0.0.0_20210803160452_9aa261dae9b1
71
+ Provides: bundled(golang(github.com/sirupsen/logrus)) = v1.8.1
72
+ Provides: bundled(golang(github.com/vishvananda/netlink)) = v1.1.1_0.20210330154013_f5de75959ad5
73
+ Provides: bundled(golang(github.com/vishvananda/netns)) = v0.0.0_20210104183010_2eb08e3e575f
68
74
69
75
%description
70
76
The CNI (Container Network Interface) project consists of a specification
@@ -73,6 +79,7 @@ containers, along with a number of supported plugins. CNI concerns itself
73
79
only with network connectivity of containers and removing allocated resources
74
80
when the container is deleted.
75
81
82
+
76
83
%prep
77
84
%autosetup -Sgit -n %{repo }-%{built_tag_strip }
78
85
rm -rf plugins/main/windows
@@ -110,6 +117,9 @@ install -dp %{buildroot}%{_unitdir}
110
117
install -p plugins/ipam/dhcp/systemd/cni-dhcp.service %{buildroot }%{_unitdir }
111
118
install -p plugins/ipam/dhcp/systemd/cni-dhcp.socket %{buildroot }%{_unitdir }
112
119
120
+ #define license tag if not already defined
121
+ %{! ?_licensedir:%global license %doc }
122
+
113
123
%files
114
124
%license LICENSE
115
125
%doc * .md
@@ -119,9 +129,6 @@ install -p plugins/ipam/dhcp/systemd/cni-dhcp.socket %{buildroot}%{_unitdir}
119
129
%{_unitdir }/cni-dhcp.socket
120
130
121
131
%changelog
122
- *
Tue Nov 01 2022 Ameya Usgaonkar <[email protected] > -
1.1.1-4
123
- - Move to core packages
124
-
125
132
*
Tue Nov 01 2022 Olivia Crain <[email protected] > -
1.1.1-3
126
133
- Bump release to rebuild with go 1.18.8
127
134
0 commit comments