Skip to content

Commit 578ba6d

Browse files
committed
Merged PR 21869: Correct --architecture in fpm commands
# {PR title} Correct `--architecture` in `fpm` commands ## Description Update `fpm` commands to use a supported `--architecture` value. As-is, the x64 .rpm files we produce are incompatible w/ installation on an x64 machine. Problem found during servicing version flow. ## Customer Impact Unable to build dotnet-installer-ci-official w/ current .rpm files from dotnet-aspnetcore repo. ## Regression? - [x] Yes - [ ] No This is a build regression since 6.0.3. It will also impact our 'main' branch. ## Risk - [ ] High - [ ] Medium - [x] Low Have verified the chosen values for the command line using available online documentation. Since we know the current .rpm files are busted, things can only get better 😃 ## Verification - [x] Manual (required) - [ ] Automated I am locally building this branch and will use `rpmlint` in a `docker` container to verify the goodness of the produced package. ## Packaging changes reviewed? - [ ] Yes - [ ] No - [ ] N/A Not sure how to answer this because the change is to an internal setting of the RPM installer. If others agree it's the right change, it's been reviewed 😃 ---- ## When servicing release/2.1 - [ ] Make necessary changes in eng/PatchConfig.props
1 parent ce90c81 commit 578ba6d

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)