Skip to content

Commit 4035d6a

Browse files
authored
Merge branch 'main' into sort_sort-h-thousands-sep.sh
2 parents fb95cb0 + a877f6b commit 4035d6a

File tree

44 files changed

+817
-297
lines changed

Some content is hidden

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

44 files changed

+817
-297
lines changed

.github/workflows/CICD.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -848,16 +848,8 @@ jobs:
848848
run: |
849849
## Test
850850
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
851-
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
852-
env:
853-
RUST_BACKTRACE: "1"
854-
- name: Test individual utilities
855-
if: matrix.job.skip-tests != true
856-
shell: bash
857-
run: |
858-
## Test individual utilities
859-
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} test --target=${{ matrix.job.target }} \
860-
${{ matrix.job.cargo-options }} ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }}
851+
${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }} \
852+
${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -p coreutils
861853
env:
862854
RUST_BACKTRACE: "1"
863855
- name: Archive executable artifacts

.github/workflows/benchmarks.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
type: [performance] # , memory] # memory profile disabled due to variance
25+
type: [simulation] # , memory] # memory profile disabled due to variance
2626
package: [
2727
uu_base64,
2828
uu_cksum,
@@ -78,18 +78,14 @@ jobs:
7878
shell: bash
7979
run: |
8080
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
81-
if [ "${{ matrix.type }}" = "memory" ]; then
82-
cargo codspeed build -m analysis -p ${{ matrix.package }}
83-
else
84-
cargo codspeed build -p ${{ matrix.package }}
85-
fi
81+
cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }}
8682
8783
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
8884
uses: CodSpeedHQ/action@v4
8985
env:
9086
CODSPEED_LOG: debug
9187
with:
92-
mode: ${{ matrix.type == 'memory' && 'memory' || 'simulation' }}
88+
mode: ${{ matrix.type }}
9389
run: |
9490
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
9591
cargo codspeed run -p ${{ matrix.package }} > /dev/null

.github/workflows/freebsd.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: FreeBSD
22

3-
# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc sccache nextest copyback logind
3+
# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc nextest copyback logind
44

55
env:
66
# * style job configuration
@@ -30,18 +30,10 @@ jobs:
3030
matrix:
3131
job:
3232
- { os: ubuntu-24.04 , features: unix }
33-
env:
34-
SCCACHE_GHA_ENABLED: "true"
35-
RUSTC_WRAPPER: "sccache"
3633
steps:
3734
- uses: actions/checkout@v6
3835
with:
3936
persist-credentials: false
40-
- uses: Swatinem/rust-cache@v2
41-
- name: Run sccache-cache
42-
uses: mozilla-actions/sccache-action@v0.0.9
43-
with:
44-
disable_annotations: true
4537
- name: Prepare, build and test
4638
uses: vmactions/freebsd-vm@v1.2.9
4739
with:
@@ -127,19 +119,12 @@ jobs:
127119
- { os: ubuntu-24.04 , features: unix }
128120
env:
129121
mem: 4096
130-
SCCACHE_GHA_ENABLED: "true"
131-
RUSTC_WRAPPER: "sccache"
132122
steps:
133123
- uses: actions/checkout@v6
134124
with:
135125
persist-credentials: false
136126
- name: Avoid no space left on device (Ubuntu runner)
137127
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
138-
- uses: Swatinem/rust-cache@v2
139-
- name: Run sccache-cache
140-
uses: mozilla-actions/sccache-action@v0.0.9
141-
with:
142-
disable_annotations: true
143128
- name: Prepare, build and test
144129
uses: vmactions/freebsd-vm@v1.2.9
145130
with:

.github/workflows/openbsd.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
prepare: |
4848
# Clean up disk space before installing packages
4949
df -h
50-
rm -rf /usr/share/relink/* /usr/X11R6/* /usr/share/doc/* /usr/share/man/* || :
5150
pkg_add curl sudo-- jq coreutils bash rust rust-clippy rust-rustfmt llvm--
51+
rm -rf /usr/share/relink/* /usr/X11R6/* /usr/share/doc/* /usr/share/man/* &
5252
# Clean up package cache after installation
53-
pkg_delete -a || true
53+
pkg_delete -a &
5454
df -h
5555
run: |
5656
## Prepare, build, and test
@@ -137,15 +137,15 @@ jobs:
137137
usesh: true
138138
sync: rsync
139139
copyback: false
140-
mem: 4096
140+
mem: 6144
141141
# Install rust and build dependencies from OpenBSD packages (llvm provides libclang for bindgen)
142142
prepare: |
143143
# Clean up disk space before installing packages
144144
df -h
145-
rm -rf /usr/share/relink/* /usr/X11R6/* /usr/share/doc/* /usr/share/man/* || :
145+
rm -rf /usr/share/relink/* /usr/X11R6/* /usr/share/doc/* /usr/share/man/* &
146146
pkg_add curl gmake sudo-- jq rust llvm--
147147
# Clean up package cache after installation
148-
pkg_delete -a || :
148+
pkg_delete -a &
149149
df -h
150150
run: |
151151
## Prepare, build, and test
@@ -194,7 +194,7 @@ jobs:
194194
set +e
195195
cd "${WORKSPACE}"
196196
unset FAULT
197-
cargo build || FAULT=1
197+
# openbsd is very slow. Omit duplicated cargo build and do test only
198198
export PATH=~/.cargo/bin:${PATH}
199199
export RUST_BACKTRACE=1
200200
export CARGO_TERM_COLOR=always
@@ -208,7 +208,7 @@ jobs:
208208
cargo test --features "\$UUCORE_FEATURES" -p uucore || FAULT=1
209209
fi
210210
# Test building with make
211-
if (test -z "\$FAULT"); then make || FAULT=1 ; fi
211+
if (test -z "\$FAULT"); then make MULTICALL=Y || FAULT=1 ; fi
212212
# Clean to avoid to rsync back the files and free up disk space
213213
cargo clean
214214
# Additional cleanup to free disk space

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.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ feat_common_core = [
154154
# "feat_Tier1" == expanded set of utilities which can be built/run on the usual rust "Tier 1" target platforms (ref: <https://forge.rust-lang.org/release/platform-support.html>)
155155
feat_Tier1 = [
156156
"feat_common_core",
157-
#
158157
"arch",
159158
"hostname",
160159
"nproc",
@@ -536,13 +535,15 @@ filetime.workspace = true
536535
glob.workspace = true
537536
jiff.workspace = true
538537
libc.workspace = true
538+
bytecount.workspace = true
539539
num-prime.workspace = true
540540
pretty_assertions = "1.4.0"
541541
rand.workspace = true
542542
regex.workspace = true
543543
sha1 = { workspace = true, features = ["std"] }
544544
tempfile.workspace = true
545545
time = { workspace = true, features = ["local-offset"] }
546+
unicode-width.workspace = true
546547
unindent = "0.2.3"
547548
uutests.workspace = true
548549
uucore = { workspace = true, features = [
@@ -562,8 +563,8 @@ nix = { workspace = true, features = [
562563
"process",
563564
"signal",
564565
"socket",
565-
"user",
566566
"term",
567+
"user",
567568
] }
568569
rlimit = "0.10.1"
569570
xattr.workspace = true

GNUmakefile

Lines changed: 4 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -78,106 +78,15 @@ endif
7878
LN ?= ln -sf
7979

8080
# Possible programs
81-
PROGS := \
82-
arch \
83-
base32 \
84-
base64 \
85-
basenc \
86-
basename \
87-
cat \
88-
cksum \
89-
comm \
90-
cp \
91-
csplit \
92-
cut \
93-
date \
94-
dd \
95-
df \
96-
dir \
97-
dircolors \
98-
dirname \
99-
du \
100-
echo \
101-
env \
102-
expand \
103-
expr \
104-
factor \
105-
false \
106-
fmt \
107-
fold \
108-
hashsum \
109-
head \
110-
hostname \
111-
join \
112-
link \
113-
ln \
114-
ls \
115-
mkdir \
116-
mktemp \
117-
more \
118-
mv \
119-
nl \
120-
numfmt \
121-
nproc \
122-
od \
123-
paste \
124-
pr \
125-
printenv \
126-
printf \
127-
ptx \
128-
pwd \
129-
readlink \
130-
realpath \
131-
rm \
132-
rmdir \
133-
seq \
134-
shred \
135-
shuf \
136-
sleep \
137-
sort \
138-
split \
139-
sum \
140-
sync \
141-
tac \
142-
tail \
143-
tee \
144-
test \
145-
touch \
146-
tr \
147-
true \
148-
truncate \
149-
tsort \
150-
uname \
151-
unexpand \
152-
uniq \
153-
unlink \
154-
vdir \
155-
wc \
156-
whoami \
157-
yes
81+
PROGS := \
82+
$(shell sed -n '/feat_Tier1 = \[/,/\]/p' Cargo.toml | sed '1d;2d' |tr -d '],"\n')\
83+
$(shell sed -n '/feat_common_core = \[/,/\]/p' Cargo.toml | sed '1d' |tr -d '],"\n')
15884

15985
UNIX_PROGS := \
160-
chgrp \
161-
chmod \
162-
chown \
163-
chroot \
164-
groups \
86+
$(shell sed -n '/feat_require_unix_core = \[/,/\]/p' Cargo.toml | sed '1d' |tr -d '],"\n') \
16587
hostid \
166-
id \
167-
install \
168-
kill \
169-
logname \
170-
mkfifo \
171-
mknod \
172-
nice \
173-
nohup \
174-
pathchk \
17588
pinky \
176-
stat \
17789
stdbuf \
178-
stty \
179-
timeout \
180-
tty \
18190
uptime \
18291
users \
18392
who

src/uu/chcon/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ workspace = true
1717
[lib]
1818
path = "src/chcon.rs"
1919

20-
[target.'cfg(target_os = "linux")'.dependencies] # todo: block fetching crates without feat_selinux
20+
# TODO: block fetching crates without feat_selinux
21+
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
2122
clap = { workspace = true }
2223
uucore = { workspace = true, features = ["entries", "fs", "perms"] }
2324
selinux = { workspace = true }

src/uu/chcon/src/chcon.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
//
33
// For the full copyright and license information, please view the LICENSE
44
// file that was distributed with this source code.
5+
56
// spell-checker:ignore (vars) RFILE
6-
#![cfg(target_os = "linux")]
7+
8+
#![cfg(any(target_os = "linux", target_os = "android"))]
79
#![allow(clippy::upper_case_acronyms)]
810

911
use clap::builder::ValueParser;

src/uu/chcon/src/errors.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//
33
// For the full copyright and license information, please view the LICENSE
44
// file that was distributed with this source code.
5-
#![cfg(target_os = "linux")]
5+
6+
#![cfg(any(target_os = "linux", target_os = "android"))]
67

78
use std::ffi::OsString;
89
use std::fmt::Write;

0 commit comments

Comments
 (0)