Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install a relocatable package? #2105

Open
flixman opened this issue Jun 26, 2024 · 4 comments
Open

How to install a relocatable package? #2105

flixman opened this issue Jun 26, 2024 · 4 comments
Labels
Priority:LOW RFE Request for Enhancement (as opposed to a bug) triaged

Comments

@flixman
Copy link

flixman commented Jun 26, 2024

I have been navigating the man pages and I have not been able to find an answer to: How can I use dnf to install a relocatable package (and its dependencies)? Using plain rpm I would use the --prefix option, but I do not see any equivalent in dnf.

@flixman flixman changed the title How to install a relocatable package How to install a relocatable package? Jun 26, 2024
@ppisar
Copy link
Contributor

ppisar commented Jun 26, 2024

You can install it the same way as nonrelocatable package. The effect will be the using rpm without --prefix and --relocate options. In other words, you can use DNF to install a relocatable package, but you cannot override the installation prefix.

(For completeness, dnf has "--installroot" option which allows to install packages including their dependencies into a separate directory to build a new and independent file system.)

@flixman
Copy link
Author

flixman commented Jun 26, 2024

@ppisar Thank you for your answer, but this is exactly the problem I have :-/ we are producing RPMs for internal company consumption, which have the prefix set for the production location, which we are now using also for dev/test (in that case, we relocate them to other locations). I do not see a straight forward way to do this with dnf, but I might be missing pieces of information.

@ppisar
Copy link
Contributor

ppisar commented Jun 27, 2024

There is no support for relocation prefix in DNF.

It's not as easy as requesting librpm for the relocation: DNF resolves dependencies based on repository metadata way before it downloads the packages. Those metadata, I worry, do not support relocatable packages. So this requires enhancing a format of the metadata, implementing it in tools for creating repositories (e.g. createrepo_c), then add a support to a dependency solver (libsolv in case of DNF), libdnf, and finally DNF.

Since you are first one (based in this issue tracker) asking for the support, I worry that such a request won't find high priority in the near feature.

@ppisar ppisar added triaged Priority:LOW RFE Request for Enhancement (as opposed to a bug) labels Jun 27, 2024
@flixman
Copy link
Author

flixman commented Jun 27, 2024

@ppisar I understand what you mean, and indeed: I have no high hopes of this being prioritised, as seems not to be much used. However, I still have the doubt: how can we apply the idea of "promoting" RPM packages without being able to relocate them? I am affraid I might be doing something the wrong way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:LOW RFE Request for Enhancement (as opposed to a bug) triaged
Projects
Status: Backlog
Development

No branches or pull requests

2 participants