pulp / pulp-fixtures

Scripts to generate fixture data for Pulp.
GNU General Public License v2.0
3 stars 34 forks source link

Kickstart Tree fixture is wrong #252

Open pedro-psb opened 3 months ago

pedro-psb commented 3 months ago

Problem

As pointed out in pulp/pulp_rpm#2292 , this kickstart tree fixture contains a variant which specifies the wrong packages dir for its subrepo's packages:

[variant-Land]
id = Land
name = Land
; 'Packages' actually exists, because its relative to the .treeinfo location.
; The problem is that its packages doesn't match `variants/land/repodata` metadata.
; The right 'packages' are indeed in 'variants/land'
packages = Packages
repository = variants/land
type = variant
uid = Land

Action

This treeinfo file should be updated to point to the right packages dir, as pointed in the snippet above.

Other

variations/land/repodata contains two primary.xml which differs only by <time file="...">. Looks like a leftover, but we should check if its not something thats being tested.

pedro-psb commented 3 months ago

Also, the checksum section is incorrect.

According to treeinfo spec, the checksum section should contain everything mentioned in images-*, stage2 and all the repomd.xml files.

[checksums]
LiveOS/squashfs.img = sha256:30e14955ebf1352266dc2ff8067e68104607e750abb9d3b36582b8af909fcb58
images/pxeboot/initrd.img = sha256:5647f05ec18958947d32874eeb788fa396a05d0bab7c1b71f112ceb7e9b31eee
images/pxeboot/upgrade.img = sha256:30e14955ebf1352266dc2ff8067e68104607e750abb9d3b36582b8af909fcb58
images/pxeboot/vmlinuz = sha256:91052b444e73f3eebdb93d1fb1506597e96c92d8de9c1e3c3f36b07a57d0a18f
- fixtures/rpm-distribution-tree/addons/dolphin/repodata/repomd.xml = sha256:b6ac17b542fc6188eafadb932d9635209e1498c1ee22ba2490f531fdbd4c49a3
- fixtures/rpm-distribution-tree/addons/whale/repodata/repomd.xml = sha256:54260288eda2bd151c71358c5f2c472654d54420dbf3f2c1aafcb933a42a3074
+ addons/dolphin/repodata/repomd.xml = sha256:b6ac17b542fc6188eafadb932d9635209e1498c1ee22ba2490f531fdbd4c49a3
+ addons/whale/repodata/repomd.xml  = sha256:54260288eda2bd151c71358c5f2c472654d54420dbf3f2c1aafcb933a42a3074
+ (remaining repomd.xml)

Even if we want to test that we can produce correct metadata from wrong metadata (and I dont think we want):

dralley commented 3 months ago

According to treeinfo spec, the checksum section should contain everything mentioned in images-*, stage2 and all the repomd.xml files.

So, the spec says that, but every .treeinfo file I've ever seen in practice doesn't include the repomd.xml checksums.

https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/.treeinfo

https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Everything/x86_64/os/.treeinfo

https://cdn.redhat.com/content/dist/rhel9/9/x86_64/baseos/kickstart/treeinfo

I'm not sure if there's an actual reason for this