.bbappend for systemd not working

Hi,

I am trying to achieve a relatively simple task:
I want to add a static network configuration in my linux image.
To do that, I have followed these instructions: Link

That, however, did not work, so I tried to create my own recipe to achieve it.
THe problem, I am facing is that whenever I try to build my image including my changes, it throws this error:
(please note that the deleted string is due to my editing for this post. In reality, there is the full path there.)

Initialising tasks: 100% |######################################################################################################################################| Time: 0:00:04
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_unpack: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-YdJXMV1omM,guid=18f453fb19dc1a827bb26d225a7ec40e"; export SSH_AGENT_PID="1656"; export SSH_AUTH_SOCK="/tmp/ssh-ZZNenXv9wXnr/agent.1606"; export PATH="<deleted>/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/perl-native:<deleted>/layers/openembedded-core/scripts:<deleted>/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi:<deleted>/build/tmp-glibc/sysroots/colibri-imx7/usr/bin/crossscripts:<deleted>/build/tmp-glibc/sysroots/x86_64-linux/usr/sbin:<deleted>/build/tmp-glibc/sysroots/x86_64-linux/usr/bin:<deleted>/build/tmp-glibc/sysroots/x86_64-linux/sbin:<deleted>/build/tmp-glibc/sysroots/x86_64-linux/bin:<deleted>/layers/openembedded-core/scripts:<deleted>/layers/bitbake/bin:/home/kai/bin:/home/kai/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"; export HOME="/home/kai"; git -c core.fsyncobjectfiles=0 clone -s -n <deleted>/build/downloads/git2/github.com.systemd.systemd.git/ <deleted>/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/systemd/1_230+gitAUTOINC+3a74d4fc90-r0/git/ failed with exit code 128, output:
fatal: repository '<deleted>/build/downloads/git2/github.com.systemd.systemd.git/' does not exist

ERROR: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_unpack: Function failed: base_do_unpack
ERROR: Logfile of failure stored in: <deleted>/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/systemd/1_230+gitAUTOINC+3a74d4fc90-r0/temp/log.do_unpack.9446
ERROR: Task (<deleted>/build/../layers/openembedded-core/meta/recipes-core/systemd/systemd_230.bb:do_unpack) failed with exit code '1'

But, the path /build/downloads/git2/github.com.systemd.systemd.git/ actually exists and a git repository resides there!

Now, as soon as I disable my .bbappend file (by renaming it to .bbappend_ it works like a charm

I have tried to find any information / hint on this on the internet and have not found anything related to this. I hope that somebody here has a clue what’s going on!

Thank you!

Hi

What versions of things are you using? What layers are involved?

What did you learn from applying the trouble shooting tips from here? Particularly ‘-c cleanall’ would force a later git fetch from the network.

Could you share a diff of the systemd*bbappend if you added to the meta-toradex-demos or your version if you created your own.

Max

I tried

bitbake -c cleanall systemd
bitbake <myimage>

but the error still resides.

I am using the following build configuration:

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-16.04"
TARGET_SYS        = "arm-angstrom-linux-gnueabi"
MACHINE           = "colibri-imx7"
DISTRO            = "angstrom"
DISTRO_VERSION    = "v2016.12"
TUNE_FEATURES     = "arm armv7a vfp thumb neon       callconvention-hard"
TARGET_FPU        = "hard"
meta-angstrom     = "HEAD:709abee819ee349dab873f6abb02c404b2c65331"
meta-toradex-nxp  = "HEAD:89a17628efef01fd5af202e88d79188df08f636f"
meta-toradex-bsp-common = "HEAD:b128af95613557af8deaea30212e89e6316eab88"
meta-toradex-demos = "HEAD:9776575a1a4b243f3a80de22bd16ea6a9525912d"
meta-freescale    = "HEAD:fa774ad7fb797957601a8c9fee45af453fea34b7"
meta-freescale-3rdparty = "HEAD:1879485e63ce369292c89b5902ff6df13509090b"
meta-freescale-distro = "HEAD:cd5c7a2539f40004f74126e9fdf08254fd9a6390"
meta-lxde         = "HEAD:1bd36a4d0f7e1e9fdea9c4c991188bc1dc9da421"
meta-qt4          = "HEAD:2c7f8df9039be498f8a2232d1428adb7f4e5e800"
meta-qt5          = "HEAD:3601fd2c5306ac6d5d0d536e0be8cbb90da9b4c1"
meta-browser      = "HEAD:ee0d264347ca89efe73788a11f31504d1d42b716"
meta-linaro-toolchain = "HEAD:e5b6b4e20a489bd7f39a9053f84914e318aea199"
meta-oe           
meta-efl          
meta-gpe          
meta-gnome        
meta-xfce         
meta-initramfs    
meta-systemd      
meta-networking   
meta-multimedia   
meta-python       = "HEAD:fe5c83312de11e80b85680ef237f8acb04b4b26e"
meta              = "HEAD:4c353eeff45f91533f22392f129bc5a477ee5207"
meta-ros          = "HEAD:60e4b4af9704fb04aff693970de09bdb27f659c7"
meta-etersys      = "HEAD:1cc4957e864d5822561ed70dda1c13b49df329f5"

I have my own recipe in the meta-etersys layer.
In that layer, I have created the folders: recipes-core/systemd.
In there, there is the file: systemd_%.bbappend:

FILESEXTRAPATHS_prepend := "${THISDIR}/systemd:"

SRC_URI += "file://wired.network"

PACKAGECONFIG_append = " networkd"

PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"

do_install_append() {
    install -d ${D}/etc/systemd/network/
    install -m 0644 ${WORKDIR}/wired.network ${D}/etc/systemd/network/
}

Also, in the same folder, there is a subfolder called ‘systemd’, where the file ‘wired.network’ resides:

[Match]
Name=eth0

[Network]
Address=192.168.0.12/24

I don’t understand what is going on.

I made the bbappend and wired.network files (in meta-browser, I’m to lazy to add a new layer) in a existing 2.7.x setup.

With this I was able to execute ‘bitbake -c cleanall systemd; bitbake -c unpack systemd’ without any issues. The relevant files and directory are upacked in the relevant work directory, including wired.network.

Is anything special on how you created the files, e.g. permissions, dos line endings …?

What happens if you have your bbappend active, but comment “#” all entries in it and then run bitbake.
Then removing the ‘#’ for each group of lines and run bitbake in between to find the line which causes the error?

I tried it today again.
Did the cleanall again - like I did before.

Now it works. I don’t understand why or how, because the only thing that changed was that I rebooted my system between yesterday and today.

I definitely changed nothing in my files (I looked at a git diff, but there was no change).

It’s a bit weird, but of course I am happy it now works as designed.

Thanks for the swift replies!

Glad it resolved itself. As already said I have no clue what could have caused this.