Commit graph

7598 commits

Author SHA1 Message Date
Sylvestre Ledru
d4a9f0bec1
Merge pull request #3484 from cakebaker/remove_duplicate_word_in_docs
docs: remove duplicate "at", add missing newline
2022-05-05 14:46:00 +02:00
Daniel Hofstetter
24f78ddb9e docs: remove duplicate "at", add missing newline 2022-05-05 13:55:38 +02:00
Terts Diepraam
6e7abb3320
Merge pull request #3430 from cakebaker/human_readable
df: extract HumanReadable from BlockSize
2022-05-05 12:43:59 +02:00
Sylvestre Ledru
75ea1f1fc3
Merge pull request #3457 from tertsdiepraam/clap-exit-code
`clap` exit code
2022-05-05 11:44:24 +02:00
Daniel Hofstetter
46e029f34c df: refactor HumanReadable handling
The refactoring consists of three parts:
1) Introduction of SizeFormat & HumanReadable enums
2) Addition of a size_format field to the options struct
3) Movement of header logic from BlockSize to Header
2022-05-05 09:37:17 +02:00
Sylvestre Ledru
f6b9d36891
Merge pull request #3453 from turrisxyz/setup-permissions
chore: Set permissions for GitHub actions
2022-05-05 08:00:20 +02:00
Sylvestre Ledru
e06fe3c8f8
Merge pull request #3480 from cakebaker/set_min_width_for_used_column
df: set min width of "Used" column to 5
2022-05-05 07:59:45 +02:00
Sylvestre Ledru
84f24aed8f
Merge pull request #3476 from ackerleytng/main
du: use USimpleError instead of set_exit_code
2022-05-05 07:59:20 +02:00
Sylvestre Ledru
cbe39b4154
Merge pull request #3456 from cakebaker/ticket_3193
df: fix "Size" column header
2022-05-05 07:58:48 +02:00
Terts Diepraam
c7b7f19559 cp: use new clap error mechanism 2022-05-04 21:32:14 +02:00
Terts Diepraam
2409726258 base: set exit code to 1 for clap errors 2022-05-04 21:32:14 +02:00
Terts Diepraam
1bb85acc71 nice: set exit code for clap errors to 125 2022-05-04 21:32:14 +02:00
Terts Diepraam
8df253da69 cat: set exit code for invalid arguments to 1 instead of 2 2022-05-04 21:32:14 +02:00
Terts Diepraam
7b84261df4 uucore/error: add custom exit codes for clap errors
This allows us to use clap errors as UResult and specify the exit code for invalid arguments per util.
2022-05-04 21:32:04 +02:00
Ackerley Tng
88a62c4922 du: use common error methods with show! instead of set_exit_code 2022-05-04 07:33:19 -07:00
Daniel Hofstetter
9bd883169d df: set min width of "Used" column to 5 2022-05-04 09:37:09 +02:00
Sylvestre Ledru
a78f86a4f5
Merge pull request #3474 from uutils/dependabot/cargo/clap-3.1.15
build(deps): bump clap from 3.1.12 to 3.1.15
2022-05-04 08:10:46 +02:00
dependabot[bot]
a4e3f37aaf
build(deps): bump clap from 3.1.12 to 3.1.15
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.12 to 3.1.15.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.12...v3.1.15)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 21:30:25 +00:00
Sylvestre Ledru
7c090af0c1
Merge pull request #3459 from anastygnome/cp-fix
cp: Do not dereference symlink even when dangling - fix issue #3364
2022-05-03 23:26:28 +02:00
anastygnome
70c451fa61
Add test for copying dangling symlink copy with dereference
Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
2022-05-03 19:54:13 +02:00
anastygnome
badf947f8a
Do not dereference symlink even when dangling (fix #3364)
Fixes an issue with cp not copying symlinks in spite of the -P  (no dereference option)
Fix issue #3364

Performance improvements

Avoid useless read from metadata and reuse previous dest information

Signed-off-by: anastygnome <noreplygit@protonmail.com>
2022-05-03 19:53:23 +02:00
Terts Diepraam
6747e7261e
Merge pull request #3458 from cakebaker/handle_too_large_block_size_argument
df: show "block-size argument too large" error
2022-05-03 11:09:50 +02:00
Daniel Hofstetter
15412f100a df: show "block-size argument too large" error 2022-05-03 09:26:57 +02:00
Sylvestre Ledru
69f8543d8f
Merge pull request #3473 from uutils/dependabot/cargo/thiserror-1.0.31
build(deps): bump thiserror from 1.0.30 to 1.0.31
2022-05-02 21:04:04 +02:00
Sylvestre Ledru
8353b06526
Merge pull request #3472 from uutils/dependabot/cargo/memchr-2.5.0
build(deps): bump memchr from 2.4.1 to 2.5.0
2022-05-02 21:03:13 +02:00
Terts Diepraam
0322d4633e
Merge pull request #3061 from hbina/hbina-printf-default-left-justify-legth
printf: Default left-justify integer conversion to 1 width
2022-05-02 17:50:10 +02:00
Terts Diepraam
8178809286
Merge pull request #3464 from sylvestre/show-error-gnu
GNU CI: show the new error
2022-05-02 17:48:48 +02:00
Terts Diepraam
65ad47e95b
Merge pull request #3462 from uutils/gnu-skip
GNU testsuite: no need to rerun the GNU build
2022-05-02 17:47:31 +02:00
dependabot[bot]
1acbc0009e
build(deps): bump thiserror from 1.0.30 to 1.0.31
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.30 to 1.0.31.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.30...1.0.31)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 13:06:15 +00:00
Sylvestre Ledru
458f8c46a7
Merge pull request #3467 from uutils/dependabot/cargo/clap_complete-3.1.3
build(deps): bump clap_complete from 3.1.2 to 3.1.3
2022-05-02 15:04:04 +02:00
dependabot[bot]
a1e5f8e53f
build(deps): bump memchr from 2.4.1 to 2.5.0
Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/BurntSushi/memchr/releases)
- [Commits](https://github.com/BurntSushi/memchr/compare/2.4.1...2.5.0)

---
updated-dependencies:
- dependency-name: memchr
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 13:03:18 +00:00
Sylvestre Ledru
1c124fa6ed
Merge pull request #3468 from uutils/dependabot/cargo/libc-0.2.125
build(deps): bump libc from 0.2.124 to 0.2.125
2022-05-02 15:01:17 +02:00
Sylvestre Ledru
fe7829d2f9
Merge pull request #3455 from mike-kfed/ptx_breakfile
ptx: implement breakfile option
2022-05-02 08:39:14 +02:00
Sylvestre Ledru
e8aca59f92
Merge pull request #3465 from uutils/mktemp-respect-template
mktemp: respect path given in template argument
2022-05-02 08:37:54 +02:00
dependabot[bot]
de6aa6de9b
build(deps): bump libc from 0.2.124 to 0.2.125
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.124 to 0.2.125.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.124...0.2.125)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 06:36:41 +00:00
dependabot[bot]
0dc3eafaa4
build(deps): bump clap_complete from 3.1.2 to 3.1.3
Bumps [clap_complete](https://github.com/clap-rs/clap) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v3.1.2...clap_complete-v3.1.3)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 06:36:27 +00:00
Jeffrey Finkelstein
08816a4f05 fixup! mktemp: respect path given in template argument 2022-05-01 16:51:25 -04:00
Sylvestre Ledru
3078ca8346
Add CHARCLASS to the spell ignore 2022-05-01 20:18:33 +02:00
Hanif Ariffin
2e60dce11a printf: Default left-justify integer conversion to 1 width
When using left-justify with integer conversion (like `printf '%-o'`),
default the minimum width to 1.

Closes: https://github.com/uutils/coreutils/issues/3050

Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-05-01 20:00:09 +02:00
Sylvestre Ledru
0314f3ed8e GNU testsuite: no need to rerun the GNU build
At least, two use cases:
* when hacking on test update
* when we want to rebuild only Rust coreutils with the right option

Indeed, the GNU code should not cache often in this case
2022-05-01 19:04:52 +02:00
Jeffrey Finkelstein
aa6aefbd64 mktemp: respect path given in template argument
Fix a bug in `mktemp` where it was not respecting the path given by
the positional argument. Previously, it would place the temporary file
whose name is induced by a given template in the `/tmp` directory,
like this:

    $ mktemp XXX
    /tmp/LJr

    $ mktemp d/XXX
    /tmp/d/IhS

After this commit, it respects the directory given in the template
argument:

    $ mktemp XXX
    LJr

    $ mktemp d/XXX
    d/IhS

Fixes #3440.
2022-05-01 13:03:18 -04:00
Sylvestre Ledru
ae65dcc7d2 GNU CI: show the new error 2022-05-01 19:00:55 +02:00
Sylvestre Ledru
f869fafd03
Merge pull request #3460 from tertsdiepraam/fix-dir-vdir-tests
`dir`, `vdir`: fix incorrect regex in tests
2022-05-01 16:15:25 +02:00
Terts Diepraam
95ba8c45b2 dir, vdir: fix incorrect regex in tests 2022-05-01 13:48:51 +02:00
Michael Kefeder
83a64f4afe ptx: escape regular expression character class special chars 2022-04-30 10:01:11 +02:00
Daniel Hofstetter
023fc96aab df: fix "Size" column header
Fixes #3193
2022-04-30 07:33:00 +02:00
Michael Kefeder
4889128ede ptx: add documentation to read_char_filter_file function 2022-04-29 10:57:36 +02:00
Sylvestre Ledru
f03c069289
Merge pull request #3450 from uutils/dependabot/cargo/retain_mut-0.1.7
build(deps): bump retain_mut from 0.1.2 to 0.1.7
2022-04-29 10:50:45 +02:00
Michael Kefeder
994dedd6d9 tests/ptx: added breakfile option tests 2022-04-29 10:15:06 +02:00
naveen
adfe4b2289 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-04-29 01:01:27 +00:00