[Buildroot] [PATCH 1/1] package/rust-coreutils: new package
Romain Naour
romain.naour at smile.fr
Mon May 23 10:12:59 UTC 2022
Hello Nicolas,
Le 19/05/2022 à 16:04, Nicolas Tran a écrit :
> rust-coreutils is a package from the Github project
> uutils/coreutils containing the equivalent of
> the GNU coreutils basic shell commands integrated
> in Rust language.
Is rust-coreutils package is a complete replacement for the GNU coreutils ?
> It can be convinient for purposes of Rust-written systems as
> it runs in a stable version of Rust.
>
> The package has been checked with correct formatting and
> without typos:
> $ ./utils/check-package package/rust-coreutils/*
>
> Tests have been run to ensure toolchain compatibilities:
> $ ./utils/test-pkg package/rust-coreutils
> bootlin-armv5-uclibc [1/6]: SKIPPED
> bootlin-armv7-glibc [2/6]: OK
> bootlin-armv7m-uclibc [3/6]: SKIPPED
> bootlin-x86-64-musl [4/6]: OK
> br-arm-full-static [5/6]: SKIPPED
> sourcery-arm [6/6]: OK
>
> Signed-off-by: Nicolas Tran <nicolas.tran at smile.fr>
> ---
> package/Config.in | 2 +-
> package/rust-coreutils/Config.in | 17 +++++++++++++++++
> package/rust-coreutils/rust-coreutils.hash | 3 +++
> package/rust-coreutils/rust-coreutils.mk | 12 ++++++++++++
> 4 files changed, 33 insertions(+), 1 deletion(-)
> create mode 100644 package/rust-coreutils/Config.in
> create mode 100644 package/rust-coreutils/rust-coreutils.hash
> create mode 100644 package/rust-coreutils/rust-coreutils.mk
Busybox package should depend on rust-coreutils if both packages are selected in
the configuration.
See noclobber install in busybox.mk
https://git.buildroot.net/buildroot/commit/?id=50dc350c65f4b1662ba986d6eb25b24a70c43128
Also, what about the conflict with (GNU) coreutils package itself ?
Do we want to convert coreutils to a virtual package [1].
We may have the same issue for each packages recoded into another language.
[1] https://nightly.buildroot.org/manual.html#_infrastructure_for_virtual_packages
>
> diff --git a/package/Config.in b/package/Config.in
> index 8892134133..94f92b35b4 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1,5 +1,4 @@
> menu "Target packages"
> -
> source "package/busybox/Config.in"
> source "package/skeleton/Config.in"
> source "package/skeleton-custom/Config.in"
> @@ -2579,6 +2578,7 @@ menu "System tools"
> source "package/rauc/Config.in"
> source "package/rsyslog/Config.in"
> source "package/runc/Config.in"
> + source "package/rust-coreutils/Config.in"
> source "package/s390-tools/Config.in"
> source "package/s6/Config.in"
> source "package/s6-linux-init/Config.in"
> diff --git a/package/rust-coreutils/Config.in b/package/rust-coreutils/Config.in
> new file mode 100644
> index 0000000000..af6e870709
> --- /dev/null
> +++ b/package/rust-coreutils/Config.in
> @@ -0,0 +1,17 @@
> +################################################################################
> +#
> +# rust-coreutils
> +#
> +################################################################################
> +
> +config BR2_PACKAGE_RUST_COREUTILS
> + bool "rust-coreutils"
> + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
"depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS" is missing
If coreutils is not converted to a virtual package, "depends on
!BR2_PACKAGE_COREUTILS" should be used here.
Best regards,
Romain
> + select BR2_PACKAGE_HOST_RUSTC
> + help
> + rust-coreutils is a package from the Github project
> + uutils/coreutils containing the equivalent of
> + the GNU coreutils basic shell commands integrated
> + in Rust language.
> +
> + https://github.com/uutils/coreutils
> diff --git a/package/rust-coreutils/rust-coreutils.hash b/package/rust-coreutils/rust-coreutils.hash
> new file mode 100644
> index 0000000000..065de0eec5
> --- /dev/null
> +++ b/package/rust-coreutils/rust-coreutils.hash
> @@ -0,0 +1,3 @@
> +# Locally generated
> +sha256 7cd05ebde1302a27e7a26430efc7d522b86e3d8f22ad606275a1a96485424e46 rust-coreutils-0.0.13.tar.gz
> +sha256 a836eb3360d0e80f6a1620495543ad2a4e20e4cf72af89ff528fccf9e63be81e LICENSE
> diff --git a/package/rust-coreutils/rust-coreutils.mk b/package/rust-coreutils/rust-coreutils.mk
> new file mode 100644
> index 0000000000..1296db0ff2
> --- /dev/null
> +++ b/package/rust-coreutils/rust-coreutils.mk
> @@ -0,0 +1,12 @@
> +################################################################################
> +#
> +# rust-coreutils
> +#
> +################################################################################
> +
> +RUST_COREUTILS_VERSION = 0.0.13
> +RUST_COREUTILS_SITE = $(call github,uutils,coreutils,$(RUST_COREUTILS_VERSION))
> +RUST_COREUTILS_LICENSE = MIT
> +RUST_COREUTILS_LICENSE_FILES = LICENSE
> +
> +$(eval $(cargo-package))
More information about the buildroot
mailing list