I wrote a Yocto recipe which installs my custom script to /usr/share/mender/identity/mender-device-identity, however it conflicts with the mender recipe which also installs /usr/share/mender/identity/mender-device-identity.
Error: Transaction check error:
file /usr/share/mender/identity/mender-device-identity conflicts between attempted installs of mender-device-identity-1.0-r0.arm1176jzfshf_vfp and mender-1.7.0-r0.arm1176jzfshf_vfp
What’s the recommend method for installing a custom mender-device-identity script when using Mender with Yocto?
I have been struggling with this problem. I am not a Yocto expert, but I followed the instructions to install a custom mender.conf file by putting it in the recipes-mender/mender/files directory and also creating the mender_%.bbappend file with the contents. I tried doing the same with the mender-device-identity script, but to no avail.
I put both mender.conf and mender-device-identity in the mender/files directory. Here’s the current contents of mender_%.bbappend.
After I build, I see that my custom mender.conf is located in /etc/mender but my custom identity script does not show up in /usr/share/mender/identity, only the default script…
I also noticed that the custom mender.conf file I provided is changed before it makes it to /etc/mender/mender.conf in the rootfs. The file I provide is:
So my UpdatePollIntervalSeconds and ServerURL were switched back to default values, but my ServerCertificate is correct. What do I need to do to prevent switching back to default values?
I am using client v.1.3.0 and Yocto on an orange pi PC plus.
I found I can get the right mender.conf generated if I delete the URL line in my custom file and instead add the MENDER_SERVER_URL to the local.conf. That way it picks up both the cert and the URL.
I have had some more difficulty with mender-device-identity, though. I have suddenly begun seeing the following error:
| install: cannot stat '/home/zac/gateway_yoctodev/yocto/build-h2o/tmp-glibc/work/cortexa7hf-neon-vfpv4-oe-linux-gnueabi/mender/1.3.0-r0/mender-device-identity': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install (log file is located at /home/zac/gateway_yoctodev/yocto/build-h2o/tmp-glibc/work/cortexa7hf-neon-vfpv4-oe-linux-gnueabi/mender/1.3.0-r0/temp/log.do_install.4998)
ERROR: Task (/home/zac/gateway_yoctodev/yocto/meta-mender/meta-mender-core/recipes-mender/mender/mender_1.3.0.bb:do_install) failed with exit code '1'