Skip to content

Commit

Permalink
Merged PR 21869: Correct --architecture in fpm commands
Browse files Browse the repository at this point in the history
# {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
  • Loading branch information
dougbu committed Mar 18, 2022
1 parent ce90c81 commit 578ba6d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Installers/Rpm/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@
<ChangeLogProps>$(ChangeLogProps);PACKAGE_VERSION=$(PackageVersion)</ChangeLogProps>
<ChangeLogProps>$(ChangeLogProps);PACKAGE_REVISION=$(PackageRevision)</ChangeLogProps>

<!--
RpmArch is used to match our naming conventions but
https://fedoraproject.org/wiki/Architectures#Primary_Architectures lists the canonical names `fpm` and
`rpmbuild` expect on the command line. Aliases like ARMv8, arm-64 and amd64 should also work.
-->
<CommandLineArch Condition=" '$(TargetArchitecture)' == 'x64' ">x86_64</CommandLineArch>
<CommandLineArch Condition=" '$(TargetArchitecture)' == 'arm64' ">aarch64</CommandLineArch>

<GeneratedChangeLog>$(IntermediateOutputPath)changelog</GeneratedChangeLog>
</PropertyGroup>

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

0 comments on commit 578ba6d

Please sign in to comment.