typecd: Add typecd_ec group and user
Add the typecd_ec group and user (and ensure that cros_ec-access is
created) so that debugd EC Type C tool can access /dev/cros_ec.
BUG=b:171725237
TEST=Build an image with the updated debugd and typecd. Ensure that
the debugd D-BUS command returns the inventory list. Command is:
'dbus-send --system --dest=org.chromium.debugd --print-reply
/org/chromium/debugd org.chromium.debugd.EcGetInventoryGetInventory'
Change-Id: I2dc80fb4850fea1202ea907de66c8ab12fd9d084
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2591798
Tested-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Prashant Malani <pmalani@chromium.org>
diff --git a/chromeos-base/typecd/typecd-9999.ebuild b/chromeos-base/typecd/typecd-9999.ebuild
index 05a66e1..d68c43a 100644
--- a/chromeos-base/typecd/typecd-9999.ebuild
+++ b/chromeos-base/typecd/typecd-9999.ebuild
@@ -39,6 +39,12 @@
pkg_preinst() {
enewuser typecd
enewgroup typecd
+
+ # This group is required for debugd EC Type C tool to access /dev/cros_ec.
+ enewgroup cros_ec-access
+ # Add user and group for debugd Type C commands.
+ enewuser typecd_ec
+ enewgroup typecd_ec
}
platform_pkg_test() {