Skip to content

Commit 8b15243

Browse files
authored
Merge branch 'main' into fold_fix
2 parents 9ed32fe + 997d956 commit 8b15243

File tree

87 files changed

+2286
-787
lines changed

Some content is hidden

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

87 files changed

+2286
-787
lines changed

.github/workflows/CICD.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,14 @@ jobs:
300300
mv -t target/ target.cache/release 2>/dev/null || true
301301
- name: "`make nextest`"
302302
shell: bash
303-
run: make nextest CARGOFLAGS="--profile ci --hide-progress-bar"
303+
run: make nextest PROFILE=ci CARGOFLAGS="--hide-progress-bar"
304304
env:
305305
RUST_BACKTRACE: "1"
306-
- name: "`make install COMPLETIONS=n MANPAGES=n`"
306+
- name: "`make install COMPLETIONS=n MANPAGES=n LOCALES=n`"
307307
shell: bash
308308
run: |
309309
set -x
310-
DESTDIR=/tmp/ make PROFILE=release COMPLETIONS=n MANPAGES=n install
310+
DESTDIR=/tmp/ make PROFILE=release COMPLETIONS=n MANPAGES=n LOCALES=n install
311311
# Check that the utils are present
312312
test -f /tmp/usr/local/bin/tty
313313
# Check that the manpage is not present
@@ -355,20 +355,12 @@ jobs:
355355
test -f /tmp/usr/local/bin/hashsum
356356
# Check that hashsum symlinks are present
357357
test -h /tmp/usr/local/bin/b2sum
358-
test -h /tmp/usr/local/bin/b3sum
359358
test -h /tmp/usr/local/bin/md5sum
360359
test -h /tmp/usr/local/bin/sha1sum
361360
test -h /tmp/usr/local/bin/sha224sum
362361
test -h /tmp/usr/local/bin/sha256sum
363-
test -h /tmp/usr/local/bin/sha3-224sum
364-
test -h /tmp/usr/local/bin/sha3-256sum
365-
test -h /tmp/usr/local/bin/sha3-384sum
366-
test -h /tmp/usr/local/bin/sha3-512sum
367362
test -h /tmp/usr/local/bin/sha384sum
368-
test -h /tmp/usr/local/bin/sha3sum
369363
test -h /tmp/usr/local/bin/sha512sum
370-
test -h /tmp/usr/local/bin/shake128sum
371-
test -h /tmp/usr/local/bin/shake256sum
372364
- name: "`make install MULTICALL=y LN=ln -svf`"
373365
shell: bash
374366
run: |
@@ -1269,7 +1261,7 @@ jobs:
12691261
path: ~/.cache/lima
12701262
key: lima-${{ steps.lima-actions-setup.outputs.version }}
12711263
- name: Start Fedora VM with SELinux
1272-
run: limactl start --plain --name=default --cpus=4 --disk=30 --memory=4 --network=lima:user-v2 template://fedora
1264+
run: limactl start --plain --name=default --cpus=4 --disk=30 --memory=4 --network=lima:user-v2 template:fedora
12731265
- run: rsync -v -a -e ssh . lima-default:~/work/
12741266
- name: Setup Rust and other build deps in VM
12751267
run: |

.github/workflows/GnuTests.yml

Lines changed: 21 additions & 2 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:
@@ -42,6 +41,16 @@ jobs:
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
@@ -164,6 +173,16 @@ jobs:
164173
with:
165174
path: 'uutils'
166175
persist-credentials: false
176+
- name: Extract GNU version from build-gnu.sh
177+
id: gnu-version-selinux
178+
run: |
179+
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
180+
if [ -z "$GNU_VERSION" ]; then
181+
echo "Error: Failed to extract GNU version from build-gnu.sh"
182+
exit 1
183+
fi
184+
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
185+
echo "Extracted GNU version: ${GNU_VERSION}"
167186
- uses: dtolnay/rust-toolchain@master
168187
with:
169188
toolchain: stable
@@ -197,7 +216,7 @@ jobs:
197216
path: ~/.cache/lima
198217
key: lima-${{ steps.lima-actions-setup.outputs.version }}
199218
- 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
219+
run: limactl start --plain --name=default --cpus=4 --disk=40 --memory=8 --network=lima:user-v2 template:fedora
201220
- name: Verify SELinux Status and Configuration
202221
run: |
203222
lima getenforce

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
~/.android/avd/*/*.lock
117117
- name: Create and cache emulator image
118118
if: steps.avd-cache.outputs.cache-hit != 'true'
119-
uses: reactivecircus/android-emulator-runner@v2.34.0
119+
uses: reactivecircus/android-emulator-runner@v2.35.0
120120
with:
121121
api-level: ${{ matrix.api-level }}
122122
target: ${{ matrix.target }}
@@ -161,7 +161,7 @@ jobs:
161161
free -mh
162162
df -Th
163163
- name: Build and Test
164-
uses: reactivecircus/android-emulator-runner@v2.34.0
164+
uses: reactivecircus/android-emulator-runner@v2.35.0
165165
with:
166166
api-level: ${{ matrix.api-level }}
167167
target: ${{ matrix.target }}

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
- { package: uu_unexpand }
4444
- { package: uu_uniq }
4545
- { package: uu_wc }
46+
- { package: uu_factor }
4647
steps:
4748
- uses: actions/checkout@v5
4849
with:

.github/workflows/code-quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
else
134134
extra="--features ${{ matrix.job.features }}"
135135
fi
136-
case '${{ matrix.job.workspace-tests }}' in
136+
case '${{ matrix.job.workspace }}' in
137137
1|t|true|y|yes)
138138
extra="${extra} --workspace"
139139
;;
@@ -186,7 +186,7 @@ jobs:
186186
cfg_files=($(shopt -s nullglob ; echo {.vscode,.}/{,.}c[sS]pell{.json,.config{.js,.cjs,.json,.yaml,.yml},.yaml,.yml} ;))
187187
cfg_file=${cfg_files[0]}
188188
unset CSPELL_CFG_OPTION ; if [ -n "$cfg_file" ]; then CSPELL_CFG_OPTION="--config $cfg_file" ; fi
189-
S=$(cspell ${CSPELL_CFG_OPTION} --no-summary --no-progress .) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n "s/${PWD//\//\\/}\/(.*):(.*):(.*) - (.*)/::${fault_type} file=\1,line=\2,col=\3::${fault_type^^}: \4 (file:'\1', line:\2)/p" ; fault=true ; true ; }
189+
S=$(cspell ${CSPELL_CFG_OPTION} --no-summary --no-progress .) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n "s/^(.*):([0-9]+):([0-9]+) - Unknown word \(([^)]+)\).*$/::${fault_type} file=\1,line=\2,col=\3::${fault_type^^}: \`cspell\`: Unknown word '\4' (file:'\1', line:\2)/p" ; fault=true ; true ; }
190190
if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi
191191
192192
toml_format:

.github/workflows/freebsd.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ jobs:
4040
- uses: Swatinem/rust-cache@v2
4141
- name: Run sccache-cache
4242
uses: mozilla-actions/sccache-action@v0.0.9
43+
with:
44+
disable_annotations: true
4345
- name: Prepare, build and test
44-
uses: vmactions/freebsd-vm@v1.2.5
46+
uses: vmactions/freebsd-vm@v1.2.6
4547
with:
4648
usesh: true
4749
sync: rsync
@@ -134,8 +136,10 @@ jobs:
134136
- uses: Swatinem/rust-cache@v2
135137
- name: Run sccache-cache
136138
uses: mozilla-actions/sccache-action@v0.0.9
139+
with:
140+
disable_annotations: true
137141
- name: Prepare, build and test
138-
uses: vmactions/freebsd-vm@v1.2.5
142+
uses: vmactions/freebsd-vm@v1.2.6
139143
with:
140144
usesh: true
141145
sync: rsync
@@ -196,7 +200,7 @@ jobs:
196200
if (test -z "\$FAULT"); then cargo nextest run --hide-progress-bar --profile ci --features '${{ matrix.job.features }}' || FAULT=1 ; fi
197201
# There is no systemd-logind on FreeBSD, so test all features except feat_systemd_logind ( https://github.com/rust-lang/cargo/issues/3126#issuecomment-2523441905 )
198202
if (test -z "\$FAULT"); then
199-
UUCORE_FEATURES=\$(cargo metadata --format-version=1 --no-deps -p uucore | jq -r '.packages[] | select(.name == "uucore") | .features | keys | .[]' | grep -v "feat_systemd_logind" | paste -s -d "," -)
203+
UUCORE_FEATURES=\$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "uucore") | .features | keys | .[]' | grep -v "feat_systemd_logind" | paste -s -d "," -)
200204
cargo nextest run --hide-progress-bar --profile ci --features "\$UUCORE_FEATURES" -p uucore || FAULT=1
201205
fi
202206
# Test building with make

.github/workflows/l10n.yml

Lines changed: 129 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,10 +1245,138 @@ jobs:
12451245
exit 1
12461246
fi
12471247
1248+
l10n_locale_embedding_cargo_install:
1249+
name: L10n/Locale Embedding - Cargo Install
1250+
runs-on: ubuntu-latest
1251+
env:
1252+
SCCACHE_GHA_ENABLED: "true"
1253+
RUSTC_WRAPPER: "sccache"
1254+
steps:
1255+
- uses: actions/checkout@v5
1256+
with:
1257+
persist-credentials: false
1258+
- uses: dtolnay/rust-toolchain@stable
1259+
- uses: Swatinem/rust-cache@v2
1260+
with:
1261+
key: cargo-install-locale-embedding
1262+
- name: Run sccache-cache
1263+
uses: mozilla-actions/sccache-action@v0.0.9
1264+
- name: Install prerequisites
1265+
run: |
1266+
sudo apt-get -y update
1267+
sudo apt-get -y install libselinux1-dev locales
1268+
# Generate French locale for testing
1269+
sudo locale-gen --keep-existing fr_FR.UTF-8
1270+
locale -a | grep -i fr || exit 1
1271+
1272+
- name: Test English locale embedding (default)
1273+
run: |
1274+
export LANG=en_US.UTF-8
1275+
export LC_ALL=en_US.UTF-8
1276+
1277+
echo "Building uu_yes with LANG=$LANG"
1278+
cargo build --package uu_yes --release
1279+
1280+
# Find the generated embedded_locales.rs
1281+
locale_file=$(find target/release/build -path "*/uu_yes-*/out/embedded_locales.rs" -o -path "*/uucore-*/out/embedded_locales.rs" | head -1)
1282+
if [ -z "$locale_file" ]; then
1283+
echo "ERROR: Could not find embedded_locales.rs"
1284+
exit 1
1285+
fi
1286+
1287+
echo "Found embedded_locales.rs at: $locale_file"
1288+
echo "Checking embedded locales..."
1289+
1290+
# Should contain en-US
1291+
if grep -q 'yes/en-US\.ftl' "$locale_file" || grep -q 'uucore/en-US\.ftl' "$locale_file"; then
1292+
echo "✓ Found en-US locale (fallback)"
1293+
else
1294+
echo "✗ ERROR: en-US locale not found"
1295+
exit 1
1296+
fi
1297+
1298+
# Should NOT contain fr-FR when building with en_US.UTF-8
1299+
if grep -q 'yes/fr-FR\.ftl' "$locale_file" || grep -q 'uucore/fr-FR\.ftl' "$locale_file"; then
1300+
echo "✗ ERROR: Unexpectedly found fr-FR locale when LANG=en_US.UTF-8"
1301+
exit 1
1302+
else
1303+
echo "✓ Correctly omitted fr-FR locale"
1304+
fi
1305+
1306+
echo "✓ SUCCESS: English locale embedding working correctly"
1307+
1308+
- name: Test French locale embedding (system locale)
1309+
run: |
1310+
export LANG=fr_FR.UTF-8
1311+
export LC_ALL=fr_FR.UTF-8
1312+
1313+
# Clean previous build to ensure fresh compile
1314+
cargo clean -p uu_yes
1315+
cargo clean -p uucore
1316+
1317+
echo "Building uu_yes with LANG=$LANG"
1318+
cargo build --package uu_yes --release
1319+
1320+
# Find the generated embedded_locales.rs
1321+
locale_file=$(find target/release/build -path "*/uu_yes-*/out/embedded_locales.rs" -o -path "*/uucore-*/out/embedded_locales.rs" | head -1)
1322+
if [ -z "$locale_file" ]; then
1323+
echo "ERROR: Could not find embedded_locales.rs"
1324+
exit 1
1325+
fi
1326+
1327+
echo "Found embedded_locales.rs at: $locale_file"
1328+
echo "Checking embedded locales..."
1329+
1330+
# Should contain en-US (fallback)
1331+
if grep -q 'yes/en-US\.ftl' "$locale_file" || grep -q 'uucore/en-US\.ftl' "$locale_file"; then
1332+
echo "✓ Found en-US locale (fallback)"
1333+
else
1334+
echo "✗ ERROR: en-US locale not found"
1335+
exit 1
1336+
fi
1337+
1338+
# Should contain fr-FR when building with fr_FR.UTF-8
1339+
if grep -q 'yes/fr-FR\.ftl' "$locale_file" || grep -q 'uucore/fr-FR\.ftl' "$locale_file"; then
1340+
echo "✓ Found fr-FR locale (system locale from LANG)"
1341+
else
1342+
echo "Note: fr-FR locale not found - this is expected if French translation doesn't exist yet"
1343+
echo "::notice::French locale for 'yes' utility may not be available"
1344+
fi
1345+
1346+
echo "✓ SUCCESS: System locale detection working correctly"
1347+
1348+
- name: Test locale count is reasonable
1349+
run: |
1350+
export LANG=fr_FR.UTF-8
1351+
cargo clean -p uu_yes
1352+
cargo build --package uu_yes --release
1353+
1354+
locale_file=$(find target/release/build -path "*/uucore-*/out/embedded_locales.rs" | head -1)
1355+
if [ -z "$locale_file" ]; then
1356+
echo "ERROR: Could not find uucore embedded_locales.rs"
1357+
exit 1
1358+
fi
1359+
1360+
# Count embedded locales (should be en-US + system locale, not all locales)
1361+
locale_count=$(grep -c '/en-US\.ftl\|/fr-FR\.ftl' "$locale_file" || echo "0")
1362+
echo "uu_yes has $locale_count embedded locale entries for yes utility"
1363+
1364+
# For a single utility build, should have minimal locales (en-US + optionally system locale)
1365+
# Not the full multicall set
1366+
total_match_count=$(grep -c '=> Some(r###' "$locale_file" || echo "0")
1367+
echo "Total embedded entries: $total_match_count"
1368+
1369+
if [ "$total_match_count" -le 10 ]; then
1370+
echo "✓ SUCCESS: Locale embedding is targeted ($total_match_count entries)"
1371+
else
1372+
echo "::warning::More locales than expected ($total_match_count entries)"
1373+
echo "This might be expected for utility + uucore locales"
1374+
fi
1375+
12481376
l10n_locale_embedding_regression_test:
12491377
name: L10n/Locale Embedding Regression Test
12501378
runs-on: ubuntu-latest
1251-
needs: [l10n_locale_embedding_cat, l10n_locale_embedding_ls, l10n_locale_embedding_multicall]
1379+
needs: [l10n_locale_embedding_cat, l10n_locale_embedding_ls, l10n_locale_embedding_multicall, l10n_locale_embedding_cargo_install]
12521380
steps:
12531381
- name: All locale embedding tests passed
12541382
run: echo "✓ All locale embedding tests passed successfully"

0 commit comments

Comments
 (0)