Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9178 from NikolaMilosavljevic/mar.31
Browse files Browse the repository at this point in the history
[release/3.1] Additional RPMs for CBL-Mariner
  • Loading branch information
NikolaMilosavljevic authored Oct 6, 2021
2 parents f68f12f + 5566cc8 commit e8ad4e3
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,13 @@
<SharedFrameworkInstallerFile>$(SharedFrameworkInstallerStart)$(SharedFrameworkNugetVersion)-$(TargetArchitecture)$(InstallerExtension)</SharedFrameworkInstallerFile>
</PropertyGroup>

<PropertyGroup Condition="'$(InstallerExtension)' == '.rpm'">
<_CblMarinerVersionSuffix>cm.1</_CblMarinerVersionSuffix>
<SharedHostInstallerFileCblMariner>$(SharedHostInstallerStart)$(SharedFrameworkNugetVersion)-$(_CblMarinerVersionSuffix)-$(TargetArchitecture)$(InstallerExtension)</SharedHostInstallerFileCblMariner>
<HostFxrInstallerFileCblMariner>$(HostFxrInstallerStart)$(HostResolverVersion)-$(_CblMarinerVersionSuffix)-$(TargetArchitecture)$(InstallerExtension)</HostFxrInstallerFileCblMariner>
<SharedFrameworkInstallerFileCblMariner>$(SharedFrameworkInstallerStart)$(SharedFrameworkNugetVersion)-$(_CblMarinerVersionSuffix)-$(TargetArchitecture)$(InstallerExtension)</SharedFrameworkInstallerFileCblMariner>
</PropertyGroup>

<!-- Runtime-deps Deb package is distro version agnostic. -->
<PropertyGroup Condition="'$(InstallerExtension)' == '.deb'">
<DotnetRuntimeDependenciesPackageInstallerFile>$(DotnetRuntimeDependenciesPackageInstallerStart)$(SharedFrameworkNugetVersion)-$(TargetArchitecture)$(InstallerExtension)</DotnetRuntimeDependenciesPackageInstallerFile>
Expand Down
9 changes: 9 additions & 0 deletions src/pkg/packaging-tools/installer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@
UseHardlinksIfPossible="False" />

<Message Text="$(MSBuildProjectName) -> $(InstallerFile)" Importance="high" />

<Copy Condition="'$(CreateRPMForCblMariner)' == 'true'"
SourceFiles="@(GeneratedRpmFiles)"
DestinationFiles="$(_InstallerFileCblMariner)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<Message Text="$(MSBuildProjectName) -> $(_InstallerFileCblMariner)" Importance="high" />
</Target>

<Target Name="GetRpmInstallerJsonProperties"
Expand Down
8 changes: 8 additions & 0 deletions src/pkg/packaging-tools/packaging-tools.targets
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
<CompressedArchiveFile>$(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(CompressedFileExtension)</CompressedArchiveFile>
</PropertyGroup>

<PropertyGroup Condition="'$(InstallerExtension)' == '.rpm'">
<CreateRPMForCblMariner>true</CreateRPMForCblMariner>
<_CblMarinerVersionSuffix>cm.1</_CblMarinerVersionSuffix>
<_InstallerBuildPartCblMariner>$(ProductVersion)-$(_CblMarinerVersionSuffix)-$(TargetArchitecture)</_InstallerBuildPartCblMariner>
<_InstallerFileNameWithoutExtensionCblMariner>$(InstallerName)-$(_InstallerBuildPartCblMariner)$(CrossArchContentsBuildPart)</_InstallerFileNameWithoutExtensionCblMariner>
<_InstallerFileCblMariner Condition="'$(_InstallerFileCblMariner)' == ''">$(AssetOutputPath)$(_InstallerFileNameWithoutExtensionCblMariner)$(InstallerExtension)</_InstallerFileCblMariner>
</PropertyGroup>

<!--
Set the directory containing contents to include in the archive (zip/tarball). This default
means the "shared" dir is inside the archive and it can be extracted directly into the dotnet
Expand Down
21 changes: 21 additions & 0 deletions src/pkg/packaging/rpm/package.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<RpmPackageVersion>$(HostPackageVersion)</RpmPackageVersion>
<InputRoot>$(SharedHostPublishRoot)</InputRoot>
<RpmFile>$(SharedHostInstallerFile)</RpmFile>
<RpmFileCblMariner>$(SharedHostInstallerFileCblMariner)</RpmFileCblMariner>
<ManPagesDir>$(ProjectDir)Documentation/manpages</ManPagesDir>
<ConfigJsonName>dotnet-sharedhost-rpm_config.json</ConfigJsonName>
<ConfigJsonFile>$(rpmPackagingConfigPath)$(ConfigJsonName)</ConfigJsonFile>
Expand Down Expand Up @@ -111,6 +112,12 @@
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<Copy SourceFiles="@(GeneratedRpmFiles)"
DestinationFiles="$(RpmFileCblMariner)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<!--
Clean up dotnet symlink. Later build steps are confused and fail because the symlink points to
a path that doesn't exist on the build machine.
Expand All @@ -124,6 +131,7 @@
<RpmPackageVersion>$(HostResolverPackageVersion)</RpmPackageVersion>
<InputRoot>$(HostFxrPublishRoot)</InputRoot>
<RpmFile>$(HostFxrInstallerFile)</RpmFile>
<RpmFileCblMariner>$(HostFxrInstallerFileCblMariner)</RpmFileCblMariner>
<ConfigJsonName>dotnet-hostfxr-rpm_config.json</ConfigJsonName>
<ConfigJsonFile>$(rpmPackagingConfigPath)$(ConfigJsonName)</ConfigJsonFile>
<RpmIntermediatesDir>$(PackagesIntermediateDir)$(RpmPackageName)/$(RpmPackageVersion)</RpmIntermediatesDir>
Expand Down Expand Up @@ -203,6 +211,12 @@
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<Copy SourceFiles="@(GeneratedRpmFiles)"
DestinationFiles="$(RpmFileCblMariner)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

</Target>

<Target Name="GenerateSharedFrameworkRpm">
Expand All @@ -211,6 +225,7 @@
<RpmPackageVersion>$(RuntimePackageVersion)</RpmPackageVersion>
<InputRoot>$(SharedFrameworkPublishRoot)</InputRoot>
<RpmFile>$(SharedFrameworkInstallerFile)</RpmFile>
<RpmFileCblMariner>$(SharedFrameworkInstallerFileCblMariner)</RpmFileCblMariner>
<ConfigJsonName>dotnet-sharedframework-rpm_config.json</ConfigJsonName>
<ConfigJsonFile>$(rpmPackagingConfigPath)$(ConfigJsonName)</ConfigJsonFile>
<RpmIntermediatesDir>$(PackagesIntermediateDir)$(RpmPackageName)/$(RpmPackageVersion)</RpmIntermediatesDir>
Expand Down Expand Up @@ -302,6 +317,12 @@
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<Copy SourceFiles="@(GeneratedRpmFiles)"
DestinationFiles="$(RpmFileCblMariner)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

</Target>

<Target Name="GenerateRuntimeDependenciesRpm">
Expand Down

0 comments on commit e8ad4e3

Please sign in to comment.