diff --git a/classes/systemd-auto-enable-policy.bbclass b/classes/systemd-auto-enable-policy.bbclass new file mode 100644 index 00000000..18b1f3c9 --- /dev/null +++ b/classes/systemd-auto-enable-policy.bbclass @@ -0,0 +1,8 @@ +# Easily allow to disable specific systemd services at the distro level conf +python __anonymous() { + if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): + packages_to_disable = d.getVar('SYSTEMD_AUTOSTART_DISABLE') or '' + pn = d.getVar('PN') + if pn in packages_to_disable.split(): + d.setVar('SYSTEMD_AUTO_ENABLE:%s' % pn, 'disable') +} diff --git a/conf/distro/webkitdevci.conf b/conf/distro/webkitdevci.conf index 1f952c23..ee837151 100644 --- a/conf/distro/webkitdevci.conf +++ b/conf/distro/webkitdevci.conf @@ -48,5 +48,11 @@ PACKAGECONFIG:append:pn-php = " apache2" # Disable mysql support as we don't need to build mysql/mariadb PACKAGECONFIG:remove:pn-php = "mysql" +# Disable the following systemd services by default +# - Netdata: is only needed on the RPi4 bots and is manually enabled there (via deploy-webkit-buildbot-ews). +# - Apache2: the service is not needed for the tests, the layout test runner takes care of starting/stopping it. +INHERIT += "systemd-auto-enable-policy" +SYSTEMD_AUTOSTART_DISABLE = "netdata apache2" + # Whitelist license from some deps. LICENSE_FLAGS_ACCEPTED:append = " commercial synaptics-killswitch" diff --git a/dynamic-layers/webserver/recipes-core/images/webkit-dev-ci-tools.bbappend b/dynamic-layers/webserver/recipes-core/images/webkit-dev-ci-tools.bbappend index 205c0586..9cf85c8d 100644 --- a/dynamic-layers/webserver/recipes-core/images/webkit-dev-ci-tools.bbappend +++ b/dynamic-layers/webserver/recipes-core/images/webkit-dev-ci-tools.bbappend @@ -1,4 +1,5 @@ IMAGE_INSTALL:append = " \ apache2 \ apache2-scripts \ -" \ No newline at end of file + netdata \ +"