Skip to content

debian: create fastrpc group and add user to it in postinstall - #86

Closed
Shoudi Li (shoudil) wants to merge 1 commit into
qualcomm-linux:qcom/ubuntu/resolutefrom
shoudilml:qcom/ubuntu/resolute
Closed

debian: create fastrpc group and add user to it in postinstall#86
Shoudi Li (shoudil) wants to merge 1 commit into
qualcomm-linux:qcom/ubuntu/resolutefrom
shoudilml:qcom/ubuntu/resolute

Conversation

@shoudil

@shoudil Shoudi Li (shoudil) commented Aug 21, 2026

Copy link
Copy Markdown

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'.

@shoudil

Shoudi Li (shoudil) commented Aug 21, 2026

Copy link
Copy Markdown
Author

Checked on device:

qcom@qcom:$ sudo dpkg -i fastrpc-support_1.0.6-2_arm64.deb
Selecting previously unselected package fastrpc-support.
(Reading database ... 86267 files and directories currently installed.)
Preparing to unpack fastrpc-support_1.0.6-2~_arm64.deb ...
Unpacking fastrpc-support (1.0.6-2~) ...
Setting up fastrpc-support (1.0.6-2~) ...
Creating group 'fastrpc' with GID 987.
adsprpcd.service is a disabled or a static unit, not starting it.
adsprpcd_audiopd.service is a disabled or a static unit, not starting it.
cdsp1rpcd.service is a disabled or a static unit, not starting it.
cdsprpcd.service is a disabled or a static unit, not starting it.
gdsp0rpcd.service is a disabled or a static unit, not starting it.
gdsp1rpcd.service is a disabled or a static unit, not starting it.
sdsprpcd.service is a disabled or a static unit, not starting it.
qcom@qcom:$ groups qcom
qcom : qcom sudo audio video users dmaheap fastrpc
qcom@qcom:
$ groups
qcom sudo audio video users fastrpc dmaheap

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>

@lool Loïc Minier (lool) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lool

Copy link
Copy Markdown

Superseded by #95

@shoudil

Copy link
Copy Markdown
Author

Superseded by #95

This PR is for debian/latest branch, we need change on qcom/ubuntu/resolute as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants