Commit graph

386 commits

Author SHA1 Message Date
Jan Scheer
4dc6536bb9
Merge branch 'master' into ls_selinux 2021-09-13 13:42:51 +02:00
Jan Verbeek
b7d697753c unlink: Simplify, remove unsafe, move to core
This makes it no longer possible to pass multiple filenames, but every
other implementation I tried (GNU, busybox, FreeBSD, sbase) also
forbids that so I think it's for the best.
2021-09-10 21:50:38 +02:00
Jan Scheer
fe3645d4d5
ls: add support for showing SELinux context (--context/-Z) 2021-09-10 21:33:34 +02:00
Michael Debertol
8b74562820 cp: correctly copy mode, ownership, acl and context
Fix a mix-up between ownership and mode. The latter (mode / file permissions)
can also be set on windows (which however only affects the read-only flag),
while there doesn't seem to be a straight-forward way to change file ownership
on windows.

Copy the acl as well when copying the mode. This is a non-default feature and can be
enabled with --features feat_acl, because it doesn't seem to work on CI.
It is only available for unix so far.

Copy the SELinux context if possible.
2021-09-01 00:16:22 +02:00
Sylvestre Ledru
b0becf0054
Merge pull request #2410 from hbina/hbina-touch-add-as-common-build
Add touch as a common core utility
2021-08-28 12:39:20 +02:00
Koutheir Attouchi
7010dfd939 runcon: added implementation and tests. 2021-08-22 21:59:41 +02:00
Sylvestre Ledru
5089214832 bump a few crates to simplify Debian packaging (second) 2021-08-22 00:42:03 +02:00
Koutheir Attouchi
83a515e4c3 chcon: reduce the number of unsafe blocks. 2021-08-10 13:50:51 -04:00
Jeremy Soller
783dd1ae01
install: do not compile on redox 2021-08-06 14:17:40 -06:00
Sylvestre Ledru
50b9d9f9a3
Merge branch 'master' into master 2021-08-06 09:26:39 +02:00
Koutheir Attouchi
090be5bb94 chcon: added implementation and integration tests
The ToDo list was updated to mark `chcon` as done.

Building and testing `chcon` requires enabling the `feat_selinux` feature. If `make` is used for building, then please specify `SELINUX_ENABLED=1` if building and testing on a system where SELinux is not enabled.
2021-08-05 22:57:57 -04:00
Michael Debertol
b8c383e210 basenc: add utility
basenc is a brand-new gnu core utility (added less than 3 years ago!),
which enables some more encodings.
2021-08-06 00:07:19 +02:00
Tyler
601c9fc620 Merge branch 'master' of https://github.com/uutils/coreutils into uutils-master-2 2021-08-03 17:33:43 -07:00
Jan Scheer
8232c1c64d
id: increase MSRV in order to compile selinux crate
* Bump MSRV from 1.43 to 1.47 in order to be able to compile
`selinux` crate 0.1.3

* Bump MSRV for clippy to 1.47

* Add "selinuxlib" to spell-checker
2021-08-02 20:36:06 +02:00
Tyler
9d9267e08b Addresses code-quality issues from testsdiepraam and miDeb.
- Removes dd from feat_require_unix (keeps it in feat_common_core)
- Changes name of make_linux_iflags parameter from oflags to iflags.
- Removes roughed out SIGINFO impl.
- Renames plen -> target_len.
- Removes internal fn def for build_blocks and replaces with a call to
  chunks from std.
- Renames apply_ct to the more descriptive apply_conversion
- Replaces manual swap steps in perform_swab with call to swap from std.
- Replaces manual solution with chunks where appropriate (in Read, and Write impl).
- Renames xfer -> transfer (in local variable names).
- Improves documentation for dd_filout/dd_stdout issue.
- Removes commented debug_assert statements.
- Modifies ProdUpdate to contain ReadStat and WriteStat rather than
  copying their fields.
- Addresses verbose return in `Output<File>::new(...)`
- Resoves compiler warning when built as release when signal handler fails to
  register.
- Derives _Default_ trait on ReadStat.
- Adds comments for truncated lines in block unblock tests
- Removes `as u8` in block unblock tests.
- Removes unecessary `#[inline]`
- Delegates multiplier string parsing to uucore::parse_size.
- Renames 'unfailed' -> 'succeeded' for clairity.
- Removes #dead_code warnings. No clippy warnings on my local machine.
- Reworks signal handler to better accomodate platform-specific signals.
- Removes explicit references to "if" and "of" in dd.rs.
- Removes explicit references to "bs", "ibs", "cbs" and "status" in
  parseargs.rs.
- Removes `#[allow(deadcode)]` for OFlags, and IFlags.
- Removes spellchecker ignore from all dd files.
- Adds tests for 'traditional' and 'modern' CLI.
2021-07-21 17:25:10 -07:00
Jan Scheer
6111cd6e1b
id: add note about conditional compiling to README section 2021-07-13 14:38:46 +02:00
Jan Scheer
7abc6a665e
id: add conditional compilation for selinux 2021-07-13 00:22:10 +02:00
Tyler
c3f9557581 Adds dd to feat_common_core 2021-07-12 13:53:31 -07:00
Tyler
994b4d9a3e Merge remote-tracking branch 'upstream/master' 2021-07-12 10:22:20 -07:00
Jan Scheer
92bc647ac3
Merge branch 'master' into id_selinux_context 2021-07-12 17:30:21 +02:00
Sylvestre Ledru
1d8a66b7d3 Update to version 0.0.7 2021-07-11 18:04:56 +02:00
Tyler
1ad89c5e89 Addresses issues raised in PR#2474
- runs rustfmt on test_dd.rs
- eliminates compiler warnings
- adds many words to spellchecker ignore list
- adds sanity test for vexing conv=nocreat issue. Still WIP.
2021-07-06 11:52:48 -07:00
Jan Scheer
e53f4db33a Merge branch 'master' into id_selinux_context 2021-07-06 13:29:50 +02:00
backwaterred
9c38583c6b
Merge pull request #2 from uutils/master
catchup with uutils main
2021-07-02 11:34:22 -07:00
Tyler
92281585a7 Merge branch 'master' of https://github.com/uutils/coreutils into uutils-master 2021-07-01 14:33:30 -07:00
Michael Debertol
2ebca384c6 all utils: enable wrap_help
This makes clap wrap the help text according to the terminal width,
which improves readability for terminal widths < 120 chars,
because clap defaults to a width of 120 chars without this feature.
2021-06-27 16:17:10 +02:00
Michael Debertol
a9e79c72c7 uutils: enable shell completions
This adds a hidden `completion` subcommand to coreutils. When invoked with
`coreutils completion <utility> <shell>` a completion file will be printed
to stdout. When running `make install` those files will be created for all
utilities and copied to the appropriate locations.
`make install` will install completions for zsh, fish and bash; however,
clap also supports generating completions for powershell and elvish.

With this patch all utilities are required to have a publich uu_app function
that returns a clap::App in addition to the uumain function.
2021-06-25 21:23:45 +02:00
Jan Scheer
f1d317147b id: add support for showing SELinux context (--context/-Z) 2021-06-20 13:44:41 +02:00
Terts Diepraam
eaa93e9c27 numfmt: move to common core 2021-06-20 00:25:02 +02:00
Hanif Bin Ariffin
d1d57a41fe Add touch as a common core utility
Found out that touch wasn't compiled in what I assume in ordinary Ubuntu
Linux setup.

```
                          ./+o+-       hbina@komputa
                  yyyyy- -yyyyyy+      OS: Ubuntu 20.04 focal
               ://+//////-yyyyyyo      Kernel: x86_64 Linux 5.12.9-051209-generic
           .++ .:/++++++/-.+sss/`      Uptime: 1h 5m
         .:++o:  /++++++++/:--:/-      Packages: 2241
        o:+o+:++.`..```.-/oo+++++/     Shell: bash 5.0.17
       .:+o:+o/.          `+sssoo+/    Resolution: 1920x1080
  .++/+:+oo+o:`             /sssooo.   DE: GNOME 3.36.5
 /+++//+:`oo+o               /::--:.   WM: Mutter
 \+/+o+++`o++o               ++////.   WM Theme: Adwaita
  .++.o+++oo+:`             /dddhhh.   GTK Theme: Yaru [GTK2/3]
       .+.o+oo:.          `oddhhhh+    Icon Theme: ubuntu-mono-dark
        \+.++o+o``-````.:ohdhhhhh+     Font: Cantarell 11
         `:o+++ `ohhhhhhhhyo++os:      Disk: 142G / 475G (32%)
           .o:`.syhhhhhhh/.oo++o`      CPU: AMD Ryzen 7 4800U with Radeon Graphics @ 16x 1.8GHz
               /osyyyyyyo++ooo+++/     GPU: AMD/ATI
                   ````` +oo+++o\:     RAM: 9370MiB / 31584MiB
                          `oo++.

```

Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-06-13 08:15:52 +08:00
Terts Diepraam
be8e5f5f30 use the same spec for atty everywhere 2021-06-09 17:15:42 +02:00
Jan Scheer
26ad05cbb4 uucore: fix order of group IDs returned from entries::get_groups()
As discussed here: https://github.com/uutils/coreutils/pull/2361
the group IDs returned for GNU's 'group' and GNU's 'id --groups'
starts with the effective group ID.
This implements a wrapper for `entris::get_groups()` which mimics
GNU's behaviour.

* add tests for `id`
* add tests for `groups`
* fix `id --groups --real` to no longer ignore `--real`
2021-06-08 18:39:05 +02:00
Michael Debertol
e5c4681e04 tests: add the ability to set resource limits 2021-06-02 19:21:12 +02:00
Terts Diepraam
7690dc018f Merge branch 'master' into pr 2021-05-31 15:23:06 +02:00
Sylvestre Ledru
8c5dcd0765
Merge branch 'master' into implement-more 2021-05-31 10:17:15 +02:00
Terts Diepraam
bc1870c0a7 Merge branch 'master' into pr 2021-05-29 19:21:31 +02:00
Jan Scheer
fb812ff9d0 Cargo.toml: remove factor_benches in order to be able to run clippy
linting for all targets
2021-05-29 14:29:46 +02:00
Terts Diepraam
1c2540a613 Add atty to dev-deps for more tests 2021-05-28 21:07:38 +02:00
Sylvestre Ledru
222bd81190
Merge pull request #2291 from tertsdiepraam/remove-tempdir
Replace `tempdir` with `tempfile`
2021-05-28 10:45:19 +02:00
Terts Diepraam
ebe6341ae3 chore: replace tempdir with tempfile 2021-05-27 22:47:03 +02:00
Terts Diepraam
825476f573 Update tempfile 2021-05-27 20:25:24 +02:00
nicoo
00322b986b factor: Move benchmarks out-of-crate 2021-05-17 19:43:38 +02:00
Michael Debertol
2084c3ddf3 tests: show pretty diffs for assertion failures
- All assert_eq in tests/common/util.rs now print a pretty diff on test
failures.
- {stdout, stderr}_is_fixture now compare the expected output and the
fixture as Strings, which leads to more usable diffs.
2021-04-24 16:43:13 +02:00
Sylvestre Ledru
844e318a67
Merge branch 'master' into pr 2021-04-09 22:02:25 +02:00
Sylvestre Ledru
f37284129e new release 0.0.6 to address the cat issue 2021-04-03 16:06:58 +02:00
Sylvestre Ledru
ac031dffa4 new release 0.0.5 2021-04-03 10:30:07 +02:00
paulotten
090d29496a
Issue #1622 port du to windows (#1788)
* Issue #1622 port `du` to windows

* Attempt to support Rust 1.32

Old version was getting "attributes are not yet allowed on `if`
expressions" on Rust 1.32

* Less #[cfg]

* Less duplicate code.

I need the return and the semicolon after if otherwise the second #[cfg]
leads to unexpected token complilation error

* More accurate size on disk calculations for windows

* Expect the same output on windows as with WSL

* Better matches output from du on WSL

* In the absence of feedback I'm disabling these tests on Windows.
They require `ln`. Windows does not ship with this utility.

* Use the coreutils version of `ln` to test `du`

`fn ccmd` is courtesy of @Artoria2e5

* Look up inodes (file ids) on Windows

* One more #[cfg(windows)] to prevent unreachable statement warning on linux
2021-04-01 23:16:47 +02:00
Ricardo Iglesias
5f17719a59
Implemented --indicator-style flag on ls. (#1907)
* Implemented --indicator-style flag on ls.

* Rust fmt

* Grouped indicator_style args.

* Added tests for sockets and pipes.

Needed to modify util.rs to add support for pipes (aka FIFOs).

* Updated util.rs to remove FIFO operations on Windows

* Fixed slight error in specifying (not(windows))

* Fixed style violations and added indicator_style test for non-unix systems
2021-03-29 13:10:13 +02:00
Antonio Gurgel
35675fdfe7
install: implement -C / --compare (#1811)
* install: implement `-C` / `--compare`

GNU coreutils [1] checks the following: whether
- either file is nonexistent,
- there's a sticky bit or set[ug]id bit in play,
- either file isn't a regular file,
- the sizes of both files mismatch,
- the destination file's owner differs from intended, or
- the contents of both files mismatch.

[1] https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/install.c?h=v8.32#n174

* Add test: non-regular files

* Forgot a #[test]

* Give up on non-regular file test

* `cargo fmt` install.rs
2021-03-27 09:18:47 +01:00
Max Semenik
62fe68850e pr: Fixes after rebasing
Only the minimum needed to:
* Make everything compile without warnings
* Move files according to the new project structure
* Make tests pass
2021-03-26 17:57:19 +03:00
tilakpatidar
2d58ea5f8b pr: print 56 lines of content with 5 blank trailer and header lines 2021-03-26 14:11:14 +03:00
Sylvestre Ledru
f431f58dd8
Bump min rustc to 1.40 (#1909) 2021-03-25 15:28:47 -07:00
Neculai Balaban
c6927d97c8
cp: add support for -x/--one-file-system (#1840) 2021-03-19 21:15:35 +01:00
ty
af6bf3a224 Begins work on dd
- Prototype code.
- Adds project boilerplate for integration with coreutils framework.
2021-03-16 14:32:55 -07:00
Sylvestre Ledru
6ad8528b99 update of the uucore dep to 0.0.7 2021-03-07 11:29:38 +01:00
Sylvestre Ledru
6481c5a247 Prepare version 0.0.4 2021-03-07 11:29:38 +01:00
Sylvestre Ledru
72e090cd83 cargo: remove an old comment 2021-03-07 11:02:46 +01:00
Sylvestre Ledru
262b508b89 update the dep to uucore 0.0.6 2021-02-01 23:55:43 +01:00
Sylvestre Ledru
dc53b9bbf3 Also pin thread_local to version 1.1.0 2021-02-01 23:32:55 +01:00
Sylvestre Ledru
a807fc623a Update to version 0.0.3 2021-01-22 09:40:38 +01:00
Sylvestre Ledru
e331186fee
unbreak build with rustc 1.32: force tempfile 3.1.0 (#1695) 2021-01-19 08:15:53 +01:00
Sylvestre Ledru
b8e886ad1a bump the minimal version of uucore & uucore_procs 2021-01-10 18:27:20 +01:00
Sylvestre Ledru
d9ae043a05
update of the version 0.0.1 => 0.0.2 (#1686) 2021-01-10 18:16:04 +01:00
Sylvestre Ledru
138e407071
pin byteorder, version 1.4 fails with Rust 1.32 (#1684) 2021-01-09 20:51:18 +01:00
Stéphane Campinas
89bf7a726e csplit: refresh of the previous PR 2020-12-28 17:21:29 +01:00
Sylvestre Ledru
91559698d0 Merge branch 'master' into merge.uucore 2020-11-15 10:05:52 -06:00
Sylvestre Ledru
1b9267644c pin cc version. 1.0.62 fails with rust 1.32 2020-11-09 09:53:17 +01:00
Roy Ivy III
f30a0e3560 maint/deps ~ pin 'cc' crate (avoids forced MinSRV update) 2020-11-08 20:26:46 -06:00
Roy Ivy III
6539b8c6b9 maint/deps ~ change version specification for dependencies between sub-packages
- refactor internal version specifications to be ">=M.m.p" (where M.m.p is *already published*)

## [why]

Loosening internal version dependencies decreases the coupling between packages such
that packages can be published in a looser order. It allows the packages to be version
updated and published in tandem (ie, by using `cargo workspace ...`). Once published,
the internal versions can then be updated (again, to an *already published* package
version), as needed.
2020-11-08 20:26:46 -06:00
Roy Ivy III
c17307c757 fix ~ update workspace pointers to 'uucore' and 'uucore_procs' 2020-11-08 20:26:46 -06:00
Roy Ivy III
94e240a2fc tests/factor ~ refactor for readability + improve DRY 2020-10-26 15:06:29 -05:00
Roy Ivy III
c5296f00d0 tests/factor ~ test first 100000 integers for expected results 2020-10-26 15:06:29 -05:00
Roy Ivy III
2615abe9cc tests/factor ~ update RNG usage and variable reports to ease debugging 2020-10-26 15:06:28 -05:00
Roy Ivy III
79b054b016 update deps ~ Cargo.lock 2020-10-14 14:44:07 -05:00
Roy Ivy III
2c4af65dc5 deps ~ update uucore dependency (use 'canary' everywhere for CI testing) 2020-06-13 13:40:19 -05:00
Sylvestre Ledru
ac34d136f2 refactor(global): Move from tempdir to tempfile:
* the crate has been deprecated
2020-06-09 11:30:19 +02:00
Sylvestre Ledru
5926315507 bump the minimal version of rustc to 1.32 2020-06-08 22:54:28 +02:00
Sylvestre Ledru
78c04a254e refactor ~ rename MinSRV => MinRustV 2020-06-02 12:23:48 -05:00
Roy Ivy III
27f794bcab maint/build ~ remove unneeded specialized test configuration from Cargo.toml 2020-06-02 12:17:30 -05:00
Roy Ivy III
bf8353cce0 docs ~ update coreutils description based on PR feedback 2020-06-01 17:24:19 -05:00
Roy Ivy III
508b1547be 0.0.1.1 2020-05-31 15:48:54 -05:00
Roy Ivy III
66a021d737 maint/deps ~ refactor/rename pinned dependencies (use 'pin_' prefix) to satisfy crates.io requirements 2020-05-31 15:48:54 -05:00
Roy Ivy III
8a44e563a4 docs ~ reduce crate meta-information keywords to the maximum of five 2020-05-31 15:48:54 -05:00
Roy Ivy III
717c783a21 deps ~ update to uucore/uucore_procs v0.0.4 2020-05-29 22:59:48 -05:00
Roy Ivy III
9f585f5426 docs ~ improve/update crate meta information 2020-05-29 22:59:47 -05:00
Roy Ivy III
d70db1f7d2 docs ~ improve/update sub-crate meta information 2020-05-29 22:59:47 -05:00
Roy Ivy III
45a1609a38 update held/pinned dependencies (to maintain MinSRV v1.31.0) 2020-05-29 22:59:47 -05:00
Roy Ivy III
52ae491fcd change ~ rename base binary to 'coreutils' 2020-05-29 22:59:47 -05:00
Roy Ivy III
785bac49b8 docs ~ comment polish (Cargo.toml) 2020-05-29 22:59:46 -05:00
Roy Ivy III
f051f62445 change ~ add work-around for crate name collisions
- imported crate name collisions bypass implemented

## [why]

There may be some core or external crates required/used by this project that collide with
uutil names. For example, the `test` util collides with the rust core crate 'test' which
is used behind the scenes for testing. Without the renaming scheme used here, cryptic and
fatal compiler errors occur when compiling the integration tests.
2020-05-29 22:59:46 -05:00
Roy Ivy III
db2e950918 change ~ make all sub-crates independent 2020-05-29 22:59:40 -05:00
Roy Ivy III
3291f9d4db deps ~ update uucore dependency (removing patch configuration) 2020-05-29 22:59:33 -05:00
Roy Ivy III
6606408ce9 refactor/polish ~ whitespace normalization (consistent indentation [either tabs *or* spaces], EOF EOLNs, no trailing whitespace) 2020-05-24 17:29:07 -05:00
Roy Ivy III
3877cf4bd3 maint/deps ~ pin unstable 'textwrap' crate (marked for later review)
## [why]

'textwrap' is currently unstable, with "term_size" being an undocumented, but required,
feature. The feature name has already changed within the repository 'master' branch.
But that branch has never been pushed to a new version.

Pin for now with "!maint" mark and comment.
2020-05-24 17:29:07 -05:00
Roy Ivy III
8263d31fbb change ~ improve help display for main multi-call binary 2020-05-24 17:29:07 -05:00
Roy Ivy III
bebf36bffb change/uutils ~ allow (almost) any name for the multi-binary container
- final multi-binary will now function correctly with any binary/executable name
- multi-binary container acts as the specified util IF EITHER ...
  1. the binary/executable name exactly matches the name of an applet/util
  2. the binary/exectuable name matches <PREFIX><UTIL_NAME> pattern
     * where the PREFIX is any string ending in a non-alphanumeric character
2020-05-24 17:29:07 -05:00
Roy Ivy III
100fc8d1e0 maint/deps ~ improve dependency reference for the 'rust-users' external crate 2020-05-24 17:29:07 -05:00
Roy Ivy III
6880938955 maint/deps ~ refactor/rename pinned 'backtrace' with leading '_' to show lack of local use 2020-05-24 17:29:06 -05:00
Sylvestre Ledru
6e8c901204 fix: typo fixes found by codespell 2020-05-01 23:36:33 +02:00
Sylvestre Ledru
d5228b5a64 feat(df) add 'df' uutil 2020-04-28 13:05:55 -05:00
Roy Ivy III
f4c4d0e635 maint/build ~ feature reorganization and polish
.## [why]

Reorganizing and minor renaming of features within *Cargo.toml* will hopefully
help to place new utilities into the best feature set, encouraging the
"universal" / cross-platform aspect of the project.

"feat_require_..." sets are used to segregate utilities with restrictions limiting
cross-platform availability and are annotated with the reasons for the limitations.
2020-04-23 14:49:22 -05:00
Sylvestre Ledru
c756ca6f06 maint/dev ~ relax the dev-dependencies 2020-04-19 00:06:33 +02:00
Sylvestre Ledru
fed240d817 Use uucore from uutils 2020-04-15 00:01:21 +02:00
Roy Ivy III
6a284b1c91 change ~ fixup paths (within Cargo.toml) 2020-04-14 13:46:18 -05:00
Sylvestre Ledru
101a5fd9d1
remove comment 2020-04-13 22:11:29 +02:00
Sylvestre Ledru
104629c97b
Update Cargo.toml
Co-Authored-By: Roy Ivy III <rivy.dev@gmail.com>
2020-04-13 22:10:30 +02:00
Sylvestre Ledru
64e2a779a8
Update Cargo.toml
Co-Authored-By: Roy Ivy III <rivy.dev@gmail.com>
2020-04-13 22:10:20 +02:00
Sylvestre Ledru
d07ad40e8d Add some missing metadata 2020-04-13 20:03:26 +02:00
Roy Ivy III
6a18d7f7be update ~ (maint!) use fixed/patched uucore (v0.0.2); await upgrade upstream
- fixes musl (no-utmpx) build bug
- fixes failing windows real{link,path} tests
2020-04-12 22:39:55 -05:00
Roy Ivy III
ab9eb31156 maint/build ~ refactor dependencies into sorted order 2020-04-12 16:56:03 -05:00
Roy Ivy III
57ef582b46 maint/build ~ polish and comment 'features' 2020-04-12 16:56:03 -05:00
Roy Ivy III
e89421419d fix forced MinSRV increase (using locked 'backtrace' version)
- hotfix transitive bug in 'failure' forcing MinSRV increase to rust v1.33.0 by pinning 'backtrace' to <= 0.3.31

.# [why]

'failure' was using 'backtrace' `version = "0.3.3"`, which by semantic version
auto-upgrade was pulling in 'backtrace' > v0.3.30 (specifically, v0.3.40 most
recently). 'backtrace' v0.3.31 introduces use of `#[cfg(target_vendor = ...)]`
which requires rust v1.33.0. So, 'backtrace' is forcing an upgrade of MinSRV
to rust v1.33.0 with the change from backtrace v0.3.30 to backtrace v0.3.31.

Technically, by being less than v1.0.0, 'backtrace' has no semantic version
requirement. And there is debate about whether increasing MinSRV is a semantic
change. But, in my strong opinion, breaking our MinSRV statement is definitely
a semantic change.

* ref: <https://github.com/rust-lang/rust/blob/master/RELEASES.md>
2020-04-11 18:50:10 -05:00
Roy Ivy III
b7a3c4d8a8 maint/build ~ refactor feature strategy (allows simple cargo build on all platforms) and easier cross-targeted builds 2020-02-09 09:48:55 -06:00
Roy Ivy III
95809ae98e Add 'windows_legacy' feature to allow build for older windows versions 2020-01-27 21:33:47 -06:00
Xavier L'Heureux
63f3f78bda Update the dependencies for redox compilation 2019-09-28 09:29:22 -04:00
dependabot-preview[bot]
fa73fe1c64
build: bump libc from 0.2.56 to 0.2.58
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.56 to 0.2.58.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.56...0.2.58)
2019-06-03 13:29:25 +00:00
dependabot-preview[bot]
61a4846755
build: bump libc from 0.2.54 to 0.2.56
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.54 to 0.2.56.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.54...0.2.56)
2019-05-31 12:31:02 +00:00
Alex Lyon
b73a664677 Split off uucore into its own repository 2019-05-12 22:42:20 -07:00
Alex Lyon
b6cd8deb6f Switch users back to our rust-users fork to fix the build 2019-05-01 22:18:51 -07:00
Alex Lyon
db35eab23b Remove git dependencies 2019-05-01 21:14:39 -07:00
Alex Lyon
63f1537838 Add windows feature and make unix imply generic 2019-05-01 21:14:25 -07:00
dependabot[bot]
08ec78b634
build: bump libc from 0.2.51 to 0.2.53
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.51 to 0.2.53.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.51...0.2.53)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-29 21:06:56 +00:00
dependabot[bot]
2d55e5ca85
build: bump filetime from 0.2.4 to 0.2.5
Bumps [filetime](https://github.com/alexcrichton/filetime) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/alexcrichton/filetime/releases)
- [Commits](https://github.com/alexcrichton/filetime/compare/0.2.4...0.2.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-24 07:26:10 +00:00
dependabot[bot]
32325da059
Bump rand from 0.5.5 to 0.6.5
Bumps [rand](https://github.com/rust-random/rand) from 0.5.5 to 0.6.5.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.5.5...0.6.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-23 17:39:22 +00:00
Alex Lyon
be91d50361
Merge pull request #1343 from uutils/dependabot/cargo/lazy_static-1.3.0
Bump lazy_static from 1.2.0 to 1.3.0
2019-04-23 10:37:18 -07:00
Alex Lyon
cefbe6c1f2
Merge pull request #1319 from rivy/fix.touch
fix ~ touch: fix and test for windows
2019-04-08 15:16:26 -07:00
Roy Ivy III
44af40797c touch: fix ~ recategorize 'touch' from 'fuchsia' (ie, unix) to 'generic' 2019-04-07 09:14:46 -05:00
dependabot[bot]
9fc716d1b8
Bump lazy_static from 1.2.0 to 1.3.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.2.0...1.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-06 01:59:58 +00:00
dependabot[bot]
b018cc45de
Bump libc from 0.2.42 to 0.2.51
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.42 to 0.2.51.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.42...0.2.51)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-29 07:30:02 +00:00
Alex Lyon
1dc7d8cb91
Merge pull request #1328 from uutils/dependabot/cargo/time-0.1.42
Bump time from 0.1.40 to 0.1.42
2019-02-08 11:31:07 -08:00
dependabot[bot]
31084f12c7
Bump time from 0.1.40 to 0.1.42
Bumps [time](https://github.com/rust-lang/time) from 0.1.40 to 0.1.42.
- [Release notes](https://github.com/rust-lang/time/releases)
- [Commits](https://github.com/rust-lang/time/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-08 08:45:35 +00:00
dependabot[bot]
6d208d26c5
Bump lazy_static from 1.0.1 to 1.2.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.0.1 to 1.2.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.0.1...1.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-08 08:45:28 +00:00
Alex Lyon
30ef9662b3
Merge pull request #1333 from uutils/dependabot/cargo/filetime-0.2.4
build(deps): bump filetime from 0.2.1 to 0.2.4
2019-02-08 00:43:48 -08:00
dependabot[bot]
55c29c8a1d
build(deps): bump filetime from 0.2.1 to 0.2.4
Bumps [filetime](https://github.com/alexcrichton/filetime) from 0.2.1 to 0.2.4.
- [Release notes](https://github.com/alexcrichton/filetime/releases)
- [Commits](https://github.com/alexcrichton/filetime/compare/0.2.1...0.2.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-08 07:21:13 +00:00
dependabot[bot]
a8c6264023
Bump rand from 0.4.2 to 0.5.5
Bumps [rand](https://github.com/rust-lang-nursery/rand) from 0.4.2 to 0.5.5.
- [Release notes](https://github.com/rust-lang-nursery/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang-nursery/rand/compare/0.4.2...0.5.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-07 08:45:30 +00:00
Alex Lyon
2d26f800de
Merge pull request #1302 from uutils/dependabot/cargo/regex-1.0.3
Bump regex from 1.0.1 to 1.0.3
2019-02-07 00:42:19 -08:00
dependabot[bot]
c1480472a3
Bump regex from 1.0.1 to 1.0.3
Bumps [regex](https://github.com/rust-lang/regex) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.0.1...1.0.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-15 07:46:09 +00:00
Roy Ivy III
cb7a926e9a maint: turn off cargo autotests to silence warnings 2018-10-14 00:41:14 -05:00
dependabot[bot]
3e907e2a10
Bump regex from 1.0.0 to 1.0.1
Bumps [regex](https://github.com/rust-lang/regex) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.0.0...1.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-20 15:39:26 +00:00
dependabot[bot]
be615fb7df
Bump regex from 0.2.7 to 1.0.0
Bumps [regex](https://github.com/rust-lang/regex) from 0.2.7 to 1.0.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/0.2.7...1.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-15 07:24:38 +00:00
dependabot[bot]
4a4877264c
Bump time from 0.1.39 to 0.1.40
Bumps [time](https://github.com/rust-lang/time) from 0.1.39 to 0.1.40.
- [Release notes](https://github.com/rust-lang/time/releases)
- [Commits](https://github.com/rust-lang/time/compare/0.1.39...0.1.40)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-14 07:22:03 +00:00
dependabot[bot]
374fb4d4f1
Bump filetime from 0.1.15 to 0.2.1
Bumps [filetime](https://github.com/alexcrichton/filetime) from 0.1.15 to 0.2.1.
- [Release notes](https://github.com/alexcrichton/filetime/releases)
- [Commits](https://github.com/alexcrichton/filetime/compare/0.1.15...0.2.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-13 14:15:48 -07:00
dependabot[bot]
be6754b7a8
Bump tempdir from 0.3.6 to 0.3.7
Bumps [tempdir](https://github.com/rust-lang/tempdir) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/rust-lang/tempdir/releases)
- [Commits](https://github.com/rust-lang/tempdir/compare/v0.3.6...v0.3.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-12 16:41:14 +00:00
dependabot[bot]
9327f957bd
Bump rand from 0.3.22 to 0.4.2
Bumps [rand](https://github.com/rust-lang-nursery/rand) from 0.3.22 to 0.4.2.
- [Release notes](https://github.com/rust-lang-nursery/rand/releases)
- [Changelog](https://github.com/rust-lang-nursery/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang-nursery/rand/compare/0.3.22...0.4.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-12 07:26:39 +00:00
dependabot[bot]
c66dd59489
Bump libc from 0.2.39 to 0.2.42
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.39 to 0.2.42.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.39...0.2.42)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-11 17:13:54 +00:00
dependabot[bot]
7cbe0d4ceb
Bump unindent from 0.1.2 to 0.1.3
Bumps [unindent](https://github.com/dtolnay/indoc) from 0.1.2 to 0.1.3.
- [Release notes](https://github.com/dtolnay/indoc/releases)
- [Commits](https://github.com/dtolnay/indoc/compare/0.1.2...0.1.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-11 07:29:30 +00:00
dependabot[bot]
d1c18c01e9
Bump lazy_static from 1.0.0 to 1.0.1
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/commits/v1.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-08 07:30:48 +00:00
dependabot[bot]
5b5aaa03c9
Bump lazy_static from 0.2.11 to 1.0.0
Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 0.2.11 to 1.0.0.
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-07 07:25:48 +00:00
Ian Douglas Scott
fa867e93ea
Port 'tail' to Redox 2018-03-18 22:00:00 -07:00
Ian Douglas Scott
f76b23e3df
Port 'more' to Redox 2018-03-18 18:55:42 -07:00
Ian Douglas Scott
1532b207d2
Build chmod and install on Redox 2018-03-18 18:24:25 -07:00
Ian Douglas Scott
7d657e3c0d
Build shred on Redox 2018-03-16 18:47:35 -07:00
Ian Douglas Scott
301b9002ce
Port test to Redox 2018-03-16 18:39:53 -07:00
Ian Douglas Scott
6f4b91db93
Build hashsum, join, ln, ls, mkdir, mktemp, nl, ptx, sort on Redox 2018-03-14 22:10:28 -07:00
Ian Douglas Scott
1471e95b22
Make the 'cat' utility build on Redox 2018-03-14 10:21:12 -07:00
Alex Lyon
880a4973c1 Format everything using rustfmt 2018-03-12 01:20:58 -07:00
Alex Lyon
6330474b4f hostname: add support for Windows (and maybe other systems too) 2018-03-06 16:40:08 -08:00
Alex Lyon
15aaa8215e uucore: read from sys:uname on Redox 2018-03-05 17:31:33 -08:00
Alex Lyon
5d241da7ca arch: add support for building on Windows 2018-03-04 17:58:16 -08:00
Alex Lyon
293b16d281
Move rust-users fork under the uutils organization 2018-03-04 04:07:36 -08:00
Alex Lyon
d8e738c49b tests: disable some chgrp tests when part of the root group
Some tests failed when run using Docker because they assumed the
user would never be root.  This is more of a band-aid solution.
An actual fix would be to test see if something like these tests
were to succeed when the user is root.
2018-03-03 12:04:22 -08:00
Konstantin Pospelov
b33ce67d91 join: implement basic functionality
The basic implementation of join with some tests. The supported
options: -1, -2, -j, -a, -i.
2017-12-14 00:02:42 +03:00
Yury Krivopalov
b2ad51839b Add numfmt 2017-11-09 00:23:24 +03:00
Ian Douglas Scott
1a28a48ca3
Merge branch 'master' into expr-regex 2017-10-01 10:09:06 -07:00
Joshua Miller
e8073d2596 pin dependencies 2017-07-15 15:16:09 -05:00
Anthony Deschamps
41d1dfaf44 Partial implemantion of date. 2017-03-26 23:43:29 -04:00
Daan Hoogland
cd1f0690d7 create redox feature as subset of generic 2017-01-15 13:48:33 +01:00
Joshua Miller
133934f7cf add cat support for unix domain sockets
- adds conditional supports for unix domain sockets
   - adds unix domain socket test
   - adds Results to functions, removing unwraps
   - uutils `cat` used to panic on broken stdout pipes (e.g. `cat
     /dev/zero | head -c1`).  this is fixed in this PR
   - updated to exit 0 on success, and 1 if an error occurs.
   - adds docstrings
   - adds an error log on printing a directory
   - adds categorization of other filetypes for extensible
     differentiation of behaviors
   - adds OutputOptions struct to replace params for extensibility
   - adds correct status code on exit
2017-01-08 19:56:35 -06:00
Alexander Batischev
655804cff4 tests/chmod: protect umask with a mutex
`test_chmod_ugoa` and `test_chmod_many_options` both change umask, which
is global state. Since tests run concurrently, this might lead to
a situation where one of the tests changes umask to a value that screws
another test's checks. To prevent this, we introduce a mutex that should
be held by any test that changes umask.

Unfortunately, there's no way to hide umask behind this mutex and
enforce its usage: programmers will have to maintain the discipline
themselves.
2016-12-19 13:14:38 +03:00
Lei Zhang
e57f987190 All generic utilities compilable on Fuchsia now. 2016-12-14 23:29:40 -05:00
Lei Zhang
a34cd30f54 Enable compilation of ls on Fuchsia.
This updates the dependency of pretty-bytes to v0.2.
2016-12-14 23:29:38 -05:00
Lei Zhang
ba244794f0 Enable compilation of more on Fuchisa. 2016-12-08 13:08:17 -05:00
Lei Zhang
c2882da2e7 mktemp, nproc, ptx, and uniq compilable on Fuchsia now. 2016-11-30 10:50:47 -05:00
Lei Zhang
546f2855d5 Create a new feature for Fuchsia-enabled utilities. 2016-11-24 18:15:50 -05:00
Will Wykeham
b9ddb52630 Make Cargo.toml match the Makefile 2016-11-18 13:58:50 +00:00
Will Wykeham
2ad896a6ca Move 'mv' into generic now it builds properly on Windows 2016-11-18 13:58:49 +00:00
Wim Hueskes
a900b42a1f od: refactor: readability of expected output
use multiple lines in source too and use unindent crate to fix spacing
2016-09-01 00:00:52 +02:00
Martin Kysel
23bab3df69 moved more to unix utils, minor review updates 2016-08-23 11:40:09 +01:00
Martin Kysel
7d77b9720d Initial more implementation 2016-08-23 10:45:51 +01:00
Knight
8cba71adb4 chgrp: add entries 2016-08-21 17:04:02 +08:00
Knight
8c6cd72848 who: add entries 2016-08-11 00:19:26 +08:00
Knight
a23f1a13e7 Remove useless crates 2016-08-07 01:23:49 +08:00
Knight
7c5416799e base32: add entries 2016-08-06 11:45:03 +08:00
Knight
68631e555f Fix windows build 2016-07-29 20:49:08 +08:00
mpkh
da0de488e6 Merge pull request #913 from knight42/pinky
Implement pinky
2016-07-26 13:38:53 +04:00
Knight
50fcfac5d1 pinky: Add entries 2016-07-26 16:44:25 +08:00
Ben Eills
e72ec4a5bb Implement skeleton install utility
Add install utility skeleton source, based on
mv, including the getopts setup mirroring
GNU's `man install` documentation.  Also
add a single test and build system code.
2016-07-12 20:56:21 +02:00
mpkh
61cf4e4fba Merge pull request #906 from knight42/chown
Implement chown
2016-07-10 19:01:03 +04:00
Smigle00
35fec95d60 arch: add new utility
Signed-off-by: Smigle00 <smigle00@gmail.com>
2016-07-10 00:48:10 +05:30
Knight
69beb787d1 chown: Add entries 2016-06-22 21:36:50 +08:00
Knight
ab17a5e544 stat: Add entries 2016-06-04 13:33:08 +08:00
Joseph Crail
678a05d90f mktemp: add build for all systems 2016-05-22 22:54:39 -04:00
Heather
bdc1ca7426 Merge pull request #882 from jbcrail/fix-windows-build
Improve Windows build
2016-05-22 16:02:03 +04:00
ibabushkin
d504ae18c9 pathchk implemented (see #841) (#860)
* Added pathchk
2016-05-22 15:59:57 +04:00
Joseph Crail
7ef4bb37a8 tests: consolidate into one crate
The main motivation is to move toward running those tests for a specific
target, that is, if a test won't run on Windows, then we shouldn't build
it. This was previously the default behavior and prevented a successful
run on AppVeyor.

I borrowed this pattern from the tests in the Cargo project.
2016-05-22 03:46:54 -04:00
Heather
ca78706246 Merge pull request #875 from knight42/dircolors
Implement dircolors
2016-05-10 22:18:40 +04:00
Knight
c9f363d09c Add dircolors 2016-05-11 00:43:51 +08:00
Knight
79478626da add mknod 2016-05-07 15:21:37 +08:00
Jeremiah Peschka
9716862cfe Adding skeleton of ls 2016-03-25 14:00:27 -07:00
Michael Gehring
1183dcd7a1 travis: build/test everything on stable 2016-03-23 13:15:36 +01:00