Commit c0a534d8 authored by Florent Revest's avatar Florent Revest

Adds a 'ceres' user that now runs asteroid-launcher and timed-qt5

parent 84991184
inherit core-image
inherit extrausers
LICENSE = "GPL-2.0"
IMAGE_FEATURES += "splash package-management"
......@@ -8,4 +9,7 @@ base-files base-passwd shadow systemd tzdata coreutils bash file findutils gawk
connman bluez5 pulseaudio ppp dropbear qtbase-fonts qtbase-fonts-ttf-dejavu qtbase-plugins statefs dsme mce ngfd timed sensorfw android-init mapplauncherd-booster-qtcomponents \
asteroid-launcher asteroid-calculator asteroid-calendar asteroid-stopwatch"
EXTRA_USERS_PARAMS = "groupadd system; \
useradd -p '' -G 'video,system' ceres"
PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer010"
......@@ -20,7 +20,7 @@ DISTRO = "asteroid"
DISTRO_NAME = "Asteroid"
DISTRO_VERSION ?= "${DATE}-snapshot"
DISTRO_FEATURES = "wayland systemd alsa ipv4 bluetooth bluez5 splash package-management ${DISTRO_FEATURES_LIBC}"
DISTRO_FEATURES = "wayland systemd pam pulseaudio alsa ipv4 bluetooth bluez5 splash package-management ${DISTRO_FEATURES_LIBC}"
PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native"
......
[Unit]
Description=The lipstick UI
Description=The wayland compositors and desktop of AsteroidOS
Requires=dbus.socket
[Service]
......@@ -11,4 +11,4 @@ ExecStart=/usr/bin/lipstick $LIPSTICK_OPTIONS --systemd
Restart=always
[Install]
WantedBy=multi-user.target
WantedBy=default.target
EGL_PLATFORM=hwcomposer
XDG_RUNTIME_DIR=/tmp
LIPSTICK_OPTIONS="-plugin evdevtouch:/dev/input/event0 -platform hwcomposer"
......@@ -14,14 +14,13 @@ inherit qmake5
DEPENDS += "lipstick"
RDEPENDS_${PN} += "qtdeclarative-qmlplugins qtquickcontrols-qmlplugins qml-asteroid qtwayland-plugins qtgraphicaleffects-qmlplugins nemo-qml-plugin-time nemo-qml-plugin-contextkit nemo-qml-plugin-configuration libconnman-qt xkeyboard-config"
FILES_${PN} += "/usr/share/asteroid-launcher/ /lib/systemd/system"
FILES_${PN} += "/usr/share/asteroid-launcher/ /usr/lib/systemd/user/"
do_install_append() {
install -d ${D}/var/lib/environment/compositor/
cp ../default.conf ${D}/var/lib/environment/compositor/
# TODO: This should definitely be run as a simple user !!
install -d ${D}/lib/systemd/system/multi-user.target.wants/
cp ../asteroid-launcher.service ${D}/lib/systemd/system/
ln -s ../asteroid-launcher.service ${D}/lib/systemd/system/multi-user.target.wants/asteroid-launcher.service
install -d ${D}/usr/lib/systemd/user/default.target.wants/
cp ../asteroid-launcher.service ${D}/usr/lib/systemd/user/
ln -s ../asteroid-launcher.service ${D}/usr/lib/systemd/user/default.target.wants/asteroid-launcher.service
}
ACTION=="add", KERNEL=="ion", MODE="0664", GROUP="video"
ACTION=="add", KERNEL=="kgsl-3d0", MODE="0664", GROUP="video"
# Taken from https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/
# lxc-android-config/saucy/view/head:/lib/udev/rules.d/65-android.rules
# (c) 2013 Canonical LTD.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the applicable version of the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# logging devices
ACTION=="add", KERNEL=="log_*", MODE="0666"
ACTION=="add", KERNEL=="log_main", SYMLINK+="alog/main"
ACTION=="add", KERNEL=="log_system", SYMLINK+="alog/system"
ACTION=="add", KERNEL=="log_radio", SYMLINK+="alog/radio"
ACTION=="add", KERNEL=="log_events", SYMLINK+="alog/events"
# system devices
ACTION=="add", KERNEL=="binder", MODE="0666"
# graphics devices
SUBSYSTEM=="graphics", KERNEL=="*", SYMLINK+="graphics/%k"
# input devices
ACTION=="add", KERNEL=="event[0-9]*", GROUP="system", MODE="0660"
# misc devices
ACTION=="add", KERNEL=="alarm", GROUP="system", MODE="0664"
ACTION=="add", KERNEL=="uhid", GROUP="system", MODE="0660"
# memory
ACTION=="add", KERNEL=="ashmem", GROUP="system", MODE="0666"
# rfkill
ACTION=="add", KERNEL=="rfkill", GROUP="system", MODE="0660"
[Service]
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket
[Unit]
Description=D-Bus Message Bus
Requires=dbus.socket
[Service]
ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
[Unit]
Description=D-Bus Message Bus Socket
Before=sockets.target
[Socket]
ListenStream=%t/dbus/user_bus_socket
[Install]
WantedBy=default.target
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = "file://50-video.rules \
file://65-android.rules \
file://dbus.service \
file://dbus.socket \
file://dbus.conf"
do_install_append() {
# Setup udev rules for the rights of Android and graphic cards specific devices
install -m 0644 ${WORKDIR}/50-video.rules ${D}${sysconfdir}/udev/rules.d/50-video.rules
install -m 0644 ${WORKDIR}/65-android.rules ${D}${sysconfdir}/udev/rules.d/65-android.rules
# Enables auto-login for ceres
sed -i "s@agetty --noclear @agetty --autologin ceres @" ${D}/lib/systemd/system/getty@.service
# In current systemd versions we have to take care ourselves of the dbus user service, it should be handled in the next versions
install -d ${D}/usr/lib/systemd/user/default.target.wants/
install -m 0644 ${WORKDIR}/dbus.socket ${D}/usr/lib/systemd/user/dbus.socket
install -m 0644 ${WORKDIR}/dbus.service ${D}/usr/lib/systemd/user/dbus.service
ln -s ../dbus.socket ${D}/usr/lib/systemd/user/default.target.wants/dbus.socket
ln -s ../dbus.service ${D}/usr/lib/systemd/user/default.target.wants/dbus.service
install -d ${D}/etc/systemd/system/user@.service.d/
install -m 0644 ${WORKDIR}/dbus.conf ${D}/etc/systemd/system/user@.service.d/dbus.conf
}
PACKAGECONFIG_append += "pam"
......@@ -11,4 +11,4 @@ ExecStart=/usr/bin/lipstick $LIPSTICK_OPTIONS --systemd
Restart=always
[Install]
WantedBy=multi-user.target
WantedBy=default.target
......@@ -20,8 +20,7 @@ do_install_append() {
install -d ${D}/var/lib/environment/compositor/
cp ../default.conf ${D}/var/lib/environment/compositor/
# TODO: This should definitely be run as a simple user !!
install -d ${D}/lib/systemd/system/multi-user.target.wants/
cp ../lipstick.service ${D}/lib/systemd/system/
ln -s ../lipstick.service ${D}/lib/systemd/system/multi-user.target.wants/lipstick.service
install -d ${D}/usr/lib/systemd/user/default.target.wants/
cp ../lipstick.service ${D}/usr/lib/systemd/user/
ln -s ../lipstick.service ${D}/usr/lib/systemd/user/default.target.wants/lipstick.service
}
......@@ -17,5 +17,10 @@ do_configure_prepend() {
sed -i "s@LIBS += -lapplauncherd@LIBS += -lapplauncherd -lmdeclarativecache5@" ${S}/booster-qtcomponents.pro
}
do_install_append() {
install -d ${D}/usr/lib/systemd/user/default.target.wants/
# ln -s ../booster-qtcomponents-qt5.service ${D}/usr/lib/systemd/user/default.target.wants/booster-qtcomponents-qt5.service
}
FILES_${PN} += "/usr/libexec/mapplauncherd/ /usr/lib/systemd/user /usr/share/booster-qtcomponents-qt5"
FILES_${PN}-dbg += "/usr/libexec/mapplauncherd/.debug"
......@@ -16,5 +16,11 @@ do_configure_prepend() {
sed -i "s@INCLUDEPATH += /usr/include/applauncherd@INCLUDEPATH += ${STAGING_INCDIR}/applauncherd@" ${S}/qtbooster/qtbooster.pro
}
do_install_append() {
install -d ${D}/usr/lib/systemd/user/default.target.wants/
# ln -s ../booster-qt5.service ${D}/usr/lib/systemd/user/default.target.wants/booster-qt5.service
# ln -s ../booster-qt5-signal.service ${D}/usr/lib/systemd/user/default.target.wants/booster-qt5-signal.service
}
FILES_${PN} += "/usr/share/mkspecs/features /usr/lib/systemd/user /usr/libexec/mapplauncherd"
FILES_${PN}-dbg += "/usr/libexec/mapplauncherd/.debug"
......@@ -19,5 +19,10 @@ do_configure_prepend() {
sed -i 's@lsystemd-daemon@lsystemd@' ${S}/src/launcherlib/CMakeLists.txt
}
FILES_${PN} += "/usr/lib/systemd /usr/libexec/mapplauncherd/"
do_install_append() {
install -d ${D}/usr/lib/systemd/user/default.target.wants/
# ln -s ../booster-generic.service ${D}/usr/lib/systemd/user/default.target.wants/booster-generic.service
}
FILES_${PN} += "/usr/lib/systemd/user /usr/libexec/mapplauncherd/"
FILES_${PN}-dbg += "/usr/libexec/mapplauncherd/.debug"
......@@ -17,16 +17,16 @@ B = "${S}"
do_configure_prepend() {
mkdir -p src/h/timed-qt5/
cp src/lib/qmacro.h src/h/timed-qt5/qmacro.h
sed -i "s@<policy user=\"nemo\">@<policy user=\"root\">@" src/server/timed-qt5.conf src/server/timed.conf tests/ut_networktime/fakeofono/org.fakeofono.conf
sed -i "s@<policy user=\"nemo\">@<policy user=\"ceres\">@" src/server/timed-qt5.conf src/server/timed.conf tests/ut_networktime/fakeofono/org.fakeofono.conf
}
do_install_append() {
install -d ${D}/lib/systemd/system/
mv ${D}/usr/lib/systemd/user/timed-qt5.service ${D}/lib/systemd/system/timed-qt5.service
install -d ${D}/usr/lib/systemd/user/default.target.wants/
ln -s ../timed-qt5.service ${D}/usr/lib/systemd/user/default.target.wants/timed-qt5.service
}
DEPENDS += "pcre systemd tzdata libiodata-native libiodata statefs-qt qtbase"
FILES_${PN} += "/usr/lib/ /usr/share/contextkit /lib/"
FILES_${PN} += "/usr/lib/ /usr/share/contextkit"
FILES_${PN}-dev += "/usr/share/mkspecs"
FILES_${PN}-dbg += "/opt"
INSANE_SKIP_${PN} += "dev-deps"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment