The postinst and postrm scripts change the ownership and permissions
of /var/lib/toolbox directly, which is discouraged behavior.
This commit changes the scripts so they use dpkg-statoverride instead.
+toolbox (0.3.3-1) unstable; urgency=medium
+
+ * Fixes
+ - debian: Add postinst and postrm scripts creating the toolbox and
+ toolbox_ipc groups upon installation and removing them upon package
+ removal
+
+ -- Matthias Kruk <m@m10k.eu> Fri, 21 Jan 2022 18:25:25 +0900
+
+
toolbox (0.3.2-1) unstable; urgency=medium
* Fixes
# so we don't change it.
if addgroup toolbox; then
- chown root.toolbox /var/lib/toolbox
- chmod 770 /var/lib/toolbox
+ if ! dpkg-statoverride --list /var/lib/toolbox >/dev/null 2>&1; then
+ dpkg-statoverride --update --add root toolbox 0770 /var/lib/toolbox
+ fi
fi
if addgroup toolbox_ipc; then
- chown root.toolbox_ipc /var/lib/toolbox/ipc
- chmod 770 /var/lib/toolbox/ipc
+ if ! dpkg-statoverride --list /var/lib/toolbox/ipc >/dev/null 2>&1; then
+ dpkg-statoverride --update --add root toolbox_ipc 0770 /var/lib/toolbox/ipc
+ fi
fi
return 0
#!/bin/sh
main() {
+ if dpkg-statoverride --list /var/lib/toolbox/ipc >/dev/null 2>&1; then
+ dpkg-statoverride --remove /var/lib/toolbox/ipc
+ fi
+
+ if dpkg-statoverride --list /var/lib/toolbox >/dev/null 2>&1; then
+ dpkg-statoverride --remove /var/lib/toolbox
+ fi
+
delgroup toolbox
delgroup toolbox_ipc