Peer review for code change to include Azure Linux installations[[install-powershell.sh doesn't work on azure-linux #23944]]#23955
Conversation
| if [[ $osname = *SUSE* ]]; then | ||
| DistroBasedOn='suse' | ||
| REV=$(source /etc/os-release; echo $VERSION_ID) | ||
| elif [ $osname = *"Azure Linux"* ] ; then |
There was a problem hiding this comment.
shouldn't this be [[ $osname = *"Azure Linux"* ]]
There was a problem hiding this comment.
also maybe a better way would be to follow the same pattern above? eg:
elif [ -f /etc/azurelinux-release ] ; then
DistroBasedOn='mariner'
PSUEDONAME=$( (sed s/.*\(// | sed s/\)//) < /etc/azurelinux-release )
REV=$( (sed s/.*release\ // | sed s/\ .*//) < /etc/azurelinux-release )
There was a problem hiding this comment.
I agree this is a better way to solve this issue.
There was a problem hiding this comment.
i tried it and it doesn't work:
Get-PowerShell MASTER Installer Version 1.2.0
Installs PowerShell and Optional The Development Environment
Original script is at: https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools\install-powershell.psh
Arguments used:
Operating System Details:
OS: linux
DIST:
DistroBasedOn: mariner
PSUEDONAME: Azure Linux 3.0
AZURELINUX_BUILD_NUMBER=3.0.20240524
REV: Azure
AZURELINUX_BUILD_NUMBER=3.0.20240524
KERNEL: 6.6.29.1-3.azl3
MACH: x86_64
OSSTR:
Configuring PowerShell Environment for: mariner Azure
AZURELINUX_BUILD_NUMBER=3.0.20240524
Could not find "installpsh-mariner.sh" next to this script...
Pulling and executing it from "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-mariner.sh"
found and using curl
*** PowerShell Development Environment Installer 1.2.0 for mariner
*** Original script is at: https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-mariner.sh
*** Arguments used:
*** This installer is only for mariner and you are running , please run "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools\install-powershell.sh" to see if your distro is supported AND to auto-select the appropriate installer if it is.
|
📣 Hey @bosesubham2011, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
…on azure-linux
Fix #23944
PR Summary
This change will essentially allow PowerShell to be installed on Azure Linux boxes. As it is known that Azure Linux has a mariner base Distribution System, so it was only prudent to add the piece of code to allow for installation on Azure Linux boxes.
PR Context
This helps resolve - "install-powershell.sh doesn't work on azure-linux #23944" issue
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.- [ ] Issue filed:
(which runs in a different PS Host).