[OE-core] systemd service vs. update-alternatives (was rsyslog: buggy systemd/ua handling?)

Steffen Sledz sledz at dresearch-fe.de
Thu Nov 19 14:34:12 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18.11.2015 17:14, Steffen Sledz wrote:
> On 17.11.2015 09:08, Steffen Sledz wrote:
>> On 16.11.2015 12:28, Steffen Sledz wrote:
>>> I'm not sure but i believe there's a bug in the systemd/ua-handling in meta-oe/recipes-extended/rsyslog/rsyslog_7.6.1.bb.
>>> 
>>> In my opinion this code
>>> 
>>> if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): pn = d.getVar('PN', True) d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service') d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir', True))) d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/rsyslog.service' % (d.getVar('systemd_unitdir', True)))
>>> 
>>> registers the systemd service file under the (ua-)name "syslog-service". So it should not be
>>> 
>>> SYSTEMD_SERVICE_${PN} = "${BPN}.service"
>>> 
>>> but
>>> 
>>> SYSTEMD_SERVICE_${PN} = "syslog.service"
>>> 
>>> Right?
>> 
>> Hi experts! Is my assumption correct? If yes i would prepare patches for master, fido and jethro.

The problem seems to be much more complex then I thought before. :(

The systemd integration for busybox-syslog was introduced by commit cf3618f9a57e46fb78d5be35d473e2dd5290e961.

The do_install stage got among others this line:

  ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service

I believe this was made to avoid a package error like this:

  ERROR: Function failed: SYSTEMD_SERVICE_busybox-syslog value syslog.service does not exist

But if another syslog alternative (rsyslog or syslog-ng) will do the same this leads to another error:

  ERROR: The recipe busybox is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
   /home/sledz/work/hipos-dfe.fido/build-closed/tmp-glibc/sysroots/himx0294/lib/systemd/system/syslog.service

So what is th right way to bring a systemd service file and update-alternatives together???

- -- 
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:sledz at dresearch-fe.de
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJWTd3kAAoJEIz5slJ1krPh0f4QAIoQcwiyYs1l1lCCFhg96xry
5wFMCFDdtCCPerpLBPHh0nLcqB5z0JKV9wCfuZu2QBZbh49s/0Qg4F09yN7qT2Bb
auP3yEVIZrekuVIpQYkXOTI5q+1DrC4QCGMFfm7XaJZiqdOBaP9t1xWMQxzA5W3M
OyQCH3JDABkD9UJQbsYLs1Qq6jm1rzbD1ZO5Uv0JvZaW+ZyHvDUHN7M+nlCxWFKE
HPTtri1trgg9iZYZgTG0y2WferO5Unug5TKrFMSLiKv8iwOGha2O45m9nsFWCzZL
vQ+6z1mnL9syVy6kmOakmc2Q+RnSC6Zx2Y3GbPuUMGtn4Y3neole6YaMJ0Yl+Uk7
nn49/f7qxAD6sYJu7YaD0oBbEj/ugKbtFzKcwWjAe365h21Cndt2NkhELr1xUk7/
owwVD60mmPHGCQ6ugT6wSnmLAVO4P5td5HLuDKWIDV2Smtm3XAQ2MQ52vFzr53sh
dyUq3e5J9zuDbYWmC5xRvv77H7R6eUCltkGNHg5JjkbqtUw4NQWteaHTUpM7KlI1
23w0nDU1xACpJDs+TgMzNyo7c+0b0g0SKjw07Qo7aIdNJuHoeik+hJIewMU7KDdl
BjHy1PIFqXdSPR3myMOMOXlDCYJLJSy19roOr067LSiwXSEwycj93AsqMNzaGSWS
8o0HjDbiMarMi2aXCyCH
=4bav
-----END PGP SIGNATURE-----



More information about the Openembedded-core mailing list