Ben Wiederhake
5a8fad8443
shred: implement and test feature --random-source
2025-05-19 11:17:55 +02:00
Ben Wiederhake
0011b6e3f7
run cargo fmt on missed files
...
It seems these files were missed by CI. Command to run cargo fmt on
absolutely *everything* (and possibly too much)
find tests -name "*.rs" -print0 | xargs -0 cargo fmt --
2025-05-19 11:17:46 +02:00
Sylvestre Ledru
3848e6c271
Merge branch 'main' into 6175-env-empty-string
2025-05-19 11:03:02 +02:00
Sylvestre Ledru
6a828f0e74
Merge pull request #7957 from cakebaker/clippy_set_msrv_and_fix_warnings
...
clippy: set MSRV and fix warnings
2025-05-19 11:02:34 +02:00
Daniel Hofstetter
ee665fbebe
more: fix warning from let_and_return lint
2025-05-19 10:08:40 +02:00
Daniel Hofstetter
8674e86703
cp: fix warnings from unnecessary_debug_formatting
...
Co-authored-by: Jeremy Smart <jeremy3141592@gmail.com>
2025-05-19 09:54:37 +02:00
Daniel Hofstetter
7a706b5756
mv: fix warning from io_other_error lint
...
Co-authored-by: Jeremy Smart <jeremy3141592@gmail.com>
2025-05-19 09:27:36 +02:00
Daniel Hofstetter
4d44afcd87
clippy: set MSRV to 1.85
2025-05-19 09:22:38 +02:00
Sylvestre Ledru
9fbb6aca3c
Merge pull request #7765 from aaron-ang/more-mem-constant
...
more: constant memory initialization overhead
2025-05-19 09:14:04 +02:00
Jeremy Smart
696dd3c0cd
remove information about implementation details
2025-05-18 17:08:05 -04:00
Jeremy Smart
dc2942a769
Merge branch 'main' into 6175-env-empty-string
2025-05-18 16:56:11 -04:00
Jeremy Smart
d9e8244e02
Update docs/src/extensions.md
...
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-05-18 20:55:49 +00:00
Jeremy Smart
8b210cf204
docs: env doesn't handle the empty string as a variable name
2025-05-18 15:50:47 -04:00
Aaron Ang
c8c4f525a2
test_more: use at_and_ucmd
helper macro
2025-05-18 21:09:48 +02:00
Aaron Ang
7692b93ea6
more: constant mem initialization for files and pipes
2025-05-18 21:09:48 +02:00
Daniel Hofstetter
438ed3c6c6
doc: fix warnings from markdown linter
2025-05-18 21:08:27 +02:00
Daniel Hofstetter
aec2eeac05
ci: bump markdownlint-cli2-action from v19 to v20
2025-05-18 21:08:27 +02:00
Daniel Hofstetter
1e476d9749
ci: remove trailing spaces at line end
2025-05-18 21:08:27 +02:00
Jeremy Smart
a5a9f7d44d
pr: migrate from quick-error to thiserror ( #7919 )
...
* remove quick-error from pr
* fix windows compilation, Cargo.toml
2025-05-15 09:19:46 +02:00
Sylvestre Ledru
5e11842428
Merge pull request #7932 from cakebaker/ls_remove_duplicate_code
...
ls: remove duplicate code
2025-05-15 09:19:16 +02:00
Sylvestre Ledru
19cd210ac3
cp: context Disable a check in tests/cp/no-ctx.sh
...
It is not relevant for us:
* the selinux crate is handling errors
* the test says "maybe we should not fail when no context available"
2025-05-15 09:06:37 +02:00
Sylvestre Ledru
c76c0ad2dd
Merge pull request #7934 from drinkcat/wc-faster
...
wc: Speed optimization
2025-05-15 08:44:50 +02:00
Daniel Hofstetter
d7d0a3385b
Merge pull request #7935 from uutils/renovate/zip-3.x
...
chore(deps): update rust crate zip to v3
2025-05-15 07:15:22 +02:00
renovate[bot]
3566f88874
chore(deps): update rust crate zip to v3
2025-05-15 03:50:17 +00:00
Nicolas Boichat
1fc14d837c
wc: Align buffer to 32-byte boundary
...
bytecount uses vector operations to speed up line counting.
At least on x86 with AVX2 support, the vectors are 256-byte wide,
and operations are much faster if the data is aligned.
Saves about 4% of total performance, matching wc's performance.
2025-05-15 05:03:08 +02:00
Nicolas Boichat
1fe539f1d4
wc: Increase buffer size to 256kb
...
Improves performance by about 4% on large files.
2025-05-15 05:02:27 +02:00
Daniel Hofstetter
c3fea933e1
ls: remove duplicate code
2025-05-14 17:00:00 +02:00
Jeremy Smart
64be4369b3
change variable name
2025-05-13 19:21:04 -04:00
Sylvestre Ledru
8866ec3927
Merge pull request #7924 from cakebaker/split_reduce_duplication_in_test
...
split: use delegation to avoid code duplication in test
2025-05-12 12:02:10 +02:00
Daniel Hofstetter
0c53409857
split: delegate to avoid code duplication in test
2025-05-12 10:55:50 +02:00
Daniel Hofstetter
ad9a87118c
split: merge imports in test
2025-05-12 10:52:13 +02:00
Sylvestre Ledru
402907ed6e
Merge pull request #7922 from cakebaker/bump_tempfile
...
Bump `tempfile` & fix deprecation warning
2025-05-12 08:37:14 +02:00
Daniel Hofstetter
a6d9bfbaa0
mktemp: use keep instead of deprecated into_path
2025-05-12 07:43:26 +02:00
Daniel Hofstetter
04164596d1
Bump tempfile from 3.19.1 to 3.20.0
2025-05-12 07:37:49 +02:00
Jeremy Smart
c1d2362f1d
fix windows test
2025-05-11 20:18:13 -04:00
Jeremy Smart
67acfbcbf3
hashsum: don't exit early on io errors
2025-05-11 19:10:08 -04:00
Alexander Shirokov
a73c0ea290
shred: improve write logic to support data alignment
...
This commit improves the reliability of the writing logic and removes
implicit dependencies between the preferred I/O size and the block size.
For example, in earlier versions, using BLOCK_SIZE != N * IO_SIZE could
lead to overflows due to alignment with values larger than the buffer
size.
2025-05-11 23:36:53 +02:00
Alexander Shirokov
745d2add08
shred: add 4K data alignment
...
This commit allows aligning output data by 4K to better match GNU shred.
The 4K block size is configured as a constant because it provides a
widely used value in the simplest way. However, there is a chance that
some systems may use a different value. So far, I haven't encountered
anything other than 4K, I decided not to overcomplicate the approach for
now.
2025-05-11 23:36:53 +02:00
Sylvestre Ledru
05c161cbb5
Merge pull request #7914 from cakebaker/id_remove_to_string_calls
...
id: remove unnecessary `to_string` calls
2025-05-11 14:28:57 +02:00
Daniel Hofstetter
f4b1a97c0a
id: remove unnecessary to_string calls
2025-05-11 13:35:43 +02:00
Daniel Hofstetter
f4b16176a0
Merge pull request #7909 from sylvestre/use-selinux-func
...
selinux: use the uucore::selinux::is_selinux_enabled() function
2025-05-11 13:13:24 +02:00
Sylvestre Ledru
545fab9544
selinux: add the desc of the module
2025-05-11 09:36:18 +02:00
Sylvestre Ledru
6091d0b62b
selinux: use the uucore::selinux::is_selinux_enabled() function
2025-05-11 09:36:15 +02:00
Sylvestre Ledru
7cd68761e2
Merge pull request #7911 from uutils/renovate/clap-4.x-lockfile
...
chore(deps): update rust crate clap to v4.5.38
2025-05-11 09:05:36 +02:00
renovate[bot]
fa7f2bf763
chore(deps): update rust crate clap to v4.5.38
2025-05-11 03:20:24 +00:00
Sylvestre Ledru
45b0c39ed7
Merge pull request #7892 from cakebaker/uptime_refactor_uumain
...
uptime: refactor `uumain`
2025-05-09 22:11:44 +02:00
Daniel Hofstetter
99be8f8987
Merge pull request #7905 from uutils/renovate/signal-hook-0.x-lockfile
...
chore(deps): update rust crate signal-hook to v0.3.18
2025-05-09 14:23:09 +02:00
renovate[bot]
f0489d903a
chore(deps): update rust crate signal-hook to v0.3.18
2025-05-09 11:37:12 +00:00
Daniel Hofstetter
7c865b29a1
Merge pull request #7898 from sylvestre/selinux-err
...
selinux: get closer to the GNU error msgs
2025-05-09 13:35:29 +02:00
Daniel Hofstetter
7d24aa8caa
Merge pull request #7899 from sylvestre/selinux-build
...
gnu: fix the build with selinux
2025-05-09 11:31:10 +02:00