Mender-configure: Files installed but not shipped

Hello everybody,

I am currently struggling with a Yocto build error using the meta-mender layer. The error occurs while switching from my NAND flash build (which totally works fine) to an SD-Card build using my evaluation board by just adding the “-sd” tag for my machine. The error in detail:

Besides the error message, the provided log file does not provide any further information besides some debug output.

As far as I can see, this is a Yocto error message, indicating that some packages are not used in any produced output. Looking for the left-over packages, systems should be crucial to the system architecture.

Any thoughts about this?

Hmm, that package is not supposed to be installed with dunfell at all. This is a bug. Thanks, I’m in the process of updating dunfell and will take a look at this.

In the meantime, does it help if you revert to the dunfell-v2021.01 tag?

1 Like

Hi @kacf
Thanks for the quick reply. Switching to the tag fixed the problem, it built with no further errors, thanks for the help.
Is there an estimated date for a dunfell-adjusted release, where I could try this again?

No, but it should only be a matter of days. This is supposed be a monthly routine update. I will have to solve that problem you encountered first though.

One more question: I realize now that meta-mender/dunfell is at the same commit as the dunfell-v2021.01 tag. Are you sure you were not using meta-mender/master?

Honestly, I am not. In the forefield, I played along with several branches across my whole Yocto project. As a result, I could have used accidentally the master branch, yes. Thanks for letting me know.

Hehe, thanks for the honesty! :slight_smile:

I will treat this as a non-issue for now then. I can’t reproduce it, and can’t really see how it could happen unless master was checked out by mistake.

1 Like

I just double-checked it: you are totally right in both points:

  1. the mentioned tag points to the current dunfell branch
  2. my branch handling for the meta-mender repo was somehow messed-up
    Everything now works as expected. Sorry for creating this confusion and thanks for the support!

:balloon:

@kacf I also see this error with dunfell and am hoping this is related enough as this is where google searches end up.

I confirmed my meta-mender is at

meta-mender$ git status
HEAD detached at dunfell-v2023.02

mender-configure-demo and mender-configure-scripts are included because I’m still using demo code, so meta-mender-demo/recipes-core/packagegroups/packagegroup-core-boot.bbappend is RDEPENDING these recipes.

The issue I tracked down is that:

${libdir}/mender-configure/apply-device-config.d/mender-demo-raspberrypi-led \

produces the error in this thread with dunfell (but not kirkstone), meanwhile removing the ${libdir} and hardcoding:

/usr/lib/mender-configure/apply-device-config.d/mender-demo-raspberrypi-led \

Allows everything to build as expected.

Do you know an easy way to verify ${libdir} in mender-configure.inc ? My guess is that make install and the %{libdir} aren’t agreeing where the files should actually end up.

You can check the value of libdir by running bitbake -e core-image-minimal > output.log, and then search for libdir= in output.log. You can also look in poky/meta/conf/bitbake.conf if there another variable which looks more suitable.

Yes @kacf , I can confirm that the issue is this from the bitbake -e

export libdir="/usr/lib64"

Looks like it doesn’t agree with this line in the makefile?

I see. Probably /usr/lib should be hardcoded in the FILES variable in our layer instead of using libdir, because this location is referenced in the mender-configure source files, so it cannot just be changed without have repercussions.

In hindsight it was probably the wrong choice by us to put it in /usr/lib at all, since they are cross platform script files and not library files. But that is too intrusive to change now.

So if you apply the following change to the meta-mender layer, does it work for you?

diff --git a/meta-mender-core/recipes-mender/mender-configure/mender-configure.inc b/meta-mender-core/recipes-mender/mender-configure/mender-configure.inc
index 6c8d7ea2..69705e0b 100644
--- a/meta-mender-core/recipes-mender/mender-configure/mender-configure.inc
+++ b/meta-mender-core/recipes-mender/mender-configure/mender-configure.inc
@@ -23,12 +23,12 @@ FILES_${PN}_append_mender-systemd = " \
 SYSTEMD_SERVICE_${PN}_mender-systemd = "mender-configure-apply-device-config.service"
 
 FILES_${PN}-demo = " \
-    ${libdir}/mender-configure/apply-device-config.d/mender-demo-raspberrypi-led \
+    /usr/lib/mender-configure/apply-device-config.d/mender-demo-raspberrypi-led \
     /data/mender-configure/device-config.json \
 "
 
 FILES_${PN}-scripts = " \
-    ${libdir}/mender-configure/apply-device-config.d/timezone \
+    /usr/lib/mender-configure/apply-device-config.d/timezone \
 "
 
 S = "${WORKDIR}/git"

If it works I think we should apply that change to our layer, not just in dunfell, but in master and kirkstone too. Even though they might work right now, this could break for the same reason as dunfell if upstream decides to change anything.

I had the same problem with dunfell.
So i tried your last solution to change it to /usr/lib and it works.

So i can confirm this fix

Thanks, I have submitted it here.