Fixed double-build of TR RPMs in CiaB makefile #3883
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR (Pull Request) do?
When building packages for CDN-in-a-Box using
make
with multiple "jobs" (i.e. with-j
), there is a race condition building the Traffic Router and Tomcat RPMs, since one build process creates both and they both depend on changes to the TR source. In cases where this manifested - which is often - the build will either fail or simply do double the work it needs to do when building those RPMs. This PR eliminates that by changing the rule to a pattern-based one, whichmake
will now properly recognize as a single output (consisting of multiple files) of a single build process.Which Traffic Control components are affected by this PR?
No docs because it's a bugfix
What is the best way to verify this PR?
Build the RPMs for CDN-in-a-Box using
make
with the-j
flag, observe that it consistently has no issue creating RPMs for both Tomcat and Traffic Router exactly once (note that in order to do that, thebuild_default
Docker network must already exist - which is accomplished by just having built an RPM on the same machine before - as otherwise duplicate networks will be created).No tests because this is just the build system for a toy environment.
If this is a bug fix, what versions of Traffic Control are affected?
N/A - CDN-in-a-Box is not a supported component of Traffic Control, and no such support is purported to exist in any existing releases.
The following criteria are ALL met by this PR