I am using syslog-ng from meta-oe: https://layers.openembedded.org/layerindex/recipe/1030/. I have set my bblayers file accordingly. To include syslog-ng in my root image, I add a change to my build/conf/local.conf file:
CORE_IMAGE_EXTRA_INSTALL += "syslog-ng"
To build my image, I do: bitbake core-image-full-cmdline
But, I get the following error:
The following packages have unmet dependencies:
pacakgegroup-core-full-cmdline : Depends: packagegroup-core-full-cmdline-initscripts but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I get the same error if I replace CORE_IMAGE_EXTRA_INSTALL with:
IMAGE_INSTALL_append = "syslog-ng"
By default, yocto uses syslogd if an alternative is not provided. This link https://lists.yoctoproject.org/pipermail/yocto/2018-March/040327.html posts similar kind of error. Considering that and the case with syslogkg, I made the following changes to my local.conf file:
PACKAGE_CLASSES ?= "package_rpm"
VIRTUAL-RUNTIME_syslog = "syslog-ng"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
I have not properly tested these changes with package_deb. But, the above configuration does the work.