Skip to content

Commit dca5a1b

Browse files
authored
Merge branch 'main' into mv_fix
2 parents c8e07e8 + e6467b1 commit dca5a1b

File tree

146 files changed

+6391
-1476
lines changed

Some content is hidden

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

146 files changed

+6391
-1476
lines changed

.busybox-config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ CONFIG_FEATURE_FANCY_HEAD=y
22
CONFIG_UNICODE_SUPPORT=y
33
CONFIG_DESKTOP=y
44
CONFIG_LONG_OPTS=y
5+
CONFIG_FEATURE_SORT_BIG=y
6+
CONFIG_FEATURE_CATV=y
7+
CONFIG_FEATURE_CATN=y
8+
CONFIG_FEATURE_TR_CLASSES=y
9+
CONFIG_FEATURE_READLINK_FOLLOW=y

.github/workflows/CICD.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -300,22 +300,22 @@ jobs:
300300
run: make nextest PROFILE=ci CARGOFLAGS="--hide-progress-bar"
301301
env:
302302
RUST_BACKTRACE: "1"
303-
304-
- name: "`make install PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
303+
- name: "`make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
305304
shell: bash
306305
run: |
307306
set -x
308-
DESTDIR=/tmp/ make PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n install
307+
DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n
309308
# Check that utils are built with given profile
310309
./target/release-fast/true
311-
# Check that the utils are present
312-
test -f /tmp/usr/local/bin/tty
310+
# Check that the progs have prefix
311+
test -f /tmp/usr/local/bin/uu-tty
312+
test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
313313
# Check that the manpage is not present
314-
! test -f /tmp/usr/local/share/man/man1/whoami.1
314+
! test -f /tmp/usr/local/share/man/man1/uu-whoami.1
315315
# Check that the completion is not present
316-
! test -f /tmp/usr/local/share/zsh/site-functions/_install
317-
! test -f /tmp/usr/local/share/bash-completion/completions/head.bash
318-
! test -f /tmp/usr/local/share/fish/vendor_completions.d/cat.fish
316+
! test -f /tmp/usr/local/share/zsh/site-functions/_uu-install
317+
! test -f /tmp/usr/local/share/bash-completion/completions/uu-head.bash
318+
! test -f /tmp/usr/local/share/fish/vendor_completions.d/uu-cat.fish
319319
env:
320320
RUST_BACKTRACE: "1"
321321
- name: "`make install`"
@@ -502,14 +502,14 @@ jobs:
502502
--arg multisize "$SIZE_MULTI" \
503503
'{($date): { sha: $sha, size: $size, multisize: $multisize, }}' > size-result.json
504504
- name: Download the previous individual size result
505-
uses: dawidd6/action-download-artifact@v11
505+
uses: dawidd6/action-download-artifact@v12
506506
with:
507507
workflow: CICD.yml
508508
name: individual-size-result
509509
repo: uutils/coreutils
510510
path: dl
511511
- name: Download the previous size result
512-
uses: dawidd6/action-download-artifact@v11
512+
uses: dawidd6/action-download-artifact@v12
513513
with:
514514
workflow: CICD.yml
515515
name: size-result

.github/workflows/GnuTests.yml

Lines changed: 27 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ name: GnuTests
22

33
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
44
# spell-checker:ignore (jargon) submodules devel
5-
# spell-checker:ignore (libs/utils) autopoint chksum getenforce gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
5+
# spell-checker:ignore (libs/utils) autopoint chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
66
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
9+
# spell-checker:ignore userns
910

1011
# * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT`
1112

@@ -42,16 +43,6 @@ jobs:
4243
with:
4344
path: 'uutils'
4445
persist-credentials: false
45-
- name: Extract GNU version from build-gnu.sh
46-
id: gnu-version
47-
run: |
48-
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
49-
if [ -z "$GNU_VERSION" ]; then
50-
echo "Error: Failed to extract GNU version from build-gnu.sh"
51-
exit 1
52-
fi
53-
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
54-
echo "Extracted GNU version: ${GNU_VERSION}"
5546
- uses: dtolnay/rust-toolchain@master
5647
with:
5748
toolchain: stable
@@ -60,20 +51,15 @@ jobs:
6051
with:
6152
workspaces: "./uutils -> target"
6253
- name: Checkout code (GNU coreutils)
63-
uses: actions/checkout@v6
54+
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
55+
- name: Restore files for faster configure and skipping make
56+
uses: actions/cache@v5
57+
id: cache-config-gnu
6458
with:
65-
repository: 'coreutils/coreutils'
66-
path: 'gnu'
67-
ref: ${{ env.REPO_GNU_REF }}
68-
submodules: false
69-
persist-credentials: false
70-
- name: Override submodule URL and initialize submodules
71-
# Use github instead of upstream git server
72-
run: |
73-
git submodule sync --recursive
74-
git config submodule.gnulib.url https://github.com/coreutils/gnulib.git
75-
git submodule update --init --recursive --depth 1
76-
working-directory: gnu
59+
path: |
60+
gnu/config.cache
61+
gnu/src/getlimits
62+
key: ${{ runner.os }}-gnu-config-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }} # use build-gnu.sh for extremely safe caching
7763

7864
#### Build environment setup
7965
- name: Install dependencies
@@ -83,6 +69,8 @@ jobs:
8369
sudo apt-get update
8470
## Check that build-gnu.sh works on the non SELinux system by installing libselinux only on lima
8571
sudo apt-get install -y autopoint gperf gdb python3-pyinotify valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev attr quilt
72+
curl http://launchpadlibrarian.net/831710181/automake_1.18.1-3_all.deb > automake-1.18.deb
73+
sudo dpkg -i --force-depends automake-1.18.deb
8674
- name: Add various locales
8775
shell: bash
8876
run: |
@@ -103,6 +91,7 @@ jobs:
10391
sudo locale-gen --keep-existing fa_IR.UTF-8 # Iran
10492
sudo locale-gen --keep-existing am_ET.UTF-8 # Ethiopia
10593
sudo locale-gen --keep-existing th_TH.UTF-8 # Thailand
94+
sudo locale-gen --keep-existing zh_CN.GB18030 # China
10695
10796
sudo update-locale
10897
echo "After:"
@@ -115,11 +104,23 @@ jobs:
115104
## Build binaries
116105
cd 'uutils'
117106
env PROFILE=release-small bash util/build-gnu.sh
107+
108+
- name: Save files for faster configure and skipping make
109+
uses: actions/cache/save@v5
110+
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
111+
with:
112+
path: |
113+
gnu/config.cache
114+
gnu/src/getlimits
115+
key: ${{ runner.os }}-gnu-config-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }}
118116

119117
### Run tests as user
120118
- name: Run GNU tests
121119
shell: bash
122120
run: |
121+
## Use unshare
122+
sudo sysctl -w kernel.unprivileged_userns_clone=1
123+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
123124
## Run GNU tests
124125
path_GNU='gnu'
125126
path_UUTILS='uutils'
@@ -206,16 +207,6 @@ jobs:
206207
with:
207208
path: 'uutils'
208209
persist-credentials: false
209-
- name: Extract GNU version from build-gnu.sh
210-
id: gnu-version-selinux
211-
run: |
212-
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
213-
if [ -z "$GNU_VERSION" ]; then
214-
echo "Error: Failed to extract GNU version from build-gnu.sh"
215-
exit 1
216-
fi
217-
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
218-
echo "Extracted GNU version: ${GNU_VERSION}"
219210
- uses: dtolnay/rust-toolchain@master
220211
with:
221212
toolchain: stable
@@ -224,20 +215,7 @@ jobs:
224215
with:
225216
workspaces: "./uutils -> target"
226217
- name: Checkout code (GNU coreutils)
227-
uses: actions/checkout@v6
228-
with:
229-
repository: 'coreutils/coreutils'
230-
path: 'gnu'
231-
ref: ${{ env.REPO_GNU_REF }}
232-
submodules: false
233-
persist-credentials: false
234-
- name: Override submodule URL and initialize submodules
235-
# Use github instead of upstream git server
236-
run: |
237-
git submodule sync --recursive
238-
git config submodule.gnulib.url https://github.com/coreutils/gnulib.git
239-
git submodule update --init --recursive --depth 1
240-
working-directory: gnu
218+
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
241219

242220
#### Lima build environment setup
243221
- name: Setup Lima
@@ -366,7 +344,7 @@ jobs:
366344
path: 'uutils'
367345
persist-credentials: false
368346
- name: Retrieve reference artifacts
369-
uses: dawidd6/action-download-artifact@v11
347+
uses: dawidd6/action-download-artifact@v12
370348
# ref: <https://github.com/dawidd6/action-download-artifact>
371349
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
372350
with:

.github/workflows/fuzzing.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ jobs:
7979
matrix:
8080
test-target:
8181
- { name: fuzz_test, should_pass: true }
82-
# https://github.com/uutils/coreutils/issues/5311
83-
- { name: fuzz_date, should_pass: false }
82+
- { name: fuzz_date, should_pass: true }
8483
- { name: fuzz_expr, should_pass: true }
8584
- { name: fuzz_printf, should_pass: true }
8685
- { name: fuzz_echo, should_pass: true }

.vscode/cspell.dictionaries/acronyms+names.wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ aarch
33
AIX
44
ASLR # address space layout randomization
55
AST # abstract syntax tree
6+
CATN # busybox cat -n feature flag
7+
CATV # busybox cat -v feature flag
68
CICD # continuous integration/deployment
79
CPU
810
CPUs

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
AFAICT
2+
asimd
3+
ASIMD
24
alloc
35
arity
46
autogenerate
@@ -71,11 +73,13 @@ hardlink
7173
hardlinks
7274
hasher
7375
hashsums
76+
hwcaps
7477
infile
7578
iflag
7679
iflags
7780
kibi
7881
kibibytes
82+
langinfo
7983
libacl
8084
lcase
8185
listxattr
@@ -96,6 +100,7 @@ nocache
96100
nocreat
97101
noctty
98102
noerror
103+
noexec
99104
nofollow
100105
nolinks
101106
nonblock
@@ -129,6 +134,7 @@ semiprimes
129134
setcap
130135
setfacl
131136
setfattr
137+
setlocale
132138
shortcode
133139
shortcodes
134140
siginfo
@@ -147,6 +153,8 @@ tokenize
147153
toolchain
148154
totalram
149155
truthy
156+
tunables
157+
TUNABLES
150158
ucase
151159
unbuffered
152160
udeps
@@ -163,6 +171,8 @@ xattrs
163171
xpass
164172

165173
# * abbreviations
174+
AMPM
175+
ampm
166176
consts
167177
deps
168178
dev

.vscode/cspell.dictionaries/workspace.wordlist.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,22 @@ getcwd
364364
weblate
365365
algs
366366

367+
# * stty terminal flags
368+
brkint
369+
cstopb
370+
decctlq
371+
echoctl
372+
echoe
373+
echoke
374+
ignbrk
375+
ignpar
376+
icrnl
377+
isig
378+
istrip
379+
litout
380+
opost
381+
parodd
382+
367383
# translation tests
368384
CLICOLOR
369385
erreur

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ crates is as follows:
4545
- `Cargo.toml`
4646
- `src/main.rs`: contains only a single macro call
4747
- `src/<util name>.rs`: the actual code for the utility
48-
- `<util name>.md`: the documentation for the utility
48+
- `locales/en-US.ftl`: the util's strings
49+
- `locales/fr-FR.ftl`: French translation of the util's strings
4950

5051
We have separated repositories for crates that we maintain but also publish for
5152
use by others:

0 commit comments

Comments
 (0)