Improve meson_post_install script
-
meson_post_install: Use geteuid instead of getpass
-
meson_post_install: Don't fail if the polkitd user doesn't exist yet
If the package is being built in a minimal container or chroot, the user might not exist at build-time. Distributions like Debian often create system users on a just-in-time basis when the package that needs them is installed, but a minimal container or chroot probably doesn't have polkit.
Resolves: #139 (closed)
-
meson_post_install: If installation steps are skipped, say what is needed
-
meson_post_install: Don't install pkexec group-writable
If group 0 isn't root-equivalent, then letting it write to pkexec would be a privilege escalation vector. Make it 0o4755 instead, which is consistent with the old Autotools build system.
-
meson_post_install: Don't make programs setuid if we are not root
If we're installing unprivileged into a ${DESTDIR}, there's no point in the programs being setuid to a non-root uid.
-
CI: Don't pre-create the polkitd user
This makes sure we do the right thing when building in a minimal container or chroot where that user doesn't exist.