Warning: Permanently added '44.212.63.183' (ED25519) to the list of known hosts. You can reproduce this build on your computer by running: sudo dnf install copr-rpmbuild /usr/bin/copr-rpmbuild --verbose --drop-resultdir --srpm --task-url https://copr.fedorainfracloud.org/backend/get-srpm-build-task/9386755 Version: 1.3 PID: 8960 Logging PID: 8961 Task: {'appstream': False, 'background': False, 'build_id': 9386755, 'chroot': 'fedora-42-x86_64', 'package_name': 'ocm-cli', 'project_dirname': 'tools', 'project_name': 'tools', 'project_owner': 'ocm', 'repos': [], 'sandbox': 'ocm/tools--fbergman', 'source_json': {'builddeps': 'jq', 'chroot': 'fedora-42-x86_64', 'hook_data': True, 'repos': '', 'resultdir': '', 'script': '# Check that the event payload exists:\n' 'if [[ ! -f hook_payload ]]; then\n' ' echo "Event payload file \'hook_payload\' doesn\'t exist"\n' ' exit 1\n' 'fi\n' '\n' '# Check that the event is the creation of a tag:\n' 'ref_type=$(cat hook_payload | jq -r .ref_type)\n' 'if [[ "${ref_type}" != "tag" ]]; then\n' ' echo "Expected reference type \'tag\' but got \'${ref_type}\'"\n' ' exit 1\n' 'fi\n' '\n' '# Check that the tag is well formed:\n' 'ref=$(cat hook_payload | jq -r .ref)\n' 'if [[ ! "${ref}" =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+$ ]]; then\n' ' echo "Reference \'${ref}\' isn\'t well formed"\n' ' exit 1\n' 'fi\n' '\n' '# Set the version to use:\n' 'version="${ref:1}"\n' '\n' '# Set the date:\n' "date=$(date +'%a %b %d %Y')\n" '\n' '# Generate the .spec file:\n' 'cat > ocm-cli.spec.in <<"."\n' '%global debug_package %{nil}\n' '\n' 'Name: ocm-cli\n' 'Version: @version@\n' 'Release: 1%{?dist}\n' 'Summary: CLI for the Red Hat OpenShift Cluster Manager\n' 'License: ASL 2.0\n' 'URL: https://github.com/openshift-online/ocm-cli\n' 'Source: https://github.com/openshift-online/ocm-cli/archive/v@version@.tar.gz\n' '\n' '# We need to download Go explicitly because in most of the platforms that we\n' '# use the version available is too old.\n' '%define go_tar https://go.dev/dl/go1.20.4.linux-amd64.tar.gz\n' '%define go_sum 698ef3243972a51ddb4028e4a1ac63dc6d60821bf18e59a807e051fee0a385bd\n' '\n' 'BuildRequires: curl\n' 'BuildRequires: git\n' 'BuildRequires: make\n' '\n' '%description\n' 'CLI for the Red Hat OpenShift Cluster Manager\n' '\n' '%prep\n' '%setup\n' '\n' '%build\n' '\n' '# Create the Go directories:\n' 'export GOROOT="${PWD}/.goroot"\n' 'export GOPATH="${PWD}/.gopath"\n' 'mkdir "${GOROOT}" "${GOPATH}"\n' 'PATH="${GOROOT}/bin:${PATH}"\n' '\n' '# Download and install Go:\n' 'curl --location --output go.tar.gz %{go_tar}\n' 'echo %{go_sum} go.tar.gz | sha256sum --check\n' 'tar --directory "${GOROOT}" --extract --strip-components 1 --file go.tar.gz\n' '\n' '# Build the binary:\n' 'make\n' '\n' '%install\n' 'install -m 0755 -d %{buildroot}%{_bindir}\n' 'install -m 0755 ocm %{buildroot}%{_bindir}\n' '\n' '%clean\n' '# This is necessary because Go writes its cache files and directories without\n' "# write permission, and that means that a rgular `rm` can't remove them.\n" 'find .gopath -exec chmod +w {} \\;\n' 'rm -rf .gopath\n' '\n' '%files\n' '%license LICENSE.txt\n' '%doc README.md\n' '%doc CHANGES.md\n' '%{_bindir}/*\n' '\n' '%changelog\n' '* @date@ OCM - @version@\n' '- Automatic build for version @version@.\n' '.\n' 'sed \\\n' ' -e "s/@version@/${version}/g" \\\n' ' -e "s/@date@/${date}/g" \\\n' ' < ocm-cli.spec.in \\\n' ' > ocm-cli.spec\n', 'tmp': 'tmpk_2_txab'}, 'source_type': 9, 'submitter': 'fbergman', 'task_id': '9386755'} Network error: Request client error on https://copr.fedorainfracloud.org/tmp/tmpk_2_txab/hook_payload: 404 NOT FOUND