Skip to content

Commit f90afa1

Browse files
authored
Merge branch 'main' into main
2 parents 4374596 + ec7e81e commit f90afa1

File tree

570 files changed

+18761
-8016
lines changed

Some content is hidden

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

570 files changed

+18761
-8016
lines changed

.cargo/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ rustflags = ["-C", "target-feature=+crt-static"]
1212
[env]
1313
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml
1414
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

.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: 118 additions & 122 deletions
Large diffs are not rendered by default.

.github/workflows/FixPR.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
echo "## dependency list"
6868
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: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: GnuTests
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

@@ -44,9 +44,6 @@ jobs:
4444
with:
4545
path: 'uutils'
4646
persist-credentials: false
47-
- uses: dtolnay/rust-toolchain@master
48-
with:
49-
toolchain: stable
5047
- uses: Swatinem/rust-cache@v2
5148
with:
5249
workspaces: "./uutils -> target"
@@ -207,12 +204,6 @@ jobs:
207204
with:
208205
path: 'uutils'
209206
persist-credentials: false
210-
- uses: dtolnay/rust-toolchain@master
211-
with:
212-
toolchain: stable
213-
- uses: Swatinem/rust-cache@v2
214-
with:
215-
workspaces: "./uutils -> target"
216207
- name: Checkout code (GNU coreutils)
217208
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
218209

@@ -233,19 +224,9 @@ jobs:
233224
lima ls -laZ /etc/selinux
234225
lima sudo sestatus
235226
236-
# Ensure we're running in enforcing mode
237-
lima sudo setenforce 1
238-
lima getenforce
239-
240-
# Create test files with SELinux contexts for testing
241-
lima sudo mkdir -p /var/test_selinux
242-
lima sudo touch /var/test_selinux/test_file
243-
lima sudo chcon -t etc_t /var/test_selinux/test_file
244-
lima ls -Z /var/test_selinux/test_file # Verify context
245227
- name: Install dependencies in VM
246228
run: |
247-
lima sudo dnf -y update
248-
lima sudo dnf -y install autoconf bison gperf gcc gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel automake patch quilt
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
249230
lima rustup-init -y --profile=minimal --default-toolchain stable
250231
- name: Copy the sources to VM
251232
run: |
@@ -267,8 +248,16 @@ jobs:
267248
lima bash -c "cd ~/work/uutils/ && echo 'Found SELinux tests:'; wc -l selinux-tests.txt"
268249
- name: Run GNU SELinux tests
269250
run: |
251+
# Ensure we're running in enforcing mode
270252
lima sudo setenforce 1
271253
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+
272261
lima cat /proc/filesystems
273262
lima bash -c "cd ~/work/uutils/ && bash util/run-gnu-test.sh \$(cat selinux-tests.txt)"
274263
- name: Extract testing info from individual logs into JSON
@@ -326,9 +315,6 @@ jobs:
326315
with:
327316
path: 'uutils'
328317
persist-credentials: false
329-
- uses: dtolnay/rust-toolchain@master
330-
with:
331-
toolchain: stable
332318
- uses: Swatinem/rust-cache@v2
333319
with:
334320
workspaces: "./uutils -> target"
@@ -386,7 +372,7 @@ jobs:
386372
path: 'uutils'
387373
persist-credentials: false
388374
- name: Retrieve reference artifacts
389-
uses: dawidd6/action-download-artifact@v12
375+
uses: dawidd6/action-download-artifact@v14
390376
# ref: <https://github.com/dawidd6/action-download-artifact>
391377
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
392378
with:

.github/workflows/android.yml

Lines changed: 3 additions & 3 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 }}
@@ -166,7 +166,7 @@ jobs:
166166
disk-size: ${{ env.EMULATOR_DISK_SIZE }}
167167
cores: ${{ env.EMULATOR_CORES }}
168168
force-avd-creation: false
169-
emulator-options: ${{ env.COMMON_EMULATOR_OPTIONS }} -no-metrics -no-snapshot-save -snapshot ${{ env.AVD_CACHE_KEY }}
169+
emulator-options: ${{ env.COMMON_EMULATOR_OPTIONS }} -no-snapshot-save -snapshot ${{ env.AVD_CACHE_KEY }}
170170
emulator-boot-timeout: ${{ env.EMULATOR_BOOT_TIMEOUT }}
171171
# This is not a usual script. Every line is executed in a separate shell with `sh -c`. If
172172
# one of the lines returns with error the whole script is failed (like running a script with

.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 }}

.github/workflows/benchmarks.yml

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +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_dd }
31-
- { package: uu_df }
32-
- { package: uu_du }
33-
- { package: uu_expand }
34-
- { package: uu_fold }
35-
- { package: uu_join }
36-
- { package: uu_ls }
37-
- { package: uu_mv }
38-
- { package: uu_nl }
39-
- { package: uu_numfmt }
40-
- { package: uu_rm }
41-
- { package: uu_seq }
42-
- { package: uu_shuf }
43-
- { package: uu_sort }
44-
- { package: uu_split }
45-
- { package: uu_tsort }
46-
- { package: uu_unexpand }
47-
- { package: uu_uniq }
48-
- { package: uu_wc }
49-
- { package: uu_factor }
50-
- { package: uu_date }
29+
type: [simulation, memory]
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+
]
5157
steps:
5258
- uses: actions/checkout@v6
5359
with:
@@ -60,23 +66,31 @@ jobs:
6066
- name: Run sccache-cache
6167
uses: mozilla-actions/sccache-action@v0.0.9
6268

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+
6377
- name: Install cargo-codspeed
6478
shell: bash
6579
run: cargo install cargo-codspeed --locked
6680

67-
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
81+
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
6882
shell: bash
6983
run: |
70-
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
71-
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 }}
7286
73-
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
87+
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
7488
uses: CodSpeedHQ/action@v4
7589
env:
7690
CODSPEED_LOG: debug
7791
with:
78-
mode: simulation
92+
mode: ${{ matrix.type }}
7993
run: |
80-
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
81-
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
8296
token: ${{ secrets.CODSPEED_TOKEN }}

0 commit comments

Comments
 (0)