Commit graph

8679 commits

Author SHA1 Message Date
Joining7943
2658f8ae5b tail: improve performance of piped stdin
Rewrite handling of stdin when it is piped and read input in chunks.

Fixes https://github.com/uutils/coreutils/issues/3842
2022-09-09 13:51:37 +02:00
Terts Diepraam
1abfc4b15f chroot: set trailing var arg
Without trailing var arg set in clap, flags in the command argument are
incorrectly parsed by clap.
2022-09-09 11:42:33 +02:00
Sylvestre Ledru
b39f5239e7
Merge pull request #3912 from uutils/dependabot/cargo/half-2.1.0
build(deps): bump half from 1.8.2 to 2.1.0
2022-09-09 08:40:49 +02:00
dependabot[bot]
2d59ec3453
build(deps): bump half from 1.8.2 to 2.1.0
Bumps [half](https://github.com/starkat99/half-rs) from 1.8.2 to 2.1.0.
- [Release notes](https://github.com/starkat99/half-rs/releases)
- [Changelog](https://github.com/starkat99/half-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/starkat99/half-rs/compare/v1.8.2...v2.1.0)

---
updated-dependencies:
- dependency-name: half
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 20:21:18 +00:00
Sylvestre Ledru
f617652f48
Merge pull request #3909 from sylvestre/issue-3899
Bump Min Rust and fix test_closes_file_descriptors (Issue 3899)
2022-09-08 22:14:09 +02:00
Sylvestre Ledru
d1bbc37bc3 Set the rust-version flag 2022-09-08 20:28:33 +02:00
Sylvestre Ledru
a131ccd5dc cargo-deny: refresh with the new dependency 2022-09-07 21:26:06 +02:00
Sylvestre Ledru
e8ea75fc23 bump the Minimum Supported Rust Version to 1.59.0
Needed for os_str_bytes & time:

```
error: package `os_str_bytes v6.3.0` cannot be built because it requires rustc 1.57.0 or newer, while the currently active rustc version is 1.56.1
error: package `time v0.3.14` cannot be built because it requires rustc 1.59.0 or newer, while the currently active rustc version is 1.56.1
```
2022-09-07 21:26:06 +02:00
Sylvestre Ledru
a8d1d73465 fix a test on cp counting the number of fd:
The testsuite runs in parallel, we have pipe, sockets
opened by other tests.
So, we take in account the various fd to increase the limit
2022-09-07 21:26:03 +02:00
Terts Diepraam
987479d601
Merge pull request #3845 from jhscheer/fix_3842
tail: fix stdin redirect (#3842)
2022-09-07 19:10:45 +02:00
Jan Scheer
88d3aee71c tail: fix offset for stdin redirect if multiple input files 2022-09-05 10:09:04 +02:00
Jan Scheer
74f359bd76 tail: use same-file crate to get a handle of stdin redirected file 2022-09-05 10:09:04 +02:00
Jan Scheer
942928b0ea tail: fix stdin redirect when file is not at its beginning
Previously, if stdin redirect pointed to a regular file,
tailing started at the beginning of the file. However,
tailing needs to start at the current position because this
is expected by tests/tail-2/start-middle.sh.

This fixes the issue by taking the current offset into account
while going backwards through the stdin redirected file.
2022-09-05 10:09:04 +02:00
Jan Scheer
92c3f60440 tail: fix stdin redirect (#3842)
This fixes a bug where calling `tail - < file.txt` would result
in invoking `unbounded_tail()`.
However, it is a stdin redirect to a seekable regular file and
therefore `bounded_tail` should be invoked as if `tail file.txt` had
been called.
2022-09-05 10:09:04 +02:00
Terts Diepraam
e28301e969
Merge pull request #3902 from sylvestre/issue-3890
docker: Mount some volumes when building with cross
2022-09-05 10:06:11 +02:00
Sylvestre Ledru
6b8b8a1ee7 docker: Mount some volumes when building with cross
Many thanks to Aleksandr Chebotov for the help
2022-09-04 23:35:34 +02:00
Sylvestre Ledru
1054c5c365
Merge pull request #3900 from cakebaker/rm_fix_indentation
rm: fix indentation within uu_app()
2022-09-04 16:06:05 +02:00
Daniel Hofstetter
4fcedb4cdc rm: fix indentation within uu_app() 2022-09-04 14:42:23 +02:00
Sylvestre Ledru
b62b108158
Merge pull request #3896 from cakebaker/expand_fix_too_long_line
expand: fix line that's too long
2022-09-03 17:35:10 +02:00
Daniel Hofstetter
8344855183 expand: fix line that's too long 2022-09-03 14:48:58 +02:00
Sylvestre Ledru
f21fda46b4
Merge pull request #3887 from cakebaker/cp_fix_indentation
cp: fix indentation within uu_app()
2022-09-02 10:21:07 +02:00
Sylvestre Ledru
60a93c1909
Merge pull request #3892 from tertsdiepraam/new-logo
docs: create new adaptive svg logo
2022-09-02 10:20:53 +02:00
Sylvestre Ledru
e8c1263e91
Merge pull request #3893 from cakebaker/ls_fix_indentation
ls: fix indentation within uu_app()
2022-09-02 10:19:43 +02:00
Daniel Hofstetter
da0f1a98b5 ls: fix indentation within uu_app() 2022-09-01 13:38:46 +02:00
Terts Diepraam
dfd0bf1d6d docs: create new adaptive svg logo 2022-09-01 10:55:45 +02:00
Daniel Hofstetter
e5e6a48200 cp: fix indentation within uu_app() 2022-08-30 13:59:28 +02:00
Sylvestre Ledru
282774a3ef
Merge pull request #3853 from stefins/rm-write-protected
rm: added write-protected check for files
2022-08-29 17:03:24 +02:00
Stefin
a33bc185a5 rm: added check for write protected regular empty file
Signed-off-by: Stefin <stefin@pm.me>
2022-08-29 18:09:02 +05:30
Sylvestre Ledru
8e02b052b0
Merge pull request #3883 from uutils/dependabot/github_actions/vmactions/freebsd-vm-0.2.4
build(deps): bump vmactions/freebsd-vm from 0.2.3 to 0.2.4
2022-08-29 12:14:50 +02:00
Sylvestre Ledru
5fb5a26425
Merge pull request #3885 from cakebaker/clap_replace_forbid_empty_values
Replace forbid_empty_values() with value_parser()
2022-08-29 12:14:30 +02:00
Daniel Hofstetter
a9b5d9dccf Replace forbid_empty_values() with value_parser() 2022-08-29 10:44:52 +02:00
dependabot[bot]
4f967de2eb
build(deps): bump vmactions/freebsd-vm from 0.2.3 to 0.2.4
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 06:41:02 +00:00
Sylvestre Ledru
60e6240a6c
Add a link to the Windows images in the doc (#3879) 2022-08-28 10:31:34 +02:00
Owen Anderson
08d3da8f6c
Fix a TODO by making conv_block_unblock_helper consume the input. (#3787)
* Fix a TODO by making `conv_block_unblock_helper` consume the input.
2022-08-28 10:07:04 +02:00
Stefin
4c1c9ebf89 rm: change InteractiveMode::Default to InteractiveMode::PromptProtected
Signed-off-by: Stefin <stefin@pm.me>
2022-08-27 19:38:10 +05:30
Sylvestre Ledru
0dbcdde64e
Merge pull request #3873 from kilpkonn/tail_seek_outside_bounds
Fix tail panicing when seeking backwards
2022-08-26 22:35:50 +02:00
Terts Diepraam
72d7120635
Merge pull request #3877 from cakebaker/link_move_use_statement
link: move use statement after copyright
2022-08-26 12:08:24 +02:00
Daniel Hofstetter
2d42434911 link: move use statement after copyright 2022-08-25 16:39:34 +02:00
Sylvestre Ledru
8491b68ade
Merge pull request #3876 from cakebaker/clap_replace_deprecated_allow_invalid_utf8
Replace allow_invalid_utf8() with value_parser()
2022-08-25 16:26:06 +02:00
Daniel Hofstetter
747ed592d9 Replace allow_invalid_utf8() with value_parser() 2022-08-25 15:21:50 +02:00
Sylvestre Ledru
9afb2e7038
Merge pull request #3871 from cakebaker/clap_replace_deprecated_occurrences_of
Replace deprecated occurrences_of()
2022-08-25 08:53:42 +02:00
Sylvestre Ledru
3523f12862
Merge pull request #3841 from niyaznigmatullin/android_add_timeout
CI/android: add 60 min timeout for cargo test to see where it's stuck
2022-08-25 08:51:59 +02:00
Tavo Annus
09cfa44560 Fix tail panicing when seeking backwards
Previously `tail -c n file.txt` caused panic if n > sizeof file.txt.
Now it prints out whole file similarly to GNU tail.
2022-08-24 21:02:47 +03:00
Terts Diepraam
bbd0ef9f1b
Merge pull request #3866 from jfinkels/clippy-fixes
Clippy fixes in multiple crates
2022-08-24 10:21:31 +02:00
Niyaz Nigmatullin
84abf9c920 CI/android: add 60 min timeout for cargo test to see where it's stuck 2022-08-24 08:21:24 +03:00
Jeffrey Finkelstein
8458bf1387 Clippy fixes in multiple crates 2022-08-23 18:30:43 -04:00
Stefin
ad4eac867f rm: added test for rm_prompt_write_protected
Signed-off-by: Stefin <stefin@pm.me>
2022-08-23 21:17:48 +05:30
Daniel Hofstetter
c6e313372e Replace deprecated occurrences_of() 2022-08-23 16:31:32 +02:00
Stefin
a8326d7f3f rm: added new InteractiveMode InteractiveMode::Never
Signed-off-by: Stefin <stefin@pm.me>
2022-08-23 19:33:34 +05:30
Sylvestre Ledru
5a726e1ab3
Merge pull request #3864 from niyaznigmatullin/migrate_termsize_to_terminal_size
deps: change `termsize` dependency to `terminal_size`
2022-08-23 11:53:24 +02:00