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

Commit

Permalink
dotnet-sdk DEB package consume store by dependency
Browse files Browse the repository at this point in the history
Instead of Packing along.
Edit Debian config, add download store deb package as part of the packing process as well as test.
  • Loading branch information
William Li committed Jul 13, 2017
1 parent dcce9ce commit b9c5e2e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
15 changes: 6 additions & 9 deletions build/package/Installer.DEB.proj
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
<Target Name="BuildSdkDeb"
Condition=" '$(IsDebianBaseDistro)' == 'True' AND '$(DebuildPresent)' == 'true' "
DependsOnTargets="PrepareDotnetDebDirectories;
PrepareDotnetDebTool;"
PrepareDotnetDebTool;
DownloadAspNetCoreRuntimeDebInstaller;"
Inputs="@(CLISdkFiles)"
Outputs="$(SdkInstallerFile)" >

<!-- Install Shared Framework Packages -->
<Exec Command="sudo dpkg -i $(DownloadedSharedHostInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedHostFxrInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedFrameworkInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedAspNetCoreRuntime)" />

<!-- Create layout: Binaries -->
<Copy
Expand All @@ -33,14 +35,6 @@
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<!-- Create layout: Aspnet runtime -->
<Copy
DestinationFiles="@(AspNetRuntimeFilesInput ->'$(LayoutPackageRootDir)/%(RecursiveDir)%(Filename)%(Extension)')"
SourceFiles="@(AspNetRuntimeFilesInput)"
OverwriteReadOnlyFiles="True"
SkipUnchangedFiles="False"
UseHardlinksIfPossible="False" />

<!-- Create layout: Man Pages -->
<Copy
DestinationFiles="@(SdkDebManPageFiles->'$(LayoutDocsDir)/%(RecursiveDir)%(Filename)-$(SdkVersion)%(Extension)')"
Expand Down Expand Up @@ -91,6 +85,7 @@

<!-- Remove Shared Framework and Debian Packages -->
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AspNetCoreRuntimePackageName)" />
<Exec Command="sudo dpkg -r $(SharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />

Expand All @@ -110,6 +105,7 @@
<Exec Command="sudo dpkg -i $(DownloadedSharedHostInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedHostFxrInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedFrameworkInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedAspNetCoreRuntime)" />

<Exec Command="sudo dpkg -i $(SdkInstallerFile)" />

Expand All @@ -123,6 +119,7 @@

<!-- Clean up Packages -->
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AspNetCoreRuntimePackageName)" />
<Exec Command="sudo dpkg -r $(SharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />

Expand Down
17 changes: 17 additions & 0 deletions build/package/Installer.DEB.targets
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<HostFxrDebianPackageName>dotnet-hostfxr-$(HostFxrDebianPackageVersion)</HostFxrDebianPackageName>
<HostFxrDebianPackageName>$(HostFxrDebianPackageName.ToLower())</HostFxrDebianPackageName>
<HostDebianPackageName>dotnet-host</HostDebianPackageName>
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreCoherenceTimestamp)</AspNetCoreRuntimePackageName>
<HostRidInAspNetCoreRuntimeDebInstallerFileName>$(HostRid)</HostRidInAspNetCoreRuntimeDebInstallerFileName>
<HostRidInAspNetCoreRuntimeDebInstallerFileName Condition=" '$(HostRid)' == 'debian.8-x64' ">debian-x64</HostRidInAspNetCoreRuntimeDebInstallerFileName>
<AspNetCoreRuntimeDebInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreCoherenceTimestamp)-$(HostRidInAspNetCoreRuntimeDebInstallerFileName).deb</AspNetCoreRuntimeDebInstallerFileName>
</PropertyGroup>

<!-- Inputs -->
Expand Down Expand Up @@ -83,6 +87,9 @@
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%">
<ReplacementString>$(SharedFxDebianPackageName)</ReplacementString>
</DebianConfigTokenValues>
<DebianConfigTokenValues Include="%ASPNETCOREPACKAGESTORE_DEBIAN_PACKAGE_NAME%">
<ReplacementString>$(AspNetCoreRuntimePackageName)</ReplacementString>
</DebianConfigTokenValues>
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_DEBIAN_PACKAGE_ADDITIONAL_DEPENDENCY%"
Condition="'$(IncludeAdditionalSharedFrameworks)' == 'true'">
<ReplacementString>,
Expand All @@ -107,4 +114,14 @@
<GeneratedInstallers Include="$(SdkInstallerFile)" />
</ItemGroup>
</Target>

<Target Name="DownloadAspNetCoreRuntimeDebInstaller"
DependsOnTargets="SetupDebProps">
<PropertyGroup>
<DownloadedSharedAspNetCoreRuntime>$(PackagesDirectory)/$(AspNetCoreRuntimeDebInstallerFileName)</DownloadedSharedAspNetCoreRuntime>
</PropertyGroup>
<DownloadFile
Uri="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeDebInstallerFileName)"
DestinationPath="$(DownloadedSharedAspNetCoreRuntime)"/>
</Target>
</Project>
3 changes: 2 additions & 1 deletion packaging/deb/dotnet-debian_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},

"debian_dependencies":{
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {}%SHARED_FRAMEWORK_DEBIAN_PACKAGE_ADDITIONAL_DEPENDENCY%
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {}%SHARED_FRAMEWORK_DEBIAN_PACKAGE_ADDITIONAL_DEPENDENCY%,
"%ASPNETCOREPACKAGESTORE_DEBIAN_PACKAGE_NAME%": {}
}
}
2 changes: 2 additions & 0 deletions scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ if [ $current_userid -ne 0 ]; then
fi

host_package_name="dotnet-host"
aspnetcore_package_store_package_name="^aspnetcore-store.*"

remove_all(){
apt-get purge -y $aspnetcore_package_store_package_name
apt-get purge -y $host_package_name
}

Expand Down

0 comments on commit b9c5e2e

Please sign in to comment.