Skip to content

Commit c18d667

Browse files
Fail the RPM build if FPM tool is not present (#51170)
1 parent c1ff1eb commit c18d667

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.vsts-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ extends:
213213
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
214214
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
215215
officialBuildProperties: $(_officialBuildProperties)
216-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
216+
osProperties: $(linuxOsPortableProperties) /p:BuildSdkRpm=true
217217
runTests: false
218218
- categoryName: Portable
219219
container: azureLinux30fpm
@@ -222,7 +222,7 @@ extends:
222222
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
223223
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true
224224
officialBuildProperties: $(_officialBuildProperties)
225-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
225+
osProperties: $(linuxOsPortableProperties) /p:BuildSdkRpm=true
226226
runTests: false
227227
### MUSL ###
228228
- categoryName: Musl

src/Installer/redist-installer/targets/GenerateRPMs.targets

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
<Target Name="GenerateRpmsInner"
1515
DependsOnTargets="TestFPMTool;BuildRpms"
16-
Condition=" '$(IsRPMBasedDistro)' == 'True' "
16+
Condition=" '$(BuildSdkRpm)' == 'True' "
1717
Outputs="@(GeneratedInstallers)" />
1818

1919
<Target Name="BuildRpms"
2020
DependsOnTargets="GenerateSdkRpm"
21-
Condition=" '$(IsRPMBasedDistro)' == 'True' and '$(FPMPresent)' == 'True' " />
21+
Condition=" '$(BuildSdkRpm)' == 'True' and '$(FPMPresent)' == 'True' " />
2222

2323
<Target Name="GenerateSdkRpm"
2424
DependsOnTargets="SetupRpmProps">
@@ -301,10 +301,8 @@
301301
<FPMPresent Condition=" '$(FPMExitCode)' == '0' ">True</FPMPresent>
302302
</PropertyGroup>
303303

304-
<!-- Workaround for Jenkins machines that don't have the necessary packages https://github.com/dotnet/core-setup/issues/2260 -->
305-
<Message Condition=" '$(FPMPresent)' != 'True' "
306-
Text="FPM tool Not found, RPM packages will not be built."
307-
Importance="High" />
304+
<Error Condition=" '$(FPMPresent)' != 'True' "
305+
Text="FPM tool Not found, RPM packages will not be built." />
308306
</Target>
309307

310308
<!-- Removed the TestSdkRpm task as it would fail when the installed package exactly matched the upgrade package -->

src/Installer/redist-installer/targets/GetRuntimeInformation.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<IsDebianBaseDistro Condition=" $(HostRid.StartsWith('ubuntu')) OR $(HostRid.StartsWith('debian')) ">true</IsDebianBaseDistro>
2929
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('rhel')) AND '$(HostRid)' != 'rhel.6-x64' ">true</IsRPMBasedDistro>
3030
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('centos')) ">true</IsRPMBasedDistro>
31+
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('azurelinux')) ">true</IsRPMBasedDistro>
3132
<PublishNativeInstallers Condition=" '$(IslinuxPortable)' != 'true' AND '$(HostRid)' != 'rhel.6-x64' AND !$(Rid.StartsWith('linux-musl'))">true</PublishNativeInstallers>
3233
<PublishArchives Condition=" '$(IslinuxPortable)' == 'true' OR ('$(IsDebianBaseDistro)' != 'true' AND '$(IsRPMBasedDistro)' != 'true') ">true</PublishArchives>
3334
</PropertyGroup>

0 commit comments

Comments
 (0)