380758
%global with_check 0
380758
380758
%global _find_debuginfo_dwz_opts %{nil}
380758
%global _dwz_low_mem_die_limit 0
380758
380758
%if ! 0%{?gobuild:1}
380758
%define gobuild(o:) \
5bc927
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback no_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**};
380758
%define gotest(o:) go test
380758
%endif
380758
380758
%global provider github
380758
%global provider_tld com
380758
%global project containernetworking
380758
%global repo plugins
380758
# https://github.com/containernetworking/plugins
380758
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
380758
%global import_path %{provider_prefix}
380758
380758
Name: containernetworking-plugins
9c18a6
Version: 1.0.0
5bc927
Release: 1%{?dist}
380758
Summary: CNI network plugins
380758
License: ASL 2.0
380758
URL: https://%{provider_prefix}
380758
Source0: https://%{provider_prefix}/archive/v%{version}.tar.gz
5bc927
# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
5bc927
#ExclusiveArch: %%{go_arches}
5bc927
# still use arch exclude as the macro above still refers %%{ix86} in RHEL8.4:
5bc927
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
5bc927
ExcludeArch: %{ix86}
380758
BuildRequires: golang >= 1.12.12-4
380758
BuildRequires: git
380758
BuildRequires: go-md2man
380758
Provides: containernetworking-cni = %{version}-%{release}
380758
380758
%description
380758
The CNI (Container Network Interface) project consists of a specification
380758
and libraries for writing plugins to configure network interfaces in Linux
380758
containers, along with a number of supported plugins. CNI concerns itself
380758
only with network connectivity of containers and removing allocated resources
380758
when the container is deleted.
380758
380758
%prep
380758
%autosetup -Sgit -n %{repo}-%{version}
380758
rm -rf plugins/main/windows
380758
380758
%build
380758
export ORG_PATH="%{provider}.%{provider_tld}/%{project}"
380758
export REPO_PATH="$ORG_PATH/%{repo}"
380758
380758
if [ ! -h gopath/src/${REPO_PATH} ]; then
380758
	mkdir -p gopath/src/${ORG_PATH}
380758
	ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
380758
fi
380758
380758
export GOPATH=$(pwd)/gopath
380758
export GO111MODULE=off
5bba99
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
380758
mkdir -p $(pwd)/bin
380758
380758
echo "Building plugins"
380758
export PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/sample"
380758
for d in $PLUGINS; do
380758
	if [ -d "$d" ]; then
380758
		plugin="$(basename "$d")"
380758
		echo "  $plugin"
380758
		%gobuild -o "${PWD}/bin/$plugin" "$@" "$REPO_PATH"/$d
380758
	fi
380758
done
380758
380758
%install
380758
install -d -p %{buildroot}%{_libexecdir}/cni/
380758
install -p -m 0755 bin/* %{buildroot}/%{_libexecdir}/cni
380758
380758
%check
380758
%if 0%{?with_check}
380758
# Since we aren't packaging up the vendor directory we need to link
380758
# back to it somehow. Hack it up so that we can add the vendor
380758
# directory from BUILD dir as a gopath to be searched when executing
380758
# tests from the BUILDROOT dir.
380758
ln -s ./ ./vendor/src # ./vendor/src -> ./vendor
380758
380758
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
380758
380758
%gotest %{import_path}/libcni
380758
%gotest %{import_path}/pkg/invoke
380758
%gotest %{import_path}/pkg/ip
380758
%gotest %{import_path}/pkg/ipam
380758
%gotest %{import_path}/pkg/ns
380758
%gotest %{import_path}/pkg/skel
380758
%gotest %{import_path}/pkg/types
380758
%gotest %{import_path}/pkg/types/020
380758
%gotest %{import_path}/pkg/types/current
380758
%gotest %{import_path}/pkg/utils
380758
%gotest %{import_path}/pkg/utils/hwaddr
380758
%gotest %{import_path}/pkg/version
380758
%gotest %{import_path}/pkg/version/legacy_examples
380758
%gotest %{import_path}/pkg/version/testhelpers
380758
%gotest %{import_path}/plugins/ipam/dhcp
380758
%gotest %{import_path}/plugins/ipam/host-local
380758
%gotest %{import_path}/plugins/ipam/host-local/backend/allocator
380758
%gotest %{import_path}/plugins/main/bridge
380758
%gotest %{import_path}/plugins/main/ipvlan
380758
%gotest %{import_path}/plugins/main/loopback
380758
%gotest %{import_path}/plugins/main/macvlan
380758
%gotest %{import_path}/plugins/main/ptp
380758
%gotest %{import_path}/plugins/meta/flannel
380758
%gotest %{import_path}/plugins/test/noop
380758
%endif
380758
380758
#define license tag if not already defined
380758
%{!?_licensedir:%global license %doc}
380758
380758
%files
380758
%license LICENSE
380758
%doc *.md
380758
%dir %{_libexecdir}/cni
380758
%{_libexecdir}/cni/*
380758
380758
%changelog
9c18a6
* Thu Aug 12 2021 Jindrich Novy <jnovy@redhat.com> - 1.0.0-1
9c18a6
- update to https://github.com/containernetworking/plugins/releases/tag/v1.0.0
9c18a6
- Related: #1934415
9c18a6
9b109b
* Sat Feb 06 2021 Jindrich Novy <jnovy@redhat.com> - 0.9.1-1
9b109b
- update to https://github.com/containernetworking/plugins/releases/tag/v0.9.1
9b109b
- Related: #1883490
9b109b
5bc927
* Thu Dec 10 2020 Jindrich Novy <jnovy@redhat.com> - 0.9.0-1
5bc927
- update to https://github.com/containernetworking/plugins/releases/tag/v0.9.0
c5ecbf
- Related: #1883490
5bc927
5bc927
* Tue Dec 08 2020 Jindrich Novy <jnovy@redhat.com> - 0.8.7-3
5bc927
- use ExcludeArch: i686 again as the go_arches macro is broken
c5ecbf
- Related: #1883490
5bc927
469d3e
* Thu Nov 05 2020 Jindrich Novy <jnovy@redhat.com> - 0.8.7-2
469d3e
- attempt to fix linker error with golang-1.15
c5ecbf
- Related: #1883490
469d3e
c5ecbf
* Wed Oct 21 2020 Jindrich Novy <jnovy@redhat.com> - 0.8.7-1
c5ecbf
- synchronize with stream-container-tools-rhel8
c5ecbf
- Related: #1883490
469d3e
5bba99
* Tue Aug 11 2020 Jindrich Novy <jnovy@redhat.com> - 0.8.6-2
5bba99
- propagate proper CFLAGS to CGO_CFLAGS to assure code hardening and optimization
5bba99
- Related: #1821193
5bba99
380758
* Thu May 14 2020 Jindrich Novy <jnovy@redhat.com> - 0.8.6-1
380758
- update to https://github.com/containernetworking/plugins/releases/tag/v0.8.6
380758
- Related: #1821193
380758
380758
* Tue May 12 2020 Jindrich Novy <jnovy@redhat.com> - 0.8.5-1
380758
- synchronize containter-tools 8.3.0 with 8.2.1
380758
- Related: #1821193
380758
380758
* Thu Dec 12 2019 Jindrich Novy <jnovy@redhat.com> - 0.8.3-5
380758
- compile with no_openssl
380758
- Related: RHELPLAN-25139
380758
380758
* Wed Dec 11 2019 Jindrich Novy <jnovy@redhat.com> - 0.8.3-4
380758
- compile in FIPS mode
380758
- Related: RHELPLAN-25139
380758
380758
* Mon Dec 09 2019 Jindrich Novy <jnovy@redhat.com> - 0.8.3-3
380758
- be sure to use golang >= 1.12.12-4
380758
- Related: RHELPLAN-25139
380758
380758
* Wed Dec 04 2019 Jindrich Novy <jnovy@redhat.com> - 0.8.3-2
380758
- build with GO111MODULE=off
380758
- Related: RHELPLAN-25139
380758
380758
* Wed Dec 04 2019 Jindrich Novy <jnovy@redhat.com> - 0.8.3-1
380758
- update to 0.8.3
380758
- Related: RHELPLAN-25139
380758
380758
* Thu Aug 01 2019 Jindrich Novy <jnovy@redhat.com> - 0.8.1-2
380758
- backport https://github.com/coreos/go-iptables/pull/62
380758
  from Michael Cambria
380758
- Resolves: #1627561
380758
380758
* Thu Jun 13 2019 Lokesh Mandvekar <lsm5@redhat.com> - 0.8.1-1
380758
- Resolves: #1720319 - bump to v0.8.1
380758
380758
* Sat Jun 01 2019 Lokesh Mandvekar <lsm5@redhat.com> - 0.7.5-1
380758
- Resolves: #1616063
380758
- bump to v0.7.5
380758
380758
* Tue Dec 18 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.4-3.git9ebe139
380758
- re-enable debuginfo
380758
380758
* Mon Dec 17 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.4-2.git9ebe139
380758
- rebase, removed patch that is already upstream
380758
380758
* Mon Dec 17 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.3-7.git19f2f28
380758
- go tools not in scl anymore
380758
380758
* Mon Aug 27 2018 Lokesh Mandvekar <lsm5@redhat.com> - 0.7.3-6.git19f2f28
380758
- correct tag specification format in %%gobuild macro
380758
380758
* Fri Aug 24 2018 Lokesh Mandvekar <lsm5@redhat.com> - 0.7.3-5.git19f2f28
380758
- Resolves: #1616062 - patch to revert coreos/go-iptables bump
380758
380758
* Wed Aug 08 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.3-4.git19f2f28
380758
- Resolves:#1603012
380758
- fix versioning, upstream got it wrong at 7.2
380758
380758
* Tue Aug 07 2018 Lokesh Mandvekar <lsm5@redhat.com> - 0.7.2-3.git19f2f28
380758
- disable i686 temporarily for appstream builds
380758
- update golang deps and gobuild definition
380758
380758
* Mon Aug 06 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.2-2.git19f2f28
380758
- rebase
380758
380758
* Thu Jul 12 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.0-103.gitdd8ff8a
380758
- enable scl with the toolset
380758
380758
* Tue Jul 03 2018 Lokesh Mandvekar <lsm5@redhat.com> - 0.7.0-102.gitdd8ff8a
380758
- remove devel and unittest subpackages
380758
- use new go-toolset deps
380758
 
380758
* Thu May 10 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.7.0-101
380758
- rebase
380758
- patches already upstream, removed
380758
380758
* Thu Apr 26 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.6.0-6
380758
- Imported from Fedora
380758
- Renamed CNI -> plugins
380758
380758
* Mon Apr  2 2018 Peter Robinson <pbrobinson@fedoraproject.org> 0.6.0-4
380758
- Own the libexec cni directory
380758
380758
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
380758
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
380758
380758
* Tue Jan 23 2018 Dan Williams <dcbw@redhat.com> - 0.6.0-2
380758
- skip settling IPv4 addresses
380758
380758
* Mon Jan 08 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.6.0-1
380758
- rebased to 7480240de9749f9a0a5c8614b17f1f03e0c06ab9
380758
380758
* Fri Oct 13 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-7
380758
- do not install to /opt (against Fedora Guidelines)
380758
380758
* Thu Aug 24 2017 Jan Chaloupka <jchaloup@redhat.com> - 0.5.2-6
380758
- Enable devel subpackage
380758
380758
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-5
380758
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
380758
380758
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-4
380758
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
380758
380758
* Thu Jul 13 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-3
380758
- excludearch: ppc64 as it's not in goarches anymore
380758
- re-enable s390x
380758
380758
* Fri Jun 30 2017 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.5.2-2
380758
- upstream moved to github.com/containernetworking/plugins
380758
- built commit dcf7368
380758
- provides: containernetworking-plugins
380758
- use vendored deps because they're a lot less of a PITA
380758
- excludearch: s390x for now (rhbz#1466865)
380758
380758
* Mon Jun 12 2017 Timothy St. Clair <tstclair@heptio.com> - 0.5.2-1
380758
- Update to 0.5.2 
380758
- Softlink to default /opt/cni/bin directories
380758
380758
* Sun May 07 2017 Timothy St. Clair <tstclair@heptio.com> - 0.5.1-1
380758
- Initial package
380758