diff --git a/.oebuild/features/oebridge-extra-repo.yaml b/.oebuild/features/oebridge-extra-repo.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9c3a3364c2bea55b9924aef44e13c0d3efa520c3 --- /dev/null +++ b/.oebuild/features/oebridge-extra-repo.yaml @@ -0,0 +1,7 @@ +type: feature + +local_conf: | + DISTRO_FEATURES:append = " oebridge oe-extra " + SERVER_MIRROR = "https://mirrors.tuna.tsinghua.edu.cn/openeuler" + SERVER_VERSION = "openEuler-24.03-LTS" + GLIBC_GENERATE_LOCALES:append = "en_US.UTF-8 zh_CN.UTF-8 " diff --git a/meta-openeuler/classes/image-oebridge.bbclass b/meta-openeuler/classes/image-oebridge.bbclass index d6027a074e7b11bccd0d6930d403c31a3185364d..38a136a1b9d176e7f88b1a7f94c434f385c4ca79 100644 --- a/meta-openeuler/classes/image-oebridge.bbclass +++ b/meta-openeuler/classes/image-oebridge.bbclass @@ -215,6 +215,13 @@ fakeroot python do_dnf_install_pkgs(){ run_cmd_with_cwd(f"PSEUDO_UNLOAD=1 sudo setfacl --restore=rootfs_permission", d.getVar("WORKDIR")+"/temp") run_cmd_with_cwd(f"cat rootfs_softlink | while read -r o p;do PSEUDO_UNLOAD=1 sudo chown -h \"$o\" \"$p\"; done", d.getVar("WORKDIR")+"/temp") + if "oe-extra" in d.getVar("DISTRO_FEATURES"): + # here add extra repo for installing pkgs from oepkgs.net, but the repo source is extras, like: + # https://repo.oepkgs.net/openeuler/rpm/openEuler-24.03-LTS/extras/aarch64/ + run_cmd_with_cwd(f"PSEUDO_UNLOAD=1 sudo chroot temp/rootfs dnf install \ + dnf-plugins-core -y --nogpgcheck --setopt=sslverify=0 --nobest", d.getVar("WORKDIR")) + extra_mirror = "https://repo.oepkgs.net/openeuler/rpm" + run_cmd_with_cwd(f"PSEUDO_UNLOAD=1 sudo chroot temp/rootfs dnf config-manager --add-repo {extra_mirror}/{d.getVar('SERVER_VERSION')}/extras/{d.getVar('TUNE_ARCH')}/", d.getVar("WORKDIR")) if len(real_list) > 0: real_list_str = " ".join(real_list) run_cmd_with_cwd(f"PSEUDO_UNLOAD=1 sudo chroot temp/rootfs dnf install \