Add the ability to build without EPEL packages
ClosedPublic

Authored by mprahl on Nov 7 2016, 7:32 PM.

Details

Summary

When we build the ResultsDB package internally we are not able to use EPEL packages, and thus, the build fails.
This allows the builder to toggle the without_epel macro, which will allow for internal builds without a lot of altering on the spec file.

Test Plan

I tested a build with without_epel turned on and it worked as expected. Someone will need to test this for when without_epel is turned off.

Diff Detail

Repository
rRSDB resultsdb
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mprahl retitled this revision from to Add the ability to build without EPEL packages.Nov 7 2016, 7:32 PM
mprahl updated this object.
mprahl edited the test plan for this revision. (Show Details)
mprahl added reviewers: tflink, jskladan.
jskladan requested changes to this revision.Nov 7 2016, 8:42 PM

The double negatio in all the if-clauses is kind of hard to process for me. Might be because of the fact that I'm not a native speaker, but something like %global epel_available 0 and %if 0%{?epel_available} would be much more readable for me. (And this is why I'm "Requesting Changes").

I also have a question about the problem overall - is this a problem only for internal builds, or is this generally a problem of RHEL? Because if it's a Fedora vs. RHEL thing, then the epel_available (or without_epel as it is now) macro seems a bit unnecessary, and %if 0%{?fedora} instead of the %if !0%{?without_epel} would feel much cleaner, and would also prevent us from needing a separate EPEL branch just because a macro needs to have a different value (this I might be misunderstanding, but the "there needs to be an epel branch" was said in an email conversation that I was part of, and I'm not sure whether this is _the_ solution, or a thing done to not need it).

This revision now requires changes to proceed.Nov 7 2016, 8:42 PM
mprahl added a comment.Nov 7 2016, 8:46 PM

@jskladan: @tflink requested that the macro be by that name. I'm open to changing it once we have a consensus.

I'm not a packaging expert by any means, but as I understand it, this is only because internal builds don't allow EPEL packages during the build process, and is not specific to RHEL.

Ah, OK, never mind me then - I don't really do packaging at all, so this was more of "It's hard to parse, maybe this was over-engineered" since that sure happens to me all the time :)

tflink accepted this revision.Jan 10 2017, 6:04 AM

I'm not dead set on without_epel. That macro name made sense to me because that's what's being switched - supporting epel or not. If the general consensus is that %if 0%{?fedora} is more readable, that's with me.

Otherwise the specfile looks good to me.

So does this need changes after all?

@tflink @jskladan Any updates on this?

I guess you can merge it? @tflink is happy with it, and I don't really do packaging that much to be really opinionated.

@mprahl I'm not sure whether you have commit access to resultsdb - could not get it from pagure, but it's just me being unable to successfully use it.
If you don't please provide a diff that can be applied on current devel branch, and I'll merge it for you.

mprahl added a comment.EditedJan 20 2017, 1:31 PM

@jskladan, I don't have rights to commit on ResultsDB. I updated the diff. Thank you for your help.

mprahl updated this revision to Diff 2777.Jan 20 2017, 1:43 PM

Updated to be on the latest development branch

jskladan added a subscriber: ralph.Jan 20 2017, 2:49 PM

@mprahl - merging now, sorry for the delay, really forgot that you don't have the commit right, the same as @ralph does

Closed by commit rRSDBe86dbd5b92e8: Add the ability to build without EPEL packages (authored by mprahl <mprahl@redhat.com>, committed by Josef Skladanka <jskladan@redhat.com>). · Explain WhyJan 20 2017, 2:53 PM
This revision was automatically updated to reflect the committed changes.