Generate RPM Installer
This commit is contained in:
parent
d2528332b2
commit
24ccfbae1a
13 changed files with 42 additions and 26 deletions
|
@ -8,6 +8,7 @@
|
||||||
<PackageReference Include="Microsoft.Build" Version="15.7.177" />
|
<PackageReference Include="Microsoft.Build" Version="15.7.177" />
|
||||||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.7.177" />
|
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.7.177" />
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.0.0" />
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.0.0" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
|
||||||
|
|
|
@ -17,5 +17,6 @@
|
||||||
<Import Project="targets\GenerateMSIs.targets" />
|
<Import Project="targets\GenerateMSIs.targets" />
|
||||||
<Import Project="targets\LinuxNativeInstallerDependencyVersions.targets" />
|
<Import Project="targets\LinuxNativeInstallerDependencyVersions.targets" />
|
||||||
<Import Project="targets\GenerateDebs.targets" />
|
<Import Project="targets\GenerateDebs.targets" />
|
||||||
|
<Import Project="targets\GenerateRPMs.targets" />
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -30,4 +30,6 @@
|
||||||
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CoreSdkTaskDll)" />
|
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||||
<UsingTask TaskName="Chmod" AssemblyFile="$(CoreSdkTaskDll)" />
|
<UsingTask TaskName="Chmod" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||||
<UsingTask TaskName="DotNetDebTool" AssemblyFile="$(CoreSdkTaskDll)" />
|
<UsingTask TaskName="DotNetDebTool" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||||
|
<UsingTask TaskName="BuildFPMToolPreReqs" AssemblyFile="$(CoreSdkTaskDll)"/>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -143,14 +143,15 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Outer GenerateDebs target so that GetCurrentRuntimeInformation will set IsDebianBasedDistro before target
|
<!-- Outer GenerateDebs target so that GetCurrentRuntimeInformation will set IsDebianBasedDistro before
|
||||||
condition is evaluated -->
|
GenerateDebsInner condition is evaluated -->
|
||||||
<Target Name="GenerateDebsOuter"
|
<Target Name="GenerateDebs"
|
||||||
DependsOnTargets="GetCurrentRuntimeInformation;
|
DependsOnTargets="GetCurrentRuntimeInformation;
|
||||||
GenerateDebs"/>
|
GenerateDebs"/>
|
||||||
|
|
||||||
|
|
||||||
<!-- Re-enable "TestSdkDeb" when the following issue is resolved: https://github.com/dotnet/cli/issues/9672 -->
|
<!-- Re-enable "TestSdkDeb" when the following issue is resolved: https://github.com/dotnet/cli/issues/9672 -->
|
||||||
<Target Name="GenerateDebs"
|
<Target Name="GenerateDebsInner"
|
||||||
DependsOnTargets="SetupDebProps;
|
DependsOnTargets="SetupDebProps;
|
||||||
TestDebuild;
|
TestDebuild;
|
||||||
BuildSdkDeb"
|
BuildSdkDeb"
|
||||||
|
|
7
src/redist/targets/GenerateInstallers.targets
Normal file
7
src/redist/targets/GenerateInstallers.targets
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<Project>
|
||||||
|
<Target Name="GenerateInstallers"
|
||||||
|
DependsOnTargets="GetCurrentRuntimeInformation;
|
||||||
|
GenerateMsis;
|
||||||
|
GenerateDebs;"
|
||||||
|
/>
|
||||||
|
</Project>
|
|
@ -1,29 +1,26 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project>
|
||||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RpmConfigJsonName>rpm_config.json</RpmConfigJsonName>
|
<RpmConfigJsonName>rpm_config.json</RpmConfigJsonName>
|
||||||
<TemplatesDir>$(RepoRoot)/packaging/rpm/templates</TemplatesDir>
|
<TemplatesDir>$(MSBuildThisFileDirectory)packaging/rpm/templates</TemplatesDir>
|
||||||
<ScriptsDir>$(RepoRoot)/packaging/rpm/scripts</ScriptsDir>
|
<ScriptsDir>$(MSBuildThisFileDirectory)packaging/rpm/scripts</ScriptsDir>
|
||||||
<AfterInstallHostScriptName>after_install_host.sh</AfterInstallHostScriptName>
|
<AfterInstallHostScriptName>after_install_host.sh</AfterInstallHostScriptName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CLIBuildDll)"/>
|
|
||||||
<UsingTask TaskName="BuildFPMToolPreReqs" AssemblyFile="$(CLIBuildDll)"/>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<Target Name="GenerateRpms"
|
||||||
<BuildRpmPackage Condition=" '$(IsRPMBasedDistro)' == 'True' ">True</BuildRpmPackage>
|
DependsOnTargets="GetCurrentRuntimeInformation;
|
||||||
</PropertyGroup>
|
GenerateRpmsInner" />
|
||||||
|
|
||||||
<!-- Re-enable "TestSdkRpm" when the following issue is resolved: https://github.com/dotnet/cli/issues/9672 -->
|
<!-- Re-enable "TestSdkRpm" when the following issue is resolved: https://github.com/dotnet/cli/issues/9672 -->
|
||||||
<Target Name="GenerateRpms"
|
<Target Name="GenerateRpmsInner"
|
||||||
DependsOnTargets="TestFPMTool;BuildRpms"
|
DependsOnTargets="TestFPMTool;BuildRpms"
|
||||||
Condition=" '$(BuildRpmPackage)' == 'True' "
|
Condition=" '$(IsRPMBasedDistro)' == 'True' "
|
||||||
Outputs="@(GeneratedInstallers)"/>
|
Outputs="@(GeneratedInstallers)"/>
|
||||||
|
|
||||||
<Target Name="BuildRpms"
|
<Target Name="BuildRpms"
|
||||||
DependsOnTargets="GenerateSdkRpm"
|
DependsOnTargets="GenerateSdkRpm"
|
||||||
Condition=" '$(BuildRpmPackage)' == 'True' and '$(FPMPresent)' == 'True' "/>
|
Condition=" '$(IsRPMBasedDistro)' == 'True' and '$(FPMPresent)' == 'True' "/>
|
||||||
|
|
||||||
<Target Name="GenerateSdkRpm"
|
<Target Name="GenerateSdkRpm"
|
||||||
DependsOnTargets="SetupRpmProps">
|
DependsOnTargets="SetupRpmProps">
|
||||||
|
@ -103,12 +100,12 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<TestSdkRpmTaskEnvironmentVariables Include="PATH=$(RpmInstalledDirectory)$(PathListSeparator)$(PATH)" />
|
<TestSdkRpmTaskEnvironmentVariables Include="PATH=$(RpmInstalledDirectory)$(PathListSeparator)$(PATH)" />
|
||||||
<TestSdkRpmTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsDir)" />
|
<!--<TestSdkRpmTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsDir)" />
|
||||||
<TestSdkRpmTaskEnvironmentVariables Include="TEST_PACKAGES=$(TestPackagesDir)" />
|
<TestSdkRpmTaskEnvironmentVariables Include="TEST_PACKAGES=$(TestPackagesDir)" />
|
||||||
<TestSdkRpmTaskEnvironmentVariables Include="PreviousStageProps=$(NextStagePropsPath)" />
|
<TestSdkRpmTaskEnvironmentVariables Include="PreviousStageProps=$(NextStagePropsPath)" />-->
|
||||||
|
|
||||||
<!-- Consumed By Publish -->
|
<!-- Consumed By Publish -->
|
||||||
<GeneratedInstallers Include="$(SdkInstallerFile)" />
|
<!--<GeneratedInstallers Include="$(SdkInstallerFile)" />-->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ReplaceFileContents InputFiles="$(AfterInstallHostScriptTemplateFile)"
|
<ReplaceFileContents InputFiles="$(AfterInstallHostScriptTemplateFile)"
|
||||||
|
@ -150,17 +147,22 @@
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="SetupRpmProps" DependsOnTargets="CalculateLinuxNativeInstallerDependencyVersions">
|
<Target Name="SetupRpmProps"
|
||||||
|
DependsOnTargets="SetSdkVersionInfo;CalculateLinuxNativeInstallerDependencyVersions;GetCurrentRuntimeInformation;SetupFileExtensions">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<SdkRpmPackageVersion>$(MajorMinorVersion)</SdkRpmPackageVersion>
|
||||||
|
<SdkRpmPackageName>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion)</SdkRpmPackageName>
|
||||||
|
|
||||||
<RuntimeDepsPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeDepsPackageVersion>
|
<RuntimeDepsPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeDepsPackageVersion>
|
||||||
<RuntimeDepsPackageFileName>dotnet-runtime-deps-$(RuntimeDepsPackageVersion)</RuntimeDepsPackageFileName>
|
<RuntimeDepsPackageFileName>dotnet-runtime-deps-$(RuntimeDepsPackageVersion)</RuntimeDepsPackageFileName>
|
||||||
<RpmPackageVersion>$(SdkVersion)</RpmPackageVersion>
|
<RpmPackageVersion>$(SdkVersion)</RpmPackageVersion>
|
||||||
<InputRoot>$(OutputDirectory)/sdk</InputRoot>
|
<InputRoot>$(RedistLayoutPath)sdk/</InputRoot>
|
||||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkInstallerFile>
|
<SdkInstallerFile>$(ArtifactsShippingPackagesDir)$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||||
<RpmFile>$(SdkInstallerFile)</RpmFile>
|
<RpmFile>$(SdkInstallerFile)</RpmFile>
|
||||||
|
<!-- Need to acquire manpage files from CLI repo: https://github.com/dotnet/cli/issues/10266 -->
|
||||||
<ManPagesDir>$(RepoRoot)/Documentation/manpages</ManPagesDir>
|
<ManPagesDir>$(RepoRoot)/Documentation/manpages</ManPagesDir>
|
||||||
<ConfigJsonFile>$(RepoRoot)/packaging/rpm/dotnet-config.json</ConfigJsonFile>
|
<ConfigJsonFile>$(MSBuildThisFileDirectory)packaging/rpm/dotnet-config.json</ConfigJsonFile>
|
||||||
<RpmIntermediatesDir>$(IntermediateDirectory)/$(RpmPackageName)/$(RpmPackageVersion)</RpmIntermediatesDir>
|
<RpmIntermediatesDir>$(IntermediateOutputPath)$(SdkRpmPackageName)/$(RpmPackageVersion)</RpmIntermediatesDir>
|
||||||
<RpmTestResultsXmlFile>$(RpmIntermediatesDir)/debian-testResults.xml</RpmTestResultsXmlFile>
|
<RpmTestResultsXmlFile>$(RpmIntermediatesDir)/debian-testResults.xml</RpmTestResultsXmlFile>
|
||||||
<RpmInstalledDirectory>/usr/share/dotnet</RpmInstalledDirectory>
|
<RpmInstalledDirectory>/usr/share/dotnet</RpmInstalledDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -175,8 +177,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SdkRpmPackageVersion>$(MajorMinorVersion)</SdkRpmPackageVersion>
|
|
||||||
<SdkRpmPackageName>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion)</SdkRpmPackageName>
|
|
||||||
<SharedFxRpmPackageVersion>$(MicrosoftNETCoreAppMajorMinorVersion)</SharedFxRpmPackageVersion>
|
<SharedFxRpmPackageVersion>$(MicrosoftNETCoreAppMajorMinorVersion)</SharedFxRpmPackageVersion>
|
||||||
<SharedFxRpmPackageFileVersion>$(MicrosoftNETCoreAppPackageVersion)</SharedFxRpmPackageFileVersion>
|
<SharedFxRpmPackageFileVersion>$(MicrosoftNETCoreAppPackageVersion)</SharedFxRpmPackageFileVersion>
|
||||||
<SharedFxRpmPackageName>dotnet-runtime-$(SharedFxRpmPackageVersion)</SharedFxRpmPackageName>
|
<SharedFxRpmPackageName>dotnet-runtime-$(SharedFxRpmPackageVersion)</SharedFxRpmPackageName>
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
|
|
||||||
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' AND '$(OS)' == 'Windows_NT' ">true</IncludeWpfAndWinForms>
|
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' AND '$(OS)' == 'Windows_NT' ">true</IncludeWpfAndWinForms>
|
||||||
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' ">false</IncludeWpfAndWinForms>-->
|
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' ">false</IncludeWpfAndWinForms>-->
|
||||||
|
|
||||||
|
<PathListSeparator>:</PathListSeparator>
|
||||||
|
<PathListSeparator Condition=" '$(OS)' == 'Windows_NT' ">%3b</PathListSeparator>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in a new issue