containernetworking-plugins/containernetworking-plugins.spec
Jindrich Novy 311a56d40d containernetworking-plugins-0.8.7-18.el9
- synchronize with stream-container-tools-rhel8

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
2020-10-29 08:38:50 +01:00

314 lines
11 KiB
RPMSpec

%global with_debug 1
%global with_check 0
%if 0%{?with_debug}
%global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif
%if ! 0%{?gobuild:1}
%define gobuild(o:) \
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback no_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};
%define gotest(o:) go test
%endif
%global provider github
%global provider_tld com
%global project containernetworking
%global repo plugins
# https://github.com/containernetworking/plugins
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
Name: containernetworking-plugins
Version: 0.8.7
Release: 18%{?dist}
Summary: CNI network plugins
License: ASL 2.0
URL: https://%{provider_prefix}
Source0: https://%{provider_prefix}/archive/v%{version}.tar.gz
ExcludeArch: ppc64 i686
BuildRequires: golang >= 1.12.12-4
BuildRequires: git
BuildRequires: go-md2man
Provides: containernetworking-cni = %{version}-%{release}
%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 -Sgit -n %{repo}-%{version}
rm -rf plugins/main/windows
%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
export GO111MODULE=off
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
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
%check
%if 0%{?with_check}
# Since we aren't packaging up the vendor directory we need to link
# back to it somehow. Hack it up so that we can add the vendor
# directory from BUILD dir as a gopath to be searched when executing
# tests from the BUILDROOT dir.
ln -s ./ ./vendor/src # ./vendor/src -> ./vendor
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%gotest %{import_path}/libcni
%gotest %{import_path}/pkg/invoke
%gotest %{import_path}/pkg/ip
%gotest %{import_path}/pkg/ipam
%gotest %{import_path}/pkg/ns
%gotest %{import_path}/pkg/skel
%gotest %{import_path}/pkg/types
%gotest %{import_path}/pkg/types/020
%gotest %{import_path}/pkg/types/current
%gotest %{import_path}/pkg/utils
%gotest %{import_path}/pkg/utils/hwaddr
%gotest %{import_path}/pkg/version
%gotest %{import_path}/pkg/version/legacy_examples
%gotest %{import_path}/pkg/version/testhelpers
%gotest %{import_path}/plugins/ipam/dhcp
%gotest %{import_path}/plugins/ipam/host-local
%gotest %{import_path}/plugins/ipam/host-local/backend/allocator
%gotest %{import_path}/plugins/main/bridge
%gotest %{import_path}/plugins/main/ipvlan
%gotest %{import_path}/plugins/main/loopback
%gotest %{import_path}/plugins/main/macvlan
%gotest %{import_path}/plugins/main/ptp
%gotest %{import_path}/plugins/meta/flannel
%gotest %{import_path}/plugins/test/noop
%endif
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
%files
%license LICENSE
%doc *.md
%dir %{_libexecdir}/cni
%{_libexecdir}/cni/*
%changelog
* Thu Oct 29 2020 Jindrich Novy <jnovy@redhat.com> - 0.8.7-18
- synchronize with stream-container-tools-rhel8
* Fri Oct 23 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.7-16.1.git440dcc3
- autobuilt 440dcc3
* Thu Oct 15 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.7-15.1.gita9abbaf
- autobuilt a9abbaf
* Thu Oct 8 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.7-14.1.git6df03d7
- autobuilt 6df03d7
* Wed Sep 16 16:12:38 UTC 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.7-13.1.gite78e6aa
- bump to 0.8.7
- autobuilt e78e6aa
* Wed Aug 26 16:11:38 UTC 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-12.1.git9b8de6a
- autobuilt 9b8de6a
* Wed Aug 05 20:10:15 GMT 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-11.1.gitbd58999
- autobuilt bd58999
* Wed Aug 05 16:10:19 GMT 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-10.1.git8a88f90
- autobuilt 8a88f90
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.6-9.1.gitd713ec6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 22 15:10:04 GMT 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-8.1.gitd713ec6
- autobuilt d713ec6
* Wed Jul 15 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-7.1.git6eb8e31
- autobuilt 6eb8e31
* Wed Jul 08 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-6.1.gitc90b165
- autobuilt c90b165
* Wed Jul 01 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-5.1.git28773dc
- autobuilt 28773dc
* Wed Jun 24 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-4.1.gite1f8f9b
- autobuilt e1f8f9b
* Wed Jun 03 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-3.1.git1fb9793
- autobuilt 1fb9793
* Wed May 27 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.6-2.1.gitb76fdd7
- autobuilt b76fdd7
* Thu May 14 2020 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.8.6-1.1.gitad10b6f
- correct version tag
* Wed May 13 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.5-8.1.gitad10b6f
- autobuilt ad10b6f
* Wed Apr 29 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.5-7.1.gitf7a2fc9
- autobuilt f7a2fc9
* Wed Apr 22 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.5-6.1.git5af9ff4
- autobuilt 5af9ff4
* Wed Apr 15 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.5-5.1.gita78853f
- autobuilt a78853f
* Wed Apr 08 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.5-4.1.gitf4332fe
- autobuilt f4332fe
* Wed Apr 01 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.5-3.1.git117e30f
- autobuilt 117e30f
* Fri Mar 20 2020 RH Container Bot <rhcontainerbot@fedoraproject.org> - 0.8.5-2.1.git47a9fd8
- autobuilt 47a9fd8
* Thu Jan 30 2020 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.8.5-1.1.gitf5c3d1b
- bump to v0.8.5
- autobuilt f5c3d1b
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-0.5.dev.git291ab6c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Sep 18 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.2-0.4.dev.git291ab6c
- autobuilt 291ab6c
* Wed Sep 11 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.2-0.3.dev.git23d5525
- autobuilt 23d5525
* Wed Sep 11 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.2-0.2.dev.git4bb2881
- autobuilt 4bb2881
* Wed Aug 28 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.2-0.1.dev.git7e68430
- bump to 0.8.2
- autobuilt 7e68430
* Wed Aug 14 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.1-7.1.dev.git485be65
- autobuilt 485be65
* Wed Aug 14 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.1-6.1.dev.gitc9e1c0c
- autobuilt c9e1c0c
* Mon Aug 12 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.1-5.1.dev.git2d6d4b2
- autobuilt 2d6d4b2
* Wed Aug 07 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.1-4.1.dev.gitccd683e
- autobuilt ccd683e
* Wed Jul 24 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.1-3.1.dev.gitded2f17
- autobuilt ded2f17
* Thu Jul 18 2019 Lokesh Mandvekar (Bot) <lsm5+bot@fedoraproject.org> - 0.8.1-2.1.dev.git7ba2bcf
- autobuilt 7ba2bcf
* Wed Jul 10 2019 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.8.1-1.1.dev.git966bbcb
- built 966bbcb
- hook up to autobuild
* Fri Jun 07 2019 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.8.1-1
- bump to v0.8.1
* Fri May 31 2019 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.7.5-1
- Resolves: #1715758 - CVE-2019-9946
- bump to v0.7.5
- BR: git
- remove ExcludeArch: ppc64
* Wed Feb 27 2019 Jason Brooks <jbrooks@redhat.com> - 0.7.4-2
- add Provides kubernetes-cni for compatibility with upstream kubelet package
* Wed Feb 13 2019 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.7.4-1
- bump to v0.7.4
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Aug 30 2018 Lokesh Mandvekar <lsm5@fedoraproject.org> - 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 <lsm5@fedoraproject.org> - 0.7.3-1
- Resolves: #1613909 - rename package to containernetworking-plugins
- Obsoletes containernetworking-cni
- bump to v0.7.3
* Wed Jul 18 2018 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.7.1-1
- Resolves: #1543200 - bump to v0.7.1
- remove patch in dist-git from 0.6.0-2 (already upstreamed)
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Apr 2 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.6.0-4
- Own the libexec cni directory
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Jan 23 2018 Dan Williams <dcbw@redhat.com> - 0.6.0-2
- skip settling IPv4 addresses
* Mon Jan 08 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.6.0-1
- rebased to 7480240de9749f9a0a5c8614b17f1f03e0c06ab9
* Fri Oct 13 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-7
- do not install to /opt (against Fedora Guidelines)
* Thu Aug 24 2017 Jan Chaloupka <jchaloup@redhat.com> - 0.5.2-6
- Enable devel subpackage
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jul 13 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-3
- excludearch: ppc64 as it's not in goarches anymore
- re-enable s390x
* Fri Jun 30 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-2
- upstream moved to github.com/containernetworking/plugins
- built commit dcf7368
- provides: containernetworking-plugins
- use vendored deps because they're a lot less of a PITA
- excludearch: s390x for now (rhbz#1466865)
* Mon Jun 12 2017 Timothy St. Clair <tstclair@heptio.com> - 0.5.2-1
- Update to 0.5.2
- Softlink to default /opt/cni/bin directories
* Sun May 07 2017 Timothy St. Clair <tstclair@heptio.com> - 0.5.1-1
- Initial package