rpm-software-management / mock

Mock is a tool for a reproducible build of RPM packages.
GNU General Public License v2.0
384 stars 235 forks source link

curl error without url #1457

Closed juhp closed 2 months ago

juhp commented 2 months ago

Short description of the problem

I noticed this srpm failure in koji:

https://kojipkgs.fedoraproject.org/work/tasks/2977/123842977/root.log which ends with:

DEBUG util.py:558:  Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '2c52994faafa4bcfa7f7af34ff13080c', '-D', '/var/lib/mock/f42-build-53812154-6463704/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.oqgoum0c:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--chdir=/chroot_tmpdir/scmroot/llama-cpp', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;<mock-chroot>\\007"', '--setenv=PS1=<mock-chroot> \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'fedpkg', 'sources'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False
DEBUG util.py:461:    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
DEBUG util.py:461:                                   Dload  Upload   Total   Spent    Left  Speed
DEBUG util.py:461:  
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
DEBUG util.py:461:  curl: (22) The requested URL returned error: 404
DEBUG util.py:610:  Child return code was: 22
DEBUG util.py:185:  kill orphans in chroot /var/lib/mock/f42-build-53812154-6463704/root
DEBUG util.py:185:  kill orphans in chroot /var/lib/mock/f42-build-53812154-6463704-bootstrap/root

Output of rpm -q mock

INFO buildroot.py:605: Mock Version: 5.6

Steps to reproduce issue

$ fedpkg clone llama-cpp
$ cd llama-cpp
$ fedpkg scratch-build --arches x86_64

or fbrnch scratch-x86.

I didn't try local mock build (but fedpkg local seems to work).

Any additional notes

Basically I wonder if the error message could be improved to mention the url?

xsuchy commented 2 months ago

The information is there (albeit well hidden in heap of other information). The command that fails is fedpkg sources And I guess it then calls the curl that emits the error.

I was about to say that this was some network issue, but I submitted the scratch build of this package too and it failed too.

On the other hand, fedpkg mockbuild passes without a problem. So this is does not seems to be a Mock issue. I advice to open fedora-infra ticket with Koji issue https://pagure.io/fedora-infrastructure/issues

praiskup commented 2 months ago

There's also this: https://kojipkgs.fedoraproject.org/work/tasks/2977/123842977/checkout.log

If I do: $ git checkout 14bc2eade72946527ecfc44e4ed5b6eaef84bd23

Then I get: 09:27:35 /tmp/llama-cpp$ fedpkg sources Parsing specfile for used sources failed: Repo in inconsistent state: HEAD is a detached symbolic reference as it points to '14bc2eade72946527ecfc44e4ed5b6eaef84bd23' Falling back to downloading all sources. Downloading llama.cpp-b3184.tar.gz from https://src.fedoraproject.org/repo/pkgs ######################################################################## 100.0% Remove downloaded invalid file /tmp/llama-cpp/llama.cpp-b3184.tar.gz

So the llama.cpp-b3184.tar.gz file has not been uploaded to dist-git. This seems like a problem in package (in particular commit).

praiskup commented 2 months ago

Anyway, @juhp thank you for opening the issue here!

juhp commented 2 months ago

Okay thanks, sorry about that.

Indeed a bit confusing since attempting to upload, fedpkg says the sources are uploaded... but seems some mismatch indeed as Miroslav also said and Kevin in matrix when I first asked. Anyway it's not actually "my" package so...

Thanks for clarifying: I will try to add checkout.log support to koji-tool.