From c45047349c50911674724ccaa5b269d7e10fc4b2 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 8 Nov 2019 17:32:40 -0800 Subject: [PATCH 01/11] checkpoint rpm --- tools/packaging/packaging.psm1 | 119 +++++++++++++++++++++++++++------ 1 file changed, 97 insertions(+), 22 deletions(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 623121070af..625dc102833 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -6,7 +6,8 @@ $RepoRoot = (Resolve-Path -Path "$PSScriptRoot/../..").Path $packagingStrings = Import-PowerShellDataFile "$PSScriptRoot\packaging.strings.psd1" Import-Module "$PSScriptRoot\..\Xml" -ErrorAction Stop -Force -$DebianDistributions = @("ubuntu.16.04", "ubuntu.18.04", "debian.9") +$DebianDistributions = @("ubuntu.16.04", "ubuntu.18.04", "debian.9", "debian.10", "debian.11") +$RedhatDistributions = @("rhel.7","centos.8") function Start-PSPackage { [CmdletBinding(DefaultParameterSetName='Version',SupportsShouldProcess=$true)] @@ -426,18 +427,20 @@ function Start-PSPackage { } } } - default { + 'rpm' { $Arguments = @{ - Type = $_ + Type = 'rpm' PackageSourcePath = $Source Name = $Name Version = $Version Force = $Force NoSudo = $NoSudo } - - if ($PSCmdlet.ShouldProcess("Create $_ Package")) { - New-UnixPackage @Arguments + foreach ($Distro in $Script:RedhatDistributions) { + $Arguments["Distribution"] = $Distro + if ($PSCmdlet.ShouldProcess("Create RPM Package for $Distro")) { + New-UnixPackage @Arguments + } } } } @@ -659,11 +662,18 @@ function New-UnixPackage { ) DynamicParam { - if ($Type -eq "deb") { + if ($Type -eq "deb" -or $Type -eq 'rpm') { # Add a dynamic parameter '-Distribution' when the specified package type is 'deb'. # The '-Distribution' parameter can be used to indicate which Debian distro this pacakge is targeting. $ParameterAttr = New-Object "System.Management.Automation.ParameterAttribute" - $ValidateSetAttr = New-Object "System.Management.Automation.ValidateSetAttribute" -ArgumentList $Script:DebianDistributions + if($type -eq 'deb') + { + $ValidateSetAttr = New-Object "System.Management.Automation.ValidateSetAttribute" -ArgumentList $Script:DebianDistributions + } + else + { + $ValidateSetAttr = New-Object "System.Management.Automation.ValidateSetAttribute" -ArgumentList $Script:RedHatDistributions + } $Attributes = New-Object "System.Collections.ObjectModel.Collection``1[System.Attribute]" $Attributes.Add($ParameterAttr) > $null $Attributes.Add($ValidateSetAttr) > $null @@ -706,6 +716,15 @@ function New-UnixPackage { $Iteration += ".$DebDistro" } "rpm" { + if ($PSBoundParameters.ContainsKey('Distribution')) { + $DebDistro = $PSBoundParameters['Distribution'] + + } elseif ($Environment.IsRedHatFamily) { + $DebDistro = "rhel.7" + } else { + throw "The current distribution is not supported." + } + $packageVersion = Get-LinuxPackageSemanticVersion -Version $Version if (!$Environment.IsRedHatFamily -and !$Environment.IsSUSEFamily) { throw ($ErrorMessage -f "Redhat or SUSE Family") @@ -764,7 +783,7 @@ function New-UnixPackage { New-Item -Force -ItemType SymbolicLink -Path $linkSource -Target "$Destination/pwsh" > $null # Generate After Install and After Remove scripts - $AfterScriptInfo = New-AfterScripts -Link $Link + $AfterScriptInfo = New-AfterScripts -Link $Link -Distribution $DebDistro # there is a weird bug in fpm # if the target of the powershell symlink exists, `fpm` aborts @@ -830,6 +849,7 @@ function New-UnixPackage { -LinkSource $LinkSource ` -LinkDestination $Link ` -AppsFolder $AppsFolder ` + -Distribution $DebDistro ` -ErrorAction Stop # Build package @@ -1033,7 +1053,8 @@ function Get-FpmArguments } return $true })] - [String]$AppsFolder + [String]$AppsFolder, + [String]$Distribution = 'rhel.7' ) $Arguments = @( @@ -1051,7 +1072,7 @@ function Get-FpmArguments "-s", "dir" ) if ($Environment.IsRedHatFamily) { - $Arguments += @("--rpm-dist", "rhel.7") + $Arguments += @("--rpm-dist", $Distribution) $Arguments += @("--rpm-os", "linux") } @@ -1097,10 +1118,16 @@ function Test-Distribution throw "$Distribution is required for a Debian based distribution." } - if ($Script:DebianDistributions -notcontains $Distribution) + if ( ($Environment.IsUbuntu -or $Environment.IsDebian) -and $Script:DebianDistributions -notcontains $Distribution) { throw "$Distribution should be one of the following: $Script:DebianDistributions" } + + if ( ($Environment.IsRedHatFamil) -and $Script:RedHatDistributions -notcontains $Distribution) + { + throw "$Distribution should be one of the following: $Script:RedHatDistributions" + } + return $true } function Get-PackageDependencies @@ -1178,16 +1205,57 @@ function New-AfterScripts param( [Parameter(Mandatory)] [string] - $Link + $Link, + + [Parameter(Mandatory)] + [string] + $Distribution ) + if ($Environment.IsUbuntu -or $Environment.IsDebian) { + $Dependencies = @( + "libc6", + "libgcc1", + "libgssapi-krb5-2", + "liblttng-ust0", + "libstdc++6", + "zlib1g" + ) + + switch ($Distribution) { + "ubuntu.16.04" { $Dependencies += @("libssl1.0.0", "libicu55") } + "ubuntu.17.10" { $Dependencies += @("libssl1.0.0", "libicu57") } + "ubuntu.18.04" { $Dependencies += @("libssl1.0.0", "libicu60") } + "debian.9" { $Dependencies += @("libssl1.0.2", "libicu57") } + default { throw "Debian distro '$Distribution' is not supported." } + } + } elseif ($Environment.IsRedHatFamily) { + $Dependencies = @( + "openssl-libs", + "libicu" + ) + } elseif ($Environment.IsSUSEFamily) { + $Dependencies = @( + "libopenssl1_0_0", + "libicu" + ) + } if ($Environment.IsRedHatFamily) { - # add two symbolic links to system shared libraries that libmi.so is dependent on to handle - # platform specific changes. This is the only set of platforms needed for this currently - # as Ubuntu has these specific library files in the platform and macOS builds for itself - # against the correct versions. - New-Item -Force -ItemType SymbolicLink -Target "/lib64/libssl.so.10" -Path "$Staging/libssl.so.1.0.0" > $null - New-Item -Force -ItemType SymbolicLink -Target "/lib64/libcrypto.so.10" -Path "$Staging/libcrypto.so.1.0.0" > $null + switch -regex ($Distribution) + { + # add two symbolic links to system shared libraries that libmi.so is dependent on to handle + # platform specific changes. This is the only set of platforms needed for this currently + # as Ubuntu has these specific library files in the platform and macOS builds for itself + # against the correct versions. + 'centos\.8' { + New-Item -Force -ItemType SymbolicLink -Target "/lib64/libssl.so.1.1" -Path "$Staging/libssl.so.1.0.0" > $null + New-Item -Force -ItemType SymbolicLink -Target "/lib64/libcrypto.so.1.1.1" -Path "$Staging/libcrypto.so.1.0.0" > $null + } + default { + New-Item -Force -ItemType SymbolicLink -Target "/lib64/libssl.so.10" -Path "$Staging/libssl.so.1.0.0" > $null + New-Item -Force -ItemType SymbolicLink -Target "/lib64/libcrypto.so.10" -Path "$Staging/libcrypto.so.1.0.0" > $null + } + } $AfterInstallScript = [io.path]::GetTempFileName() $AfterRemoveScript = [io.path]::GetTempFileName() @@ -1200,12 +1268,19 @@ function New-AfterScripts $packagingStrings.UbuntuAfterInstallScript -f "$Link" | Out-File -FilePath $AfterInstallScript -Encoding ascii $packagingStrings.UbuntuAfterRemoveScript -f "$Link" | Out-File -FilePath $AfterRemoveScript -Encoding ascii - if ($Environment.IsDebian9) { + switch -regex ($Distribution) + { # add two symbolic links to system shared libraries that libmi.so is dependent on to handle # platform specific changes. This appears to be a change in Debian 9; Debian 8 did not need these # symlinks. - New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2" -Path "$Staging/libssl.so.1.0.0" > $null - New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2" -Path "$Staging/libcrypto.so.1.0.0" > $null + 'debian\.(9|10)' { + New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2" -Path "$Staging/libssl.so.1.0.0" > $null + New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2" -Path "$Staging/libcrypto.so.1.0.0" > $null + } + 'debian\.11' { + New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libssl.so.1.1" -Path "$Staging/libssl.so.1.0.0" > $null + New-Item -Force -ItemType SymbolicLink -Target "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1" -Path "$Staging/libcrypto.so.1.0.0" > $null + } } } elseif ($Environment.IsMacOS) { From 9228840772720ec4796d6ee7c9e6957aa0d29246 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 8 Nov 2019 17:32:59 -0800 Subject: [PATCH 02/11] Add fedora devcontainer files --- .devcontainer/fedora30/Dockerfile | 10 ++++++++++ .devcontainer/fedora30/devcontainer.json | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .devcontainer/fedora30/Dockerfile create mode 100644 .devcontainer/fedora30/devcontainer.json diff --git a/.devcontainer/fedora30/Dockerfile b/.devcontainer/fedora30/Dockerfile new file mode 100644 index 00000000000..2c8ca1d7d99 --- /dev/null +++ b/.devcontainer/fedora30/Dockerfile @@ -0,0 +1,10 @@ +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +FROM mcr.microsoft.com/powershell:preview-fedora-30 + +# Configure apt and install packages +RUN dnf install -y git procps wget findutils \ + && dnf clean all diff --git a/.devcontainer/fedora30/devcontainer.json b/.devcontainer/fedora30/devcontainer.json new file mode 100644 index 00000000000..9a4da68c1c9 --- /dev/null +++ b/.devcontainer/fedora30/devcontainer.json @@ -0,0 +1,16 @@ +// See https://aka.ms/vscode-remote/devcontainer.json for format details. +{ + "name": "Fedora 30", + "dockerFile": "Dockerfile", + + // Uncomment the next line to run commands after the container is created. + "postCreateCommand": "pwsh -c 'import-module ./build.psm1;start-psbootstrap'", + + "extensions": [ + "ms-azure-devops.azure-pipelines", + "ms-vscode.csharp", + "ms-vscode.powershell", + "DavidAnson.vscode-markdownlint", + "vitaliymaz.vscode-svg-previewer" + ] +} From d8cf7f6debf04c41525f0c67c9c59199c67afccd Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sat, 9 Nov 2019 17:07:26 -0800 Subject: [PATCH 03/11] Add fedora devcontainer files --- .devcontainer/fedora30/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/fedora30/Dockerfile b/.devcontainer/fedora30/Dockerfile index 2c8ca1d7d99..ae8d15ebd54 100644 --- a/.devcontainer/fedora30/Dockerfile +++ b/.devcontainer/fedora30/Dockerfile @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. +# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. #------------------------------------------------------------------------------------------------------------- From d5f3d737299568c1fbc795ab2d3b8860afe4b14a Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sat, 9 Nov 2019 17:53:01 -0800 Subject: [PATCH 04/11] fix ospkg --- tools/packaging/packaging.psm1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 625dc102833..6e79d843f55 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -443,6 +443,20 @@ function Start-PSPackage { } } } + default { + $Arguments = @{ + Type = $_ + PackageSourcePath = $Source + Name = $Name + Version = $Version + Force = $Force + NoSudo = $NoSudo + } + + if ($PSCmdlet.ShouldProcess("Create $_ Package")) { + New-UnixPackage @Arguments + } + } } if ($IncludeSymbols.IsPresent) From 174c67e640c01aac004e620ea2381736e73102d6 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sat, 9 Nov 2019 18:14:44 -0800 Subject: [PATCH 05/11] fix debian --- tools/packaging/packaging.psm1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 6e79d843f55..5291e579c3b 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -1165,11 +1165,10 @@ function Get-PackageDependencies "zlib1g" ) - switch ($Distribution) { - "ubuntu.16.04" { $Dependencies += @("libssl1.0.0", "libicu55") } - "ubuntu.17.10" { $Dependencies += @("libssl1.0.0", "libicu57") } - "ubuntu.18.04" { $Dependencies += @("libssl1.0.0", "libicu60") } - "debian.9" { $Dependencies += @("libssl1.0.2", "libicu57") } + switch -regex ($Distribution) { + "ubuntu\.16\.04" { $Dependencies += @("libssl1.0.0", "libicu55") } + "ubuntu\.18\.04" { $Dependencies += @("libssl1.0.0", "libicu60") } + "debian\.(9|10|11)" { $Dependencies += @("libssl1.0.2", "libicu57") } default { throw "Debian distro '$Distribution' is not supported." } } } elseif ($Environment.IsRedHatFamily) { From 8b0fcf27ed2974bcb474b0f69a5c346cdb16feb0 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 10 Nov 2019 12:58:05 -0800 Subject: [PATCH 06/11] Update tools/packaging/packaging.psm1 Co-Authored-By: Ilya --- tools/packaging/packaging.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 5291e579c3b..ce2420345d6 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -1137,7 +1137,7 @@ function Test-Distribution throw "$Distribution should be one of the following: $Script:DebianDistributions" } - if ( ($Environment.IsRedHatFamil) -and $Script:RedHatDistributions -notcontains $Distribution) + if ( ($Environment.IsRedHatFamily) -and $Script:RedHatDistributions -notcontains $Distribution) { throw "$Distribution should be one of the following: $Script:RedHatDistributions" } From 6d6793538f1af1f82f9919dc52dcb92cf2cbcf8b Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sat, 9 Nov 2019 18:27:09 -0800 Subject: [PATCH 07/11] fix macos --- tools/packaging/packaging.psm1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index ce2420345d6..bad6cec62e4 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -749,6 +749,8 @@ function New-UnixPackage { if (!$Environment.IsMacOS) { throw ($ErrorMessage -f "macOS") } + + $DebDistro = 'macOS' } } From c105b18f3b3d63e40c4f726a3067ec68f4c14565 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 10 Nov 2019 14:31:27 -0800 Subject: [PATCH 08/11] fix switch statement --- tools/packaging/packaging.psm1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index bad6cec62e4..c0da797fc0f 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -1236,10 +1236,9 @@ function New-AfterScripts "zlib1g" ) - switch ($Distribution) { - "ubuntu.16.04" { $Dependencies += @("libssl1.0.0", "libicu55") } - "ubuntu.17.10" { $Dependencies += @("libssl1.0.0", "libicu57") } - "ubuntu.18.04" { $Dependencies += @("libssl1.0.0", "libicu60") } + switch -regex ($Distribution) { + "ubuntu\.16\.04" { $Dependencies += @("libssl1.0.0", "libicu55") } + "ubuntu\.18\.04" { $Dependencies += @("libssl1.0.0", "libicu60") } "debian.9" { $Dependencies += @("libssl1.0.2", "libicu57") } default { throw "Debian distro '$Distribution' is not supported." } } From 44d59772eb36d92722592bae05e5da5f1a002cc6 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 10 Nov 2019 14:45:42 -0800 Subject: [PATCH 09/11] fix switch statement --- tools/packaging/packaging.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index c0da797fc0f..881c839f4d0 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -1239,7 +1239,7 @@ function New-AfterScripts switch -regex ($Distribution) { "ubuntu\.16\.04" { $Dependencies += @("libssl1.0.0", "libicu55") } "ubuntu\.18\.04" { $Dependencies += @("libssl1.0.0", "libicu60") } - "debian.9" { $Dependencies += @("libssl1.0.2", "libicu57") } + "debian\.(9|10|11)" { $Dependencies += @("libssl1.0.2", "libicu57") } default { throw "Debian distro '$Distribution' is not supported." } } } elseif ($Environment.IsRedHatFamily) { From 9cc98e8675215197e7b6ab72cf9090ce07284e46 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 11 Nov 2019 11:04:58 -0800 Subject: [PATCH 10/11] remove unused code --- tools/packaging/packaging.psm1 | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 881c839f4d0..9ba5dc5bd4a 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -1226,33 +1226,6 @@ function New-AfterScripts [string] $Distribution ) - if ($Environment.IsUbuntu -or $Environment.IsDebian) { - $Dependencies = @( - "libc6", - "libgcc1", - "libgssapi-krb5-2", - "liblttng-ust0", - "libstdc++6", - "zlib1g" - ) - - switch -regex ($Distribution) { - "ubuntu\.16\.04" { $Dependencies += @("libssl1.0.0", "libicu55") } - "ubuntu\.18\.04" { $Dependencies += @("libssl1.0.0", "libicu60") } - "debian\.(9|10|11)" { $Dependencies += @("libssl1.0.2", "libicu57") } - default { throw "Debian distro '$Distribution' is not supported." } - } - } elseif ($Environment.IsRedHatFamily) { - $Dependencies = @( - "openssl-libs", - "libicu" - ) - } elseif ($Environment.IsSUSEFamily) { - $Dependencies = @( - "libopenssl1_0_0", - "libicu" - ) - } if ($Environment.IsRedHatFamily) { switch -regex ($Distribution) From f14ba0cdb04e483cc69e0551c03d232b94769169 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 11 Nov 2019 11:32:36 -0800 Subject: [PATCH 11/11] Add debianfamily --- build.psm1 | 1 + tools/packaging/packaging.psm1 | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.psm1 b/build.psm1 index a94942fbd2a..9be56dfb02a 100644 --- a/build.psm1 +++ b/build.psm1 @@ -149,6 +149,7 @@ function Get-EnvironmentInformation $environment += @{'IsRedHat7' = $Environment.IsRedHat -and $LinuxInfo.VERSION_ID -match '7' } $environment += @{'IsOpenSUSE13' = $Environmenst.IsOpenSUSE -and $LinuxInfo.VERSION_ID -match '13'} $environment += @{'IsOpenSUSE42.1' = $Environment.IsOpenSUSE -and $LinuxInfo.VERSION_ID -match '42.1'} + $environment += @{'IsDebianFamily' = $Environment.IsDebian -or $Environment.IsUbuntu} $environment += @{'IsRedHatFamily' = $Environment.IsCentOS -or $Environment.IsFedora -or $Environment.IsRedHat} $environment += @{'IsSUSEFamily' = $Environment.IsSLES -or $Environment.IsOpenSUSE} $environment += @{'IsAlpine' = $LinuxInfo.ID -match 'alpine'} diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 9ba5dc5bd4a..787dd87baa1 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -1129,17 +1129,17 @@ function Test-Distribution $Distribution ) - if ( ($Environment.IsUbuntu -or $Environment.IsDebian) -and !$Distribution ) + if ( $Environment.IsDebianFamily -and !$Distribution ) { throw "$Distribution is required for a Debian based distribution." } - if ( ($Environment.IsUbuntu -or $Environment.IsDebian) -and $Script:DebianDistributions -notcontains $Distribution) + if ( $Environment.IsDebianFamily -and $Script:DebianDistributions -notcontains $Distribution) { throw "$Distribution should be one of the following: $Script:DebianDistributions" } - if ( ($Environment.IsRedHatFamily) -and $Script:RedHatDistributions -notcontains $Distribution) + if ( $Environment.IsRedHatFamily -and $Script:RedHatDistributions -notcontains $Distribution) { throw "$Distribution should be one of the following: $Script:RedHatDistributions" } @@ -1157,7 +1157,7 @@ function Get-PackageDependencies End { # These should match those in the Dockerfiles, but exclude tools like Git, which, and curl $Dependencies = @() - if ($Environment.IsUbuntu -or $Environment.IsDebian) { + if ($Environment.IsDebianFamily) { $Dependencies = @( "libc6", "libgcc1", @@ -1249,7 +1249,7 @@ function New-AfterScripts $packagingStrings.RedHatAfterInstallScript -f "$Link" | Out-File -FilePath $AfterInstallScript -Encoding ascii $packagingStrings.RedHatAfterRemoveScript -f "$Link" | Out-File -FilePath $AfterRemoveScript -Encoding ascii } - elseif ($Environment.IsUbuntu -or $Environment.IsDebian -or $Environment.IsSUSEFamily) { + elseif ($Environment.IsDebianFamily -or $Environment.IsSUSEFamily) { $AfterInstallScript = [io.path]::GetTempFileName() $AfterRemoveScript = [io.path]::GetTempFileName() $packagingStrings.UbuntuAfterInstallScript -f "$Link" | Out-File -FilePath $AfterInstallScript -Encoding ascii