-
Notifications
You must be signed in to change notification settings - Fork 356
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: add way to set macro for --nocheck in rpmbuild #316
Comments
I remember people were using |
BuildRequires(check) never did anything special, it was just a flaw in the spec parser that BuildRequires(whatever) was accepted. |
@pmatilai It doesn't sound like a bad idea to have |
Oh, I'm sure packagers would just luv yet more pesky details to fill in. |
+1 so this. Please make it possible. |
+1 this would be a great way to standardize on disabling tests! |
signaling and controling whether %check is executed during build. The macro can be set globally or in the spec file. The --nocheck parameter of rpmbuild takes precedence, though. If --nocheck is passed to rpmbuild the macro set accordingly. Otherwise it is set to 0 if not defined previously. Resolves: rpm-software-management#316
Did a PR for this on Friday. Comments on #1256 are welcome. |
@ffesti could you make Hmmm, |
I'm a bit confused after reading this issue and the PR. I have a spec file that the %check stage has some specific requirement, but I would like to make that requirement only in place when I do run the %check stage (i.e. when not using the |
Found it,
|
we can use : rpmbuild --without check |
This can be added very easy by place in global macros single line modification # Add handle --{with|without} check
%__spec_check_pre \
%{!?with_check:echo "%%check disabled."; exit 0} \
%{___build_pre} Than you can place in spec file: %bcond_with check to disable %check. Do you want this as PR? 🤔 |
Actually this is not all. It needs to be added default value of the %with_check. So wole solution has two additional lines. # Add handle --{with|without} check
%with_check 1
%__spec_check_pre \
%{!?with_check:echo "%%check disabled."; exit 0} \
%{___build_pre} |
currently when I pass
--nocheck
torpmbuild
, it just skips running check section, but there is no way to know this from spec file. would be nice if rpm would add some bcond for this, so packagers can do things like:or, do something like
I remember that this was requested in RHBZ, but I can't find link (usual situation for bugzillas)..
The problem which I hit that MBS can't pass any parameters to koji (and passing them to mock is complicated in current code), so workaround was to put
%__spec_check_pre exit 0
in macros file which I don't like.The text was updated successfully, but these errors were encountered: