I have an installation of an RPM-based distro (like Fedora), which uses one set of RPM repositories for its packages, and I'd like to change it to instead use a different set of RPM repositories, effectively transforming it into another distro (like CentOS). I would need to do this without reinstalling the system wholesale.
The reason I'd like to do this is because this machine has been given to me by my organization, and we were told "not to install any other OS" on it. However, it's using an obscure set of repos, which seem to be rather slow to pick up security updates, and I can't really trust that repo to be properly maintained. I do have root access on the machine, and according to the IT department this would not count as "reinstalling".
However, this repo has packages for which the version name has a vendor suffix (like, for example, a package from Ubuntu having a version of 1:13.0.1-2ubuntu2). In particular, certain system packages like systemd have that. AFAICT, this means that everything that depends on systemd, as well as systemd itself, will have to be reinstalled, and so most of the system will be deleted and then reinstalled while the system is running, which seems like a very quick way to break my installation.
One possible solution I've considered is: starting from the leaves of the dependency tree of my installation,
- download the corresponding package from the new repo
- edit it so that its dependency versions match the old repo's
- install this package over the existing one
- if this package was depended on by any other packages, replace those with their unedited version (because this package now has the new name, and the edited packages were depending on the old name)
- sequentially do this for every depth of the dependency tree
Would this strategy work, and what other options do I have to perform such an upgrade?