Skip to content
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

tunnelblick installation instructions unclear #16396

Closed
boneskull opened this issue Jan 6, 2016 · 10 comments
Closed

tunnelblick installation instructions unclear #16396

boneskull opened this issue Jan 6, 2016 · 10 comments

Comments

@boneskull
Copy link
Contributor

$ brew cask install tunnelblick --force
==> Caveats
For security reasons, tunnelblick must be installed to /Applications,
and will request to be moved at launch.

==> Satisfying dependencies
complete
==> Downloading https://www.tunnelblick.net/release/Tunnelblick_3.5.5_build_4270.4461.dmg
Already downloaded: /Library/Caches/Homebrew/tunnelblick-3.5.5_build_4270.4461.dmg
==> Verifying checksum for Cask tunnelblick
==> Symlinking App 'Tunnelblick.app' to '/Applications/Tunnelblick.app'
🍺  tunnelblick staged at '/opt/homebrew-cask/Caskroom/tunnelblick/3.5.5_build_4270.4461' (249 files, 17M)

OK. But if it's symlinked with the same name, Tunnelblick fails to install itself properly:

1/5/16 18:44:54.896 Tunnelblick[35520]: installer reported failure: /opt/homebrew-cask/Caskroom/tunnelblick/3.5.5_build_4270.4461/Tunnelblick.app/Contents/Resources/installer: (
    22
)
1/5/16 18:44:54.897 Tunnelblick[35520]: Installation or repair failed; Log:
Tunnelblick installer started 2016-01-05 18:44:43. 1 arguments: 0x0017
Apparent symlink attack detected at test point 1: Symlink is at /Applications/Tunnelblick.app, full path being tested is /Applications/Tunnelblick.app
Tunnelblick installer started 2016-01-05 18:44:45. 1 arguments: 0x0016
Apparent symlink attack detected at test point 1: Symlink is at /Applications/Tunnelblick.app, full path being tested is /Applications/Tunnelblick.app
Tunnelblick installer started 2016-01-05 18:44:47. 1 arguments: 0x0016
Apparent symlink attack detected at test point 1: Symlink is at /Applications/Tunnelblick.app, full path being tested is /Applications/Tunnelblick.app
Tunnelblick installer started 2016-01-05 18:44:50. 1 arguments: 0x0016
Apparent symlink attack detected at test point 1: Symlink is at /Applications/Tunnelblick.app, full path being tested is /Applications/Tunnelblick.app
Tunnelblick installer started 2016-01-05 18:44:54. 1 arguments: 0x0016
Apparent symlink attack detected at test point 1: Symlink is at /Applications/Tunnelblick.app, full path being tested is /Applications/Tunnelblick.app

So, to fix, one must:

$ rm /Applications/Tunnelblick.app
$ mv /opt/homebrew-cask/Caskroom/tunnelblick/3.5.5_build_4270.4461/Tunnelblick.app /Applications/

Is there any way to automate this?

@adidalal
Copy link
Contributor

adidalal commented Jan 6, 2016

Unfortunately, it's a known issue (#12858) and must be done manually at this time.

#13201 will solve the issue once and for all.

@adidalal adidalal closed this as completed Jan 6, 2016
@boneskull
Copy link
Contributor Author

Can the instructions be more descriptive when installing?

@adidalal
Copy link
Contributor

adidalal commented Jan 6, 2016

What would you recommend? We're open to suggestions!

@boneskull
Copy link
Contributor Author

Given that #13201 proposes to change all of this, I'd consider this to be a reasonable, temporary workaround:

 Casks/tunnelblick.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Casks/tunnelblick.rb b/Casks/tunnelblick.rb
index 1daf039..58eb7c0 100644
--- a/Casks/tunnelblick.rb
+++ b/Casks/tunnelblick.rb
@@ -11,7 +11,7 @@ cask 'tunnelblick' do

   depends_on :macos => '>= :tiger'

-  app 'Tunnelblick.app'
+  installer :manual => 'Tunnelblick.app'

   uninstall :launchctl => 'net.tunnelblick.tunnelblick.LaunchAtLogin',
             :quit      => 'net.tunnelblick.tunnelblick'

@boneskull
Copy link
Contributor Author

ping

@vitorgalvao
Copy link
Member

Making it an installer :manual is a bad solution. installer :manual is bad in general (exists out of necessity), and making it like so will only make the cask worse. Temporary workarounds are rarely temporary, because no one will remember it when the time comes, and it’ll linger in that state indefinitely.

You may submit a PR to extend the caveat to add “Make sure you don’t have a symlink to it there, or it won’t be able to be moved”, but that’s it.

@boneskull
Copy link
Contributor Author

Respectfully, it's not worse, because it's completely broken in its current state--Tunnelblick.app, if symlinked into /Applications, will fail to install itself there. If the user opens Tunnelblick.app as an "installer", then they have a working package.

@boneskull
Copy link
Contributor Author

“Make sure you don’t have a symlink to it there, or it won’t be able to be moved”

What's lame about this is that homebrew-cask creates the symlink itself. So this means a user must:

  1. Remove the symlink
  2. Run /opt/homebrew-cask/Caskroom/tunnelblick/ver/Tunnelblick.app manually, or
  3. Copy /opt/homebrew-cask/Caskroom/tunnelblick/ver/Tunnelblick.app into /Applications

My suggestion above means the user has one extra step instead of two extra steps, which is the current state of things.

Believe me, I understand wanting to keep things maintainable. But ultimately homebrew-cask exists to help users easily install stuff, doesn't it? Not to sound too harsh, but users don't care about the state of the codebase--they just want something that works. I assert "less broken" is a step in that direction.

@vitorgalvao
Copy link
Member

Respectfully, it's not worse, because it's completely broken in its current state

Homebrew-cask symlinks by default to ~/Applications, so no, it’s not.

I understand wanting to keep things maintainable (…) but users don't care about the state of the codebase

When things are more maintainable, they’re better for everyone. We’re not about to make things worse to maintain because an entitled use who contributes nothing and pays nothing to use this software built by the free time of others thinks their specific annoyance should be dealt with immediately, to the detriment (however small) of the remainder of the project1.

We’re unapologetically alpha, and not production-ready. We never changed that stance. The fact so many users can already use it daily is great, but that does not change that fact.

Read #13201 carefully and you’ll see a very clear message: “no workarounds, lets make things work”. We’re done with band-aids. They got us in the mess the codebase is in in the first place, and we don’t intend to go back.

The fix for this is clear. It’s outlined in #13201. If a user cares that much to want this now, they can:

  1. Contribute their time and expertise to help move that forward.
  2. Pay someone (even someone outside this team, that isn’t relevant) to implement it.

Our goal is to fix these issues and make everything better as a whole. Band-aids that cause setbacks when there is a clear correct outlined solution will be refused.


1 I want to be absolutely clear that this is not how I see you at all. On the contrary, you sound very reasonable, and as such deserve a detailed explanation of this reasoning. However, those users do exist, and occasionally show themselves.

@boneskull
Copy link
Contributor Author

Homebrew-cask symlinks by default to ~/Applications, so no, it’s not.

Ahhh! This is the problem. I didn't recall doing this, but there it is in my exports:

declare -x HOMEBREW_CASK_OPTS="--appdir=/Applications"

So I apologize about that--I was under the impression it was failing out-of-the-box.

You guys deserve a lot of credit. You're trying to do something here which is difficult--a one-size-fits-all solution to install just about anything. It's a testament to your ingenuity it works as well as it does in "alpha" state. I don't have the bandwidth to contribute anything major, but I look forward to the future of this project.

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants