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

RFE: Allow to specify architectures #27

Closed
hroncok opened this issue Aug 11, 2019 · 4 comments
Closed

RFE: Allow to specify architectures #27

hroncok opened this issue Aug 11, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@hroncok
Copy link
Contributor

hroncok commented Aug 11, 2019

For quick debugging and for integration with Fedora CI pipeline, it would be nice if I could say for example: "I only care about x86_64,noarch,src", to prevent downloading and unpacking extra unwanted packages (~320 MiB for python3).

@dcantrell
Copy link
Collaborator

This is a really good idea. Where should I get a list of valid architectures? Since rpminspect is tied to rpm and that universe, should I ask rpm or otherwise look at what it calls an architecture? Should I allow any string and just match every package it iterates through and skip the ones that do not match? That would probably be expensive because it would need to download all packages anyway and that can be avoided.

@dcantrell dcantrell self-assigned this Aug 14, 2019
@dcantrell dcantrell added the enhancement New feature or request label Aug 14, 2019
@hroncok
Copy link
Contributor Author

hroncok commented Aug 14, 2019

How do you ask Koji for the download links? Maybe it has some kind of options for this already?

@dcantrell
Copy link
Collaborator

Found it. I can call getAllArches() on the Koji hub and get a list of supported architecture names. I can then validate the command line input from the user and abort if the user gives me an invalid architecture name. Working on the patch.

dcantrell added a commit that referenced this issue Aug 21, 2019
This is part 1 of a 2 part enhancement.  This commit adds code that
processes a new command line argument called -a or --arches.  You
specify a list of architectures you want to run rpminspect for,
delimited by commas.  The default mode of operation is to operate on all
found architectures, but there may be instances where you want to
restrict the run to one or a subset of architectures.

The syntax is:

    rpminspect -a ARCH,ARCH,ARCH BEFORE_BUILD AFTER_BUILD

There is no "-a ALL" option since the default is to operate on
everything.  Architecture names are checked against what the Koji hub
says it can build for.  In Fedora right now, a valid -a option would
look like this:

    rpminspect -a x86_64,aarch64,ppc64le

If you specify the -a option, the SRPM is not automatically included.
You need to add 'src' to the list.  Like this:

    rpminspect -a x86_64,aarch64,ppc64le,src

If you specify something like this in Fedora now:

    rpminspect -a hppa,mips,sparc64,src

You will get an error telling you hppa is an unsupported architecture.
rpminspect will terminate on the first invalid architecture specified.

The next commit will hook up the build gathering to the architecture
list.
dcantrell added a commit that referenced this issue Aug 21, 2019
For local and downloaded builds, if the user specifies an architecture
list with -a or --arches then only RPMs for those architectures
specified are downloaded.  Source RPMs are called 'src' in this context.
@dcantrell
Copy link
Collaborator

Done. See the commits linked in this issue. Basically you do this:

rpminspect -a x86_64,s390x,src

To restrict it to those architectures. Works for downloaded builds and local builds, however the architecture list is validated against what the Koji hub supports.

jeremycline pushed a commit to jeremycline/rpminspect that referenced this issue Jul 13, 2020
…inspect#27)

This is part 1 of a 2 part enhancement.  This commit adds code that
processes a new command line argument called -a or --arches.  You
specify a list of architectures you want to run rpminspect for,
delimited by commas.  The default mode of operation is to operate on all
found architectures, but there may be instances where you want to
restrict the run to one or a subset of architectures.

The syntax is:

    rpminspect -a ARCH,ARCH,ARCH BEFORE_BUILD AFTER_BUILD

There is no "-a ALL" option since the default is to operate on
everything.  Architecture names are checked against what the Koji hub
says it can build for.  In Fedora right now, a valid -a option would
look like this:

    rpminspect -a x86_64,aarch64,ppc64le

If you specify the -a option, the SRPM is not automatically included.
You need to add 'src' to the list.  Like this:

    rpminspect -a x86_64,aarch64,ppc64le,src

If you specify something like this in Fedora now:

    rpminspect -a hppa,mips,sparc64,src

You will get an error telling you hppa is an unsupported architecture.
rpminspect will terminate on the first invalid architecture specified.

The next commit will hook up the build gathering to the architecture
list.
jeremycline pushed a commit to jeremycline/rpminspect that referenced this issue Jul 13, 2020
…t#27)

For local and downloaded builds, if the user specifies an architecture
list with -a or --arches then only RPMs for those architectures
specified are downloaded.  Source RPMs are called 'src' in this context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants