-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending support of powershell feature for AlmaLinux #1303
base: main
Are you sure you want to change the base?
Extending support of powershell feature for AlmaLinux #1303
Conversation
Deleting the file as it is no longer needed No modifications needed inside the Dockerfile set the containerEnv to work with default shell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments. Kindly check & let me know in case of further concerns.
src/powershell/install.sh
Outdated
elif command -v rpm > /dev/null 2>&1 && command -v dnf > /dev/null 2>&1; then | ||
# If rpm and dnf exist, assume DNF-based system (RHEL/AlmaLinux) | ||
for package in "$@"; do | ||
if ! rpm -q "$package" > /dev/null 2>&1; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to check with rpm for the pakcge existence, can't we use dnf directly in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine with the latest check-in.
keyserver hkps://keys.openpgp.org | ||
keyserver hkp://pgp.mit.edu | ||
keyserver hkp://keyserver.redhat.com" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need all the above keyservers for almalinux support? If so, kindly add suitable comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also fine with code comments added specifically for this in the latest check-in
src/powershell/install.sh
Outdated
@@ -202,7 +293,12 @@ install_using_github() { | |||
check_packages git | |||
fi | |||
if [ "${architecture}" = "amd64" ]; then | |||
architecture="amd64" | |||
elif [ "${architecture}" = "x86_64" ]; then | |||
architecture="x86_64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The amd64 or x86_64 are basically the same CPU architecture, so should work with same installation package. Why do we need multiple conditions here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine with the latest check-in.
@@ -212,7 +308,12 @@ install_using_github() { | |||
fi | |||
|
|||
# Ugly - but only way to get sha256 is to parse release HTML. Remove newlines and tags, then look for filename followed by 64 hex characters. | |||
curl -sSL -o "release.html" "https://github.com/PowerShell/PowerShell/releases/tag/v${POWERSHELL_VERSION}" | |||
#curl -sSL -o "release.html" "https://github.com/PowerShell/PowerShell/releases/tag/v${POWERSHELL_VERSION}" | |||
wget https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/${powershell_filename} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly explain the reason behind switching from curl to wget in this scenario. Please add suitable comment for the same.
Feature Name
Description of Changes
Extending support of powershell feature for other linux distributions (alma linux)
As per the user request powershell feature but for all distros #1292
Changelog
Modified the install.sh to work the expected installation for AlmaLinux
Modified the test cases scenarios to meet the required checks for the powershell.
Checklist