blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
22 stars 26 forks source link

How to get the rpm-ostree module to use a custom repo file? #198

Closed alexispurslane closed 2 months ago

alexispurslane commented 2 months ago

I'm trying to layer carapace onto my system, and I'd like to do it by using the RPM repository provided by the carapace project, but they don't have a server serving their .repo file anywhere, they want you to just directly add it to the yum.repos.d directory, so I can't use the regular repo file URL capability of the rpm-ostree module. I've already tried putting the file in config/files/usr/etc/yum.repos.d/ but that doesn't seem to work, the rpm-ostree module just ignores it. Is there some other way i can achieve this?

fiftydinar commented 2 months ago

Try to put it in /etc/yum.repos.d/ instead.

You can do this with either files or scripts module, however you prefer.

Maybe this scenario can be documented, to note users on possible ways to install 3rd party RPMs. (just some generic starting instructions, since we can't cover every 3rd party RPM repo)

xynydev commented 2 months ago

Another option is uploading the file somewhere, like a GitHub Gist, and using that as the URL. But yeah, /etc/yum.repos.d/ works well too.

I agree that some docs would be great.

alexispurslane commented 2 months ago

Try to put it in /etc/yum.repos.d/ instead.

That's what i did, via the files module --- the files module takes anything in config/usr/etc and puts it in the image's /etc according to the docs.

alexispurslane commented 2 months ago

Another option is uploading the file somewhere, like a GitHub Gist, and using that as the URL.

that was going to be my second try. I just figured it would make sense for rpm-ostree to listen to what's in /etc/yum.repos.d, including the stuff the files module moves there, so this might be a bug, so I might as well report it.

Luckily, it turns out that the repo file is actually hosted by the carapace repo, though, it's just not linked anywhere. The URL is https://yum.fury.io/rsteube/fury.repo

xynydev commented 2 months ago

the files module takes anything in config/usr/etc and puts it in the image's /etc according to the docs.

No, it's put into /usr/etc/, and rpm-ostree merges it into /etc/ on boot. I guess that could be clarified in the docs too.

Try copying the file directly into /etc/, that's something required by upstream. The module is just an rpm-ostree wrapper and doesn't really do that low-level stuff.

alexispurslane commented 2 months ago

No, it's put into /usr/etc/, and rpm-ostree merges it into /etc/ on boot

ahhhh okay

alexispurslane commented 2 months ago

I guess that could be clarified in the docs too.

I'd be willing to write a module documentation section for the files module to go with the documentation for the other modules if someone can point me to where it is. I have a horrible migraine today so it would probably be brief, but if I can help...

xynydev commented 2 months ago

All documentation for the modules is in this repo (the modules repo). Check out the files named README.md and module.yml in each module's folder. Your contributions are welcome :)