1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-16 10:11:01 +00:00
Commit graph

844 commits

Author SHA1 Message Date
Daniel Hofstetter
97c1633b5e clippy: fix warnings introduced by Rust 1.79 2024-06-14 07:55:31 +02:00
Daniel Hofstetter
06d5e95716
uucore: enable sum feature for checksum feature (#6450) 2024-06-04 15:29:55 +02:00
Sylvestre Ledru
1cbb4d9752 cksum/hashsum: improve the tests and wording 2024-06-03 19:43:20 +02:00
Sylvestre Ledru
773d8cfbc6 cksum/hashsum: fix the windows tests + improve some 2024-06-02 15:46:55 +02:00
Sylvestre Ledru
b1b6f28b76 cksum/hashsum: add some words in the spell skip 2024-06-01 20:28:53 +02:00
Sylvestre Ledru
6e06c2a5ea cksum/hashsum: fix clippy warnings 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
193a81bcc3 cksum/hashsum: create a new error type & use it 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
bf8b0df22f cksum/hashsum: improve the display of errors 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
1cf6700023 cksum/hashsum: manage the '*' start correctly 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
84d90fcbdf cksum/hashsum: try to detect the format faster the first line 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
2c83b28d18 hashsum: improve the file verification algo.
We have 3 different kinds of input:
* "algo (filename) = checksum"
  example: `BLAKE2 (a) = bedfbb90d858c2d67b7ee8f7523be3d3b54004ef9e4f02f2ad79a1d05bfdfe49b81e3c92ebf99b504102b6bf003fa342587f5b3124c205f55204e8c4b4ce7d7c`
* "checksum  filename"
  example: `60b725f10c9c85c70d97880dfe8191b3  a`
* "checksum filename"
  example: `60b725f10c9c85c70d97880dfe8191b3 a`

These algo/regexp are tricky as files can be called "a, " b", " ", or "*c".
We look at the first time to analyze the kind of input and reuse the same regexp then.
2024-05-29 09:08:04 +02:00
Sylvestre Ledru
6acc8e695f hashsum: Implement the quiet mode 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
89b7a1a8fb hashsum: handle the case when md5sum is used but the file contains a different algo 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
0882eea07c cksum/hashsum: factor the error structure and use it more 2024-05-29 09:08:04 +02:00
Sylvestre Ledru
dbe7a20e08 cksum/hashsum: refactor the common code.
Summary of the change:
* Move the common code into checksum
* Create a structure HashAlgorithm to handle the algorithm (instead of the 3 variables)
* Use the same function for cksum & hashsum for --check (perform_checksum_validation)
* Use the same for function for the hash generation (digest_reader)
* Add unit tests
* Add integration tests
* Fix some incorrect tests
2024-05-29 09:08:00 +02:00
Paul Hedderly
4824033385 src/uucore/src/lib/features/fsext.rs: Add magic for bcachefs
Enables stat to recogise a BcacheFS filesystem - for example:

  $ ./target/debug/stat -f /
  File: "/"
    ID: 64b40636928f3ee7 Namelen: 512     Type: bcachefs
  Block size: 512        Fundamental block size: 512
  Blocks: Total: 2044464374 Free: 295830135  Available: 291278902
  Inodes: Total: 2375400624 Free: 2366641080
2024-05-28 12:23:21 +01:00
Daniel Hofstetter
a816960c33 tests: remove 'target_pointer_width = "128"' 2024-05-20 23:27:53 +02:00
Ben Wiederhake
b718f954e8
Merge pull request #6390 from sylvestre/cksum-check
cksum: implement check (Closes: #5705)
2024-05-18 23:46:58 +02:00
Daniel Hofstetter
90e023a9de uucore/utmpx: use UTC if offset can't be resolved 2024-05-18 16:53:36 +02:00
Sylvestre Ledru
0b04bcaf9a uucore: create a new function to manage the warning/error display 2024-05-14 23:21:53 +02:00
Daniel Hofstetter
50988f5d07 uucore: remove support for Bitrig 2024-05-08 15:43:26 +02:00
renovate[bot]
c075d78efd
fix(deps): update rust crate wild to 2.2.1 2024-05-03 05:40:58 +00:00
Ben Wiederhake
95b36f2d4f uucore: remove unused spell-checker:disable 2024-04-30 18:28:20 +02:00
renovate[bot]
9e52aa0cb1
fix(deps): update rust crate data-encoding-macro to 0.1.15 2024-04-28 10:39:08 +00:00
renovate[bot]
dcf7a50392
fix(deps): update rust crate data-encoding to 2.6 2024-04-28 09:21:27 +00:00
Sylvestre Ledru
72b4a0888d
Merge pull request #6268 from jadijadi/fix-netbsd-build
Fixing the build issue on NetBSD
2024-04-24 18:26:26 +02:00
Jadi
ac87b73244 Fixing the build issue on NetBSD.
The NetBSD was missing for target-os checks on fsext.rs

Fixed #6261
2024-04-24 15:26:02 +00:00
Daniel Hofstetter
89af8b9769 du,uucore: add words to spell-checker:ignore 2024-04-24 16:54:32 +02:00
Michael Vogt
d07fb73630 ls,uucore: extract display human_readable() helper from ls
This commit extract the `display_size()` helper from `ls` into
`uucore` as `human_readable` to be similar to the gnulib helper
so that the human readable display of sizes can be shared between
ls, du, df.
2024-04-24 16:53:08 +02:00
Sylvestre Ledru
64027e5a57
Merge pull request #6252 from sylvestre/hash-error
hashsum: improve the error management to match GNU
2024-04-21 09:55:16 +02:00
sreehari prasad
a1717436a4
cp: gnu "same-file" test case compatibility (#6190)
* cp: -b doesn't ignore "version control" env

* cp: gnu "same-file" test compatibility fix
2024-04-21 09:49:45 +02:00
Sylvestre Ledru
6ef08d7f1c hashsum: improve the error management to match GNU
Should make tests/cksum/md5sum.pl and tests/cksum/sha1sum.pl pass
2024-04-21 09:08:27 +02:00
Ben Wiederhake
d4546ced26 cp: accept shortcuts for stringly-enum arguments 2024-04-14 15:39:46 +02:00
Ben Wiederhake
4ec82948b6 uucore: properly handle aliases in ShortcutValueParser 2024-04-14 15:39:46 +02:00
Qiu Chaofan
11c9351a9c
Initial AIX support (#6209)
* Initial AIX support

Add support to build on AIX operating system. Most of the changes are
in fs part. Since AIX is still tier-3 target, current support is minimal
and does not require passing all tests.

* Fix spell checking failure
2024-04-10 13:40:44 +02:00
Sylvestre Ledru
2fe5dc874e Fix clippy warning match_bool 2024-04-03 09:28:22 +02:00
Sylvestre Ledru
01ea23ba21 Try to release 0.0.26 to see if the artifacts are generated 2024-03-30 22:51:24 +01:00
Sylvestre Ledru
2246a0fad1 0.0.24 => 0.0.25 2024-03-23 22:08:05 +01:00
Krysztal112233
35c39a65e5
Merge branch 'uutils:main' into main 2024-03-22 16:48:47 +08:00
Krysztal112233
2b5e7caf8b
lint: fix clippy::manual_str_repeat in parse_glob.rs 2024-03-22 00:02:04 +08:00
Krysztal112233
eb3fac3567
lint: fix clippy::needless_borrows_for_generic_args in perms.rs 2024-03-21 23:54:37 +08:00
Krysztal112233
b66d6dffcf
lint: fix clippy::needless_borrows_for_generic_args in perms.rs 2024-03-21 23:53:32 +08:00
Krysztal112233
72b7266f71
lint: allow clippy::needless_borrow in perms.rs 2024-03-21 23:50:23 +08:00
Krysztal112233
0bb179311d
lint: fix clippy::bool_assert_comparison in perms.rs 2024-03-21 23:47:57 +08:00
hanbings
30452ced73
Add 0xDE flag to to support zfs file system. 2024-03-21 22:20:31 +08:00
Ben Wiederhake
133cdde885 cksum: implement and test --base64 output method 2024-03-18 20:59:59 +01:00
Sylvestre Ledru
696615099c
Merge pull request #6088 from cre4ture/fix/gnu_test_dd_not_rewound_sh
`dd` fix gnu test `not-rewound.sh`
2024-03-17 23:03:22 +01:00
Ulrich Hornung
40577177b2
re-use existing fd for stdout even if its a seek-able file
this is important as the fd holds the file offset we need to use
2024-03-17 20:46:49 +01:00
Daniel Hofstetter
6d8b21da80 Fix two "item x is imported redundantly" warnings 2024-03-15 14:53:00 +01:00
Daniel Hofstetter
15cb0242ea uucore/pipes: adapt to new return type of nix fn
nix 0.28 changed the return type of unistd::pipe() from Result<(RawFd, RawFd), Error> to Result<(OwnedFd, OwnedFd), Error>
2024-03-12 08:31:15 +01:00