Fedpkg kernel - different git repo results in 404 during build

I’m trying to set up Github Actions to build a modified version of the kernel package. I have a private Github repo 2bdkid/fedora-kernel which contains a modified f34 branch of https://src.fedoraproject.org/rpms/kernel.git.

I configured a Github Actions self-runner on my desktop and all of the kernel building dependencies are already installed. To build the kernel I am executing fedpkg local on the repo. Here’s the problem:

One of the first things fedpkg does is download a linux source tarball. However, it generates a URL to this tarball using the repository name, so in my case it uses 2bdkid/fedora-kernel instead of rpms/kernel, which results in a HTTP 404 error, killing the build.

This is the output from one of the build runs:

Run fedpkg --verbose local
Creating repo object from /home/brady/kernel/actions-runner/_work/fedora-kernel/fedora-kernel
Downloading linux-5.12.14.tar.xz
Full url: b'https://src.fedoraproject.org/repo/pkgs/2bdkid/fedora-kernel/linux-5.12.14.tar.xz/sha512/c5c5e8c11c4ad5bc72a476665b62afd65175ee631ec7af9a002e097ac2dd01a1c485d5f58cb85be4b236bbf02570852fa321000f71f1f2b18ec75866af7792da/linux-5.12.14.tar.xz'
Could not execute local: Server returned status code 404
Remove downloaded invalid file /home/brady/kernel/actions-runner/_work/fedora-kernel/fedora-kernel/linux-5.12.14.tar.xz
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 33, in <module>
    sys.exit(load_entry_point('fedpkg==1.40', 'console_scripts', 'fedpkg')())
  File "/usr/lib/python3.9/site-packages/fedpkg/__main__.py", line 87, in main
    sys.exit(client.args.command())
  File "/usr/lib/python3.9/site-packages/pyrpkg/cli.py", line 2170, in local
    self.sources()
  File "/usr/lib/python3.9/site-packages/pyrpkg/cli.py", line 2614, in sources
    self.cmd.sources(outdir)
  File "/usr/lib/python3.9/site-packages/pyrpkg/__init__.py", line 2044, in sources
    self.lookasidecache.download(
  File "/usr/lib/python3.9/site-packages/pyrpkg/lookaside.py", line 194, in download
    raise DownloadError('Server returned status code %d' % status)
pyrpkg.errors.DownloadError: Server returned status code 404
Error: Process completed with exit code 1.

It tries to downoad

https://src.fedoraproject.org/repo/pkgs/2bdkid/fedora-kernel/linux-5.12.14.tar.xz/sha512/c5c5e8c11c4ad5bc72a476665b62afd65175ee631ec7af9a002e097ac2dd01a1c485d5f58cb85be4b236bbf02570852fa321000f71f1f2b18ec75866af7792da/linux-5.12.14.tar.xz

when it should be downloading

https://src.fedoraproject.org/repo/pkgs/rpms/kernel/linux-5.12.14.tar.xz/sha512/c5c5e8c11c4ad5bc72a476665b62afd65175ee631ec7af9a002e097ac2dd01a1c485d5f58cb85be4b236bbf02570852fa321000f71f1f2b18ec75866af7792da/linux-5.12.14.tar.xz.

Is there a way to tell fedpkg to change the repository name so this doesn’t happen?

Ok I found where to fix this issue. Use fedpkg --name kernel --namespace rpms --verbose local to override the repository name/namespace.

1 Like