Skip to content

Commit 1525f6a

Browse files
authored
Merge branch 'main' into rm_compatibility
2 parents 01ac5f3 + cc103ec commit 1525f6a

File tree

108 files changed

+2925
-1126
lines changed

Some content is hidden

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

108 files changed

+2925
-1126
lines changed

.github/workflows/CICD.yml

Lines changed: 9 additions & 9 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`"

.github/workflows/GnuTests.yml

Lines changed: 25 additions & 48 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: |
@@ -115,11 +103,23 @@ jobs:
115103
## Build binaries
116104
cd 'uutils'
117105
env PROFILE=release-small bash util/build-gnu.sh
106+
107+
- name: Save files for faster configure and skipping make
108+
uses: actions/cache/save@v5
109+
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
110+
with:
111+
path: |
112+
gnu/config.cache
113+
gnu/src/getlimits
114+
key: ${{ runner.os }}-gnu-config-${{ hashFiles('gnu/NEWS') }}-${{ hashFiles('uutils/util/build-gnu.sh') }}
118115

119116
### Run tests as user
120117
- name: Run GNU tests
121118
shell: bash
122119
run: |
120+
## Use unshare
121+
sudo sysctl -w kernel.unprivileged_userns_clone=1
122+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
123123
## Run GNU tests
124124
path_GNU='gnu'
125125
path_UUTILS='uutils'
@@ -206,16 +206,6 @@ jobs:
206206
with:
207207
path: 'uutils'
208208
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}"
219209
- uses: dtolnay/rust-toolchain@master
220210
with:
221211
toolchain: stable
@@ -224,20 +214,7 @@ jobs:
224214
with:
225215
workspaces: "./uutils -> target"
226216
- 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
217+
run: (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
241218

242219
#### Lima build environment setup
243220
- name: Setup Lima

.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/jargon.wordlist.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ iflag
7676
iflags
7777
kibi
7878
kibibytes
79+
langinfo
7980
libacl
8081
lcase
8182
listxattr
@@ -129,6 +130,7 @@ semiprimes
129130
setcap
130131
setfacl
131132
setfattr
133+
setlocale
132134
shortcode
133135
shortcodes
134136
siginfo
@@ -163,6 +165,8 @@ xattrs
163165
xpass
164166

165167
# * abbreviations
168+
AMPM
169+
ampm
166170
consts
167171
deps
168172
dev

Cargo.lock

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

0 commit comments

Comments
 (0)