Skip to content

Conversation

NikolaMilosavljevic
Copy link
Member

@NikolaMilosavljevic NikolaMilosavljevic commented Oct 8, 2025

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:

<Target Name="GenerateRpmsInner"
DependsOnTargets="TestFPMTool;BuildRpms"
Condition=" '$(IsRPMBasedDistro)' == 'True' "

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:

<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('rhel')) AND '$(HostRid)' != 'rhel.6-x64' ">true</IsRPMBasedDistro>
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('centos')) ">true</IsRPMBasedDistro>

For installer build we were passing this same property, which was already being set on rpm-based distros, so this wasn't correct:

osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true

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 and IsDebianBaseDistro.

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

@NikolaMilosavljevic
Copy link
Member Author

Regular (non-pkg) Linux leg is trying to build RPM packages - that shouldn't happen. More changes are needed.

@NikolaMilosavljevic
Copy link
Member Author

I've applied the same changes from 8.0 PR, which is now passing all checks: dotnet/installer#20633

@NikolaMilosavljevic
Copy link
Member Author

@marcpopMSFT can we merge this one? I think the branch is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants