Commit graph

9224 commits

Author SHA1 Message Date
Sylvestre Ledru
8db51b0167
Extend the stale bot to 3 years 2023-01-30 08:51:28 +01:00
Sylvestre Ledru
efc70ade68
Merge pull request #4260 from sbentmar/expand-fix-perl-failures
expand: improve plus specifier handling
2023-01-28 18:15:08 +01:00
Sylvestre Ledru
d8c3205d4c
Merge pull request #4300 from cakebaker/comm_total
comm: implement --total
2023-01-28 18:14:17 +01:00
Sylvestre Ledru
c496d0836f
Merge pull request #4307 from Joining7943/tail-disable-intermittent-test
`tests/tail`: Disable `test_follow_with_pid` on freebsd
2023-01-28 18:13:38 +01:00
Joining7943
c809bb3888 tests/tail: Disable test_follow_with_pid on freebsd because of intermittent failures in the ci 2023-01-28 13:02:33 +01:00
Sylvestre Ledru
a75cfd9655
Merge pull request #4171 from uutils/dependabot/cargo/blake3-1.3.2
build(deps): bump blake3 from 1.3.1 to 1.3.2
2023-01-28 01:16:04 +01:00
Sylvestre Ledru
26771a81d5
Merge pull request #4180 from uutils/dependabot/cargo/gcd-2.2.0
build(deps): bump gcd from 2.1.0 to 2.2.0
2023-01-28 01:15:53 +01:00
dependabot[bot]
423ff9fe8b build(deps): bump gcd from 2.1.0 to 2.2.0
Bumps [gcd](https://github.com/frewsxcv/rust-gcd) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/frewsxcv/rust-gcd/releases)
- [Commits](https://github.com/frewsxcv/rust-gcd/compare/2.1.0...2.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-27 21:10:27 +01:00
Sylvestre Ledru
13fac01d31
Merge branch 'main' into dependabot/cargo/blake3-1.3.2 2023-01-27 21:10:06 +01:00
Sebastian Bentmar Holgersson
999957791a expand: minor simplification of mode logic 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
1bf723fe40 expand: fix formatting issues and cleanup 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
69d8729598 expand: replace while loop with constant time algorithm 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
ddc6fabca0 expand: all perl tests passing 2023-01-27 21:08:16 +01:00
Sebastian Bentmar Holgersson
cbab8677e6 expand: improve handing of + 2023-01-27 21:08:16 +01:00
TechHara
3ad36a49cb
cut: refactor (#4255)
refactors `cut field` logic to reduce code duplication by factoring out the common `Searcer`, which is _templatized_ on a specific `Matcher` -- `ExactMatcher` for an explicit delimiter and `WhitespaceMatcher` for white-space delimiter.

before
- code duplication in `Searcher` and `WhitespaceSearcher`
- code duplication in `cut_fields` and `cut_fields_whitespace`

after
- two versions of `Matcher`s
- one `Searcher`
- simplify `cut_fields` by delegating actual work to specific functions
2023-01-27 21:07:36 +01:00
Sylvestre Ledru
8c6d0e7630
Merge pull request #4303 from cakebaker/clippy
clippy: fix warnings introduced with Rust 1.67.0
2023-01-27 21:00:33 +01:00
Daniel Hofstetter
f6b646e4e5 clippy: fix warnings introduced with Rust 1.67.0 2023-01-27 17:37:56 +01:00
Terts Diepraam
fc7e51a4f8
Merge pull request #4261 from Joining7943/tests-util-enhance-cmdresult
`tests/util`: Implement enhancements of `CmdResult` #4259
2023-01-25 10:06:32 +01:00
Daniel Hofstetter
b06485990d comm: implement --total 2023-01-24 16:49:43 +01:00
Sylvestre Ledru
dce8a021da
Merge pull request #4299 from Joining7943/fix-4298-build-fails-on-s390x-and-risc64
`uucore`: Fix #4298: Fails to build on s390x (and riscv64)
2023-01-24 11:47:20 +01:00
Joining7943
9796e70a28 uucore: Fix #4298: Build on s390x and riscv64 architectures fails 2023-01-23 21:13:59 +01:00
Terts Diepraam
8c35465e03
Merge pull request #4265 from sylvestre/add_test_test
test: add a test matching what busybox is doing
2023-01-22 23:42:54 +01:00
Sylvestre Ledru
2df4aaccd9
Merge pull request #4263 from cakebaker/od_cleanup_format_strings
od: remove "width = width" from format strings
2023-01-22 21:32:59 +01:00
Sylvestre Ledru
c996dc8bac
Merge pull request #4292 from rivy/maint.cicd
CICD maintainence
2023-01-22 20:57:55 +01:00
Sylvestre Ledru
6f95f0953b
Merge pull request #4271 from eds-collabora/eds/nice
Support legacy argument syntax for nice
2023-01-22 20:57:08 +01:00
Joining7943
78a381032b tests/util: Improve assertion messages of CmdResult::stderr_is_bytes, stdout_is_bytes 2023-01-22 14:56:19 +01:00
Joining7943
1fadeb43b2 tests/util: Do not trim stderr in CmdResult::stderr_is. Add method stderr_trimmed_is.
Fix tests assert whitespace instead of trimming it. Disable some tests in `test_tr` because `tr`
produces too many newlines.
2023-01-22 14:56:19 +01:00
Joining7943
7c0ed0340b tests/util: Add stdout_check, stdout_str_check ... to CmdResult to run arbitrary assertions 2023-01-22 14:56:19 +01:00
Joining7943
c2ad54fe09 tests/util: Add methods in CmdResult to assert the received signal on unix systems
Add tests for these signal methods. Include `signals` feature in Cargo.toml uucore dev-dependencies.
2023-01-22 14:56:19 +01:00
Joining7943
19db042022 tests/util: Use ExitStatus instead of code, success in CmdResult. Rewrite tests for CmdResult 2023-01-22 14:48:23 +01:00
Joining7943
37e06edadc tests/util: Introduce CmdResult::stdout_str_apply ... to preprocess stdout, stderr before asserting 2023-01-22 14:48:23 +01:00
Roy Ivy III
9b440dfab6 maint/CICD ~ refactor var names 2023-01-21 23:39:05 -06:00
Roy Ivy III
f4086f237f maint/CICD ~ re-label bash script steps for easier review 2023-01-21 23:39:05 -06:00
Roy Ivy III
6f5f3736ce docs ~ update spell-checker exceptions 2023-01-21 23:39:05 -06:00
Roy Ivy III
f0ce605f4b maint/CICD ~ improve/update outputs() function 2023-01-21 23:39:05 -06:00
Roy Ivy III
0b4ef62eed maint/CICD ~ refactor to standard use of outputs() 2023-01-21 23:39:05 -06:00
Roy Ivy III
80a9eaf8ab maint/CICD ~ normalize to use expanded 10 digit SHAs 2023-01-21 23:39:05 -06:00
Roy Ivy III
3977ef608e
Merge pull request #4287 from tertsdiepraam/fix-publish-script
util: fix publish order of uucore_procs and uucore
2023-01-21 23:37:52 -06:00
Roy Ivy III
ea3c83e273
Merge pull request #4290 from sylvestre/platform-info
uname: use the same version of platform-info as arch
2023-01-21 20:40:36 -06:00
Sylvestre Ledru
f30124e497 uname: use the same version of platform-info as arch 2023-01-21 23:24:53 +01:00
Terts Diepraam
a9f1743ba6 util: fix publish order of uucore_procs and uucore 2023-01-21 13:00:49 +01:00
Terts Diepraam
7e127005af
Merge pull request #4284 from tertsdiepraam/version-0.0.17
Version 0.0.17
2023-01-21 12:11:22 +01:00
Terts Diepraam
4d3dc78686 Version 0.0.17 2023-01-21 10:38:18 +01:00
Emil Suleymanov
50c1833c11
cp: require preserve only certain attributes (#4099)
* cp: require preserve only certain attributes

# Conflicts:
#	src/uu/cp/src/copydir.rs
#	src/uu/cp/src/cp.rs

* tests/cp: preserve all and preserve xattr tests with todos

* tests/cp: rename preserve tests

* tests/cp: add android fail test for preserve=xattr

On Android, this cp with explicit preserve of xattr must fail, because of the limitations of the filesystem setup used on Android.

* cp: verify some metadata in cp preserve tests

# Conflicts:
#	tests/by-util/test_cp.rs

* cp: run test_cp_preserve_all in all OS's but only check metadata on linux

* test/cp: don't expect the mode to change in explicit cp preserve

* cp: attributes struct instead of enum for unified required tracking

* cp: refactor preserver and handle_preserve

# Conflicts:
#	src/uu/cp/src/cp.rs

* cp: update preserve attr to max

* test/cp: fix the preserve xattr test

Access timestamps appear to be modified only in this test. Running the command directly does not alter the access timestamp.

* cp/test: preserve all and context case

* cp: fix preserve args value source

* test/cp: don't check mtime on freebsd

* test/cp: don't check mtime on macos

* test/cp: fix freebsd deps

* test/cp: support freebsd tests

* cp: simplify try_set_from_string

* cp: parse context attr in preserve in any case to show warning later

* cp: print warnings for attribute errors if not required

* cp: show SELinux warning only once

* cp: show SELinux warning without error

* Revert "cp: show SELinux warning without error"

This reverts commit d130cf0d8c8e28ac2c903413992613241decf879.

* cp: add documentation for preserve components

* cp: simplify try_set_from_string

* cp: EN_US "behavior" spelling for cspell
2023-01-19 13:02:06 +01:00
Ed Smith
34e10f9aa8 nice: Remove use of show_warning
This is required to pass the GNU nice test suite. Failure to produce
the advisory message when unable to change the process priority must
be fatal, and without this commit our version of nice will exit, but
before the commit the exit code will be 101 (due to eprintln!
panicking), and it must be 125 to pass the test suite.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Ed Smith
07e7372311 nice: Permit --adjustment to be specified multiple times
This is tested by the GNU coreutils test suite, and the
correct behaviour is the last specification wins.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Ed Smith
8aa9f346ef Support legacy argument syntax for nice
This introduces an argument preprocessing step for the nice tool in
order to support the legacy nice adjustment syntax (`nice -1 foo`,
`nice --1 foo`, `nice -+1 foo` and so forth).

This is a preprocessing step because the interaction between these
arguments and the existing `nice -n -1` syntax becomes context
dependent, in a way that is currently difficult to capture through
clap.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Sylvestre Ledru
8c137f5d7c
Merge pull request #4278 from cakebaker/sum
sum: fix output when using BSD sum algo (-r)
2023-01-18 11:33:41 +01:00
Sylvestre Ledru
afbe850115
Merge pull request #4279 from rivy/up.uname
change/uname ~ update and revise
2023-01-18 11:33:29 +01:00
Sylvestre Ledru
f12202e39c
Merge pull request #4281 from cakebaker/default_trait_access
clippy: use type name instead of Default::default
2023-01-18 11:33:09 +01:00