# Generated by go2rpm 1.18.0 %bcond check 1 # https://github.com/cri-o/crio-credential-provider %global goipath github.com/cri-o/crio-credential-provider Version: 0.1.1 %gometa -L -f Name: crio-credential-provider Release: %autorelease Summary: CRI-O Credential Provider to authenticate image pulls for registry mirrors by using Kubernetes Secrets # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: go-vendor-tools Requires: crio Requires: iptables Recommends: kubernetes-cni %description CRI-O Credential Provider to authenticate image pulls for registry mirrors by using Kubernetes Secrets. This Provider is executed by CRI-O and not directly by users. It installs to the CRI-O libexecdir. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global build_timestamp %(date -u +'%Y-%m-%dT%H:%M:%SZ')_Release:%{release} %global registries_conf /etc/containers/registries.conf export GO_LDFLAGS=" -X %{goipath}/internal/version.buildDate=%{build_timestamp} -X %{goipath}/pkg/config.RegistriesConfPath=%{registries_conf} " %global gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/crio-credential-provider %{goipath}/cmd/crio-credential-provider %install %go_vendor_license_install -c %{S:2} # all Fedora cri-o packages create the /usr/libexec/crio directory install -m 0755 -vd %{buildroot}%{_libexecdir}/crio install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_libexecdir}/crio/ %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md %{_libexecdir}/crio/crio-credential-provider %changelog %autochangelog