## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 16; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global with_debug 1 %if 0%{?with_debug} %global _find_debuginfo_dwz_opts %{nil} %global _dwz_low_mem_die_limit 0 %else %global debug_package %{nil} %endif %global provider github %global provider_tld com %global project containernetworking %global repo plugins %global import_path %{provider}.%{provider_tld}/%{project}/%{repo} %global git0 https://%{import_path} %global built_tag v1.1.1 %global built_tag_strip %(b=%{built_tag}; echo ${b:1}) %global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"}) Name: %{project}-%{repo} Version: 1.1.1 Release: %autorelease License: Apache-2.0 and BSD-2-Clause and BSD-3-Clause and MIT and MPL-2.0 Summary: Libraries for writing CNI plugin URL: %{git0} # Tarball fetched from upstream Source0: %{url}/archive/%{built_tag}.tar.gz ExclusiveArch: %{golang_arches} BuildRequires: golang >= 1.16.6 BuildRequires: systemd-devel BuildRequires: go-rpm-macros BuildRequires: go-md2man Requires: systemd Obsoletes: %{project}-cni < 0.7.1-2 Provides: %{project}-cni = %{version}-%{release} Provides: kubernetes-cni Provides: container-network-stack = 1 # vendored libraries # 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' Provides: bundled(golang(github.com/Microsoft/go_winio)) = v0.4.17 Provides: bundled(golang(github.com/Microsoft/hcsshim)) = v0.8.20 Provides: bundled(golang(github.com/alexflint/go_filemutex)) = v1.1.0 Provides: bundled(golang(github.com/buger/jsonparser)) = v1.1.1 Provides: bundled(golang(github.com/containerd/cgroups)) = v1.0.1 Provides: bundled(golang(github.com/containernetworking/cni)) = v1.0.1 Provides: bundled(golang(github.com/coreos/go_iptables)) = v0.6.0 Provides: bundled(golang(github.com/coreos/go_systemd/v22)) = v22.3.2 Provides: bundled(golang(github.com/d2g/dhcp4)) = v0.0.0_20170904100407_a1d1b6c41b1c Provides: bundled(golang(github.com/d2g/dhcp4client)) = v1.0.0 Provides: bundled(golang(github.com/d2g/dhcp4server)) = v0.0.0_20181031114812_7d4a0a7f59a5 Provides: bundled(golang(github.com/fsnotify/fsnotify)) = v1.4.9 Provides: bundled(golang(github.com/godbus/dbus/v5)) = v5.0.4 Provides: bundled(golang(github.com/gogo/protobuf)) = v1.3.2 Provides: bundled(golang(github.com/golang/groupcache)) = v0.0.0_20200121045136_8c9f03a8e57e Provides: bundled(golang(github.com/mattn/go_shellwords)) = v1.0.12 Provides: bundled(golang(github.com/networkplumbing/go_nft)) = v0.2.0 Provides: bundled(golang(github.com/nxadm/tail)) = v1.4.8 Provides: bundled(golang(github.com/onsi/ginkgo)) = v1.16.4 Provides: bundled(golang(github.com/onsi/gomega)) = v1.15.0 Provides: bundled(golang(github.com/pkg/errors)) = v0.9.1 Provides: bundled(golang(github.com/safchain/ethtool)) = v0.0.0_20210803160452_9aa261dae9b1 Provides: bundled(golang(github.com/sirupsen/logrus)) = v1.8.1 Provides: bundled(golang(github.com/vishvananda/netlink)) = v1.1.1_0.20210330154013_f5de75959ad5 Provides: bundled(golang(github.com/vishvananda/netns)) = v0.0.0_20210104183010_2eb08e3e575f %description The CNI (Container Network Interface) project consists of a specification and libraries for writing plugins to configure network interfaces in Linux containers, along with a number of supported plugins. CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted. %prep %autosetup -p1 -n %{repo}-%{built_tag_strip} rm -rf plugins/main/windows # Use correct paths in cni-dhcp unitfiles sed -i 's/\/opt\/cni\/bin/\%{_prefix}\/libexec\/cni/' plugins/ipam/dhcp/systemd/cni-dhcp.service %build export ORG_PATH="%{provider}.%{provider_tld}/%{project}" export REPO_PATH="$ORG_PATH/%{repo}" if [ ! -h gopath/src/${REPO_PATH} ]; then mkdir -p gopath/src/${ORG_PATH} ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 fi export GOPATH=$(pwd)/gopath mkdir -p $(pwd)/bin echo "Building plugins" export PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/sample" for d in $PLUGINS; do if [ -d "$d" ]; then plugin="$(basename "$d")" echo " $plugin" %gobuild -o "${PWD}/bin/$plugin" "$@" "$REPO_PATH"/$d fi done %install install -d -p %{buildroot}%{_libexecdir}/cni/ install -p -m 0755 bin/* %{buildroot}/%{_libexecdir}/cni install -dp %{buildroot}%{_unitdir} install -p plugins/ipam/dhcp/systemd/cni-dhcp.service %{buildroot}%{_unitdir} install -p plugins/ipam/dhcp/systemd/cni-dhcp.socket %{buildroot}%{_unitdir} #define license tag if not already defined %{!?_licensedir:%global license %doc} %files %license LICENSE %doc *.md %dir %{_libexecdir}/cni %{_libexecdir}/cni/* %{_unitdir}/cni-dhcp.service %{_unitdir}/cni-dhcp.socket %changelog * Wed Mar 08 2023 Lokesh Mandvekar 1.1.1-16 - Resolves: #2161274, #2163068 - Rebuild for CVE-2022-41717 * Mon Mar 06 2023 Lokesh Mandvekar 1.1.1-15 - migrated to SPDX license * Thu Jan 19 2023 Fedora Release Engineering 1.1.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Oct 28 2022 Troy Dawson 1.1.1-13 - Add ExclusiveArch * Mon Oct 10 2022 Lokesh Mandvekar 1.1.1-12 - remove debbuild macros to comply with Fedora guidelines * Thu Aug 18 2022 Lokesh Mandvekar 1.1.1-11 - no bundled provides for debbuild * Wed Aug 17 2022 Lokesh Mandvekar 1.1.1-10 - use easier tag macros to make both fedora and debbuild happy * Tue Aug 16 2022 Lokesh Mandvekar 1.1.1-9 - enable debbuild * Thu Jul 21 2022 Maxwell G 1.1.1-8 - Fix FTBFS * Wed Jul 20 2022 Fedora Release Engineering 1.1.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 19 2022 Maxwell G 1.1.1-6 - Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in golang * Sat Jun 18 2022 Robert-André Mauchin 1.1.1-5 - Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191, CVE-2022-29526, CVE-2022-30629 * Fri Jun 17 2022 Robert-André Mauchin 1.1.1-4 - Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191, CVE-2022-29526, CVE-2022-30629 * Mon May 30 2022 Lokesh Mandvekar 1.1.1-3 - remove unused macros * Mon May 30 2022 RH Container Bot 1.1.1-2 - auto bump to v1.1.1 * Fri Apr 01 2022 Lokesh Mandvekar 1.1.1-1 - bump to v1.1.1 * Mon Mar 07 2022 Lokesh Mandvekar 1.1.0-1 - bump to v1.1.0 * Wed Feb 02 2022 Lokesh Mandvekar 1.0.1-4 - Provides: container-network-stack = 1 * Mon Jan 24 2022 Lokesh Mandvekar 1.0.1-3 - switch to autospec and Provides: container-network-stack * Wed Jan 19 2022 Fedora Release Engineering 1.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Sep 08 2021 RH Container Bot 1.0.1-1 - containernetworking-plugins-1.0.1-1 * Thu Aug 19 2021 Lokesh Mandvekar 1.0.0-14 - containernetworking-plugins-1.0.0-21 - fix release tag and built v1.0.0 * Mon Aug 16 2021 RH Container Bot 1.0.0-13 - containernetworking-plugins-1.0.0-1 * Mon Aug 02 2021 Lokesh Mandvekar 1.0.0-12 - containernetworking-plugins-1.0.0-20.1.git2876cd5 - Resolves: #1983596, #1987737 - Security fix for CVE-2021-34558 * Wed Jul 21 2021 Fedora Release Engineering 1.0.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jul 21 2021 Fedora Release Engineering 1.0.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jun 17 2021 RH Container Bot 1.0.0-9 - containernetworking-plugins-1.0.0-18.1.git2876cd5 - autobuilt 2876cd5 * Mon Jun 14 2021 Lokesh Mandvekar 1.0.0-8 - containernetworking-plugins-1.0.0-17.1.git5238c13 - BR: go-rpm-macros to re-enable debuginfo * Sat Jun 12 2021 Kevin Fenzi 1.0.0-7 - Disable debug packages to get rawhide composing. * Mon Jun 07 2021 Lokesh Mandvekar 1.0.0-6 - containernetworking-plugins-1.0.0-15.1.git5238c13 - Resolves: #1962008 - use correct plugin path in unitfile * Mon Jun 07 2021 Lokesh Mandvekar 1.0.0-5 - Resolves: #1962008 * Thu Jun 03 2021 RH Container Bot 1.0.0-4 - containernetworking-plugins-1.0.0-14.1.git5238c13 - autobuilt 5238c13 * Thu May 27 2021 RH Container Bot 1.0.0-3 - containernetworking-plugins-1.0.0-13.1.git78702e9 - autobuilt 78702e9 * Thu May 20 2021 RH Container Bot 1.0.0-2 - containernetworking-plugins-1.0.0-12.1.git6618a0a - autobuilt 6618a0a * Thu May 06 2021 RH Container Bot 1.0.0-1 - containernetworking-plugins-1.0.0-11.1.git8de0287 - bump to 1.0.0 - autobuilt 8de0287 * Tue Apr 20 2021 RH Container Bot 0.9.1-10 - containernetworking-plugins-0.9.1-10.1.gitb41052c - autobuilt b41052c * Wed Mar 10 2021 RH Container Bot 0.9.1-9 - containernetworking-plugins-0.9.1-9.1.git2989aba - autobuilt 2989aba * Mon Mar 08 2021 Lokesh Mandvekar 0.9.1-8 - containernetworking-plugins-0.9.1-8.1.gitd385120 - fix build issues * Wed Mar 03 2021 RH Container Bot 0.9.1-7 - containernetworking-plugins-0.9.1-7.1.gitd385120 - autobuilt d385120 * Wed Mar 03 2021 RH Container Bot 0.9.1-6 - containernetworking-plugins-0.9.1-6.1.git1c1799e - autobuilt 1c1799e * Wed Mar 03 2021 RH Container Bot 0.9.1-5 - containernetworking-plugins-0.9.1-5.1.git0ea07b8 - autobuilt 0ea07b8 * Wed Feb 24 2021 RH Container Bot 0.9.1-4 - containernetworking-plugins-0.9.1-4.1.git47927f5 - autobuilt 47927f5 * Wed Feb 24 2021 RH Container Bot 0.9.1-3 - containernetworking-plugins-0.9.1-3.1.git8936113 - autobuilt 8936113 * Mon Feb 15 2021 Lokesh Mandvekar 0.9.1-2 - containernetworking-plugins-0.9.1-2.1.gitfa48f75 - Resolves: #1928513 - install cni-dhcp unitfiles * Fri Feb 05 2021 Lokesh Mandvekar 0.9.1-1 - containernetworking-plugins-0.9.1-1.1.gitfa48f75 - built fa48f75 * Fri Feb 05 2021 Lokesh Mandvekar 0.9.0-7 - include CVE ID in changelog * Fri Feb 05 2021 Lokesh Mandvekar 0.9.0-6 - containernetworking-plugins-0.9.0-27.1.git74a6b28 - Resolves: #1919391,1925399 * Wed Jan 27 2021 RH Container Bot 0.9.0-5 - containernetworking-plugins-0.9.0-26.1.git8feef71 - autobuilt 8feef71 * Tue Jan 26 2021 Fedora Release Engineering 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jan 20 2021 RH Container Bot 0.9.0-3 - containernetworking-plugins-0.9.0-24.1.git8c66d68 - autobuilt 8c66d68 * Mon Jan 11 2021 RH Container Bot 0.9.0-2 - containernetworking-plugins-0.9.0-23.1.git48a97a7 - autobuilt 48a97a7 * Thu Jan 07 2021 RH Container Bot 0.9.0-1 - containernetworking-plugins-0.9.0-22.1.git3819ef7 - bump to 0.9.0 - autobuilt 3819ef7 * Wed Dec 09 2020 RH Container Bot 0.8.7-9 - containernetworking-plugins-0.8.7-21.1.gite13bab9 - autobuilt e13bab9 * Wed Nov 25 2020 RH Container Bot 0.8.7-8 - containernetworking-plugins-0.8.7-20.1.git509d645 - autobuilt 509d645 * Thu Nov 19 2020 RH Container Bot 0.8.7-7 - containernetworking-plugins-0.8.7-19.1.gitcccf539 - autobuilt cccf539 * Thu Nov 12 2020 RH Container Bot 0.8.7-6 - containernetworking-plugins-0.8.7-18.1.git8aad973 - autobuilt 8aad973 * Thu Nov 05 2020 RH Container Bot 0.8.7-5 - containernetworking-plugins-0.8.7-17.1.gitccd872b - autobuilt ccd872b * Fri Oct 23 2020 RH Container Bot 0.8.7-4 - containernetworking-plugins-0.8.7-16.1.git440dcc3 - autobuilt 440dcc3 * Thu Oct 15 2020 RH Container Bot 0.8.7-3 - containernetworking-plugins-0.8.7-15.1.gita9abbaf - autobuilt a9abbaf * Thu Oct 08 2020 RH Container Bot 0.8.7-2 - containernetworking-plugins-0.8.7-14.1.git6df03d7 - autobuilt 6df03d7 * Wed Sep 16 2020 RH Container Bot 0.8.7-1 - containernetworking-plugins-0.8.7-13.1.gite78e6aa - bump to 0.8.7 - autobuilt e78e6aa * Wed Aug 26 2020 RH Container Bot 0.8.6-12 - containernetworking-plugins-0.8.6-12.1.git9b8de6a - autobuilt 9b8de6a * Wed Aug 05 2020 RH Container Bot 0.8.6-11 - containernetworking-plugins-0.8.6-11.1.gitbd58999 - autobuilt bd58999 * Wed Aug 05 2020 RH Container Bot 0.8.6-10 - containernetworking-plugins-0.8.6-10.1.git8a88f90 - autobuilt 8a88f90 * Mon Jul 27 2020 Fedora Release Engineering 0.8.6-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jul 22 2020 RH Container Bot 0.8.6-8 - containernetworking-plugins-0.8.6-8.1.gitd713ec6 - autobuilt d713ec6 * Wed Jul 15 2020 RH Container Bot 0.8.6-7 - containernetworking-plugins-0.8.6-7.1.git6eb8e31 - autobuilt 6eb8e31 * Wed Jul 08 2020 RH Container Bot 0.8.6-6 - containernetworking-plugins-0.8.6-6.1.gitc90b165 - autobuilt c90b165 * Wed Jul 01 2020 RH Container Bot 0.8.6-5 - containernetworking-plugins-0.8.6-5.1.git28773dc - autobuilt 28773dc * Wed Jun 24 2020 RH Container Bot 0.8.6-4 - containernetworking-plugins-0.8.6-4.1.gite1f8f9b - autobuilt e1f8f9b * Wed Jun 03 2020 RH Container Bot 0.8.6-3 - containernetworking-plugins-0.8.6-3.1.git1fb9793 - autobuilt 1fb9793 * Wed May 27 2020 RH Container Bot 0.8.6-2 - containernetworking-plugins-0.8.6-2.1.gitb76fdd7 - autobuilt b76fdd7 * Fri May 15 2020 Lokesh Mandvekar 0.8.6-1 - containernetworking-plugins-0.8.6-1.1.gitad10b6f - correct version tag * Wed May 13 2020 RH Container Bot 0.8.5-12 - containernetworking-plugins-0.8.5-8.1.gitad10b6f - autobuilt ad10b6f * Wed Apr 29 2020 RH Container Bot 0.8.5-11 - containernetworking-plugins-0.8.5-7.1.gitf7a2fc9 - autobuilt f7a2fc9 * Wed Apr 22 2020 RH Container Bot 0.8.5-10 - containernetworking-plugins-0.8.5-6.1.git5af9ff4 - autobuilt 5af9ff4 * Wed Apr 15 2020 RH Container Bot 0.8.5-9 - containernetworking-plugins-0.8.5-5.1.gita78853f - autobuilt a78853f * Wed Apr 08 2020 RH Container Bot 0.8.5-8 - containernetworking-plugins-0.8.5-4.1.gitf4332fe - autobuilt f4332fe * Wed Apr 01 2020 RH Container Bot 0.8.5-7 - containernetworking-plugins-0.8.5-3.1.git117e30f - autobuilt 117e30f * Fri Mar 20 2020 RH Container Bot 0.8.5-6 - containernetworking-plugins-0.8.5-2.1.git47a9fd8 - autobuilt 47a9fd8 * Mon Feb 03 2020 Lokesh Mandvekar 0.8.5-5 - disable debuginfo for centos * Mon Feb 03 2020 Lokesh Mandvekar 0.8.5-4 - GO111MODULE=off * Mon Feb 03 2020 Lokesh Mandvekar 0.8.5-3 - use BR: golang * Mon Feb 03 2020 Lokesh Mandvekar 0.8.5-2 - use go-md2man as builddep * Thu Jan 30 2020 Lokesh Mandvekar 0.8.5-1 - containernetworking-plugins-0.8.5-1.1.gitf5c3d1b - bump to v0.8.5 - autobuilt f5c3d1b * Tue Jan 28 2020 Fedora Release Engineering 0.8.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Sep 18 2019 Lokesh Mandvekar (Bot) 0.8.2-4 - containernetworking-plugins-0.8.2-0.4.dev.git291ab6c - autobuilt 291ab6c * Wed Sep 11 2019 Lokesh Mandvekar (Bot) 0.8.2-3 - containernetworking-plugins-0.8.2-0.3.dev.git23d5525 - autobuilt 23d5525 * Wed Sep 11 2019 Lokesh Mandvekar (Bot) 0.8.2-2 - containernetworking-plugins-0.8.2-0.2.dev.git4bb2881 - autobuilt 4bb2881 * Wed Aug 28 2019 Lokesh Mandvekar (Bot) 0.8.2-1 - containernetworking-plugins-0.8.2-0.1.dev.git7e68430 - bump to 0.8.2 - autobuilt 7e68430 * Wed Aug 14 2019 Lokesh Mandvekar (Bot) 0.8.1-9 - containernetworking-plugins-0.8.1-7.1.dev.git485be65 - autobuilt 485be65 * Wed Aug 14 2019 Lokesh Mandvekar (Bot) 0.8.1-8 - containernetworking-plugins-0.8.1-6.1.dev.gitc9e1c0c - autobuilt c9e1c0c * Mon Aug 12 2019 Lokesh Mandvekar (Bot) 0.8.1-7 - containernetworking-plugins-0.8.1-5.1.dev.git2d6d4b2 - autobuilt 2d6d4b2 * Wed Aug 07 2019 Lokesh Mandvekar (Bot) 0.8.1-6 - containernetworking-plugins-0.8.1-4.1.dev.gitccd683e - autobuilt ccd683e * Wed Jul 31 2019 Lokesh Mandvekar 0.8.1-5 - built_tag macro records exact upstream tag built * Wed Jul 24 2019 Lokesh Mandvekar (Bot) 0.8.1-4 - containernetworking-plugins-0.8.1-3.1.dev.gitded2f17 - autobuilt ded2f17 * Thu Jul 18 2019 Lokesh Mandvekar (Bot) 0.8.1-3 - containernetworking-plugins-0.8.1-2.1.dev.git7ba2bcf - autobuilt 7ba2bcf * Wed Jul 10 2019 Lokesh Mandvekar 0.8.1-2 - containernetworking-plugins-0.8.1-1.1.dev.git966bbcb - built 966bbcb - hook up to autobuild * Fri Jun 07 2019 Lokesh Mandvekar 0.8.1-1 - containernetworking-plugins-0.8.1-1 - bump to v0.8.1 * Fri May 31 2019 Lokesh Mandvekar 0.7.5-3 - add centos7 conditionals * Fri May 31 2019 Lokesh Mandvekar 0.7.5-2 - BR: git and remove ExcludeArch * Fri May 31 2019 Lokesh Mandvekar 0.7.5-1 - containernetworking-plugins-0.7.5-1 - Resolves: #1715758 - CVE-2019-9946 - bump to v0.7.5 * Wed Feb 27 2019 Jason Brooks 0.7.4-2 - add provides kubernetes-cni for upstream kubelet compat * Wed Feb 13 2019 Lokesh Mandvekar 0.7.4-1 - containernetworking-plugins-0.7.4-1 - bump to v0.7.4 * Thu Jan 31 2019 Fedora Release Engineering 0.7.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Thu Aug 30 2018 Lokesh Mandvekar 0.7.3-2 - containernetworking-plugins-0.7.3-2 - correct upgrade path from older -cni package - for whatever reason, "<" works but "<=" doesn't for obsoletion * Mon Aug 20 2018 Lokesh Mandvekar 0.7.3-1 - containernetworking-plugins-0.7.3-1 - Resolves: #1613909 - rename package to containernetworking-plugins - Obsoletes containernetworking-cni - bump to v0.7.3