Skip to content

Commit

Permalink
webos-initscripts=90 com.webos.service.mediaindexer=25 systemd=webos12
Browse files Browse the repository at this point in the history
umediaserver=r24

:Release Notes:
Update user and supplementary group for supporting non-root media services
Change users/group of media services to non-root.

:Detailed Notes:
webos-initscripts: submissions/89...submissions/90
d20b97c Add user and group for com.webos.service.mediaindexer service
66f1fb8 Add user and group for com.webos.service.mediacontroller service
e25beaa Add user and group for umediaserver service

base-passwd:
user and supplementary group are updated for non-root media services

com.webos.service.mediaindexer: submissions/24...submissions/25
a397577 Add user and group for com.webos.service.mediaindexer service

systemd:
Ownership change to "media" for media services related directories.
Permission change to "770" for media services related directories.

umediaserver:
Create "ums" directory under "/var/lib" with user/group as "media"
and permission as "755"

:Testing Performed:
Please check CCC ticket [WRP-15930] for details.

:QA Notes:
N/A

:Issues Addressed:
[WRP-15930] CCC: webos-initscripts=90 com.webos.service.mediaindexer=25
            systemd=webos12 umediaserver=r24
[WRP-12973] Transition of umediaserver service from root to non-root
[WRP-12163] Transition of com.webos.service.mediacontroller
            service from root to non-root
[WRP-12572] Transition of com.webos.service.mediaindexer from root to non-root

Cherry-picked-from-commit: 34d694b
Cherry-picked-from-branch:
  • Loading branch information
gaurav.mahajan authored and jaekyu-lee committed Jun 20, 2023
1 parent 40f9309 commit 7a025e9
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
3 changes: 2 additions & 1 deletion meta-webos/recipes-core/base-passwd/base-passwd/group.master
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ dbus:x:81:dbus
netdev:x:82:system,network,bluetooth,wifi
users:x:100:sync
developer:x:504:developer,dev-func
compositor:x:505:wam,graphics
compositor:x:505:wam,graphics,media
pulse-access:x:506:root,wam,system
pulse:x:507:pulse
se:x:509:root,wam,system
media:x:1013:media
nogroup:x:65534:nobody,sshd
blemesh:x:2024:
system:x:1016:system
2 changes: 1 addition & 1 deletion meta-webos/recipes-core/initscripts/webos-initscripts.bb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_init_manager} ${VIRTUAL-RUNTIME_bash} python
PROVIDES = "initscripts"
RPROVIDES:${PN} = "initscripts initd-functions"

WEBOS_VERSION = "3.0.0-88_01e210ac1e41ae93cd272303a0a187f1962d51ee"
WEBOS_VERSION = "3.0.0-90_93b17f7a5816f0748e4901d55fbdcd7ff8d79e4c"
PR = "r17"

inherit webos_component
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From d1f67a98b65c3899ada48b6768803316e7673668 Mon Sep 17 00:00:00 2001
From: "gaurav.mahajan" <[email protected]>
Date: Mon, 22 May 2023 15:47:15 +0530
Subject: [PATCH] Change ownership of media directory to support non-root media
services

Make user and group of "/media" directory as "media" so that
"/media" directory will be accessed by non-root media services

Upstream-Status: Inappropriate [webOS specific]
---
tmpfiles.d/systemd.conf.in | 1 +
1 file changed, 1 insertion(+)

diff --git a/tmpfiles.d/systemd.conf.in b/tmpfiles.d/systemd.conf.in
index 9b2357cd31..63bcaa5ac1 100644
--- a/tmpfiles.d/systemd.conf.in
+++ b/tmpfiles.d/systemd.conf.in
@@ -70,3 +70,4 @@ d /var/lib/systemd/coredump 0755 root root 3d
d /var/lib/private 0700 root root -
d /var/log/private 0700 root root -
d /var/cache/private 0700 root root -
+d /media 0770 media media -
3 changes: 2 additions & 1 deletion meta-webos/recipes-core/systemd/systemd_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2017-2023 LG Electronics, Inc.

EXTENDPRAUTO:append = "webos11"
EXTENDPRAUTO:append = "webos12"
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"

SRC_URI:append:webos = " \
Expand All @@ -9,6 +9,7 @@ SRC_URI:append:webos = " \
file://0003-systemd-oomd-modify-oomd.conf.patch \
file://0004-oomd-to-some.patch \
file://0005-oomd-change-duration.patch \
file://0006-Changes-for-non-root-media-services.patch \
"

inherit webos_prerelease_dep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = " \
file://oss-pkg-info.yaml;md5=2bdfe040dcf81b4038370ae96036c519 \
"

WEBOS_VERSION = "1.0.0-24_b721a6221df8a8c708ffac5eb1457240f85eb150"
WEBOS_VERSION = "1.0.0-25_41eadb20de0db9950251567680e83f4d218d9110"
PR = "r10"

inherit webos_component
Expand Down
6 changes: 5 additions & 1 deletion meta-webos/recipes-webos/umediaserver/umediaserver.bb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base"
DEPENDS += "${@'' if '${WEBOS_DISTRO_PRERELEASE}' == '' else 'pmtrace'}"
RDEPENDS:${PN} = "umediaserver-configs"

PR = "r23"
PR = "r24"

inherit webos_component
inherit webos_enhanced_submissions
Expand Down Expand Up @@ -58,3 +58,7 @@ FILES:${PN}-python = "${libdir}/${PYTHON_DIR}/site-packages/uMediaServer/* ${dat
# Use append, because umediaserver-clang uses:
# PACKAGECONFIG += "${@bb.utils.contains('USE_WEBRUNTIME_LIBCXX', '1', 'webruntime-libcxx', 'system-libcxx', d)}"
PACKAGECONFIG:append:qemuall = " com.webos.service.videooutput"

do_install:append:webos() {
install -m 755 -o media -g media -v -d ${D}${webos_execstatedir}/ums
}

0 comments on commit 7a025e9

Please sign in to comment.