-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Description
Problem Description
I configured vdirsyncer to get the password from the user keyring:
password.fetch = ["command", "secret-tool", "lookup", "URL", "https://example.com/"]
This used to work fine before version 0.19.0. Since 0.19.0, however, the configured parameters get changed and, thus, secret-tool
does not find the password any more:
vdirsyncer -vdebug sync
debug: Fetching value for password.fetch with command strategy.
error: Unknown error occurred: Command '['secret-tool', 'lookup', 'URL', 'https:/example.com']' returned non-zero exit status 1.
error: Use `-vdebug` to see the full traceback.
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/__init__.py", line 32, in inner
debug: f(*a, **kw)
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/__init__.py", line 150, in sync
debug: asyncio.run(main(collections))
debug: File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
debug: return loop.run_until_complete(main)
debug: File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
debug: return future.result()
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/__init__.py", line 133, in main
debug: async for collection, config in prepare_pair(
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/tasks.py", line 24, in prepare_pair
debug: await collections_for_pair(
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/discover.py", line 57, in collections_for_pair
debug: cache_key = _get_collections_cache_key(pair)
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/discover.py", line 32, in _get_collections_cache_key
debug: pair.config_b,
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/utils.py", line 158, in __get__
debug: obj.__dict__[self.__name__] = result = self.fget(obj)
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/config.py", line 271, in config_b
debug: return self._config.get_storage_args(self.name_b)
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/config.py", line 204, in get_storage_args
debug: return expand_fetch_params(args)
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/fetchparams.py", line 24, in expand_fetch_params
debug: config[newkey] = _fetch_value(config[key], key)
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/utils.py", line 189, in wrapper
debug: return f(*args, **kwargs)
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/fetchparams.py", line 61, in _fetch_value
debug: rv = strategy_fn(*opts[1:])
debug: File "/usr/lib/python3.10/site-packages/vdirsyncer/cli/fetchparams.py", line 85, in _strategy_command
debug: stdout = subprocess.check_output(expanded_command, text=True, shell=shell)
debug: File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
debug: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
debug: File "/usr/lib/python3.10/subprocess.py", line 526, in run
debug: raise CalledProcessError(retcode, process.args,
The key information is here, I believe:
error: Unknown error occurred: Command '['secret-tool', 'lookup', 'URL', 'https:/example.com']' returned non-zero exit status 1.
vdirsyncer calls secret-tool lookup URL https:/example.com
instead of secret-tool lookup URL https://example.com/
. The difference is subtle: vdirsyncer stripped two /
.
I guess that the cause is the commit c254b4a, which applies path normalization to every parameter of the fetch command. In my case, this causes to URL to be unsuitably normalized.
My Environment
- vdirsyncer 0.19.0
- Python 3.10.9
- running on Gentoo Linux, all relevant packages installed from Gentoo's package repository
Metadata
Metadata
Assignees
Labels
No labels