Bug 1992209
Summary: | createrepo --update removes the module.yaml from the repodata if "modules.yaml" is not in the directory | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | jcastran | |
Component: | createrepo_c | Assignee: | amatej | |
Status: | CLOSED ERRATA | QA Contact: | Jan Blazek <jblazek> | |
Severity: | high | Docs Contact: | Mariya Pershina <mpershin> | |
Priority: | high | |||
Version: | 8.4 | CC: | amatej, kwalker, page.cal, pkratoch | |
Target Milestone: | beta | Keywords: | Reopened, Triaged | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | createrepo_c-0.17.7-4.el8 | Doc Type: | Bug Fix | |
Doc Text: |
.Running `createrepo_c --update` on a modular repository now preserves modular metadata in it
Previously, when running the `createrepo_c --update` command on an already existing modular repository without the original source of modular metadata present, the default policy was to remove all additional metadata including modular metadata from this repository, which, consequently, broke it. To preserve metadata, it required running the `createrepo_c --update` command with the additional `--keep-all-metadata` option.
With this update, you can preserve modular metadata on a modular repository by running `createrepo_c --update` without any additional option.
To remove additional metadata, you can use the new `--discard-additional-metadata` option.
|
Story Points: | --- | |
Clone Of: | ||||
: | 2055032 (view as bug list) | Environment: | ||
Last Closed: | 2022-05-10 13:57:14 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2055032 |
Description
jcastran
2021-08-10 18:03:37 UTC
I think this behavior is expected. --update controls whether createrepo_c recalculates metadata from rpm files or if it reuses already present metadata (from primary, filelists..). If you want to preserve the *-modules.yaml.gz during an update even when their source was removed from the repo you can use --keep-all-metadata option. Perhaps we could describe this more explicitly in the man page? RHEL 7 and below don't have that option. The --update would leave any additional repodata files in place. Can we instead change "--update" to use the --keep-all-metadata option by default? This would match the behaviour customers have used for years and help to avoid more differences in the steps for maintaining repositories of RHEL 5-7 and RHEL 8. We have discussed it and we most likely don't want to do such a change at this point. Maybe in the future if we ever do a bigger revision and clean up of the createrepo_c options. I am closing this as NOTABUG because we currently don't have any plans to change this. If there is some new development or some new information please feel free to reopen this bug. I made an upstream PR that proposes the change of using --keep-all-metadata by default and adds --discard-additional-metadata option to cover the opposite use case. https://github.com/rpm-software-management/createrepo_c/pull/287 Tests update: https://github.com/rpm-software-management/ci-dnf-stack/pull/1037 > RHEL 7 and below don't have that option. The --update would leave any additional repodata files in place. I have tried it and while it does leave the additional repodata in place (in the repodata directory) it removes them from repomd.xml so I think they are technically no longer in the repo. To me it seems closer to the current createrepo_c behavior (with --keep-all-metadata off by default). On the other hand we might want to change this because of modules.yaml. I ran into this modules.yaml when I tried to build a custom .iso for my client. In short, the .iso would contain some rpm's from RHEL 8, and the additional rpm's we are providing as part of our product. The customer has air-gapped their computers for security reasons and can't use the over-the-internet method of installation. As a work-around, I provide a custom entry in /etc/yum.repos.d that lets them loop mount the RedHat 8.5 iso and update from that. Still, if you advertise that createrepo builds a repo, it should also build any needed yaml files. Or perhaps, is there a way I can get past this that I am unaware. Thank You Cal Page So, the client wants me to DO SOMETHING, a work-around, whatever. Trouble is, the modules.yaml has what looks like an encrypted front end name. I suspect this is part of your licensing system. So, if my customer is asking me to HACK your licensing system, I'd have to say no. I'm a White Hack hacker ONLY. So, can you please suggest a way I can move past this in accordance with your licensing system. Best Regards, Cal Page (In reply to Cal Page from comment #10) > Trouble is, the modules.yaml has what looks like an encrypted front end > name. I suspect this is part of your licensing system. I am not sure what you mean here but I don't think there should be any encryption or licensing problems. If you are referring to a name like: 3cc6e3f2bb6f513d28f0d50dd151a3ae4641af22e5963d193b4e73dc572378c0-modules.yaml.gz that is just a checksum + modules.yaml + compression suffix. > So, can you please suggest a way I can move past this If you are using modular rpms from some RHEL 8 repo you should take the modules.yaml from that repo as well. In general createrepo_c cannot generate the modules.yaml file because it doesn't know how the user wants to arrange to modules (just like createrepo_c cannot generate groups.xml because it doesn't know what should each group look like and contain). If you want to create your own modules we have some tools here: https://github.com/rpm-software-management/modulemd-tools However unless I am misunderstanding all of this is not related to this bug (which is about changing default of --keep-all-metadata parameter). Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (createrepo_c bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1866 |