Skip to content
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

[powershell]: Fix manual PowerShell installation binary execution permissions #1050

Merged
merged 12 commits into from
Aug 27, 2024

Conversation

jpawlowski
Copy link
Contributor

@jpawlowski jpawlowski commented Jul 19, 2024

This patch aligns the manual setup of pwsh with the settings the official Debian module uses:

  • symlink to /usr/bin/pwsh instead of /usr/bin/local/pwsh
  • register as shell in /etc/shells (using add-shell)

Also, because of #1041, this will also enforce execution permissions of the /opt/microsoft/powershell/7/pwsh binary.

The package version minor version number is increased to 1.5.0. Also, version suggestions for PowerShell installation were updated to remove deprecated version 7.1 and add version 7.2, 7.3 and 7.4 to the selection (they can still be installed as this is only the suggestions presented to the user).

Some other maintenance work:

  • Add Debian Bookworm and Ubuntu Noble archive names to allow install of packaged versions from them
  • Make the feature idempotent to improve when the feature is installed multiple times
  • Repaired broken profile test
  • Added a new validate_powershell_installation test to validate general pwsh binary installation

- ensure execution permissions for pwsh
- correct path from /usr/local/bin/pwsh to /usr/bin/pwsh
- register as shell in /etc/shells
@jpawlowski jpawlowski requested a review from a team as a code owner July 19, 2024 17:10
This will avoid build failures when multiple features depend on this PowerShell package
Copy link
Member

@samruddhikhandale samruddhikhandale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for taking the time to contribute these changes!

src/powershell/install.sh Show resolved Hide resolved
src/powershell/install.sh Show resolved Hide resolved
src/powershell/devcontainer-feature.json Show resolved Hide resolved
@DonPwrShellHunt
Copy link

Is there something blocking completion of this pull request?
I'm just trying to gauge how I can assist in getting #1041 resolved...

@samruddhikhandale
Copy link
Member

@DonPwrShellHunt Thanks for the nudge! We are waiting for the author to add test coverage validating his change as well as fix the broken test.

@jpawlowski jpawlowski changed the title Fix manual pwsh install [powershell]: Fix manual PowerShell installation binary execution permissions Aug 27, 2024
@jpawlowski
Copy link
Contributor Author

@samruddhikhandale would you be kind enough to review this PR and, if all is well, merge it into the main branch along with a new build of the powershell feature package?

Copy link
Member

@samruddhikhandale samruddhikhandale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you, looks good!

@samruddhikhandale samruddhikhandale merged commit 878a900 into devcontainers:main Aug 27, 2024
12 checks passed
@jpawlowski jpawlowski deleted the patch-1 branch August 28, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Powershell feature fails to install version 7.4.3 OR 7.4.4 properly for linux arm64
3 participants