mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge branch 'main' into lossy-string-cleanup
This commit is contained in:
@@ -2,3 +2,8 @@ CONFIG_FEATURE_FANCY_HEAD=y
|
||||
CONFIG_UNICODE_SUPPORT=y
|
||||
CONFIG_DESKTOP=y
|
||||
CONFIG_LONG_OPTS=y
|
||||
CONFIG_FEATURE_SORT_BIG=y
|
||||
CONFIG_FEATURE_CATV=y
|
||||
CONFIG_FEATURE_CATN=y
|
||||
CONFIG_FEATURE_TR_CLASSES=y
|
||||
CONFIG_FEATURE_READLINK_FOLLOW=y
|
||||
|
||||
@@ -12,12 +12,12 @@ RUN apt-get update \
|
||||
gcc \
|
||||
gdb \
|
||||
gperf \
|
||||
jq \
|
||||
libacl1-dev \
|
||||
libattr1-dev \
|
||||
libcap-dev \
|
||||
libexpect-perl \
|
||||
libselinux1-dev \
|
||||
libsystemd-dev \
|
||||
python3-pyinotify \
|
||||
quilt \
|
||||
texinfo \
|
||||
|
||||
+29
-34
@@ -149,7 +149,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
RUSTDOCFLAGS="-Dwarnings" cargo doc ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-deps --workspace --document-private-items
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v21
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v22
|
||||
with:
|
||||
fix: "true"
|
||||
globs: |
|
||||
@@ -300,22 +300,22 @@ jobs:
|
||||
run: make nextest PROFILE=ci CARGOFLAGS="--hide-progress-bar"
|
||||
env:
|
||||
RUST_BACKTRACE: "1"
|
||||
|
||||
- name: "`make install PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
|
||||
- name: "`make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
DESTDIR=/tmp/ make PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n install
|
||||
DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n
|
||||
# Check that utils are built with given profile
|
||||
./target/release-fast/true
|
||||
# Check that the utils are present
|
||||
test -f /tmp/usr/local/bin/tty
|
||||
# Check that the progs have prefix
|
||||
test -f /tmp/usr/local/bin/uu-tty
|
||||
test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
|
||||
# Check that the manpage is not present
|
||||
! test -f /tmp/usr/local/share/man/man1/whoami.1
|
||||
! test -f /tmp/usr/local/share/man/man1/uu-whoami.1
|
||||
# Check that the completion is not present
|
||||
! test -f /tmp/usr/local/share/zsh/site-functions/_install
|
||||
! test -f /tmp/usr/local/share/bash-completion/completions/head.bash
|
||||
! test -f /tmp/usr/local/share/fish/vendor_completions.d/cat.fish
|
||||
! test -f /tmp/usr/local/share/zsh/site-functions/_uu-install
|
||||
! test -f /tmp/usr/local/share/bash-completion/completions/uu-head.bash
|
||||
! test -f /tmp/usr/local/share/fish/vendor_completions.d/uu-cat.fish
|
||||
env:
|
||||
RUST_BACKTRACE: "1"
|
||||
- name: "`make install`"
|
||||
@@ -465,7 +465,7 @@ jobs:
|
||||
run: |
|
||||
## Install dependencies
|
||||
sudo apt-get update
|
||||
sudo apt-get install jq libselinux1-dev libsystemd-dev
|
||||
sudo apt-get install libselinux1-dev libsystemd-dev
|
||||
- name: "`make install`"
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -502,14 +502,14 @@ jobs:
|
||||
--arg multisize "$SIZE_MULTI" \
|
||||
'{($date): { sha: $sha, size: $size, multisize: $multisize, }}' > size-result.json
|
||||
- name: Download the previous individual size result
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: CICD.yml
|
||||
name: individual-size-result
|
||||
repo: uutils/coreutils
|
||||
path: dl
|
||||
- name: Download the previous size result
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
with:
|
||||
workflow: CICD.yml
|
||||
name: size-result
|
||||
@@ -546,12 +546,12 @@ jobs:
|
||||
previous_multisize=$(cat dl/size-result.json | jq -r '.[] | .multisize')
|
||||
check 'multicall binary' "$multisize" "$previous_multisize" 'size-result.json'
|
||||
- name: Upload the individual size result
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: individual-size-result
|
||||
path: individual-size-result.json
|
||||
- name: Upload the size result
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: size-result
|
||||
path: size-result.json
|
||||
@@ -579,14 +579,14 @@ jobs:
|
||||
# - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_selinux , use-cross: use-cross }
|
||||
- { os: ubuntu-latest , target: i686-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross }
|
||||
- { os: ubuntu-latest , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross }
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross, skip-publish: true }
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,uudoc" , use-cross: no, workspace-tests: true }
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true }
|
||||
- { os: ubuntu-latest , target: wasm32-unknown-unknown , default-features: false, features: uucore/format, skip-tests: true, skip-package: true, skip-publish: true }
|
||||
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU
|
||||
# PR #7964: Mac should still build even if the feature is not enabled
|
||||
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true } # M1 CPU
|
||||
# PR #7964: Mac should still build even if the feature is not enabled. Do not publish this.
|
||||
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, skip-publish: true } # M1 CPU
|
||||
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos, workspace-tests: true }
|
||||
- { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows }
|
||||
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows }
|
||||
@@ -637,7 +637,6 @@ jobs:
|
||||
case '${{ matrix.job.target }}' in
|
||||
aarch64-*) TARGET_ARCH=arm64 ;;
|
||||
arm-*-*hf) TARGET_ARCH=armhf ;;
|
||||
i586-*) TARGET_ARCH=i586 ;;
|
||||
i686-*) TARGET_ARCH=i686 ;;
|
||||
x86_64-*) TARGET_ARCH=x86_64 ;;
|
||||
esac;
|
||||
@@ -713,7 +712,6 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
## Create build/work space
|
||||
mkdir -p '${{ steps.vars.outputs.STAGING }}'
|
||||
mkdir -p '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}'
|
||||
- name: Install/setup prerequisites
|
||||
shell: bash
|
||||
@@ -822,7 +820,7 @@ jobs:
|
||||
env:
|
||||
RUST_BACKTRACE: "1"
|
||||
- name: Archive executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: ${{ env.PROJECT_NAME }}-${{ matrix.job.target }}${{ steps.vars.outputs.ARTIFACTS_SUFFIX }}
|
||||
path: target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}
|
||||
@@ -922,17 +920,17 @@ jobs:
|
||||
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
|
||||
echo "HASH=${HASH}" >> $GITHUB_OUTPUT
|
||||
- name: Reserve SHA1/ID of 'test-summary'
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: "${{ steps.summary.outputs.HASH }}"
|
||||
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||
- name: Reserve test results summary
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: busybox-test-summary
|
||||
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||
- name: Upload json results
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: busybox-result.json
|
||||
path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }}
|
||||
@@ -1015,17 +1013,17 @@ jobs:
|
||||
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
|
||||
echo "HASH=${HASH}" >> $GITHUB_OUTPUT
|
||||
- name: Reserve SHA1/ID of 'test-summary'
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: "${{ steps.summary.outputs.HASH }}"
|
||||
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||
- name: Reserve test results summary
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: toybox-test-summary
|
||||
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||
- name: Upload json results
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: toybox-result.json
|
||||
path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }}
|
||||
@@ -1101,7 +1099,9 @@ jobs:
|
||||
|
||||
case '${{ matrix.job.os }}' in
|
||||
ubuntu-latest)
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
|
||||
# selinux and systemd headers needed to build tests
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install libselinux1-dev libsystemd-dev
|
||||
# pinky is a tool to show logged-in users from utmp, and gecos fields from /etc/passwd.
|
||||
# In GitHub Action *nix VMs, no accounts log in, even the "runner" account that runs the commands, and "system boot" entry is missing.
|
||||
# The account also has empty gecos fields.
|
||||
@@ -1121,11 +1121,6 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
|
||||
case '${{ matrix.job.os }}' in
|
||||
# Update binutils if MinGW due to https://github.com/rust-lang/rust/issues/112368
|
||||
windows-latest) C:/msys64/usr/bin/pacman.exe -Sy --needed mingw-w64-x86_64-gcc --noconfirm ; echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH ;;
|
||||
esac
|
||||
|
||||
## Install the llvm-tools component to get access to `llvm-profdata`
|
||||
rustup component add llvm-tools
|
||||
|
||||
@@ -1220,7 +1215,7 @@ jobs:
|
||||
uses: lima-vm/lima-actions/setup@v1
|
||||
id: lima-actions-setup
|
||||
- name: Cache ~/.cache/lima
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.cache/lima
|
||||
key: lima-${{ steps.lima-actions-setup.outputs.version }}
|
||||
|
||||
@@ -2,10 +2,11 @@ name: GnuTests
|
||||
|
||||
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
|
||||
# spell-checker:ignore (jargon) submodules devel
|
||||
# spell-checker:ignore (libs/utils) autopoint chksum getenforce gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
|
||||
# spell-checker:ignore (libs/utils) autopoint chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
|
||||
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
|
||||
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
|
||||
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
|
||||
# spell-checker:ignore userns
|
||||
|
||||
# * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT`
|
||||
|
||||
@@ -27,6 +28,7 @@ env:
|
||||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
TEST_FULL_SUMMARY_FILE: 'gnu-full-result.json'
|
||||
TEST_ROOT_FULL_SUMMARY_FILE: 'gnu-root-full-result.json'
|
||||
TEST_STTY_FULL_SUMMARY_FILE: 'gnu-stty-full-result.json'
|
||||
TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json'
|
||||
TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json'
|
||||
|
||||
@@ -41,16 +43,6 @@ jobs:
|
||||
with:
|
||||
path: 'uutils'
|
||||
persist-credentials: false
|
||||
- name: Extract GNU version from build-gnu.sh
|
||||
id: gnu-version
|
||||
run: |
|
||||
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
|
||||
if [ -z "$GNU_VERSION" ]; then
|
||||
echo "Error: Failed to extract GNU version from build-gnu.sh"
|
||||
exit 1
|
||||
fi
|
||||
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
|
||||
echo "Extracted GNU version: ${GNU_VERSION}"
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
@@ -59,20 +51,15 @@ jobs:
|
||||
with:
|
||||
workspaces: "./uutils -> target"
|
||||
- name: Checkout code (GNU coreutils)
|
||||
uses: actions/checkout@v6
|
||||
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
|
||||
- name: Restore files for faster configure and skipping make
|
||||
uses: actions/cache@v5
|
||||
id: cache-config-gnu
|
||||
with:
|
||||
repository: 'coreutils/coreutils'
|
||||
path: 'gnu'
|
||||
ref: ${{ env.REPO_GNU_REF }}
|
||||
submodules: false
|
||||
persist-credentials: false
|
||||
- name: Override submodule URL and initialize submodules
|
||||
# Use github instead of upstream git server
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git config submodule.gnulib.url https://github.com/coreutils/gnulib.git
|
||||
git submodule update --init --recursive --depth 1
|
||||
working-directory: gnu
|
||||
path: |
|
||||
gnu/config.cache
|
||||
gnu/src/getlimits
|
||||
key: ${{ runner.os }}-gnu-config-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }} # use build-gnu.sh for extremely safe caching
|
||||
|
||||
#### Build environment setup
|
||||
- name: Install dependencies
|
||||
@@ -82,6 +69,8 @@ jobs:
|
||||
sudo apt-get update
|
||||
## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
|
||||
sudo apt-get install -y autopoint gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
|
||||
curl http://launchpadlibrarian.net/831710181/automake_1.18.1-3_all.deb > automake-1.18.deb
|
||||
sudo dpkg -i --force-depends automake-1.18.deb
|
||||
- name: Add various locales
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -99,6 +88,10 @@ jobs:
|
||||
sudo locale-gen --keep-existing en_US
|
||||
sudo locale-gen --keep-existing en_US.UTF-8
|
||||
sudo locale-gen --keep-existing ru_RU.KOI8-R
|
||||
sudo locale-gen --keep-existing fa_IR.UTF-8 # Iran
|
||||
sudo locale-gen --keep-existing am_ET.UTF-8 # Ethiopia
|
||||
sudo locale-gen --keep-existing th_TH.UTF-8 # Thailand
|
||||
sudo locale-gen --keep-existing zh_CN.GB18030 # China
|
||||
|
||||
sudo update-locale
|
||||
echo "After:"
|
||||
@@ -111,11 +104,23 @@ jobs:
|
||||
## Build binaries
|
||||
cd 'uutils'
|
||||
env PROFILE=release-small bash util/build-gnu.sh
|
||||
|
||||
- name: Save files for faster configure and skipping make
|
||||
uses: actions/cache/save@v5
|
||||
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: |
|
||||
gnu/config.cache
|
||||
gnu/src/getlimits
|
||||
key: ${{ runner.os }}-gnu-config-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }}
|
||||
|
||||
### Run tests as user
|
||||
- name: Run GNU tests
|
||||
shell: bash
|
||||
run: |
|
||||
## Use unshare
|
||||
sudo sysctl -w kernel.unprivileged_userns_clone=1
|
||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
## Run GNU tests
|
||||
path_GNU='gnu'
|
||||
path_UUTILS='uutils'
|
||||
@@ -134,30 +139,58 @@ jobs:
|
||||
path_GNU='gnu'
|
||||
path_UUTILS='uutils'
|
||||
bash "uutils/util/run-gnu-test.sh" run-root
|
||||
|
||||
- name: Extract testing info from individual logs (run as root) into JSON
|
||||
shell: bash
|
||||
run : |
|
||||
path_UUTILS='uutils'
|
||||
python uutils/util/gnu-json-result.py gnu/tests > ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
|
||||
|
||||
### This shell has been changed from "bash" to this command
|
||||
### "script" will start a pty and the -q command removes the "script" initiation log
|
||||
### the -e flag makes it propagate the error code and -c runs the command in a pty
|
||||
### the primary purpose of this change is to run the tty GNU tests
|
||||
### The reason its separated from the rest of the tests is because one test can corrupt the other
|
||||
### tests through the use of the shared terminal and it changes the environment that the other
|
||||
### tests are run in, which can cause different results.
|
||||
- name: Run GNU stty tests
|
||||
shell: 'script -q -e -c "bash {0}"'
|
||||
run: |
|
||||
## Run GNU root tests
|
||||
path_GNU='gnu'
|
||||
path_UUTILS='uutils'
|
||||
bash "uutils/util/run-gnu-test.sh" run-tty
|
||||
|
||||
- name: Extract testing info from individual logs (stty) into JSON
|
||||
shell: bash
|
||||
run : |
|
||||
path_UUTILS='uutils'
|
||||
python uutils/util/gnu-json-result.py gnu/tests > ${{ env.TEST_STTY_FULL_SUMMARY_FILE }}
|
||||
|
||||
### Upload artifacts
|
||||
- name: Upload full json results
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: gnu-full-result
|
||||
path: ${{ env.TEST_FULL_SUMMARY_FILE }}
|
||||
- name: Upload root json results
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: gnu-root-full-result
|
||||
path: ${{ env.TEST_ROOT_FULL_SUMMARY_FILE }}
|
||||
- name: Upload stty json results
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: gnu-stty-full-result
|
||||
path: ${{ env.TEST_STTY_FULL_SUMMARY_FILE }}
|
||||
|
||||
- name: Compress test logs
|
||||
shell: bash
|
||||
run : |
|
||||
# Compress logs before upload (fails otherwise)
|
||||
gzip gnu/tests/*/*.log
|
||||
- name: Upload test logs
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: test-logs
|
||||
path: |
|
||||
@@ -174,16 +207,6 @@ jobs:
|
||||
with:
|
||||
path: 'uutils'
|
||||
persist-credentials: false
|
||||
- name: Extract GNU version from build-gnu.sh
|
||||
id: gnu-version-selinux
|
||||
run: |
|
||||
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
|
||||
if [ -z "$GNU_VERSION" ]; then
|
||||
echo "Error: Failed to extract GNU version from build-gnu.sh"
|
||||
exit 1
|
||||
fi
|
||||
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
|
||||
echo "Extracted GNU version: ${GNU_VERSION}"
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
@@ -192,27 +215,14 @@ jobs:
|
||||
with:
|
||||
workspaces: "./uutils -> target"
|
||||
- name: Checkout code (GNU coreutils)
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: 'coreutils/coreutils'
|
||||
path: 'gnu'
|
||||
ref: ${{ env.REPO_GNU_REF }}
|
||||
submodules: false
|
||||
persist-credentials: false
|
||||
- name: Override submodule URL and initialize submodules
|
||||
# Use github instead of upstream git server
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git config submodule.gnulib.url https://github.com/coreutils/gnulib.git
|
||||
git submodule update --init --recursive --depth 1
|
||||
working-directory: gnu
|
||||
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
|
||||
|
||||
#### Lima build environment setup
|
||||
- name: Setup Lima
|
||||
uses: lima-vm/lima-actions/setup@v1
|
||||
id: lima-actions-setup
|
||||
- name: Cache ~/.cache/lima
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.cache/lima
|
||||
key: lima-${{ steps.lima-actions-setup.outputs.version }}
|
||||
@@ -236,7 +246,7 @@ jobs:
|
||||
- name: Install dependencies in VM
|
||||
run: |
|
||||
lima sudo dnf -y update
|
||||
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
|
||||
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
|
||||
lima rustup-init -y --default-toolchain stable
|
||||
- name: Copy the sources to VM
|
||||
run: |
|
||||
@@ -286,12 +296,12 @@ jobs:
|
||||
# Copy the test directory now
|
||||
rsync -v -a -e ssh lima-default:~/work/gnu/tests/ ./gnu/tests-selinux/
|
||||
- name: Upload SELinux json results
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: selinux-gnu-full-result
|
||||
path: ${{ env.TEST_SELINUX_FULL_SUMMARY_FILE }}
|
||||
- name: Upload SELinux root json results
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: selinux-root-gnu-full-result
|
||||
path: ${{ env.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }}
|
||||
@@ -301,7 +311,7 @@ jobs:
|
||||
# Compress logs before upload (fails otherwise)
|
||||
gzip gnu/tests-selinux/*/*.log
|
||||
- name: Upload SELinux test logs
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: selinux-test-logs
|
||||
path: |
|
||||
@@ -334,7 +344,7 @@ jobs:
|
||||
path: 'uutils'
|
||||
persist-credentials: false
|
||||
- name: Retrieve reference artifacts
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
uses: dawidd6/action-download-artifact@v12
|
||||
# ref: <https://github.com/dawidd6/action-download-artifact>
|
||||
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
|
||||
with:
|
||||
@@ -344,25 +354,32 @@ jobs:
|
||||
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)
|
||||
path: "reference"
|
||||
- name: Download full json results
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: gnu-full-result
|
||||
path: results
|
||||
merge-multiple: true
|
||||
- name: Download root json results
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: gnu-root-full-result
|
||||
path: results
|
||||
merge-multiple: true
|
||||
- name: Download stty json results
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: gnu-stty-full-result
|
||||
path: results
|
||||
merge-multiple: true
|
||||
|
||||
- name: Download selinux json results
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: selinux-gnu-full-result
|
||||
path: results
|
||||
merge-multiple: true
|
||||
- name: Download selinux root json results
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: selinux-root-gnu-full-result
|
||||
path: results
|
||||
@@ -377,7 +394,7 @@ jobs:
|
||||
path_UUTILS='uutils'
|
||||
|
||||
json_count=$(ls -l results/*.json | wc -l)
|
||||
if [[ "$json_count" -ne 4 ]]; then
|
||||
if [[ "$json_count" -ne 5 ]]; then
|
||||
echo "::error ::Failed to download all results json files (expected 4 files, found $json_count); failing early"
|
||||
ls -lR results || true
|
||||
exit 1
|
||||
@@ -411,17 +428,17 @@ jobs:
|
||||
HASH=$(sha1sum '${{ steps.vars.outputs.TEST_SUMMARY_FILE }}' | cut --delim=" " -f 1)
|
||||
outputs HASH
|
||||
- name: Upload SHA1/ID of 'test-summary'
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: "${{ steps.summary.outputs.HASH }}"
|
||||
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||
- name: Upload test results summary
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: test-summary
|
||||
path: "${{ steps.vars.outputs.TEST_SUMMARY_FILE }}"
|
||||
- name: Upload aggregated json results
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: aggregated-result
|
||||
path: ${{ steps.vars.outputs.AGGREGATED_SUMMARY_FILE }}
|
||||
@@ -473,7 +490,7 @@ jobs:
|
||||
fi
|
||||
- name: Upload comparison log (for GnuComment workflow)
|
||||
if: success() || failure() # run regardless of prior step success/failure
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: comment
|
||||
path: reference/comment/
|
||||
|
||||
@@ -22,7 +22,7 @@ concurrency:
|
||||
env:
|
||||
TERMUX: v0.118.0
|
||||
KEY_POSTFIX: nextest+rustc-hash+adb+sshd+upgrade+XGB+inc18
|
||||
COMMON_EMULATOR_OPTIONS: -no-window -noaudio -no-boot-anim -camera-back none -gpu swiftshader_indirect -metrics-collection
|
||||
COMMON_EMULATOR_OPTIONS: -no-window -noaudio -no-boot-anim -camera-back none -gpu off
|
||||
EMULATOR_DISK_SIZE: 12GB
|
||||
EMULATOR_HEAP_SIZE: 2048M
|
||||
EMULATOR_BOOT_TIMEOUT: 1200 # 20min
|
||||
@@ -36,15 +36,10 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest] # , macos-latest
|
||||
cores: [4] # , 6
|
||||
ram: [4096, 8192]
|
||||
ram: [4096]
|
||||
api-level: [28]
|
||||
target: [google_apis_playstore]
|
||||
arch: [x86, x86_64] # , arm64-v8a
|
||||
exclude:
|
||||
- ram: 8192
|
||||
arch: x86
|
||||
- ram: 4096
|
||||
arch: x86_64
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
EMULATOR_RAM_SIZE: ${{ matrix.ram }}
|
||||
@@ -90,7 +85,7 @@ jobs:
|
||||
free -mh
|
||||
df -Th
|
||||
- name: Restore AVD cache
|
||||
uses: actions/cache/restore@v4
|
||||
uses: actions/cache/restore@v5
|
||||
id: avd-cache
|
||||
continue-on-error: true
|
||||
with:
|
||||
@@ -132,7 +127,7 @@ jobs:
|
||||
util/android-commands.sh init "${{ matrix.arch }}" "${{ matrix.api-level }}" "${{ env.TERMUX }}"
|
||||
- name: Save AVD cache
|
||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
path: |
|
||||
~/.android/avd/*
|
||||
@@ -148,7 +143,7 @@ jobs:
|
||||
trim: true
|
||||
- name: Restore rust cache
|
||||
id: rust-cache
|
||||
uses: actions/cache/restore@v4
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
path: ~/__rust_cache__
|
||||
# The version vX at the end of the key is just a development version to avoid conflicts in
|
||||
@@ -189,13 +184,13 @@ jobs:
|
||||
df -Th
|
||||
- name: Save rust cache
|
||||
if: steps.rust-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
path: ~/__rust_cache__
|
||||
key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3
|
||||
- name: archive any output (error screenshots)
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: test_output_${{ env.AVD_CACHE_KEY }}
|
||||
path: output
|
||||
|
||||
@@ -50,12 +50,6 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install system dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install libselinux1-dev
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
@@ -174,7 +174,7 @@ jobs:
|
||||
- name: Install/setup prerequisites
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get -y update ; sudo apt-get -y install npm ; sudo npm install cspell -g ;
|
||||
sudo npm install cspell -g ;
|
||||
- name: Run `cspell`
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -255,7 +255,7 @@ jobs:
|
||||
run: npm install -g cspell
|
||||
|
||||
- name: Cache pre-commit environments
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Download tldr
|
||||
run: curl https://tldr.sh/assets/tldr.zip -o docs/tldr.zip
|
||||
run: curl -L https://github.com/tldr-pages/tldr/releases/latest/download/tldr.zip -o docs/tldr.zip
|
||||
|
||||
- name: Generate documentation
|
||||
run: cargo run --bin uudoc --all-features
|
||||
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
with:
|
||||
disable_annotations: true
|
||||
- name: Prepare, build and test
|
||||
uses: vmactions/freebsd-vm@v1.2.7
|
||||
uses: vmactions/freebsd-vm@v1.2.9
|
||||
with:
|
||||
usesh: true
|
||||
sync: rsync
|
||||
@@ -139,7 +139,7 @@ jobs:
|
||||
with:
|
||||
disable_annotations: true
|
||||
- name: Prepare, build and test
|
||||
uses: vmactions/freebsd-vm@v1.2.7
|
||||
uses: vmactions/freebsd-vm@v1.2.9
|
||||
with:
|
||||
usesh: true
|
||||
sync: rsync
|
||||
|
||||
@@ -79,8 +79,7 @@ jobs:
|
||||
matrix:
|
||||
test-target:
|
||||
- { name: fuzz_test, should_pass: true }
|
||||
# https://github.com/uutils/coreutils/issues/5311
|
||||
- { name: fuzz_date, should_pass: false }
|
||||
- { name: fuzz_date, should_pass: true }
|
||||
- { name: fuzz_expr, should_pass: true }
|
||||
- { name: fuzz_printf, should_pass: true }
|
||||
- { name: fuzz_echo, should_pass: true }
|
||||
@@ -110,7 +109,7 @@ jobs:
|
||||
shared-key: "cargo-fuzz-cache-key"
|
||||
cache-directories: "fuzz/target"
|
||||
- name: Restore Cached Corpus
|
||||
uses: actions/cache/restore@v4
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
key: corpus-cache-${{ matrix.test-target.name }}
|
||||
path: |
|
||||
@@ -192,13 +191,13 @@ jobs:
|
||||
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
- name: Save Corpus Cache
|
||||
uses: actions/cache/save@v4
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
key: corpus-cache-${{ matrix.test-target.name }}
|
||||
path: |
|
||||
fuzz/corpus/${{ matrix.test-target.name }}
|
||||
- name: Upload Stats
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: fuzz-stats-${{ matrix.test-target.name }}
|
||||
path: |
|
||||
@@ -215,7 +214,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Download all stats
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
path: fuzz/stats-artifacts
|
||||
pattern: fuzz-stats-*
|
||||
@@ -309,7 +308,7 @@ jobs:
|
||||
run: |
|
||||
cat fuzzing_summary.md
|
||||
- name: Upload Summary
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: fuzzing-summary
|
||||
path: fuzzing_summary.md
|
||||
|
||||
+30
-30
@@ -141,7 +141,7 @@ jobs:
|
||||
- name: Install/setup prerequisites
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev locales
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
|
||||
sudo locale-gen --keep-existing fr_FR.UTF-8
|
||||
locale -a | grep -i fr || exit 1
|
||||
- name: Build coreutils with clap localization support
|
||||
@@ -312,7 +312,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
## Install/setup prerequisites
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev locales
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
|
||||
- name: Generate French locale
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -429,10 +429,10 @@ jobs:
|
||||
## Install/setup prerequisites
|
||||
case '${{ matrix.job.os }}' in
|
||||
ubuntu-*)
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev build-essential
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
|
||||
;;
|
||||
macos-*)
|
||||
brew install coreutils make
|
||||
brew install coreutils
|
||||
;;
|
||||
esac
|
||||
- name: Install via make and test multi-call binary
|
||||
@@ -453,22 +453,22 @@ jobs:
|
||||
|
||||
# First check if binary exists after build
|
||||
echo "Checking if coreutils was built..."
|
||||
ls -la target/release/coreutils || echo "No coreutils binary in target/release/"
|
||||
ls -la target/release-small/coreutils || echo "No coreutils binary in target/release-small/"
|
||||
|
||||
make FEATURES="${{ matrix.job.features }}" PROFILE=release MULTICALL=y
|
||||
make FEATURES="${{ matrix.job.features }}" PROFILE=release-small MULTICALL=y
|
||||
|
||||
echo "After build, checking target/release/:"
|
||||
ls -la target/release/ | grep -E "(coreutils|^total)" || echo "Build may have failed"
|
||||
echo "After build, checking target/release-small/:"
|
||||
ls -la target/release-small/ | grep -E "(coreutils|^total)" || echo "Build may have failed"
|
||||
|
||||
echo "Running make install..."
|
||||
echo "Before install - checking what we have:"
|
||||
ls -la target/release/coreutils 2>/dev/null || echo "No coreutils in target/release"
|
||||
ls -la target/release-small/coreutils 2>/dev/null || echo "No coreutils in target/release-small"
|
||||
|
||||
# Run make install with verbose output to see what happens
|
||||
echo "About to run: make install DESTDIR=\"$INSTALL_DIR\" PREFIX=/usr PROFILE=release MULTICALL=y"
|
||||
echo "About to run: make install DESTDIR=\"$INSTALL_DIR\" PREFIX=/usr PROFILE=release-small MULTICALL=y"
|
||||
echo "Expected install path: $INSTALL_DIR/usr/bin/coreutils"
|
||||
|
||||
make install DESTDIR="$INSTALL_DIR" PREFIX=/usr PROFILE=release MULTICALL=y || {
|
||||
make install DESTDIR="$INSTALL_DIR" PREFIX=/usr PROFILE=release-small MULTICALL=y || {
|
||||
echo "Make install failed! Exit code: $?"
|
||||
echo "Let's see what happened:"
|
||||
ls -la "$INSTALL_DIR" 2>/dev/null || echo "Install directory doesn't exist"
|
||||
@@ -482,13 +482,13 @@ jobs:
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "INSTALL_DIR: $INSTALL_DIR"
|
||||
echo "Checking if build succeeded..."
|
||||
if [ -f "target/release/coreutils" ]; then
|
||||
echo "✓ Build succeeded - coreutils binary exists in target/release/"
|
||||
ls -la target/release/coreutils
|
||||
if [ -f "target/release-small/coreutils" ]; then
|
||||
echo "✓ Build succeeded - coreutils binary exists in target/release-small/"
|
||||
ls -la target/release-small/coreutils
|
||||
else
|
||||
echo "✗ Build failed - no coreutils binary in target/release/"
|
||||
echo "Contents of target/release/:"
|
||||
ls -la target/release/ | head -20
|
||||
echo "✗ Build failed - no coreutils binary in target/release-small/"
|
||||
echo "Contents of target/release-small/:"
|
||||
ls -la target/release-small/ | head -20
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -580,13 +580,13 @@ jobs:
|
||||
## Install/setup prerequisites
|
||||
case '${{ matrix.job.os }}' in
|
||||
ubuntu-*)
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev build-essential locales
|
||||
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
|
||||
# Generate French locale for testing
|
||||
sudo locale-gen --keep-existing fr_FR.UTF-8
|
||||
locale -a | grep -i fr || echo "French locale generation may have failed"
|
||||
;;
|
||||
macos-*)
|
||||
brew install coreutils make
|
||||
brew install coreutils
|
||||
;;
|
||||
esac
|
||||
- name: Test Make installation
|
||||
@@ -600,8 +600,8 @@ jobs:
|
||||
mkdir -p "$MAKE_INSTALL_DIR"
|
||||
|
||||
# Build and install using make with DESTDIR
|
||||
make FEATURES="${{ matrix.job.features }}" PROFILE=release MULTICALL=y
|
||||
make install DESTDIR="$MAKE_INSTALL_DIR" PREFIX=/usr PROFILE=release MULTICALL=y
|
||||
make FEATURES="${{ matrix.job.features }}" PROFILE=release-small MULTICALL=y
|
||||
make install DESTDIR="$MAKE_INSTALL_DIR" PREFIX=/usr PROFILE=release-small MULTICALL=y
|
||||
|
||||
# Verify installation
|
||||
echo "Testing make-installed binaries..."
|
||||
@@ -912,7 +912,7 @@ jobs:
|
||||
run: |
|
||||
## Install/setup prerequisites including locale support
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install libselinux1-dev locales build-essential
|
||||
sudo apt-get -y install libselinux1-dev
|
||||
|
||||
# Generate multiple locales for testing
|
||||
sudo locale-gen --keep-existing en_US.UTF-8 fr_FR.UTF-8 de_DE.UTF-8 es_ES.UTF-8
|
||||
@@ -928,8 +928,8 @@ jobs:
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
|
||||
# Build and install using make with DESTDIR
|
||||
make FEATURES="feat_os_unix" PROFILE=release MULTICALL=y
|
||||
make install DESTDIR="$INSTALL_DIR" PREFIX=/usr PROFILE=release MULTICALL=y
|
||||
make FEATURES="feat_os_unix" PROFILE=release-small MULTICALL=y
|
||||
make install DESTDIR="$INSTALL_DIR" PREFIX=/usr PROFILE=release-small MULTICALL=y
|
||||
|
||||
# Debug: Show what was installed
|
||||
echo "Contents of installation directory:"
|
||||
@@ -1109,8 +1109,8 @@ jobs:
|
||||
|
||||
# Clean and build standard version
|
||||
make clean
|
||||
make FEATURES="feat_os_unix" PROFILE=release MULTICALL=y
|
||||
make install DESTDIR="$STANDARD_BUILD_INSTALL_DIR" PREFIX=/usr PROFILE=release MULTICALL=y
|
||||
make FEATURES="feat_os_unix" PROFILE=release-small MULTICALL=y
|
||||
make install DESTDIR="$STANDARD_BUILD_INSTALL_DIR" PREFIX=/usr PROFILE=release-small MULTICALL=y
|
||||
|
||||
# Verify standard build binary works
|
||||
if "$STANDARD_BUILD_INSTALL_DIR/usr/bin/coreutils" --version >/dev/null 2>&1; then
|
||||
@@ -1160,7 +1160,7 @@ jobs:
|
||||
# Use different cache key for each build to avoid conflicts
|
||||
key: cat-locale-embedding
|
||||
- name: Install prerequisites
|
||||
run: sudo apt-get -y update && sudo apt-get -y install libselinux1-dev build-essential
|
||||
run: sudo apt-get -y update && sudo apt-get -y install libselinux1-dev
|
||||
- name: Build cat with targeted locale embedding
|
||||
run: UUCORE_TARGET_UTIL=cat cargo build -p uu_cat --release
|
||||
- name: Verify cat locale count
|
||||
@@ -1192,7 +1192,7 @@ jobs:
|
||||
# Use different cache key for each build to avoid conflicts
|
||||
key: ls-locale-embedding
|
||||
- name: Install prerequisites
|
||||
run: sudo apt-get -y update && sudo apt-get -y install libselinux1-dev build-essential
|
||||
run: sudo apt-get -y update && sudo apt-get -y install libselinux1-dev
|
||||
- name: Build ls with targeted locale embedding
|
||||
run: UUCORE_TARGET_UTIL=ls cargo build -p uu_ls --release
|
||||
- name: Verify ls locale count
|
||||
@@ -1224,7 +1224,7 @@ jobs:
|
||||
# Use different cache key for each build to avoid conflicts
|
||||
key: multicall-locale-embedding
|
||||
- name: Install prerequisites
|
||||
run: sudo apt-get -y update && sudo apt-get -y install libselinux1-dev build-essential
|
||||
run: sudo apt-get -y update && sudo apt-get -y install libselinux1-dev
|
||||
- name: Build multicall binary with all locales
|
||||
run: cargo build --release
|
||||
- name: Verify multicall locale count
|
||||
@@ -1264,7 +1264,7 @@ jobs:
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install libselinux1-dev locales
|
||||
sudo apt-get -y install libselinux1-dev
|
||||
# Generate French locale for testing
|
||||
sudo locale-gen --keep-existing fr_FR.UTF-8
|
||||
locale -a | grep -i fr || exit 1
|
||||
|
||||
@@ -3,6 +3,8 @@ aarch
|
||||
AIX
|
||||
ASLR # address space layout randomization
|
||||
AST # abstract syntax tree
|
||||
CATN # busybox cat -n feature flag
|
||||
CATV # busybox cat -v feature flag
|
||||
CICD # continuous integration/deployment
|
||||
CPU
|
||||
CPUs
|
||||
|
||||
+20
@@ -41,6 +41,7 @@ duplicative
|
||||
dsync
|
||||
endianness
|
||||
enqueue
|
||||
ERANGE
|
||||
errored
|
||||
executable
|
||||
executables
|
||||
@@ -75,6 +76,7 @@ iflag
|
||||
iflags
|
||||
kibi
|
||||
kibibytes
|
||||
langinfo
|
||||
libacl
|
||||
lcase
|
||||
listxattr
|
||||
@@ -128,6 +130,7 @@ semiprimes
|
||||
setcap
|
||||
setfacl
|
||||
setfattr
|
||||
setlocale
|
||||
shortcode
|
||||
shortcodes
|
||||
siginfo
|
||||
@@ -162,6 +165,8 @@ xattrs
|
||||
xpass
|
||||
|
||||
# * abbreviations
|
||||
AMPM
|
||||
ampm
|
||||
consts
|
||||
deps
|
||||
dev
|
||||
@@ -188,3 +193,18 @@ nofield
|
||||
# * clippy
|
||||
uninlined
|
||||
nonminimal
|
||||
|
||||
# * CPU/hardware features
|
||||
ASIMD
|
||||
asimd
|
||||
hwcaps
|
||||
PCLMUL
|
||||
pclmul
|
||||
PCLMULQDQ
|
||||
pclmulqdq
|
||||
PMULL
|
||||
pmull
|
||||
TUNABLES
|
||||
tunables
|
||||
VMULL
|
||||
vmull
|
||||
|
||||
+2
-1
@@ -45,7 +45,8 @@ crates is as follows:
|
||||
- `Cargo.toml`
|
||||
- `src/main.rs`: contains only a single macro call
|
||||
- `src/<util name>.rs`: the actual code for the utility
|
||||
- `<util name>.md`: the documentation for the utility
|
||||
- `locales/en-US.ftl`: the util's strings
|
||||
- `locales/fr-FR.ftl`: French translation of the util's strings
|
||||
|
||||
We have separated repositories for crates that we maintain but also publish for
|
||||
use by others:
|
||||
|
||||
Generated
+204
-205
File diff suppressed because it is too large
Load Diff
+109
-114
@@ -292,7 +292,7 @@ homepage = "https://github.com/uutils/coreutils"
|
||||
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
|
||||
license = "MIT"
|
||||
readme = "README.package.md"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
ansi-width = "0.1.0"
|
||||
@@ -379,7 +379,7 @@ walkdir = "2.5"
|
||||
winapi-util = "0.1.8"
|
||||
windows-sys = { version = "0.61.0", default-features = false }
|
||||
xattr = "1.3.1"
|
||||
zip = { version = "6.0.0", default-features = false, features = ["deflate"] }
|
||||
zip = { version = "7.0.0", default-features = false, features = ["deflate"] }
|
||||
|
||||
hex = "0.4.3"
|
||||
md-5 = "0.10.6"
|
||||
@@ -398,11 +398,11 @@ fluent-bundle = "0.16.0"
|
||||
unic-langid = "0.9.6"
|
||||
fluent-syntax = "0.12.0"
|
||||
|
||||
uucore = { version = "0.4.0", package = "uucore", path = "src/uucore" }
|
||||
uucore_procs = { version = "0.4.0", package = "uucore_procs", path = "src/uucore_procs" }
|
||||
uu_ls = { version = "0.4.0", path = "src/uu/ls" }
|
||||
uu_base32 = { version = "0.4.0", path = "src/uu/base32" }
|
||||
uutests = { version = "0.4.0", package = "uutests", path = "tests/uutests" }
|
||||
uucore = { version = "0.5.0", package = "uucore", path = "src/uucore" }
|
||||
uucore_procs = { version = "0.5.0", package = "uucore_procs", path = "src/uucore_procs" }
|
||||
uu_ls = { version = "0.5.0", path = "src/uu/ls" }
|
||||
uu_base32 = { version = "0.5.0", path = "src/uu/base32" }
|
||||
uutests = { version = "0.5.0", package = "uutests", path = "tests/uutests" }
|
||||
|
||||
[dependencies]
|
||||
clap.workspace = true
|
||||
@@ -417,109 +417,109 @@ zip = { workspace = true, optional = true }
|
||||
|
||||
|
||||
# * uutils
|
||||
uu_test = { optional = true, version = "0.4.0", package = "uu_test", path = "src/uu/test" }
|
||||
uu_test = { optional = true, version = "0.5.0", package = "uu_test", path = "src/uu/test" }
|
||||
#
|
||||
arch = { optional = true, version = "0.4.0", package = "uu_arch", path = "src/uu/arch" }
|
||||
base32 = { optional = true, version = "0.4.0", package = "uu_base32", path = "src/uu/base32" }
|
||||
base64 = { optional = true, version = "0.4.0", package = "uu_base64", path = "src/uu/base64" }
|
||||
basename = { optional = true, version = "0.4.0", package = "uu_basename", path = "src/uu/basename" }
|
||||
basenc = { optional = true, version = "0.4.0", package = "uu_basenc", path = "src/uu/basenc" }
|
||||
cat = { optional = true, version = "0.4.0", package = "uu_cat", path = "src/uu/cat" }
|
||||
chcon = { optional = true, version = "0.4.0", package = "uu_chcon", path = "src/uu/chcon" }
|
||||
chgrp = { optional = true, version = "0.4.0", package = "uu_chgrp", path = "src/uu/chgrp" }
|
||||
chmod = { optional = true, version = "0.4.0", package = "uu_chmod", path = "src/uu/chmod" }
|
||||
chown = { optional = true, version = "0.4.0", package = "uu_chown", path = "src/uu/chown" }
|
||||
chroot = { optional = true, version = "0.4.0", package = "uu_chroot", path = "src/uu/chroot" }
|
||||
cksum = { optional = true, version = "0.4.0", package = "uu_cksum", path = "src/uu/cksum" }
|
||||
comm = { optional = true, version = "0.4.0", package = "uu_comm", path = "src/uu/comm" }
|
||||
cp = { optional = true, version = "0.4.0", package = "uu_cp", path = "src/uu/cp" }
|
||||
csplit = { optional = true, version = "0.4.0", package = "uu_csplit", path = "src/uu/csplit" }
|
||||
cut = { optional = true, version = "0.4.0", package = "uu_cut", path = "src/uu/cut" }
|
||||
date = { optional = true, version = "0.4.0", package = "uu_date", path = "src/uu/date" }
|
||||
dd = { optional = true, version = "0.4.0", package = "uu_dd", path = "src/uu/dd" }
|
||||
df = { optional = true, version = "0.4.0", package = "uu_df", path = "src/uu/df" }
|
||||
dir = { optional = true, version = "0.4.0", package = "uu_dir", path = "src/uu/dir" }
|
||||
dircolors = { optional = true, version = "0.4.0", package = "uu_dircolors", path = "src/uu/dircolors" }
|
||||
dirname = { optional = true, version = "0.4.0", package = "uu_dirname", path = "src/uu/dirname" }
|
||||
du = { optional = true, version = "0.4.0", package = "uu_du", path = "src/uu/du" }
|
||||
echo = { optional = true, version = "0.4.0", package = "uu_echo", path = "src/uu/echo" }
|
||||
env = { optional = true, version = "0.4.0", package = "uu_env", path = "src/uu/env" }
|
||||
expand = { optional = true, version = "0.4.0", package = "uu_expand", path = "src/uu/expand" }
|
||||
expr = { optional = true, version = "0.4.0", package = "uu_expr", path = "src/uu/expr" }
|
||||
factor = { optional = true, version = "0.4.0", package = "uu_factor", path = "src/uu/factor" }
|
||||
false = { optional = true, version = "0.4.0", package = "uu_false", path = "src/uu/false" }
|
||||
fmt = { optional = true, version = "0.4.0", package = "uu_fmt", path = "src/uu/fmt" }
|
||||
fold = { optional = true, version = "0.4.0", package = "uu_fold", path = "src/uu/fold" }
|
||||
groups = { optional = true, version = "0.4.0", package = "uu_groups", path = "src/uu/groups" }
|
||||
hashsum = { optional = true, version = "0.4.0", package = "uu_hashsum", path = "src/uu/hashsum" }
|
||||
head = { optional = true, version = "0.4.0", package = "uu_head", path = "src/uu/head" }
|
||||
hostid = { optional = true, version = "0.4.0", package = "uu_hostid", path = "src/uu/hostid" }
|
||||
hostname = { optional = true, version = "0.4.0", package = "uu_hostname", path = "src/uu/hostname" }
|
||||
id = { optional = true, version = "0.4.0", package = "uu_id", path = "src/uu/id" }
|
||||
install = { optional = true, version = "0.4.0", package = "uu_install", path = "src/uu/install" }
|
||||
join = { optional = true, version = "0.4.0", package = "uu_join", path = "src/uu/join" }
|
||||
kill = { optional = true, version = "0.4.0", package = "uu_kill", path = "src/uu/kill" }
|
||||
link = { optional = true, version = "0.4.0", package = "uu_link", path = "src/uu/link" }
|
||||
ln = { optional = true, version = "0.4.0", package = "uu_ln", path = "src/uu/ln" }
|
||||
ls = { optional = true, version = "0.4.0", package = "uu_ls", path = "src/uu/ls" }
|
||||
logname = { optional = true, version = "0.4.0", package = "uu_logname", path = "src/uu/logname" }
|
||||
mkdir = { optional = true, version = "0.4.0", package = "uu_mkdir", path = "src/uu/mkdir" }
|
||||
mkfifo = { optional = true, version = "0.4.0", package = "uu_mkfifo", path = "src/uu/mkfifo" }
|
||||
mknod = { optional = true, version = "0.4.0", package = "uu_mknod", path = "src/uu/mknod" }
|
||||
mktemp = { optional = true, version = "0.4.0", package = "uu_mktemp", path = "src/uu/mktemp" }
|
||||
more = { optional = true, version = "0.4.0", package = "uu_more", path = "src/uu/more" }
|
||||
mv = { optional = true, version = "0.4.0", package = "uu_mv", path = "src/uu/mv" }
|
||||
nice = { optional = true, version = "0.4.0", package = "uu_nice", path = "src/uu/nice" }
|
||||
nl = { optional = true, version = "0.4.0", package = "uu_nl", path = "src/uu/nl" }
|
||||
nohup = { optional = true, version = "0.4.0", package = "uu_nohup", path = "src/uu/nohup" }
|
||||
nproc = { optional = true, version = "0.4.0", package = "uu_nproc", path = "src/uu/nproc" }
|
||||
numfmt = { optional = true, version = "0.4.0", package = "uu_numfmt", path = "src/uu/numfmt" }
|
||||
od = { optional = true, version = "0.4.0", package = "uu_od", path = "src/uu/od" }
|
||||
paste = { optional = true, version = "0.4.0", package = "uu_paste", path = "src/uu/paste" }
|
||||
pathchk = { optional = true, version = "0.4.0", package = "uu_pathchk", path = "src/uu/pathchk" }
|
||||
pinky = { optional = true, version = "0.4.0", package = "uu_pinky", path = "src/uu/pinky" }
|
||||
pr = { optional = true, version = "0.4.0", package = "uu_pr", path = "src/uu/pr" }
|
||||
printenv = { optional = true, version = "0.4.0", package = "uu_printenv", path = "src/uu/printenv" }
|
||||
printf = { optional = true, version = "0.4.0", package = "uu_printf", path = "src/uu/printf" }
|
||||
ptx = { optional = true, version = "0.4.0", package = "uu_ptx", path = "src/uu/ptx" }
|
||||
pwd = { optional = true, version = "0.4.0", package = "uu_pwd", path = "src/uu/pwd" }
|
||||
readlink = { optional = true, version = "0.4.0", package = "uu_readlink", path = "src/uu/readlink" }
|
||||
realpath = { optional = true, version = "0.4.0", package = "uu_realpath", path = "src/uu/realpath" }
|
||||
rm = { optional = true, version = "0.4.0", package = "uu_rm", path = "src/uu/rm" }
|
||||
rmdir = { optional = true, version = "0.4.0", package = "uu_rmdir", path = "src/uu/rmdir" }
|
||||
runcon = { optional = true, version = "0.4.0", package = "uu_runcon", path = "src/uu/runcon" }
|
||||
seq = { optional = true, version = "0.4.0", package = "uu_seq", path = "src/uu/seq" }
|
||||
shred = { optional = true, version = "0.4.0", package = "uu_shred", path = "src/uu/shred" }
|
||||
shuf = { optional = true, version = "0.4.0", package = "uu_shuf", path = "src/uu/shuf" }
|
||||
sleep = { optional = true, version = "0.4.0", package = "uu_sleep", path = "src/uu/sleep" }
|
||||
sort = { optional = true, version = "0.4.0", package = "uu_sort", path = "src/uu/sort" }
|
||||
split = { optional = true, version = "0.4.0", package = "uu_split", path = "src/uu/split" }
|
||||
stat = { optional = true, version = "0.4.0", package = "uu_stat", path = "src/uu/stat" }
|
||||
stdbuf = { optional = true, version = "0.4.0", package = "uu_stdbuf", path = "src/uu/stdbuf" }
|
||||
stty = { optional = true, version = "0.4.0", package = "uu_stty", path = "src/uu/stty" }
|
||||
sum = { optional = true, version = "0.4.0", package = "uu_sum", path = "src/uu/sum" }
|
||||
sync = { optional = true, version = "0.4.0", package = "uu_sync", path = "src/uu/sync" }
|
||||
tac = { optional = true, version = "0.4.0", package = "uu_tac", path = "src/uu/tac" }
|
||||
tail = { optional = true, version = "0.4.0", package = "uu_tail", path = "src/uu/tail" }
|
||||
tee = { optional = true, version = "0.4.0", package = "uu_tee", path = "src/uu/tee" }
|
||||
timeout = { optional = true, version = "0.4.0", package = "uu_timeout", path = "src/uu/timeout" }
|
||||
touch = { optional = true, version = "0.4.0", package = "uu_touch", path = "src/uu/touch" }
|
||||
tr = { optional = true, version = "0.4.0", package = "uu_tr", path = "src/uu/tr" }
|
||||
true = { optional = true, version = "0.4.0", package = "uu_true", path = "src/uu/true" }
|
||||
truncate = { optional = true, version = "0.4.0", package = "uu_truncate", path = "src/uu/truncate" }
|
||||
tsort = { optional = true, version = "0.4.0", package = "uu_tsort", path = "src/uu/tsort" }
|
||||
tty = { optional = true, version = "0.4.0", package = "uu_tty", path = "src/uu/tty" }
|
||||
uname = { optional = true, version = "0.4.0", package = "uu_uname", path = "src/uu/uname" }
|
||||
unexpand = { optional = true, version = "0.4.0", package = "uu_unexpand", path = "src/uu/unexpand" }
|
||||
uniq = { optional = true, version = "0.4.0", package = "uu_uniq", path = "src/uu/uniq" }
|
||||
unlink = { optional = true, version = "0.4.0", package = "uu_unlink", path = "src/uu/unlink" }
|
||||
uptime = { optional = true, version = "0.4.0", package = "uu_uptime", path = "src/uu/uptime" }
|
||||
users = { optional = true, version = "0.4.0", package = "uu_users", path = "src/uu/users" }
|
||||
vdir = { optional = true, version = "0.4.0", package = "uu_vdir", path = "src/uu/vdir" }
|
||||
wc = { optional = true, version = "0.4.0", package = "uu_wc", path = "src/uu/wc" }
|
||||
who = { optional = true, version = "0.4.0", package = "uu_who", path = "src/uu/who" }
|
||||
whoami = { optional = true, version = "0.4.0", package = "uu_whoami", path = "src/uu/whoami" }
|
||||
yes = { optional = true, version = "0.4.0", package = "uu_yes", path = "src/uu/yes" }
|
||||
arch = { optional = true, version = "0.5.0", package = "uu_arch", path = "src/uu/arch" }
|
||||
base32 = { optional = true, version = "0.5.0", package = "uu_base32", path = "src/uu/base32" }
|
||||
base64 = { optional = true, version = "0.5.0", package = "uu_base64", path = "src/uu/base64" }
|
||||
basename = { optional = true, version = "0.5.0", package = "uu_basename", path = "src/uu/basename" }
|
||||
basenc = { optional = true, version = "0.5.0", package = "uu_basenc", path = "src/uu/basenc" }
|
||||
cat = { optional = true, version = "0.5.0", package = "uu_cat", path = "src/uu/cat" }
|
||||
chcon = { optional = true, version = "0.5.0", package = "uu_chcon", path = "src/uu/chcon" }
|
||||
chgrp = { optional = true, version = "0.5.0", package = "uu_chgrp", path = "src/uu/chgrp" }
|
||||
chmod = { optional = true, version = "0.5.0", package = "uu_chmod", path = "src/uu/chmod" }
|
||||
chown = { optional = true, version = "0.5.0", package = "uu_chown", path = "src/uu/chown" }
|
||||
chroot = { optional = true, version = "0.5.0", package = "uu_chroot", path = "src/uu/chroot" }
|
||||
cksum = { optional = true, version = "0.5.0", package = "uu_cksum", path = "src/uu/cksum" }
|
||||
comm = { optional = true, version = "0.5.0", package = "uu_comm", path = "src/uu/comm" }
|
||||
cp = { optional = true, version = "0.5.0", package = "uu_cp", path = "src/uu/cp" }
|
||||
csplit = { optional = true, version = "0.5.0", package = "uu_csplit", path = "src/uu/csplit" }
|
||||
cut = { optional = true, version = "0.5.0", package = "uu_cut", path = "src/uu/cut" }
|
||||
date = { optional = true, version = "0.5.0", package = "uu_date", path = "src/uu/date" }
|
||||
dd = { optional = true, version = "0.5.0", package = "uu_dd", path = "src/uu/dd" }
|
||||
df = { optional = true, version = "0.5.0", package = "uu_df", path = "src/uu/df" }
|
||||
dir = { optional = true, version = "0.5.0", package = "uu_dir", path = "src/uu/dir" }
|
||||
dircolors = { optional = true, version = "0.5.0", package = "uu_dircolors", path = "src/uu/dircolors" }
|
||||
dirname = { optional = true, version = "0.5.0", package = "uu_dirname", path = "src/uu/dirname" }
|
||||
du = { optional = true, version = "0.5.0", package = "uu_du", path = "src/uu/du" }
|
||||
echo = { optional = true, version = "0.5.0", package = "uu_echo", path = "src/uu/echo" }
|
||||
env = { optional = true, version = "0.5.0", package = "uu_env", path = "src/uu/env" }
|
||||
expand = { optional = true, version = "0.5.0", package = "uu_expand", path = "src/uu/expand" }
|
||||
expr = { optional = true, version = "0.5.0", package = "uu_expr", path = "src/uu/expr" }
|
||||
factor = { optional = true, version = "0.5.0", package = "uu_factor", path = "src/uu/factor" }
|
||||
false = { optional = true, version = "0.5.0", package = "uu_false", path = "src/uu/false" }
|
||||
fmt = { optional = true, version = "0.5.0", package = "uu_fmt", path = "src/uu/fmt" }
|
||||
fold = { optional = true, version = "0.5.0", package = "uu_fold", path = "src/uu/fold" }
|
||||
groups = { optional = true, version = "0.5.0", package = "uu_groups", path = "src/uu/groups" }
|
||||
hashsum = { optional = true, version = "0.5.0", package = "uu_hashsum", path = "src/uu/hashsum" }
|
||||
head = { optional = true, version = "0.5.0", package = "uu_head", path = "src/uu/head" }
|
||||
hostid = { optional = true, version = "0.5.0", package = "uu_hostid", path = "src/uu/hostid" }
|
||||
hostname = { optional = true, version = "0.5.0", package = "uu_hostname", path = "src/uu/hostname" }
|
||||
id = { optional = true, version = "0.5.0", package = "uu_id", path = "src/uu/id" }
|
||||
install = { optional = true, version = "0.5.0", package = "uu_install", path = "src/uu/install" }
|
||||
join = { optional = true, version = "0.5.0", package = "uu_join", path = "src/uu/join" }
|
||||
kill = { optional = true, version = "0.5.0", package = "uu_kill", path = "src/uu/kill" }
|
||||
link = { optional = true, version = "0.5.0", package = "uu_link", path = "src/uu/link" }
|
||||
ln = { optional = true, version = "0.5.0", package = "uu_ln", path = "src/uu/ln" }
|
||||
ls = { optional = true, version = "0.5.0", package = "uu_ls", path = "src/uu/ls" }
|
||||
logname = { optional = true, version = "0.5.0", package = "uu_logname", path = "src/uu/logname" }
|
||||
mkdir = { optional = true, version = "0.5.0", package = "uu_mkdir", path = "src/uu/mkdir" }
|
||||
mkfifo = { optional = true, version = "0.5.0", package = "uu_mkfifo", path = "src/uu/mkfifo" }
|
||||
mknod = { optional = true, version = "0.5.0", package = "uu_mknod", path = "src/uu/mknod" }
|
||||
mktemp = { optional = true, version = "0.5.0", package = "uu_mktemp", path = "src/uu/mktemp" }
|
||||
more = { optional = true, version = "0.5.0", package = "uu_more", path = "src/uu/more" }
|
||||
mv = { optional = true, version = "0.5.0", package = "uu_mv", path = "src/uu/mv" }
|
||||
nice = { optional = true, version = "0.5.0", package = "uu_nice", path = "src/uu/nice" }
|
||||
nl = { optional = true, version = "0.5.0", package = "uu_nl", path = "src/uu/nl" }
|
||||
nohup = { optional = true, version = "0.5.0", package = "uu_nohup", path = "src/uu/nohup" }
|
||||
nproc = { optional = true, version = "0.5.0", package = "uu_nproc", path = "src/uu/nproc" }
|
||||
numfmt = { optional = true, version = "0.5.0", package = "uu_numfmt", path = "src/uu/numfmt" }
|
||||
od = { optional = true, version = "0.5.0", package = "uu_od", path = "src/uu/od" }
|
||||
paste = { optional = true, version = "0.5.0", package = "uu_paste", path = "src/uu/paste" }
|
||||
pathchk = { optional = true, version = "0.5.0", package = "uu_pathchk", path = "src/uu/pathchk" }
|
||||
pinky = { optional = true, version = "0.5.0", package = "uu_pinky", path = "src/uu/pinky" }
|
||||
pr = { optional = true, version = "0.5.0", package = "uu_pr", path = "src/uu/pr" }
|
||||
printenv = { optional = true, version = "0.5.0", package = "uu_printenv", path = "src/uu/printenv" }
|
||||
printf = { optional = true, version = "0.5.0", package = "uu_printf", path = "src/uu/printf" }
|
||||
ptx = { optional = true, version = "0.5.0", package = "uu_ptx", path = "src/uu/ptx" }
|
||||
pwd = { optional = true, version = "0.5.0", package = "uu_pwd", path = "src/uu/pwd" }
|
||||
readlink = { optional = true, version = "0.5.0", package = "uu_readlink", path = "src/uu/readlink" }
|
||||
realpath = { optional = true, version = "0.5.0", package = "uu_realpath", path = "src/uu/realpath" }
|
||||
rm = { optional = true, version = "0.5.0", package = "uu_rm", path = "src/uu/rm" }
|
||||
rmdir = { optional = true, version = "0.5.0", package = "uu_rmdir", path = "src/uu/rmdir" }
|
||||
runcon = { optional = true, version = "0.5.0", package = "uu_runcon", path = "src/uu/runcon" }
|
||||
seq = { optional = true, version = "0.5.0", package = "uu_seq", path = "src/uu/seq" }
|
||||
shred = { optional = true, version = "0.5.0", package = "uu_shred", path = "src/uu/shred" }
|
||||
shuf = { optional = true, version = "0.5.0", package = "uu_shuf", path = "src/uu/shuf" }
|
||||
sleep = { optional = true, version = "0.5.0", package = "uu_sleep", path = "src/uu/sleep" }
|
||||
sort = { optional = true, version = "0.5.0", package = "uu_sort", path = "src/uu/sort" }
|
||||
split = { optional = true, version = "0.5.0", package = "uu_split", path = "src/uu/split" }
|
||||
stat = { optional = true, version = "0.5.0", package = "uu_stat", path = "src/uu/stat" }
|
||||
stdbuf = { optional = true, version = "0.5.0", package = "uu_stdbuf", path = "src/uu/stdbuf" }
|
||||
stty = { optional = true, version = "0.5.0", package = "uu_stty", path = "src/uu/stty" }
|
||||
sum = { optional = true, version = "0.5.0", package = "uu_sum", path = "src/uu/sum" }
|
||||
sync = { optional = true, version = "0.5.0", package = "uu_sync", path = "src/uu/sync" }
|
||||
tac = { optional = true, version = "0.5.0", package = "uu_tac", path = "src/uu/tac" }
|
||||
tail = { optional = true, version = "0.5.0", package = "uu_tail", path = "src/uu/tail" }
|
||||
tee = { optional = true, version = "0.5.0", package = "uu_tee", path = "src/uu/tee" }
|
||||
timeout = { optional = true, version = "0.5.0", package = "uu_timeout", path = "src/uu/timeout" }
|
||||
touch = { optional = true, version = "0.5.0", package = "uu_touch", path = "src/uu/touch" }
|
||||
tr = { optional = true, version = "0.5.0", package = "uu_tr", path = "src/uu/tr" }
|
||||
true = { optional = true, version = "0.5.0", package = "uu_true", path = "src/uu/true" }
|
||||
truncate = { optional = true, version = "0.5.0", package = "uu_truncate", path = "src/uu/truncate" }
|
||||
tsort = { optional = true, version = "0.5.0", package = "uu_tsort", path = "src/uu/tsort" }
|
||||
tty = { optional = true, version = "0.5.0", package = "uu_tty", path = "src/uu/tty" }
|
||||
uname = { optional = true, version = "0.5.0", package = "uu_uname", path = "src/uu/uname" }
|
||||
unexpand = { optional = true, version = "0.5.0", package = "uu_unexpand", path = "src/uu/unexpand" }
|
||||
uniq = { optional = true, version = "0.5.0", package = "uu_uniq", path = "src/uu/uniq" }
|
||||
unlink = { optional = true, version = "0.5.0", package = "uu_unlink", path = "src/uu/unlink" }
|
||||
uptime = { optional = true, version = "0.5.0", package = "uu_uptime", path = "src/uu/uptime" }
|
||||
users = { optional = true, version = "0.5.0", package = "uu_users", path = "src/uu/users" }
|
||||
vdir = { optional = true, version = "0.5.0", package = "uu_vdir", path = "src/uu/vdir" }
|
||||
wc = { optional = true, version = "0.5.0", package = "uu_wc", path = "src/uu/wc" }
|
||||
who = { optional = true, version = "0.5.0", package = "uu_who", path = "src/uu/who" }
|
||||
whoami = { optional = true, version = "0.5.0", package = "uu_whoami", path = "src/uu/whoami" }
|
||||
yes = { optional = true, version = "0.5.0", package = "uu_yes", path = "src/uu/yes" }
|
||||
|
||||
# this breaks clippy linting with: "tests/by-util/test_factor_benches.rs: No such file or directory (os error 2)"
|
||||
# factor_benches = { optional = true, version = "0.0.0", package = "uu_factor_benches", path = "tests/benches/factor" }
|
||||
@@ -666,12 +666,7 @@ should_panic_without_expect = "allow" # 2
|
||||
|
||||
doc_markdown = "allow"
|
||||
unused_self = "allow"
|
||||
map_unwrap_or = "allow"
|
||||
enum_glob_use = "allow"
|
||||
ptr_cast_constness = "allow"
|
||||
borrow_as_ptr = "allow"
|
||||
ptr_as_ptr = "allow"
|
||||
needless_raw_string_hashes = "allow"
|
||||
unreadable_literal = "allow"
|
||||
unnested_or_patterns = "allow"
|
||||
implicit_hasher = "allow"
|
||||
|
||||
@@ -244,8 +244,6 @@ DEBUG=1 bash util/run-gnu-test.sh tests/misc/sm3sum.pl
|
||||
|
||||
***Tip:*** First time you run `bash util/build-gnu.sh` command, it will provide instructions on how to checkout GNU coreutils repository at the correct release tag. Please follow those instructions and when done, run `bash util/build-gnu.sh` command again.
|
||||
|
||||
Note that GNU test suite relies on individual utilities (not the multicall binary).
|
||||
|
||||
You also need to install [quilt](https://savannah.nongnu.org/projects/quilt), a tool used to manage a stack of patches for modifying GNU tests.
|
||||
|
||||
On FreeBSD, you need to install packages for GNU coreutils and sed (used in shell scripts instead of system commands):
|
||||
@@ -291,7 +289,6 @@ brew install \
|
||||
coreutils \
|
||||
autoconf \
|
||||
gettext \
|
||||
wget \
|
||||
texinfo \
|
||||
xz \
|
||||
automake \
|
||||
|
||||
+13
-9
@@ -27,20 +27,20 @@ CARGO ?= cargo
|
||||
CARGOFLAGS ?=
|
||||
RUSTC_ARCH ?= # should be empty except for cross-build, not --target $(shell rustc --print host-tuple)
|
||||
|
||||
#prefix prepended to all binaries and library dir
|
||||
PROG_PREFIX ?=
|
||||
|
||||
# Install directories
|
||||
PREFIX ?= /usr/local
|
||||
DESTDIR ?=
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
DATAROOTDIR ?= $(PREFIX)/share
|
||||
LIBSTDBUF_DIR ?= $(PREFIX)/libexec/coreutils
|
||||
LIBSTDBUF_DIR ?= $(PREFIX)/libexec/$(PROG_PREFIX)coreutils
|
||||
# Export variable so that it is used during the build
|
||||
export LIBSTDBUF_DIR
|
||||
|
||||
INSTALLDIR_BIN=$(DESTDIR)$(BINDIR)
|
||||
|
||||
#prefix to apply to coreutils binary and all tool binaries
|
||||
PROG_PREFIX ?=
|
||||
|
||||
# This won't support any directory with spaces in its name, but you can just
|
||||
# make a symlink without spaces that points to the directory.
|
||||
BASEDIR ?= $(shell pwd)
|
||||
@@ -62,15 +62,15 @@ TOYBOX_SRC := $(TOYBOX_ROOT)/toybox-$(TOYBOX_VER)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Detect the host system.
|
||||
# On Windows the environment already sets OS = Windows_NT.
|
||||
# On Windows uname -s might return MINGW_NT-* or CYGWIN_NT-*.
|
||||
# Otherwise let it default to the kernel name returned by uname -s
|
||||
# (Linux, Darwin, FreeBSD, …).
|
||||
#------------------------------------------------------------------------
|
||||
OS ?= $(shell uname -s)
|
||||
OS := $(shell uname -s)
|
||||
|
||||
# Windows does not allow symlink by default.
|
||||
# Allow to override LN for AppArmor.
|
||||
ifeq ($(OS),Windows_NT)
|
||||
ifneq (,$(findstring _NT,$(OS)))
|
||||
LN ?= ln -f
|
||||
endif
|
||||
LN ?= ln -sf
|
||||
@@ -195,7 +195,7 @@ HASHSUM_PROGS := \
|
||||
|
||||
$(info Detected OS = $(OS))
|
||||
|
||||
ifneq ($(OS),Windows_NT)
|
||||
ifeq (,$(findstring MINGW,$(OS)))
|
||||
PROGS += $(UNIX_PROGS)
|
||||
endif
|
||||
ifeq ($(SELINUX_ENABLED),1)
|
||||
@@ -450,8 +450,12 @@ install: build install-manpages install-completions install-locales
|
||||
mkdir -p $(INSTALLDIR_BIN)
|
||||
ifneq (,$(and $(findstring stdbuf,$(UTILS)),$(findstring feat_external_libstdbuf,$(CARGOFLAGS))))
|
||||
mkdir -p $(DESTDIR)$(LIBSTDBUF_DIR)
|
||||
ifneq (,$(findstring CYGWIN,$(OS)))
|
||||
$(INSTALL) -m 755 $(BUILDDIR)/deps/stdbuf.dll $(DESTDIR)$(LIBSTDBUF_DIR)/libstdbuf.dll
|
||||
else
|
||||
$(INSTALL) -m 755 $(BUILDDIR)/deps/libstdbuf.* $(DESTDIR)$(LIBSTDBUF_DIR)/
|
||||
endif
|
||||
endif
|
||||
ifeq (${MULTICALL}, y)
|
||||
$(INSTALL) -m 755 $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils
|
||||
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
|
||||
@@ -472,7 +476,7 @@ else
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
ifneq ($(OS),Windows_NT)
|
||||
ifeq (,$(findstring MINGW,$(OS)))
|
||||
rm -f $(DESTDIR)$(LIBSTDBUF_DIR)/libstdbuf.*
|
||||
-rm -d $(DESTDIR)$(LIBSTDBUF_DIR) 2>/dev/null || true
|
||||
endif
|
||||
|
||||
-386
@@ -1,386 +0,0 @@
|
||||
# spell-checker:ignore (cargo-make) duckscript
|
||||
|
||||
[config]
|
||||
min_version = "0.26.2"
|
||||
default_to_workspace = false
|
||||
init_task = "_init_task"
|
||||
|
||||
[config.modify_core_tasks]
|
||||
namespace = "core"
|
||||
|
||||
### initialization
|
||||
|
||||
### * note: the task executed from 'init_task' ignores dependencies; workaround is to run a secondary task via 'run_task'
|
||||
|
||||
[tasks._init_task]
|
||||
# dependencies are unavailable
|
||||
# * delegate (via 'run_task') to "real" initialization task ('_init') with full capabilities
|
||||
private = true
|
||||
run_task = "_init"
|
||||
|
||||
[tasks._init]
|
||||
private = true
|
||||
dependencies = ["_init-vars"]
|
||||
|
||||
[tasks._init-vars]
|
||||
private = true
|
||||
script_runner = "@duckscript"
|
||||
script = ['''
|
||||
# reset build/test flags
|
||||
set_env CARGO_MAKE_CARGO_BUILD_TEST_FLAGS ""
|
||||
# determine features
|
||||
env_features = get_env CARGO_FEATURES
|
||||
if is_empty "${env_features}"
|
||||
env_features = get_env FEATURES
|
||||
end_if
|
||||
if is_empty "${env_features}"
|
||||
if eq "${CARGO_MAKE_RUST_TARGET_OS}" "macos"
|
||||
features = set "unix"
|
||||
else
|
||||
if eq "${CARGO_MAKE_RUST_TARGET_OS}" "linux"
|
||||
features = set "unix"
|
||||
else
|
||||
if eq "${CARGO_MAKE_RUST_TARGET_OS}" "windows"
|
||||
features = set "windows"
|
||||
end_if
|
||||
end_if
|
||||
end_if
|
||||
end_if
|
||||
if is_empty "${features}"
|
||||
features = set "${env_features}"
|
||||
else
|
||||
if not is_empty "${env_features}"
|
||||
features = set "${features},${env_features}"
|
||||
end_if
|
||||
end_if
|
||||
# set build flags from features
|
||||
if not is_empty "${features}"
|
||||
set_env CARGO_MAKE_VAR_BUILD_TEST_FEATURES "${features}"
|
||||
set_env CARGO_MAKE_CARGO_BUILD_TEST_FLAGS "--features ${features}"
|
||||
end_if
|
||||
# determine show-utils helper script
|
||||
show_utils = set "util/show-utils.sh"
|
||||
if eq "${CARGO_MAKE_RUST_TARGET_OS}" "windows"
|
||||
show_utils = set "util/show-utils.BAT"
|
||||
end_if
|
||||
set_env CARGO_MAKE_VAR_SHOW_UTILS "${show_utils}"
|
||||
# rebuild CARGO_MAKE_TASK_ARGS for various targets
|
||||
args = set ${CARGO_MAKE_TASK_ARGS}
|
||||
# * rebuild for 'features' target
|
||||
args_features = replace ${args} ";" ","
|
||||
set_env CARGO_MAKE_TASK_BUILD_FEATURES_ARGS "${args_features}"
|
||||
# * rebuild for 'examples' target
|
||||
args_examples = replace ${args} ";" " --example "
|
||||
if is_empty "${args_examples}"
|
||||
args_examples = set "--examples"
|
||||
end_if
|
||||
set_env CARGO_MAKE_TASK_BUILD_EXAMPLES_ARGS "${args_examples}"
|
||||
# * rebuild for 'utils' target
|
||||
args_utils_list = split "${args}" ";"
|
||||
for arg in "${args_utils_list}"
|
||||
if not is_empty "${arg}"
|
||||
if not starts_with "${arg}" "uu_"
|
||||
arg = set "uu_${arg}"
|
||||
end_if
|
||||
args_utils = set "${args_utils} -p${arg}"
|
||||
end_if
|
||||
end
|
||||
args_utils = trim "${args_utils}"
|
||||
set_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS "${args_utils}"
|
||||
''']
|
||||
|
||||
### tasks
|
||||
|
||||
[tasks.default]
|
||||
description = "## *DEFAULT* Build (debug-mode) and test project"
|
||||
category = "[project]"
|
||||
dependencies = ["action-build-debug", "test-terse"]
|
||||
|
||||
##
|
||||
|
||||
[tasks.build]
|
||||
description = "## Build (release-mode) project"
|
||||
category = "[project]"
|
||||
dependencies = ["core::pre-build", "action-build-release", "core::post-build"]
|
||||
|
||||
[tasks.build-debug]
|
||||
description = "## Build (debug-mode) project"
|
||||
category = "[project]"
|
||||
dependencies = ["action-build-debug"]
|
||||
|
||||
[tasks.build-examples]
|
||||
description = "## Build (release-mode) project example(s); usage: `cargo make (build-examples | examples) [EXAMPLE]...`"
|
||||
category = "[project]"
|
||||
dependencies = ["core::pre-build", "action-build-examples", "core::post-build"]
|
||||
|
||||
[tasks.build-features]
|
||||
description = "## Build (with features; release-mode) project; usage: `cargo make (build-features | features) FEATURE...`"
|
||||
category = "[project]"
|
||||
dependencies = ["core::pre-build", "action-build-features", "core::post-build"]
|
||||
|
||||
[tasks.build-release]
|
||||
alias = "build"
|
||||
|
||||
[tasks.debug]
|
||||
alias = "build-debug"
|
||||
|
||||
[tasks.example]
|
||||
description = "hidden singular-form alias for 'examples'"
|
||||
category = "[project]"
|
||||
dependencies = ["examples"]
|
||||
|
||||
[tasks.examples]
|
||||
alias = "build-examples"
|
||||
|
||||
[tasks.features]
|
||||
alias = "build-features"
|
||||
|
||||
[tasks.format]
|
||||
description = "## Format code files (with `cargo fmt`; includes tests)"
|
||||
category = "[project]"
|
||||
dependencies = ["action-format", "action-format-tests"]
|
||||
|
||||
[tasks.help]
|
||||
description = "## Display help"
|
||||
category = "[project]"
|
||||
dependencies = ["action-display-help"]
|
||||
|
||||
[tasks.install]
|
||||
description = "## Install project binary (to $HOME/.cargo/bin)"
|
||||
category = "[project]"
|
||||
command = "cargo"
|
||||
args = ["install", "--path", "."]
|
||||
|
||||
[tasks.lint]
|
||||
description = "## Display lint report"
|
||||
category = "[project]"
|
||||
dependencies = ["action-clippy", "action-fmt_report"]
|
||||
|
||||
[tasks.release]
|
||||
alias = "build"
|
||||
|
||||
[tasks.test]
|
||||
description = "## Run project tests"
|
||||
category = "[project]"
|
||||
dependencies = ["core::pre-test", "core::test", "core::post-test"]
|
||||
|
||||
[tasks.test-terse]
|
||||
description = "## Run project tests (with terse/summary output)"
|
||||
category = "[project]"
|
||||
dependencies = ["core::pre-test", "action-test_quiet", "core::post-test"]
|
||||
|
||||
[tasks.test-util]
|
||||
description = "## Test (individual) utilities; usage: `cargo make (test-util | test-uutil) [UTIL_NAME...]`"
|
||||
category = "[project]"
|
||||
dependencies = ["action-test-utils"]
|
||||
|
||||
[tasks.test-utils]
|
||||
description = "hidden plural-form alias for 'test-util'"
|
||||
category = "[project]"
|
||||
dependencies = ["test-util"]
|
||||
|
||||
[tasks.test-uutil]
|
||||
description = "hidden alias for 'test-util'"
|
||||
category = "[project]"
|
||||
dependencies = ["test-util"]
|
||||
|
||||
[tasks.test-uutils]
|
||||
description = "hidden alias for 'test-util'"
|
||||
category = "[project]"
|
||||
dependencies = ["test-util"]
|
||||
|
||||
[tasks.uninstall]
|
||||
description = "## Remove project binary (from $HOME/.cargo/bin)"
|
||||
category = "[project]"
|
||||
command = "cargo"
|
||||
args = ["uninstall"]
|
||||
|
||||
[tasks.util]
|
||||
description = "## Build (individual; release-mode) utilities; usage: `cargo make (util | uutil) [UTIL_NAME...]`"
|
||||
category = "[project]"
|
||||
dependencies = [
|
||||
"core::pre-build",
|
||||
"action-determine-utils",
|
||||
"action-build-utils",
|
||||
"core::post-build",
|
||||
]
|
||||
|
||||
[tasks.utils]
|
||||
description = "hidden plural-form alias for 'util'"
|
||||
category = "[project]"
|
||||
dependencies = ["util"]
|
||||
|
||||
[tasks.uutil]
|
||||
description = "hidden alias for 'util'"
|
||||
category = "[project]"
|
||||
dependencies = ["util"]
|
||||
|
||||
[tasks.uutils]
|
||||
description = "hidden plural-form alias for 'util'"
|
||||
category = "[project]"
|
||||
dependencies = ["util"]
|
||||
|
||||
### actions
|
||||
|
||||
[tasks.action-build-release]
|
||||
description = "`cargo build --release`"
|
||||
command = "cargo"
|
||||
args = ["build", "--release", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"]
|
||||
|
||||
[tasks.action-build-debug]
|
||||
description = "`cargo build`"
|
||||
command = "cargo"
|
||||
args = ["build", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"]
|
||||
|
||||
[tasks.action-build-examples]
|
||||
description = "`cargo build (--examples|(--example EXAMPLE)...)`"
|
||||
command = "cargo"
|
||||
args = [
|
||||
"build",
|
||||
"--release",
|
||||
"@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )",
|
||||
"${CARGO_MAKE_TASK_BUILD_EXAMPLES_ARGS}",
|
||||
]
|
||||
|
||||
[tasks.action-build-features]
|
||||
description = "`cargo build --release --features FEATURES`"
|
||||
command = "cargo"
|
||||
args = [
|
||||
"build",
|
||||
"--release",
|
||||
"--no-default-features",
|
||||
"--features",
|
||||
"${CARGO_MAKE_TASK_BUILD_FEATURES_ARGS}",
|
||||
]
|
||||
|
||||
[tasks.action-build-utils]
|
||||
description = "Build individual utilities"
|
||||
dependencies = ["action-determine-utils"]
|
||||
command = "cargo"
|
||||
# args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ]
|
||||
args = ["build", "--release", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )"]
|
||||
|
||||
[tasks.action-clippy]
|
||||
description = "`cargo clippy` lint report"
|
||||
command = "cargo"
|
||||
args = ["clippy", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"]
|
||||
|
||||
[tasks.action-determine-utils]
|
||||
script_runner = "@duckscript"
|
||||
script = ['''
|
||||
package_options = get_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS
|
||||
if is_empty "${package_options}"
|
||||
show_utils = get_env CARGO_MAKE_VAR_SHOW_UTILS
|
||||
features = get_env CARGO_MAKE_VAR_BUILD_TEST_FEATURES
|
||||
if not is_empty "${features}"
|
||||
result = exec "${show_utils}" --features "${features}"
|
||||
else
|
||||
result = exec "${show_utils}"
|
||||
endif
|
||||
set_env CARGO_MAKE_VAR_UTILS ${result.stdout}
|
||||
utils = array %{result.stdout}
|
||||
for util in ${utils}
|
||||
if not is_empty "${util}"
|
||||
if not starts_with "${util}" "uu_"
|
||||
util = set "uu_${util}"
|
||||
end_if
|
||||
package_options = set "${package_options} -p${util}"
|
||||
end_if
|
||||
end
|
||||
package_options = trim "${package_options}"
|
||||
end_if
|
||||
set_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS "${package_options}"
|
||||
''']
|
||||
|
||||
[tasks.action-determine-tests]
|
||||
script_runner = "@duckscript"
|
||||
script = ['''
|
||||
test_files = glob_array tests/**/*.rs
|
||||
for file in ${test_files}
|
||||
file = replace "${file}" "\\" "/"
|
||||
if not is_empty ${file}
|
||||
if is_empty "${tests}"
|
||||
tests = set "${file}"
|
||||
else
|
||||
tests = set "${tests} ${file}"
|
||||
end_if
|
||||
end_if
|
||||
end
|
||||
set_env CARGO_MAKE_VAR_TESTS "${tests}"
|
||||
''']
|
||||
|
||||
[tasks.action-format]
|
||||
description = "`cargo fmt`"
|
||||
command = "cargo"
|
||||
args = ["fmt"]
|
||||
|
||||
[tasks.action-format-tests]
|
||||
description = "`cargo fmt` tests"
|
||||
dependencies = ["action-determine-tests"]
|
||||
command = "cargo"
|
||||
args = ["fmt", "--", "@@split(CARGO_MAKE_VAR_TESTS, )"]
|
||||
|
||||
[tasks.action-fmt]
|
||||
alias = "action-format"
|
||||
|
||||
[tasks.action-fmt_report]
|
||||
description = "`cargo fmt` lint report"
|
||||
command = "cargo"
|
||||
args = ["fmt", "--", "--check"]
|
||||
|
||||
[tasks.action-spellcheck-codespell]
|
||||
description = "`codespell` spellcheck repository"
|
||||
command = "codespell" # (from `pip install codespell`)
|
||||
args = [
|
||||
".",
|
||||
"--skip=*/.git,./target,./tests/fixtures",
|
||||
"--ignore-words-list=mut,od",
|
||||
]
|
||||
|
||||
[tasks.action-test-utils]
|
||||
description = "Build individual utilities"
|
||||
dependencies = ["action-determine-utils"]
|
||||
command = "cargo"
|
||||
# args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ]
|
||||
args = ["test", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )"]
|
||||
|
||||
[tasks.action-test_quiet]
|
||||
description = "Test (in `--quiet` mode)"
|
||||
command = "cargo"
|
||||
args = ["test", "--quiet", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"]
|
||||
|
||||
[tasks.action-display-help]
|
||||
script_runner = "@duckscript"
|
||||
script = ['''
|
||||
echo ""
|
||||
echo "usage: `cargo make TARGET [ARGS...]`"
|
||||
echo ""
|
||||
echo "TARGETs:"
|
||||
echo ""
|
||||
result = exec "cargo" make --list-all-steps
|
||||
# set_env CARGO_MAKE_VAR_UTILS ${result.stdout}
|
||||
# echo ${result.stdout}
|
||||
lines = split ${result.stdout} "\n"
|
||||
# echo ${lines}
|
||||
for line in ${lines}
|
||||
if not is_empty ${line}
|
||||
if contains ${line} " - ##"
|
||||
line_segments = split ${line} " - ##"
|
||||
desc = array_pop ${line_segments}
|
||||
desc = trim ${desc}
|
||||
target = array_pop ${line_segments}
|
||||
target = trim ${target}
|
||||
l = length ${target}
|
||||
r = range 0 18
|
||||
spacing = set ""
|
||||
for i in ${r}
|
||||
if greater_than ${i} ${l}
|
||||
spacing = set "${spacing} "
|
||||
end_if
|
||||
end
|
||||
echo ${target}${spacing}${desc}
|
||||
end_if
|
||||
end_if
|
||||
end
|
||||
echo ""
|
||||
''']
|
||||
@@ -29,10 +29,14 @@ options might be missing or different behavior might be experienced.
|
||||
|
||||
<div class="oranda-hide">
|
||||
|
||||
We provide prebuilt binaries at https://github.com/uutils/coreutils/releases/latest .
|
||||
It is recommended to install from main branch if you install from source.
|
||||
|
||||
To install it:
|
||||
|
||||
```shell
|
||||
cargo install coreutils
|
||||
cargo install --git https://github.com/uutils/coreutils coreutils
|
||||
# cargo install --git https://github.com/uutils/coreutils uu_true # for one util only
|
||||
~/.cargo/bin/coreutils
|
||||
```
|
||||
|
||||
@@ -228,9 +232,11 @@ make UTILS='UTILITY_1 UTILITY_2' install
|
||||
To install every program with a prefix (e.g. uu-echo uu-cat):
|
||||
|
||||
```shell
|
||||
make PROG_PREFIX=PREFIX_GOES_HERE install
|
||||
make PROG_PREFIX=uu- install
|
||||
```
|
||||
|
||||
`PROG_PREFIX` requires separator `-`, `_`, or `=`.
|
||||
|
||||
To install the multicall binary:
|
||||
|
||||
```shell
|
||||
@@ -320,7 +326,7 @@ make uninstall
|
||||
To uninstall every program with a set prefix:
|
||||
|
||||
```shell
|
||||
make PROG_PREFIX=PREFIX_GOES_HERE uninstall
|
||||
make PROG_PREFIX=uu- uninstall
|
||||
```
|
||||
|
||||
To uninstall the multicall binary:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user