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

Error unsupported absolute path for Tunnelblick #1409

Open
madsem opened this issue Jul 23, 2019 · 6 comments
Open

Error unsupported absolute path for Tunnelblick #1409

madsem opened this issue Jul 23, 2019 · 6 comments

Comments

@madsem
Copy link

madsem commented Jul 23, 2019

I have a custom config for Tunnelblick, in which I wanted to 'mackup' my VPN config file(s).
But whenever I add this, mackup throws an error:

➜ mackup list
Traceback (most recent call last):
  File "/usr/local/bin/mackup", line 11, in <module>
    load_entry_point('mackup==0.8.24', 'console_scripts', 'mackup')()
  File "/usr/local/Cellar/mackup/0.8.24/libexec/lib/python3.7/site-packages/mackup/main.py", line 65, in main
    app_db = ApplicationsDatabase()
  File "/usr/local/Cellar/mackup/0.8.24/libexec/lib/python3.7/site-packages/mackup/appsdb.py", line 53, in __init__
    .format(path))
ValueError: Unsupported absolute path: /Library/Application Support/Tunnelblick/Shared

When I remove /Library/Application Support/Tunnelblick/Shared it works again.

@lra
Copy link
Owner

lra commented Aug 10, 2019

Try without the leading /

@nbcomplete
Copy link

nbcomplete commented Aug 13, 2019

Try without the leading /

Then it won't work, because Tunnelblick actually uses the root Library folder for VPN profiles, not the folder in the home directory.

I've just discovered the same issue, also with Tunnelblick, so before I stumbled upon this issue I checked the code:

Absolute paths are rejected explictly here: https://github.com/lra/mackup/blob/master/mackup/appsdb.py#L51
because the collected paths are joined with the home directory here: https://github.com/lra/mackup/blob/master/mackup/application.py#L44

Was this an intentional design decision? If so, why? I think backing up configs should not be limited to paths under the user's home directory.

If there is no good reason to forbid this, I would be willing to submit a PR to add support for absolute paths.

@lra
Copy link
Owner

lra commented Aug 14, 2019

Was this an intentional design decision? If so, why?

Yes, because the purpose of Mackup is to sync user's files, and no user file is supposed to live outside of the home folder in a multi user system.

Syncing / would lead to a lot of breaking things and we already have too much things breaking by just supporting ~.

Frankly, I don't see any good reason for any app to store any user setting out of ~, Tunnelblick should not do this. You should ask the rationale behind this upstream.

@nbcomplete
Copy link

Good point, but

Syncing / would lead to a lot of breaking things

You know it would be people intentionally backing up paths that aren't under their home dir, right? It's not like Mackup would interfere with random stuff on people's computers. Still though, I think I could solve this with symlinks, if I still desired to do so.

I just found that I had installed the VPN profiles as shared, so Tunnelblick was saving them under the global Library directory rather than the the user-local one. But when I tried to make the profiles user-local, Tunnelblick choked due to the symlinked local profile directory (the one that is backed up with the default config). I guess I understand what you mean by breaking stuff now.

Maybe it would be an option to add a second backup strategy to Mackup where it makes copies rather than symlinks?

@lra
Copy link
Owner

lra commented Aug 25, 2019

Maybe it would be an option to add a second backup strategy to Mackup where it makes copies rather than symlinks?

This is definitely planned

@owpac
Copy link

owpac commented Mar 13, 2023

Hello !

I've just found this thread and I was wondering if the option to add a second backup strategy to Mackup where it makes copies rather than symlinks is still something in the roadmap.

In my particular use case (I'm on Mac), I wanted to add some configuration in my Firefox (basically removing some default shortcuts and added new ones). Long story short, it appears that I needed to create 2 files in /Applications/Firefox.app/Contents/Ressources and I would love to manage & save those configuration files with Mackup with copies:

[application]
name = Firefox conf

[mode]
type = cp

[configuration_files]
/Applications/Firefox.app/Contents/Resources/config.js
/Applications/Firefox.app/Contents/Resources/defaults/pref/config-prefs.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants