coreos / fedora-coreos-config

Base configuration for Fedora CoreOS
Other
153 stars 157 forks source link

rpm-ostree install qemu-guest-agent fails #3017

Closed sergeiwaigant closed 1 month ago

sergeiwaigant commented 5 months ago

Hi guys.

I have to build a Fedora CoreOS Image for a client and it requires to ship with qemu-guest-agent to run on Proxmox in the target environment.

I see that qemu-guest-agent package is available in the coreos-pool repository https://kojipkgs.fedoraproject.org/repos-dist/coreos-pool/latest/x86_64/Packages/q/

I've added another include into the manifest.yaml to include a custom_manifest.yaml. In that custom file, there is only the definition for packages.

Still I am getting the following error:

# manifest.yaml
variables:
  stream: stable
  prod: true

releasever: 40

include:
- manifests/fedora-coreos.yaml
- custom_manifest.yaml

# custom_manifest.yaml
packages:
  - qemu-guest-agent

running in: /home/sergeiwaigant/fcos
COREOS_ASSEMBLER_CONTAINER=quay.io/coreos-assembler/coreos-assembler:latest
COREOS_ASSEMBLER_CONTAINER_RUNTIME_ARGS=-e COSA_NO_KVM=0 -v=/home/sergeiwaigant:/bdr:ro
+ podman run --rm -ti --security-opt=label=disable --privileged --uidmap=1000:0:1 --uidmap=0:1:1000 --uidmap=1001:1001:64536 -v=/home/sergeiwaigant/fcos:/srv/ --device=/dev/kvm --device=/dev/fuse --tmpfs=/tmp -v=/var/tmp:/var/tmp --name=cosa -e COSA_NO_KVM=0 -v=/home/sergeiwaigant:/bdr:ro quay.io/coreos-assembler/coreos-assembler:latest fetch --with-cosa-overrides --strict
Config commit: 555f1e80491197858db52666e929977447155bc9
Using manifest: /srv/src/config/manifest.yaml
/srv/tmp/override/fedora-candidate-compose.repo  /srv/tmp/override/fedora-coreos-pool.repo  /srv/tmp/override/fedora-next.repo  /srv/tmp/override/fedora-rawhide.repo  /srv/tmp/override/fedora.repo
Committing 05core: /srv/src/config/overlay.d/05core ... 15c8ccc03f544fcc7ef91da3e140f2eb79652fe88e5f61f40a39db02072da55b
Committing 08nouveau: /srv/src/config/overlay.d/08nouveau ... bfdbb953c903d037dbd8eeb0939c4fa8c7a9e20b5818d8d3c7b7948204a37b58
Committing 09misc: /srv/src/config/overlay.d/09misc ... 380ab2677ad30a97f5174d79efcd64810d42922e62fa24bdf369726c4fb95150
Committing 14podman-v5: /srv/src/config/overlay.d/14podman-v5 ... c6a65332e708d6ea8bbb102ef2843c5a5bd1bfecd50798d134c8792bfa673690
Committing 15fcos: /srv/src/config/overlay.d/15fcos ... 0e9cd21ae96cc281a7427c6212a1378aa9fb83ed0d58b4088e4fa26b59bc6b48
Committing 16disable-zincati: /srv/src/config/overlay.d/16disable-zincati ... a117cbae483b56c56dcc59f79b4d6bf3a9914fcaebe71bb6cdb11f3c225d06c2
Committing 20platform-chrony: /srv/src/config/overlay.d/20platform-chrony ... f632be240ff5a2a3a44b3fd2333692d79bbb5126cbe915f6633e9d7d546ea20c
Committing 25azure-udev-rules: /srv/src/config/overlay.d/25azure-udev-rules ... 5246020b7ca71528bb4973e0b19a4e9193bd39e1657e893120ce3e633e470213
Committing 30lvmdevices: /srv/src/config/overlay.d/30lvmdevices ... 6d763b3f95e0557eed3792d2c0041d17fb43f67d60d177cebf3ece3c795a0398
Committing 40grub: /srv/src/config/overlay.d/40grub ... cfcd604498d1b48d3d63814a9c9bee24440aab0b609101d3e3d09751acb2cfbf
Committing cosa-json: /srv/tmp/override/jsons ... e1660bf46c6a47814ae99e42fd3f236dec009b7356faa683804a06142144d675
Running: rpm-ostree compose tree --touch-if-changed /srv/tmp/treecompose.changed --cachedir=/srv/cache --unified-core /srv/tmp/override/coreos-assembler-override-manifest.yaml --download-only --ex-lockfile=/srv/src/config/manifest-lock.x86_64.json --ex-lockfile=/srv/src/config/manifest-lock.overrides.yaml --ex-lockfile-strict
Loaded lockfiles:
  /srv/src/config/manifest-lock.x86_64.json
  /srv/src/config/manifest-lock.overrides.yaml
NOTICE: treefile key `lockfile-repos` is experimental and subject to change

43 metadata, 112 content objects imported; 153.6 kB content written                                                                                                                                                                                    

rpm-ostree version: 2024.6
No previous commit for fedora/x86_64/coreos/stable
Enabled rpm-md repositories: fedora-coreos-pool
Updating metadata for 'fedora-coreos-pool'... done
Importing rpm-md... done
rpm-md repo 'fedora-coreos-pool'; generated: 2024-06-08T16:33:22Z solvables: 34971
error: Installing packages: Packages not found: qemu-guest-agent
failed to execute cmd-fetch: exit status 1

real    1m40.538s
user    0m0.168s
sys     0m0.201s

Maybe someone can advice how to get that package installed?

Regards Sergei

dustymabe commented 5 months ago

I think you would have to add an entry to your lockfiles since the coreos-pool is a lockfile-repos entry.

sergeiwaigant commented 5 months ago

Thank you for the hint. Is there a documentation of what this lock file is about?

sergeiwaigant commented 5 months ago

Ok. I think I've understood it now and will test it later today with resolution for others to have an example how to get this package in the Image.

sergeiwaigant commented 5 months ago

however I tried it, its throwing the error... I dont understand the correct way of how to simply add another package to the image... :(

rpm-ostree version: 2024.6
No previous commit for fedora/x86_64/coreos/stable
Enabled rpm-md repositories: fedora-coreos-pool
Updating metadata for 'fedora-coreos-pool'... done
Importing rpm-md... done
rpm-md repo 'fedora-coreos-pool'; generated: 2024-06-08T23:27:42Z solvables: 34998
warning: Couldn't find locked package 'qemu-guest-agent-8.2.2-1.fc40.x86_64'
  Packages matching NEVRA: 0; Mismatched checksums: 0
  Packages matching name and arch (19):
  qemu-guest-agent-2:8.1.0-0.1.rc4.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.1.0-1.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.1.1-1.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.1.3-1.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.1.3-2.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.1.3-3.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.1.3-4.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.1.3-5.fc39.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.0-2.fc40.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.0-6.fc40.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.0-7.fc40.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.0-8.fc40.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.0-8.fc41.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.0-9.fc41.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.2-1.fc40.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.2-1.fc41.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:8.2.2-2.fc41.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:9.0.0-0.1.rc4.fc41.x86_64 (fedora-coreos-pool)
  qemu-guest-agent-2:9.0.0-1.fc41.x86_64 (fedora-coreos-pool)
sergeiwaigant commented 5 months ago

Even after adding "qemu-guest-agent": {"evra": "2:8.2.2-1.fc40.x86_64","metadata": {"sourcerpm": "gemu-guest-agent"}}, to the fcos/src/config/manifest-lock.x86_64.json file fetch is failing with

rpm-ostree version: 2024.6
No previous commit for fedora/x86_64/coreos/stable
Enabled rpm-md repositories: fedora-coreos-pool
Updating metadata for 'fedora-coreos-pool'... done
Importing rpm-md... done
rpm-md repo 'fedora-coreos-pool'; generated: 2024-06-08T23:27:42Z solvables: 34998
Resolving dependencies... done
error: Installing packages: Could not depsolve transaction; 1 problem detected:
 Problem: conflicting requests
  - nothing provides liburing.so.2()(64bit) needed by qemu-guest-agent-2:8.2.2-1.fc40.x86_64 from fedora-coreos-pool
  - nothing provides liburing.so.2(LIBURING_2.0)(64bit) needed by qemu-guest-agent-2:8.2.2-1.fc40.x86_64 from fedora-coreos-pool
failed to execute cmd-fetch: exit status 1
jlebon commented 5 months ago

Don't fetch and build in --strict mode. Alternatively, see the steps in https://github.com/coreos/fedora-coreos-config?tab=readme-ov-file#adding-packages-to-the-os.

Another alternative is to build a custom container image instead. See the examples at https://github.com/coreos/layering-examples.

travier commented 1 month ago

Will close this one as it looks like there isn't anything more to do.