Skip to content

Commit ada45db

Browse files
committed
Merge branch 'main' into fix-doc-hashs
2 parents 2c04f5c + 562c5cc commit ada45db

462 files changed

Lines changed: 17997 additions & 7387 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.

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
linker = "x86_64-unknown-redox-gcc"
77
[target.aarch64-unknown-linux-gnu]
88
linker = "aarch64-linux-gnu-gcc"
9+
[target.riscv64gc-unknown-linux-musl]
10+
rustflags = ["-C", "target-feature=+crt-static"]
911

1012
[env]
1113
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml

.config/nextest.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ final-status-level = "skip"
55
failure-output = "immediate-final"
66
fail-fast = false
77

8+
[profile.ci.junit]
9+
path = "junit.xml"
10+
811
[profile.coverage]
912
retries = 0
1013
status-level = "all"
1114
final-status-level = "skip"
1215
failure-output = "immediate-final"
1316
fail-fast = false
17+
18+
[profile.coverage.junit]
19+
path = "junit.xml"

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ switch_case_indent = true
5757
end_of_line = crlf
5858
insert_final_newline = false
5959

60+
[*.toml]
61+
indent_size = 2
62+
indent_style = space
63+
6064
[*.{yaml,yml,[Yy][Mm][Ll],[Yy][Aa][Mm][Ll]}]
6165
# YAML
6266
indent_size = 2

.github/workflows/CICD.yml

Lines changed: 151 additions & 102 deletions
Large diffs are not rendered by default.

.github/workflows/FixPR.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# Ensure updated '*/Cargo.lock'
4747
# * '*/Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
4848
for dir in "." "fuzz"; do
49-
( cd "$dir" && (cargo fetch --locked --quiet || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update) )
49+
( cd "$dir" && (cargo fetch --locked --quiet --target $(rustc --print host-tuple) || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update) )
5050
done
5151
- name: Info
5252
shell: bash
@@ -65,9 +65,9 @@ jobs:
6565
cargo tree -V
6666
## dependencies
6767
echo "## dependency list"
68-
cargo fetch --locked --quiet
68+
cargo fetch --locked --quiet --target $(rustc --print host-tuple)
6969
## * using the 'stable' toolchain is necessary to avoid "unexpected '--filter-platform'" errors
70-
RUSTUP_TOOLCHAIN=stable cargo tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
70+
cargo +stable tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
7171
- name: Commit any changes (to '${{ env.BRANCH_TARGET }}')
7272
uses: EndBug/add-and-commit@v9
7373
with:

.github/workflows/GnuTests.yml

Lines changed: 33 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: GnuTests
22

33
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
44
# spell-checker:ignore (jargon) submodules devel
5-
# spell-checker:ignore (libs/utils) autopoint chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e zstd cpio
5+
# spell-checker:ignore (libs/utils) chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
66
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
9-
# spell-checker:ignore userns
9+
# spell-checker:ignore userns nodocs
1010

1111
# * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT`
1212

@@ -31,7 +31,7 @@ env:
3131
TEST_STTY_FULL_SUMMARY_FILE: 'gnu-stty-full-result.json'
3232
TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json'
3333
TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json'
34-
TEST_SMACK_FULL_SUMMARY_FILE: 'smack-gnu-full-result.json'
34+
TEST_QEMU_FULL_SUMMARY_FILE: 'qemu-gnu-full-result.json'
3535

3636
jobs:
3737
native:
@@ -44,10 +44,6 @@ jobs:
4444
with:
4545
path: 'uutils'
4646
persist-credentials: false
47-
- uses: dtolnay/rust-toolchain@master
48-
with:
49-
toolchain: stable
50-
components: rustfmt
5147
- uses: Swatinem/rust-cache@v2
5248
with:
5349
workspaces: "./uutils -> target"
@@ -69,7 +65,7 @@ jobs:
6965
## Install dependencies
7066
sudo apt-get update
7167
## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
72-
sudo apt-get install -y autopoint gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
68+
sudo apt-get install -y gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
7369
curl http://launchpadlibrarian.net/831710181/automake_1.18.1-3_all.deb > automake-1.18.deb
7470
sudo dpkg -i --force-depends automake-1.18.deb
7571
- name: Add various locales
@@ -105,7 +101,7 @@ jobs:
105101
## Build binaries
106102
cd 'uutils'
107103
env PROFILE=release-small bash util/build-gnu.sh
108-
104+
109105
- name: Save files for faster configure and skipping make
110106
uses: actions/cache/save@v5
111107
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
@@ -208,13 +204,6 @@ jobs:
208204
with:
209205
path: 'uutils'
210206
persist-credentials: false
211-
- uses: dtolnay/rust-toolchain@master
212-
with:
213-
toolchain: stable
214-
components: rustfmt
215-
- uses: Swatinem/rust-cache@v2
216-
with:
217-
workspaces: "./uutils -> target"
218207
- name: Checkout code (GNU coreutils)
219208
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
220209

@@ -235,20 +224,10 @@ jobs:
235224
lima ls -laZ /etc/selinux
236225
lima sudo sestatus
237226
238-
# Ensure we're running in enforcing mode
239-
lima sudo setenforce 1
240-
lima getenforce
241-
242-
# Create test files with SELinux contexts for testing
243-
lima sudo mkdir -p /var/test_selinux
244-
lima sudo touch /var/test_selinux/test_file
245-
lima sudo chcon -t etc_t /var/test_selinux/test_file
246-
lima ls -Z /var/test_selinux/test_file # Verify context
247227
- name: Install dependencies in VM
248228
run: |
249-
lima sudo dnf -y update
250-
lima sudo dnf -y install git autoconf autopoint bison texinfo gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel texinfo-tex automake patch quilt
251-
lima rustup-init -y --default-toolchain stable
229+
lima sudo dnf -y install --nodocs autoconf bison gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel automake patch quilt
230+
lima rustup-init -y --profile=minimal --default-toolchain stable
252231
- name: Copy the sources to VM
253232
run: |
254233
rsync -a -e ssh . lima-default:~/work/
@@ -269,8 +248,16 @@ jobs:
269248
lima bash -c "cd ~/work/uutils/ && echo 'Found SELinux tests:'; wc -l selinux-tests.txt"
270249
- name: Run GNU SELinux tests
271250
run: |
251+
# Ensure we're running in enforcing mode
272252
lima sudo setenforce 1
273253
lima getenforce
254+
255+
# Create test files with SELinux contexts for testing
256+
lima sudo mkdir -p /var/test_selinux
257+
lima sudo touch /var/test_selinux/test_file
258+
lima sudo chcon -t etc_t /var/test_selinux/test_file
259+
lima ls -Z /var/test_selinux/test_file # Verify context
260+
274261
lima cat /proc/filesystems
275262
lima bash -c "cd ~/work/uutils/ && bash util/run-gnu-test.sh \$(cat selinux-tests.txt)"
276263
- name: Extract testing info from individual logs into JSON
@@ -319,19 +306,15 @@ jobs:
319306
gnu/tests-selinux/*.log
320307
gnu/tests-selinux/*/*.log.gz
321308
322-
smack:
323-
name: Run GNU tests (SMACK)
309+
qemu:
310+
name: Run GNU tests (SMACK/ROOTFS)
324311
runs-on: ubuntu-24.04
325312
steps:
326313
- name: Checkout code (uutils)
327314
uses: actions/checkout@v6
328315
with:
329316
path: 'uutils'
330317
persist-credentials: false
331-
- uses: dtolnay/rust-toolchain@master
332-
with:
333-
toolchain: stable
334-
components: rustfmt
335318
- uses: Swatinem/rust-cache@v2
336319
with:
337320
workspaces: "./uutils -> target"
@@ -341,30 +324,30 @@ jobs:
341324
run: |
342325
sudo apt-get update
343326
sudo apt-get install -y qemu-system-x86 zstd cpio
344-
- name: Run GNU SMACK tests
327+
- name: Run GNU SMACK/ROOTFS tests
345328
run: |
346329
cd uutils
347-
bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-smack"
330+
bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-qemu"
348331
- name: Extract testing info into JSON
349332
run: |
350-
python3 uutils/util/gnu-json-result.py gnu/tests-smack > ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
351-
- name: Upload SMACK json results
333+
python3 uutils/util/gnu-json-result.py gnu/tests-qemu > ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
334+
- name: Upload SMACK/ROOTFS json results
352335
uses: actions/upload-artifact@v6
353336
with:
354-
name: smack-gnu-full-result
355-
path: ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
356-
- name: Compress SMACK test logs
357-
run: gzip gnu/tests-smack/*/*.log 2>/dev/null || true
358-
- name: Upload SMACK test logs
337+
name: qemu-gnu-full-result
338+
path: ${{ env.TEST_QEMU_FULL_SUMMARY_FILE }}
339+
- name: Compress SMACK/ROOTFS test logs
340+
run: gzip gnu/tests-qemu/*/*.log 2>/dev/null || true
341+
- name: Upload SMACK/ROOTFS test logs
359342
uses: actions/upload-artifact@v6
360343
with:
361-
name: smack-test-logs
344+
name: qemu-test-logs
362345
path: |
363-
gnu/tests-smack/*.log
364-
gnu/tests-smack/*/*.log.gz
346+
gnu/tests-qemu/*.log
347+
gnu/tests-qemu/*/*.log.gz
365348
366349
aggregate:
367-
needs: [native, selinux, smack]
350+
needs: [native, selinux, qemu]
368351
permissions:
369352
actions: read # for dawidd6/action-download-artifact to query and download artifacts
370353
contents: read # for actions/checkout to fetch code
@@ -389,7 +372,7 @@ jobs:
389372
path: 'uutils'
390373
persist-credentials: false
391374
- name: Retrieve reference artifacts
392-
uses: dawidd6/action-download-artifact@v12
375+
uses: dawidd6/action-download-artifact@v13
393376
# ref: <https://github.com/dawidd6/action-download-artifact>
394377
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
395378
with:
@@ -429,10 +412,10 @@ jobs:
429412
name: selinux-root-gnu-full-result
430413
path: results
431414
merge-multiple: true
432-
- name: Download smack json results
415+
- name: Download SMACK/ROOTFS json results
433416
uses: actions/download-artifact@v7
434417
with:
435-
name: smack-gnu-full-result
418+
name: qemu-gnu-full-result
436419
path: results
437420
merge-multiple: true
438421
- name: Extract/summarize testing info

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ concurrency:
2222
env:
2323
TERMUX: v0.118.0
2424
KEY_POSTFIX: nextest+rustc-hash+adb+sshd+upgrade+XGB+inc18
25-
COMMON_EMULATOR_OPTIONS: -no-window -noaudio -no-boot-anim -camera-back none -gpu off
25+
COMMON_EMULATOR_OPTIONS: -no-metrics -no-window -noaudio -no-boot-anim -camera-back none -gpu off
2626
EMULATOR_DISK_SIZE: 12GB
2727
EMULATOR_HEAP_SIZE: 2048M
2828
EMULATOR_BOOT_TIMEOUT: 1200 # 20min
@@ -39,7 +39,7 @@ jobs:
3939
ram: [4096]
4040
api-level: [28]
4141
target: [google_apis_playstore]
42-
arch: [x86, x86_64] # , arm64-v8a
42+
arch: [x86_64] # ,x86 ,arm64-v8a
4343
runs-on: ${{ matrix.os }}
4444
env:
4545
EMULATOR_RAM_SIZE: ${{ matrix.ram }}

.github/workflows/benchmarks.yml

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,42 @@ concurrency:
1818

1919
jobs:
2020
benchmarks:
21-
name: Run benchmarks (CodSpeed)
21+
name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} (CodSpeed)
2222
runs-on: ubuntu-latest
23+
env:
24+
RUSTC_WRAPPER: sccache
25+
CARGO_INCREMENTAL: 0
26+
SCCACHE_GHA_ENABLED: "true"
2327
strategy:
2428
matrix:
25-
benchmark-target:
26-
- { package: uu_base64 }
27-
- { package: uu_cksum }
28-
- { package: uu_cp }
29-
- { package: uu_cut }
30-
- { package: uu_du }
31-
- { package: uu_expand }
32-
- { package: uu_fold }
33-
- { package: uu_hashsum }
34-
- { package: uu_ls }
35-
- { package: uu_mv }
36-
- { package: uu_nl }
37-
- { package: uu_numfmt }
38-
- { package: uu_rm }
39-
- { package: uu_seq }
40-
- { package: uu_shuf }
41-
- { package: uu_sort }
42-
- { package: uu_split }
43-
- { package: uu_tsort }
44-
- { package: uu_unexpand }
45-
- { package: uu_uniq }
46-
- { package: uu_wc }
47-
- { package: uu_factor }
29+
type: [simulation] # , memory] # memory profile disabled due to variance
30+
package: [
31+
uu_base64,
32+
uu_cksum,
33+
uu_cp,
34+
uu_cut,
35+
uu_dd,
36+
uu_df,
37+
uu_du,
38+
uu_expand,
39+
uu_fold,
40+
uu_join,
41+
uu_ls,
42+
uu_mv,
43+
uu_nl,
44+
uu_numfmt,
45+
uu_rm,
46+
uu_seq,
47+
uu_shuf,
48+
uu_sort,
49+
uu_split,
50+
uu_tsort,
51+
uu_unexpand,
52+
uu_uniq,
53+
uu_wc,
54+
uu_factor,
55+
uu_date
56+
]
4857
steps:
4958
- uses: actions/checkout@v6
5059
with:
@@ -57,23 +66,31 @@ jobs:
5766
- name: Run sccache-cache
5867
uses: mozilla-actions/sccache-action@v0.0.9
5968

69+
- name: Install locales
70+
shell: bash
71+
run: |
72+
sudo apt-get update
73+
sudo apt-get install -y locales
74+
sudo locale-gen fr_FR.UTF-8
75+
sudo update-locale
76+
6077
- name: Install cargo-codspeed
6178
shell: bash
6279
run: cargo install cargo-codspeed --locked
6380

64-
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
81+
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
6582
shell: bash
6683
run: |
67-
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
68-
cargo codspeed build -p ${{ matrix.benchmark-target.package }}
84+
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
85+
cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }}
6986
70-
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
87+
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
7188
uses: CodSpeedHQ/action@v4
7289
env:
7390
CODSPEED_LOG: debug
7491
with:
75-
mode: instrumentation
92+
mode: ${{ matrix.type }}
7693
run: |
77-
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
78-
cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
94+
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
95+
cargo codspeed run -p ${{ matrix.package }} > /dev/null
7996
token: ${{ secrets.CODSPEED_TOKEN }}

0 commit comments

Comments
 (0)