Skip to content

Commit 7c9c481

Browse files
authored
Merge branch 'uutils:main' into uucore-memory
2 parents 12c43fd + cd27f69 commit 7c9c481

12 files changed

Lines changed: 432 additions & 210 deletions

File tree

.github/workflows/CICD.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ jobs:
379379
set -x
380380
# Regression-test for https://github.com/uutils/coreutils/issues/8701
381381
make UTILS="rm chmod chown chgrp mv du"
382+
# Verifies that
383+
# 1. there is no "error: none of the selected packages contains this
384+
# feature: feat_external_libstdbuf"
385+
# 2. the makefile doesn't try to install libstdbuf even though stdbuf is skipped
386+
DESTDIR=/tmp/ make SKIP_UTILS="stdbuf" install
382387
383388
build_rust_stable:
384389
name: Build/stable

GNUmakefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ PROGS := \
107107
dir \
108108
dircolors \
109109
dirname \
110+
du \
110111
echo \
111112
env \
112113
expand \
@@ -117,6 +118,7 @@ PROGS := \
117118
fold \
118119
hashsum \
119120
head \
121+
hostname \
120122
join \
121123
link \
122124
ln \
@@ -145,17 +147,18 @@ PROGS := \
145147
sleep \
146148
sort \
147149
split \
148-
stty \
149150
sum \
150151
sync \
151152
tac \
152153
tail \
153154
tee \
154155
test \
156+
touch \
155157
tr \
156158
true \
157159
truncate \
158160
tsort \
161+
uname \
159162
unexpand \
160163
uniq \
161164
vdir \
@@ -169,10 +172,8 @@ UNIX_PROGS := \
169172
chmod \
170173
chown \
171174
chroot \
172-
du \
173175
groups \
174176
hostid \
175-
hostname \
176177
id \
177178
install \
178179
kill \
@@ -185,10 +186,9 @@ UNIX_PROGS := \
185186
pinky \
186187
stat \
187188
stdbuf \
189+
stty \
188190
timeout \
189-
touch \
190191
tty \
191-
uname \
192192
unlink \
193193
uptime \
194194
users \
@@ -228,7 +228,7 @@ ifneq ($(OS),Windows_NT)
228228
PROGS := $(PROGS) $(SELINUX_PROGS)
229229
endif
230230

231-
UTILS ?= $(PROGS)
231+
UTILS ?= $(filter-out $(SKIP_UTILS),$(PROGS))
232232

233233
ifneq ($(findstring stdbuf,$(UTILS)),)
234234
# Use external libstdbuf per default. It is more robust than embedding libstdbuf.
@@ -306,7 +306,7 @@ TEST_PROGS := \
306306
who
307307

308308
TESTS := \
309-
$(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(TEST_PROGS))))
309+
$(sort $(filter $(UTILS),$(TEST_PROGS)))
310310

311311
TEST_NO_FAIL_FAST :=
312312
TEST_SPEC_FEATURE :=
@@ -326,7 +326,7 @@ endef
326326

327327
# Output names
328328
EXES := \
329-
$(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(PROGS))))
329+
$(sort $(UTILS))
330330

331331
INSTALLEES := ${EXES}
332332
ifeq (${MULTICALL}, y)
@@ -352,7 +352,7 @@ build-coreutils:
352352

353353
build: build-coreutils build-pkgs locales
354354

355-
$(foreach test,$(filter-out $(SKIP_UTILS),$(PROGS)),$(eval $(call TEST_BUSYBOX,$(test))))
355+
$(foreach test,$(UTILS),$(eval $(call TEST_BUSYBOX,$(test))))
356356

357357
test:
358358
${CARGO} test ${CARGOFLAGS} --features "$(TESTS) $(TEST_SPEC_FEATURE)" --no-default-features $(TEST_NO_FAIL_FAST)
@@ -482,7 +482,7 @@ endif
482482

483483
install: build install-manpages install-completions install-locales
484484
mkdir -p $(INSTALLDIR_BIN)
485-
ifneq ($(OS),Windows_NT)
485+
ifneq (,$(and $(findstring stdbuf,$(UTILS)),$(findstring feat_external_libstdbuf,$(CARGOFLAGS))))
486486
mkdir -p $(DESTDIR)$(LIBSTDBUF_DIR)
487487
$(INSTALL) -m 755 $(BUILDDIR)/deps/libstdbuf* $(DESTDIR)$(LIBSTDBUF_DIR)/
488488
endif

fuzz/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ license = "MIT"
1818
[package.metadata]
1919
cargo-fuzz = true
2020

21+
# Enable debug symbols in release builds for readable backtraces
22+
# when fuzzing discovers crashes. This addresses issue #5343.
23+
[profile.release]
24+
debug = true
25+
2126
[dependencies]
2227
libfuzzer-sys = "0.4.7"
2328
rand = { version = "0.9.0", features = ["small_rng"] }

src/uu/df/src/blocks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{env, fmt};
99

1010
use uucore::{
1111
display::Quotable,
12-
parser::parse_size::{ParseSizeError, parse_size_u64},
12+
parser::parse_size::{ParseSizeError, parse_size_non_zero_u64, parse_size_u64},
1313
};
1414

1515
/// The first ten powers of 1024.
@@ -213,7 +213,7 @@ pub(crate) fn read_block_size(matches: &ArgMatches) -> Result<BlockSize, ParseSi
213213
fn block_size_from_env() -> Option<u64> {
214214
for env_var in ["DF_BLOCK_SIZE", "BLOCK_SIZE", "BLOCKSIZE"] {
215215
if let Ok(env_size) = env::var(env_var) {
216-
return parse_size_u64(&env_size).ok();
216+
return parse_size_non_zero_u64(&env_size).ok();
217217
}
218218
}
219219

src/uu/ls/src/ls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use uucore::{
6868
line_ending::LineEnding,
6969
os_str_as_bytes_lossy,
7070
parser::parse_glob,
71-
parser::parse_size::parse_size_u64,
71+
parser::parse_size::parse_size_non_zero_u64,
7272
parser::shortcut_value_parser::ShortcutValueParser,
7373
quoting_style::{QuotingStyle, locale_aware_escape_dir_name, locale_aware_escape_name},
7474
show, show_error, show_warning,
@@ -902,7 +902,7 @@ impl Config {
902902

903903
let (file_size_block_size, block_size) = if !opt_si && !opt_hr && !raw_block_size.is_empty()
904904
{
905-
match parse_size_u64(&raw_block_size.to_string_lossy()) {
905+
match parse_size_non_zero_u64(&raw_block_size.to_string_lossy()) {
906906
Ok(size) => match (is_env_var_blocksize, opt_kb) {
907907
(true, true) => (DEFAULT_FILE_SIZE_BLOCK_SIZE, DEFAULT_BLOCK_SIZE),
908908
(true, false) => (DEFAULT_FILE_SIZE_BLOCK_SIZE, size),

src/uu/od/locales/en-US.ftl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ od-help-address-radix = Select the base in which file offsets are printed.
6666
od-help-skip-bytes = Skip bytes input bytes before formatting and writing.
6767
od-help-read-bytes = limit dump to BYTES input bytes
6868
od-help-endian = byte order to use for multi-byte formats
69+
od-help-strings = output strings of at least BYTES graphic chars. 3 is assumed when BYTES is not specified.
6970
od-help-a = named characters, ignoring high-order bit
7071
od-help-b = octal bytes
7172
od-help-c = ASCII characters or backslash escapes
@@ -76,3 +77,17 @@ od-help-output-duplicates = do not use * to mark line suppression
7677
od-help-width = output BYTES bytes per output line. 32 is implied when BYTES is not
7778
specified.
7879
od-help-traditional = compatibility mode with one input, offset and label.
80+
od-help-o = octal 2-byte units
81+
od-help-capital-i = decimal 8-byte units
82+
od-help-capital-l = decimal 8-byte units
83+
od-help-i = decimal 4-byte units
84+
od-help-l = decimal 8-byte units
85+
od-help-x = hexadecimal 2-byte units
86+
od-help-h = hexadecimal 2-byte units
87+
od-help-capital-o = octal 4-byte units
88+
od-help-s = decimal 2-byte units
89+
od-help-capital-x = hexadecimal 4-byte units
90+
od-help-capital-h = hexadecimal 4-byte units
91+
od-help-e = floating point double precision (64-bit) units
92+
od-help-f = floating point double precision (32-bit) units
93+
od-help-capital-f = floating point double precision (64-bit) units

src/uu/od/locales/fr-FR.ftl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ od-help-address-radix = Sélectionner la base dans laquelle les décalages de fi
6767
od-help-skip-bytes = Ignorer les octets d'entrée avant le formatage et l'écriture.
6868
od-help-read-bytes = limiter le dump à OCTETS octets d'entrée
6969
od-help-endian = ordre des octets à utiliser pour les formats multi-octets
70+
od-help-strings = afficher les chaînes d'au moins OCTETS caractères graphiques. 3 est supposé quand OCTETS n'est pas spécifié.
7071
od-help-a = caractères nommés, ignorant le bit d'ordre supérieur
7172
od-help-b = octets octaux
7273
od-help-c = caractères ASCII ou échappements antislash
@@ -77,3 +78,17 @@ od-help-output-duplicates = ne pas utiliser * pour marquer la suppression de lig
7778
od-help-width = sortir OCTETS octets par ligne de sortie. 32 est impliqué quand OCTETS n'est pas
7879
spécifié.
7980
od-help-traditional = mode de compatibilité avec une entrée, décalage et étiquette.
81+
od-help-o = unités octales 2-octets
82+
od-help-capital-i = unités décimales 8-octets
83+
od-help-capital-l = unités décimales 8-octets
84+
od-help-i = unités décimales 4-octets
85+
od-help-l = unités décimales 8-octets
86+
od-help-x = unités hexadécimales 2-octets
87+
od-help-h = unités hexadécimales 2-octets
88+
od-help-capital-o = unités octales 4-octets
89+
od-help-s = unités décimales 2-octets
90+
od-help-capital-x = unités hexadécimales 4-octets
91+
od-help-capital-h = unités hexadécimales 4-octets
92+
od-help-e = unités virgule flottante double précision (64-bits)
93+
od-help-f = unités virgule flottante double précision (32-bits)
94+
od-help-capital-f = unités virgule flottante double précision (64-bits)

0 commit comments

Comments
 (0)