Skip to content

Commit a54986e

Browse files
committed
mv: create the cross-device destination exclusively and chown it by fd
1 parent 47df573 commit a54986e

152 files changed

Lines changed: 1267 additions & 1383 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.

.github/workflows/CICD.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ jobs:
876876
- { os: ubuntu-latest, features: "md5sum,sha1sum,sha224sum,sha256sum,sha384sum,sha512sum,cksum,openssl" }
877877
# macOS: vendored only — system libcrypto needs OPENSSL_DIR
878878
# pointing at Homebrew, which isn't worth wiring up for a smoke test.
879-
# MinGW(UCRT): done at make.yml as actual consumer is MSYS2 only
879+
# todo: check Windows (MinGW's system openssl)
880880
steps:
881881
- uses: actions/checkout@v7
882882
with:

.github/workflows/GnuComment.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ jobs:
1717

1818
runs-on: ubuntu-latest
1919
if: >
20-
github.event.workflow_run.event == 'pull_request' &&
21-
(github.event.workflow_run.conclusion == 'success' ||
22-
github.event.workflow_run.conclusion == 'failure')
20+
github.event.workflow_run.event == 'pull_request'
2321
steps:
2422
- name: 'Download artifact'
2523
uses: actions/github-script@v9
@@ -36,10 +34,6 @@ jobs:
3634
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
3735
return artifact.name == "comment"
3836
})[0];
39-
if (!matchArtifact) {
40-
core.info("No comment artifact found; skipping.");
41-
return;
42-
}
4337
var download = await github.rest.actions.downloadArtifact({
4438
owner: context.repo.owner,
4539
repo: context.repo.repo,

.github/workflows/GnuTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ env:
4040
jobs:
4141
native:
4242
name: Run GNU tests (native)
43-
runs-on: ubuntu-26.04 # some strace? test needs newer glibc
43+
runs-on: ubuntu-24.04
4444
steps:
4545
#### Get the code
4646
- name: Checkout code (uutils)

.github/workflows/freebsd.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
sync: rsync
4242
copyback: false
4343
# We need jq and GNU coreutils to run show-utils.sh and bash to use inline shell string replacement
44-
prepare: pkg install -y rust sudo jaq coreutils bash python3
44+
prepare: pkg install -y curl sudo jaq coreutils bash python3
4545
run: |
4646
## Prepare, build, and test
4747
sudo ln -s $(command -v jaq) /usr/local/bin/jq
@@ -62,6 +62,9 @@ jobs:
6262
sudo -i -u ${TEST_USER} bash << EOF
6363
set -e
6464
whoami
65+
curl https://sh.rustup.rs -sSf --output rustup.sh
66+
sh rustup.sh -y -c rustfmt,clippy --profile=minimal -t stable
67+
. ${HOME}/.cargo/env
6568
## VARs setup
6669
cd "${WORKSPACE}"
6770
unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in
@@ -131,7 +134,7 @@ jobs:
131134
usesh: true
132135
sync: rsync
133136
copyback: false
134-
prepare: pkg install -y gmake nextest rust sudo jaq
137+
prepare: pkg install -y curl gmake sudo jaq
135138
run: |
136139
## Prepare, build, and test
137140
sudo ln -s $(command -v jaq) /usr/local/bin/jq
@@ -155,6 +158,12 @@ jobs:
155158
sudo -i -u ${TEST_USER} sh << EOF
156159
set -e
157160
whoami
161+
curl https://sh.rustup.rs -sSf --output rustup.sh
162+
sh rustup.sh -y --profile=minimal
163+
. $HOME/.cargo/env
164+
# Install nextest
165+
mkdir -p ~/.cargo/bin
166+
curl -LsSf https://get.nexte.st/latest/freebsd | tar zxf - -C ~/.cargo/bin
158167
## Info
159168
# environment
160169
echo "## environment"
@@ -176,8 +185,6 @@ jobs:
176185
unset FAULT
177186
export CARGO_INCREMENTAL=0
178187
export RUSTFLAGS="-C strip=symbols" # for disk space
179-
# vendored OpenSSL takes many times to build. Use system one (LibreSSL is supported).
180-
export OPENSSL_NO_VENDOR=1 OPENSSL_DIR=/usr
181188
cargo build || FAULT=1
182189
export PATH=~/.cargo/bin:${PATH}
183190
export RUST_BACKTRACE=1

.github/workflows/make.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,15 @@ jobs:
311311
# Upgrading it mid-session changes the shared memory layout (60344 -> 59320),
312312
# which causes subsequent fork() calls to fail with EAGAIN (exit code 254).
313313
shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail {0}'
314-
# test Cygwin & MinGW(UCRT) instead of pre-installed Rust.
315314
run: |
316-
pacman -Sy --noconfirm --needed base-devel libopenssl make openssl-devel pkgconf rust \
317-
mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-rust
315+
pacman -Sy --noconfirm --needed base-devel libopenssl make openssl-devel pkgconf rust
318316
env:
319317
CHERE_INVOKING: 1
320318
- name: "`(x86_64-pc-cygwin) make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n`"
321319
shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail {0}'
322320
run: |
323321
set -x
322+
export OPENSSL_NO_VENDOR=1
324323
export CARGOFLAGS="--features openssl"
325324
DESTDIR=/tmp/c make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
326325
# Check that cksum is linked with openssl (e.g. msys-crypto-*.dll)
@@ -340,7 +339,6 @@ jobs:
340339
bsdtar -caf x86_64-pc-cygwin.tar.zst -C /tmp/c/usr/local bin
341340
env:
342341
CHERE_INVOKING: 1
343-
OPENSSL_NO_VENDOR: "1"
344342
RUST_BACKTRACE: "1"
345343
- name: Publish
346344
uses: softprops/action-gh-release@v3
@@ -353,21 +351,14 @@ jobs:
353351
individual-x86_64-pc-cygwin.tar.zst
354352
env:
355353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
356-
- name: "`make install` (MinGW UCRT)"
357-
shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail {0}'
358-
env:
359-
CHERE_INVOKING: 1
360-
MSYSTEM: "UCRT64"
361-
OPENSSL_DIR: "/ucrt64"
362-
OPENSSL_NO_VENDOR: "1"
363-
OPENSSL_STATIC: "0"
354+
- name: "`make install`"
355+
shell: bash
364356
run: |
365357
set -x
366-
export CARGOFLAGS="--features openssl"
367358
# Check that we exclude unix programs to avoid build failure
368359
# Windows's stdbuf depends on Cygwin's libstdbuf. So make should not try to install libstdbuf
369360
make install DESTDIR=/tmp/w PREFIX=/tmp/usr MULTICALL=y COMPLETIONS=n MANPAGES=n LOCALES=n \
370-
SKIP_UTILS="arch b2sum base32 base64 basename basenc cat comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold head hostname hostid join link ln ls md5sum mkdir mktemp more mv nl nproc numfmt od paste pathchk pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split sum sync tac tail tee test touch tr true truncate tsort tty uname unexpand uniq unlink vdir wc whoami yes"
361+
SKIP_UTILS="arch b2sum base32 base64 basename basenc cat cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold head hostname hostid join link ln ls md5sum mkdir mktemp more mv nl nproc numfmt od paste pathchk pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split sum sync tac tail tee test touch tr true truncate tsort tty uname unexpand uniq unlink vdir wc whoami yes"
371362
target/release/coreutils.exe stdbuf --version
372363
373364
test_busybox:

.github/workflows/openbsd.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ jobs:
7272
sudo -i -u ${TEST_USER} bash << EOF
7373
set -e
7474
whoami
75+
# Rust is installed from packages, no need for rustup
76+
# Set up PATH for cargo
77+
export PATH="/usr/local/bin:$PATH"
7578
## VARs setup
7679
cd "${WORKSPACE}"
7780
unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in
@@ -182,8 +185,12 @@ jobs:
182185
whoami
183186
# Increase max open files (512 by default)
184187
ulimit -n 1024
185-
# todo: install nextest if official OpenBSD package was provided
186-
# Use regular cargo test currently
188+
# Rust is installed from packages, no need for rustup
189+
# Set up PATH for cargo
190+
export PATH="/usr/local/bin:$PATH"
191+
# Install nextest
192+
mkdir -p ~/.cargo/bin
193+
# Note: nextest might not have OpenBSD builds, so we'll use regular cargo test
187194
## Info
188195
echo "::group::environment"
189196
echo "CI='${CI}'"
@@ -203,12 +210,11 @@ jobs:
203210
cd "${WORKSPACE}"
204211
unset FAULT
205212
# openbsd is very slow. Omit duplicated cargo build and do test only
213+
export PATH=~/.cargo/bin:${PATH}
206214
export RUST_BACKTRACE=1
207215
export CARGO_TERM_COLOR=always
208216
# Avoid filling disk space
209217
export RUSTFLAGS="-C strip=symbols"
210-
# vendored OpenSSL takes many times to build. Use system one (LibreSSL is supported).
211-
export OPENSSL_NO_VENDOR=1 OPENSSL_DIR=/usr
212218
# Use cargo test since nextest might not support OpenBSD
213219
if (test -z "\$FAULT"); then
214220
echo "::group::cargo test (workspace)"

0 commit comments

Comments
 (0)