← Back to team overview

ubuntu-phone team mailing list archive

Device-Specific configs in debs

 

Hi Guys,

So after looking at customizing powerd, I noticed several areas where we
have device-specific config files living inside deb packages.  As our idea
of customization has always been "one rootfs image for all devices", this
seems a bit problematic.  Just from a quick glance, I found the following
device-specific bits in the image (just a simple find / -name *maguro*):

/etc/init/bluetooth-touch-maguro.conf
/etc/ubuntu-touch-session.d/maguro.conf
/usr/share/initramfs-tools-ubuntu-touch/bootimg.cfg-maguro
/usr/share/powerd/device_configs/config-maguro.xml
/usr/share/apparmor/hardware/graphics.d/apparmor-easyprof-ubuntu_maguro
/usr/share/apparmor/hardware/video.d/apparmor-easyprof-ubuntu_maguro
/usr/lib/lxc-android-config/70-maguro.rules

While this works for now with our limited set of supported devices, it can
quickly become untenable once we start building images for OEMs in the
future, or if we get an influx of community builds.

I propose that we try and tackle this before it becomes a problem.  Do we
have a plan for this already?

If we don't have a plan quite yet, as a first step, I propose that we patch
powerd and apparmor to look in XDG_DATA_DIRS instead of just /usr/share/
for its configs.  If we do this, we can drop any needed configs into a
custom tarball (which includes /custom/xdg/data, which is included in
XDG_DATA_DIRS), and therefore keep the rootfs as device-agnostic as
possible.  Does this seem reasonable?

Thanks!
Chris

Follow ups