Skip to content

Commit a1066a6

Browse files
authored
Merge branch 'main' into du_files0_from_stdin
2 parents 4f0acb7 + 443c201 commit a1066a6

254 files changed

Lines changed: 11097 additions & 4374 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
@@ -4,6 +4,8 @@
44

55
[target.x86_64-unknown-redox]
66
linker = "x86_64-unknown-redox-gcc"
7+
[target.aarch64-unknown-linux-gnu]
8+
linker = "aarch64-linux-gnu-gcc"
79

810
[env]
911
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml

.devcontainer/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ RUN apt-get update \
1212
gcc \
1313
gdb \
1414
gperf \
15-
jq \
1615
libacl1-dev \
1716
libattr1-dev \
1817
libcap-dev \

.github/workflows/CICD.yml

Lines changed: 55 additions & 107 deletions
Large diffs are not rendered by default.

.github/workflows/CheckScripts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
permissions:
3030
contents: read
3131
steps:
32-
- uses: actions/checkout@v5
32+
- uses: actions/checkout@v6
3333
with:
3434
persist-credentials: false
3535
- name: Run ShellCheck
@@ -47,7 +47,7 @@ jobs:
4747
permissions:
4848
contents: read
4949
steps:
50-
- uses: actions/checkout@v5
50+
- uses: actions/checkout@v6
5151
with:
5252
persist-credentials: false
5353
- name: Setup shfmt

.github/workflows/FixPR.yml

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
job:
2727
- { os: ubuntu-latest , features: feat_os_unix }
2828
steps:
29-
- uses: actions/checkout@v5
29+
- uses: actions/checkout@v6
3030
with:
3131
persist-credentials: false
3232
- name: Initialize job variables
@@ -77,49 +77,3 @@ jobs:
7777
add: Cargo.lock fuzz/Cargo.lock
7878
env:
7979
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80-
81-
code_format:
82-
# Recheck/refresh code formatting
83-
if: github.event.pull_request.merged == true ## only for PR merges
84-
name: Update/format
85-
runs-on: ${{ matrix.job.os }}
86-
strategy:
87-
fail-fast: false
88-
matrix:
89-
job:
90-
- { os: ubuntu-latest , features: feat_os_unix }
91-
steps:
92-
- uses: actions/checkout@v5
93-
with:
94-
persist-credentials: false
95-
- name: Initialize job variables
96-
id: vars
97-
shell: bash
98-
run: |
99-
# target-specific options
100-
# * CARGO_FEATURES_OPTION
101-
CARGO_FEATURES_OPTION='' ;
102-
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
103-
echo "CARGO_FEATURES_OPTION=${CARGO_FEATURES_OPTION}" >> $GITHUB_OUTPUT
104-
- uses: dtolnay/rust-toolchain@master
105-
with:
106-
toolchain: stable
107-
components: rustfmt
108-
- uses: Swatinem/rust-cache@v2
109-
- name: "`cargo fmt`"
110-
shell: bash
111-
run: |
112-
cargo fmt
113-
- name: "`cargo fmt` tests"
114-
shell: bash
115-
run: |
116-
# `cargo fmt` of tests
117-
find tests -name "*.rs" -print0 | xargs -0 cargo fmt --
118-
- name: Commit any changes (to '${{ env.BRANCH_TARGET }}')
119-
uses: EndBug/add-and-commit@v9
120-
with:
121-
new_branch: ${{ env.BRANCH_TARGET }}
122-
default_author: github_actions
123-
message: "maint ~ rustfmt (`cargo fmt`)"
124-
env:
125-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/GnuTests.yml

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ env:
2929
TEST_ROOT_FULL_SUMMARY_FILE: 'gnu-root-full-result.json'
3030
TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json'
3131
TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json'
32-
REPO_GNU_REF: "v9.8"
3332

3433
jobs:
3534
native:
@@ -38,10 +37,20 @@ jobs:
3837
steps:
3938
#### Get the code, setup cache
4039
- name: Checkout code (uutils)
41-
uses: actions/checkout@v5
40+
uses: actions/checkout@v6
4241
with:
4342
path: 'uutils'
4443
persist-credentials: false
44+
- name: Extract GNU version from build-gnu.sh
45+
id: gnu-version
46+
run: |
47+
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
48+
if [ -z "$GNU_VERSION" ]; then
49+
echo "Error: Failed to extract GNU version from build-gnu.sh"
50+
exit 1
51+
fi
52+
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
53+
echo "Extracted GNU version: ${GNU_VERSION}"
4554
- uses: dtolnay/rust-toolchain@master
4655
with:
4756
toolchain: stable
@@ -50,7 +59,7 @@ jobs:
5059
with:
5160
workspaces: "./uutils -> target"
5261
- name: Checkout code (GNU coreutils)
53-
uses: actions/checkout@v5
62+
uses: actions/checkout@v6
5463
with:
5564
repository: 'coreutils/coreutils'
5665
path: 'gnu'
@@ -71,7 +80,8 @@ jobs:
7180
run: |
7281
## Install dependencies
7382
sudo apt-get update
74-
sudo apt-get install -y autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev libselinux1-dev attr quilt
83+
## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
84+
sudo apt-get install -y autopoint gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
7585
- name: Add various locales
7686
shell: bash
7787
run: |
@@ -89,6 +99,9 @@ jobs:
8999
sudo locale-gen --keep-existing en_US
90100
sudo locale-gen --keep-existing en_US.UTF-8
91101
sudo locale-gen --keep-existing ru_RU.KOI8-R
102+
sudo locale-gen --keep-existing fa_IR.UTF-8 # Iran
103+
sudo locale-gen --keep-existing am_ET.UTF-8 # Ethiopia
104+
sudo locale-gen --keep-existing th_TH.UTF-8 # Thailand
92105
93106
sudo update-locale
94107
echo "After:"
@@ -100,7 +113,7 @@ jobs:
100113
run: |
101114
## Build binaries
102115
cd 'uutils'
103-
bash util/build-gnu.sh --release-build
116+
env PROFILE=release-small bash util/build-gnu.sh
104117
105118
### Run tests as user
106119
- name: Run GNU tests
@@ -132,12 +145,12 @@ jobs:
132145
133146
### Upload artifacts
134147
- name: Upload full json results
135-
uses: actions/upload-artifact@v4
148+
uses: actions/upload-artifact@v5
136149
with:
137150
name: gnu-full-result
138151
path: ${{ env.TEST_FULL_SUMMARY_FILE }}
139152
- name: Upload root json results
140-
uses: actions/upload-artifact@v4
153+
uses: actions/upload-artifact@v5
141154
with:
142155
name: gnu-root-full-result
143156
path: ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
@@ -147,7 +160,7 @@ jobs:
147160
# Compress logs before upload (fails otherwise)
148161
gzip gnu/tests/*/*.log
149162
- name: Upload test logs
150-
uses: actions/upload-artifact@v4
163+
uses: actions/upload-artifact@v5
151164
with:
152165
name: test-logs
153166
path: |
@@ -160,10 +173,20 @@ jobs:
160173
steps:
161174
#### Get the code, setup cache
162175
- name: Checkout code (uutils)
163-
uses: actions/checkout@v5
176+
uses: actions/checkout@v6
164177
with:
165178
path: 'uutils'
166179
persist-credentials: false
180+
- name: Extract GNU version from build-gnu.sh
181+
id: gnu-version-selinux
182+
run: |
183+
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
184+
if [ -z "$GNU_VERSION" ]; then
185+
echo "Error: Failed to extract GNU version from build-gnu.sh"
186+
exit 1
187+
fi
188+
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
189+
echo "Extracted GNU version: ${GNU_VERSION}"
167190
- uses: dtolnay/rust-toolchain@master
168191
with:
169192
toolchain: stable
@@ -172,7 +195,7 @@ jobs:
172195
with:
173196
workspaces: "./uutils -> target"
174197
- name: Checkout code (GNU coreutils)
175-
uses: actions/checkout@v5
198+
uses: actions/checkout@v6
176199
with:
177200
repository: 'coreutils/coreutils'
178201
path: 'gnu'
@@ -197,9 +220,7 @@ jobs:
197220
path: ~/.cache/lima
198221
key: lima-${{ steps.lima-actions-setup.outputs.version }}
199222
- name: Start Fedora VM with SELinux
200-
run: limactl start --plain --name=default --cpus=4 --disk=40 --memory=8 --network=lima:user-v2 template://fedora
201-
- name: Setup SSH
202-
uses: lima-vm/lima-actions/ssh@v1
223+
run: limactl start --plain --name=default --cpus=4 --disk=40 --memory=8 --network=lima:user-v2 template:fedora
203224
- name: Verify SELinux Status and Configuration
204225
run: |
205226
lima getenforce
@@ -218,7 +239,7 @@ jobs:
218239
- name: Install dependencies in VM
219240
run: |
220241
lima sudo dnf -y update
221-
lima sudo dnf -y install git autoconf autopoint bison texinfo gperf gcc g++ gdb jq libacl-devel libattr-devel libcap-devel libselinux-devel attr rustup clang-devel texinfo-tex wget automake patch quilt
242+
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
222243
lima rustup-init -y --default-toolchain stable
223244
- name: Copy the sources to VM
224245
run: |
@@ -227,7 +248,7 @@ jobs:
227248
### Build
228249
- name: Build binaries
229250
run: |
230-
lima bash -c "cd ~/work/uutils/ && bash util/build-gnu.sh --release-build"
251+
lima bash -c "cd ~/work/uutils/ && SELINUX_ENABLED=1 PROFILE=release-small bash util/build-gnu.sh"
231252
232253
### Run tests as user
233254
- name: Generate SELinux tests list
@@ -268,12 +289,12 @@ jobs:
268289
# Copy the test directory now
269290
rsync -v -a -e ssh lima-default:~/work/gnu/tests/ ./gnu/tests-selinux/
270291
- name: Upload SELinux json results
271-
uses: actions/upload-artifact@v4
292+
uses: actions/upload-artifact@v5
272293
with:
273294
name: selinux-gnu-full-result
274295
path: ${{ env.TEST_SELINUX_FULL_SUMMARY_FILE }}
275296
- name: Upload SELinux root json results
276-
uses: actions/upload-artifact@v4
297+
uses: actions/upload-artifact@v5
277298
with:
278299
name: selinux-root-gnu-full-result
279300
path: ${{ env.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }}
@@ -283,7 +304,7 @@ jobs:
283304
# Compress logs before upload (fails otherwise)
284305
gzip gnu/tests-selinux/*/*.log
285306
- name: Upload SELinux test logs
286-
uses: actions/upload-artifact@v4
307+
uses: actions/upload-artifact@v5
287308
with:
288309
name: selinux-test-logs
289310
path: |
@@ -311,7 +332,7 @@ jobs:
311332
312333
outputs TEST_SUMMARY_FILE AGGREGATED_SUMMARY_FILE
313334
- name: Checkout code (uutils)
314-
uses: actions/checkout@v5
335+
uses: actions/checkout@v6
315336
with:
316337
path: 'uutils'
317338
persist-credentials: false
@@ -326,25 +347,25 @@ jobs:
326347
workflow_conclusion: completed ## continually recalibrates to last commit of default branch with a successful GnuTests (ie, "self-heals" from GnuTest regressions, but needs more supervision for/of regressions)
327348
path: "reference"
328349
- name: Download full json results
329-
uses: actions/download-artifact@v5
350+
uses: actions/download-artifact@v6
330351
with:
331352
name: gnu-full-result
332353
path: results
333354
merge-multiple: true
334355
- name: Download root json results
335-
uses: actions/download-artifact@v5
356+
uses: actions/download-artifact@v6
336357
with:
337358
name: gnu-root-full-result
338359
path: results
339360
merge-multiple: true
340361
- name: Download selinux json results
341-
uses: actions/download-artifact@v5
362+
uses: actions/download-artifact@v6
342363
with:
343364
name: selinux-gnu-full-result
344365
path: results
345366
merge-multiple: true
346367
- name: Download selinux root json results
347-
uses: actions/download-artifact@v5
368+
uses: actions/download-artifact@v6
348369
with:
349370
name: selinux-root-gnu-full-result
350371
path: results
@@ -393,17 +414,17 @@ jobs:
393414
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
394415
outputs HASH
395416
- name: Upload SHA1/ID of 'test-summary'
396-
uses: actions/upload-artifact@v4
417+
uses: actions/upload-artifact@v5
397418
with:
398419
name: "${{ steps.summary.outputs.HASH }}"
399420
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
400421
- name: Upload test results summary
401-
uses: actions/upload-artifact@v4
422+
uses: actions/upload-artifact@v5
402423
with:
403424
name: test-summary
404425
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
405426
- name: Upload aggregated json results
406-
uses: actions/upload-artifact@v4
427+
uses: actions/upload-artifact@v5
407428
with:
408429
name: aggregated-result
409430
path: ${{ steps.vars.outputs.AGGREGATED_SUMMARY_FILE }}
@@ -455,7 +476,7 @@ jobs:
455476
fi
456477
- name: Upload comparison log (for GnuComment workflow)
457478
if: success() || failure() # run regardless of prior step success/failure
458-
uses: actions/upload-artifact@v4
479+
uses: actions/upload-artifact@v5
459480
with:
460481
name: comment
461482
path: reference/comment/

0 commit comments

Comments
 (0)