1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00
Commit graph

15910 commits

Author SHA1 Message Date
Jeremy Smart
a752f73476
csplit: don't add a newline if the file doesn't end with one (#7901)
* csplit: don't add a newline if the file doesn't end with one

* refactor test

* refactor
2025-05-09 09:15:54 +02:00
Sylvestre Ledru
b778fa7baf gnu: fix the build with selinux 2025-05-07 23:02:45 +02:00
Sylvestre Ledru
fde3733bf5 selinux: improve the error display 2025-05-07 22:58:52 +02:00
Sylvestre Ledru
832dd495bf selinux: adjust more error messages 2025-05-07 22:58:46 +02:00
Sylvestre Ledru
2e34d94e17 selinux: upstream expects lower case 2025-05-07 22:58:39 +02:00
Daniel Hofstetter
bcc02e9cea
Merge pull request #7897 from aaron-ang/ptx-panic
ptx: use char count instead of byte index to handle utf-8 characters
2025-05-07 15:52:13 +02:00
Aaron Ang
1cfb19a936 ptx: use char count instead of byte index to handle utf-8 characters 2025-05-06 23:41:02 -07:00
Daniel Hofstetter
de32281235
Merge pull request #7893 from uutils/renovate/clap_complete-4.x-lockfile
chore(deps): update rust crate clap_complete to v4.5.50
2025-05-07 07:12:45 +02:00
Francisco Torres
42fd19cd77
README.md: fix typo (Gnu -> GNU) (#7896) 2025-05-07 07:04:33 +02:00
renovate[bot]
1a60c2c6c4
chore(deps): update rust crate clap_complete to v4.5.50 2025-05-06 19:09:04 +00:00
Daniel Hofstetter
26e175757d uptime: extract uptime_since fn 2025-05-06 17:05:12 +02:00
Daniel Hofstetter
c6b12cfb96 uptime: remove path arg under Windows 2025-05-06 16:47:52 +02:00
Daniel Hofstetter
b78f78bedf uptime: use clap to handle too many path args 2025-05-06 16:05:23 +02:00
Sylvestre Ledru
cd93931f82
Merge pull request #7891 from cakebaker/uptime_refactoring
uptime: some small refactorings
2025-05-06 11:48:04 +02:00
Daniel Hofstetter
157f653780 uptime: merge two imports 2025-05-06 10:58:55 +02:00
Daniel Hofstetter
876f941e8e uptime: add two empty lines 2025-05-06 10:56:56 +02:00
Daniel Hofstetter
f6d19fab79 uptime: use same code structure in two blocks 2025-05-06 10:55:09 +02:00
Daniel Hofstetter
52a2b664e2 uptime: don't return Result from print_nusers 2025-05-06 10:47:10 +02:00
Daniel Hofstetter
c981767af4
Merge pull request #7878 from sylvestre/selinux-cp
cp: improve the selinux support
2025-05-06 09:27:59 +02:00
Sylvestre Ledru
5148ba12d6 set_selinux_security_context: also display the error from the crate
+ fix comments from review
2025-05-06 08:52:27 +02:00
Sylvestre Ledru
b3a2b74ca1 cp/selinx: improve the support of --preserve-context and simplify the code.
+ Add test for the selinux changes with context SLASHLogin
Improves the coverage of tests/cp/cp-a-selinux.sh
2025-05-06 08:52:27 +02:00
SLASHLogin
74e72f527b cp: add -Z flag & add --context=[CTX] flag 2025-05-06 08:52:27 +02:00
Sylvestre Ledru
e7fdd3dfba selinux: add support in cp 2025-05-06 08:52:27 +02:00
Daniel Hofstetter
55411721a8
Merge pull request #7889 from uutils/renovate/clap_complete-4.x-lockfile
chore(deps): update rust crate clap_complete to v4.5.49
2025-05-06 07:14:57 +02:00
renovate[bot]
179362d431
chore(deps): update rust crate clap_complete to v4.5.49 2025-05-05 22:12:05 +00:00
Sylvestre Ledru
31e57502a3
Merge pull request #7888 from tdulcet/svg
Switched to SVG graphs
2025-05-05 19:53:35 +02:00
Teal Dulcet
4f32ebd266 Updated README and documentation to use SVG graphs. 2025-05-05 09:09:09 -07:00
Sylvestre Ledru
0d8362bc8d
Merge pull request #7887 from cakebaker/uptime_fix_typo_in_fn_name
uptime: fix typo (formated -> formatted)
2025-05-05 15:00:37 +02:00
Daniel Hofstetter
781a48b3a9 uptime: fix typo (formated -> formatted) 2025-05-05 14:47:57 +02:00
Alexander
7d5cfbc4b6
Merge pull request #7881 from alexs-sh/7736-control-flow-experiments
uucore/echo:handle ControlFlow result
2025-05-05 00:33:51 +02:00
cerdelen
13c0a813eb
Remove clap for echo (#7603)
* Parsing echo flags manually without clap as clap introduced various problematic interactions with hyphens

* fixed error where multiple flags would parse wrong

* Spelling & formatting fixes

* docu for EchoFlag struct

* more extensive comment/documentation

* revert POSIXLY_CORRECT check to only check if it is set

* Fixed problem of overwriting flags. Added test for same issue

* cargo fmt

* cspell

* Update src/uu/echo/src/echo.rs

Enabling POSIXLY_CORRECT flag if value is not UTF-8

Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>

---------

Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
2025-05-04 20:13:52 +02:00
Eduardo Rittner Coelho
99ca58a7ca
uucore: add safe wrapper for getpgrp() (#7676)
* uucore: add safe wrapper for getpgrp()

* add getpgrp to the spell ignore

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-05-04 20:13:13 +02:00
hz2
6d29b7b3c1
Tail macos stdin ran from script fix (#7844)
* fixes #7763

- introduce macOS-specific config guard
- added test for testing tail stdin when redirected (`>`) from file and
  when through a pipe (`|`)

* created test to mock behavior in #7763, with comments

added drop line

* re-enabled test_stdin_redirect_dir_when_target_os_is_macos, and added a check to handle error message

* added location of current directory so test env can find script

* adjusting to try to have FreeBSD find the file in CI test

* putting in /env instead of assuming bash

* removed ignore macro

* added comments explaining the need for specific macOS cases, including reference to rust-lang issue: https://github.com/rust-lang/rust/issues/95239
2025-05-04 18:33:09 +02:00
Daniel Hofstetter
fd29eb5fc1
Cargo.toml: remove exact version req for selinux (#7883) 2025-05-04 17:54:48 +02:00
Teemu Pätsi
4ee53acad0
expr: Fix parsing negated character classes "[^a]" (#7884)
* expr: Fix regex escape logic

We have to track if the previous character was already escaped to determine
if the '\' character should be interpreted as an escape character.

* expr: Fix parsing caret (^) as character class negation token

* expr: Add tests for parsing carets in regex

* expr: Add missing semicolon

* expr: Simplify boolean assignment

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-05-04 17:35:18 +02:00
Daniel Hofstetter
69d5cf40b1
Merge pull request #7877 from yuankunzhang/main
split: fix a racing condition that causes issue #7869
2025-05-04 14:39:09 +02:00
Daniel Hofstetter
15b6f40cfd
cp: use authors.workspace in Cargo.toml (#7882) 2025-05-04 13:20:48 +02:00
Daniel Hofstetter
8c4d69b2f6
Merge pull request #7845 from sylvestre/selinux-error
set_selinux_security_context should return an Error, not String
2025-05-04 12:45:53 +02:00
yuankunzhang
d412f582cb split: fix a racing condition that causes issue #7869 2025-05-04 16:49:03 +08:00
Piepmatz
c8dbd185c0
Allow compiling uucore with wasm32-unknown-unknown (#7840)
and fix the build
2025-05-04 09:41:51 +02:00
Teemu Pätsi
d3a2db415c
id: The --real flag should only affect -u, -g, and -G (#7796)
* id: The `--real` flag should only affect `-u`, `-g`, and `-U`

* id: Test output with different UID and EUID

* id: Simplify testing different UID and EUID

* id: Compile preload file for test using cc instead of gcc

* id: Remove test for different UID and EUID

The test is incompatible with some CI/CD targets.

This reverts the following commits:
- 8efcbf9adae59b7074d29b2ac8ff8a4083df7d95
- 208fa8e7f88f29214ef99984bf47c6a9ebc2ed0d
- a498a2722d7ab56ce96e7cab4766343930ea85ac
2025-05-04 09:38:34 +02:00
Daniel Hofstetter
5909315d1c
date: move file header to top; merge imports (#7857) 2025-05-04 09:36:21 +02:00
Daniel Hofstetter
cd3c921d1e
cp: copy dir if source path ends with dot (#7874) 2025-05-04 09:31:34 +02:00
Sylvestre Ledru
c177362a51 set_selinux_security_context: also display the error from the crate
+ fix comments from review
2025-05-03 23:16:43 +02:00
Dorian Péron
f49e120877
Merge pull request #7846 from frendsick/fix/expr-regex-option-singleline
expr: Fix regex anchor matching behavior with `REGEX_OPTION_SINGLELINE`
2025-05-02 13:35:10 +02:00
Daniel Hofstetter
ed0492a046 uptime: fix "unused import" warnings with musl 2025-05-02 09:09:57 +02:00
Daniel Hofstetter
64d308db0e install: use map_err instead of if let Err 2025-05-02 09:09:47 +02:00
Daniel Hofstetter
74d04c26f0 install: remove three todos 2025-05-02 09:09:47 +02:00
Zhang Wen
68c91c17ba
install: implement the --no-target-directory option (#7867)
* implement --no-target-directory option

* add test for --no-target-directory
2025-05-02 07:24:16 +02:00
Sylvestre Ledru
595f56a9e7 set_selinux_security_context: match GNU's error 2025-05-01 14:10:13 +02:00