Skip to content

Remove the workaround to enable macOS launcher #5262

Closed

Description

The change was reverted to unblock PRs being blocked in packaging.

#5259

Further investigation should be done to re-enable macOS launcher.

Activity

  1. changed the title [-]Remove the workaround to enbable macOS launcher[/-] [+]Remove the workaround to enable macOS launcher[/+] on Oct 27, 2017
  2. thezim commented on Oct 29, 2017

    @thezim
    Contributor

    Looks like a permissions issue to me. Is the account doing the build (owner) the same as who created the inital file structure. I could rewrite it so it builds the app in a user space temp folder such as TMPDIR to avoid conflicts.

  3. adityapatwardhan commented on Oct 30, 2017

    @adityapatwardhan
    MemberAuthor

    Greg Zimmerman (@thezim) yes it is the same account. It would be great if you could send a PR to resolve this.

  4. thezim commented on Oct 31, 2017

    @thezim
    Contributor

    Issue

    Aditya Patwardhan (@adityapatwardhan) so I found out what is going on. When the the installation of PowerShell occurs it is actually recognizing the app that exists in the packaging folder and updating the copy there tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app instead of installing it to /Applications as you would think. Since it gets installed as root:wheel 755 you lose access to the files.

    The behavior may seem like madness but it makes sense as apps can be installed pretty much anywhere you like. Being able automatically find these instances is beneficial.

    This issue only occurs on a machine with build on it. I verified that a vanilla High Sierra does not have this issue with just the installation from .pkg.

    I'm afraid moving it to different temporary folder will probably not work as it will get picked up there too. My intuition is one the the identifiers in Info.plist is triggering its pickup. Removing the tools/packaging/macos/launcher/ROOT/Applications/PowerShell.app folder prior to installation does fix the issue.

    Possible solutions

    1. Remove the macOS app folder just after fpm runs here. Not the best but maybe good enough for getting past CI.
    2. Have packaging build the macOS app procedurally as it is simple a few files and folders then remove the folder after packaging, same as in 1. This has the advantage of not having the folder structure and files in the repo directly as they can be generated at will.
    3. Figure out what is triggering the capture of the build staging launcher and make a change to the plist and/or structure to prevent if from being picked up post fpm.

    Also for anyone wanting to try to repro this to uninstall PowerShell from macOS you should be using the following. I will get documentation updated soon with the below.

    sudo rm -rf /usr/local/microsoft /usr/local/bin/pwsh /Applications/PowerShell.app /usr/local/share/man/man1/pwsh.1.gz
    sudo pkgutil --forget powershell

    /cc Travis Plunk (@TravisEz13)

  5. TravisEz13 commented on Oct 31, 2017

    @TravisEz13
    Member

    Greg Zimmerman (@thezim) If you enable travis-ci or your branch, it will attempt to build the package each time you attempt to push. I don't have any preference between 1 & 2. Although, we are getting close to release. We should probably be looking for a simple solution. It seems to me 1 is simpler (if it works.)

  6. thezim commented on Nov 1, 2017

    @thezim
    Contributor

    After digging in to it option 1 wasn't really viable because subsequent package builds would fail as the structure it needs would be gone. Option 2 was the most work so I first tried Option 3 and was able to get it working. PR #5291 has been submitted.

    /cc Aditya Patwardhan (@adityapatwardhan)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-Fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions