Hi,
This is not so short update about current status and our plans wrt
to kdbus support in Tizen 3.
1. Architecture
===============
We plan to use mix of upstream and our code for kdbus support,
namely:
- newest systemd v208+ from git - takes ownership of system bus,
transparently registers dbus1 services, etc.
- systemd-bus-driverd to provide DBus1 service "org.freedesktop.DBus"
- systemd-bus-proxyd to provide compatibilty AF_UNIX socket that
old libraries can use (libraries, which were not ported to kdbus
yet)
- libgio dbus library with native kdbus-transport
- libdbus library with native kdbus-transport or provide
support via systemd-bus-proxyd
2. Packages & status
====================
All of our kdbus-integration[1] changes can be found in branch of
this very name [1]:
- platform/core/upstream/kdbus-bus kdbus-integration
Provides kdbus kernel module and interface header.
Compiles cleanly on IVI, Mobile/RD-PQ still requires a bit of
work due to old/unsupported version of kernel (3.10, while ivi
uses 3.12).
- platform/upstream/systemd kdbus-integration
Updated to newest version from upstream (provides bus-driverd
and bus-proxyd)
NOTE: systemd > 208 includes reworked udev smack attr support,
and requires our udev rules to be converted from SMACK=
to SECLABEL{smack}=. See "Building images manually" too.
- platform/upstream/glib kdbus-integration
Work-in-progress kdbus bindings for glib, upstream discussion
takes place on gnome's bugzilla:
https://bugzilla.gnome.org/show_bug.cgi?id=721861
Major missing parts are ability to send broadcast signals and
memfd support.
- platfrom/upstream/dbus - not integrated yet
dbus is still being ported to major kdbus API and ABI changes
If it won't be ready we should be able to support libdbus-using
applications via systemd-bus-proxyd
3. Integration & testing
========================
- Enabling kdbus on development & release images
upstream's systemd allows enabling kdbus support by passing "kdbus"
on kernel command line - this causes systemd to export appropriate
variables (DBUS_SYSTEM_BUS_ADDRESS=kernel:), automatically convert
dbus1 services to kdbus, mask dbus-daemon.service, and so on.
Without this parameter dbus-daemon is used as before.
I think this method is quite good and will allow us to ship
most intrusive part (systemd) on regular image after major
integration issues are handled.
For integration testing (as being prepared in "kdbus-integration"
branch) kdbus is enabled unconditionally.
- Automatic image generation
I have requested two separate OBS projects to be created for
IVI and Mobile:
https://bugs.tizen.org/jira/browse/TINF-423
After this is resolved it should be trivial to build kdbus-enabled
images automatically.
- Building images manually
It's possible to build kdbus-enabled images right now:
-1- recompile systemd, kdbus-bus and glib from kdbus-integration
branch
-2- add following to %post section in .ks (or use attached one
for ivi):
find /usr/lib/udev/rules.d/ /etc/udev/rules.d/ -type f -name
'*.rules' -print0 | xargs -0 sed -i -e 's,SMACK=,SECLABEL{smack}=,g'
-3- add repo to recompiled packages and use mic(8) as always
I have tested ivi-586 version in qemu and it boots to login
prompt. DBus services do fail so it's not yet something that
one would like to try out. It's starting point in which we
can start looking for and fixing major problems (plenty of
these).
4. Open questions
=================
- fine grained (per interface/method) access control - this has been
hot topic in recent kdbus debate and it seems that upstream wants
everyone to use polkit for such type of functionality
- [add here if you have any]
5. Further discussion
=====================
kdbus fate in Tizen 3.0 has not yet been determined. It requires
a lot of work, but it seems that its inclusion won't be very
problematic (with systemd upgrade being major part of it).
Hopefully, we should be able to include (but possibly not enable
by default) all of required components before Tizen 3 freeze happens.
- FOSDEM 2014 & systemd hackfest
I, Lukasz Skalski of glib-kdbus, Jacek Janczyk and Radek Pajak
of libdbus-kdbus, Rafal Krypa from Security team will be attending
FOSDEM this year so there will be great opportunity to talk.
Please let us know if you are going too and would like discuss
kdbus/system/security/tizen/platform-developent/linux/emacs/etc.
issues.
(I and Lukasz also hope to join systemd hackfest two days before
FOSDEM)
Cheers,
Karol
# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel
--compress-disk-image=bz2 --generate-bmap -*-mic2-options-*-
#
# Do not Edit! Generated by:
# kickstarter.py
#
lang en_US.UTF-8
keyboard us
timezone --utc America/Los_Angeles
part /boot --size 64 --ondisk sdb --fstype=ext4 --label boot --active --align
1024
part / --size 3748 --ondisk sdb --fstype=ext4 --label platform --align 1024
rootpw tizen
xconfig --startxonboot
bootloader --timeout=5 --append="rootwait rootfstype=ext4 loglevel=7
console=ttyS0 kdbus" --ptable=gpt
desktop --autologinuser=tizen
user --name tizen --groups audio,video,weston-launch --password 'tizen'
installerfw_plugins "bootloader"
repo --name=overrides --baseurl=file:///CHANGE_THIS_TO_VALID_PATH/overrides
repo --name=ivi
--baseurl=https://download.tizen.org/snapshots/tizen/ivi/ivi/@BUILD_ID@/repos/ivi/ia32/packages/
--ssl_verify=no
%packages
@Base System
@IVI Adaptation
@IVI Packaging
@IVI Middleware
@Wayland
@Console Tools
@IVI Applications
kernel-x86-ivi
kdbus-bus
ivi-repos
setup-mbr-ivi
%end
%post
# base-general.post
ln -sf /proc/self/mounts /etc/mtab
rm -rf /root/.zypp
# rpm.post
rm -f /var/lib/rpm/__db*
rpmdb --rebuilddb
# Initialize the native application database
pkg_initdb
# Add 'app' user to the weston-launch group
/usr/sbin/groupmod -A app weston-launch
# Temporary work around for bug in filesystem package resulting in the 'app'
user home
# directory being only readable by root
chown -R app:app /opt/home/app
# Since weston-launch runs with the "User" label, the app
# home dir must have the same label
chsmack -a User /opt/home/app
# Enable a logind session for 'app' user on seat0 (the default seat for
# graphical sessions)
mkdir -p /usr/lib/systemd/system/graphical.target.wants
ln -s ../[email protected]
/usr/lib/systemd/system/graphical.target.wants/[email protected]
ln -sf weston.target /usr/lib/systemd/user/default.target
# Add over-riding environment to enable the web runtime to
# run on an IVI image as a different user then the tizen user
# Some notes on some of the variables:
# - ELM_THEME is needed in order for the wrt to have visible content
# - WRT_PROCESS_POOL_DISABLE is a work around for TIVI-2062
cat > /etc/sysconfig/wrt <<EOF
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket
XDG_RUNTIME_DIR=/run/user/5000
ELM_ENGINE=wayland_egl
ECORE_EVAS_ENGINE=wayland_egl
ELM_THEME=tizen-HD-light
WRT_PROCESS_POOL_DISABLE=1
EOF
# Use the same over-rides for the native prelaunch daemon
cp /etc/sysconfig/wrt /etc/sysconfig/launchpad
# Add a rule to ensure the app user has permissions to
# open the graphics device
cat > /etc/udev/rules.d/99-dri.rules <<EOF
SUBSYSTEM=="drm", MODE="0666"
EOF
# Needed to fix TIVI-1629
vconftool set -t int -f db/setting/default_memory/wap 0
find /usr/lib/udev/rules.d/ /etc/udev/rules.d/ -type f -name '*.rules' -print0
| xargs -0 sed -i -e 's,SMACK=,SECLABEL{smack}=,g'
# mbr.post
/usr/sbin/setup-mbr-ivi
%end
%post --nochroot
# buildname.nochroot
if [ -n "$IMG_NAME" ]; then
echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release
echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release
fi
%end
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev