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

[4/x] Refactor repomd mirroring #1060

Merged
merged 8 commits into from
Jan 29, 2024
Merged

Conversation

ngetahun
Copy link
Contributor

@ngetahun ngetahun commented Jan 3, 2024

This PR is part of our code sprint: https://trello.com/c/hU27QHob/3134-rdeb-sprint-tracker

The whole changeset is:

[1/5] Prepare code sprint and implement repository type detection
[2/5] Add flat debian mirroring support to RMT
[3/5] Refactor suma mirroring
[4/5] Refactor repomd mirroring
[5/5] Fixes and cleanup
[6/6] Nested debian repository support

Implementation in this merge request:

  • Refactoring License mirroring into its own mirror class
  • Refactor repomd mirroring class to use license and suma product tree mirroring classes.

DO NOT MERGE UNTIL COMPLETELY READY

Demo steps

Testing the license mirroring

> repo = Repository.find(3624)
> licences  = RMT::Mirror::License.new(repository: repo, logger: RMT::Logger.new($stdout))
# verify license path
> licenses.repository_path
# should output %your_base_rmt_dir/public/repo/SUSE/Products/SLE-Product-SLES/15-SP4/x86_64/product.license/"
> licenses.mirror
# verify output
> `ls #{licenses.repository_path}`.chomp.split("\n")
# should output ["directory.yast", "license.cs.txt", "license.de.txt", "license.es.txt", "license.fr.txt", "license.it.txt", "license.ja.txt", "license.ko.txt", "license.pt_BR.txt", "license.ru.txt", "license.txt", "license.zh_CN.txt", "license.zh_TW.txt"]

Testing repomd mirroring

# Expose repository_path and repository_url, for testing purposes
> RMT::Mirror::Repomd.send(:public, *[:repository_path, :repository_url])
> repo = Repository.find(3624)
> repomd = RMT::Mirror::Repomd.new(repository: repo, logger: RMT::Logger.new($stdout))
> repomd.repository_path
# %rmt_home_dir%/public/repo/SUSE/Products/SLE-Product-SLES/15-SP4/x86_64/product/
> repomd.mirror
> `ls #{repomd.repository_path}`.chomp.split("\n")
# should output ["noarch", "repodata", "x86_64"]
> `ls #{repomd.repository_path}/x86_64`.chomp.split("\n")
# should output ["skelcd-control-SLES-15.4.1-150400.1.6.x86_64.rpm", "sles-release-15.4-150400.55.1.x86_64.rpm"]

Thanks for reviewing this pull request!

If you have any question please do not hesitate to approach me! 🚀

@felixsch felixsch changed the title 4/x Refactor repomd mirroring [4/x] Refactor repomd mirroring Jan 4, 2024
@felixsch felixsch added the WIP Work in progress, do not merge. label Jan 4, 2024
@ngetahun ngetahun changed the base branch from master to refactor_suma_mirroring January 5, 2024 08:50
@ngetahun ngetahun added On hold Issue being evaluated and removed WIP Work in progress, do not merge. labels Jan 10, 2024
@lcaparroz lcaparroz force-pushed the refactor_suma_mirroring branch from 30afcb3 to df0236f Compare January 12, 2024 14:08
@lcaparroz lcaparroz force-pushed the refactor_repomd_mirroring branch from ba081e5 to 8b65687 Compare January 12, 2024 14:27
@lcaparroz lcaparroz force-pushed the refactor_suma_mirroring branch from df0236f to 41344af Compare January 12, 2024 18:04
@lcaparroz lcaparroz force-pushed the refactor_repomd_mirroring branch from 8b65687 to 6063199 Compare January 15, 2024 08:32
@SUSE SUSE deleted a comment from suse-tests-fail Jan 22, 2024
@SUSE SUSE deleted a comment from suse-tests-fail Jan 26, 2024
Base automatically changed from refactor_suma_mirroring to rmt_deb_codesprint January 29, 2024 13:02
@ngetahun ngetahun merged commit 27cb0d2 into rmt_deb_codesprint Jan 29, 2024
1 check failed
@ngetahun ngetahun deleted the refactor_repomd_mirroring branch January 29, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On hold Issue being evaluated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants