Unfortunately installing this package as root made it problematic for me to run vcpkg's example manifest tutorial (https://github.com/microsoft/vcpkg/blob/master/docs/users/manifests.md) as a regular user (https://github.com/ericfont/fibo-vcpkg-example/issues/1), which led me to use sudo priviliges when running the cmake command, which is not good practice. I brought this up in vcpkg help desk (https://github.com/microsoft/vcpkg/discussions/20541) but a couple vcpkg contributors/maintainers said:
"I don't think it is a good idea to run sudo vcpkg at all, unless you are on a throw-away system."
"It is discouraged to install vcpkg via a package manager. Use git clone to install it, then you also don't have this problem."
I also suggested I wonder if it maybe makes sense to have the /usr/share/vcpkg folder be under a new group ("vcpkg" maybe) permission rather than under sudo permissions, that way regular users could install vcpkg packages without escalating to sudo privileges. Or maybe it is best to not have an AUR package for vcpkg as that second contributor said.
Pinned Comments
kyechou commented on 2021-10-08 20:01 (UTC)
Hi @ericfont, thanks for the suggestions. I just updated the package so that the vcpkg root is at
/opt/vcpkg
and both/opt/vcpkg
and/var/cache/vcpkg
are configured to be owned by the groupvcpkg
(with GID 499). The fixed-GID method seems to be the best we can get under this particular scenario. [ref: https://bbs.archlinux.org/viewtopic.php?id=241480] But I do also think that using vcpkg without a package manager makes more sense if the host machine is shared with other users.