From 3a00ce9a4ab4ecdd6b7144020333e30d3ad64bf7 Mon Sep 17 00:00:00 2001 From: joeyaiello Date: Tue, 27 Feb 2018 17:15:28 -0800 Subject: [PATCH 1/6] add initial draft of RFC for MSI install path --- .../RFCXXXX-MSI-Installation-Path.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md diff --git a/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md b/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md new file mode 100644 index 00000000..02f5c17e --- /dev/null +++ b/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md @@ -0,0 +1,68 @@ +--- +RFC: RFC +Author: Joey Aiello +Status: Draft +Version: 0.1 +Area: Installation +Comments Due: March 27, 2018 +Plan to implement: Yes +--- + +# MSI Installation Path Location + +Today, when using the MSI package on Windows, +PowerShell Core is installed to `$env:ProgramFiles\PowerShell\\`. +This path was chosen early in the development of PowerShell Core in order to provide a deterministic, +file-based way to query the installed version of PowerShell. +In this RFC, we will explore the possibility of installing to different paths in order to support certain side-by-side scenarios. + +## Motivation + +Now that PowerShell Core 6.0 has GA'd, some users would like to run a preview version of PowerShell Core 6.1 side-by-side with PowerShell Core. +Today, that's only possible if one version is installed via the MSI and another is installed via the "portable" ZIP package. +Unfortunately, this makes the ZIP-installed copy of PowerShell difficult to install, and + +Also, in working to support Microsoft Update (MU) for servicing of PowerShell Core, +we require that the path of all PowerShell Core binaries does not change between servicing. +For example, if needed to patch a hypothetical version 6.0.3 to 6.0.4, the location of `pwsh.exe` and all associated binaries cannot change. + +Lastly, we now have multiple mechanisms for querying the version directly from the PowerShell binary itself. +In order to support *nix-y semantics, we've added a `--version` parameter to `pwsh` that returns the version. +We also provide the version of PowerShell in the FileVersion object associated with `pwsh`. + +## Specification + +* There shall be two "flavors" of MSIs available: + * Stable: a production-ready, supported build. + * Preview: an unsupported build that may contain incomplete new features and high-impact bugs, + and should therefore not be used in production. +* All stable MSIs of PowerShell Core 6.x shall be installed to `$env:ProgramFiles\PowerShell\6\`. +* All preview MSIs of PowerShell Core 6.x shall be installed to `$env:ProgramFiles\PowerShell\6-preview`. +* When a stable MSI is run on a machine that already has a stable PowerShell Core 6.x installed, + an in-place update of that stable build shall be performed. +* When a preview MSI is run on a machine that already has a preview PowerShell Core 6.x installed, + an in-place update of that stable build shall be performed. + +## Alternate Considerations and Proposals + +### Include the minor version number in the folder name + +This proposal would install/update all stable PowerShell Core 6.x builds to `$env:ProgramFiles\PowerShell\6.0`, +and all stable PowerShell Core 6.1 builds to `$env:ProgramFiles\PowerShell\6.1`. +Similarly, previews of PowerShell Core 6.1 would be installed to `$env:ProgramFiles\PowerShell\6.1-preview`, +and previews of PowerShell Core 6.2 would be installed to `$env:ProgramFiles\PowerShell\6.2-preview`. + +This is undesirable given the Modern Lifecycle Policy that PowerShell Core has adopted. +Essentially, we've given users 6 months to migrate off of an older minor version of PowerShell Core once a new one is released. +Therefore, it makes more sense to *update* users from stable 6.0 to 6.1 than leave a version lying around that will soon become unsupported. +If users want to maintain unsupported versions of PowerShell Core side-by-side, +they should do a portable ZIP install. + +## Open Questions + +* What happens if `...\6\pwsh.exe` and `...\6-preview\pwsh.exe` are both on the PATH? + Is it even desirable to put `...\6-preview\pwsh.exe` on the PATH? +* Should an update install of stable PowerShell Core 6.0 to 6.1 also do a cleanup of any remaining preview 6.1 installs on the box? + * I'd posit "no" because the stable vs. preview branches should be independent installations. + E.g. I may want to immediately do an update of my preview 6.1 to 6.2, + and maybe I have profiles or modules in that preview `$PSHOME` that I want specific to my preview install. From f348cf67545ae810240a693d0b7e876a5394d05b Mon Sep 17 00:00:00 2001 From: joeyaiello Date: Sun, 4 Mar 2018 20:15:24 -0800 Subject: [PATCH 2/6] respond to feedback on MSI path RFC --- 2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md b/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md index 02f5c17e..dceba09f 100644 --- a/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md +++ b/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md @@ -37,11 +37,14 @@ We also provide the version of PowerShell in the FileVersion object associated w * Preview: an unsupported build that may contain incomplete new features and high-impact bugs, and should therefore not be used in production. * All stable MSIs of PowerShell Core 6.x shall be installed to `$env:ProgramFiles\PowerShell\6\`. -* All preview MSIs of PowerShell Core 6.x shall be installed to `$env:ProgramFiles\PowerShell\6-preview`. +* All preview MSIs of PowerShell Core 6.x shall be installed to `$env:ProgramFiles\PowerShell\6-Preview`. * When a stable MSI is run on a machine that already has a stable PowerShell Core 6.x installed, an in-place update of that stable build shall be performed. * When a preview MSI is run on a machine that already has a preview PowerShell Core 6.x installed, - an in-place update of that stable build shall be performed. + an in-place update of that preview build shall be performed. +* No installation of a preview build shall interfere with a stable build, and vice versa + * This includes an implicit requirement that `Install-PowerShellRemoting.ps1` create a different endpoint name for the preview build. + * The preview binary of PowerShell Core 6.x shall be named `pwsh-preview` or `pwsh-preview.exe` (depending on the platform). ## Alternate Considerations and Proposals From 1f6e1e07e674d642c2942b91eae1d51642902e31 Mon Sep 17 00:00:00 2001 From: joeyaiello Date: Wed, 27 Jun 2018 15:59:55 -0700 Subject: [PATCH 3/6] change MSI rfc to use .cmd file for pwsh-preview --- .../RFCXXXX-MSI-Installation-Path.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {2-Draft-Accepted => 4-Experimental-Accepted}/RFCXXXX-MSI-Installation-Path.md (93%) diff --git a/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md similarity index 93% rename from 2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md rename to 4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md index dceba09f..5853e420 100644 --- a/2-Draft-Accepted/RFCXXXX-MSI-Installation-Path.md +++ b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md @@ -44,7 +44,10 @@ We also provide the version of PowerShell in the FileVersion object associated w an in-place update of that preview build shall be performed. * No installation of a preview build shall interfere with a stable build, and vice versa * This includes an implicit requirement that `Install-PowerShellRemoting.ps1` create a different endpoint name for the preview build. - * The preview binary of PowerShell Core 6.x shall be named `pwsh-preview` or `pwsh-preview.exe` (depending on the platform). + * The preview of PowerShell Core 6.x shall not be placed on the `PATH`. + Instead, we should create a subdirectory in `$PSHOME` called `bin`, + create a `.cmd` file that launches the preview `pwsh.exe`, + and add `$PSHOME\bin` to the `PATH`. ## Alternate Considerations and Proposals @@ -63,8 +66,6 @@ they should do a portable ZIP install. ## Open Questions -* What happens if `...\6\pwsh.exe` and `...\6-preview\pwsh.exe` are both on the PATH? - Is it even desirable to put `...\6-preview\pwsh.exe` on the PATH? * Should an update install of stable PowerShell Core 6.0 to 6.1 also do a cleanup of any remaining preview 6.1 installs on the box? * I'd posit "no" because the stable vs. preview branches should be independent installations. E.g. I may want to immediately do an update of my preview 6.1 to 6.2, From e43352b936898aeb11e75e1b6b3db7a68886c256 Mon Sep 17 00:00:00 2001 From: joeyaiello Date: Wed, 27 Jun 2018 16:01:33 -0700 Subject: [PATCH 4/6] add Enable-PSRemoting to preview MSI RFC --- 4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md index 5853e420..5886b8d9 100644 --- a/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md +++ b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md @@ -43,7 +43,8 @@ We also provide the version of PowerShell in the FileVersion object associated w * When a preview MSI is run on a machine that already has a preview PowerShell Core 6.x installed, an in-place update of that preview build shall be performed. * No installation of a preview build shall interfere with a stable build, and vice versa - * This includes an implicit requirement that `Install-PowerShellRemoting.ps1` create a different endpoint name for the preview build. + * This includes an implicit requirement that `Install-PowerShellRemoting.ps1` + and `Enable-PSRemoting` create a different endpoint name for the preview build. * The preview of PowerShell Core 6.x shall not be placed on the `PATH`. Instead, we should create a subdirectory in `$PSHOME` called `bin`, create a `.cmd` file that launches the preview `pwsh.exe`, From 51ebfe7a538adf473677613aaf7cea8994ef9ccd Mon Sep 17 00:00:00 2001 From: joeyaiello Date: Wed, 27 Jun 2018 16:03:24 -0700 Subject: [PATCH 5/6] fix MSI RFC typos --- 4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md index 5886b8d9..34649cc5 100644 --- a/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md +++ b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md @@ -20,7 +20,7 @@ In this RFC, we will explore the possibility of installing to different paths in Now that PowerShell Core 6.0 has GA'd, some users would like to run a preview version of PowerShell Core 6.1 side-by-side with PowerShell Core. Today, that's only possible if one version is installed via the MSI and another is installed via the "portable" ZIP package. -Unfortunately, this makes the ZIP-installed copy of PowerShell difficult to install, and +Unfortunately, this makes the ZIP-installed copy of PowerShell difficult to install. Also, in working to support Microsoft Update (MU) for servicing of PowerShell Core, we require that the path of all PowerShell Core binaries does not change between servicing. @@ -47,7 +47,7 @@ We also provide the version of PowerShell in the FileVersion object associated w and `Enable-PSRemoting` create a different endpoint name for the preview build. * The preview of PowerShell Core 6.x shall not be placed on the `PATH`. Instead, we should create a subdirectory in `$PSHOME` called `bin`, - create a `.cmd` file that launches the preview `pwsh.exe`, + create a `pwsh-preview.cmd` file that launches the preview `pwsh.exe`, and add `$PSHOME\bin` to the `PATH`. ## Alternate Considerations and Proposals From bf75a8a2fabccbe3a91974fad0596cb99c5e089c Mon Sep 17 00:00:00 2001 From: joeyaiello Date: Wed, 27 Jun 2018 16:33:48 -0700 Subject: [PATCH 6/6] update front matter --- 4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md index 34649cc5..8e461d8a 100644 --- a/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md +++ b/4-Experimental-Accepted/RFCXXXX-MSI-Installation-Path.md @@ -1,8 +1,8 @@ --- RFC: RFC Author: Joey Aiello -Status: Draft -Version: 0.1 +Status: Experimental-Accepted +Version: 0.2 Area: Installation Comments Due: March 27, 2018 Plan to implement: Yes