diff --git a/.oebuild/features/epkg.yaml b/.oebuild/features/epkg.yaml new file mode 100644 index 0000000000000000000000000000000000000000..addd9c0be0b065db3fc8810b00eeaa8ccad4dab2 --- /dev/null +++ b/.oebuild/features/epkg.yaml @@ -0,0 +1,4 @@ +type: feature + +local_conf: | + DISTRO_FEATURES:append = " epkg" diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index 5935886590772125e45e8c88a36d4759d4ab2c85..1410f3dd3df70e0cc3c99b4e3b3aac1cb21432c4 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -303,6 +303,9 @@ manifest_list: embedded-ipc: remote_url: https://gitee.com/openeuler/embedded-ipc.git version: 1e05e78e3d82fb2ef39e08a9e6fb3ca1cd918fcc + epkg: + remote_url: https://gitee.com/src-openeuler/epkg.git + version: 5b9de44c77acf397758d0c0c35ddcc6c5b0442ee ethercat-igh: remote_url: https://gitee.com/src-openeuler/ethercat-igh.git version: d117d0caba507895d0a8be5ade71f1b43fa470cb diff --git a/.oebuild/samples/aarch64/kp920-industry-kernel6.yaml b/.oebuild/samples/aarch64/kp920-industry-kernel6.yaml index 92f2620294d1bbf3f7c1f9c75b3977b3b3d51795..e51342db8b76a57473b8b46428aaf449ee268271 100644 --- a/.oebuild/samples/aarch64/kp920-industry-kernel6.yaml +++ b/.oebuild/samples/aarch64/kp920-industry-kernel6.yaml @@ -28,6 +28,7 @@ local_conf: |+ GLIBC_GENERATE_LOCALES:append = "en_US.UTF-8 zh_CN.UTF-8 " INIT_MANAGER = "systemd" + DISTRO_FEATURES:append = " epkg" layers: - yocto-meta-openeuler/bsp/meta-kunpeng diff --git a/.oebuild/samples/aarch64/kp920-industry.yaml b/.oebuild/samples/aarch64/kp920-industry.yaml index 43fdc92b55918dd6922f34a43c4d9d95aabc7576..9549a2ed46afdebb60309a7adc73ac59081dc880 100644 --- a/.oebuild/samples/aarch64/kp920-industry.yaml +++ b/.oebuild/samples/aarch64/kp920-industry.yaml @@ -24,6 +24,7 @@ local_conf: |+ GLIBC_GENERATE_LOCALES:append = "en_US.UTF-8 zh_CN.UTF-8 " INIT_MANAGER = "systemd" + DISTRO_FEATURES:append = " epkg" layers: - yocto-meta-openeuler/bsp/meta-kunpeng diff --git a/.oebuild/samples/aarch64/qemu-aarch64-kernel6.yaml b/.oebuild/samples/aarch64/qemu-aarch64-kernel6.yaml index f9e8c59f05a98e3cecc0cda29c2dbb2bc083dbf4..a825b452eba1cfe4c7ff842add4ad748558b5606 100644 --- a/.oebuild/samples/aarch64/qemu-aarch64-kernel6.yaml +++ b/.oebuild/samples/aarch64/qemu-aarch64-kernel6.yaml @@ -11,6 +11,7 @@ local_conf: |+ DISTRO_FEATURES:append = " kernel6 " PREFERRED_VERSION_linux-openeuler ?= "6.6%" PREFERRED_VERSION_linux-openeuler-rt ?= "6.6%" + DISTRO_FEATURES:append = " epkg" layers: [] docker_param: diff --git a/.oebuild/samples/aarch64/qemu-aarch64.yaml b/.oebuild/samples/aarch64/qemu-aarch64.yaml index 15845985a998f27d129a80a33d2f465978e7e4f4..0f4fbcd7789feb4ee5b296a9466749ba9e937372 100644 --- a/.oebuild/samples/aarch64/qemu-aarch64.yaml +++ b/.oebuild/samples/aarch64/qemu-aarch64.yaml @@ -7,6 +7,7 @@ repos: - yocto-meta-openembedded local_conf: |+ DISTRO_FEATURES:append = " isulad " + DISTRO_FEATURES:append = " epkg" layers: [] docker_param: diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bbappend b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bbappend index 3b5979dbaff3c4808896fb1776d4678a7ae067ad..f1d8030a046c2f3637ae24ffdad6bf8817642cf9 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bbappend +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-base-utils.bbappend @@ -86,6 +86,7 @@ RDEPENDS:${PN} = "\ libusb1 \ glib-2.0 \ libbfd \ + ${@bb.utils.contains('DISTRO_FEATURES', 'epkg', 'epkg', '', d)} \ " # riscv64 arch is not support kexec-tools, view yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.23.bb diff --git a/meta-openeuler/recipes-extended/epkg/epkg.bb b/meta-openeuler/recipes-extended/epkg/epkg.bb new file mode 100644 index 0000000000000000000000000000000000000000..2b53fa2974d48f6cbd9d7fbc850f2831dff2ab1d --- /dev/null +++ b/meta-openeuler/recipes-extended/epkg/epkg.bb @@ -0,0 +1,64 @@ +SUMMARY = "A new type of software package" +DESCRIPTION = "Install epkg" + +PV = "0.3.0" + +SRC_URI += " \ + file://${BPN}-${PV}.tar.gz \ + file://rootfs.tar.gz \ + " + +do_compile[noexec] = "1" + +LICENSE = "MulanPSL-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MulanPSL-2.0;md5=74b1b7a7ee537a16390ed514498bf23c" + +opt_epkg = "${D}/opt/epkg" +cache_root = "${opt_epkg}/cache" +store_root = "${opt_epkg}/store" +common_root = "${opt_epkg}/users/public/envs/common" +pkg_cache = "${opt_epkg}/cache/packages" +channel_cache = "${opt_epkg}/cache/channel" +rc_path = "${D}/etc/profile.d/epkg.sh" + +do_install:append() { + install -d ${opt_epkg} + install -d ${D}/etc/profile.d + install -d ${common_root}/profile-1/usr + install -d ${common_root}/profile-1/usr/lib + install -d ${common_root}/profile-1/etc/epkg + install -d ${common_root}/profile-1/usr/bin + install -d ${common_root}/profile-1/usr/bin + install -d ${cache_root} + + cd ${common_root}/profile-1 + ln -sT usr/bin bin + ln -sT usr/sbin sbin + ln -sT usr/lib lib + ln -sT usr/lib64 lib64 + cd ${common_root}/ + ln -sT profile-1 profile-current + + cp -a ${S} ${cache_root}/epkg-manager + rm -rf ${cache_root}/epkg-manager/target + + cp -a ${S}/bin ${common_root}/profile-1/usr/ + cp -a ${S}/lib/epkg ${common_root}/profile-1/usr/lib/ + cp -a ${S}/build ${opt_epkg} + + install -m 0755 ${S}/channel/openEuler-24.03-LTS-channel.yaml ${common_root}/profile-1/etc/epkg/channel.yaml + install -m 0755 ${WORKDIR}/rootfs/elf-loader-${TARGET_ARCH} ${common_root}/profile-1/usr/bin/elf-loader + install -m 0755 ${WORKDIR}/rootfs/epkg-${TARGET_ARCH} ${common_root}/profile-1/usr/bin/epkg + + chown -R root:root ${opt_epkg} + chmod -R 755 ${opt_epkg} + chmod 4755 ${common_root}/profile-1/usr/bin/epkg + + cat >${rc_path} <