8000 Feat: Add Ubuntu 20.04 Support to install-powershell.sh by JustinGrote · Pull Request #15095 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Feat: Add Ubuntu 20.04 Support to install-powershell.sh #15095

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

Merged

Conversation

JustinGrote
Copy link
Contributor
@JustinGrote JustinGrote commented Mar 24, 2021

PR Summary

Adds Ubuntu 20.04 support to the install-powershell.sh. Ubunto 20.04 is now a supported powershell platform:
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#ubuntu-2004

Interactive Test Result on 20.04

root@c89b2dbd53de:~/powershell/tools# ./install-powershell.sh 
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: Ubuntu
  DistroBasedOn: debian
  PSUEDONAME: focal
  REV: 20.04
  KERNEL: 5.4.72-microsoft-standard-WSL2
  MACH: x86_64
  OSSTR:
Configuring PowerShell Environment for: debian Ubuntu 20.04

*** PowerShell Development Environment Installer 1.2.0 for debian
***    Original script is at: https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-debian.psh

*** Arguments used:

*** Installing PowerShell for debian...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 45504    0 45504    0     0   121k      0 --:--:-- --:--:-- --:--:--  121k
*** Current version on git is: 7.1.3, repo version may differ slightly...
*** Setting up PowerShell repo...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   983  100   983    0     0   1820      0 --:--:-- --:--:-- --:--:--  1817
OK
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    89  100    89    0     0    559      0 --:--:-- --:--:-- --:--:--   559
deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod focal main
Hit:1 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
powershell is already the newest version (7.1.3-1.ubuntu.20.04).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Congratulations! PowerShell is installed at /opt/microsoft/powershell/7.
Run "pwsh" to start a PowerShell session.

*** NOTE: Run your regular package manager update cycle to update PowerShell
*** Install Complete

PR Context

Resolves #14554
Related to #12626

PR Checklist

@ghost ghost assigned anmenaga Mar 24, 2021
@JustinGrote JustinGrote force-pushed the feat/AddUbuntu2004ToInstallerScript branch from 37f2447 to a216ff3 Compare March 24, 2021 16:56
@JustinGrote JustinGrote changed the title WIP: Feat: Add Ubuntu 20.04 Support to install-powershell.sh Feat: Add Ubuntu 20.04 Support to install-powershell.sh Mar 24, 2021
@JustinGrote JustinGrote marked this pull request as ready for review March 24, 2021 16:57
@JustinGrote
Copy link
Contributor Author

@anmenaga @iSazonov ready for review

@@ -176,12 +176,12 @@ fi
case $DISTRIB_ID in
ubuntu|linuxmint)
case $DISTRIB_RELEASE in
18.04|16.10|16.04|15.10|14.04)
20.04|18.04|16.10| 8000 16.04|15.10|14.04)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should remove unsupported versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iSazonov Should I do that in the context of this PR or as a separate one? Also maybe that would be a breaking change for existing CI/CD deployments?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@TravisEz13 Could you help please? What versions could we remove without breaking CIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are the distributions most common to Azure Devops and Github Actions, so the short term ".10" ubuntu releases could probably be dropped, I'd be a little wary of 14.04 though as it may have wide deployment in onprem CI environments like Jenkins, etc.
https://github.com/actions/virtual-environments#available-environments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rebased to master for fixed test.
@iSazonov @TravisEz13 do you want me to drop the unsupported ".04" releases or should that be a separate PR (if at all)?

My opinion is leave it, don't create a potential breaking change but if someone does a net-new install to these and asks for support just direct them to the supported platform document.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The release process is completely under the control of MSFT team, and they depend on internal (cloud) projects. So we are waiting for their conclusion.
Current OS support document for .Net 6 https://github.com/dotnet/core/blob/main/release-notes/6.0/6.0-supported-os.md
So we could safely remove 16.10 and 15.10.

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with a separate PR. PowerShell policy is that the .10 releases are community supported. We don't build packages for those releases.

@JustinGrote
Copy link
Contributor Author

Also pretty sure the test failures are not related to this module...

@JustinGrote JustinGrote force-pushed the feat/AddUbuntu2004ToInstallerScript branch from a216ff3 to 1ddf948 Compare March 29, 2021 19:14
@iSazonov
Copy link
Collaborator

Also pretty sure the test failures are not related to this module...

Help subsystem tests failed. I restarted the CI.

@anmenaga anmenaga added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 5, 2021
@anmenaga anmenaga merged commit 5021405 into PowerShell:master Apr 5, 2021
@iSazonov iSazonov added this to the 7.2.0-preview.5 milestone Apr 6, 2021
@ghost
Copy link
ghost commented Apr 14, 2021

🎉v7.2.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

TravisEz13 added a commit that referenced this pull request Apr 16, 2021
[7.2.0-preview.5] - 2021-04-14

* Breaking Changes

- Make PowerShell Linux deb and RPM packages universal (#15109)
- Enforce AppLocker Deny configuration before Execution Policy Bypass configuration (#1
8000
5035)
- Disallow mixed dash and slash in command line parameter prefix (#15142) (Thanks @davidBar-On!)

* Experimental Features

- `PSNativeCommandArgumentPassing`: Use `ArgumentList` for native executable invocation (breaking change) (#14692)

* Engine Updates and Fixes

- Add `IArgumentCompleterFactory` for parameterized `ArgumentCompleters` (#12605) (Thanks @powercode!)

* General Cmdlet Updates and Fixes

- Fix SSH remoting connection never finishing with misconfigured endpoint (#15175)
- Respect `TERM` and `NO_COLOR` environment variables for `$PSStyle` rendering (#14969)
- Use `ProgressView.Classic` when Virtual Terminal is not supported (#15048)
- Fix `Get-Counter` issue with `-Computer` parameter (#15166) (Thanks @krishnayalavarthi!)
- Fix redundant iteration while splitting lines (#14851) (Thanks @hez2010!)
- Enhance `Remove-Item -Recurse` to work with OneDrive (#14902) (Thanks @iSazonov!)
- Change minimum depth to 0 for `ConvertTo-Json` (#14830) (Thanks @kvprasoon!)
- Allow `Set-Clipboard` to accept empty string (#14579)
- Turn on and off `DECCKM` to modify keyboard mode for Unix native commands to work correctly (#14943)
- Fall back to `CopyAndDelete()` when `MoveTo()` fails due to an `IOException` (#15077)

* Code Cleanup

<details>

<summary>

<p>We thank the following contributors!</p>
<p>@xtqqczze, @iSazonov, @ZhiZe-ZG</p>

</summary>

<ul>
<li>Update .NET to <code>6.0.0-preview.3</code> (#15221)</li>
<li>Add space before comma to hosting test to fix error reported by <code>SA1001</code> (#15224)</li>
<li>Add <code>SecureStringHelper.FromPlainTextString</code> helper method for efficient secure string creation (#14124) (Thanks @xtqqczze!)</li>
<li>Use static lambda keyword (#15154) (Thanks @iSazonov!)</li>
<li>Remove unnecessary <code>Array</code> -&gt; <code>List</code> -&gt; <code>Array</code> conversion in <code>ProcessBaseCommand.AllProcesses</code> (#15052) (Thanks @xtqqczze!)</li>
<li>Standardize grammar comments in Parser.cs (#15114) (Thanks @ZhiZe-ZG!)</li>
<li>Enable <code>SA1001</code>: Commas should be spaced correctly (#14171) (Thanks @xtqqczze!)</li>
<li>Refactor <code>MultipleServiceCommandBase.AllServices</code> (#15053) (Thanks @xtqqczze!)</li>
</ul>

</details>

* Tools

- Use Unix line endings for shell scripts (#15180) (Thanks @xtqqczze!)

* Tests

- Add the missing tag in Host Utilities tests (#14983)
- Update `copy-props` version in `package.json` (#15124)

* Build and Packaging Improvements

<details>

<summary>

<p>We thank the following contributors!</p>
<p>@JustinGrote</p>

</summary>

<ul>
<li>Fix <code>yarn-lock</code> for <code>copy-props</code> (#15225)</li>
<li>Make package validation regex accept universal Linux packages (#15226)</li>
<li>Bump NJsonSchema from 10.4.0 to 10.4.1 (#15190)</li>
<li>Make MSI and EXE signing always copy to fix daily build (#15191)</li>
<li>Sign internals of EXE package so that it works correctly when signed (#15132)</li>
<li>Bump Microsoft.NET.Test.Sdk from 16.9.1 to 16.9.4 (#15141)</li>
<li>Update daily release tag format to  work with new Microsoft Update work (#15164)</li>
<li>Feature: Add Ubuntu 20.04 Support to install-powershell.sh (#15095) (Thanks @JustinGrote!)</li>
<li>Treat rebuild branches like release branches (#15099)</li>
<li>Update WiX to 3.11.2 (#15097)</li>
<li>Bump NJsonSchema from 10.3.11 to 10.4.0 (#15092)</li>
<li>Allow patching of preview releases (#15074)</li>
<li>Bump Newtonsoft.Json from 12.0.3 to 13.0.1 (#15084, #15085)</li>
<li>Update the <code>minSize</code> build package filter to be explicit (#15055)</li>
<li>Bump NJsonSchema from 10.3.10 to 10.3.11 (#14965)</li>
</ul>

</details>

* Documentation and Help Content

- Merge `7.2.0-preview.4` changes to master (#15056)
- Update `README` and `metadata.json` (#15046)
- Fix broken links for `dotnet` CLI (#14937)

[7.2.0-preview.5]: v7.2.0-preview.4...v7.2.0-preview.5
@JustinGrote JustinGrote deleted the feat/AddUbuntu2004ToInstallerScript branch July 14, 2022 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsupported Ubuntu Version 20.04 when building repository on Ubuntu 20.04
4 participants
0