Skip to content

Commit 0e00f98

Browse files
Merge branch 'main' into wasi-core-platform-abstractions
2 parents 81799c5 + cfc6457 commit 0e00f98

48 files changed

Lines changed: 1393 additions & 405 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CICD.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ jobs:
367367
fail-fast: false
368368
matrix:
369369
job:
370-
# - { os , target , cargo-options , default-features, features , use-cross , toolchain, skip-tests, workspace-tests, skip-package, skip-publish }
370+
# - { os , target , default-features, features , use-cross , toolchain, skip-tests, workspace-tests, skip-package, skip-publish }
371371
- { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , features: feat_os_unix_gnueabihf , use-cross: use-cross , skip-tests: true }
372372
- { os: ubuntu-24.04-arm , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf }
373373
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross , skip-tests: true }
@@ -605,22 +605,22 @@ jobs:
605605
# dependencies
606606
echo "## dependency list"
607607
cargo fetch --locked --quiet --target $(rustc --print host-tuple)
608-
cargo tree --locked --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} --no-dedupe -e=no-dev --prefix=none | grep -vE "$PWD" | sort --unique
608+
cargo tree --locked --target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} --no-dedupe -e=no-dev --prefix=none | grep -vE "$PWD" | sort --unique
609609
- name: Check
610610
shell: bash
611611
if: matrix.job.skip-publish != true && matrix.job.check-only == true
612612
run: |
613613
# expr breaks redox
614614
if [[ "${{ matrix.job.target }}" == *"redox"* ]]; then sed -i.b '/"expr",/d' Cargo.toml; fi
615615
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} check \
616-
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
616+
--target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
617617
- name: Test
618618
if: matrix.job.skip-tests != true && matrix.job.check-only != true
619619
shell: bash
620620
run: |
621621
## Test
622622
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
623-
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} \
623+
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} \
624624
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -p coreutils
625625
env:
626626
RUST_BACKTRACE: "1"
@@ -630,7 +630,7 @@ jobs:
630630
run: |
631631
## Build
632632
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
633-
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
633+
--target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
634634
# We don't want to have many duplicated long jobs at here
635635
# So we build individual binaries for few platforms until we deduplicate many release build for Linux
636636
- name: Build individual binaries

.github/workflows/check-toml.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Check TOML files
2+
3+
# spell-checker:ignore (people) taiki-e
4+
# spell-checker:ignore (misc) taplo tombi
5+
6+
on:
7+
push:
8+
paths:
9+
- "**.toml"
10+
pull_request:
11+
paths:
12+
- "**.toml"
13+
14+
jobs:
15+
check:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
with:
20+
persist-credentials: false
21+
- name: Install Tombi
22+
uses: tombi-toml/setup-tombi@v1
23+
- name: Install taplo-cli
24+
uses: taiki-e/install-action@v2
25+
with:
26+
tool: taplo-cli
27+
- name: Lint TOML files
28+
run: tombi lint --error-on-warnings
29+
- name: Format TOML files
30+
run: taplo fmt --check --diff

.github/workflows/code-quality.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -187,23 +187,6 @@ jobs:
187187
S=$(cspell ${CSPELL_CFG_OPTION} --no-summary --no-progress .) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n "s/^(.*):([0-9]+):([0-9]+) - Unknown word \(([^)]+)\).*$/::${fault_type} file=\1,line=\2,col=\3::${fault_type^^}: \`cspell\`: Unknown word '\4' (file:'\1', line:\2)/p" ; fault=true ; true ; }
188188
if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi
189189
190-
toml_format:
191-
name: Style/toml
192-
runs-on: ubuntu-latest
193-
steps:
194-
- name: Clone repository
195-
uses: actions/checkout@v6
196-
with:
197-
persist-credentials: false
198-
199-
- name: Install taplo-cli
200-
uses: taiki-e/install-action@v2
201-
with:
202-
tool: taplo-cli
203-
204-
- name: Check
205-
run: taplo fmt --check --diff
206-
207190
python:
208191
name: Style/Python
209192
runs-on: ubuntu-latest

.vscode/cspell.dictionaries/shell.wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ gmake
104104
gnuls
105105
grcov
106106
grep
107+
makepkg
107108
markdownlint
108109
rerast
109110
rollup

.vscode/cspell.dictionaries/workspace.wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ uutils
362362

363363
# * function names
364364
execfn
365+
fadvise
365366
fstatfs
366367
getcwd
367368
mkfifoat

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ check out these documents:
1111
- Our community's [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
1212
- [DEVELOPMENT.md](./DEVELOPMENT.md) for setting up your development
1313
environment.
14+
- Our [Review Guidelines](https://uutils.github.io/reviews/) for what we expect
15+
from a pull request and how reviews are done.
1416

1517
Now follows a very important warning:
1618

Cargo.lock

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GNUmakefile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ MULTICALL ?= n
99
COMPLETIONS ?= y
1010
MANPAGES ?= y
1111
LOCALES ?= y
12+
# allow bootstrapping by our install. mkdir, chmod and cp should be avoided
1213
INSTALL ?= install
1314

1415
# Needed for the foreach loops to split each loop into a separate command
@@ -159,7 +160,7 @@ test_toybox:
159160

160161
toybox-src:
161162
if [ ! -e "$(TOYBOX_SRC)" ] ; then \
162-
mkdir -p "$(TOYBOX_ROOT)" ; \
163+
$(INSTALL) -d "$(TOYBOX_ROOT)" ; \
163164
curl -Ls "https://github.com/landley/toybox/archive/refs/tags/$(TOYBOX_VER).tar.gz" -o "$(TOYBOX_ROOT)/$(TOYBOX_VER).tar.gz" ; \
164165
tar -C "$(TOYBOX_ROOT)" -xf "$(TOYBOX_ROOT)/$(TOYBOX_VER).tar.gz" ; \
165166
sed -i -e "s|TESTDIR=\".*\"|TESTDIR=\"$(BUILDDIR)\"|g" $(TOYBOX_SRC)/scripts/test.sh; \
@@ -168,7 +169,7 @@ toybox-src:
168169

169170
busybox-src:
170171
if [ ! -e "$(BUSYBOX_SRC)" ] ; then \
171-
mkdir -p "$(BUSYBOX_ROOT)" ; \
172+
$(INSTALL) -d "$(BUSYBOX_ROOT)" ; \
172173
curl -Ls "https://github.com/mirror/busybox/archive/refs/tags/$(subst .,_,$(BUSYBOX_VER)).tar.gz" -o "$(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.gz" ; \
173174
tar -C "$(BUSYBOX_ROOT)" -xf "$(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.gz" ; \
174175
fi ;
@@ -204,7 +205,7 @@ build-uudoc:
204205
@unset CARGO_BUILD_TARGET && ${CARGO} build ${CARGOFLAGS} --bin uudoc --features "uudoc ${EXES}" ${PROFILE_CMD} --no-default-features
205206

206207
install-manpages: build-uudoc
207-
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1
208+
$(INSTALL) -d $(DESTDIR)$(DATAROOTDIR)/man/man1
208209
$(foreach prog, $(INSTALLEES), \
209210
$(BUILDDIR_UUDOC)/uudoc manpage $(prog) > $(DESTDIR)$(DATAROOTDIR)/man/man1/$(PROG_PREFIX)$(prog).1 $(newline) \
210211
)
@@ -215,9 +216,9 @@ endif
215216
ifeq ($(COMPLETIONS),y)
216217

217218
install-completions: build-uudoc
218-
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
219-
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
220-
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
219+
$(INSTALL) -d $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
220+
$(INSTALL) -d $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
221+
$(INSTALL) -d $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
221222
$(foreach prog, $(INSTALLEES), \
222223
$(BUILDDIR_UUDOC)/uudoc completion $(prog) zsh > $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(PROG_PREFIX)$(prog) $(newline) \
223224
$(BUILDDIR_UUDOC)/uudoc completion $(prog) bash > $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/$(PROG_PREFIX)$(prog).bash $(newline) \
@@ -231,15 +232,15 @@ ifeq ($(LOCALES),y)
231232
locales:
232233
@# Copy uucore common locales
233234
@if [ -d "$(BASEDIR)/src/uucore/locales" ]; then \
234-
mkdir -p "$(BUILDDIR)/locales/uucore"; \
235+
$(INSTALL) -d "$(BUILDDIR)/locales/uucore"; \
235236
for locale_file in "$(BASEDIR)"/src/uucore/locales/*.ftl; do \
236237
$(INSTALL) -m 644 "$$locale_file" "$(BUILDDIR)/locales/uucore/"; \
237238
done; \
238239
fi; \
239240
# Copy utility-specific locales
240241
@for prog in $(INSTALLEES); do \
241242
if [ -d "$(BASEDIR)/src/uu/$$prog/locales" ]; then \
242-
mkdir -p "$(BUILDDIR)/locales/$$prog"; \
243+
$(INSTALL) -d "$(BUILDDIR)/locales/$$prog"; \
243244
for locale_file in "$(BASEDIR)"/src/uu/$$prog/locales/*.ftl; do \
244245
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
245246
$(INSTALL) -m 644 "$$locale_file" "$(BUILDDIR)/locales/$$prog/"; \
@@ -256,7 +257,7 @@ INSTALLEES_WITH_EXTRA_LOCALE = \
256257
install-locales:
257258
@for prog in $(INSTALLEES_WITH_EXTRA_LOCALE); do \
258259
if [ -d "$(BASEDIR)/src/uu/$$prog/locales" ]; then \
259-
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog"; \
260+
$(INSTALL) -d "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog"; \
260261
for locale_file in "$(BASEDIR)"/src/uu/$$prog/locales/*.ftl; do \
261262
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
262263
$(INSTALL) -m 644 "$$locale_file" "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog/"; \
@@ -270,9 +271,9 @@ install-locales:
270271
endif
271272

272273
install: build install-manpages install-completions install-locales
273-
mkdir -p $(INSTALLDIR_BIN)
274+
$(INSTALL) -d $(INSTALLDIR_BIN)
274275
ifneq (,$(and $(findstring stdbuf,$(UTILS)),$(findstring feat_external_libstdbuf,$(CARGOFLAGS))))
275-
mkdir -p $(DESTDIR)$(LIBSTDBUF_DIR)
276+
$(INSTALL) -d $(DESTDIR)$(LIBSTDBUF_DIR)
276277
ifneq (,$(findstring cygwin,$(OS)))
277278
$(INSTALL) -m 755 $(BUILDDIR)/deps/stdbuf.dll $(DESTDIR)$(LIBSTDBUF_DIR)/libstdbuf.dll
278279
else

docs/src/installation.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export PATH=/usr/libexec/uutils-coreutils:$PATH
112112

113113
### Ubuntu
114114

115-
[![Ubuntu package](https://repology.org/badge/version-for-repo/ubuntu_25_04/uutils-coreutils.svg)](https://packages.ubuntu.com/source/plucky/rust-coreutils)
115+
[![Ubuntu package](https://repology.org/badge/version-for-repo/ubuntu_26_04/uutils-coreutils.svg)](https://packages.ubuntu.com/source/rust-coreutils)
116116

117117
```shell
118118
apt install rust-coreutils
@@ -122,9 +122,15 @@ export PATH=/usr/lib/cargo/bin/coreutils:$PATH
122122

123123
### AUR
124124

125-
[AUR package](https://aur.archlinux.org/packages/uutils-coreutils-git)
125+
[Build main branch from source](https://aur.archlinux.org/packages/uutils-coreutils-git)
126+
or
127+
[Binaries from main branch](https://aur.archlinux.org/packages/uutils-coreutils-git-bin)
126128

127-
Rust rewrite of the GNU coreutils (main branch).
129+
```shell
130+
git clone https://aur.archlinux.org/uutils-coreutils-git --depth=1
131+
cd uutils-coreutils-git
132+
makepkg -si
133+
```
128134

129135
## MacOS
130136

0 commit comments

Comments
 (0)