Unable to build custom patched rpm qemu package [60FPS]

Hi there,
I’ve been trying (unsuccessfully) to make a custom patched version of qemu that incorporates a fix to make it run on 60FPS. I learned that building it from source does seem to work but then when I use it in virt manager it doesn’t support many features which the default version does. I learned that I needed to use the fedora .spec file for it.
And now I’m stuck.

I’m trying to make a version which I can install alongside (so no overriding the default version). I’m fine with having two complete separate installs (default and patched) or one with the default and patched qemu-system-x86-64 version being installed, but the patched version is still referencing the default dependencies. Either is fine.

What I’ve tried:

  1. Building a complete separate version:
    Here I changed the name “Name: qemu” to “Name: qemu_60FPS” and including the patch in the qemu.spec.
    This succesfully build all the packages. But when trying to install them they all fail because it cannot find the dependency qemu_60FPS:
    conflicting requests - nothing provides qemu_60FPS-img = 2:9.2.4-1.fc42 needed by qemu_60FPS-2:9.2.4-1.fc42.x86_64 from @commandline and when looking at the output it did make a: qemu-img-9.2.4-1.fc42.x86_64.rpm.
    I think that in this case it is not getting the correct name applied, and that is why its failing. I unfortunately am a complete novice to building my own .rpm packages (this is my first time) and I’m thus unable to find how to fix the name for it.
  2. Building the normal version with the patch and only changing the name of the qemu-system-x86-64 package.
    With this approach I keep getting file not found errors, which I’m sure it happening because I wrongly modified the qemu.spec. But again I have no clue on how to fix that either.

I’m willing to learn (and have done quite a bit already) to make this happen. But I’m currently at a loss and could use some help.

I briefly looked at the latest rawhide rpmspec, so the line numbers are most likely different.

line: 756: %package -n qemu-img
line: 2477: %files -n qemu-img

That need to change to match your new name qemu_60FPS.

Thanks for your reply, I unfortunately don’t have the time to check if it works today or tomorrow. But I will check afterwards. :slight_smile:

Thanks, that worked.
I unfortunately now have another issue. Which I was hoping changing the compile name would solve; all the new packages conflict with their unmodified counterparts :frowning:

  LinuxUser@pc-LinuxUser:~/rpmbuild/RPMS/x86_64$ sudo dnf install *
Updating and loading repositories:
Repositories loaded.
Package "qemu-guest-agent-2:9.2.4-1.fc42.x86_64" is already installed.
Package "qemu-pr-helper-2:9.2.4-1.fc42.x86_64" is already installed.

Package                                                                                                                              Arch                      Version                                                                                                                               Repository                                                                         Size
Installing:
 qemu-guest-agent-debuginfo                                                                                                          x86_64                    2:9.2.4-1.fc42                                                                                                                        @commandline                                                                    2.6 MiB
 qemu-pr-helper-debuginfo                                                                                                            x86_64                    2:9.2.4-1.fc42                                                                                                                        @commandline                                                                    2.9 MiB
 qemu_60FPS                                                                                                                          x86_64                    2:9.2.4-1.fc42                                                                                                                        @commandline                                                                    0.0   B
 qemu_60FPS-audio-alsa                                                                                                               x86_64                    2:9.2.4-1.fc42                                                                                                                        @commandline                                                                   28.5 KiB
  ... skipped because char limit.                                                                 14.0 MiB
 qemu_60FPS-user-static-xtensa-debuginfo                                                                                             x86_64                    2:9.2.4-1.fc42                                                                                                                        @commandline                                                                   26.4 MiB

Transaction Summary:
 Installing:       192 packages

Total size of inbound packages is 713 MiB. Need to download 0 B.
After this operation, 3 GiB extra will be used (install 3 GiB, remove 0 B).
Is this ok [y/N]: y
Running transaction
Transaction failed: Rpm transaction failed.
Warning: skipped OpenPGP checks for 192 packages from repository: @commandline
  - file /usr/libexec/qemu-bridge-helper from install of qemu_60FPS-common-2:9.2.4-1.fc42.x86_64 conflicts with file from package qemu-common-2:9.2.4-1.fc42.x86_64
  - file /usr/libexec/vhost-user-gpu from install of qemu_60FPS-device-display-vhost-user-gpu-2:9.2.4-1.fc42.x86_64 conflicts with file from package qemu-device-display-vhost-user-gpu-2:9.2.4-1.fc42.x86_64
  ... skipped because char limit.
  - file /usr/bin/qemu-aarch64_be-static from install of qemu_60FPS-user-static-aarch64-2:9.2.4-1.fc42.x86_64 conflicts with file from package qemu-user-static-aarch64-2:9.2.4-1.fc42.x86_64                                                                       

Any idea how I can completely make a seperate install that won’t touch the origininal?