Skip to content

Commit eab7918

Browse files
authored
Merge branch 'main' into sort-utf
2 parents a2c58fc + ec7e81e commit eab7918

File tree

646 files changed

+24342
-10031
lines changed

Some content is hidden

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

646 files changed

+24342
-10031
lines changed

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
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
1214
LIBSTDBUF_DIR = "/usr/local/libexec/coreutils"
15+
16+
# remove me
17+
[build]
18+
rustflags = ["-A", "clippy::collapsible_if"]

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
msrv = "1.85.0"
21
avoid-breaking-exported-api = false
32
check-private-items = true
43
cognitive-complexity-threshold = 24
54
missing-docs-in-crate-items = true
5+
allow-mixed-uninlined-format-args = false

.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: 175 additions & 119 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/GnuComment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ jobs:
5959
issue_number: issue_number,
6060
body: 'GNU testsuite comparison:\n```\n' + content + '```'
6161
});
62-
}
62+
}

.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@v14
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/audit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Security audit
2+
3+
# spell-checker:ignore (misc) rustsec
4+
5+
on:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
jobs:
9+
audit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6
13+
- uses: rustsec/audit-check@v2
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)