Niyaz Nigmatullin
90babe2775
uucore: remove is_symlink
function
...
Since Rust 1.58 there is `is_symlink` method for `Path`
2022-09-23 20:32:09 +03:00
Niyaz Nigmatullin
84a741fe91
cp: add -H
option, add tests, fix test
2022-09-23 20:31:24 +03:00
Niyaz Nigmatullin
5640d56584
Fix clippy warning
2022-09-23 20:27:43 +03:00
Sylvestre Ledru
fce36c80f1
Merge pull request #3967 from uutils/dependabot/cargo/md-5-0.10.5
...
build(deps): bump md-5 from 0.10.4 to 0.10.5
2022-09-22 17:42:17 +02:00
jfinkels
dd0daa5e06
df: remove trailing spaces in rightmost column ( #3882 )
...
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2022-09-22 08:37:20 +02:00
dependabot[bot]
52b977de79
build(deps): bump md-5 from 0.10.4 to 0.10.5
...
Bumps [md-5](https://github.com/RustCrypto/hashes ) from 0.10.4 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/md-5-v0.10.4...md-5-v0.10.5 )
---
updated-dependencies:
- dependency-name: md-5
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 06:37:09 +00:00
Jeffrey Finkelstein
60ca9a03bb
mktemp: add message for directory not found
...
Add special handling in `mktemp` for when the directory that will
contain the temporary file is not found. This situation now produces
the message
mktemp: failed to create file via template 'XXX': No such file or directory
to match the behavior of GNU mktemp.
2022-09-21 21:26:39 -04:00
Jeffrey Finkelstein
f2e4225bc6
mktemp: refactor make_temp_dir(), make_temp_file()
...
Factor code out of `exec()` into two helper functions,
`make_temp_dir()` and `make_temp_file()`.
2022-09-21 21:26:39 -04:00
Sylvestre Ledru
68ad9e4301
Merge pull request #3951 from jfinkels/mktemp-too-many-templates
...
mktemp: match GNU error message on too many args
2022-09-21 22:39:55 +02:00
Sylvestre Ledru
5a746a778f
Merge pull request #3938 from tertsdiepraam/dd-positional-args
...
`dd`: parse operands manually via positional args
2022-09-21 22:39:13 +02:00
Sylvestre Ledru
2e26e1d2bd
chroot: implement --skip-chdir
2022-09-21 19:46:58 +02:00
Terts Diepraam
e377e4f046
dd: custom positional argument parsing
2022-09-21 18:41:12 +02:00
Sylvestre Ledru
adc4ecd856
Merge pull request #3907 from tertsdiepraam/chroot-allow-hyphen-values
...
`chroot`: set trailing var arg
2022-09-21 14:09:50 +02:00
Sylvestre Ledru
7b4dcc3748
Merge pull request #3928 from niyaznigmatullin/factor_enable_union_feature_for_smallvec
...
factor: enable `union` feature for `smallvec`
2022-09-21 11:39:42 +02:00
Jeffrey Finkelstein
7b35749ea6
mktemp: match GNU error message on too many args
...
Update the usage message when too many template arguments are given on
the command line to match that of GNU mktemp:
mktemp: too many templates
Try 'mktemp --help' for more information.
This fixes the test case `too-many` in the GNU test suite file
`tests/misc/mktemp.pl`.
2022-09-21 10:02:56 +02:00
Joining7943
96321f958c
tail: Fix random errors mainly on macos for piped input. Treat resolved paths to /dev/fd/0 as pipe.
...
Closes #3953
2022-09-20 01:20:49 +02:00
Sylvestre Ledru
6051c4693f
Merge pull request #3956 from uutils/dependabot/cargo/ouroboros-0.15.5
...
build(deps): bump ouroboros from 0.15.4 to 0.15.5
2022-09-19 18:15:43 +02:00
dependabot[bot]
efcd1a072d
build(deps): bump ouroboros from 0.15.4 to 0.15.5
...
Bumps [ouroboros](https://github.com/joshua-maros/ouroboros ) from 0.15.4 to 0.15.5.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases )
- [Commits](https://github.com/joshua-maros/ouroboros/commits )
---
updated-dependencies:
- dependency-name: ouroboros
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 06:46:19 +00:00
dependabot[bot]
39d9fa31f6
build(deps): bump selinux from 0.2.7 to 0.3.0
...
Bumps [selinux](https://github.com/koutheir/selinux ) from 0.2.7 to 0.3.0.
- [Release notes](https://github.com/koutheir/selinux/releases )
- [Changelog](https://github.com/koutheir/selinux/blob/master/CHANGELOG.md )
- [Commits](https://github.com/koutheir/selinux/commits )
---
updated-dependencies:
- dependency-name: selinux
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 06:46:06 +00:00
Sylvestre Ledru
a857002def
Merge pull request #3949 from niyaznigmatullin/cp-i_gnu_test
...
cp: fix `cp-i` GNU test
2022-09-18 22:06:12 +02:00
jfinkels
86b012d3be
dd: handle stdout redirected to seekable file ( #3880 )
...
* dd: move argument parsing outside of Input, Output
Move the argument parsing code out of the `Input::new()` and
`Output::new()` functions and into the calling code. This allows the
calling code to make decisions about how to instantiate the `Input`
and `Output` objects if necessary.
* dd: handle stdout redirected to seekable file
Fix a bug in `dd` where null bytes would be unintentionally written if
stdout were redirected to a seekable file. For example, before this
commit, if `dd` were invoked from the command-line as
dd if=infile bs=1 count=10 seek=5 > /dev/sda1
then five zeros would be written to `/dev/sda1` before copying ten
bytes of `infile` to `/dev/sda1`. After this commit, `dd` will
correctly seek five bytes forward in `/dev/sda1` before copying the
ten bytes of `infile`.
Fixes #3542 .
2022-09-18 21:53:01 +02:00
Terts Diepraam
8c839888e1
Merge pull request #3905 from Joining7943/refactor-tail
...
Refactor tail
2022-09-17 20:39:53 +02:00
Terts Diepraam
513e61f434
Merge pull request #3923 from snapdgn/main
...
refactor: `stat` declarative macros to functions
2022-09-17 20:36:47 +02:00
Niyaz Nigmatullin
2ce999c959
cp: fix cp-i
GNU test
...
`cp` in interactive mode used to write to stdout asking for
overwrite. GNU version writes to stderr.
Changed: write to stderr to make compatible with GNU.
2022-09-17 19:15:52 +03:00
Niyaz Nigmatullin
edca926406
factor: enable union
feature for smallvec
2022-09-17 13:20:50 +02:00
Niyaz Nigmatullin
774f498aa8
chore(deps): Bump terminal_size + cargo update
2022-09-17 01:08:41 +03:00
dependabot[bot]
05b7183112
build(deps): bump digest from 0.10.3 to 0.10.5
...
Bumps [digest](https://github.com/RustCrypto/traits ) from 0.10.3 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/traits/releases )
- [Commits](https://github.com/RustCrypto/traits/compare/digest-v0.10.3...digest-v0.10.5 )
---
updated-dependencies:
- dependency-name: digest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-16 06:34:05 +00:00
snapdgn
f7601c022e
updated documentation
2022-09-14 10:51:03 +05:30
Jeffrey Finkelstein
61345cbdc9
mktemp: respect TMPDIR environment variable
...
Change `mktemp` so that it respects the value of the `TMPDIR`
environment variable if no directory is otherwise specified in its
arguments. For example, before this commit
$ TMPDIR=. mktemp
/tmp/tmp.WDJ66MaS1T
After this commit,
$ TMPDIR=. mktemp
./tmp.h96VZBhv8P
This matches the behavior of GNU `mktemp`.
2022-09-13 19:38:25 -04:00
Joining7943
951c51e740
tail: large refactoring and cleanup of the tail code base. See also #3905 for details
2022-09-13 22:54:36 +02:00
Sylvestre Ledru
78a9f6edf8
Merge pull request #3908 from tertsdiepraam/chroot-err-codes
...
`chroot`: set exit codes to 125, 126 or 127 for errors from chroot itself
2022-09-12 22:43:12 +02:00
Sylvestre Ledru
1ed281fce9
Merge pull request #3921 from niyaznigmatullin/ls_exit_code_2_some_cases
...
ls: exit code 2 when `IOError` happened for argument
2022-09-12 22:20:08 +02:00
Niyaz Nigmatullin
4e0b238748
ls: add command_line bool to error for exit code 2
2022-09-12 19:47:16 +03:00
snapdgn
b723be4fe2
reposition functions
2022-09-12 19:56:02 +05:30
snapdgn
d8226bf658
add: documentation to refactored macros->functions
2022-09-12 18:35:30 +05:30
snapdgn
243546ce96
fix: style/spelling
2022-09-12 12:19:56 +05:30
snapdgn
39e352e2af
fix: failing test cases & some refactoring
2022-09-12 12:04:43 +05:30
dependabot[bot]
bf7e5a6ec0
build(deps): bump onig from 6.3.2 to 6.4.0
...
Bumps [onig](https://github.com/iwillspeak/rust-onig ) from 6.3.2 to 6.4.0.
- [Release notes](https://github.com/iwillspeak/rust-onig/releases )
- [Changelog](https://github.com/rust-onig/rust-onig/blob/main/CHANGELOG.md )
- [Commits](https://github.com/iwillspeak/rust-onig/compare/v6.3.2...v6.4.0 )
---
updated-dependencies:
- dependency-name: onig
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-11 20:08:28 +02:00
Sylvestre Ledru
4280c2a8a1
Merge pull request #3913 from uutils/dependabot/cargo/notify-5.0.0
...
build(deps): bump notify from 5.0.0-pre.16 to 5.0.0
2022-09-11 20:06:19 +02:00
snapdgn
26301d05f6
refactor: declarative macros to rust
2022-09-11 15:36:18 +05:30
Terts Diepraam
51bd8a2ba8
chroot: set exit codes to 125, 126 or 127 for errors from chroot itself
2022-09-11 12:02:54 +02:00
Terts Diepraam
975a1d170d
change remaining usage codes of 2 to 1 for GNU compat
2022-09-10 20:24:24 +02:00
dependabot[bot]
d02ee4b1eb
build(deps): bump notify from 5.0.0-pre.16 to 5.0.0
...
Bumps [notify](https://github.com/notify-rs/notify ) from 5.0.0-pre.16 to 5.0.0.
- [Release notes](https://github.com/notify-rs/notify/releases )
- [Changelog](https://github.com/notify-rs/notify/blob/main/CHANGELOG.md )
- [Commits](https://github.com/notify-rs/notify/compare/notify-5.0.0-pre.16...notify-5.0.0 )
---
updated-dependencies:
- dependency-name: notify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-10 07:56:32 +00:00
Niyaz Nigmatullin
999db68042
pr: migrate from chrono
crate to time
...
It seems that `chrono` is the reason of deadlock or UB in android
CI. Also `chrono` had some security issues and wasn't maintained for
two years until March 2022, so other unstabilities can happen. Plus
`chrono` uses old `time` dependency.
2022-09-09 21:59:08 +03:00
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
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
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