<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/systemd.bbclass, branch uninative-1.9</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.9</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-1.9'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2017-12-10T22:45:18+00:00</updated>
<entry>
<title>systemd: allow dots in arguments to template units</title>
<updated>2017-12-10T22:45:18+00:00</updated>
<author>
<name>Martin Hundebøll</name>
<email>mnhu@prevas.dk</email>
</author>
<published>2017-11-23T12:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8592a02f49d91fa35d7217545a5f73a6fc7dc222'/>
<id>urn:sha1:8592a02f49d91fa35d7217545a5f73a6fc7dc222</id>
<content type='text'>
When installing systemd template units with an argument, the current code
removes characters between the '@' and the '.' from service names in
SYSTEMD_SERVICE_${PN}, e.g.:

  getty@tty1.service -&gt; getty@.service

This fails for services with dots in the argument (which is perfectly
legal in systemd), since the code searches only until the first dot.
E.g.:

  vlan@eth0.1.service -&gt; vlan@1.service

This is obviously wrong, and fails in systemd_populate_packages(), where
it fails to find the unit file.

Fix this by reworking the removal of the argument part of the service
name, so that parts before '@' and after teh last '.' are used as base
name.

(From OE-Core rev: 4704bd91458a728f28cbdc57dcf78f5d04cfd0cd)

Signed-off-by: Martin Hundebøll &lt;mnhu@prevas.dk&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes: Drop now unneeded update_data calls</title>
<updated>2017-02-15T17:29:55+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-02-09T17:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bfd0a39bdf13f6953810bf868022a871d2a20b6d'/>
<id>urn:sha1:bfd0a39bdf13f6953810bf868022a871d2a20b6d</id>
<content type='text'>
Now that the datastore works dynamically we don't need the update_data calls
so we can just remove them. They're not actually done anything at all for
a while.

(From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>systemd: Add PACKAGE_WRITE_DEPS for postinst</title>
<updated>2017-01-20T11:53:50+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-01-19T17:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=94a648f9f5af6edb0a6a75259eebeacc8c028c4d'/>
<id>urn:sha1:94a648f9f5af6edb0a6a75259eebeacc8c028c4d</id>
<content type='text'>
The postinstall needs systemd-systemctl-native, mark the dependency

(From OE-Core rev: d2fb76e4aed927e9900de2e87e7e1b792bc88651)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta/scripts: Various getVar/getVarFlag expansion parameter fixes</title>
<updated>2017-01-09T13:39:11+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-01-05T21:15:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=022a8b58c862a1db68c2dcddc908317e5d61d92e'/>
<id>urn:sha1:022a8b58c862a1db68c2dcddc908317e5d61d92e</id>
<content type='text'>
There were a few straggling expansion parameter removals left for
getVar/getVarFlag where the odd whitespace meant they were missed
on previous passes. There were also some plain broken ussages such
as:

d.getVar('ALTERNATIVE_TARGET', old_name, True)
path = d.getVar('PATH', d, True)
d.getVar('IMAGE_ROOTFS', 'True')

which I've corrected (they happend to work by luck).

(From OE-Core rev: 688f7a64917a5ce5cbe12f8e5da4d47e265d240f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta: remove True option to getVar calls</title>
<updated>2016-12-16T10:23:23+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-12-14T21:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c4e2c59088765d1f1de7ec57cde91980f887c2ff'/>
<id>urn:sha1:c4e2c59088765d1f1de7ec57cde91980f887c2ff</id>
<content type='text'>
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>systemd.bbclass: don't block on service restart</title>
<updated>2016-11-30T15:48:08+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2016-11-25T04:17:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2965ccfcdb5a5aefb94e6ec8e24832471f47239f'/>
<id>urn:sha1:2965ccfcdb5a5aefb94e6ec8e24832471f47239f</id>
<content type='text'>
The current class works fine when a recipe uses SYSTEMD_AUTO_ENABLE
'enable' and has no on device pkg_postinst(), ie when the postinst is
run as part of rootfs creation.  However, when there is a component of
pkg_postinst() that is run on device the 'systemctl restart' is run as
part of the run_postinsts.service at boot. This results in the boot
spinning indefinitely with:

[ *** ] A start job is running for Run pending postinsts (7s / no limit)

The issue could potentially be that the packages service has an
'After' clause which comes later in the boot, beyond
run_postinsts.service, creating a chicken before the egg
scenario. Even service files without an 'After' clause cause this
situation however. Despite this not being the cause of the issue this
fix will prevent this scenario from happenning.

Using strace we are able to find that during boot, when
run_postinsts.service is running attempting to start or restart any
service will result in the call get stuck on poll(). Since the
run_postinsts.service does not monitor the outcome of the call to
restart we can work around this by using '--no-block'.

(From OE-Core rev: 6ad6a0084a73088fc2a27ab9958e5c46d6e094fc)

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>systemd: Reload configuration on package install</title>
<updated>2016-11-23T11:10:12+00:00</updated>
<author>
<name>Linus Wallgren</name>
<email>linus.wallgren@scypho.com</email>
</author>
<published>2016-10-28T14:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=69a8784b7922f6d7bca3c462d61f8c8c289a0526'/>
<id>urn:sha1:69a8784b7922f6d7bca3c462d61f8c8c289a0526</id>
<content type='text'>
When a systemd service file has changed it is required to reload
systemd's configuration. Otherwise changes to a service file will not be
picked up during package upgrade.

(From OE-Core rev: 94efe6d1d7893e241bcf98eff80ac8d8fbf2e885)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>systemd.bbclass: Use bb.fatal() instead of raising FuncFailed</title>
<updated>2016-10-04T15:29:04+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2016-10-01T02:47:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=823acf80373852cbc5a26807165ffbcc397b0a3d'/>
<id>urn:sha1:823acf80373852cbc5a26807165ffbcc397b0a3d</id>
<content type='text'>
This sets a good example and avoids unnecessarily contributing to
perceived complexity and cargo culting.

Motivating quote below:

&lt; kergoth&gt; the *original* intent was for the function/task to error via
           whatever appropriate means, bb.fatal, whatever, and
           funcfailed was what you'd catch if you were calling
           exec_func/exec_task. that is, it's what those functions
           raise, not what metadata functions should be raising
&lt; kergoth&gt; it didn't end up being used that way
&lt; kergoth&gt; but there's really never a reason to raise it yourself

FuncFailed.__init__ takes a 'name' argument rather than a 'msg'
argument, which also shows that the original purpose got lost.

(From OE-Core rev: 8e956d66087b9c41591b8e4e817ed6c9e42f5981)

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>systemd.bbclass: Allow enabling of parameterised services</title>
<updated>2015-12-09T08:48:24+00:00</updated>
<author>
<name>Bob Ham</name>
<email>bob.ham@collabora.com</email>
</author>
<published>2015-11-19T11:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7cf7156b2c3413e90dc1d322c32620a8cab72fc6'/>
<id>urn:sha1:7cf7156b2c3413e90dc1d322c32620a8cab72fc6</id>
<content type='text'>
Currently the systemd.class will check whether a service exists when it is
requested to enabled it.  However, its check does not take into account that a
service like 'foo@eth0.service' can be enabled from a service named
'foo@.service'.  This patch alters the check function in systemd.class to look
for 'foo@.service' if the normal check fails.

(From OE-Core rev: 4ce15271dad3520e5de2500c609b05d5a511e453)

Signed-off-by: Bob Ham &lt;bob.ham@collabora.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>systemd.bbclass: Use systemd_system_unitdir</title>
<updated>2015-08-10T19:40:29+00:00</updated>
<author>
<name>Pau Espin Pedrol</name>
<email>pau.espin@aweurope.be</email>
</author>
<published>2015-07-30T11:33:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3255d0042e8440f044212b3110d5528f8a355362'/>
<id>urn:sha1:3255d0042e8440f044212b3110d5528f8a355362</id>
<content type='text'>
(From OE-Core rev: 0cd61456c0ae912b9fa525db1b3c811e01349d27)

Signed-off-by: Pau Espin Pedrol &lt;pau.espin@aweurope.be&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
