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

hroncok opened this issue Aug 11, 2019 · 4 comments


Copy link

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).


This comment has been minimized.

Copy link

commented Aug 14, 2019

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


This comment has been minimized.

Copy link

commented Aug 14, 2019

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


This comment has been minimized.

Copy link

commented Aug 20, 2019

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
Add support for specifying architecture list on the command line (#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:


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
dcantrell added a commit that referenced this issue Aug 21, 2019
Hook up the -a/--arches command line argument to downloads (#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.

This comment has been minimized.

Copy link

commented Aug 21, 2019

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.

@dcantrell dcantrell closed this Aug 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.