-
Notifications
You must be signed in to change notification settings - Fork 92
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 gracefully deprecate remote repo? #310
Comments
Distributions usually set repositories using a specific package. For example Fedora has the |
Well yeah, if the repository is installed via some updatable mechanism then there is no issue to begin with. My question is specifically about repositories whose definitions cannot be automatically updated by something else. A custom in-house repo for example. Thank you! |
I'm not aware about any mechanism you want on the repository level. Repository can have an updateinfo file https://github.com/openSUSE/libzypp/blob/master/zypp/parser/yum/schema/updateinfo.rng which can deliver messages to the users, but they are always tied an installed package. I think the easiest way is solve it on HTTP level. Configure the server to return an error and place the instructions in the response body. DNF won't show it, but users accessing the location from a web browser will see it. Or if you can nourish the old location indefinitely, place an HTTP redirect there. |
So basically, as I was afraid from the beginning, there is no way to gracefully produce error/warning on either HTTP or repository level. I realize that this is a niche problem currently as most people get software from root distribution repos that aren't likely to need to be replaced. Still it is a problem for some and it contributes to "it's hard to deploy custom/in house software to Linux" sentiment. |
I will move this request to librepo project as it the piece of code which downloads repository metadata. |
Delivering a new location or the end-of-life notice on HTTP layer (Status 301, 500) would have a problem with mirrors and that a repository locator can contain DNF variables ($basearch, $releasever). Therefore I'd rather augment repomd.xml. That will also enable reusing existing signature mechanism. Instead of new URL we could maybe ship a new *.repo file as an attachment to the repository. That would enable changing not only the repository URL, but also PGP location, caching policy, repo ID etc. |
Consider the following scenario. There is a custom remote repository accessed via HTTP that multiple clients are pulling packages from. For one reason or another this repository needs to be removed and replaced by a completely different one with different location and signing keys.
Is there a way to notify clients about it, as they perform
dnf upgrade
, either via some HTTP level response or repository XML metadata?Something like a warning message or an error saying "Hey the repository foo is going away please move to repository bar. More details at http://yadayada.com/migration".
As far as I can see from google searches and reading dnf, libdnf and librepo code there isn't a way to do that but perhaps I am not looking properly.
It's a pity if the only way to handle this situation is to turn off the original repo HTTP server and rely on clients to figure out how to deal with the error via some side channel.
Thank you!
The text was updated successfully, but these errors were encountered: