Generalize dotnet-runtime-deps Deb/RPM package dependencies (dotnet/core-setup#6070)
authorDavis Goodin <dagood@users.noreply.github.com>
Mon, 29 Apr 2019 19:54:49 +0000 (14:54 -0500)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2019 19:54:49 +0000 (14:54 -0500)
* Expand runtime-deps package applicability

On RPM package distros, depend on the libicu capability that a libicu## package provides.

On Debian package distros, use "or" dependencies that list all known versions of libicu and libssl.

This removes the need for some distro-specific packages.

* Collapse identical Deb packages into one

Commit migrated from https://github.com/dotnet/core-setup/commit/c98ab5cca3f5a7721581de057ba87cde3f30f69d

eng/pipelines/installer/azure-pipelines.yml
src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config.json [moved from src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.18.04-x64.json with 96% similarity]
src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_debian.8-x64.json [deleted file]
src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_debian.9-x64.json [deleted file]
src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.14.04-x64.json [deleted file]
src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.16.04-x64.json [deleted file]
src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.19.04-x64.json [deleted file]
src/installer/pkg/packaging/deb/package.targets
src/installer/pkg/packaging/rpm/dotnet-runtime-deps-rpm_config_opensuse.42-x64.json
src/installer/pkg/packaging/rpm/dotnet-runtime-deps-rpm_config_sles.12-x64.json

index 9b6e90a..79047ce 100644 (file)
@@ -148,12 +148,7 @@ jobs:
     packageDistroList:
     - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-debpkg-e5cf912-20175003025046
       imageRid: ubuntu.14.04
-      rids:
-      - debian.8
-      - debian.9
-      - ubuntu.16.04
-      - ubuntu.18.04
-      - ubuntu.19.04
+      rids: []
     - image: mcr.microsoft.com/dotnet-buildtools/prereqs:rhel-7-rpmpkg-c982313-20174116044113
       imageRid: rhel.7
       rids:
@@ -34,8 +34,8 @@
         "libgssapi-krb5-2":{},
         "libstdc++6":{},
         "zlib1g":{},
-        "libssl1.0.0" : {},
-        "libicu60": {} 
+        "%SSL_DEPENDENCY_LIST%" : {},
+        "%LIBICU_DEPENDENCY_LIST%": {} 
     },
 
     "debian_ignored_dependencies" : [
diff --git a/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_debian.8-x64.json b/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_debian.8-x64.json
deleted file mode 100644 (file)
index 8f7c357..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "maintainer_name":".NET Core Team",
-    "maintainer_email": "dotnetpackages@dotnetfoundation.org",
-
-    "package_name": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME%",
-    "install_root": "/usr/share/dotnet",
-
-    "short_description": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME% %RUNTIME_DEPS_VERSION%",
-    "long_description": ".NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. This package installs all the system dependencies for Dotnet Core Runtime.",
-    "homepage": "https://dot.net/core",
-
-    "release":{
-        "package_version":"1.0.0.0",
-        "package_revision":"%RUNTIME_DEPS_REVISION%",
-        "urgency" : "low",
-        "changelog_message" : "https://github.com/dotnet/core/tree/master/release-notes"
-    },
-
-    "control": {
-        "priority":"standard",
-        "section":"libs",
-        "architecture":"amd64"
-    },
-
-    "copyright": "2017 Microsoft",
-    "license": {
-        "type": "MIT and ASL 2.0 and BSD",
-        "full_text": "Copyright (c) 2017 Microsoft\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
-    },
-
-    "debian_dependencies":{
-        "libc6":{},
-        "libgcc1":{},
-        "libgssapi-krb5-2":{},
-        "libstdc++6":{},
-        "zlib1g":{},
-        "libssl1.0.0" : {},
-        "libicu52": {} 
-    },
-
-    "debian_ignored_dependencies" : [
-        "liblldb-3.5",
-        "liblldb-3.6"
-    ]
-}
diff --git a/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_debian.9-x64.json b/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_debian.9-x64.json
deleted file mode 100644 (file)
index 475bb4e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "maintainer_name":".NET Core Team",
-    "maintainer_email": "dotnetpackages@dotnetfoundation.org",
-
-    "package_name": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME%",
-    "install_root": "/usr/share/dotnet",
-
-    "short_description": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME% %RUNTIME_DEPS_VERSION%",
-    "long_description": ".NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. This package installs all the system dependencies for Dotnet Core Runtime.",
-    "homepage": "https://dot.net/core",
-
-    "release":{
-        "package_version":"1.0.0.0",
-        "package_revision":"%RUNTIME_DEPS_REVISION%",
-        "urgency" : "low",
-        "changelog_message" : "https://github.com/dotnet/core/tree/master/release-notes"
-    },
-
-    "control": {
-        "priority":"standard",
-        "section":"libs",
-        "architecture":"amd64"
-    },
-
-    "copyright": "2017 Microsoft",
-    "license": {
-        "type": "MIT and ASL 2.0 and BSD",
-        "full_text": "Copyright (c) 2017 Microsoft\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
-    },
-
-    "debian_dependencies":{
-        "libc6":{},
-        "libgcc1":{},
-        "libgssapi-krb5-2":{},
-        "libstdc++6":{},
-        "zlib1g":{},
-        "libssl1.0.2" : {},
-        "libicu57": {} 
-    },
-
-    "debian_ignored_dependencies" : [
-        "liblldb-3.5",
-        "liblldb-3.6"
-    ]
-}
diff --git a/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.14.04-x64.json b/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.14.04-x64.json
deleted file mode 100644 (file)
index 8f7c357..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "maintainer_name":".NET Core Team",
-    "maintainer_email": "dotnetpackages@dotnetfoundation.org",
-
-    "package_name": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME%",
-    "install_root": "/usr/share/dotnet",
-
-    "short_description": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME% %RUNTIME_DEPS_VERSION%",
-    "long_description": ".NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. This package installs all the system dependencies for Dotnet Core Runtime.",
-    "homepage": "https://dot.net/core",
-
-    "release":{
-        "package_version":"1.0.0.0",
-        "package_revision":"%RUNTIME_DEPS_REVISION%",
-        "urgency" : "low",
-        "changelog_message" : "https://github.com/dotnet/core/tree/master/release-notes"
-    },
-
-    "control": {
-        "priority":"standard",
-        "section":"libs",
-        "architecture":"amd64"
-    },
-
-    "copyright": "2017 Microsoft",
-    "license": {
-        "type": "MIT and ASL 2.0 and BSD",
-        "full_text": "Copyright (c) 2017 Microsoft\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
-    },
-
-    "debian_dependencies":{
-        "libc6":{},
-        "libgcc1":{},
-        "libgssapi-krb5-2":{},
-        "libstdc++6":{},
-        "zlib1g":{},
-        "libssl1.0.0" : {},
-        "libicu52": {} 
-    },
-
-    "debian_ignored_dependencies" : [
-        "liblldb-3.5",
-        "liblldb-3.6"
-    ]
-}
diff --git a/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.16.04-x64.json b/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.16.04-x64.json
deleted file mode 100644 (file)
index 7a1822b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "maintainer_name":".NET Core Team",
-    "maintainer_email": "dotnetpackages@dotnetfoundation.org",
-
-    "package_name": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME%",
-    "install_root": "/usr/share/dotnet",
-
-    "short_description": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME% %RUNTIME_DEPS_VERSION%",
-    "long_description": ".NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. This package installs all the system dependencies for Dotnet Core Runtime.",
-    "homepage": "https://dot.net/core",
-
-    "release":{
-        "package_version":"1.0.0.0",
-        "package_revision":"%RUNTIME_DEPS_REVISION%",
-        "urgency" : "low",
-        "changelog_message" : "https://github.com/dotnet/core/tree/master/release-notes"
-    },
-
-    "control": {
-        "priority":"standard",
-        "section":"libs",
-        "architecture":"amd64"
-    },
-
-    "copyright": "2017 Microsoft",
-    "license": {
-        "type": "MIT and ASL 2.0 and BSD",
-        "full_text": "Copyright (c) 2017 Microsoft\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
-    },
-
-    "debian_dependencies":{
-        "libc6":{},
-        "libgcc1":{},
-        "libgssapi-krb5-2":{},
-        "libstdc++6":{},
-        "zlib1g":{},
-        "libssl1.0.0" : {},
-        "libicu55": {} 
-    },
-
-    "debian_ignored_dependencies" : [
-        "liblldb-3.5",
-        "liblldb-3.6"
-    ]
-}
diff --git a/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.19.04-x64.json b/src/installer/pkg/packaging/deb/dotnet-runtime-deps-debian_config_ubuntu.19.04-x64.json
deleted file mode 100644 (file)
index 27795bd..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-    "maintainer_name":".NET Core Team",
-    "maintainer_email": "dotnetpackages@dotnetfoundation.org",
-
-    "package_name": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME%",
-    "install_root": "/usr/share/dotnet",
-
-    "short_description": "%RUNTIME_DEPS_DEBIAN_PACKAGE_NAME% %RUNTIME_DEPS_VERSION%",
-    "long_description": ".NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. This package installs all the system dependencies for .NET Core Runtime.",
-    "homepage": "https://dot.net/core",
-
-    "release":{
-        "package_version":"1.0.0.0",
-        "package_revision":"%RUNTIME_DEPS_REVISION%",
-        "urgency" : "low",
-        "changelog_message" : "https://github.com/dotnet/core/tree/master/release-notes"
-    },
-
-    "control": {
-        "priority":"standard",
-        "section":"libs",
-        "architecture":"amd64"
-    },
-
-    "copyright": "2018 Microsoft",
-    "license": {
-        "type": "MIT and ASL 2.0 and BSD",
-        "full_text": "Copyright (c) 2018 Microsoft\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
-    },
-
-    "debian_dependencies":{
-        "libc6":{},
-        "libgcc1":{},
-        "libgssapi-krb5-2":{},
-        "libstdc++6":{},
-        "zlib1g":{},
-        "libssl1.1" : {},
-        "libicu63": {} 
-    },
-
-    "debian_ignored_dependencies" : [
-        "liblldb-3.5",
-        "liblldb-3.6"
-    ]
-}
index aeb5559..577b4e4 100644 (file)
           Condition="'$(BuildDebPackage)'=='true'" />
 
   <Target Name="GenerateRuntimeDebs" 
-          DependsOnTargets="GenerateSharedHostDeb;GenerateHostFxrDeb;GenerateSharedFrameworkDeb"
+          DependsOnTargets="GenerateSharedHostDeb;GenerateHostFxrDeb;GenerateSharedFrameworkDeb;GenerateRuntimeDependenciesDeb"
           Condition="'$(BuildRuntimeDebs)' == 'true'" />
 
   <Target Name="BuildDebs"
-          DependsOnTargets="InitializeDotnetDebTool;GenerateRuntimeDebs;GenerateRuntimeDependenciesDeb"
+          DependsOnTargets="InitializeDotnetDebTool;GenerateRuntimeDebs"
           Condition="'$(BuildDebPackage)'=='true' and '$(DebuildPresent)' == 'true'" />
 
   <Target Name="GenerateSharedHostDeb">
       <DebPackageName>$(RuntimeDependenciesDebPkgName)</DebPackageName>
       <DebPackageVersion>$(RuntimeDepsDebPackageVersion)</DebPackageVersion>
       <DebFile>$(DotnetRuntimeDependenciesPackageInstallerFile)</DebFile>
-      <ConfigJsonName>dotnet-runtime-deps-debian_config_$(OutputRid).json</ConfigJsonName>
+      <ConfigJsonName>dotnet-runtime-deps-debian_config.json</ConfigJsonName>
       <ConfigJsonFile>$(debPackaginfConfigPath)$(ConfigJsonName)</ConfigJsonFile>
       <debIntermediatesDir>$(PackagesIntermediateDir)$(DebPackageName)/$(DebPackageVersion)</debIntermediatesDir>
     </PropertyGroup>
       <SharedFrameworkTokenValue Include="%RUNTIME_DEPS_REVISION%">
         <ReplacementString>$(RuntimeDepsDebPackageRelease)</ReplacementString>
       </SharedFrameworkTokenValue>
+
+      <!--
+        In every runtime deps Deb package, include alternatives known to work with .NET Core.
+        Specifying these as "or" dependencies lets us create one package that works on many distros.
+      -->
+      <SharedFrameworkTokenValue
+        Include="%SSL_DEPENDENCY_LIST%"
+        ReplacementString="libssl1.0.0 | libssl1.0.2 | libssl1.1" />
+
+      <KnownLibIcuVersion Include="63;60;57;55;52" />
+      <SharedFrameworkTokenValue
+        Include="%LIBICU_DEPENDENCY_LIST%"
+        ReplacementString="libicu | @(KnownLibIcuVersion -> 'libicu%(Identity)', ' | ')" />
     </ItemGroup>
 
     <ReplaceFileContents InputFile="$(ConfigJsonFile)"
index 920f82f..c448463 100644 (file)
@@ -34,7 +34,7 @@
         "package_version": ""
     },
     {
-        "package_name": "libicu52_1",
+        "package_name": "libicu",
         "package_version": ""
     },
     {
index 920f82f..c448463 100644 (file)
@@ -34,7 +34,7 @@
         "package_version": ""
     },
     {
-        "package_name": "libicu52_1",
+        "package_name": "libicu",
         "package_version": ""
     },
     {