Bug 1676596
| Summary: | using the make_srpm method gives "Error: Failed to synchronize cache for repo 'fedora'" error | ||
|---|---|---|---|
| Product: | [Internal] Red Hat Internal Copr | Reporter: | Dave Cantrell <dcantrell> |
| Component: | builder | Assignee: | Pavel Raiskup <praiskup> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | praiskup |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-12-11 14:48:23 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
For completeness, here's the log of the most recent failure:
Warning: Permanently added '10.8.30.228' (ECDSA) to the list of known hosts.
Running: /usr/bin/copr-rpmbuild --verbose --drop-resultdir --srpm --build-id 29688 --detached default
Version: 0.22
Task:
{'build_id': 29688,
'chroot': None,
'project_dirname': 'rpmdiff',
'project_name': 'rpmdiff',
'project_owner': 'dcantrel',
'source_json': {'clone_url': 'https://gitlab.cee.redhat.com/rpmdiff/rpmdiff.git',
'committish': '',
'spec': 'rpmdiff.spec',
'srpm_build_method': 'make_srpm',
'subdirectory': '',
'type': 'git'},
'source_type': 8,
'task_id': '29688'}
Running: git clone https://gitlab.cee.redhat.com/rpmdiff/rpmdiff.git /tmp/tmp1fwfu108/rpmdiff --depth 500 --no-single-branch
cmd: ['git', 'clone', 'https://gitlab.cee.redhat.com/rpmdiff/rpmdiff.git', '/tmp/tmp1fwfu108/rpmdiff', '--depth', '500', '--no-single-branch']
cwd: .
rc: 0
stdout:
stderr: Cloning into '/tmp/tmp1fwfu108/rpmdiff'...
Running: git checkout master
cmd: ['git', 'checkout', 'master']
cwd: /tmp/tmp1fwfu108/rpmdiff
rc: 0
stdout: Your branch is up to date with 'origin/master'.
stderr: Already on 'master'
Running: mock --uniqueext 1549986088.121862 -r /etc/copr-rpmbuild/make_srpm_mock.cfg --plugin-option=bind_mount:dirs=(("/tmp/tmp1fwfu108", "/mnt/tmp/tmp1fwfu108"), ("/var/lib/copr-rpmbuild/resultsaicibn5o", "/mnt/var/lib/copr-rpmbuild/resultsaicibn5o")) --chroot cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"
cmd: ['mock', '--uniqueext', '1549986088.121862', '-r', '/etc/copr-rpmbuild/make_srpm_mock.cfg', '--plugin-option=bind_mount:dirs=(("/tmp/tmp1fwfu108", "/mnt/tmp/tmp1fwfu108"), ("/var/lib/copr-rpmbuild/resultsaicibn5o", "/mnt/var/lib/copr-rpmbuild/resultsaicibn5o"))', '--chroot', 'cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"']
cwd: /tmp/tmp1fwfu108/rpmdiff
rc: 2
stdout: if [ -x /usr/bin/yum ]; then /usr/bin/yum install -y git; fi
if [ -x /usr/bin/dnf ]; then /usr/bin/dnf install -y git; fi
Error: Failed to synchronize cache for repo 'fedora'
make: *** [/mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile:5: srpm] Error 1
stderr: INFO: mock.py version 1.4.13 starting (python version = 3.6.8)...
Start: init plugins
INFO: tmpfs initialized
INFO: selinux enabled
INFO: compress_logs: initialized
Finish: init plugins
Start: run
Start: chroot init
INFO: mounting tmpfs at /var/lib/mock/fedora-28-x86_64-1549986088.121862/root.
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.13
INFO: Mock Version: 1.4.13
Start: dnf install
Finish: dnf install
Start: creating root cache
Finish: creating root cache
Finish: chroot init
INFO: Installed packages:
INFO: Running in chroot: ['cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"']
Start: chroot ['cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"']
Finish: chroot ['cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"']
ERROR: Command failed:
# /bin/sh -c cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"
Traceback (most recent call last):
File "/usr/bin/copr-rpmbuild", line 154, in main
action(args, config)
File "/usr/bin/copr-rpmbuild", line 242, in build_srpm
produce_srpm(task, config, resultdir)
File "/usr/bin/copr-rpmbuild", line 182, in produce_srpm
provider.produce_srpm()
File "/usr/lib/python3.6/site-packages/copr_rpmbuild/providers/scm.py", line 127, in produce_srpm
return run_cmd(cmd, cwd=self.repo_subpath)
File "/usr/lib/python3.6/site-packages/copr_rpmbuild/helpers.py", line 73, in run_cmd
raise RuntimeError(result.stderr)
RuntimeError: INFO: mock.py version 1.4.13 starting (python version = 3.6.8)...
Start: init plugins
INFO: tmpfs initialized
INFO: selinux enabled
INFO: compress_logs: initialized
Finish: init plugins
Start: run
Start: chroot init
INFO: mounting tmpfs at /var/lib/mock/fedora-28-x86_64-1549986088.121862/root.
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.13
INFO: Mock Version: 1.4.13
Start: dnf install
Finish: dnf install
Start: creating root cache
Finish: creating root cache
Finish: chroot init
INFO: Installed packages:
INFO: Running in chroot: ['cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"']
Start: chroot ['cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"']
Finish: chroot ['cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"']
ERROR: Command failed:
# /bin/sh -c cd /mnt/tmp/tmp1fwfu108/rpmdiff; make -f /mnt/tmp/tmp1fwfu108/rpmdiff/.copr/Makefile srpm outdir="/mnt/var/lib/copr-rpmbuild/resultsaicibn5o" spec="/mnt/tmp/tmp1fwfu108/rpmdiff/rpmdiff.spec"
I applied work-around for this: https://pagure.io/rhcopr/vm-provisioning/c/2461ddeb6df8c049af4af800d593a2589de6963f?branch=master Steps remaining: - proper fix would be to not have a need to patch copr-rpmbuild configuration, somehow - I also have to manage testing this feature (testing build http://coprbe.devel.redhat.com/results/praiskup/test-rpmdiff/srpm-builds/00029763/builder-live.log) I believe this has been fixed some time ago: https://pagure.io/copr/copr/c/efe5ba448b5a9f0e9164f23cff568141af79f156?branch=efe5ba448b5a9f0e9164f23cff568141af79f156 |
If I create a build using the make_srpm method, I regularly get this error when copr invokes .copr/Makefile to run the 'srpm' target: Error: Failed to synchronize cache for repo 'fedora' My .copr/Makefile looks like this: topdir := $(dir $(lastword $(MAKEFILE_LIST)))/.. srpm: yum install -y git $(MAKE) -C $(topdir) srpm MOCK_RESULT_DIR=$(outdir) I just have copr use my own project's Makefile's srpm target. That requires git because I use git archive in the Makefile. This is why I need git installed. The yum command causes the error message above. Performing a build locally starting from .copr/Makefile works fine. I have also checked the "enable networking during build" option in copr. In #copr, it was advised that I use another method for now such as custom, so I am going to try that. make_srpm seemed appealing to me because my project was already set up to generate an SRPM.