Skip to content

Commit e50b4b7

Browse files
Use arcade infra for DEB and RPM build
1 parent 257517e commit e50b4b7

11 files changed

+138
-897
lines changed

.vsts-ci.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ extends:
6565
containers:
6666
alpine319WithNode:
6767
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
68-
cblMariner20Fpm:
69-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm
7068
centosStream9:
7169
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
7270
debian12Amd64:
@@ -75,8 +73,6 @@ extends:
7573
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
7674
mariner20CrossArm:
7775
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
78-
ubuntu2204DebPkg:
79-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
8076
sdl:
8177
sourceAnalysisPool:
8278
name: $(DncEngInternalBuildPool)
@@ -200,21 +196,20 @@ extends:
200196
runTests: false
201197
### PORTABLE ###
202198
- categoryName: Portable
203-
container: ubuntu2204DebPkg
204199
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
205200
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
206201
officialBuildProperties: $(_officialBuildProperties)
207202
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
208203
runTests: false
209204
- categoryName: Portable
210-
container: cblMariner20Fpm
205+
container: centosStream9
211206
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
212207
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
213208
officialBuildProperties: $(_officialBuildProperties)
214209
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
215210
runTests: false
216211
- categoryName: Portable
217-
container: cblMariner20Fpm
212+
container: centosStream9
218213
buildArchitecture: arm64
219214
runtimeIdentifier: linux-arm64
220215
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.

eng/Versions.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@
266266
</PropertyGroup>
267267
<PropertyGroup Label="Infrastructure and test only dependencies">
268268
<VersionToolsVersion>2.2.0-beta.19072.10</VersionToolsVersion>
269-
<DotnetDebToolVersion>2.0.0</DotnetDebToolVersion>
270269
<MicrosoftDotNetScenarioTestsSdkTemplateTestsVersion>10.0.0-preview.24602.1</MicrosoftDotNetScenarioTestsSdkTemplateTestsVersion>
271270
</PropertyGroup>
272271
<PropertyGroup Label="Manually updated">

sdk.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "finalizer-build", "src\Inst
497497
EndProject
498498
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist-installer", "src\Installer\redist-installer\redist-installer.csproj", "{FAADC193-BA41-449D-97CE-0EF82836046A}"
499499
EndProject
500+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-sdk", "src\Installer\pkg\dotnet-sdk.csproj", "{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}"
501+
EndProject
500502
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSTemplateLocator", "src\VSTemplateLocator\VSTemplateLocator.proj", "{0CBA5FB8-71A3-457A-89F3-E52B9602164A}"
501503
EndProject
502504
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sdk-tasks.Tests", "test\sdk-tasks.Tests\sdk-tasks.Tests.csproj", "{21C21975-84C1-4A24-8E21-F7EC790A4584}"
@@ -965,6 +967,10 @@ Global
965967
{D9617F63-15F4-4CA2-8ECF-728A94B45D82}.Debug|Any CPU.Build.0 = Debug|Any CPU
966968
{D9617F63-15F4-4CA2-8ECF-728A94B45D82}.Release|Any CPU.ActiveCfg = Release|Any CPU
967969
{D9617F63-15F4-4CA2-8ECF-728A94B45D82}.Release|Any CPU.Build.0 = Release|Any CPU
970+
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
971+
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Debug|Any CPU.Build.0 = Debug|Any CPU
972+
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Release|Any CPU.ActiveCfg = Release|Any CPU
973+
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44}.Release|Any CPU.Build.0 = Release|Any CPU
968974
EndGlobalSection
969975
GlobalSection(SolutionProperties) = preSolution
970976
HideSolutionNode = FALSE
@@ -1142,6 +1148,7 @@ Global
11421148
{FA579C03-2EB4-4D47-88EE-BFF339E96FAF} = {22AB674F-ED91-4FBC-BFEE-8A1E82F9F05E}
11431149
{1F0B4B3C-DC88-4740-B04F-1707102E9930} = {580D1AE7-AA8F-4912-8B76-105594E00B3B}
11441150
{D9617F63-15F4-4CA2-8ECF-728A94B45D82} = {3FA6F1CB-295B-4414-B18F-93845917A8CD}
1151+
{8D6A9984-118D-4415-A8FA-AB1F26CF5C44} = {3FA6F1CB-295B-4414-B18F-93845917A8CD}
11451152
EndGlobalSection
11461153
GlobalSection(ExtensibilityGlobals) = postSolution
11471154
SolutionGuid = {FB8F26CE-4DE6-433F-B32A-79183020BBD6}

source-build.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"src\\Containers\\Microsoft.NET.Build.Containers\\Microsoft.NET.Build.Containers.csproj",
2323
"src\\Containers\\packaging\\package.csproj",
2424
"src\\Installer\\redist-installer\\redist-installer.csproj",
25+
"src\\Installer\\pkg\\dotnet-sdk.csproj",
2526
"src\\Layout\\redist\\redist.csproj",
2627
"src\\Layout\\tool_fsharp\\tool_fsc.csproj",
2728
"src\\Layout\\tool_msbuild\\tool_msbuild.csproj",

src/Installer/pkg/dotnet-sdk.csproj

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
<Project Sdk="Microsoft.Build.NoTargets">
2+
<PropertyGroup>
3+
<SkipBuild Condition="'$(BuildSdkDeb)' != 'true' and '$(IsRPMBasedDistro)' != 'true'">true</SkipBuild>
4+
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
5+
<RuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
6+
<GenerateInstallers>true</GenerateInstallers>
7+
<BuildDebPackage Condition="'$(BuildSdkDeb)' == 'true'">true</BuildDebPackage>
8+
<BuildRpmPackage Condition="'$(IsRPMBasedDistro)' == 'true'">true</BuildRpmPackage>
9+
<UseArcadeRpmTooling>true</UseArcadeRpmTooling>
10+
<ProductBrandPrefix>Microsoft .NET</ProductBrandPrefix>
11+
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>
12+
<InstallerName>dotnet-sdk</InstallerName>
13+
<PackageBrandNameSuffix>SDK</PackageBrandNameSuffix>
14+
<PlatformPackageType>ToolPack</PlatformPackageType>
15+
<!--
16+
Installer infra requires MajorVersion and MinorVersion, which triggers reevaluation of Arcade's
17+
VersionPrefix property. This requires PatchVersion to be set in order to produce the correct SDK version.
18+
-->
19+
<MajorVersion>$(VersionMajor)</MajorVersion>
20+
<MinorVersion>$(VersionMinor)</MinorVersion>
21+
<PatchVersion>$(VersionPrefix.Split('.')[2])</PatchVersion>
22+
<!--
23+
All supported installer runtime identifiers should be specified here.
24+
New arcade infra is only used for Linux installers, at the moment.
25+
-->
26+
<InstallerRuntimeIdentifiers>linux-$(Architecture)</InstallerRuntimeIdentifiers>
27+
<IsShippingPackage>true</IsShippingPackage>
28+
</PropertyGroup>
29+
30+
<ItemGroup>
31+
<ProjectReference Include="..\redist-installer\redist-installer.csproj" ReferenceOutputAssembly="false" />
32+
</ItemGroup>
33+
34+
<ItemGroup>
35+
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Installers" />
36+
</ItemGroup>
37+
38+
<Import Project="..\redist-installer\targets\BuildCoreSdkTasks.targets" />
39+
<Import Project="..\redist-installer\targets\LinuxNativeInstallerDependencyVersions.targets" />
40+
41+
<PropertyGroup>
42+
<RedistLayoutPath>$(ArtifactsBinDir)redist-installer\$(Configuration)\dotnet\</RedistLayoutPath>
43+
<ManpagesDirectory>$(RepoRoot)documentation/manpages/sdk</ManpagesDirectory>
44+
<CLISdkRoot>$(RedistLayoutPath)sdk/</CLISdkRoot>
45+
<TemplatesRoot>$(RedistLayoutPath)templates/</TemplatesRoot>
46+
</PropertyGroup>
47+
48+
<Target Name="PublishToDisk">
49+
<Error Condition="'$(OutputPath)' == ''" Text="Publishing to disk requires the OutputPath to be set to the root of the path to write to." />
50+
51+
<ItemGroup>
52+
<CLISdkFiles Include="$(CLISdkRoot)**/*" />
53+
<TemplatesFiles Include="$(TemplatesRoot)**/*" />
54+
<ManifestFiles Include="$(RedistLayoutPath)sdk-manifests/**/*" />
55+
</ItemGroup>
56+
57+
<!-- Create layout: Binaries -->
58+
<Copy
59+
DestinationFiles="@(CLISdkFiles->'$(OutputPath)/sdk/%(RecursiveDir)%(Filename)%(Extension)')"
60+
SourceFiles="@(CLISdkFiles)"
61+
OverwriteReadOnlyFiles="True"
62+
SkipUnchangedFiles="False"
63+
UseHardlinksIfPossible="False" />
64+
65+
<!-- Create layout: Templates -->
66+
<Copy
67+
DestinationFiles="@(TemplatesFiles->'$(OutputPath)/templates/%(RecursiveDir)%(Filename)%(Extension)')"
68+
SourceFiles="@(TemplatesFiles)"
69+
OverwriteReadOnlyFiles="True"
70+
SkipUnchangedFiles="False"
71+
UseHardlinksIfPossible="False" />
72+
73+
<!-- Create layout: Workload Manifests -->
74+
<Copy
75+
DestinationFiles="@(ManifestFiles->'$(OutputPath)/sdk-manifests/%(RecursiveDir)%(Filename)%(Extension)')"
76+
SourceFiles="@(ManifestFiles)"
77+
OverwriteReadOnlyFiles="True"
78+
SkipUnchangedFiles="False"
79+
UseHardlinksIfPossible="False" />
80+
</Target>
81+
82+
<Target Name="SetCustomPackagingProperties" BeforeTargets="_GetCommonJsonProperties">
83+
<PropertyGroup>
84+
<PackageSummary>Microsoft .NET SDK $(PackageVersion)</PackageSummary>
85+
<!-- Clear PackageDescription to have it correctly set by Arcade. -->
86+
<PackageDescription></PackageDescription>
87+
</PropertyGroup>
88+
89+
<!--
90+
Manpages are not installed atm, tracked with https://github.com/dotnet/sdk/issues/44833
91+
Arcade infra expects the following items, but the installation path is TBD.
92+
Tracked in https://github.com/dotnet/arcade/issues/15243
93+
94+
<ItemGroup>
95+
<Manpage Include="$(ManpagesDirectory)**/*" />
96+
</ItemGroup>
97+
-->
98+
99+
</Target>
100+
101+
<Target Name="AddLinuxPackageInformation"
102+
BeforeTargets="GetDebInstallerJsonProperties;GetRpmInstallerJsonProperties"
103+
DependsOnTargets="CalculateLinuxNativeInstallerDependencyVersions">
104+
105+
<PropertyGroup>
106+
<DebianPostinstTemplateFile>$(MSBuildThisFileDirectory)../redist-installer/packaging/deb/postinst</DebianPostinstTemplateFile>
107+
<DebianPostinstFile>$(BaseIntermediateOutputPath)debian/postinst</DebianPostinstFile>
108+
</PropertyGroup>
109+
110+
<!-- Generate postinst file -->
111+
<ReplaceFileContents
112+
InputFiles="$(DebianPostinstTemplateFile)"
113+
DestinationFiles="$(DebianPostinstFile)"
114+
ReplacementPatterns="%SDK_VERSION%"
115+
ReplacementStrings="$(Version)" />
116+
117+
<ItemGroup>
118+
<LinuxPackageDependency Include="dotnet-runtime-$(MicrosoftNETCoreAppMajorMinorVersion)" Version="$(MicrosoftNETCoreAppRuntimePackageVersionWithTilde)" />
119+
<LinuxPackageDependency Include="dotnet-targeting-pack-$(MicrosoftNETCoreAppMajorMinorVersion)" Version="$(MicrosoftNETCoreAppRefPackageVersionWithTilde)" />
120+
<LinuxPackageDependency Include="dotnet-apphost-pack-$(MicrosoftNETCoreAppMajorMinorVersion)" Version="$(MicrosoftNETCoreAppRuntimePackageVersionWithTilde)" />
121+
<LinuxPackageDependency Include="netstandard-targeting-pack-$(NetStandardTargetingPackMajorMinorVersion)" Version="$(NetStandardTargetingPackPackageVersionWithTilde)" />
122+
<LinuxPackageDependency Include="aspnetcore-runtime-$(AspNetCoreMajorMinorVersion)" Version="$(AspNetCoreRuntimeVersionWithTilde)" />
123+
<LinuxPackageDependency Include="aspnetcore-targeting-pack-$(AspNetCoreMajorMinorVersion)" Version="$(AspNetCoreRefVersionWithTilde)" />
124+
<LinuxPostInstallScript Include="$(DebianPostinstFile)" />
125+
</ItemGroup>
126+
</Target>
127+
</Project>

src/Installer/redist-installer/redist-installer.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
<Import Project="targets\GenerateArchives.targets" Condition="'$(PackInstaller)' != 'false'"/>
4040
<Import Project="targets\GenerateMSIs.targets" />
4141
<Import Project="targets\LinuxNativeInstallerDependencyVersions.targets" Condition="'$(PackInstaller)' != 'false'"/>
42-
<Import Project="targets\GenerateDebs.targets" Condition="'$(PackInstaller)' != 'false'"/>
43-
<Import Project="targets\GenerateRPMs.targets" Condition="'$(PackInstaller)' != 'false'"/>
4442
<Import Project="targets\GeneratePKG.targets" Condition="'$(PackInstaller)' != 'false'"/>
4543
<Import Project="targets\GenerateInstallers.targets" Condition="'$(PackInstaller)' != 'false'"/>
4644
<Import Project="targets\Badge.targets" />

0 commit comments

Comments
 (0)