Skip to content

Commit 299772e

Browse files
authored
Merge branch 'main' into uu-libstdbuf
2 parents e583786 + 64203e3 commit 299772e

File tree

121 files changed

+3714
-2091
lines changed

Some content is hidden

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

121 files changed

+3714
-2091
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN apt-get update \
1717
libcap-dev \
1818
libexpect-perl \
1919
libselinux1-dev \
20+
libsystemd-dev \
2021
python3-pyinotify \
2122
quilt \
2223
texinfo \

.github/workflows/CICD.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
shell: bash
150150
run: |
151151
RUSTDOCFLAGS="-Dwarnings" cargo doc ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-deps --workspace --document-private-items
152-
- uses: DavidAnson/markdownlint-cli2-action@v21
152+
- uses: DavidAnson/markdownlint-cli2-action@v22
153153
with:
154154
fix: "true"
155155
globs: |
@@ -546,12 +546,12 @@ jobs:
546546
previous_multisize=$(cat dl/size-result.json | jq -r '.[] | .multisize')
547547
check 'multicall binary' "$multisize" "$previous_multisize" 'size-result.json'
548548
- name: Upload the individual size result
549-
uses: actions/upload-artifact@v5
549+
uses: actions/upload-artifact@v6
550550
with:
551551
name: individual-size-result
552552
path: individual-size-result.json
553553
- name: Upload the size result
554-
uses: actions/upload-artifact@v5
554+
uses: actions/upload-artifact@v6
555555
with:
556556
name: size-result
557557
path: size-result.json
@@ -579,14 +579,14 @@ jobs:
579579
# - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_selinux , use-cross: use-cross }
580580
- { os: ubuntu-latest , target: i686-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross }
581581
- { os: ubuntu-latest , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
582-
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross }
582+
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross, skip-publish: true }
583583
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,uudoc" , use-cross: no, workspace-tests: true }
584584
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
585585
- { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true }
586586
- { os: ubuntu-latest , target: wasm32-unknown-unknown , default-features: false, features: uucore/format, skip-tests: true, skip-package: true, skip-publish: true }
587587
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU
588-
# PR #7964: Mac should still build even if the feature is not enabled
589-
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true } # M1 CPU
588+
# PR #7964: Mac should still build even if the feature is not enabled. Do not publish this.
589+
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, skip-publish: true } # M1 CPU
590590
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos, workspace-tests: true }
591591
- { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows }
592592
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows }
@@ -637,7 +637,6 @@ jobs:
637637
case '${{ matrix.job.target }}' in
638638
aarch64-*) TARGET_ARCH=arm64 ;;
639639
arm-*-*hf) TARGET_ARCH=armhf ;;
640-
i586-*) TARGET_ARCH=i586 ;;
641640
i686-*) TARGET_ARCH=i686 ;;
642641
x86_64-*) TARGET_ARCH=x86_64 ;;
643642
esac;
@@ -713,7 +712,6 @@ jobs:
713712
shell: bash
714713
run: |
715714
## Create build/work space
716-
mkdir -p '${{ steps.vars.outputs.STAGING }}'
717715
mkdir -p '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}'
718716
- name: Install/setup prerequisites
719717
shell: bash
@@ -822,7 +820,7 @@ jobs:
822820
env:
823821
RUST_BACKTRACE: "1"
824822
- name: Archive executable artifacts
825-
uses: actions/upload-artifact@v5
823+
uses: actions/upload-artifact@v6
826824
with:
827825
name: ${{ env.PROJECT_NAME }}-${{ matrix.job.target }}${{ steps.vars.outputs.ARTIFACTS_SUFFIX }}
828826
path: target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}
@@ -922,17 +920,17 @@ jobs:
922920
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
923921
echo "HASH=${HASH}" >> $GITHUB_OUTPUT
924922
- name: Reserve SHA1/ID of 'test-summary'
925-
uses: actions/upload-artifact@v5
923+
uses: actions/upload-artifact@v6
926924
with:
927925
name: "${{ steps.summary.outputs.HASH }}"
928926
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
929927
- name: Reserve test results summary
930-
uses: actions/upload-artifact@v5
928+
uses: actions/upload-artifact@v6
931929
with:
932930
name: busybox-test-summary
933931
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
934932
- name: Upload json results
935-
uses: actions/upload-artifact@v5
933+
uses: actions/upload-artifact@v6
936934
with:
937935
name: busybox-result.json
938936
path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }}
@@ -1015,17 +1013,17 @@ jobs:
10151013
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
10161014
echo "HASH=${HASH}" >> $GITHUB_OUTPUT
10171015
- name: Reserve SHA1/ID of 'test-summary'
1018-
uses: actions/upload-artifact@v5
1016+
uses: actions/upload-artifact@v6
10191017
with:
10201018
name: "${{ steps.summary.outputs.HASH }}"
10211019
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
10221020
- name: Reserve test results summary
1023-
uses: actions/upload-artifact@v5
1021+
uses: actions/upload-artifact@v6
10241022
with:
10251023
name: toybox-test-summary
10261024
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
10271025
- name: Upload json results
1028-
uses: actions/upload-artifact@v5
1026+
uses: actions/upload-artifact@v6
10291027
with:
10301028
name: toybox-result.json
10311029
path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }}
@@ -1101,7 +1099,9 @@ jobs:
11011099
11021100
case '${{ matrix.job.os }}' in
11031101
ubuntu-latest)
1104-
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
1102+
# selinux and systemd headers needed to build tests
1103+
sudo apt-get -y update
1104+
sudo apt-get -y install libselinux1-dev libsystemd-dev
11051105
# pinky is a tool to show logged-in users from utmp, and gecos fields from /etc/passwd.
11061106
# In GitHub Action *nix VMs, no accounts log in, even the "runner" account that runs the commands, and "system boot" entry is missing.
11071107
# The account also has empty gecos fields.
@@ -1121,11 +1121,6 @@ jobs:
11211121
;;
11221122
esac
11231123
1124-
case '${{ matrix.job.os }}' in
1125-
# Update binutils if MinGW due to https://github.com/rust-lang/rust/issues/112368
1126-
windows-latest) C:/msys64/usr/bin/pacman.exe -Sy --needed mingw-w64-x86_64-gcc --noconfirm ; echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH ;;
1127-
esac
1128-
11291124
## Install the llvm-tools component to get access to `llvm-profdata`
11301125
rustup component add llvm-tools
11311126
@@ -1220,7 +1215,7 @@ jobs:
12201215
uses: lima-vm/lima-actions/setup@v1
12211216
id: lima-actions-setup
12221217
- name: Cache ~/.cache/lima
1223-
uses: actions/cache@v4
1218+
uses: actions/cache@v5
12241219
with:
12251220
path: ~/.cache/lima
12261221
key: lima-${{ steps.lima-actions-setup.outputs.version }}

.github/workflows/GnuTests.yml

Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
2828
TEST_FULL_SUMMARY_FILE: 'gnu-full-result.json'
2929
TEST_ROOT_FULL_SUMMARY_FILE: 'gnu-root-full-result.json'
30+
TEST_STTY_FULL_SUMMARY_FILE: 'gnu-stty-full-result.json'
3031
TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json'
3132
TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json'
3233

@@ -137,30 +138,58 @@ jobs:
137138
path_GNU='gnu'
138139
path_UUTILS='uutils'
139140
bash "uutils/util/run-gnu-test.sh" run-root
141+
140142
- name: Extract testing info from individual logs (run as root) into JSON
141143
shell: bash
142144
run : |
143145
path_UUTILS='uutils'
144146
python uutils/util/gnu-json-result.py gnu/tests > ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
145147
148+
### This shell has been changed from "bash" to this command
149+
### "script" will start a pty and the -q command removes the "script" initiation log
150+
### the -e flag makes it propagate the error code and -c runs the command in a pty
151+
### the primary purpose of this change is to run the tty GNU tests
152+
### The reason its separated from the rest of the tests is because one test can corrupt the other
153+
### tests through the use of the shared terminal and it changes the environment that the other
154+
### tests are run in, which can cause different results.
155+
- name: Run GNU stty tests
156+
shell: 'script -q -e -c "bash {0}"'
157+
run: |
158+
## Run GNU root tests
159+
path_GNU='gnu'
160+
path_UUTILS='uutils'
161+
bash "uutils/util/run-gnu-test.sh" run-tty
162+
163+
- name: Extract testing info from individual logs (stty) into JSON
164+
shell: bash
165+
run : |
166+
path_UUTILS='uutils'
167+
python uutils/util/gnu-json-result.py gnu/tests > ${{ env.TEST_STTY_FULL_SUMMARY_FILE }}
168+
146169
### Upload artifacts
147170
- name: Upload full json results
148-
uses: actions/upload-artifact@v5
171+
uses: actions/upload-artifact@v6
149172
with:
150173
name: gnu-full-result
151174
path: ${{ env.TEST_FULL_SUMMARY_FILE }}
152175
- name: Upload root json results
153-
uses: actions/upload-artifact@v5
176+
uses: actions/upload-artifact@v6
154177
with:
155178
name: gnu-root-full-result
156179
path: ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
180+
- name: Upload stty json results
181+
uses: actions/upload-artifact@v6
182+
with:
183+
name: gnu-stty-full-result
184+
path: ${{ env.TEST_STTY_FULL_SUMMARY_FILE }}
185+
157186
- name: Compress test logs
158187
shell: bash
159188
run : |
160189
# Compress logs before upload (fails otherwise)
161190
gzip gnu/tests/*/*.log
162191
- name: Upload test logs
163-
uses: actions/upload-artifact@v5
192+
uses: actions/upload-artifact@v6
164193
with:
165194
name: test-logs
166195
path: |
@@ -215,7 +244,7 @@ jobs:
215244
uses: lima-vm/lima-actions/setup@v1
216245
id: lima-actions-setup
217246
- name: Cache ~/.cache/lima
218-
uses: actions/cache@v4
247+
uses: actions/cache@v5
219248
with:
220249
path: ~/.cache/lima
221250
key: lima-${{ steps.lima-actions-setup.outputs.version }}
@@ -239,7 +268,7 @@ jobs:
239268
- name: Install dependencies in VM
240269
run: |
241270
lima sudo dnf -y update
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 wget automake patch quilt
271+
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
243272
lima rustup-init -y --default-toolchain stable
244273
- name: Copy the sources to VM
245274
run: |
@@ -289,12 +318,12 @@ jobs:
289318
# Copy the test directory now
290319
rsync -v -a -e ssh lima-default:~/work/gnu/tests/ ./gnu/tests-selinux/
291320
- name: Upload SELinux json results
292-
uses: actions/upload-artifact@v5
321+
uses: actions/upload-artifact@v6
293322
with:
294323
name: selinux-gnu-full-result
295324
path: ${{ env.TEST_SELINUX_FULL_SUMMARY_FILE }}
296325
- name: Upload SELinux root json results
297-
uses: actions/upload-artifact@v5
326+
uses: actions/upload-artifact@v6
298327
with:
299328
name: selinux-root-gnu-full-result
300329
path: ${{ env.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }}
@@ -304,7 +333,7 @@ jobs:
304333
# Compress logs before upload (fails otherwise)
305334
gzip gnu/tests-selinux/*/*.log
306335
- name: Upload SELinux test logs
307-
uses: actions/upload-artifact@v5
336+
uses: actions/upload-artifact@v6
308337
with:
309338
name: selinux-test-logs
310339
path: |
@@ -347,25 +376,32 @@ jobs:
347376
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)
348377
path: "reference"
349378
- name: Download full json results
350-
uses: actions/download-artifact@v6
379+
uses: actions/download-artifact@v7
351380
with:
352381
name: gnu-full-result
353382
path: results
354383
merge-multiple: true
355384
- name: Download root json results
356-
uses: actions/download-artifact@v6
385+
uses: actions/download-artifact@v7
357386
with:
358387
name: gnu-root-full-result
359388
path: results
360389
merge-multiple: true
390+
- name: Download stty json results
391+
uses: actions/download-artifact@v7
392+
with:
393+
name: gnu-stty-full-result
394+
path: results
395+
merge-multiple: true
396+
361397
- name: Download selinux json results
362-
uses: actions/download-artifact@v6
398+
uses: actions/download-artifact@v7
363399
with:
364400
name: selinux-gnu-full-result
365401
path: results
366402
merge-multiple: true
367403
- name: Download selinux root json results
368-
uses: actions/download-artifact@v6
404+
uses: actions/download-artifact@v7
369405
with:
370406
name: selinux-root-gnu-full-result
371407
path: results
@@ -380,7 +416,7 @@ jobs:
380416
path_UUTILS='uutils'
381417
382418
json_count=$(ls -l results/*.json | wc -l)
383-
if [[ "$json_count" -ne 4 ]]; then
419+
if [[ "$json_count" -ne 5 ]]; then
384420
echo "::error ::Failed to download all results json files (expected 4 files, found $json_count); failing early"
385421
ls -lR results || true
386422
exit 1
@@ -414,17 +450,17 @@ jobs:
414450
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
415451
outputs HASH
416452
- name: Upload SHA1/ID of 'test-summary'
417-
uses: actions/upload-artifact@v5
453+
uses: actions/upload-artifact@v6
418454
with:
419455
name: "${{ steps.summary.outputs.HASH }}"
420456
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
421457
- name: Upload test results summary
422-
uses: actions/upload-artifact@v5
458+
uses: actions/upload-artifact@v6
423459
with:
424460
name: test-summary
425461
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
426462
- name: Upload aggregated json results
427-
uses: actions/upload-artifact@v5
463+
uses: actions/upload-artifact@v6
428464
with:
429465
name: aggregated-result
430466
path: ${{ steps.vars.outputs.AGGREGATED_SUMMARY_FILE }}
@@ -476,7 +512,7 @@ jobs:
476512
fi
477513
- name: Upload comparison log (for GnuComment workflow)
478514
if: success() || failure() # run regardless of prior step success/failure
479-
uses: actions/upload-artifact@v5
515+
uses: actions/upload-artifact@v6
480516
with:
481517
name: comment
482518
path: reference/comment/

.github/workflows/android.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
free -mh
8686
df -Th
8787
- name: Restore AVD cache
88-
uses: actions/cache/restore@v4
88+
uses: actions/cache/restore@v5
8989
id: avd-cache
9090
continue-on-error: true
9191
with:
@@ -127,7 +127,7 @@ jobs:
127127
util/android-commands.sh init "${{ matrix.arch }}" "${{ matrix.api-level }}" "${{ env.TERMUX }}"
128128
- name: Save AVD cache
129129
if: steps.avd-cache.outputs.cache-hit != 'true'
130-
uses: actions/cache/save@v4
130+
uses: actions/cache/save@v5
131131
with:
132132
path: |
133133
~/.android/avd/*
@@ -143,7 +143,7 @@ jobs:
143143
trim: true
144144
- name: Restore rust cache
145145
id: rust-cache
146-
uses: actions/cache/restore@v4
146+
uses: actions/cache/restore@v5
147147
with:
148148
path: ~/__rust_cache__
149149
# The version vX at the end of the key is just a development version to avoid conflicts in
@@ -184,13 +184,13 @@ jobs:
184184
df -Th
185185
- name: Save rust cache
186186
if: steps.rust-cache.outputs.cache-hit != 'true'
187-
uses: actions/cache/save@v4
187+
uses: actions/cache/save@v5
188188
with:
189189
path: ~/__rust_cache__
190190
key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3
191191
- name: archive any output (error screenshots)
192192
if: always()
193-
uses: actions/upload-artifact@v5
193+
uses: actions/upload-artifact@v6
194194
with:
195195
name: test_output_${{ env.AVD_CACHE_KEY }}
196196
path: output

.github/workflows/benchmarks.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ jobs:
5050
with:
5151
persist-credentials: false
5252

53-
- name: Install system dependencies
54-
shell: bash
55-
run: |
56-
sudo apt-get -y update
57-
sudo apt-get -y install libselinux1-dev
58-
5953
- uses: dtolnay/rust-toolchain@stable
6054

6155
- uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)