Closed brianwcook closed 4 days ago
A module is basically a set of RPMs plus a yaml document. The RPMs have a special header flag that makes DNF refuse to install them if it doesn't have the yaml metadata (unless overridden).
The lockfile as written now contains URL to the RPMs, but doesn't include the metadata in any way. Additionally, cachi2
currently doesn't know anything about the modular metadata, and it would not download it anyway.
These steps would need to happen to make modules work:
Possible workarounds would be to include the module metadata in the repository manually, or setting module_hotfixes=1
option for the repo. The first option is fairly clean, the latter feels a lot like a hack.
@lubomir I am going to reveal my modularity ignorance here, but could you please be more specific about "include the module metadata in the repository manually"?
I know next to nothing about modules... where would we take the metadata from?
If the repositories listed in the config file contains modular packages, it will also contain the metadata. It's an entry in the repodata with mdtype set to modules
. For Brian's example in the first comment it's this file: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/appstream/os/repodata/b79ceccd138f06f9306192bcfe9cf22403d4507491c40589d945e2de89d1501a-modules.yaml.gz
Apologies for the long post, but I am not quite sure what information here is useful / not.
What, if anything, is needed in order to make the rpm-lockfile-prototype tool produce a useable lock file when there is a module in the list of rpms? We have hit an issue when trying to install
clang
using a lockfile produced by this tool & UBI8. The user is not intentionally trying to use modularity, but dnf installing clang in ubi8 will enable a default module on its own. The lockfile produced includes this entry (the yaml doesn't render quite right):Installing using this lockfile and a repo generated by cachi2 produces:
I can't tell if the issue lies with the lockfile, or with cachi2. Must we have a modules.yaml file before calling createrepo to make this work, or can we 'flatten' the repo so that there is only one version of clang and still have working dependency resolution?
Manually adding the modules.yaml to into the generated RPM repo from ubi8 appstream repo got me to:
Adding all those things back into the rpms.in file and trying to produce a lockfile then produces: