Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use arcade infra for DEB and RPM build #45047

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ extends:
containers:
alpine319WithNode:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
cblMariner20Fpm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
centosStream9:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
debian12Amd64:
Expand All @@ -75,8 +73,6 @@ extends:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
mariner20CrossArm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
ubuntu2204DebPkg:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
sdl:
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
Expand Down Expand Up @@ -200,21 +196,20 @@ extends:
runTests: false
### PORTABLE ###
- categoryName: Portable
container: ubuntu2204DebPkg
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
officialBuildProperties: $(_officialBuildProperties)
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
runTests: false
- categoryName: Portable
container: cblMariner20Fpm
container: centosStream9
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
officialBuildProperties: $(_officialBuildProperties)
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
runTests: false
- categoryName: Portable
container: cblMariner20Fpm
container: centosStream9
buildArchitecture: arm64
runtimeIdentifier: linux-arm64
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
Expand Down
1 change: 0 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@
</PropertyGroup>
<PropertyGroup Label="Infrastructure and test only dependencies">
<VersionToolsVersion>2.2.0-beta.19072.10</VersionToolsVersion>
<DotnetDebToolVersion>2.0.0</DotnetDebToolVersion>
<MicrosoftDotNetScenarioTestsSdkTemplateTestsVersion>10.0.0-preview.24572.1</MicrosoftDotNetScenarioTestsSdkTemplateTestsVersion>
</PropertyGroup>
<PropertyGroup Label="Manually updated">
Expand Down
7 changes: 7 additions & 0 deletions sdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "finalizer-build", "src\Inst
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist-installer", "src\Installer\redist-installer\redist-installer.csproj", "{FAADC193-BA41-449D-97CE-0EF82836046A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-sdk", "src\Installer\pkg\dotnet-sdk.csproj", "{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSTemplateLocator", "src\Installer\redist-installer\projects\VSTemplateLocator\VSTemplateLocator.csproj", "{0CBA5FB8-71A3-457A-89F3-E52B9602164A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "core-sdk-tasks.Tests", "test\core-sdk-tasks.Tests\core-sdk-tasks.Tests.csproj", "{21C21975-84C1-4A24-8E21-F7EC790A4584}"
Expand Down Expand Up @@ -971,6 +973,10 @@ Global
{D9617F63-15F4-4CA2-8ECF-728A94B45D82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9617F63-15F4-4CA2-8ECF-728A94B45D82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9617F63-15F4-4CA2-8ECF-728A94B45D82}.Release|Any CPU.Build.0 = Release|Any CPU
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1149,6 +1155,7 @@ Global
{FA579C03-2EB4-4D47-88EE-BFF339E96FAF} = {22AB674F-ED91-4FBC-BFEE-8A1E82F9F05E}
{1F0B4B3C-DC88-4740-B04F-1707102E9930} = {580D1AE7-AA8F-4912-8B76-105594E00B3B}
{D9617F63-15F4-4CA2-8ECF-728A94B45D82} = {3FA6F1CB-295B-4414-B18F-93845917A8CD}
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44} = {3FA6F1CB-295B-4414-B18F-93845917A8CD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FB8F26CE-4DE6-433F-B32A-79183020BBD6}
Expand Down
1 change: 1 addition & 0 deletions source-build.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"src\\Containers\\packaging\\package.csproj",
"src\\Installer\\redist-installer\\redist-installer.csproj",
"src\\Installer\\core-sdk-tasks\\core-sdk-tasks.csproj",
"src\\Installer\\pkg\\dotnet-sdk.csproj",
"src\\Layout\\redist\\redist.csproj",
"src\\Layout\\tool_fsharp\\tool_fsc.csproj",
"src\\Layout\\tool_msbuild\\tool_msbuild.csproj",
Expand Down
75 changes: 0 additions & 75 deletions src/Installer/core-sdk-tasks/DotNetDebTool.cs

This file was deleted.

127 changes: 127 additions & 0 deletions src/Installer/pkg/dotnet-sdk.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<SkipBuild Condition="'$(BuildSdkDeb)' != 'true' and '$(IsRPMBasedDistro)' != 'true'">true</SkipBuild>
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
<RuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
<GenerateInstallers>true</GenerateInstallers>
<BuildDebPackage Condition="'$(BuildSdkDeb)' == 'true'">true</BuildDebPackage>
<BuildRpmPackage Condition="'$(IsRPMBasedDistro)' == 'true'">true</BuildRpmPackage>
<UseArcadeRpmTooling>true</UseArcadeRpmTooling>
<ProductBrandPrefix>Microsoft .NET</ProductBrandPrefix>
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>
<InstallerName>dotnet-sdk</InstallerName>
<PackageBrandNameSuffix>SDK</PackageBrandNameSuffix>
<PlatformPackageType>ToolPack</PlatformPackageType>
<!--
Installer infra requires MajorVersion and MinorVersion, which triggers reevaluation of Arcade's
VersionPrefix property. This requires PatchVersion to be set in order to produce the correct SDK version.
-->
<MajorVersion>$(VersionMajor)</MajorVersion>
<MinorVersion>$(VersionMinor)</MinorVersion>
<PatchVersion>$(VersionPrefix.Split('.')[2])</PatchVersion>
<!--
All supported installer runtime identifiers should be specified here.
New arcade infra is only used for Linux installers, at the moment.
-->
<InstallerRuntimeIdentifiers>linux-$(Architecture)</InstallerRuntimeIdentifiers>
<IsShippingPackage>true</IsShippingPackage>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\redist-installer\redist-installer.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Installers" />
</ItemGroup>

<Import Project="..\redist-installer\targets\BuildCoreSdkTasks.targets" />
<Import Project="..\redist-installer\targets\LinuxNativeInstallerDependencyVersions.targets" />

<PropertyGroup>
<RedistLayoutPath>$(ArtifactsBinDir)redist-installer\$(Configuration)\dotnet\</RedistLayoutPath>
<ManpagesDirectory>$(RepoRoot)documentation/manpages/sdk</ManpagesDirectory>
<CLISdkRoot>$(RedistLayoutPath)sdk/</CLISdkRoot>
<TemplatesRoot>$(RedistLayoutPath)templates/</TemplatesRoot>
</PropertyGroup>

<Target Name="PublishToDisk">
<Error Condition="'$(OutputPath)' == ''" Text="Publishing to disk requires the OutputPath to be set to the root of the path to write to." />

<ItemGroup>
<CLISdkFiles Include="$(CLISdkRoot)**/*" />
<TemplatesFiles Include="$(TemplatesRoot)**/*" />
<ManifestFiles Include="$(RedistLayoutPath)sdk-manifests/**/*" />
</ItemGroup>

<!-- Create layout: Binaries -->
<Copy
DestinationFiles="@(CLISdkFiles->'$(OutputPath)/sdk/%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(CLISdkFiles)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<!-- Create layout: Templates -->
<Copy
DestinationFiles="@(TemplatesFiles->'$(OutputPath)/templates/%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(TemplatesFiles)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<!-- Create layout: Workload Manifests -->
<Copy
DestinationFiles="@(ManifestFiles->'$(OutputPath)/sdk-manifests/%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(ManifestFiles)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />
</Target>

<Target Name="SetCustomPackagingProperties" BeforeTargets="_GetCommonJsonProperties">
<PropertyGroup>
<PackageSummary>Microsoft .NET SDK $(PackageVersion)</PackageSummary>
<!-- Clear PackageDescription to have it correctly set by Arcade. -->
<PackageDescription></PackageDescription>
</PropertyGroup>

<!--
Manpages are not installed atm, tracked with https://github.com/dotnet/sdk/issues/44833
Arcade infra expects the following items, but the installation path is TBD.
Tracked in https://github.com/dotnet/arcade/issues/15243

<ItemGroup>
<Manpage Include="$(ManpagesDirectory)**/*" />
</ItemGroup>
-->

</Target>

<Target Name="AddLinuxPackageInformation"
BeforeTargets="GetDebInstallerJsonProperties;GetRpmInstallerJsonProperties"
DependsOnTargets="CalculateLinuxNativeInstallerDependencyVersions">

<PropertyGroup>
<DebianPostinstTemplateFile>$(MSBuildThisFileDirectory)../redist-installer/packaging/deb/postinst</DebianPostinstTemplateFile>
<DebianPostinstFile>$(BaseIntermediateOutputPath)debian/postinst</DebianPostinstFile>
</PropertyGroup>

<!-- Generate postinst file -->
<ReplaceFileContents
InputFiles="$(DebianPostinstTemplateFile)"
DestinationFiles="$(DebianPostinstFile)"
ReplacementPatterns="%SDK_VERSION%"
ReplacementStrings="$(Version)" />

<ItemGroup>
<LinuxPackageDependency Include="dotnet-runtime-$(MicrosoftNETCoreAppMajorMinorVersion)" Version="$(MicrosoftNETCoreAppRuntimePackageVersionWithTilde)" />
<LinuxPackageDependency Include="dotnet-targeting-pack-$(MicrosoftNETCoreAppMajorMinorVersion)" Version="$(MicrosoftNETCoreAppRefPackageVersionWithTilde)" />
<LinuxPackageDependency Include="dotnet-apphost-pack-$(MicrosoftNETCoreAppMajorMinorVersion)" Version="$(MicrosoftNETCoreAppRuntimePackageVersionWithTilde)" />
<LinuxPackageDependency Include="netstandard-targeting-pack-$(NetStandardTargetingPackMajorMinorVersion)" Version="$(NetStandardTargetingPackPackageVersionWithTilde)" />
<LinuxPackageDependency Include="aspnetcore-runtime-$(AspNetCoreMajorMinorVersion)" Version="$(AspNetCoreRuntimeVersionWithTilde)" />
<LinuxPackageDependency Include="aspnetcore-targeting-pack-$(AspNetCoreMajorMinorVersion)" Version="$(AspNetCoreRefVersionWithTilde)" />
<LinuxPostInstallScript Include="$(DebianPostinstFile)" />
</ItemGroup>
</Target>
</Project>
2 changes: 0 additions & 2 deletions src/Installer/redist-installer/redist-installer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
<Import Project="targets\GenerateArchives.targets" Condition="'$(PackInstaller)' != 'false'"/>
<Import Project="targets\GenerateMSIs.targets" />
<Import Project="targets\LinuxNativeInstallerDependencyVersions.targets" Condition="'$(PackInstaller)' != 'false'"/>
<Import Project="targets\GenerateDebs.targets" Condition="'$(PackInstaller)' != 'false'"/>
<Import Project="targets\GenerateRPMs.targets" Condition="'$(PackInstaller)' != 'false'"/>
<Import Project="targets\GeneratePKG.targets" Condition="'$(PackInstaller)' != 'false'"/>
<Import Project="targets\GenerateInstallers.targets" Condition="'$(PackInstaller)' != 'false'"/>
<Import Project="targets\Badge.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<UsingTask TaskName="Chmod" AssemblyFile="$(CoreSdkTaskDll)" />
<UsingTask TaskName="CollatePackageDownloads" AssemblyFile="$(CoreSdkTaskDll)" />
<UsingTask TaskName="Crossgen" AssemblyFile="$(CoreSdkTaskDll)" />
<UsingTask TaskName="DotNetDebTool" AssemblyFile="$(CoreSdkTaskDll)" />
<UsingTask TaskName="DownloadFile" AssemblyFile="$(ArcadeSdkBuildTasksAssembly)" />
<UsingTask TaskName="ExtractArchiveToDirectory" AssemblyFile="$(CoreSdkTaskDll)" />
<UsingTask TaskName="GenerateDefaultRuntimeFrameworkVersion" AssemblyFile="$(CoreSdkTaskDll)" />
Expand Down
Loading