[OE-core] [PATCH 7/7] systemd: do not pre-enable services, rely on presets

Jonas Bonn jonas at norrbonn.se
Wed Jan 2 14:32:12 UTC 2019


Hi Alex,

On 02/01/2019 13:06, Alexander Kanavin wrote:
> On Mon, 31 Dec 2018 at 13:07, Jonas Bonn <jonas at norrbonn.se> wrote:
>> diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
>> index 70e687c92e..7b4c5c56aa 100644
>> --- a/meta/recipes-core/systemd/systemd_239.bb
>> +++ b/meta/recipes-core/systemd/systemd_239.bb
>> @@ -298,6 +298,8 @@ do_install() {
>>          # duplicate udevadm for postinst script
>>          install -d ${D}${libexecdir}
>>          ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
>> +
>> +       rm -rf ${D}${sysconfdir}/systemd/system
>>   }
> 
> Apologies, but this is a hack. You need to tell systemd to not install
> the files in the first place, if they are unneeded, instead of
> removing them after the fact, which is a maintainability issue
> (specifically, anyone looking at the recipe would be totally puzzled
> by this removal).
> 
> If systemd always installs the files, you should add a configure
> option, and send the patch upstream *first*.

Leaving these installed is not a big deal, either.  It's just inelegant 
to leave them there if one is over-mounting /etc with a tmpfs at runtime.

I think this patch is wrong for other reasons, however.  Since there are 
no SYSTEMD_SERVICE_ entries for these .service files in the recipe, they 
probably won't be handled correctly if the systemd package is 
upgraded... the implications are a bit fuzzy, whether or not it matters.

Thanks for looking at this.

/Jonas


> 
> Alex
> 


More information about the Openembedded-core mailing list