rocky-linux / rocky-tools

MIT License
393 stars 137 forks source link

Change mirrors to centos8 stream repo's to vault #216

Closed JensTimmerman closed 1 week ago

pajamian commented 1 week ago

That's a clever place to do it. I was looking to do it around line 623 instead but it had issues with the name change of the stream repos. Where you're doing it looks like it will just work without much issue at all.

JensTimmerman commented 1 week ago

I'm probably trying to be too clever. The sed is not being triggered. still hitting some snags

Error: Failed to download metadata for repo 'extras-common': Cannot prepare internal mirrorlist: Curl error (51): SSL peer certificate or SSH remote key was not OK for https://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=extras-extras-common 

I also added the code in line 623, but indeed, extras-common is not there

pajamian commented 1 week ago

I'm not sure the second commit will work because of the way that the centos-stream repository names are changed part way through so as not to clash with the Rocky Linux repo names. Will need to test this and see.

JensTimmerman commented 1 week ago

currently already fails in collect_system_info which is run before the package_swaps where the sed is done

JensTimmerman commented 1 week ago

http://debuginfo.centos.org/8-stream seems not to be mirrored at rocky? (but is still up at it's original url and has a mirror at https://linuxsoft.cern.ch/centos-debuginfo/

pajamian commented 1 week ago

@pajamian the extras-common repo doesn't seem to be in the rocky linux vault?

It is: https://dl.rockylinux.org/vault/centos/8-stream/extras/x86_64/extras-common/

Also since extras-common is not a Rocky Linux repo it may not require renaming (looking into that).

pajamian commented 1 week ago

http://debuginfo.centos.org/8-stream seems not to be mirrored at rocky? (but is still up at it's original url and has a mirror at https://linuxsoft.cern.ch/centos-debuginfo/

That and epel-next may cause issues since it will be archived as well. It will require some testing to find out for sure if it actually matters.

JensTimmerman commented 1 week ago

ah I see, yes, now it's in there but never used. The changes I made seem to let the script continue trough the collect_system_info stage and I think then the package_swaps stage is doing the fixing? seems to have worked on my test system now.

pajamian commented 1 week ago

Okay, let me know. I'll also try running on a clean stream-8 install probably tomorrow and see how it goes.

Thanks for your work in this, BTW, it's really appreciated!

JensTimmerman commented 1 week ago

@pajamian worked for me on 3 different systems, I was able to migrate from centos8-stream to rocky linux8 using this script, and the subsequent update to rocky linux 9 worked without issues, there are a few stream-xxx repo files now that can be cleaned up, and I think the text at the end of the move can also be revised, since there will never be a centos8-stream update anymore?

pajamian commented 1 week ago

there are a few stream-xxx repo files now that can be cleaned up,

Yes We can either automatically remove them now (they are no longer needed) or just put instructions to do so. Previously they were kept because there might still be newer packages left from them on the system.

and I think the text at the end of the move can also be revised, since there will never be a centos8-stream update anymore?

Indeed. In fact this changes the whole dynamic of migrating from CentOS Stream.