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

Allow "reposync" to filter packages using the entire NEVRA (bsc#1234226) #9645

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

meaksh
Copy link
Member

@meaksh meaksh commented Jan 17, 2025

What does this PR change?

This PR enables spacewalk-repo-sync to filter packages matching the entire "NEVRA" instead of the package name only.

This extended nevra filtering must be enabled in rhn.conf by setting:

server.satellite.reposync_nevra_filter = 1

This is particularly useful when dealing with big repositories, where package name filters are not enough and you want to use more fine-grained filters to synchronize only certain packages.

Before this PR:

# spacewalk-repo-sync -t deb -c testchannel-deb -u https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/dists/noble/main/binary-amd64/ -i gitlab-ee_17.1.0*
[...]
14:36:57 Repo URL: https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/dists/noble/main/binary-amd64/
14:36:57     Packages in repo:                45
14:36:57     Packages passed filter rules:     0
[...]

After this PR (having server.satellite.reposync_nevra_filter = 1)

# spacewalk-repo-sync -t deb -c testchannel-deb -u https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/dists/noble/main/binary-amd64/ -i gitlab-ee_17.1.0*
[...]
14:38:07 Repo URL: https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/dists/noble/main/binary-amd64/
14:38:07     Packages in repo:                45
14:38:07     Packages passed filter rules:     1
[...]

GUI diff

No difference.

  • DONE

Documentation

Test coverage

  • Unit tests were added

  • DONE

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/25991
Port(s):

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

@meaksh meaksh requested a review from a team as a code owner January 17, 2025 16:12
@meaksh meaksh requested review from ycedres and removed request for a team January 17, 2025 16:12
@meaksh meaksh force-pushed the master-extend-filters-on-reposync branch from 21302f1 to 7a32c07 Compare January 17, 2025 16:32
@meaksh meaksh force-pushed the master-extend-filters-on-reposync branch from 7a32c07 to 0fc073f Compare January 17, 2025 16:59
Copy link
Contributor

@ycedres ycedres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants