openSUSE / obs-build

OBS build script, can be used with OBS or stand alone
GNU General Public License v2.0
132 stars 183 forks source link

build: add '--buildtool-opt=OPTIONS' to pass generator options #923

Closed rhabacker closed 1 year ago

rhabacker commented 1 year ago

Fixes #922

rhabacker commented 1 year ago

Someone here how can merge these pr?

There is a request to remove the deprecated dependency generator from rpmbuild, see https://github.com/rpm-software-management/rpm/issues/2373.

The removal of the deprecated generator is underway, see https://bugzilla.opensuse.org/show_bug.cgi?id=1175587, but for finding and fixing bugs related to the new generator, it would be helpful if package maintainer could simply, e.g.

osc build --build-opt="--recipe-opt=--rpmfcdebug" openSUSE_Leap_15.4

to debug that.

adrianschroeter commented 1 year ago

We don't really like the "--receipe-opt" name as it does not affect the build receipt, but the processing tool.

What about calling it --buildtool-opt or --engine-opt and support that also in osc directly to avoid the need to cascade via --build-opt there?

adrianschroeter commented 1 year ago

cool, thanks

rhabacker commented 1 year ago

support that also in osc directly to avoid the need to cascade via --build-opt there?

I think this can only happen after the next version of the build package, as it does not currently provide for the return of the current version.

build --version
Unknown option '--version'. Exit.

But this would be necessary to distinguish older version, otherwise an error message like "Unknown option --buildtool-opt..." would appear when called.

rhabacker commented 1 year ago

Since build does not currently support a --version command line parameter, a workaround would be to call build --help and look for the required --buildtool-opt option to see if it is available.

adrianschroeter commented 1 year ago

IMHO it does not matter in such an optional switch. In worst case osc could require a certain build script version.