Skip to content

Commit 49270ee

Browse files
authored
Correct --architecture in fpm commands (#40768)
- update `fpm` commands to use a supported `--architecture` value - the x64 .rpm files we previously produced were incompatible w/ installation on an x64 machine
1 parent f08285d commit 49270ee

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Installers/Rpm/Directory.Build.targets

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@
5050
<ChangeLogProps>$(ChangeLogProps);PACKAGE_VERSION=$(PackageVersion)</ChangeLogProps>
5151
<ChangeLogProps>$(ChangeLogProps);PACKAGE_REVISION=$(PackageRevision)</ChangeLogProps>
5252

53+
<!--
54+
RpmArch is used to match our naming conventions but
55+
https://fedoraproject.org/wiki/Architectures#Primary_Architectures lists the canonical names `fpm` and
56+
`rpmbuild` expect on the command line. Aliases like ARMv8, arm-64 and amd64 should also work.
57+
-->
58+
<CommandLineArch Condition=" '$(TargetArchitecture)' == 'x64' ">x86_64</CommandLineArch>
59+
<CommandLineArch Condition=" '$(TargetArchitecture)' == 'arm64' ">aarch64</CommandLineArch>
60+
5361
<GeneratedChangeLog>$(IntermediateOutputPath)changelog</GeneratedChangeLog>
5462
</PropertyGroup>
5563

@@ -64,7 +72,7 @@
6472
<FpmArgs Include="--package=$(TargetPath)" />
6573
<FpmArgs Include="--version=$(PackageVersion)" />
6674
<FpmArgs Include="--iteration=$(PackageRevision)" />
67-
<FpmArgs Include="--architecture=$(RpmArch)" />
75+
<FpmArgs Include="--architecture=$(CommandLineArch)" />
6876
<FpmArgs Include="--depends=&quot;%(RpmDependency.Identity) &gt;= %(RpmDependency.Version)&quot;" Condition=" '%(RpmDependency.Identity)' != '' " />
6977
<FpmArgs Include="--rpm-changelog=&quot;$(GeneratedChangeLog)&quot;" />
7078
<FpmArgs Include="--rpm-summary=&quot;$(PackageSummary)&quot;" />

0 commit comments

Comments
 (0)