Skip to content

Commit dede6d0

Browse files
authored
Merge branch 'main' into factor_fix
2 parents c0333f3 + e6467b1 commit dede6d0

Some content is hidden

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

57 files changed

+2969
-351
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
sudo locale-gen --keep-existing fa_IR.UTF-8 # Iran
9292
sudo locale-gen --keep-existing am_ET.UTF-8 # Ethiopia
9393
sudo locale-gen --keep-existing th_TH.UTF-8 # Thailand
94+
sudo locale-gen --keep-existing zh_CN.GB18030 # China
9495
9596
sudo update-locale
9697
echo "After:"
@@ -343,7 +344,7 @@ jobs:
343344
path: 'uutils'
344345
persist-credentials: false
345346
- name: Retrieve reference artifacts
346-
uses: dawidd6/action-download-artifact@v11
347+
uses: dawidd6/action-download-artifact@v12
347348
# ref: <https://github.com/dawidd6/action-download-artifact>
348349
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
349350
with:

.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: 6 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,6 +73,7 @@ hardlink
7173
hardlinks
7274
hasher
7375
hashsums
76+
hwcaps
7477
infile
7578
iflag
7679
iflags
@@ -97,6 +100,7 @@ nocache
97100
nocreat
98101
noctty
99102
noerror
103+
noexec
100104
nofollow
101105
nolinks
102106
nonblock
@@ -149,6 +153,8 @@ tokenize
149153
toolchain
150154
totalram
151155
truthy
156+
tunables
157+
TUNABLES
152158
ucase
153159
unbuffered
154160
udeps

.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:

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,6 @@ should_panic_without_expect = "allow" # 2
670670
doc_markdown = "allow"
671671
unused_self = "allow"
672672
enum_glob_use = "allow"
673-
needless_raw_string_hashes = "allow"
674673
unreadable_literal = "allow"
675674
unnested_or_patterns = "allow"
676675
implicit_hasher = "allow"

src/uu/chroot/src/chroot.rs

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ mod error;
99
use crate::error::ChrootError;
1010
use clap::{Arg, ArgAction, Command};
1111
use std::ffi::CString;
12-
use std::io::Error;
12+
use std::io::{Error, ErrorKind};
1313
use std::os::unix::prelude::OsStrExt;
14+
use std::os::unix::process::CommandExt;
1415
use std::path::{Path, PathBuf};
1516
use std::process;
1617
use uucore::entries::{Locate, Passwd, grp2gid, usr2uid};
17-
use uucore::error::{UResult, UUsageError, set_exit_code};
18+
use uucore::error::{UResult, UUsageError};
1819
use uucore::fs::{MissingHandling, ResolveMode, canonicalize};
1920
use uucore::libc::{self, chroot, setgid, setgroups, setuid};
2021
use uucore::{format_usage, show};
@@ -205,33 +206,20 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
205206

206207
assert!(!command.is_empty());
207208
let chroot_command = command[0];
208-
let chroot_args = &command[1..];
209209

210210
// NOTE: Tests can only trigger code beyond this point if they're invoked with root permissions
211211
set_context(&options)?;
212212

213-
let pstatus = match process::Command::new(chroot_command)
214-
.args(chroot_args)
215-
.status()
216-
{
217-
Ok(status) => status,
218-
Err(e) => {
219-
return Err(if e.kind() == std::io::ErrorKind::NotFound {
220-
ChrootError::CommandNotFound(command[0].to_string(), e)
221-
} else {
222-
ChrootError::CommandFailed(command[0].to_string(), e)
223-
}
224-
.into());
225-
}
226-
};
213+
let err = process::Command::new(chroot_command)
214+
.args(&command[1..])
215+
.exec();
227216

228-
let code = if pstatus.success() {
229-
0
217+
Err(if err.kind() == ErrorKind::NotFound {
218+
ChrootError::CommandNotFound(chroot_command.to_owned(), err)
230219
} else {
231-
pstatus.code().unwrap_or(-1)
232-
};
233-
set_exit_code(code);
234-
Ok(())
220+
ChrootError::CommandFailed(chroot_command.to_owned(), err)
221+
}
222+
.into())
235223
}
236224

237225
pub fn uu_app() -> Command {

0 commit comments

Comments
 (0)