Fail the RPM build if FPM tool is not present #51170
Open
+6
−8
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.
Currently, if the build is supposed to produce RPM packages, but the tooling (i.e.
fpm
) is missing, a message will be logged and the build will skip the RPM package generation. This can result in successful builds that are missing the required artifacts.Additional changes were needed, as RPM targets were being executed for any build that was running on RPM-based distro due to:
sdk/src/Installer/redist-installer/targets/GenerateRPMs.targets
Lines 14 to 16 in c1ff1eb
The use of property
IsRPMBasedDistro
was overloaded to mean both that the distro is RPM-based and that we want to build installers.Property was set here:
sdk/src/Installer/redist-installer/targets/GetRuntimeInformation.targets
Lines 29 to 30 in c1ff1eb
For installer build we were passing this same property, which was already being set on rpm-based distros, so this wasn't correct:
sdk/.vsts-ci.yml
Line 216 in c1ff1eb
I am now setting a different property,
BuildSdkRpm
, in scenarios where RPM packaging is desired. This matches DEB build experience, where we have a similar pair of properties:BuildSdkDeb
andIsDebianBaseDistro
.Notes
Fix for 9.0.1xx - will be backported to other 9.0.x branches in support. Fix for 8.0 - dotnet/installer#20633
Contributes to dotnet/installer#20561