Commit 47b1909b authored by Florent Revest's avatar Florent Revest

Setup permissions so that timed can change time: includes changing the...

Setup permissions so that timed can change time: includes changing the connman's dbus allowing policy, adding a postinst script ran at boot to add CAP_SYS_TIME to timed-qt5 and add xattr to the DISTRO_FEATURES so that setcap is compiled
parent e28878c0
...@@ -20,7 +20,7 @@ DISTRO = "asteroid" ...@@ -20,7 +20,7 @@ DISTRO = "asteroid"
DISTRO_NAME = "Asteroid" DISTRO_NAME = "Asteroid"
DISTRO_VERSION ?= "${DATE}-snapshot" DISTRO_VERSION ?= "${DATE}-snapshot"
DISTRO_FEATURES = "wayland systemd pam pulseaudio alsa ipv4 bluetooth bluez5 splash package-management ${DISTRO_FEATURES_LIBC}" DISTRO_FEATURES = "wayland systemd pam pulseaudio alsa ipv4 bluetooth bluez5 splash package-management xattr usbhost usbgadget ${DISTRO_FEATURES_LIBC}"
PREFERRED_PROVIDER_jpeg = "libjpeg-turbo" PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native" PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native"
......
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow own="net.connman"/>
<allow send_destination="net.connman"/>
<allow send_interface="net.connman.Agent"/>
<allow send_interface="net.connman.Counter"/>
<allow send_interface="net.connman.Notification"/>
</policy>
<policy at_console="true">
<allow send_destination="net.connman"/>
</policy>
<policy context="default">
<deny send_destination="net.connman"/>
<allow send_interface="net.connman.Clock"/>
</policy>
</busconfig>
FILESEXTRAPATHS_prepend := "${THISDIR}/connman:" FILESEXTRAPATHS_prepend := "${THISDIR}/connman:"
SRC_URI += " file://settings " SRC_URI += "file://settings \
file://connman-dbus.conf"
do_install_append() { do_install_append() {
install -d ${D}/var/lib/connman/ install -d ${D}/var/lib/connman/
cp ${WORKDIR}/settings ${D}/var/lib/connman/settings cp ${WORKDIR}/settings ${D}/var/lib/connman/settings
install -d ${D}/etc/dbus-1/system.d/
cp ${WORKDIR}/connman-dbus.conf ${D}/etc/dbus-1/system.d/connman.conf
} }
...@@ -27,8 +27,17 @@ do_install_append() { ...@@ -27,8 +27,17 @@ do_install_append() {
ln -s /usr/share/zoneinfo/Etc/GMT ${D}/var/lib/timed/localtime ln -s /usr/share/zoneinfo/Etc/GMT ${D}/var/lib/timed/localtime
} }
pkg_postinst_${PN}() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
setcap cap_sys_time+ep /usr/bin/timed-qt5
else
exit 1
fi
}
DEPENDS += "pcre systemd tzdata libiodata-native libiodata statefs-qt qtbase tzdata-timed" DEPENDS += "pcre systemd tzdata libiodata-native libiodata statefs-qt qtbase tzdata-timed"
RDEPENDS_${PN} += "tzdata-timed" RDEPENDS_${PN} += "tzdata-timed libcap-bin"
FILES_${PN} += "/usr/lib/ /usr/share/contextkit" FILES_${PN} += "/usr/lib/ /usr/share/contextkit"
FILES_${PN}-dev += "/usr/share/mkspecs" FILES_${PN}-dev += "/usr/share/mkspecs"
FILES_${PN}-dbg += "/opt" FILES_${PN}-dbg += "/opt"
......
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