Installation of Polkit
There should be a dedicated user and group to take control of the
polkitd daemon after
it is started. IF you have
not already created a dedicated user and group for polkitd, issue the following
commands as the root user:
groupadd -fg 27 polkitd &&
useradd -c "PolicyKit Daemon Owner" -d /etc/polkit-1 -u 27 \
-g polkitd -s /bin/false polkitd
Install Polkit by running the following commands:
mkdir build &&
cd build &&
meson setup .. \
--prefix=/usr \
--buildtype=release \
-D os_type=lfs \
-D man=false \
-D session_tracking=elogind \
-D systemdsystemunitdir=/tmp \
-D tests=false &&
ninja
Now, as the root user:
ninja install
Remove some files that aren't useful on a SysV system as the
root user:
rm -v /tmp/*.service &&
rm -rf /usr/lib/{sysusers,tmpfiles}.d
Command Explanations
Note
Inspect meson_options.txt or
meson.options for a full list of
options.
--buildtype=release:
Specify a buildtype suitable for stable releases of the package, as
the default may produce unoptimized binaries.
-D os_type=lfs: This switch
ensures that even if distribution auto detection fails, the
distribution/OS type will be hardcoded in Polkit.
-D man=false: This option
disables generating and installing manual pages.
-D authfw=shadow: This switch enables
the package to use the Shadow rather than the Linux PAM
Authentication framework. Use it if you have not installed Linux
PAM.
-D introspection=false: This option
disables GObject Introspection support if you are sure you don't
need it.