Skip to contentSkip to conversation

package/uutils-coreutils: new package

PATCH Superseded Alexander Shirokov 1 participant 2 messages Apr 2, 2025

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v4 cover package/uutils-coreutils: new package

Hello Romain and All,

This is a continuation of the work started in [1] and [2], introducing:

- fresh version of uutils-coreutils (now 0.0.30).
- build fixes and improvements: excluding a package that injects the -m64 flag and breaks the ARM build, avoiding unnecessary rebuilding during installation, adding a flag to enable/disable the multicall binary.
- tests to ensure the binary is present and executable.

Any comments and suggestions are welcome.

Thank you!

Links:
[1] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
[2] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Alexander Shirokov (1):
package/uutils-coreutils: new package

 DEVELOPERS                                    |   3 +
 package/Config.in                             |   1 +
 package/busybox/busybox.mk                    |   1 +
 package/coreutils/Config.in                   |   1 +
 package/uutils-coreutils/Config.in            |  28 +++++
 .../uutils-coreutils/uutils-coreutils.hash    |   3 +
 package/uutils-coreutils/uutils-coreutils.mk  | 111 ++++++++++++++++++
 support/testing/tests/package/test_rust.py    |   9 ++
 8 files changed, 157 insertions(+)
 create mode 100644 package/uutils-coreutils/Config.in
 create mode 100644 package/uutils-coreutils/uutils-coreutils.hash
 create mode 100644 package/uutils-coreutils/uutils-coreutils.mk
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v4 1/1 package/uutils-coreutils: new package

This package is an implementation of coreutils written entirely in Rust.

uutils-coreutils is under active development and has known behavioral differences from GNU coreutils. Please use it with caution in production.

Currently defined functions:

[, b2sum, b3sum, base32, base64, basename, basenc, cat, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du, echo, env, expand, expr, factor, false, fmt, fold, hashsum, head, join, link, ln, ls, md5sum, mkdir, mktemp, more, mv, nl, numfmt, od, paste, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, rmdir, seq, sha1sum, sha224sum, sha256sum, sha3-224sum, sha3-256sum, sha3-384sum, sha3-512sum, sha384sum, sha3sum, sha512sum, shake128sum, shake256sum, shred, shuf, sleep, sort, split, sum, tac, tail, tee, test, touch, tr, true, truncate, tsort, unexpand, uniq, unlink, vdir, wc, yes

---
 DEVELOPERS                                    |   3 +
 package/Config.in                             |   1 +
 package/busybox/busybox.mk                    |   1 +
 package/coreutils/Config.in                   |   1 +
 package/uutils-coreutils/Config.in            |  28 +++++
 .../uutils-coreutils/uutils-coreutils.hash    |   3 +
 package/uutils-coreutils/uutils-coreutils.mk  | 111 ++++++++++++++++++
 support/testing/tests/package/test_rust.py    |   9 ++
 8 files changed, 157 insertions(+)
 create mode 100644 package/uutils-coreutils/Config.in
 create mode 100644 package/uutils-coreutils/uutils-coreutils.hash
 create mode 100644 package/uutils-coreutils/uutils-coreutils.mk
DEVELOPERS +3 -0
index a26a4cbe68..b31159d666 100644
@@ -2967,6 +2967,9 @@ F:	package/lrzip/
 N:	Sam Voss <[email protected]>
 F:	package/ripgrep/
 
+N:	Alexander Shirokov <[email protected]>
+F:	package/uutils-coreutils
+
 N:	Sébastien Szymanski <[email protected]>
 F:	board/armadeus/
 F:	configs/armadeus*
package/Config.in +1 -0
index eb22c81d1d..db478deba6 100644
@@ -2926,6 +2926,7 @@ menu "System tools"
 	source "package/tpm2-totp/Config.in"
 	source "package/unscd/Config.in"
 	source "package/util-linux/Config.in"
+	source "package/uutils-coreutils/Config.in"
 	source "package/watchdog/Config.in"
 	source "package/watchdogd/Config.in"
 	source "package/xdg-dbus-proxy/Config.in"
package/busybox/busybox.mk +1 -0
index d3074d2218..07e2aab45c 100644
@@ -78,6 +78,7 @@ BUSYBOX_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_UNZIP),unzip) \
 	$(if $(BR2_PACKAGE_USBUTILS),usbutils) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX),util-linux) \
+	$(if $(BR2_PACKAGE_UUTILS_COREUTILS),uutils-coreutils) \
 	$(if $(BR2_PACKAGE_TINYINIT),tinyinit) \
 	$(if $(BR2_PACKAGE_VIM),vim) \
 	$(if $(BR2_PACKAGE_WATCHDOG),watchdog) \
package/coreutils/Config.in +1 -0
index 705013bae0..9c1af1dc25 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_COREUTILS
 	depends on BR2_USE_WCHAR
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+	depends on !BR2_PACKAGE_UUTILS_COREUTILS
 	help
 	  All of the basic file/text/shell utilities. These are the
 	  core utilities which are expected to exist on every system.
package/uutils-coreutils/Config.in new file +28 -0
new file mode 100644
index 0000000000..4251d1f4ab
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_UUTILS_COREUTILS
+	bool "uutils-coreutils"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_HOST_RUSTC
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+	help
+	  uutils is an attempt at writing universal (as in
+	  cross-platform) CLI utilities in Rust. While all programs have
+	  been implemented, some options might be missing or different
+	  behavior might be experienced.
+
+	  https://github.com/uutils/coreutils
+
+if BR2_PACKAGE_UUTILS_COREUTILS
+
+config BR2_PACKAGE_UUTILS_COREUTILS_MULTICALL
+	bool "multicall"
+	default y
+	help
+	  Build coreutils as a multi-call binary.
+
+	  Selecting 'y' will build and install a single
+	  'coreutils' binary that supports all commands.
+
+	  Selecting 'n' will build and install the utilities
+	  as separate files.
+
+endif
package/uutils-coreutils/uutils-coreutils.hash new file +3 -0
new file mode 100644
index 0000000000..e872e4a75c
@@ -0,0 +1,3 @@
+# Locally generated
+sha256  1260677e4f09364b7f3ddda7affdae23e2232a18b55c1d42b8bb5ee083d5c7c7  uutils-coreutils-0.0.30-cargo2.tar.gz
+sha256  29953405eaa3dcc41c37d1621d55b6a47eee93e05613e439e73295029740b10c  LICENSE
package/uutils-coreutils/uutils-coreutils.mk new file +111 -0

111 lines not on this page · raw message

support/testing/tests/package/test_rust.py +9 -0
index 8160cb6053..c0fe56f1be 100644
@@ -28,11 +28,14 @@ class TestRustBin(TestRustBase):
         # BR2_TARGET_ROOTFS_TAR is not set
         BR2_PACKAGE_HOST_RUSTC=y
         BR2_PACKAGE_RIPGREP=y
+        BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+        BR2_PACKAGE_UUTILS_COREUTILS=y
         """
 
     def test_run(self):
         self.login()
         self.assertRunOk("rg Buildroot /etc/issue")
+        self.assertRunOk("coreutils --help")
 
 
 class TestRust(TestRustBase):
@@ -50,11 +53,14 @@ class TestRust(TestRustBase):
         BR2_PACKAGE_HOST_RUSTC=y
         BR2_PACKAGE_HOST_RUST=y
         BR2_PACKAGE_RIPGREP=y
+        BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+        BR2_PACKAGE_UUTILS_COREUTILS=y
         """
 
     def test_run(self):
         self.login()
         self.assertRunOk("rg Buildroot /etc/issue")
+        self.assertRunOk("coreutils --help")
 
 
 class TestRustVendoring(infra.basetest.BRConfigTest):
@@ -70,6 +76,8 @@ class TestRustVendoring(infra.basetest.BRConfigTest):
         BR2_PACKAGE_RIPGREP=y
         BR2_PACKAGE_PYTHON3=y
         BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y
+        BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+        BR2_PACKAGE_UUTILS_COREUTILS=y
         """
 
     def setUp(self):
@@ -95,3 +103,4 @@ class TestRustVendoring(infra.basetest.BRConfigTest):
     def test_run(self):
         self.check_download("ripgrep")
         self.check_download("python-cryptography")
+        self.check_download("uutils-coreutils")
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot