* [meta-selinux][PATCH] systemd: create /var/lib/systemd/backlight in advance
@ 2018-04-19 7:15 wenzong.fan
2018-04-19 14:05 ` akuster808
0 siblings, 1 reply; 3+ messages in thread
From: wenzong.fan @ 2018-04-19 7:15 UTC (permalink / raw)
To: yocto
From: Wenzong Fan <wenzong.fan@windriver.com>
The systemd-backlight@.service which called after selinux-init.service
will create /var/lib/systemd/backlight with incorrect security labels,
this causes the systemd-backlight service fails to start and stop.
Creating /var/lib/systemd/backlight in advance to make sure it could
always be relabelled by selinux-init while first booting.
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
recipes-core/systemd/systemd_%.bbappend | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index 5ac3adb..b17e70a 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -1 +1,7 @@
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)}
+
+do_install_append() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then
+ install -d ${D}${localstatedir}/lib/systemd/backlight
+ fi
+}
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-selinux][PATCH] systemd: create /var/lib/systemd/backlight in advance
2018-04-19 7:15 [meta-selinux][PATCH] systemd: create /var/lib/systemd/backlight in advance wenzong.fan
@ 2018-04-19 14:05 ` akuster808
2018-04-20 1:50 ` wenzong fan
0 siblings, 1 reply; 3+ messages in thread
From: akuster808 @ 2018-04-19 14:05 UTC (permalink / raw)
To: wenzong.fan, yocto
On 04/19/2018 12:15 AM, wenzong.fan@windriver.com wrote:
> From: Wenzong Fan <wenzong.fan@windriver.com>
>
> The systemd-backlight@.service which called after selinux-init.service
> will create /var/lib/systemd/backlight with incorrect security labels,
> this causes the systemd-backlight service fails to start and stop.
>
> Creating /var/lib/systemd/backlight in advance to make sure it could
> always be relabelled by selinux-init while first booting.
>
> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
> ---
> recipes-core/systemd/systemd_%.bbappend | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
> index 5ac3adb..b17e70a 100644
> --- a/recipes-core/systemd/systemd_%.bbappend
> +++ b/recipes-core/systemd/systemd_%.bbappend
> @@ -1 +1,7 @@
> inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)}
> +
> +do_install_append() {
> + if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then
> + install -d ${D}${localstatedir}/lib/systemd/backlight
> + fi
> +}
Wont this affect the hash when running the yocto-check-layer ??
See
http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/commit/?id=4fefe83c3203c11fadbe43637a3058284b60427b
for examples.
- armin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-selinux][PATCH] systemd: create /var/lib/systemd/backlight in advance
2018-04-19 14:05 ` akuster808
@ 2018-04-20 1:50 ` wenzong fan
0 siblings, 0 replies; 3+ messages in thread
From: wenzong fan @ 2018-04-20 1:50 UTC (permalink / raw)
To: akuster808, yocto
On 04/19/2018 10:05 PM, akuster808 wrote:
>
>
> On 04/19/2018 12:15 AM, wenzong.fan@windriver.com wrote:
>> From: Wenzong Fan <wenzong.fan@windriver.com>
>>
>> The systemd-backlight@.service which called after selinux-init.service
>> will create /var/lib/systemd/backlight with incorrect security labels,
>> this causes the systemd-backlight service fails to start and stop.
>>
>> Creating /var/lib/systemd/backlight in advance to make sure it could
>> always be relabelled by selinux-init while first booting.
>>
>> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
>> ---
>> recipes-core/systemd/systemd_%.bbappend | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
>> index 5ac3adb..b17e70a 100644
>> --- a/recipes-core/systemd/systemd_%.bbappend
>> +++ b/recipes-core/systemd/systemd_%.bbappend
>> @@ -1 +1,7 @@
>> inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)}
>> +
>> +do_install_append() {
>> + if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then
>> + install -d ${D}${localstatedir}/lib/systemd/backlight
>> + fi
>> +}
> Wont this affect the hash when running the yocto-check-layer ??
>
> See
> http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/commit/?id=4fefe83c3203c11fadbe43637a3058284b60427b
> for examples.
Oops, I'll refresh the patch and send V2.
Thanks
Wenzong
>
> - armin
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-20 1:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 7:15 [meta-selinux][PATCH] systemd: create /var/lib/systemd/backlight in advance wenzong.fan
2018-04-19 14:05 ` akuster808
2018-04-20 1:50 ` wenzong fan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.