debian: create fastrpc group and add user to it in postinstall - #86
debian: create fastrpc group and add user to it in postinstall#86Shoudi Li (shoudil) wants to merge 1 commit into
Conversation
|
Checked on device: qcom@qcom: |
The postinstall script creates a 'fastrpc' system group via systemd-sysusers, falling back to 'addgroup --system', and adds the installing user to it. $SUDO_USER is preferred over $USER because during package installation $USER resolves to root; $SUDO_USER captures the real caller when invoked via 'sudo apt install ./pkg.deb'. Signed-off-by: Shoudi Li <shoudil@qti.qualcomm.com>
d3b763a to
6872091
Compare
Loïc Minier (lool)
left a comment
There was a problem hiding this comment.
Apologies, I am just noticing this PR now.
Actually debhelper can call sysusers for us, it just wasn't enabled automatically for compat level 13, but we can get it with dh --with installsysusers and that will work with backports.
We should NOT add the user calling apt to this or that group; this is a site/image policy, not something a package should do.
|
Superseded by #95 |
This PR is for debian/latest branch, we need change on qcom/ubuntu/resolute as well. |
The postinstall script creates a 'fastrpc' system group via
systemd-sysusers, falling back to 'addgroup --system', and adds the
installing user to it.
$SUDO_USER is preferred over $USER because during package installation
$USER resolves to root; $SUDO_USER captures the real caller when
invoked via 'sudo apt install ./pkg.deb'.