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

copr: add includepkgs functionality #8779

Merged

Conversation

shubhamsugara22
Copy link
Contributor

SUMMARY

A new includepkgs parameter has been added to the copr module, allowing users to specify which packages to fetch from a COPR repository. This enhancement addresses the issue where users only want to install specific packages without inadvertently pulling in other packages from the repository. The includepkgs option is added to the repository configuration and persists across Ansible runs, ensuring that the repository remains consistent with the user’s desired package selection.

Fixes
#8738
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

copr

ADDITIONAL INFORMATION

The new includepkgs parameter allows users to limit the scope of packages fetched from a COPR repository. This feature is particularly useful for users who need to manage their package installations tightly and avoid any unexpected changes from updates to the repository. The implementation includes appending the includepkgs option to the repository file and ensuring that it is not overwritten by subsequent Ansible runs.

- name: Add and limit packages from a COPR repository
  community.general.copr:
    name: ufven/epel9-extras
    state: enabled
    chroot: epel-9-x86_64
    includepkgs: "shorewall*"

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels Aug 19, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Aug 19, 2024
@shubhamsugara22
Copy link
Contributor Author

shubhamsugara22 commented Aug 19, 2024

@ansibullbot ready_for_review
@felixfontein @russoz

@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR small_patch Hopefully easy to review labels Aug 19, 2024
@russoz
Copy link
Collaborator

russoz commented Aug 19, 2024

Hi @shubhamsugara22

Thank you for the contribution! Please add a changelog fragment.

I will be taking a closer look throughout the day.
Cheers, AZ

@shubhamsugara22
Copy link
Contributor Author

thanks for reply @russoz
Added changelog

@ossman
Copy link

ossman commented Aug 20, 2024

Perhaps also excludepkgs for completeness?

plugins/modules/copr.py Outdated Show resolved Hide resolved
plugins/modules/copr.py Outdated Show resolved Hide resolved
@russoz russoz changed the title Add includepkgs functionality to copr module copr: add includepkgs functionality Aug 20, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch labels Aug 20, 2024
@russoz
Copy link
Collaborator

russoz commented Aug 20, 2024

Perhaps also excludepkgs for completeness?

Hi @shubhamsugara22 not sure you noticed this comment from @ossman . It does make sense to have both, IMO. Would you be willing to add that one here as well? It should be fairly easy now that you're more familiar with it. 😉

@shubhamsugara22
Copy link
Contributor Author

Hi @russoz @ossman checked his comment , forgot to reply or might have missed it 😏
added excludepkgs hope it works on first try ✌️

@russoz
Copy link
Collaborator

russoz commented Aug 21, 2024

LGTM! :-) Thanks @shubhamsugara22 !!

plugins/modules/copr.py Outdated Show resolved Hide resolved
plugins/modules/copr.py Outdated Show resolved Hide resolved
plugins/modules/copr.py Outdated Show resolved Hide resolved
@felixfontein felixfontein merged commit 96d5e6e into ansible-collections:main Aug 26, 2024
147 checks passed
Copy link

patchback bot commented Aug 26, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/96d5e6e50e972ae1bfc61cf1fb71c0738230c213/pr-8779

Backported as #8808

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Aug 26, 2024
patchback bot pushed a commit that referenced this pull request Aug 26, 2024
* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Added changes in copr module

* Excludepkgs parameter add

* Update module and params to handle a list + Docs updated

* Update module and params to handle a list + Docs updated

(cherry picked from commit 96d5e6e)
@felixfontein
Copy link
Collaborator

@shubhamsugara22 thanks for your contribution!
@russoz @ossman thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Aug 27, 2024
…ality (#8808)

copr: add includepkgs functionality (#8779)

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Added changes in copr module

* Excludepkgs parameter add

* Update module and params to handle a list + Docs updated

* Update module and params to handle a list + Docs updated

(cherry picked from commit 96d5e6e)

Co-authored-by: Shubham Singh Sugara <[email protected]>
@russoz russoz mentioned this pull request Aug 27, 2024
1 task
aioue pushed a commit to aioue/community.general that referenced this pull request Oct 1, 2024
* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Added changes in copr module

* Excludepkgs parameter add

* Update module and params to handle a list + Docs updated

* Update module and params to handle a list + Docs updated
TobiasZeuch181 pushed a commit to TobiasZeuch181/zypper_repository_add_list that referenced this pull request Oct 2, 2024
* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Limit package for Copr using includepkgs

* Added changes in copr module

* Excludepkgs parameter add

* Update module and params to handle a list + Docs updated

* Update module and params to handle a list + Docs updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants