Skip to content

Commit feb3bcf

Browse files
authored
Merge branch 'uutils:main' into unit1
2 parents b44de56 + 8a40908 commit feb3bcf

File tree

31 files changed

+820
-439
lines changed

31 files changed

+820
-439
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: 15 additions & 13 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
@@ -585,7 +585,7 @@ jobs:
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. Do not publish this.
588+
# PR #7964: Mac should still build even if the feature is not enabled. Do not publish this.
589589
- { 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 }
@@ -820,7 +820,7 @@ jobs:
820820
env:
821821
RUST_BACKTRACE: "1"
822822
- name: Archive executable artifacts
823-
uses: actions/upload-artifact@v5
823+
uses: actions/upload-artifact@v6
824824
with:
825825
name: ${{ env.PROJECT_NAME }}-${{ matrix.job.target }}${{ steps.vars.outputs.ARTIFACTS_SUFFIX }}
826826
path: target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}
@@ -920,17 +920,17 @@ jobs:
920920
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
921921
echo "HASH=${HASH}" >> $GITHUB_OUTPUT
922922
- name: Reserve SHA1/ID of 'test-summary'
923-
uses: actions/upload-artifact@v5
923+
uses: actions/upload-artifact@v6
924924
with:
925925
name: "${{ steps.summary.outputs.HASH }}"
926926
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
927927
- name: Reserve test results summary
928-
uses: actions/upload-artifact@v5
928+
uses: actions/upload-artifact@v6
929929
with:
930930
name: busybox-test-summary
931931
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
932932
- name: Upload json results
933-
uses: actions/upload-artifact@v5
933+
uses: actions/upload-artifact@v6
934934
with:
935935
name: busybox-result.json
936936
path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }}
@@ -1013,17 +1013,17 @@ jobs:
10131013
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
10141014
echo "HASH=${HASH}" >> $GITHUB_OUTPUT
10151015
- name: Reserve SHA1/ID of 'test-summary'
1016-
uses: actions/upload-artifact@v5
1016+
uses: actions/upload-artifact@v6
10171017
with:
10181018
name: "${{ steps.summary.outputs.HASH }}"
10191019
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
10201020
- name: Reserve test results summary
1021-
uses: actions/upload-artifact@v5
1021+
uses: actions/upload-artifact@v6
10221022
with:
10231023
name: toybox-test-summary
10241024
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
10251025
- name: Upload json results
1026-
uses: actions/upload-artifact@v5
1026+
uses: actions/upload-artifact@v6
10271027
with:
10281028
name: toybox-result.json
10291029
path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }}
@@ -1099,7 +1099,9 @@ jobs:
10991099
11001100
case '${{ matrix.job.os }}' in
11011101
ubuntu-latest)
1102-
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
11031105
# pinky is a tool to show logged-in users from utmp, and gecos fields from /etc/passwd.
11041106
# In GitHub Action *nix VMs, no accounts log in, even the "runner" account that runs the commands, and "system boot" entry is missing.
11051107
# The account also has empty gecos fields.
@@ -1213,7 +1215,7 @@ jobs:
12131215
uses: lima-vm/lima-actions/setup@v1
12141216
id: lima-actions-setup
12151217
- name: Cache ~/.cache/lima
1216-
uses: actions/cache@v4
1218+
uses: actions/cache@v5
12171219
with:
12181220
path: ~/.cache/lima
12191221
key: lima-${{ steps.lima-actions-setup.outputs.version }}

.github/workflows/GnuTests.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,17 @@ jobs:
168168
169169
### Upload artifacts
170170
- name: Upload full json results
171-
uses: actions/upload-artifact@v5
171+
uses: actions/upload-artifact@v6
172172
with:
173173
name: gnu-full-result
174174
path: ${{ env.TEST_FULL_SUMMARY_FILE }}
175175
- name: Upload root json results
176-
uses: actions/upload-artifact@v5
176+
uses: actions/upload-artifact@v6
177177
with:
178178
name: gnu-root-full-result
179179
path: ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
180180
- name: Upload stty json results
181-
uses: actions/upload-artifact@v5
181+
uses: actions/upload-artifact@v6
182182
with:
183183
name: gnu-stty-full-result
184184
path: ${{ env.TEST_STTY_FULL_SUMMARY_FILE }}
@@ -189,7 +189,7 @@ jobs:
189189
# Compress logs before upload (fails otherwise)
190190
gzip gnu/tests/*/*.log
191191
- name: Upload test logs
192-
uses: actions/upload-artifact@v5
192+
uses: actions/upload-artifact@v6
193193
with:
194194
name: test-logs
195195
path: |
@@ -244,7 +244,7 @@ jobs:
244244
uses: lima-vm/lima-actions/setup@v1
245245
id: lima-actions-setup
246246
- name: Cache ~/.cache/lima
247-
uses: actions/cache@v4
247+
uses: actions/cache@v5
248248
with:
249249
path: ~/.cache/lima
250250
key: lima-${{ steps.lima-actions-setup.outputs.version }}
@@ -318,12 +318,12 @@ jobs:
318318
# Copy the test directory now
319319
rsync -v -a -e ssh lima-default:~/work/gnu/tests/ ./gnu/tests-selinux/
320320
- name: Upload SELinux json results
321-
uses: actions/upload-artifact@v5
321+
uses: actions/upload-artifact@v6
322322
with:
323323
name: selinux-gnu-full-result
324324
path: ${{ env.TEST_SELINUX_FULL_SUMMARY_FILE }}
325325
- name: Upload SELinux root json results
326-
uses: actions/upload-artifact@v5
326+
uses: actions/upload-artifact@v6
327327
with:
328328
name: selinux-root-gnu-full-result
329329
path: ${{ env.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }}
@@ -333,7 +333,7 @@ jobs:
333333
# Compress logs before upload (fails otherwise)
334334
gzip gnu/tests-selinux/*/*.log
335335
- name: Upload SELinux test logs
336-
uses: actions/upload-artifact@v5
336+
uses: actions/upload-artifact@v6
337337
with:
338338
name: selinux-test-logs
339339
path: |
@@ -376,32 +376,32 @@ jobs:
376376
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)
377377
path: "reference"
378378
- name: Download full json results
379-
uses: actions/download-artifact@v6
379+
uses: actions/download-artifact@v7
380380
with:
381381
name: gnu-full-result
382382
path: results
383383
merge-multiple: true
384384
- name: Download root json results
385-
uses: actions/download-artifact@v6
385+
uses: actions/download-artifact@v7
386386
with:
387387
name: gnu-root-full-result
388388
path: results
389389
merge-multiple: true
390390
- name: Download stty json results
391-
uses: actions/download-artifact@v6
391+
uses: actions/download-artifact@v7
392392
with:
393393
name: gnu-stty-full-result
394394
path: results
395395
merge-multiple: true
396396

397397
- name: Download selinux json results
398-
uses: actions/download-artifact@v6
398+
uses: actions/download-artifact@v7
399399
with:
400400
name: selinux-gnu-full-result
401401
path: results
402402
merge-multiple: true
403403
- name: Download selinux root json results
404-
uses: actions/download-artifact@v6
404+
uses: actions/download-artifact@v7
405405
with:
406406
name: selinux-root-gnu-full-result
407407
path: results
@@ -450,17 +450,17 @@ jobs:
450450
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
451451
outputs HASH
452452
- name: Upload SHA1/ID of 'test-summary'
453-
uses: actions/upload-artifact@v5
453+
uses: actions/upload-artifact@v6
454454
with:
455455
name: "${{ steps.summary.outputs.HASH }}"
456456
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
457457
- name: Upload test results summary
458-
uses: actions/upload-artifact@v5
458+
uses: actions/upload-artifact@v6
459459
with:
460460
name: test-summary
461461
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
462462
- name: Upload aggregated json results
463-
uses: actions/upload-artifact@v5
463+
uses: actions/upload-artifact@v6
464464
with:
465465
name: aggregated-result
466466
path: ${{ steps.vars.outputs.AGGREGATED_SUMMARY_FILE }}
@@ -512,7 +512,7 @@ jobs:
512512
fi
513513
- name: Upload comparison log (for GnuComment workflow)
514514
if: success() || failure() # run regardless of prior step success/failure
515-
uses: actions/upload-artifact@v5
515+
uses: actions/upload-artifact@v6
516516
with:
517517
name: comment
518518
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

.github/workflows/code-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
run: npm install -g cspell
256256

257257
- name: Cache pre-commit environments
258-
uses: actions/cache@v4
258+
uses: actions/cache@v5
259259
with:
260260
path: ~/.cache/pre-commit
261261
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/fuzzing.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
shared-key: "cargo-fuzz-cache-key"
111111
cache-directories: "fuzz/target"
112112
- name: Restore Cached Corpus
113-
uses: actions/cache/restore@v4
113+
uses: actions/cache/restore@v5
114114
with:
115115
key: corpus-cache-${{ matrix.test-target.name }}
116116
path: |
@@ -192,13 +192,13 @@ jobs:
192192
193193
echo "" >> $GITHUB_STEP_SUMMARY
194194
- name: Save Corpus Cache
195-
uses: actions/cache/save@v4
195+
uses: actions/cache/save@v5
196196
with:
197197
key: corpus-cache-${{ matrix.test-target.name }}
198198
path: |
199199
fuzz/corpus/${{ matrix.test-target.name }}
200200
- name: Upload Stats
201-
uses: actions/upload-artifact@v5
201+
uses: actions/upload-artifact@v6
202202
with:
203203
name: fuzz-stats-${{ matrix.test-target.name }}
204204
path: |
@@ -215,7 +215,7 @@ jobs:
215215
with:
216216
persist-credentials: false
217217
- name: Download all stats
218-
uses: actions/download-artifact@v6
218+
uses: actions/download-artifact@v7
219219
with:
220220
path: fuzz/stats-artifacts
221221
pattern: fuzz-stats-*
@@ -309,7 +309,7 @@ jobs:
309309
run: |
310310
cat fuzzing_summary.md
311311
- name: Upload Summary
312-
uses: actions/upload-artifact@v5
312+
uses: actions/upload-artifact@v6
313313
with:
314314
name: fuzzing-summary
315315
path: fuzzing_summary.md

.vscode/cspell.dictionaries/jargon.wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ PCLMUL
198198
pclmul
199199
PCLMULQDQ
200200
pclmulqdq
201+
PMULL
202+
pmull
201203
TUNABLES
202204
tunables
203205
VMULL

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/uu/base32/src/base32.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@ use uucore::{encoding::Format, error::UResult, translate};
1010

1111
#[uucore::main]
1212
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
13-
let format = Format::Base32;
14-
let (about, usage) = get_info();
15-
let config = base_common::parse_base_cmd_args(args, about, usage)?;
13+
let config = base_common::parse_base_cmd_args(args, uu_app())?;
1614
let mut input = base_common::get_input(&config)?;
17-
base_common::handle_input(&mut input, format, config)
15+
base_common::handle_input(&mut input, Format::Base32, config)
1816
}
1917

2018
pub fn uu_app() -> Command {
21-
let (about, usage) = get_info();
22-
base_common::base_app(about, usage)
23-
}
24-
25-
fn get_info() -> (&'static str, &'static str) {
26-
let about: &'static str = Box::leak(translate!("base32-about").into_boxed_str());
27-
let usage: &'static str = Box::leak(translate!("base32-usage").into_boxed_str());
28-
(about, usage)
19+
base_common::base_app(translate!("base32-about"), translate!("base32-usage"))
2920
}

0 commit comments

Comments
 (0)