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

CLI: copr edit-chroot does not allow to set modules, with-/without options #2065

Closed
fedora-copr-github-bot opened this issue Nov 18, 2022 · 1 comment
Labels
API RFE Enhancement, feature requests

Comments

@fedora-copr-github-bot
Copy link
Collaborator

fedora-copr-github-bot commented Nov 18, 2022

Original issue: https://pagure.io/copr/copr/issue/2065
Opened: 2022-01-31 14:50:53
Opened by: bkircher

copr edit-chroot is missing options to allow set

  • "Modules:"
  • "With options:"
  • "Without options:"
% copr edit-chroot -h                                                                                                             
usage: copr edit-chroot [-h] [--upload-comps FILEPATH | --delete-comps] [--packages PACKAGES] [--repos REPOS]
                        [--isolation {simple,nspawn,default}] [--bootstrap {unchanged,default,on,off,image}]                                                [--bootstrap-image BOOTSTRAP_IMAGE]                                                                                                 coprchroot                                                                                                                                                                                                                                      positional arguments:                                                                                                                 coprchroot            Path to a project chroot as owner/project/chroot or project/chroot                                                                                                                                                                              options:                                                                                                                              -h, --help            show this help message and exit                                                                               --upload-comps FILEPATH                                                                                                                                   filepath to the comps.xml file to be uploaded                                                               
  --delete-comps        deletes already existing comps.xml for the chroot
  --packages PACKAGES   space separated string of package names to be added to buildroot
  --repos REPOS         space separated string of additional repo urls for chroot
  --isolation {simple,nspawn,default}                                                                                               
                        Choose the isolation method for running commands in buildroot.                                        
  --bootstrap {unchanged,default,on,off,image}                                                                                      
                        Configure Mock's bootstrap feature, default is 'unchanged' so the configuration from Copr project is used
                        for this chroot. The 'default' variant resets the project configuration to the pre-configured setup from
                        mock-core-configs. See 'create --help' for more info.
  --bootstrap-image BOOTSTRAP_IMAGE                                                                                                 
                        Use a custom container image for initializing Mock's bootstrap (Implies --bootstrap=image) 

pbrezina commented at 2022-02-02 12:17:30:

+1


bkircher commented at 2022-02-02 13:49:37:

From what I can see, with_opts and without_opts is already present in API endpoint /project-chroot/edit/<ownername>/<projectname>/<chrootname> (and to some extend in CLI code).

The only thing that seems missing from API is modules.


pbrezina commented at 2022-02-04 11:53:39:

Is there any way I can prioritize this? Or can you give me hints what needs to be change so I can work on a pr myself?


praiskup commented at 2022-02-04 12:10:20:

Or can you give me hints on what needs to be changed so I can work on a pr myself?

Sure! Simply put:

  • copr-cli new options
  • connect ^^^ with python3-copr library
  • connect ^^^ with copr-frontend package
  • add a simple test (or modify an existing one) to the frontend side

All those should be easy to grep in our basecode :-) but feel free to ping
me on #fedora-buildsys and we can arrange some meeting or so.


pbrezina commented at 2022-02-04 13:07:56:

https://pagure.io/copr/copr/pull-request/2072

@fedora-copr-github-bot fedora-copr-github-bot added API RFE Enhancement, feature requests labels Nov 22, 2022
@praiskup
Copy link
Member

We have this now, thanks:

usage: copr edit-chroot [-h] [--upload-comps FILEPATH | --delete-comps] [--packages PACKAGES] [--repos REPOS] [--modules MODULES] [--rpmbuild-with RPMBUILD_WITH] [--rpmbuild-without RPMBUILD_WITHOUT]
                        [--isolation {simple,nspawn,default}] [--bootstrap {unchanged,default,on,off,image}] [--bootstrap-image BOOTSTRAP_IMAGE] [--reset RESET]
                        coprchroot

positional arguments:
  coprchroot            Path to a project chroot as owner/project/chroot or project/chroot

options:
  -h, --help            show this help message and exit
  --upload-comps FILEPATH
                        filepath to the comps.xml file to be uploaded
  --delete-comps        deletes already existing comps.xml for the chroot
  --packages PACKAGES   space separated string of package names to be added to buildroot
  --repos REPOS         space separated string of additional repo urls for chroot
  --modules MODULES     comma separated list of modules that will be enabled or disabled in the given chroot, e.g. 'module1:stream,!module2:stream'
  --rpmbuild-with RPMBUILD_WITH
                        rpmbuild --with option, can be set multiple times
  --rpmbuild-without RPMBUILD_WITHOUT
                        rpmbuild --without options, can be set multiple times
  --isolation {simple,nspawn,default}
                        Choose the isolation method for running commands in buildroot.
  --bootstrap {unchanged,default,on,off,image}
                        Configure Mock's bootstrap feature, default is 'unchanged' so the configuration from Copr project is used for this chroot. The 'default' variant resets the project configuration to the pre-configured setup from
                        mock-core-configs. See 'create --help' for more info.
  --bootstrap-image BOOTSTRAP_IMAGE
                        Use a custom container image for initializing Mock's bootstrap (Implies --bootstrap=image)
  --reset RESET         Reset this parameters to their respective defaults. Possible values are additional_packages, additional_modules, isolation, etc. See the output of `copr-cli get-chroot' for all the possible field names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API RFE Enhancement, feature requests
Projects
Archived in project
Development

No branches or pull requests

2 participants