From d33415993cd1ac0ae96b57e5d638f5496d1ed71d Mon Sep 17 00:00:00 2001 From: hanzongcheng Date: Sat, 17 May 2025 20:40:30 +0800 Subject: [PATCH 1/5] yocto: move recipe to dynamic-layer * move recipe to corresponding dynamic-layer Signed-off-by: hanzongcheng --- bsp/meta-kunpeng/conf/layer.conf | 6 ++++++ .../packagegroups/packagegroup-container.bbappend | 0 .../packagegroups/packagegroup-kubernetes.bbappend | 0 .../recipes-extended/libvirt/libvirt_%.bbappend | 0 4 files changed, 6 insertions(+) rename bsp/meta-kunpeng/{ => dynamic-layers/meta-virtualization}/recipes-core/packagegroups/packagegroup-container.bbappend (100%) rename bsp/meta-kunpeng/{ => dynamic-layers/meta-virtualization}/recipes-core/packagegroups/packagegroup-kubernetes.bbappend (100%) rename bsp/meta-kunpeng/{ => dynamic-layers/meta-virtualization}/recipes-extended/libvirt/libvirt_%.bbappend (100%) diff --git a/bsp/meta-kunpeng/conf/layer.conf b/bsp/meta-kunpeng/conf/layer.conf index c34f1774c05..0876b38b626 100644 --- a/bsp/meta-kunpeng/conf/layer.conf +++ b/bsp/meta-kunpeng/conf/layer.conf @@ -12,3 +12,9 @@ BBFILE_PRIORITY_meta-kunpeng = "7" LAYERVERSION_meta-kunpeng = "1" LAYERDEPENDS_meta-kunpeng = "core" LAYERSERIES_COMPAT_meta-kunpeng = "kirkstone" + +# enable .bb under meta-virtualization/ when exist virtualization-layer +BBFILES_DYNAMIC += " \ +virtualization-layer:${LAYERDIR}/dynamic-layers/meta-virtualization/recipes-*/*/*.bb \ +virtualization-layer:${LAYERDIR}/dynamic-layers/meta-virtualization/recipes-*/*/*.bbappend \ +" diff --git a/bsp/meta-kunpeng/recipes-core/packagegroups/packagegroup-container.bbappend b/bsp/meta-kunpeng/dynamic-layers/meta-virtualization/recipes-core/packagegroups/packagegroup-container.bbappend similarity index 100% rename from bsp/meta-kunpeng/recipes-core/packagegroups/packagegroup-container.bbappend rename to bsp/meta-kunpeng/dynamic-layers/meta-virtualization/recipes-core/packagegroups/packagegroup-container.bbappend diff --git a/bsp/meta-kunpeng/recipes-core/packagegroups/packagegroup-kubernetes.bbappend b/bsp/meta-kunpeng/dynamic-layers/meta-virtualization/recipes-core/packagegroups/packagegroup-kubernetes.bbappend similarity index 100% rename from bsp/meta-kunpeng/recipes-core/packagegroups/packagegroup-kubernetes.bbappend rename to bsp/meta-kunpeng/dynamic-layers/meta-virtualization/recipes-core/packagegroups/packagegroup-kubernetes.bbappend diff --git a/bsp/meta-kunpeng/recipes-extended/libvirt/libvirt_%.bbappend b/bsp/meta-kunpeng/dynamic-layers/meta-virtualization/recipes-extended/libvirt/libvirt_%.bbappend similarity index 100% rename from bsp/meta-kunpeng/recipes-extended/libvirt/libvirt_%.bbappend rename to bsp/meta-kunpeng/dynamic-layers/meta-virtualization/recipes-extended/libvirt/libvirt_%.bbappend -- Gitee From 468a378ac3ab976c45633ca39ff5632ecabe1887 Mon Sep 17 00:00:00 2001 From: fanglinxu Date: Tue, 8 Apr 2025 14:13:44 +0800 Subject: [PATCH 2/5] oebridge: add oebridge support * Feature Functions: * Enable users to integrate any openuler software during our yocto building phase in a very convenient way. * Also support online installation of onboard software packages. * Feature Prerequisites: * Both Yocto and openEuler OBS build use RPM for software management and DNF for software repository management. * Yocto and openEuler OBS build share the same source code repository, which includes the spec files for server edition RPM builds. * Feature Principle: * The spec files used by the openEuler server edition differ from those generated by Yocto recipes in terms of dependencies and configuration relationships. * Some base packages are built using embedded Yocto, while other software integrates or installs server edition packages via DNF. * To install server software via DNF, RPM installation metadata from the server edition is required. * When building each package, embedded Yocto generates installation metadata equivalent to that of server edition packages. * This ensures that during subsequent DNF installations of server software, the metadata recognizes prerequisite packages as already provided (though they are actually embedded versions). * Feature Constraints: * Configuration differences between embedded and server software packages may cause functional issues. * To mitigate this, customizations in Yocto recipes should minimize such impacts. * Special attention must be paid to ensuring compilation configuration consistency for prerequisite C libraries and C++ libraries. Signed-off-by: fanglinxu --- .oebuild/features/oebridge.yaml | 6 + meta-openeuler/classes/image-oebridge.bbclass | 230 ++++++++++++++++++ .../classes/oebridge-common.bbclass | 32 +++ meta-openeuler/classes/oebridge.bbclass | 103 ++++++++ meta-openeuler/classes/openeuler.bbclass | 6 + .../images/openeuler-image-common.inc | 3 + .../recipes-core/images/openeuler-image.bb | 1 + .../packagegroups/packagegroup-oebridge.bb | 71 ++++++ 8 files changed, 452 insertions(+) create mode 100644 .oebuild/features/oebridge.yaml create mode 100644 meta-openeuler/classes/image-oebridge.bbclass create mode 100644 meta-openeuler/classes/oebridge-common.bbclass create mode 100644 meta-openeuler/classes/oebridge.bbclass create mode 100644 meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb diff --git a/.oebuild/features/oebridge.yaml b/.oebuild/features/oebridge.yaml new file mode 100644 index 00000000000..1a193744ddf --- /dev/null +++ b/.oebuild/features/oebridge.yaml @@ -0,0 +1,6 @@ +type: feature + +local_conf: | + DISTRO_FEATURES:append = " oebridge " + SERVER_MIRROR = "https://mirrors.tuna.tsinghua.edu.cn/openeuler" + SERVER_VERSION = "openEuler-24.03-LTS" diff --git a/meta-openeuler/classes/image-oebridge.bbclass b/meta-openeuler/classes/image-oebridge.bbclass new file mode 100644 index 00000000000..04f5f394e62 --- /dev/null +++ b/meta-openeuler/classes/image-oebridge.bbclass @@ -0,0 +1,230 @@ +inherit oebridge-common + +def get_package_details(base, package_name): + query = base.sack.query().available().filter(name=package_name) + if not query: + print(f"Package '{package_name}' not found in the repository.") + return + pkg = query[0] + return { + "Package": os.path.basename(pkg.remote_location()), + "Url": pkg.remote_location(), + "Checksum": pkg.chksum[1].hex() + } + + +fakeroot python do_make_rootfs_db(){ + import os + import shutil + import subprocess + + def make_db(db_dir, rpms_dir, root_tmp): + with open(f"{d.getVar('TOPDIR')}/cache/ASSUME_PROVIDE_PKGS", 'r', encoding='utf-8') as f: + pkg_data = f.readlines() + for pkg in pkg_data: + pkg = pkg.strip("\n").strip(" ") + pkg_split = pkg.split(":") + # < 3 mean that there is no openeuler server pkgs,an example is pkg:pkg-sub:server pkg + if len(pkg_split)<3: + continue + for fi in os.walk(os.path.join(rpms_dir, pkg_split[0])): + if len(fi[2])==0: + continue + for rpm_pkg in fi[2]: + if not rpm_pkg.endswith(".rpm"): + continue + res = subprocess.run(f"rpm -ivh --dbpath {db_dir} --nosignature \ + --root {root_tmp} --nodeps --justdb --ignorearch {rpm_pkg} --force", + shell=True, + stderr=subprocess.PIPE, + cwd=fi[0], + text=True) + if res.returncode != 0: + bb.fatal(res.stderr) + + # make rpm db + rpms_cache_dir = f"{d.getVar('TOPDIR')}/cache/rpms"+ \ + "/"+d.getVar('SERVER_VERSION')+ \ + "/oe"+ \ + "/"+d.getVar('TUNE_ARCH') + db_cache_dir = "/var/lib/rpm" + subprocess.run(f"rm -rf {os.path.join(d.getVar('IMAGE_ROOTFS'), db_cache_dir)}",shell=True) + make_db(db_dir=db_cache_dir, rpms_dir=rpms_cache_dir, root_tmp=d.getVar("IMAGE_ROOTFS")) +} + +fakeroot python do_dnf_install_pkgs(){ + import os + import shutil + import subprocess + import dnf + import dnf.base + import dnf.conf + + DEFAULT_REPO_LIST = get_default_repo_list(d) + + def init_base_extend(rootfs, cache_dir): + dnf.rpm.transaction.rpm.addMacro('_dbpath', '/var/lib/rpm') + base = dnf.Base() + base.conf.substitutions['releasever'] = '' + base.repos.all().disable() + + base.conf.substitutions['arch'] = d.getVar('TUNE_ARCH') + base.conf.install_weak_deps = False + base.conf.clean_requirements_on_remove = False + base.conf.ignorearch = True + base.conf.sslverify = False + + base.conf.cachedir = cache_dir + base.conf.config_file_path = cache_dir + base.conf.persistdir = cache_dir + base.conf.installroot = os.path.abspath(rootfs) + + for repo_info in DEFAULT_REPO_LIST: + repo = base.repos.add_new_repo(repo_info["name"], base.conf, baseurl=[repo_info["url"]]) + repo.enable() + + dnf.rpm.transaction.rpm.addMacro('_dbpath', '/var/lib/rpm') + # load remote data + base.fill_sack(load_system_repo=True, load_available_repos=True) + return base + + def install_pkg(rootfs, cache_dir, package_name): + base = init_base_extend(rootfs, cache_dir) + base.install(package_name) + + try: + base.resolve() + except dnf.exceptions.DepsolveError as e: + raise RuntimeError(f"Dependency resolution failed: {str(e)}") + base.download_packages(base.transaction.install_set) + base.do_transaction() + + cache_dir = f"{d.getVar('TOPDIR')}/cache/install_pkgs" + force_list = [] + with open(f"{d.getVar('TOPDIR')}/cache/INSTALL_PKG_LIST", 'r', encoding='utf-8') as f: + pkg_lists = f.read().replace("\n"," ") + for pkg in pkg_lists.split(): + if pkg == "": + continue + if ":force" in pkg: + pkg = pkg.split(":")[0] + force_list.append(pkg) + install_pkg(d.getVar('IMAGE_ROOTFS'), cache_dir, pkg) + + base = init_base_common(DEFAULT_REPO_LIST) + # download server rpm + rpms_cache_dir = f"{d.getVar('TOPDIR')}/cache/rpms" + download_pre_dir = rpms_cache_dir+ \ + "/"+d.getVar('SERVER_VERSION')+ \ + "/oe"+ \ + "/"+d.getVar('TUNE_ARCH') + for pkg in force_list: + bb.plain(f"reinstall {pkg} with:") + pkg_dir = download_pre_dir+"/"+pkg + os.makedirs(name=pkg_dir, exist_ok=True) + rpm_info = get_package_details(base, pkg) + if rpm_info is None: + bb.plain(f"reinstall {pkg} failed: target not found.") + continue + if not os.path.exists(os.path.join(pkg_dir, rpm_info['Package'])): + res = subprocess.run(f"wget {rpm_info['Url']}", + shell=True, + stderr=subprocess.PIPE, + cwd=pkg_dir, + text=True) + if res.returncode != 0: + bb.fatal(res.stderr) + return + bb.plain(rpm_info['Package']) + res = subprocess.run(f"rpm -ivh --dbpath /var/lib/rpm --nosignature \ + --root {d.getVar('IMAGE_ROOTFS')} --nodeps --ignorearch {rpm_info['Package']} --force", + shell=True, + stderr=subprocess.PIPE, + cwd=pkg_dir, + text=True) + if res.returncode != 0: + bb.fatal(res.stderr) +} + + +python do_run_post_action(){ + import os + import subprocess + import bb.utils + # make oe source pkgs dir compatible + ln_list = ["/bin/bash:usr/bin/bash", + "/bin/pidof:usr/bin/pidof", + "/sbin/restorecon:usr/sbin/restorecon", + "/bin/sh:usr/bin/sh"] + + if "systemd" in d.getVar("DISTRO_FEATURES"): + ln_list.extend([ + "/sbin/udevadm:usr/bin/", + "/bin/systemd-hwdb:usr/bin/", + "/bin/systemctl:usr/bin/", + "/usr/bin/update-alternatives:usr/sbin/", + "/bin/systemd-tmpfiles:usr/bin/" + ]) + + for ln_line in ln_list: + ln_split = ln_line.split(":") + if os.path.exists(os.path.join(d.getVar("IMAGE_ROOTFS"), ln_split[0])): + subprocess.run(f"ln -s {ln_split[0]} {ln_split[1]}",shell=True,cwd=d.getVar("IMAGE_ROOTFS"),text=True) + + repo_dir = d.getVar('IMAGE_ROOTFS') + "/etc/yum.repos.d" + os.makedirs(repo_dir, exist_ok=True) + + openeuler_repo_path = f"{d.getVar('THISDIR')}/../../recipes-devtools/dnf/files/openEuler.repo" + if os.path.exists(openeuler_repo_path): + subprocess.run(f"cp {openeuler_repo_path} {repo_dir}", + shell=True, + cwd=repo_dir) + subprocess.run(f"sed -i 's/OPENEULER_VER/{d.getVar('SERVER_VERSION')}/g' openEuler.repo", + shell=True, + cwd=repo_dir) + else: + bb.error("openEuler.repo not found") +} + +do_custom_install_prepare() { + # This is a workaround for the server environment where the chkconfig package (a low-level foundational + # software component) is provided. This package creates a symbolic link /etc/init.d, which conflicts with + # any existing physical /etc/init.d directory, preventing the installation of the chkconfig package. + # In Yocto, physical /etc/init.d directories are commonly generated by many recipes. + # To address this compatibility issue, the following adaptation is implemented: + # a. If a physical /etc/init.d directory exists, it is renamed and backed up. + # b. The chkconfig package is then installed. + # c. After installation, the contents of the backed-up /etc/init.d directory are restored to their original location. + # This ensures compatibility while allowing both the chkconfig package and Yocto-generated /etc/init.d files to coexist. + + # here, we backup /etc/init.d to /etc/init.d-yocto-tmp: + if [ -d "${IMAGE_ROOTFS}/etc/init.d" ]; then + mv ${IMAGE_ROOTFS}/etc/init.d ${IMAGE_ROOTFS}/etc/init.d-yocto-tmp + fi +} + +do_custom_install_complete() { + # workaround for pkg chkconfig conflict, restore /etc/init.d-yocto-tmp to /etc/init.d + targetdir=$(readlink -f "${IMAGE_ROOTFS}/etc/init.d") + if [ -d "$targetdir" ]; then + # path or soft link path exist + mv ${IMAGE_ROOTFS}/etc/init.d-yocto-tmp/* ${IMAGE_ROOTFS}/etc/init.d + rm -r ${IMAGE_ROOTFS}/etc/init.d-yocto-tmp + else + # path or soft link path not exist + mv ${IMAGE_ROOTFS}/etc/init.d-yocto-tmp ${IMAGE_ROOTFS}/etc/init.d + fi +} + +do_dnf_install_pkgs:prepend() { + bb.build.exec_func('do_custom_install_prepare', d) +} + +do_dnf_install_pkgs:append() { + bb.build.exec_func('do_custom_install_complete', d) +} + +# do_rootfs -> do_make_rootfs_db -> do_dnf_install_pkgs -> do_run_post_action -> do_image +addtask do_make_rootfs_db after do_rootfs before do_dnf_install_pkgs +addtask do_dnf_install_pkgs before do_run_post_action +addtask do_run_post_action before do_image diff --git a/meta-openeuler/classes/oebridge-common.bbclass b/meta-openeuler/classes/oebridge-common.bbclass new file mode 100644 index 00000000000..259fabd76f8 --- /dev/null +++ b/meta-openeuler/classes/oebridge-common.bbclass @@ -0,0 +1,32 @@ +def init_base_common(repo_list=None): + import dnf + import dnf.base + import dnf.conf + + base = dnf.Base() + # disable systemd repo + base.conf.substitutions['releasever'] = '' + base.repos.all().disable() + base.conf.sslverify = False + dnf.rpm.transaction.rpm.addMacro('_dbpath', '/var/lib/rpm') + + for repo_info in repo_list: + repo = base.repos.add_new_repo(repo_info["name"], base.conf, baseurl=[repo_info["url"]]) + repo.enable() + + # load remote data + base.fill_sack(load_system_repo=False, load_available_repos=True) + return base + + +def get_default_repo_list(d): + return [ + { + "name": "remote_everything", + "url": f"{d.getVar('SERVER_MIRROR')}/{d.getVar('SERVER_VERSION')}/everything/{d.getVar('TUNE_ARCH')}/" + }, + { + "name": "remote_epol", + "url": f"{d.getVar('SERVER_MIRROR')}/{d.getVar('SERVER_VERSION')}/EPOL/main/{d.getVar('TUNE_ARCH')}/" + } + ] diff --git a/meta-openeuler/classes/oebridge.bbclass b/meta-openeuler/classes/oebridge.bbclass new file mode 100644 index 00000000000..607b4b4b96f --- /dev/null +++ b/meta-openeuler/classes/oebridge.bbclass @@ -0,0 +1,103 @@ +python(){ + import os + import subprocess + + repo_name = d.getVar('OPENEULER_LOCAL_NAME') + + src_dir = d.getVar('OPENEULER_SP_DIR') + repo_dir = os.path.join(src_dir, repo_name) + spec_path = os.path.join(repo_dir, repo_name+".spec") + spec_name = repo_name+".spec" + server_rpms = "" + # note: if set ASSUME_PROVIDE_PKGS mean to all PACKAGES is ASSUME_PROVIDE_PKGS value, + # but if set sub package, the sub pacakge will be it's own value + if d.getVar("ASSUME_PROVIDE_PKGS") is not None and d.getVar("ASSUME_PROVIDE_PKGS") != "": + server_rpms = d.getVar("ASSUME_PROVIDE_PKGS") + else: + # get pkgnames from spec + if os.path.exists(spec_path): + # this feature shoud use with oee nativesdk + res = subprocess.run(f"rpmspec -q {spec_name} \ + --rcfile=/opt/buildtools/nativesdk/sysroots/x86_64-openeulersdk-linux/usr/lib/rpm/rpmrc \ + --macros=/lib/rpm/macros:/lib/rpm/openEuler/macros \ + --define='_sourcedir ./' | sed 's/-[0-9].*//'", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, cwd=repo_dir) + if res.returncode != 0: + bb.error(res.stderr) + return + server_rpms = res.stdout.replace("\n"," ") + + for sub_name in d.getVar("PACKAGES").split(" "): + sub_name = sub_name.strip() + if sub_name == "": + continue + if d.getVar(f"ASSUME_PROVIDE_PKGS:{sub_name}") is None: + d.setVar(f"ASSUME_PROVIDE_PKGS:{sub_name}", server_rpms) +} + +addtask do_download_oepkg before do_package_write_rpm after do_package_qa + +inherit oebridge-common + +def get_package_details(base, package_name): + query = base.sack.query().available().filter(name=package_name) + if not query: + print(f"Package '{package_name}' not found in the repository.") + return + pkg = query[0] + return { + "Package": os.path.basename(pkg.remote_location()), + "Url": pkg.remote_location(), + "Checksum": pkg.chksum[1].hex() + } + +python do_download_oepkg(){ + import os + import subprocess + + DEFAULT_REPO_LIST = get_default_repo_list(d) + + rpms_cache_dir = f"{d.getVar('TOPDIR')}/cache/rpms" + os.makedirs(name=rpms_cache_dir, exist_ok=True) + base = init_base_common(DEFAULT_REPO_LIST) + for sub_name in d.getVar("PACKAGES").split(" "): + sub_name = sub_name.strip() + if sub_name == "": + continue + # bb.plain(d.getVar(f"ASSUME_PROVIDE_PKGS:{sub_name}")) + if d.getVar(f"ASSUME_PROVIDE_PKGS:{sub_name}") is None: + continue + prefix_name = d.getVar("PN")+":"+sub_name + # remove duplicates + subprocess.run(f"test -f ASSUME_PROVIDE_PKGS && sed -i '/^{prefix_name}:/d' ASSUME_PROVIDE_PKGS", + shell=True, + cwd=f"{d.getVar('TOPDIR')}/cache", + text=True) + + # write server rpm info to ASSUME_PROVIDE_PKGS file + server_rpms = " ".join(d.getVar(f"ASSUME_PROVIDE_PKGS:{sub_name}").replace("\n", " ").split()) + with open(f"{d.getVar('TOPDIR')}/cache/ASSUME_PROVIDE_PKGS", 'a', encoding='utf-8') as f: + f.write(prefix_name+":"+server_rpms+"\n") + + # download server rpm + download_pre_dir = rpms_cache_dir+ \ + "/"+d.getVar('SERVER_VERSION')+ \ + "/oe"+ \ + "/"+d.getVar('TUNE_ARCH') + pn_dir = download_pre_dir+"/"+d.getVar("PN") + os.makedirs(name=pn_dir, exist_ok=True) + for server_rpm in server_rpms.split(" "): + rpm_info = get_package_details(base, server_rpm) + if rpm_info is None: + continue + if os.path.exists(os.path.join(pn_dir, rpm_info['Package'])): + continue + res = subprocess.run(f"wget {rpm_info['Url']}", + shell=True, + stderr=subprocess.PIPE, + cwd=pn_dir, + text=True) + if res.returncode != 0: + bb.fatal(res.stderr) + return +} + diff --git a/meta-openeuler/classes/openeuler.bbclass b/meta-openeuler/classes/openeuler.bbclass index 76e09e41238..0decea12a4d 100644 --- a/meta-openeuler/classes/openeuler.bbclass +++ b/meta-openeuler/classes/openeuler.bbclass @@ -350,3 +350,9 @@ python do_openeuler_clean() { } addtask do_openeuler_clean before do_clean + +# OEBridge is designed to seamlessly integrate openEuler Embedded with the Euler +# northbound ecosystem. This enables openEuler Embedded to install server software +# packages via DNF, significantly reducing development complexity and simplifying +# software adaptation. +inherit ${@bb.utils.contains('DISTRO_FEATURES', 'oebridge', 'oebridge', '', d)} diff --git a/meta-openeuler/recipes-core/images/openeuler-image-common.inc b/meta-openeuler/recipes-core/images/openeuler-image-common.inc index b4a5e7e0758..f96f53247bb 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image-common.inc +++ b/meta-openeuler/recipes-core/images/openeuler-image-common.inc @@ -1,3 +1,6 @@ +# Add oebridge image configuration +inherit ${@bb.utils.contains('DISTRO_FEATURES', 'oebridge', 'image-oebridge', '', d)} + # openeuler standard image packages IMAGE_INSTALL = " \ packagegroup-core-boot \ diff --git a/meta-openeuler/recipes-core/images/openeuler-image.bb b/meta-openeuler/recipes-core/images/openeuler-image.bb index fbc248d4e67..9f828543df7 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image.bb +++ b/meta-openeuler/recipes-core/images/openeuler-image.bb @@ -29,6 +29,7 @@ ${@bb.utils.contains("DISTRO_FEATURES", "isulad", "packagegroup-isulad", "", d)} ${@bb.utils.contains("DISTRO_FEATURES", "preempt-rt", "packagegroup-preempt-rt", "", d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "dsoftbus", "packagegroup-dsoftbus", "", d)} \ ${@bb.utils.contains("DISTRO_FEATURES", "benchmarks", "packagegroup-openeuler-benchmarks", "", d)} \ +${@bb.utils.contains("DISTRO_FEATURES", "oebridge", "packagegroup-oebridge", "", d)} \ " # You can add extra user here, suck like: diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb new file mode 100644 index 00000000000..b65c09d3b8e --- /dev/null +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb @@ -0,0 +1,71 @@ +SUMMARY = "packagegroup of oebridge" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit packagegroup + +PACKAGES = "${PN}" + +# need glibc-external-utils provides binary such as locale, getent, etc. +RDEPENDS:${PN} = " \ + glibc-external-utils \ + libgpg-error \ + libgcrypt \ +" + +# will call dnf to install INSTALL_PKG_LISTS's pkgs when do_rootfs +# the :force tag will force to install by using rpm -ivh and cover the pkg whatever oee do. +# note that: +# do not add oee's rpm and dnf(it depends on python3), +# we should use oe2403's python modules due to python3 version diffs. +INSTALL_PKG_LISTS = " \ + libsigsegv \ + libev \ + info \ + chkconfig \ + kbd-legacy \ + kbd-misc \ + keyutils-libs \ + libutempter \ + libverto \ + man-db \ + newt \ + slang \ + kpartx \ + openssl-pkcs11 \ + crypto-policies \ + dracut \ + krb5-libs \ + libkcapi \ + os-prober \ + grubby \ + dnf \ + rpm \ +" + +# we should ensure libstdc++ api is compatible, ohterwise we need oe's libstdc++. +# currently, oee's python3 is diff from oe2403, shoud use oe2403's pkg. +# other libs is incompatible with config, use oe's pkg, list is: +INSTALL_PKG_LISTS += " \ + python3:force \ + libgomp:force \ + libvorbis:force \ + libogg:force \ + ncurses-libs:force \ + libsndfile:force \ + libsamplerate:force \ + flac:force \ + glib2:force \ + avahi-libs:force \ + gobject-introspection:force \ +" + +python() { + import os + import subprocess + + # write INSTALL_PKG_LISTS to a file for getting install pkg list when do_rootfs + with open(f"{d.getVar('TOPDIR')}/cache/INSTALL_PKG_LIST", 'w', encoding='utf-8') as f: + f.write(d.getVar('INSTALL_PKG_LISTS').replace(" ", "\n")) + + d.setVar("ASSUME_PROVIDE_PKGS", d.getVar('INSTALL_PKG_LISTS')) +} -- Gitee From 59004068451ab9ce2fd427fe5f5affb89790a0f9 Mon Sep 17 00:00:00 2001 From: fanglinxu Date: Tue, 8 Apr 2025 14:32:56 +0800 Subject: [PATCH 3/5] oebridge: add mapping for known packages * After analyzing and comparing the basic C library basic file system, launcher, etc between embedded and server edition, we have mapped the relevant software packages accordingly. * For unmapped software packages, the mapping relationships described in the spec files are applied. * This feature provides a framework to support subsequent user customization and modifications. Signed-off-by: fanglinxu --- .../clang-layer/recipes-external/gcc/libgcc-external.bbappend | 2 ++ .../recipes-extended/libpwquality/libpwquality_%.bbappend | 2 ++ .../openembedded-layer/recipes-support/fuse/fuse_%.bbappend | 2 ++ .../openembedded-layer/recipes-support/lvm2/lvm2_%.bbappend | 2 ++ meta-openeuler/recipes-bsp/grub/grub_%.bbappend | 2 ++ meta-openeuler/recipes-connectivity/bluez5/bluez5_%.bbappend | 2 ++ .../recipes-connectivity/openssl/openssl_%.bbappend | 4 +++- meta-openeuler/recipes-core/audit/audit_%.bbappend | 2 ++ meta-openeuler/recipes-core/base-files/base-files_%.bbappend | 2 ++ meta-openeuler/recipes-core/busybox/busybox_%.bbappend | 2 ++ meta-openeuler/recipes-core/coreutils/coreutils_%.bbappend | 2 ++ meta-openeuler/recipes-core/dbus/dbus_%.bbappend | 2 ++ meta-openeuler/recipes-core/expat/expat_%.bbappend | 2 ++ meta-openeuler/recipes-core/gettext/gettext_%.bbappend | 2 ++ meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend | 2 ++ meta-openeuler/recipes-core/kbd/kbd_%.bbappend | 2 ++ meta-openeuler/recipes-core/libseccomp/libseccomp_%.bbappend | 2 ++ meta-openeuler/recipes-core/libxcrypt/libxcrypt_%.bbappend | 2 ++ meta-openeuler/recipes-core/libxml/libxml2_%.bbappend | 2 ++ meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend | 2 ++ meta-openeuler/recipes-core/os-release/os-release.bbappend | 2 ++ meta-openeuler/recipes-core/readline/readline_%.bbappend | 2 ++ meta-openeuler/recipes-core/selinux/libselinux_%.bbappend | 2 ++ meta-openeuler/recipes-core/selinux/libsemanage_%.bbappend | 2 ++ meta-openeuler/recipes-core/selinux/libsepol_%.bbappend | 2 ++ meta-openeuler/recipes-core/systemd/systemd_253.7.bb | 2 ++ meta-openeuler/recipes-core/tzdata/tzdata.bbappend | 2 ++ .../recipes-core/util-linux/util-linux-libuuid_%.bbappend | 2 ++ meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend | 2 ++ meta-openeuler/recipes-core/zlib/zlib_%.bbappend | 2 ++ meta-openeuler/recipes-devtools/dnf/dnf_%.bbappend | 2 +- .../recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend | 2 ++ meta-openeuler/recipes-devtools/file/file_%.bbappend | 2 ++ meta-openeuler/recipes-extended/bash/bash_%.bbappend | 2 ++ meta-openeuler/recipes-extended/bc/bc_%.bbappend | 2 ++ meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend | 2 ++ meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend | 2 ++ meta-openeuler/recipes-extended/cronie/cronie_%.bbappend | 2 ++ .../recipes-extended/findutils/findutils_%.bbappend | 2 ++ meta-openeuler/recipes-extended/gawk/gawk_%.bbappend | 1 + meta-openeuler/recipes-extended/grep/grep_%.bbappend | 2 ++ meta-openeuler/recipes-extended/groff/groff_%.bbappend | 2 ++ meta-openeuler/recipes-extended/gzip/gzip_%.bbappend | 2 ++ meta-openeuler/recipes-extended/less/less_%.bbappend | 2 ++ meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend | 2 ++ meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend | 2 ++ meta-openeuler/recipes-extended/pam/libpam_%.bbappend | 4 +++- meta-openeuler/recipes-extended/pigz/pigz_%.bbappend | 1 + meta-openeuler/recipes-extended/procps/procps_%.bbappend | 2 ++ meta-openeuler/recipes-extended/sed/sed_%.bbappend | 2 ++ meta-openeuler/recipes-extended/shadow/shadow_%.bbappend | 2 ++ meta-openeuler/recipes-extended/texinfo/texinfo_%.bbappend | 2 ++ meta-openeuler/recipes-extended/xz/xz_%.bbappend | 4 +++- meta-openeuler/recipes-external/gcc/gcc-runtime-external.bb | 4 +++- meta-openeuler/recipes-external/gcc/libgcc-external.bb | 2 ++ meta-openeuler/recipes-external/glibc/glibc-external.bb | 2 ++ .../recipes-graphics/xorg-lib/libxkbcommon_%.bbappend | 2 ++ .../recipes-graphics/xorg-lib/xkeyboard-config_%.bbappend | 2 ++ meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend | 2 ++ meta-openeuler/recipes-multimedia/libpng/libpng_%.bbappend | 1 + meta-openeuler/recipes-support/acl/acl_%.bbappend | 1 + meta-openeuler/recipes-support/attr/attr_%.bbappend | 1 + .../ca-certificates/ca-certificates_2023.2.64.bb | 2 ++ meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend | 2 ++ meta-openeuler/recipes-support/gmp/gmp_%.bbappend | 2 ++ meta-openeuler/recipes-support/gnutls/libtasn1_%.bbappend | 2 ++ meta-openeuler/recipes-support/libcap-ng/libcap-ng_%.bbappend | 2 ++ meta-openeuler/recipes-support/libcap/libcap_%.bbappend | 2 ++ meta-openeuler/recipes-support/libevent/libevent_%.bbappend | 2 +- meta-openeuler/recipes-support/libffi/libffi_%.bbappend | 2 ++ meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend | 2 ++ .../recipes-support/libgpg-error/libgpg-error_%.bbappend | 2 ++ meta-openeuler/recipes-support/libpcre/libpcre2_%.bbappend | 2 ++ .../recipes-support/libunistring/libunistring_%.bbappend | 4 +++- meta-openeuler/recipes-support/lz4/lz4_%.bbappend | 2 ++ meta-openeuler/recipes-support/mpfr/mpfr_%.bbappend | 4 +++- meta-openeuler/recipes-support/p11-kit/p11-kit_%.bbappend | 2 ++ meta-openeuler/recipes-support/popt/popt_%.bbappend | 2 ++ .../shared-mime-info/shared-mime-info_%.bbappend | 2 ++ 79 files changed, 157 insertions(+), 8 deletions(-) diff --git a/meta-openeuler/dynamic-layers/clang-layer/recipes-external/gcc/libgcc-external.bbappend b/meta-openeuler/dynamic-layers/clang-layer/recipes-external/gcc/libgcc-external.bbappend index 7770a6d80de..8d286be5738 100644 --- a/meta-openeuler/dynamic-layers/clang-layer/recipes-external/gcc/libgcc-external.bbappend +++ b/meta-openeuler/dynamic-layers/clang-layer/recipes-external/gcc/libgcc-external.bbappend @@ -4,3 +4,5 @@ # to prevent the strip. INHIBIT_SYSROOT_STRIP = "1" INHIBIT_PACKAGE_STRIP = "1" + +ASSUME_PROVIDE_PKGS = "libgcc" diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/libpwquality/libpwquality_%.bbappend b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/libpwquality/libpwquality_%.bbappend index 069cc2bf0c4..1eaaf80b4db 100644 --- a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/libpwquality/libpwquality_%.bbappend +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/libpwquality/libpwquality_%.bbappend @@ -35,3 +35,5 @@ FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" FILES:${PN}-dbg += "${base_libdir}/security/.debug" FILES:${PN}-staticdev += "${base_libdir}/security/pam_pwquality.a" FILES:${PN}-dev += "${base_libdir}/security/pam_pwquality.la" + +ASSUME_PROVIDE_PKGS = "libpwquality" diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/fuse/fuse_%.bbappend b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/fuse/fuse_%.bbappend index e3bbdb9d2d9..cf29da4970c 100644 --- a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/fuse/fuse_%.bbappend +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/fuse/fuse_%.bbappend @@ -18,3 +18,5 @@ SRC_URI:prepend = " \ file://0002-util-ulockmgr_server.c-conditionally-define-closefro.patch \ file://0003-add-fuse-test-dir.patch \ " + +ASSUME_PROVIDE_PKGS = "fuse fuse-common fuse-help" diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/lvm2/lvm2_%.bbappend b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/lvm2/lvm2_%.bbappend index 124093d5322..74968dfc6ab 100644 --- a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/lvm2/lvm2_%.bbappend +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-support/lvm2/lvm2_%.bbappend @@ -45,3 +45,5 @@ FILES:${PN} += " \ " RDEPENDS:${PN} = "bash" + +ASSUME_PROVIDE_PKGS ="device-mapper" diff --git a/meta-openeuler/recipes-bsp/grub/grub_%.bbappend b/meta-openeuler/recipes-bsp/grub/grub_%.bbappend index 1dcd06095b1..f8b79ab576e 100644 --- a/meta-openeuler/recipes-bsp/grub/grub_%.bbappend +++ b/meta-openeuler/recipes-bsp/grub/grub_%.bbappend @@ -1,2 +1,4 @@ # main bbfile: yocto-poky/meta/recipes-bsp/grub/grub_git.bb require grub-source-openeuler.inc + +ASSUME_PROVIDE_PKGS = "grub2-common grub2-tools grub2-tools-minimal" diff --git a/meta-openeuler/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-openeuler/recipes-connectivity/bluez5/bluez5_%.bbappend index 977d02d10f0..379e94241f9 100644 --- a/meta-openeuler/recipes-connectivity/bluez5/bluez5_%.bbappend +++ b/meta-openeuler/recipes-connectivity/bluez5/bluez5_%.bbappend @@ -27,6 +27,8 @@ PACKAGECONFIG:remove = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', ' # testtools depends python3-core python3-dbus python3-pygobject, we do not need these RDEPENDS:${PN}-testtools:openeuler-prebuilt = "" +INSANE_SKIP:${PN}-testtools += "file-rdeps" + # From oe-core bluez5_5.71.bb EXTRA_OECONF += "--enable-pie" diff --git a/meta-openeuler/recipes-connectivity/openssl/openssl_%.bbappend b/meta-openeuler/recipes-connectivity/openssl/openssl_%.bbappend index 4553407467f..4bee1282b70 100644 --- a/meta-openeuler/recipes-connectivity/openssl/openssl_%.bbappend +++ b/meta-openeuler/recipes-connectivity/openssl/openssl_%.bbappend @@ -86,4 +86,6 @@ SRC_URI:prepend = "file://${BP}.tar.gz \ do_install:append () { #Remove the empty directory that conflict with ca-certificates. rm -rf ${D}${sysconfdir}/ssl/certs -} \ No newline at end of file +} + +ASSUME_PROVIDE_PKGS ="openssl openssl-libs" diff --git a/meta-openeuler/recipes-core/audit/audit_%.bbappend b/meta-openeuler/recipes-core/audit/audit_%.bbappend index 4d8f2628fd8..a45d36a1c8a 100644 --- a/meta-openeuler/recipes-core/audit/audit_%.bbappend +++ b/meta-openeuler/recipes-core/audit/audit_%.bbappend @@ -76,3 +76,5 @@ do_install:append() { do_install:append:arm() { sed -i "/arch=b64/d" ${D}/etc/audit/audit.rules } + +ASSUME_PROVIDE_PKGS = "audit-libs" diff --git a/meta-openeuler/recipes-core/base-files/base-files_%.bbappend b/meta-openeuler/recipes-core/base-files/base-files_%.bbappend index 4161ee3c770..295f5fa0d73 100644 --- a/meta-openeuler/recipes-core/base-files/base-files_%.bbappend +++ b/meta-openeuler/recipes-core/base-files/base-files_%.bbappend @@ -23,3 +23,5 @@ do_install:append () { echo "${BANNERSTR}" >> ${D}${sysconfdir}/motd echo >> ${D}${sysconfdir}/motd } + +ASSUME_PROVIDE_PKGS:${PN} = "setup filesystem basesystem" diff --git a/meta-openeuler/recipes-core/busybox/busybox_%.bbappend b/meta-openeuler/recipes-core/busybox/busybox_%.bbappend index c24fbfff1b3..be4c7f19fbf 100644 --- a/meta-openeuler/recipes-core/busybox/busybox_%.bbappend +++ b/meta-openeuler/recipes-core/busybox/busybox_%.bbappend @@ -67,3 +67,5 @@ do_install:append () { } SRC_URI[tarball.sha256sum] = "b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314" + +ASSUME_PROVIDE_PKGS = "which cpio vim-minimal diffutils systemd systemd-libs systemd-udev" diff --git a/meta-openeuler/recipes-core/coreutils/coreutils_%.bbappend b/meta-openeuler/recipes-core/coreutils/coreutils_%.bbappend index 624c509d2bf..7323bd89b26 100644 --- a/meta-openeuler/recipes-core/coreutils/coreutils_%.bbappend +++ b/meta-openeuler/recipes-core/coreutils/coreutils_%.bbappend @@ -57,3 +57,5 @@ SRC_URI:prepend = " \ " SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52" + +ASSUME_PROVIDE_PKGS = "coreutils" diff --git a/meta-openeuler/recipes-core/dbus/dbus_%.bbappend b/meta-openeuler/recipes-core/dbus/dbus_%.bbappend index f4747a8b8c6..83b7c99c4a1 100644 --- a/meta-openeuler/recipes-core/dbus/dbus_%.bbappend +++ b/meta-openeuler/recipes-core/dbus/dbus_%.bbappend @@ -67,3 +67,5 @@ do_install() { # Remove /var/run as it is created on startup rm -rf ${D}${localstatedir}/run } + +ASSUME_PROVIDE_PKGS = "dbus dbus-common dbus-daemon dbus-libs dbus-tools" diff --git a/meta-openeuler/recipes-core/expat/expat_%.bbappend b/meta-openeuler/recipes-core/expat/expat_%.bbappend index 9312493cf74..b657dc2a451 100644 --- a/meta-openeuler/recipes-core/expat/expat_%.bbappend +++ b/meta-openeuler/recipes-core/expat/expat_%.bbappend @@ -48,3 +48,5 @@ SRC_URI = " \ file://backport-Stop-updating-m_eventPtr-on-exit-for-reentry.patch \ file://backport-Make-parser-m_eventPtr-handling-clearer.patch \ " + +ASSUME_PROVIDE_PKGS = "expat" diff --git a/meta-openeuler/recipes-core/gettext/gettext_%.bbappend b/meta-openeuler/recipes-core/gettext/gettext_%.bbappend index 63fe65e9533..2fb65ce1417 100644 --- a/meta-openeuler/recipes-core/gettext/gettext_%.bbappend +++ b/meta-openeuler/recipes-core/gettext/gettext_%.bbappend @@ -1 +1,3 @@ require gettext-openeuler-src.inc + +ASSUME_PROVIDE_PKGS = "gettext" diff --git a/meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend b/meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend index 19ebce8be67..1c9eebd55f5 100644 --- a/meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend +++ b/meta-openeuler/recipes-core/glib-2.0/glib-2.0_%.bbappend @@ -92,3 +92,5 @@ do_install:append () { chrpath --delete ${D}${libdir}/libgmodule-2.0.so fi } + +ASSUME_PROVIDE_PKGS = "glib2" diff --git a/meta-openeuler/recipes-core/kbd/kbd_%.bbappend b/meta-openeuler/recipes-core/kbd/kbd_%.bbappend index 37cc5d6fce4..3010d8dedde 100644 --- a/meta-openeuler/recipes-core/kbd/kbd_%.bbappend +++ b/meta-openeuler/recipes-core/kbd/kbd_%.bbappend @@ -19,3 +19,5 @@ SRC_URI:prepend = "file://${BP}.tar.xz \ SRC_URI[sha256sum] = "ccdf452387a6380973d2927363e9cbb939fa2068915a6f937ff9d24522024683" EXTRA_OECONF = "--disable-tests" + +ASSUME_PROVIDE_PKGS = "kbd" diff --git a/meta-openeuler/recipes-core/libseccomp/libseccomp_%.bbappend b/meta-openeuler/recipes-core/libseccomp/libseccomp_%.bbappend index 2d2e9469521..74a1e238aa5 100644 --- a/meta-openeuler/recipes-core/libseccomp/libseccomp_%.bbappend +++ b/meta-openeuler/recipes-core/libseccomp/libseccomp_%.bbappend @@ -11,3 +11,5 @@ SRC_URI:prepend = " \ " S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "libseccomp" diff --git a/meta-openeuler/recipes-core/libxcrypt/libxcrypt_%.bbappend b/meta-openeuler/recipes-core/libxcrypt/libxcrypt_%.bbappend index 885a653568d..6f5ca5e6e1c 100644 --- a/meta-openeuler/recipes-core/libxcrypt/libxcrypt_%.bbappend +++ b/meta-openeuler/recipes-core/libxcrypt/libxcrypt_%.bbappend @@ -9,3 +9,5 @@ SRC_URI:prepend = "file://v${PV}.tar.gz \ " S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "libxcrypt" diff --git a/meta-openeuler/recipes-core/libxml/libxml2_%.bbappend b/meta-openeuler/recipes-core/libxml/libxml2_%.bbappend index 72e55ce108a..96df6f81e7b 100644 --- a/meta-openeuler/recipes-core/libxml/libxml2_%.bbappend +++ b/meta-openeuler/recipes-core/libxml/libxml2_%.bbappend @@ -14,3 +14,5 @@ SRC_URI = "file://${BP}.tar.xz \ do_configure:remove() { find ${S}/xmlconf/ -type f -exec chmod -x {} \+ } + +ASSUME_PROVIDE_PKGS = "libxml2" diff --git a/meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend b/meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend index 472b5bff5ea..16be73cf2dc 100644 --- a/meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend +++ b/meta-openeuler/recipes-core/ncurses/ncurses_%.bbappend @@ -31,3 +31,5 @@ SRC_URI += "\ " S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "ncurses-libs ncurses-base ncureses" diff --git a/meta-openeuler/recipes-core/os-release/os-release.bbappend b/meta-openeuler/recipes-core/os-release/os-release.bbappend index 6b67f0cc39a..49c243ebcb2 100644 --- a/meta-openeuler/recipes-core/os-release/os-release.bbappend +++ b/meta-openeuler/recipes-core/os-release/os-release.bbappend @@ -25,3 +25,5 @@ OS_RELEASE_FIELDS:append = " BUILD_ID OEE_REVISION" # Ensure the git commands run every time bitbake is invoked. BB_DONT_CACHE = "1" + +ASSUME_PROVIDE_PKGS:${PN} = "openEuler-repos openEuler-release openEuler-gpg-keys" diff --git a/meta-openeuler/recipes-core/readline/readline_%.bbappend b/meta-openeuler/recipes-core/readline/readline_%.bbappend index 9be421e9774..361e13de8d5 100644 --- a/meta-openeuler/recipes-core/readline/readline_%.bbappend +++ b/meta-openeuler/recipes-core/readline/readline_%.bbappend @@ -20,3 +20,5 @@ SRC_URI[archive.sha256sum] = "a3d4637cdbd76f3cbc9566db90306a6af7bef90b291f7c9bc5 # diff from oe 8.2 bb # see: http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-core/readline/readline.inc EXTRA_OECONF += "bash_cv_termcap_lib=ncurses --with-shared-termcap-library" + +ASSUME_PROVIDE_PKGS = "readline" diff --git a/meta-openeuler/recipes-core/selinux/libselinux_%.bbappend b/meta-openeuler/recipes-core/selinux/libselinux_%.bbappend index 5e9bc3edde6..f87957a345f 100644 --- a/meta-openeuler/recipes-core/selinux/libselinux_%.bbappend +++ b/meta-openeuler/recipes-core/selinux/libselinux_%.bbappend @@ -17,3 +17,5 @@ SRC_URI:prepend = "file://${BP}.tar.gz \ SRC_URI += "file://0003-libselinux-restore-drop-the-obsolete-LSF-transitiona.patch" S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "libselinux" diff --git a/meta-openeuler/recipes-core/selinux/libsemanage_%.bbappend b/meta-openeuler/recipes-core/selinux/libsemanage_%.bbappend index 5ce627be50f..e6cc06c8e52 100644 --- a/meta-openeuler/recipes-core/selinux/libsemanage_%.bbappend +++ b/meta-openeuler/recipes-core/selinux/libsemanage_%.bbappend @@ -8,3 +8,5 @@ SRC_URI:prepend = "file://${BP}.tar.gz \ " S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "libsemanage" diff --git a/meta-openeuler/recipes-core/selinux/libsepol_%.bbappend b/meta-openeuler/recipes-core/selinux/libsepol_%.bbappend index 57df5c07230..e73a4ae1dca 100644 --- a/meta-openeuler/recipes-core/selinux/libsepol_%.bbappend +++ b/meta-openeuler/recipes-core/selinux/libsepol_%.bbappend @@ -10,3 +10,5 @@ SRC_URI:prepend = "file://${BP}.tar.gz \ " S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "libsepol" diff --git a/meta-openeuler/recipes-core/systemd/systemd_253.7.bb b/meta-openeuler/recipes-core/systemd/systemd_253.7.bb index 1fd4556afd0..09c732c7a61 100644 --- a/meta-openeuler/recipes-core/systemd/systemd_253.7.bb +++ b/meta-openeuler/recipes-core/systemd/systemd_253.7.bb @@ -834,3 +834,5 @@ pkg_postinst:udev-hwdb () { pkg_prerm:udev-hwdb () { rm -f $D${sysconfdir}/udev/hwdb.bin } + +ASSUME_PROVIDE_PKGS = "systemd systemd-libs systemd-udev" diff --git a/meta-openeuler/recipes-core/tzdata/tzdata.bbappend b/meta-openeuler/recipes-core/tzdata/tzdata.bbappend index 64c02360040..079c9aa4d3d 100644 --- a/meta-openeuler/recipes-core/tzdata/tzdata.bbappend +++ b/meta-openeuler/recipes-core/tzdata/tzdata.bbappend @@ -59,3 +59,5 @@ do_install:openeuler-prebuilt() { chown -R root:root ${D} } + +ASSUME_PROVIDE_PKGS = "tzdata" diff --git a/meta-openeuler/recipes-core/util-linux/util-linux-libuuid_%.bbappend b/meta-openeuler/recipes-core/util-linux/util-linux-libuuid_%.bbappend index 239a0648726..a75b7bcf4bb 100644 --- a/meta-openeuler/recipes-core/util-linux/util-linux-libuuid_%.bbappend +++ b/meta-openeuler/recipes-core/util-linux/util-linux-libuuid_%.bbappend @@ -2,3 +2,5 @@ require util-linux-common.inc # code is the same with util-linux OPENEULER_LOCAL_NAME = "util-linux" + +ASSUME_PROVIDE_PKGS = "libuuid" diff --git a/meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend b/meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend index a81d337b4fa..fc0f005524b 100644 --- a/meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend +++ b/meta-openeuler/recipes-core/util-linux/util-linux_%.bbappend @@ -5,3 +5,5 @@ PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" RRECOMMENDS:${PN}-ptest += " kernel-module-algif-hash " ALTERNATIVE_LINK_NAME[ipcrm] = "${bindir}/ipcrm" ALTERNATIVE_LINK_NAME[ipcs] = "${bindir}/ipcs" + +ASSUME_PROVIDE_PKGS = "libsmartcols libmount libblkid libfdisk util-linux" diff --git a/meta-openeuler/recipes-core/zlib/zlib_%.bbappend b/meta-openeuler/recipes-core/zlib/zlib_%.bbappend index 20885f34d81..a648753fac7 100644 --- a/meta-openeuler/recipes-core/zlib/zlib_%.bbappend +++ b/meta-openeuler/recipes-core/zlib/zlib_%.bbappend @@ -24,3 +24,5 @@ do_configure() { LDCONFIG=true ${S}/configure --prefix=${prefix} --shared --libdir=${libdir} --uname=GNU } do_configure[cleandirs] += "${B}" + +ASSUME_PROVIDE_PKGS = "zlib" diff --git a/meta-openeuler/recipes-devtools/dnf/dnf_%.bbappend b/meta-openeuler/recipes-devtools/dnf/dnf_%.bbappend index 929824bdb94..80454224fd4 100644 --- a/meta-openeuler/recipes-devtools/dnf/dnf_%.bbappend +++ b/meta-openeuler/recipes-devtools/dnf/dnf_%.bbappend @@ -43,7 +43,7 @@ FILES:${PN}:append:class-target = " \ do_install:append:class-target() { mkdir -p ${D}/etc/yum.repos.d/ || echo "" - local version_dir="openEuler-${DISTRO_VERSION}" + local version_dir="${@bb.utils.contains("DISTRO_FEATURES", "oebridge", "${SERVER_VERSION}", "openEuler-${DISTRO_VERSION}", d)}" sed -i "s/OPENEULER_VER/${version_dir}/g" ${WORKDIR}/openEuler.repo cp -f ${WORKDIR}/openEuler.repo ${D}/etc/yum.repos.d/ } diff --git a/meta-openeuler/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend b/meta-openeuler/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend index a46f8a77cbc..6f24d1dc306 100644 --- a/meta-openeuler/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend +++ b/meta-openeuler/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend @@ -35,3 +35,5 @@ SRC_URI += " \ SRC_URI[sha256sum] = "144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db" EXTRA_OECONF += "--enable-largefile" + +ASSUME_PROVIDE_PKGS = "e2fsprogs e2fsprogs-help" diff --git a/meta-openeuler/recipes-devtools/file/file_%.bbappend b/meta-openeuler/recipes-devtools/file/file_%.bbappend index 09d81c0db10..763d64d40c8 100644 --- a/meta-openeuler/recipes-devtools/file/file_%.bbappend +++ b/meta-openeuler/recipes-devtools/file/file_%.bbappend @@ -7,3 +7,5 @@ SRC_URI = " \ file://0001-file-localmagic.patch \ " SRC_URI[sha256sum] = "3751c7fba8dbc831cb8d7cc8aff21035459b8ce5155ef8b0880a27d028475f3b" + +ASSUME_PROVIDE_PKGS = "file-libs file" diff --git a/meta-openeuler/recipes-extended/bash/bash_%.bbappend b/meta-openeuler/recipes-extended/bash/bash_%.bbappend index 9c7ae5d3085..03d6ef1feb7 100644 --- a/meta-openeuler/recipes-extended/bash/bash_%.bbappend +++ b/meta-openeuler/recipes-extended/bash/bash_%.bbappend @@ -46,3 +46,5 @@ SRC_URI[tarball.sha256sum] = "13720965b5f4fc3a0d4b61dd37e7565c741da9a5be24edc2ae # When testing the performance of the shell using UnixBench, we found that the sh of busybox(ash) # outperformed bash, so we still make sh link to busybox instead of bash. ALTERNATIVE:${PN}:remove = "sh" + +ASSUME_PROVIDE_PKGS = "bash" diff --git a/meta-openeuler/recipes-extended/bc/bc_%.bbappend b/meta-openeuler/recipes-extended/bc/bc_%.bbappend index 2fe564c4360..b3c2749842e 100644 --- a/meta-openeuler/recipes-extended/bc/bc_%.bbappend +++ b/meta-openeuler/recipes-extended/bc/bc_%.bbappend @@ -1 +1,3 @@ SRC_URI:prepend = " file://${BP}.tar.gz " + +ASSUME_PROVIDE_PKGS = "bc" diff --git a/meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend b/meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend index 329cab5e552..fcdecf37301 100644 --- a/meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend +++ b/meta-openeuler/recipes-extended/bzip2/bzip2_%.bbappend @@ -14,3 +14,5 @@ SRC_URI:append = " \ file://0003-license-and-version-print-should-output-to-stdout-and-exit-with-code-0.patch \ file://bzip2-1.0.8-toolchain-variable.patch \ " + +ASSUME_PROVIDE_PKGS = "bzip2" diff --git a/meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend b/meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend index daefd6f5829..0363ac01276 100644 --- a/meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend +++ b/meta-openeuler/recipes-extended/cracklib/cracklib_%.bbappend @@ -30,3 +30,5 @@ do_configure:prepend() { SRC_URI[md5sum] = "48a0c8810ec4780b99c0a4f9931c21c6" SRC_URI[sha256sum] = "8b6fd202f3f1d8fa395d3b7a5d821227cfd8bb4a9a584a7ae30cf62cea6287dd" + +ASSUME_PROVIDE_PKGS = "cracklib" diff --git a/meta-openeuler/recipes-extended/cronie/cronie_%.bbappend b/meta-openeuler/recipes-extended/cronie/cronie_%.bbappend index be3073edb08..503f15d8a6a 100644 --- a/meta-openeuler/recipes-extended/cronie/cronie_%.bbappend +++ b/meta-openeuler/recipes-extended/cronie/cronie_%.bbappend @@ -9,3 +9,5 @@ SRC_URI += " \ SRC_URI[md5sum] = "de07b7229520bc859d987c721bab87c5" SRC_URI[sha256sum] = "2cd0f0dd1680e6b9c39bf1e3a5e7ad6df76aa940de1ee90a453633aa59984e62" + +ASSUME_PROVIDE_PKGS ="crontabs cronie" diff --git a/meta-openeuler/recipes-extended/findutils/findutils_%.bbappend b/meta-openeuler/recipes-extended/findutils/findutils_%.bbappend index 4405fff7e17..ca23b453d65 100644 --- a/meta-openeuler/recipes-extended/findutils/findutils_%.bbappend +++ b/meta-openeuler/recipes-extended/findutils/findutils_%.bbappend @@ -9,3 +9,5 @@ SRC_URI += " \ " SRC_URI[sha256sum] = "a2bfb8c09d436770edc59f50fa483e785b161a3b7b9d547573cb08065fd462fe" + +ASSUME_PROVIDE_PKGS = "findutils" diff --git a/meta-openeuler/recipes-extended/gawk/gawk_%.bbappend b/meta-openeuler/recipes-extended/gawk/gawk_%.bbappend index d0bf517322b..ea9e56ac2fe 100644 --- a/meta-openeuler/recipes-extended/gawk/gawk_%.bbappend +++ b/meta-openeuler/recipes-extended/gawk/gawk_%.bbappend @@ -20,3 +20,4 @@ SRC_URI:prepend = " \ SRC_URI[md5sum] = "2f724d925873fc82f5e7b1d605ba9a42" SRC_URI[sha256sum] = "e4ddbad1c2ef10e8e815ca80208d0162d4c983e6cca16f925e8418632d639018" +ASSUME_PROVIDE_PKGS = "gawk" diff --git a/meta-openeuler/recipes-extended/grep/grep_%.bbappend b/meta-openeuler/recipes-extended/grep/grep_%.bbappend index f27fd6c9d66..1dea9886b6d 100644 --- a/meta-openeuler/recipes-extended/grep/grep_%.bbappend +++ b/meta-openeuler/recipes-extended/grep/grep_%.bbappend @@ -17,3 +17,5 @@ SRC_URI:prepend = " \ " SRC_URI[sha256sum] = "498d7cc1b4fb081904d87343febb73475cf771e424fb7e6141aff66013abc382" + +ASSUME_PROVIDE_PKGS = "grep" diff --git a/meta-openeuler/recipes-extended/groff/groff_%.bbappend b/meta-openeuler/recipes-extended/groff/groff_%.bbappend index 3ca3594f546..6c8f502198d 100644 --- a/meta-openeuler/recipes-extended/groff/groff_%.bbappend +++ b/meta-openeuler/recipes-extended/groff/groff_%.bbappend @@ -45,3 +45,5 @@ do_install:append() { # strip hosttool path out of generated files sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${docdir}/${BP}/examples/hdtbl/*.roff } + +ASSUME_PROVIDE_PKGS = "groff-base" diff --git a/meta-openeuler/recipes-extended/gzip/gzip_%.bbappend b/meta-openeuler/recipes-extended/gzip/gzip_%.bbappend index 3e9f2ad6db6..9edcb2f3c3a 100644 --- a/meta-openeuler/recipes-extended/gzip/gzip_%.bbappend +++ b/meta-openeuler/recipes-extended/gzip/gzip_%.bbappend @@ -15,3 +15,5 @@ SRC_URI:prepend = "file://${BP}.tar.xz \ SRC_URI[sha256sum] = "ce5e03e519f637e1f814011ace35c4f87b33c0bbabeec35baf5fbd3479e91956" + +ASSUME_PROVIDE_PKGS = "gzip" diff --git a/meta-openeuler/recipes-extended/less/less_%.bbappend b/meta-openeuler/recipes-extended/less/less_%.bbappend index 4ee6a260e98..e62051da990 100644 --- a/meta-openeuler/recipes-extended/less/less_%.bbappend +++ b/meta-openeuler/recipes-extended/less/less_%.bbappend @@ -26,3 +26,5 @@ CAUSE_CONFIGURE_ERR = " \ SRC_URI[md5sum] = "1cdec714569d830a68f4cff11203cdba" SRC_URI[sha256sum] = "a69abe2e0a126777e021d3b73aa3222e1b261f10e64624d41ec079685a6ac209" + +ASSUME_PROVIDE_PKGS = "less" diff --git a/meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend b/meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend index 73805e62476..d2bea962db5 100644 --- a/meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend +++ b/meta-openeuler/recipes-extended/libnsl/libnsl2_%.bbappend @@ -12,3 +12,5 @@ SRC_URI:append = " \ SRC_URI[tarball.md5sum] = "e1ee6772c2ee5ddc25ea465a33af3004" SRC_URI[tarball.sha256sum] = "eb37be57c1cf650b3a8a4fc7cd66c8b3dfc06215b41956a16325a9388171bc40" + +ASSUME_PROVIDE_PKGS = "libnsl2" diff --git a/meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend b/meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend index 7082ba88517..e0f821168dc 100644 --- a/meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend +++ b/meta-openeuler/recipes-extended/libtirpc/libtirpc_%.bbappend @@ -21,3 +21,5 @@ PACKAGECONFIG ??= "\ " PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" PACKAGECONFIG[gssapi] = "--enable-gssapi,--disable-gssapi,krb5" + +ASSUME_PROVIDE_PKGS = "libtirpc" diff --git a/meta-openeuler/recipes-extended/pam/libpam_%.bbappend b/meta-openeuler/recipes-extended/pam/libpam_%.bbappend index 5dff24b239c..85e07c5548c 100644 --- a/meta-openeuler/recipes-extended/pam/libpam_%.bbappend +++ b/meta-openeuler/recipes-extended/pam/libpam_%.bbappend @@ -115,4 +115,6 @@ do_install_ptest() { ANY_OF_DISTRO_FEATURES = "pam systemd" -# ============= end from 1.5.3.bb ============= \ No newline at end of file +# ============= end from 1.5.3.bb ============= + +ASSUME_PROVIDE_PKGS = "pam" diff --git a/meta-openeuler/recipes-extended/pigz/pigz_%.bbappend b/meta-openeuler/recipes-extended/pigz/pigz_%.bbappend index bc496eb5f77..e9d82f76733 100644 --- a/meta-openeuler/recipes-extended/pigz/pigz_%.bbappend +++ b/meta-openeuler/recipes-extended/pigz/pigz_%.bbappend @@ -7,3 +7,4 @@ SRC_URI:prepend = " file://${BP}.tar.gz \ " SRC_URI[sha256sum] = "d2045087dae5e9482158f1f1c0f21c7d3de6f7cdc7cc5848bdabda544e69aa58" +ASSUME_PROVIDE_PKGS = "pigz" diff --git a/meta-openeuler/recipes-extended/procps/procps_%.bbappend b/meta-openeuler/recipes-extended/procps/procps_%.bbappend index b143b146190..87ed6b6d076 100644 --- a/meta-openeuler/recipes-extended/procps/procps_%.bbappend +++ b/meta-openeuler/recipes-extended/procps/procps_%.bbappend @@ -45,3 +45,5 @@ do_configure:prepend() { } SRC_URI[sha256sum] = "ee3fcd2ea6ff94aa43a81ba5cc7912b7c9615acd2911c7a3d3ea081287fdf47a" + +ASSUME_PROVIDE_PKGS = "procps" diff --git a/meta-openeuler/recipes-extended/sed/sed_%.bbappend b/meta-openeuler/recipes-extended/sed/sed_%.bbappend index 46bb708733b..2ff36e296f4 100644 --- a/meta-openeuler/recipes-extended/sed/sed_%.bbappend +++ b/meta-openeuler/recipes-extended/sed/sed_%.bbappend @@ -12,3 +12,5 @@ SRC_URI += " \ file://sed/backport-sed-c-flag.patch \ file://backport-sed-fix-symlink-bufsize-readlink-check.patch \ " + +ASSUME_PROVIDE_PKGS = "sed" diff --git a/meta-openeuler/recipes-extended/shadow/shadow_%.bbappend b/meta-openeuler/recipes-extended/shadow/shadow_%.bbappend index 3ddbfd08f88..1040db9cd8c 100644 --- a/meta-openeuler/recipes-extended/shadow/shadow_%.bbappend +++ b/meta-openeuler/recipes-extended/shadow/shadow_%.bbappend @@ -101,3 +101,5 @@ INSANE_SKIP:${PN}:class-native = "already-stripped" # keep as 4.13 recipe PAM_PLUGINS:remove = "pam-plugin-lastlog" + +ASSUME_PROVIDE_PKGS = "shadow shadow-subid-devel" diff --git a/meta-openeuler/recipes-extended/texinfo/texinfo_%.bbappend b/meta-openeuler/recipes-extended/texinfo/texinfo_%.bbappend index b1aa23637c4..e38a2e19eab 100644 --- a/meta-openeuler/recipes-extended/texinfo/texinfo_%.bbappend +++ b/meta-openeuler/recipes-extended/texinfo/texinfo_%.bbappend @@ -22,3 +22,5 @@ FILES:${PN}-doc = "${infodir}/texi* \ ${mandir}/man1 ${mandir}/man5" S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "info openEuler-gpg-keys" diff --git a/meta-openeuler/recipes-extended/xz/xz_%.bbappend b/meta-openeuler/recipes-extended/xz/xz_%.bbappend index ba09920f7b9..dfdd89b5b8f 100644 --- a/meta-openeuler/recipes-extended/xz/xz_%.bbappend +++ b/meta-openeuler/recipes-extended/xz/xz_%.bbappend @@ -11,4 +11,6 @@ PV = "5.4.4" SRC_URI += " \ file://${BP}.tar.xz \ -" \ No newline at end of file +" + +ASSUME_PROVIDE_PKGS = "xz-libs xz" diff --git a/meta-openeuler/recipes-external/gcc/gcc-runtime-external.bb b/meta-openeuler/recipes-external/gcc/gcc-runtime-external.bb index 183f1076d0e..eafc7d1f864 100644 --- a/meta-openeuler/recipes-external/gcc/gcc-runtime-external.bb +++ b/meta-openeuler/recipes-external/gcc/gcc-runtime-external.bb @@ -115,4 +115,6 @@ do_deploy_source_date_epoch () { else echo "${SDE_FILE} not found!" fi -} \ No newline at end of file +} + +ASSUME_PROVIDE_PKGS = "libstdc++ libgomp" diff --git a/meta-openeuler/recipes-external/gcc/libgcc-external.bb b/meta-openeuler/recipes-external/gcc/libgcc-external.bb index 699e5936106..5c01dde6691 100644 --- a/meta-openeuler/recipes-external/gcc/libgcc-external.bb +++ b/meta-openeuler/recipes-external/gcc/libgcc-external.bb @@ -89,3 +89,5 @@ python add_sys_symlink () { pn = d.getVar('PN') d.appendVar('FILES:%s-dev' % pn, ' ${libdir}/${TARGET_SYS}') } + +ASSUME_PROVIDE_PKGS = "libgcc" diff --git a/meta-openeuler/recipes-external/glibc/glibc-external.bb b/meta-openeuler/recipes-external/glibc/glibc-external.bb index fe23c694633..26a2fdfb888 100644 --- a/meta-openeuler/recipes-external/glibc/glibc-external.bb +++ b/meta-openeuler/recipes-external/glibc/glibc-external.bb @@ -302,3 +302,5 @@ RDEPENDS:${PN}-dev:remove = "${LINUX_LIBC_RDEP_REMOVE}" FILES:${PN}-dev:remove = "${base_libdir}/*_nonshared.a ${libdir}/*_nonshared.a" FILES:${PN}-dev += "${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a ${libdir}/libmvec_nonshared.a" + +ASSUME_PROVIDE_PKGS:${PN} = "glibc glibc-common" diff --git a/meta-openeuler/recipes-graphics/xorg-lib/libxkbcommon_%.bbappend b/meta-openeuler/recipes-graphics/xorg-lib/libxkbcommon_%.bbappend index 044b2d6a93c..ceb3905685d 100644 --- a/meta-openeuler/recipes-graphics/xorg-lib/libxkbcommon_%.bbappend +++ b/meta-openeuler/recipes-graphics/xorg-lib/libxkbcommon_%.bbappend @@ -9,3 +9,5 @@ SRC_URI[sha256sum] = "0edc14eccdd391514458bc5f5a4b99863ed2d651e4dd761a90abf4f46e inherit bash-completion BBCLASSEXTEND += "native" CVE_PRODUCT += "xkbcommon:libxkbcommon" + +ASSUME_PROVIDE_PKGS = "libxkcommon" diff --git a/meta-openeuler/recipes-graphics/xorg-lib/xkeyboard-config_%.bbappend b/meta-openeuler/recipes-graphics/xorg-lib/xkeyboard-config_%.bbappend index db4ffd6f5b0..32b1b082e5f 100644 --- a/meta-openeuler/recipes-graphics/xorg-lib/xkeyboard-config_%.bbappend +++ b/meta-openeuler/recipes-graphics/xorg-lib/xkeyboard-config_%.bbappend @@ -9,3 +9,5 @@ SRC_URI:prepend = " \ " BBCLASSEXTEND += "native" + +ASSUME_PROVIDE_PKGS = "xkeyboard-config" diff --git a/meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend b/meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend index 8604ed058a7..84405933809 100644 --- a/meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend +++ b/meta-openeuler/recipes-kernel/kmod/kmod_%.bbappend @@ -19,3 +19,5 @@ SRC_URI[sha256sum] = "f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5 # yocto-poky specifies 'S = "${WORKDIR}/git', but since we are using the openeuler package, # we need to re-specify it S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "kmod kmod-libs" diff --git a/meta-openeuler/recipes-multimedia/libpng/libpng_%.bbappend b/meta-openeuler/recipes-multimedia/libpng/libpng_%.bbappend index 7952139256c..276ef557a38 100644 --- a/meta-openeuler/recipes-multimedia/libpng/libpng_%.bbappend +++ b/meta-openeuler/recipes-multimedia/libpng/libpng_%.bbappend @@ -6,3 +6,4 @@ PV = "1.6.40" SRC_URI:prepend = "file://${BP}.tar.gz \ file://libpng-multilib.patch \ " +ASSUME_PROVIDE_PKGS = "libpng" diff --git a/meta-openeuler/recipes-support/acl/acl_%.bbappend b/meta-openeuler/recipes-support/acl/acl_%.bbappend index 033d110ce01..9b0bfe9e77e 100644 --- a/meta-openeuler/recipes-support/acl/acl_%.bbappend +++ b/meta-openeuler/recipes-support/acl/acl_%.bbappend @@ -11,3 +11,4 @@ SRC_URI:prepend = "file://${BP}.tar.gz \ # because PV is different, the md5 and sha256 should also be updated SRC_URI[md5sum] = "3cecb80cb0a52a0b273e6698ba642263" SRC_URI[sha256sum] = "760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af" +ASSUME_PROVIDE_PKGS = "libacl" diff --git a/meta-openeuler/recipes-support/attr/attr_%.bbappend b/meta-openeuler/recipes-support/attr/attr_%.bbappend index 00615899b23..1e42a8a3c82 100644 --- a/meta-openeuler/recipes-support/attr/attr_%.bbappend +++ b/meta-openeuler/recipes-support/attr/attr_%.bbappend @@ -10,3 +10,4 @@ SRC_URI += " \ file://0003-attr-eliminate-a-dead-store-in-attr_copy_action.patch \ file://0004-fix-stale-attr-references.patch \ " +ASSUME_PROVIDE_PKGS = "attr" diff --git a/meta-openeuler/recipes-support/ca-certificates/ca-certificates_2023.2.64.bb b/meta-openeuler/recipes-support/ca-certificates/ca-certificates_2023.2.64.bb index 597d7e5c07f..d7c04281d20 100644 --- a/meta-openeuler/recipes-support/ca-certificates/ca-certificates_2023.2.64.bb +++ b/meta-openeuler/recipes-support/ca-certificates/ca-certificates_2023.2.64.bb @@ -225,3 +225,5 @@ RDEPENDS:${PN} += "p11-kit" # support native and nativesdk BBCLASSEXTEND = "native nativesdk" + +ASSUME_PROVIDE_PKGS = "ca-certificates" diff --git a/meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend b/meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend index 07da6cc3fef..1752200d887 100644 --- a/meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend +++ b/meta-openeuler/recipes-support/gdbm/gdbm_%.bbappend @@ -26,3 +26,5 @@ SRC_URI[sha256sum] = "f366c823a6724af313b6bbe975b2809f9a157e5f6a43612a72949138d1 # openeuler patch need bison binary DEPENDS += "bison-native" + +ASSUME_PROVIDE_PKGS = "gdbm" diff --git a/meta-openeuler/recipes-support/gmp/gmp_%.bbappend b/meta-openeuler/recipes-support/gmp/gmp_%.bbappend index 0f20ae32adf..bf84259ef8f 100644 --- a/meta-openeuler/recipes-support/gmp/gmp_%.bbappend +++ b/meta-openeuler/recipes-support/gmp/gmp_%.bbappend @@ -14,3 +14,5 @@ SRC_URI:append = "file://${BP}.tar.xz \ SRC_URI[md5sum] = "956dc04e864001a9c22429f761f2c283" SRC_URI[sha256sum] = "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898" + +ASSUME_PROVIDE_PKGS = "gmp" diff --git a/meta-openeuler/recipes-support/gnutls/libtasn1_%.bbappend b/meta-openeuler/recipes-support/gnutls/libtasn1_%.bbappend index 8a4a0baca12..382d2033c24 100644 --- a/meta-openeuler/recipes-support/gnutls/libtasn1_%.bbappend +++ b/meta-openeuler/recipes-support/gnutls/libtasn1_%.bbappend @@ -1 +1,3 @@ SRC_URI:prepend = "file://${BP}.tar.gz " + +ASSUME_PROVIDE_PKGS = "libtasn1" diff --git a/meta-openeuler/recipes-support/libcap-ng/libcap-ng_%.bbappend b/meta-openeuler/recipes-support/libcap-ng/libcap-ng_%.bbappend index 3549b2f4c45..99ea1389b3b 100644 --- a/meta-openeuler/recipes-support/libcap-ng/libcap-ng_%.bbappend +++ b/meta-openeuler/recipes-support/libcap-ng/libcap-ng_%.bbappend @@ -12,3 +12,5 @@ SRC_URI:append = " \ " S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "libcap-ng" diff --git a/meta-openeuler/recipes-support/libcap/libcap_%.bbappend b/meta-openeuler/recipes-support/libcap/libcap_%.bbappend index 96bd55dcf57..89d8620840d 100644 --- a/meta-openeuler/recipes-support/libcap/libcap_%.bbappend +++ b/meta-openeuler/recipes-support/libcap/libcap_%.bbappend @@ -31,3 +31,5 @@ EXTRA_OEMAKE:class-target = " \ # The Go application for libcap does not currently support cross-compilation. # Turn it off so that it remains consistent with historical features. export GOLANG="no" + +ASSUME_PROVIDE_PKGS = "libcap" diff --git a/meta-openeuler/recipes-support/libevent/libevent_%.bbappend b/meta-openeuler/recipes-support/libevent/libevent_%.bbappend index 00f67cfcc74..6bd5af36d9f 100644 --- a/meta-openeuler/recipes-support/libevent/libevent_%.bbappend +++ b/meta-openeuler/recipes-support/libevent/libevent_%.bbappend @@ -16,6 +16,6 @@ SRC_URI:prepend = " \ file://backport-0002-Avoid-calling-read-2-on-eventfd-on-each-event-loop-w.patch \ file://0004-fix-function-undeclared.patch \ " - # unapplicable patches: # file://backport-Makefile-missing-test-dir.patch +ASSUME_PROVIDE_PKGS = "libevent" diff --git a/meta-openeuler/recipes-support/libffi/libffi_%.bbappend b/meta-openeuler/recipes-support/libffi/libffi_%.bbappend index cfd665de66f..7ee65c7f29c 100644 --- a/meta-openeuler/recipes-support/libffi/libffi_%.bbappend +++ b/meta-openeuler/recipes-support/libffi/libffi_%.bbappend @@ -6,3 +6,5 @@ SRC_URI:prepend = " \ file://fix-AARCH64EB-support.patch \ file://libffi-Add-sw64-architecture.patch \ " + +ASSUME_PROVIDE_PKGS = "libffi" diff --git a/meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend b/meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend index d0803c9a993..39cd6ca0daf 100644 --- a/meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend +++ b/meta-openeuler/recipes-support/libgcrypt/libgcrypt_%.bbappend @@ -8,3 +8,5 @@ SRC_URI:prepend = " \ file://Use-the-compiler-switch-O0-for-compiling-jitterentro.patch \ file://add-GCRY_MD_SM3_PGP-set-to-109.patch \ " + +ASSUME_PROVIDE_PKGS = "libgcrypt" diff --git a/meta-openeuler/recipes-support/libgpg-error/libgpg-error_%.bbappend b/meta-openeuler/recipes-support/libgpg-error/libgpg-error_%.bbappend index b43595c3a56..61d5d926d53 100644 --- a/meta-openeuler/recipes-support/libgpg-error/libgpg-error_%.bbappend +++ b/meta-openeuler/recipes-support/libgpg-error/libgpg-error_%.bbappend @@ -19,3 +19,5 @@ SRC_URI += "file://pkgconfig-fix.patch" SRC_URI:prepend = "file://${BP}.tar.gz \ file://libgpg-error-1.29-multilib.patch \ " + +ASSUME_PROVIDE_PKGS = "libgpg-error" diff --git a/meta-openeuler/recipes-support/libpcre/libpcre2_%.bbappend b/meta-openeuler/recipes-support/libpcre/libpcre2_%.bbappend index 14b292ae4ab..fd5db8d947d 100644 --- a/meta-openeuler/recipes-support/libpcre/libpcre2_%.bbappend +++ b/meta-openeuler/recipes-support/libpcre/libpcre2_%.bbappend @@ -42,3 +42,5 @@ SRC_URI:prepend = "file://pcre2-${PV}.tar.bz2 \ " SRC_URI[sha256sum] = "8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840" + +ASSUME_PROVIDE_PKGS = "pcre2" diff --git a/meta-openeuler/recipes-support/libunistring/libunistring_%.bbappend b/meta-openeuler/recipes-support/libunistring/libunistring_%.bbappend index f69beb7318a..44e6eae7a9d 100644 --- a/meta-openeuler/recipes-support/libunistring/libunistring_%.bbappend +++ b/meta-openeuler/recipes-support/libunistring/libunistring_%.bbappend @@ -10,4 +10,6 @@ SRC_URI:prepend = " \ SRC_URI[tarball.md5sum] = "db08bb384e81968957f997ec9808926e" SRC_URI[tarball.sha256sum] = "eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6" \ No newline at end of file +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6" + +ASSUME_PROVIDE_PKGS = "libunistring" diff --git a/meta-openeuler/recipes-support/lz4/lz4_%.bbappend b/meta-openeuler/recipes-support/lz4/lz4_%.bbappend index 9b7f39015ac..722bc38efb5 100644 --- a/meta-openeuler/recipes-support/lz4/lz4_%.bbappend +++ b/meta-openeuler/recipes-support/lz4/lz4_%.bbappend @@ -23,3 +23,5 @@ SRC_URI += " \ SRC_URI[tarball.md5sum] = "3a1ab1684e14fc1afc66228ce61b2db3" SRC_URI[tarball.sha256sum] = "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1" + +ASSUME_PROVIDE_PKGS = "lz4" diff --git a/meta-openeuler/recipes-support/mpfr/mpfr_%.bbappend b/meta-openeuler/recipes-support/mpfr/mpfr_%.bbappend index 385ad88fe7a..efd43a3cac3 100644 --- a/meta-openeuler/recipes-support/mpfr/mpfr_%.bbappend +++ b/meta-openeuler/recipes-support/mpfr/mpfr_%.bbappend @@ -8,4 +8,6 @@ SRC_URI:append = " \ SRC_URI[sha256sum] = "06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993" -DEPENDS = "gmp autoconf-archive-native" \ No newline at end of file +DEPENDS = "gmp autoconf-archive-native" + +ASSUME_PROVIDE_PKGS = "mpfr" diff --git a/meta-openeuler/recipes-support/p11-kit/p11-kit_%.bbappend b/meta-openeuler/recipes-support/p11-kit/p11-kit_%.bbappend index 93a33cd5a1e..61f3e2dd0e0 100644 --- a/meta-openeuler/recipes-support/p11-kit/p11-kit_%.bbappend +++ b/meta-openeuler/recipes-support/p11-kit/p11-kit_%.bbappend @@ -29,3 +29,5 @@ BBCLASSEXTEND += " native" # but if we do not include the path /usr/share/pki/ca-trust-source, # the trusted certificates installed by ca-certificates package will not be found. EXTRA_OEMESON += "-Dtrust_paths=/etc/pki/ca-trust/source:/usr/share/pki/ca-trust-source" + +ASSUME_PROVIDE_PKGS = "p11-kit p11-kit-trust" diff --git a/meta-openeuler/recipes-support/popt/popt_%.bbappend b/meta-openeuler/recipes-support/popt/popt_%.bbappend index 2955da3a909..6bfbde2d2aa 100644 --- a/meta-openeuler/recipes-support/popt/popt_%.bbappend +++ b/meta-openeuler/recipes-support/popt/popt_%.bbappend @@ -20,3 +20,5 @@ SRC_URI:prepend = "file://${BP}.tar.gz \ SRC_URI[md5sum] = "eaa2135fddb6eb03f2c87ee1823e5a78" SRC_URI[sha256sum] = "c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9" LIC_FILES_CHKSUM = "file://COPYING;md5=e0206ac9471d06667e076212db20c5f4" + +ASSUME_PROVIDE_PKGS = "popt" diff --git a/meta-openeuler/recipes-support/shared-mime-info/shared-mime-info_%.bbappend b/meta-openeuler/recipes-support/shared-mime-info/shared-mime-info_%.bbappend index 79d6a95fd7e..581b3e11d4e 100644 --- a/meta-openeuler/recipes-support/shared-mime-info/shared-mime-info_%.bbappend +++ b/meta-openeuler/recipes-support/shared-mime-info/shared-mime-info_%.bbappend @@ -18,3 +18,5 @@ SRC_URI:append = " \ " S = "${WORKDIR}/${BP}" + +ASSUME_PROVIDE_PKGS = "shared-mime-info" -- Gitee From 0c84459d1b3a5deb5fb93c31605d6114af368f0e Mon Sep 17 00:00:00 2001 From: hanzongcheng Date: Sun, 18 May 2025 06:29:08 +0800 Subject: [PATCH 4/5] oebridge: add gpgme to RDEPENDS * fix dnf running error: libgpgme.so.11 cannot open shared object file. Signed-off-by: hanzongcheng --- .../recipes-core/packagegroups/packagegroup-oebridge.bb | 1 + meta-openeuler/recipes-support/gpgme/gpgme_%.bbappend | 2 ++ 2 files changed, 3 insertions(+) diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb index b65c09d3b8e..2547a11f11b 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-oebridge.bb @@ -9,6 +9,7 @@ PACKAGES = "${PN}" RDEPENDS:${PN} = " \ glibc-external-utils \ libgpg-error \ + gpgme \ libgcrypt \ " diff --git a/meta-openeuler/recipes-support/gpgme/gpgme_%.bbappend b/meta-openeuler/recipes-support/gpgme/gpgme_%.bbappend index 0609771d1ab..ef0323ddaae 100644 --- a/meta-openeuler/recipes-support/gpgme/gpgme_%.bbappend +++ b/meta-openeuler/recipes-support/gpgme/gpgme_%.bbappend @@ -33,3 +33,5 @@ PYTHON_INHERIT = "${@bb.utils.contains('LANGUAGES', 'python', 'setuptools3-base' inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT} python3native multilib_header CACHED_CONFIGUREVARS:libc-musl = "ac_cv_sys_file_offset_bits=no" + +ASSUME_PROVIDE_PKGS = "gpgme" -- Gitee From b83334f674826392441a8af98a5a26ba2e39a18c Mon Sep 17 00:00:00 2001 From: hanzongcheng Date: Mon, 19 May 2025 03:21:25 +0800 Subject: [PATCH 5/5] oebridge: do not call image-oebridge in openeuler-image-common * openeuler-image-common.inc is the base for mcs image and live image. But these images do not need the oebridge. Call image-oebridge in image-common will result in additional package installations. It will also cause command conflicts. For example, oebridge currently installs gawk by default. But the live image lacks the gawk dependency(libgmp). Signed-off-by: hanzongcheng --- meta-openeuler/recipes-core/images/openeuler-image-common.inc | 3 --- meta-openeuler/recipes-core/images/openeuler-image.bb | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-openeuler/recipes-core/images/openeuler-image-common.inc b/meta-openeuler/recipes-core/images/openeuler-image-common.inc index f96f53247bb..b4a5e7e0758 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image-common.inc +++ b/meta-openeuler/recipes-core/images/openeuler-image-common.inc @@ -1,6 +1,3 @@ -# Add oebridge image configuration -inherit ${@bb.utils.contains('DISTRO_FEATURES', 'oebridge', 'image-oebridge', '', d)} - # openeuler standard image packages IMAGE_INSTALL = " \ packagegroup-core-boot \ diff --git a/meta-openeuler/recipes-core/images/openeuler-image.bb b/meta-openeuler/recipes-core/images/openeuler-image.bb index 9f828543df7..2b55bbfbb49 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image.bb +++ b/meta-openeuler/recipes-core/images/openeuler-image.bb @@ -7,6 +7,9 @@ # Here we provide configuration file image-early-config-${MACHINE}.inc to accommodate the variables that need # to be defined in advance as mentioned above include recipes-core/images/image-early-config-${MACHINE}.inc + +# Add oebridge image configuration +inherit ${@bb.utils.contains('DISTRO_FEATURES', 'oebridge', 'image-oebridge', '', d)} require openeuler-image-common.inc # packages added to rootfs and target sdk -- Gitee