Not tested yet, but this might fix the problem from a user on the ML (https://lists.geany.org/pipermail/users/2020-November/011427.html) as suggester by @elextr
Could someone with Ubuntu test this, esp. if they reproduce the issue? You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2661
-- Commit Summary --
* Try and find ldconfig on Ubuntu even with weird sudo configurations
-- File Changes --
M src/Makefile.am (2)
-- Patch Links --
https://github.com/geany/geany/pull/2661.patch https://github.com/geany/geany/pull/2661.diff
@b4n I use Ubuntu 20.04 and can test. Can you describe the reproduction procedure?
For what it's worth, I just tested current `master` branch as well as this branch (with a `make distclean` before each try) and they both worked. Ubuntu 20.04.1, all default build options.
@codebrainz wonderful, so:
1. make sure ldconfig is *not* in sudo's default PATH: `sudo env | grep PATH` and make sure it doesn't contain `/sbin` 2. build and install *in `/usr/local`* (e.g. don't give a custom prefix)
Hopefully this would not work in master, but work with this PR. If it does work with master, we'll have to make sure `sudo ldconfig` doesn't work because `sudo` doesn't fine ldconfig, and if it does figure out how to prevent it from doing so in order to test.
1) Result (default, not changed by me): ```bash $ sudo env | grep PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin ``` 2) That's what I did when testing.
I don't really want to change `PATH` and `ldconfig` stuff for root, if that's what you're suggesting I do. But it does work by default on Ubuntu, both master and this branch, if you don't mess up your root `PATH` stuff.
Yeah I kind of expected that you'd have a sane `sudo` configuration… I'll have to ask the guy if he can give his `sudo` configuration for testing, but we still won't know how he came up with it. My guess is that something like `sudo -E` or modifying the `sudo` configuration to omit `/sbin` from `sudo`'s `secure_path` would trigger the issue, but I could understand you'd be reluctant to try. If I find the time maybe I can try set up a Ubuntu VM and mess with it.
@b4n I wouldn't bother too much:
1) a broken sudo is an outlier 2) autotools ldconfig calls work, and now we do the same, so its likely to work
Relax enjoy #2600 :)
github-comments@lists.geany.org