gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.03k stars 1.71k forks source link

Allow tsh pkg to install older versions over higher versions on Mac #41844

Open stevenGravy opened 1 month ago

stevenGravy commented 1 month ago

What would you like Teleport to do?

Allow installing a older version tsh mac pkg if a higher version is already installed.

What problem does this solve?

Customers can install tsh that are further ahead then their proxy/auth. If they try to install an older version that will not overwrite the higher version.

If a workaround exists, please include it.

Uninstall tsh in /Application/tsh.app and remove /usr/local/bin/tsh. Then you can install a older tsh version.

codingllama commented 1 month ago

A few ideas to consider:

  1. Write a preinstall script that moves or removes an existing app version (moving might cause other problems, check first)
  2. Give BundleOverwriteAction a shot (BundleIsVersionChecked=false and BundleOverwriteAction=upgrade, possibly)?

Removing the /usr/local/bin/tsh symlink should not be necessary, assuming postinstall works as expected.

See man pkgconfig for details.

webvictim commented 3 weeks ago

I've run into this issue a few times recently. It's very frustrating to explicitly install a package of a certain version and then have the output of tsh version not change.