Skip to content

Upgrader: add command install action#1230

Merged
jamill merged 3 commits into
microsoft:masterfrom
jamill:upgrader_tasks/installer_command
Jun 13, 2019
Merged

Upgrader: add command install action#1230
jamill merged 3 commits into
microsoft:masterfrom
jamill:upgrader_tasks/installer_command

Conversation

@jamill
Copy link
Copy Markdown
Member

@jamill jamill commented Jun 1, 2019

When the upgrader runs install actions defined in the installer manifest, it previously only supported starting an application or document contained in the installer package. The installer author might
want to run instead a command that is provided by the host operating
system / environment. For example, on macOS the installer author might want to run bash
or the "installer" binary directly as one of the install actions defined in the installer payload.

As any command can be included as an installer action, there is not any additional verification we can make about the command, except for validating the integrity of the containing NuGet package, and enforcing that the package contents have not been tampered with before we run the command.

This does not currently include a mechanism to define an environment variable.

@jamill jamill mentioned this pull request Jun 1, 2019
15 tasks
@jamill jamill force-pushed the upgrader_tasks/installer_command branch from 95a4b02 to 1e8b6cb Compare June 1, 2019 13:03
Comment thread GVFS/GVFS.Common/NuGetUpgrade/InstallActionInfo.cs
Comment thread GVFS/GVFS.Common/NuGetUpgrade/NuGetUpgrader.cs Outdated
@jamill jamill force-pushed the upgrader_tasks/installer_command branch 2 times, most recently from 0094c2e to 314af17 Compare June 6, 2019 03:02
@alameenshah
Copy link
Copy Markdown
Contributor

When running install actions, we previously only supported starting an
application or document contained in the installer package. You might
want to run instead a command that is provided by the host operating
system / environment. For example, on macOS you might want to run bash
or the "installer" binary directly.

Could you please update the description with a few additional details.

  1. Can regular mac end user provide a command for gvfs upgrade to run? Or is this command included in the installer payload?
  2. Similar to the downloaded upgrade package validation, is there any sort of validation that we can do on the command?
  3. How does end user specify an environment setting? Is this the bash environment variables or gvfs config?

@jamill jamill force-pushed the upgrader_tasks/installer_command branch from 314af17 to 3a16a8e Compare June 11, 2019 02:32
@jamill
Copy link
Copy Markdown
Member Author

jamill commented Jun 11, 2019

@alameenshah Thanks for the review! I updated the description to address the (good) questions you brought up.

Copy link
Copy Markdown
Member

@kewillford kewillford left a comment

Choose a reason for hiding this comment

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

This looks good to me. My only question is about any security issues.

Comment thread GVFS/GVFS.Common/NuGetUpgrade/NuGetUpgrader.cs
Copy link
Copy Markdown
Member

@kewillford kewillford left a comment

Choose a reason for hiding this comment

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

This looks good to me and thanks for the explanations.

Copy link
Copy Markdown
Member

@jrbriggs jrbriggs left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

jamill added 2 commits June 12, 2019 16:36
When running install actions, we previously only supported starting an
application or document contained in the installer package. You might
want to run instead a command that is provided by the host operating
system / environment. For example, on macOS you might want to run bash
or the "installer" binary directly.
@jamill jamill force-pushed the upgrader_tasks/installer_command branch from 3a16a8e to 5b2c3aa Compare June 12, 2019 20:42
replacementToken method should be PascalCase
@jamill jamill force-pushed the upgrader_tasks/installer_command branch from 5b2c3aa to 6aba70f Compare June 12, 2019 22:26
@jamill jamill merged commit dcdd18d into microsoft:master Jun 13, 2019
@jrbriggs jrbriggs added this to the M155 milestone Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants