aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core
diff options
context:
space:
mode:
authorEtienne Cordonnier <ecordonnier@snap.com>2024-01-26 13:24:30 +0100
committerKhem Raj <raj.khem@gmail.com>2024-01-27 09:48:33 -0800
commit0bea9feffc93b1bdd29273ccb85fc87fee244d05 (patch)
tree7088171ccffe0d7b3d5a69bd3a57c0b69555fba7 /meta-oe/recipes-core
parent1d125e17798f055b32484ca95f004d05b8d45d4d (diff)
downloadmeta-openembedded-contrib-0bea9feffc93b1bdd29273ccb85fc87fee244d05.tar.gz
uutils_coreutils: merge .inc and .bb
I initially created a separated .inc file to follow poky's convention, but according to https://lists.openembedded.org/g/openembedded-core/message/193940 the presence of unneeded .inc files is only due to historical reasons and there is no need to follow this convention any more. Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core')
-rw-r--r--meta-oe/recipes-core/uutils-coreutils/uutils-coreutils.inc56
-rw-r--r--meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.24.bb56
2 files changed, 55 insertions, 57 deletions
diff --git a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils.inc b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils.inc
deleted file mode 100644
index 973b722ba3..0000000000
--- a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils.inc
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (c) 2022, Snap Inc.
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-PROVIDES = "coreutils"
-RPROVIDES:${PN} = "coreutils"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
-
-PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
-
-CARGO_BUILD_FLAGS += "--features unix"
-CARGO_BUILD_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', '--features feat_selinux', '', d)}"
-
-DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'clang-native libselinux-native', '', d)}"
-
-export LIBCLANG_PATH = "${WORKDIR}/recipe-sysroot-native${libdir}"
-export SELINUX_LIB_DIR = "${WORKDIR}/recipe-sysroot-native${libdir}"
-export SELINUX_INCLUDE_DIR = "${WORKDIR}/recipe-sysroot-native${includedir}"
-
-# The code which follows is strongly inspired from the GNU coreutils bitbake recipe:
-
-# [ df mktemp nice printenv base64 gets a special treatment and is not included in this
-bindir_progs = "[ arch basename cksum comm csplit cut dir dircolors dirname du \
- env expand expr factor fmt fold groups head hostid id install \
- join link logname md5sum mkfifo nl nohup nproc od paste pathchk \
- pinky pr printf ptx readlink realpath seq sha1sum sha224sum sha256sum \
- sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \
- tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
-
-bindir_progs += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'chcon runcon', '', d)}"
-
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
- mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
-
-sbindir_progs= "chroot"
-
-inherit update-alternatives
-
-# Higher than busybox (which uses 50)
-ALTERNATIVE_PRIORITY = "100"
-
-# Higher than net-tools (which uses 100)
-ALTERNATIVE_PRIORITY[hostname] = "110"
-
-ALTERNATIVE:${PN} = "${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base32 base64 nice printenv mktemp df"
-
-# Use the multicall binary named "coreutils" for symlinks
-ALTERNATIVE_TARGET = "${bindir}/coreutils"
-
-python __anonymous() {
- for prog in d.getVar('base_bindir_progs').split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
-
- for prog in d.getVar('sbindir_progs').split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
-}
diff --git a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.24.bb b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.24.bb
index 35af8a97df..775af5236c 100644
--- a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.24.bb
+++ b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.0.24.bb
@@ -1,3 +1,5 @@
+# Copyright (c) 2022, Snap Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust"
HOMEPAGE = "https://github.com/uutils/coreutils"
LICENSE = "MIT"
@@ -16,4 +18,56 @@ S = "${WORKDIR}/git"
require ${BPN}-crates.inc
-include uutils-coreutils.inc
+PROVIDES = "coreutils"
+RPROVIDES:${PN} = "coreutils"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
+
+PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
+
+CARGO_BUILD_FLAGS += "--features unix"
+CARGO_BUILD_FLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', '--features feat_selinux', '', d)}"
+
+DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'clang-native libselinux-native', '', d)}"
+
+export LIBCLANG_PATH = "${WORKDIR}/recipe-sysroot-native${libdir}"
+export SELINUX_LIB_DIR = "${WORKDIR}/recipe-sysroot-native${libdir}"
+export SELINUX_INCLUDE_DIR = "${WORKDIR}/recipe-sysroot-native${includedir}"
+
+# The code which follows is strongly inspired from the GNU coreutils bitbake recipe:
+
+# [ df mktemp nice printenv base64 gets a special treatment and is not included in this
+bindir_progs = "[ arch basename cksum comm csplit cut dir dircolors dirname du \
+ env expand expr factor fmt fold groups head hostid id install \
+ join link logname md5sum mkfifo nl nohup nproc od paste pathchk \
+ pinky pr printf ptx readlink realpath seq sha1sum sha224sum sha256sum \
+ sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \
+ tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
+
+bindir_progs += "${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'chcon runcon', '', d)}"
+
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
+ mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
+
+sbindir_progs= "chroot"
+
+inherit update-alternatives
+
+# Higher than busybox (which uses 50)
+ALTERNATIVE_PRIORITY = "100"
+
+# Higher than net-tools (which uses 100)
+ALTERNATIVE_PRIORITY[hostname] = "110"
+
+ALTERNATIVE:${PN} = "${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base32 base64 nice printenv mktemp df"
+
+# Use the multicall binary named "coreutils" for symlinks
+ALTERNATIVE_TARGET = "${bindir}/coreutils"
+
+python __anonymous() {
+ for prog in d.getVar('base_bindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
+
+ for prog in d.getVar('sbindir_progs').split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
+}