Failed to build qemu-aarch64 image with distributed soft bus using oebuild

I failed to build a QEMU-aarch64 image with distributed softbus using oebuild. During the oebuild bitbake openeuler-image process, the file /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz is missing. How can I obtain this security authentication module?

My operation steps follow the guide:
Quick Start — openEuler Embedded Online Documentation 24.03

Environment: Ubuntu 22.04

Error log:

/usr1/openeuler/src/security_device_auth/
/usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/device-auth-1.0.0/
/usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/device-auth/
/usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/files/
NOTE: Unpacking /usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/files/0003-feat-for-embedded-fix-openssl-sysroot.patch to /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/
DEBUG: Python function base_do_unpack finished
DEBUG: Executing shell function do_extract_device_auth_source
tar: /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
WARNING: /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/temp/run.do_extract_device_auth_source.121661:147 exit 2 from ‘tar -oxf /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz -C /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/’
WARNING: Backtrace (BB generated script):
	#1: do_extract_device_auth_source, /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/temp/run.do_extract_device_auth_source.121661, line 147
	#2: main, /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/temp/run.do_extract_device_auth_source.121661, line 150
DEBUG: Python function do_unpack finished
NOTE: recipe device-auth-1.0.0-r1: task do_unpack: Failed
2026-03-17 09:33:28,678 - ERROR - ERROR: Task (/usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/device-auth_1.0.0.bb:do_unpack) failed with exit code ‘1’
2026-03-17 09:33:28,679 - INFO - NOTE: Running task 554 of 2921 (/usr1/openeuler/src/yocto-poky/../yocto-meta-openembedded/meta-oe/recipes-support/libestr/libestr_0.1.11.bb:do_unpack)

compile.yaml configuration:

build_in: docker
machine: qemu-aarch64
toolchain_type: EXTERNAL_TOOLCHAIN:aarch64
cache_src_dir: 
no_layer: false
repos:
  - yocto-poky
  - yocto-meta-openembedded
  local_conf: |+
    DISTRO_FEATURES:append = " dsoftbus "

layers: []
docker_param:
  image: swr.cn-north-4.myhuaweicloud.com/openeuler-embedded/openeuler-container:latest
  parameters: -itd --network host
  volumns:
    - /dev/net/tun:/dev/net/tun
    - /home/xxxx/rk3568/softbuss/dsoftbus/src:/usr1/openeuler/src
    - /home/xxxx/rk3568/softbuss/dsoftbus/build/qemu-aarch64:/home/openeuler/build/qemu-aarch64
  command: bash

The content is AI-generated for reference only:

:white_check_mark: Summary

Issue Cause Solution
Missing security_device_auth-OpenHarmony-v3.2-Release.tar.gz Build system failed to automatically download the source package Manually download and place it in src/downloads/
tar: Cannot open error File path does not exist or insufficient permissions Check path, filename, and permissions
Offline build failure Unable to access Gitee Use local Git mirror or offline package

Key Point: oebuild relies on SRC_URI to automatically download source code, but may fail under network restrictions or misconfiguration. Manually adding missing files is the fastest way to restore the build.

Click here to view detailed analysis and solution

Analysis and Solution for Failed qemu-aarch64 Image Build with Distributed Soft Bus Using oebuild

Based on the error log and operation steps you provided, you encountered a source package missing issue while using the oebuild tool to build a qemu-aarch64 image with distributed soft bus (dsoftbus) functionality: the system failed to locate the file /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz, causing tar extraction to fail and the compilation to halt.


:cross_mark: Problem Analysis

Core Error Message:

tar: /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz: Cannot open: No such file or directory

Root Cause:

  • The build process depends on a source package named security_device_auth-OpenHarmony-v3.2-Release.tar.gz, which is the upstream source code for the device-auth component (device security authentication module).
  • This file should have been automatically downloaded by the build system into the src/downloads/ directory, but it was not successfully retrieved — the src/downloads/ directory is currently empty.
  • Possible reasons include:
    1. Network issues: Unable to access Gitee or other remote repositories.
    2. Offline build environment: No correct local source mirror or offline package configured.
    3. oebuild initialization incomplete: The oebuild update command failed to pull all required source code dependencies.
    4. Build script configuration issues: Incorrect download path mapping or permission problems.

:white_check_mark: Solutions

:white_check_mark: Solution 1: Manually Download the Missing Source Package (Recommended for Quick Fix)

You can manually obtain the required source package from the OpenHarmony official or openEuler community and place it in the correct directory.

Step 1: Confirm Target File

Target file:

security_device_auth-OpenHarmony-v3.2-Release.tar.gz

This file corresponds to the device_auth module in OpenHarmony 3.2 Release.

Step 2: Download the Source Package

Try downloading from the following sources:

:small_blue_diamond: Gitee OpenHarmony Mirror Repository (Recommended)
https://gitee.com/openharmony

git clone -b OpenHarmony-v3.2-Release https://gitee.com/openharmony/security_device_auth.git
tar -czf security_device_auth-OpenHarmony-v3.2-Release.tar.gz security_device_auth

Step 3: Place File in Correct Path

Copy the generated .tar.gz file to:

/usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz

:warning: Note: This is the path inside the build container. If you’re using Docker for building, ensure the file is mapped into the container. For example, in your volumes configuration:

/host/path/to/downloads:/usr1/openeuler/src/downloads

:white_check_mark: Solution 2: Check and Re-run oebuild update

The oebuild tool should automatically download all source dependencies before building using the update command.

Run the Command:

oebuild update

Ensure network access is available to Gitee (gitee.com) and Huawei Cloud mirror (mirrors.huaweicloud.com).

If network is restricted, configure a Git proxy:

git config --global http.proxy http://your-proxy:port

:white_check_mark: Solution 3: Verify Network and Mirror Source Configuration

Ensure your build environment can access official openEuler repositories and dependencies.

Try using Huawei Cloud mirror for acceleration:

# Example: Replace default repo source with Huawei Cloud
wget -O /etc/yum.repos.d/openeuler.repo https://repo.huaweicloud.com/repository/conf/openeuler_x86_64.repo

Note: This mainly affects runtime package management. For build-time dependency downloads, the key is git and wget/curl access to SRC_URI.


:white_check_mark: Solution 4: Use Full Image or Offline Package (Recommended for Continuous Development)

If you frequently perform builds, consider using the complete source package or Docker image provided by openEuler Embedded to avoid repeated downloads.

Reference documentation:

https://pages.openeuler.openatom.cn/embedded/docs/build/html/openEuler-24.03-LTS/getting_started/index.html

Ensure you’ve completed the full initialization process as documented:

oebuild init -p openEuler-24.03-LTS
cd openEuler-24.03-LTS
oebuild update

:hammer_and_wrench: Recommended Full Repair Workflow

# 1. Manually download the missing source package
git clone -b OpenHarmony-v3.2-Release https://gitee.com/openharmony/security_device_auth.git
tar -czf security_device_auth-OpenHarmony-v3.2-Release.tar.gz security_device_auth

# 2. Place the file in the downloads directory (ensure it's the container path)
cp security_device_auth-OpenHarmony-v3.2-Release.tar.gz /usr1/openeuler/src/downloads/

# 3. Check directory permissions
chmod 644 /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz

# 4. Restart the build
oebuild bitbake openeuler-image

:light_bulb: Additional Suggestions

  1. Avoid path mapping issues:

    • Ensure the src/downloads directory is not located within a mounted volume that gets overwritten.
    • If using Docker, consider managing the downloads directory as a separate persistent volume.
  2. Check Yocto logs for additional missing dependencies:

    • Path: tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/temp/log.do_unpack
    • Review the full SRC_URI list to identify any other missing files.
  3. Contact community support:


:white_check_mark: Summary

Issue Cause Solution
Missing security_device_auth-OpenHarmony-v3.2-Release.tar.gz Build system failed to automatically download the source package Manually download and place it in src/downloads/
tar: Cannot open error File path does not exist or insufficient permissions Check path, filename, and permissions
Offline build failure Unable to access Gitee Use local Git mirror or offline package

Key Point: oebuild depends on SRC_URI to automatically download source code, but may fail under network restrictions or misconfiguration. Manually adding missing files is the fastest way to restore the build.

For further assistance, please provide the content of the recipes-core/distributed-middleware/device-auth_1.0.0.bb file to verify the SRC_URI definition.

I failed to build a QEMU-aarch64 image with distributed softbus using oebuild. During the oebuild bitbake openeuler-image process, the file /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz is missing. How can I obtain this security authentication module?

My operation steps followed:
Quick Start — openEuler Embedded Online Documentation 24.03

Environment: Ubuntu 22.04

Error log:

|     /usr1/openeuler/src/security_device_auth/
|     /usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/device-auth-1.0.0/
|     /usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/device-auth/
|     /usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/files/
| NOTE: Unpacking /usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/files/0003-feat-for-embedded-fix-openssl-sysroot.patch to /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/
| DEBUG: Python function base_do_unpack finished
| DEBUG: Executing shell function do_extract_device_auth_source
| tar: /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz: Cannot open: No such file or directory
| tar: Error is not recoverable: exiting now
| WARNING: /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/temp/run.do_extract_device_auth_source.121661:147 exit 2 from ‘tar -oxf /usr1/openeuler/src/downloads/security_device_auth-OpenHarmony-v3.2-Release.tar.gz -C /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/’
| WARNING: Backtrace (BB generated script):
| 	#1: do_extract_device_auth_source, /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/temp/run.do_extract_device_auth_source.121661, line 147
| 	#2: main, /home/openeuler/build/qemu-aarch64/tmp/work/aarch64-openeuler-linux/device-auth/1.0.0-r1/temp/run.do_extract_device_auth_source.121661, line 150
| DEBUG: Python function do_unpack finished
NOTE: recipe device-auth-1.0.0-r1: task do_unpack: Failed
2026-03-17 09:33:28,678 - ERROR - ERROR: Task (/usr1/openeuler/src/yocto-poky/../yocto-meta-openeuler/meta-openeuler/recipes-core/distributed-middleware/device-auth_1.0.0.bb:do_unpack) failed with exit code ‘1’
2026-03-17 09:33:28,679 - INFO - NOTE: Running task 554 of 2921 (/usr1/openeuler/src/yocto-poky/../yocto-meta-openembedded/meta-oe/recipes-support/libestr/libestr_0.1.11.bb:do_unpack)

compile.yaml configuration:

build_in: docker
machine: qemu-aarch64
toolchain_type: EXTERNAL_TOOLCHAIN:aarch64
cache_src_dir: 
no_layer: false
repos:
  - yocto-poky
  - yocto-meta-openembedded
  local_conf: |+
    DISTRO_FEATURES:append = " dsoftbus "

layers: []
docker_param:
  image: swr.cn-north-4.myhuaweicloud.com/openeuler-embedded/openeuler-container:latest
  parameters: -itd --network host
  volumns:
    - /dev/net/tun:/dev/net/tun
    - /home/xxxx/rk3568/softbuss/dsoftbus/src:/usr1/openeuler/src
    - /home/xxxx/rk3568/softbuss/dsoftbus/build/qemu-aarch64:/home/openeuler/build/qemu-aarch64
  command: bash

Resolution: I’ve solved it by directly using the pre-built Docker image instead of setting up the environment manually.