When using yocto/bitbake, what's a correct way to install files in directories generated by a different recipe without conflicts?

Viewed 309

In my system quite a few recipes are set to use monit and so need to install files in the /etc/monit.d directory - doing that by having

install -d ${D}${sysconfdir}/monit.d
install -m 0644 ${WORKDIR}/file_to_install.monit ${D}${sysconfdir}/monit.d/file_to_install.monit

in their do_install(). This however makes bitbake complain that "file /etc/monit.d conflicts between attempted installs of" my recipe and monit.

Monit is already set as a dependency of my recipe so I'd imagine that it would be taken as the one with higher priority, but it doesn't. What is the correct way to do this then?

1 Answers

The problem is due to different permissions of those folders. The monit_5.2 recipe uses permissions set to 700 . Default install permissions when not using -m is 755

install -m 700 -d ${D}${sysconfdir}/monit.d
install -m 0644 ${WORKDIR}/file_to_install.monit ${D}${sysconfdir}/monit.d/file_to_install.monit
Related