Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ jobs:
- { os: ubuntu-latest, features: "md5sum,sha1sum,sha224sum,sha256sum,sha384sum,sha512sum,cksum,openssl" }
# macOS: vendored only — system libcrypto needs OPENSSL_DIR
# pointing at Homebrew, which isn't worth wiring up for a smoke test.
# MinGW(UCRT): done at make.yml as actual consumer is MSYS2 only
# todo: check Windows (MinGW's system openssl)
steps:
- uses: actions/checkout@v7
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/GnuComment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:

runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
(github.event.workflow_run.conclusion == 'success' ||
github.event.workflow_run.conclusion == 'failure')
github.event.workflow_run.event == 'pull_request'
steps:
- name: 'Download artifact'
uses: actions/github-script@v9
Expand All @@ -36,10 +34,6 @@ jobs:
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "comment"
})[0];
if (!matchArtifact) {
core.info("No comment artifact found; skipping.");
return;
}
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,16 +311,15 @@ jobs:
# Upgrading it mid-session changes the shared memory layout (60344 -> 59320),
# which causes subsequent fork() calls to fail with EAGAIN (exit code 254).
shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail {0}'
# test Cygwin & MinGW(UCRT) instead of pre-installed Rust.
run: |
pacman -Sy --noconfirm --needed base-devel libopenssl make openssl-devel pkgconf rust \
mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-rust
pacman -Sy --noconfirm --needed base-devel libopenssl make openssl-devel pkgconf rust
env:
CHERE_INVOKING: 1
- name: "`(x86_64-pc-cygwin) make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n`"
shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail {0}'
run: |
set -x
export OPENSSL_NO_VENDOR=1
export CARGOFLAGS="--features openssl"
DESTDIR=/tmp/c make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
# Check that cksum is linked with openssl (e.g. msys-crypto-*.dll)
Expand All @@ -340,7 +339,6 @@ jobs:
bsdtar -caf x86_64-pc-cygwin.tar.zst -C /tmp/c/usr/local bin
env:
CHERE_INVOKING: 1
OPENSSL_NO_VENDOR: "1"
RUST_BACKTRACE: "1"
- name: Publish
uses: softprops/action-gh-release@v3
Expand All @@ -353,21 +351,14 @@ jobs:
individual-x86_64-pc-cygwin.tar.zst
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "`make install` (MinGW UCRT)"
shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail {0}'
env:
CHERE_INVOKING: 1
MSYSTEM: "UCRT64"
OPENSSL_DIR: "/ucrt64"
OPENSSL_NO_VENDOR: "1"
OPENSSL_STATIC: "0"
- name: "`make install`"
shell: bash
run: |
set -x
export CARGOFLAGS="--features openssl"
# Check that we exclude unix programs to avoid build failure
# Windows's stdbuf depends on Cygwin's libstdbuf. So make should not try to install libstdbuf
make install DESTDIR=/tmp/w PREFIX=/tmp/usr MULTICALL=y COMPLETIONS=n MANPAGES=n LOCALES=n \
SKIP_UTILS="arch b2sum base32 base64 basename basenc cat comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold head hostname hostid join link ln ls md5sum mkdir mktemp more mv nl nproc numfmt od paste pathchk pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split sum sync tac tail tee test touch tr true truncate tsort tty uname unexpand uniq unlink vdir wc whoami yes"
SKIP_UTILS="arch b2sum base32 base64 basename basenc cat cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold head hostname hostid join link ln ls md5sum mkdir mktemp more mv nl nproc numfmt od paste pathchk pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split sum sync tac tail tee test touch tr true truncate tsort tty uname unexpand uniq unlink vdir wc whoami yes"
target/release/coreutils.exe stdbuf --version

test_busybox:
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,6 @@ INSTALLEES_WITH_EXTRA_LOCALE = \
$(INSTALLEES) \
$(if $(findstring sum, $(INSTALLEES)),checksum_common, )
install-locales:
@# Install common locales shared by all utilities
@if [ -d "$(BASEDIR)/src/uucore/locales" ]; then \
$(INSTALL) -d "$(DESTDIR)$(DATAROOTDIR)/locales/uucore"; \
for locale_file in "$(BASEDIR)"/src/uucore/locales/*.ftl; do \
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
$(INSTALL) -m 644 "$$locale_file" "$(DESTDIR)$(DATAROOTDIR)/locales/uucore/"; \
fi; \
done; \
fi
@# Install lazy error locales shared by all utilities
@if [ -d "$(BASEDIR)/src/uucore/locales/errors" ]; then \
$(INSTALL) -d "$(DESTDIR)$(DATAROOTDIR)/locales/uucore/errors"; \
Expand Down
1 change: 0 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub fn main() {

// Check for tldr.zip when building uudoc to warn users once at build time
// instead of repeatedly at runtime for each utility
println!("cargo:rerun-if-changed=docs/tldr.zip");
if env::var("CARGO_FEATURE_UUDOC").is_ok() && !Path::new("docs/tldr.zip").exists() {
println!(
"cargo:warning=No tldr archive found, so the documentation will not include examples."
Expand Down
2 changes: 2 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ skip = [
{ name = "itertools", version = "0.13.0" },
# codspeed-divan-compat-macros
{ name = "itertools", version = "0.14.0" },
# ordered-multimap
{ name = "hashbrown", version = "0.14.5" },
# lru (via num-prime)
{ name = "hashbrown", version = "0.16.1" },
# cexpr (via bindgen)
Expand Down
1 change: 0 additions & 1 deletion fuzz/fuzz_targets/fuzz_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

// spell-checker:ignore chdir putenv

#![no_main]
Expand Down
1 change: 0 additions & 1 deletion src/uu/base32/src/base_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ pub fn base_app(about: String, usage: String) -> Command {
.short('w')
.long(options::WRAP)
.value_name("COLS")
.allow_hyphen_values(true)
.help(translate!("base-common-help-wrap", "default" => WRAP_DEFAULT))
.overrides_with(options::WRAP),
)
Expand Down
1 change: 0 additions & 1 deletion src/uu/chroot/src/chroot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// file that was distributed with this source code.

// spell-checker:ignore (ToDO) NEWROOT Userspec chrooting chroots chdir pstatus repointed

mod error;

use crate::error::ChrootError;
Expand Down
34 changes: 17 additions & 17 deletions src/uu/cp/src/cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ pub enum CpError {
#[error("{}", translate!("cp-error-not-all-files-copied"))]
NotAllFilesCopied,

/// Xattr copying already reported each failure; only the exit code is needed.
#[error("")]
XattrErrorsReported,

/// Simple [`walkdir::Error`] wrapper
#[error("{0}")]
WalkDirErr(#[from] walkdir::Error),
Expand Down Expand Up @@ -1423,9 +1427,12 @@ fn show_error_if_needed(error: &CpError) {
CpError::NotAllFilesCopied => {
// Need to return an error code
}
CpError::Skipped(_) => {
CpError::Skipped(_) | CpError::XattrErrorsReported => {
// touch a b && echo "n"|cp -i a b && echo $?
// should return an error
// XattrErrorsReported: each failing attribute was already
// reported on stderr by `copy_xattrs*`; only the exit code
// matters now.
}
// Format IoErrContext using strip_errno to remove "(os error N)" suffix
// for GNU-compatible output
Expand Down Expand Up @@ -1857,12 +1864,16 @@ fn copy_extended_attrs(source: &Path, dest: &Path, skip_selinux: bool) -> CopyRe
fs::set_permissions(dest, revert_perms)?;
}

// If copying xattrs failed, propagate that error now with context.
// `copy_xattrs*` already reported each failure; add context only when xattrs are unsupported.
copy_xattrs_result.map_err(|e| {
CpError::IoErrContext(
e,
translate!("cp-error-setting-attributes", "path" => dest.quote()),
)
if uucore::fsxattr::is_xattr_unsupported(&e) {
CpError::IoErrContext(
e,
translate!("cp-error-setting-attributes", "path" => dest.quote()),
)
} else {
CpError::XattrErrorsReported
}
})?;

Ok(())
Expand Down Expand Up @@ -1892,11 +1903,6 @@ pub(crate) fn copy_attributes(
attributes.mode
};

// A created directory only defaults to copying the source mode; unlike an
// explicit preserve (-p/-a), GNU applies the umask to it.
let apply_umask_to_mode =
dest_is_freshly_created_dir && !matches!(attributes.mode, Preserve::Yes { .. });

// Track whether `chown` to the source's uid succeeded. If it did not
// (typical case: non-root user copying a root-owned setuid file), the
// mode preservation below must strip setuid/setgid so the destination
Expand Down Expand Up @@ -1961,12 +1967,6 @@ pub(crate) fn copy_attributes(
let mode = perms.mode() & !0o6000;
perms.set_mode(mode);
}
if apply_umask_to_mode {
// The umask never covers setuid/setgid, so clear them
// explicitly: a non-preserving copy must not carry the
// source's set-user/group-ID bits into the new directory.
perms.set_mode(perms.mode() & !0o6000 & !uucore::mode::get_umask());
}
perms
};
#[cfg(not(unix))]
Expand Down
1 change: 0 additions & 1 deletion src/uu/csplit/src/csplit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// file that was distributed with this source code.

// spell-checker:ignore rustdoc

#![allow(rustdoc::private_intra_doc_links)]

use std::borrow::Borrow;
Expand Down
2 changes: 2 additions & 0 deletions src/uu/date/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ date-help-rfc-3339 = output date/time in RFC 3339 format.
date-help-debug = annotate the parsed date, and warn about questionable usage to stderr
date-help-reference = display the last modification time of FILE
date-help-set = set time described by STRING
date-help-set-macos = set time described by STRING (not available on mac yet)
date-help-set-redox = set time described by STRING (not available on redox yet)
date-help-universal = print or set Coordinated Universal Time (UTC)

date-error-invalid-date = invalid date '{$date}'
date-error-invalid-format = invalid format '{$format}' ({$error})
date-error-expected-file-got-directory = expected file, got directory {$path}
date-error-date-overflow = date overflow '{$date}'
date-error-setting-date-not-supported-macos = setting the date is not supported by macOS
date-error-setting-date-not-supported-redox = setting the date is not supported by Redox
date-error-cannot-set-date = cannot set date
date-error-extra-operand = extra operand '{$operand}'
Expand Down
2 changes: 2 additions & 0 deletions src/uu/date/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ date-help-rfc-3339 = afficher la date/heure au format RFC 3339.
date-help-debug = annoter la date analysée et avertir des usages douteux sur stderr
date-help-reference = afficher l'heure de dernière modification du FICHIER
date-help-set = définir l'heure décrite par CHAÎNE
date-help-set-macos = définir l'heure décrite par CHAÎNE (pas encore disponible sur mac)
date-help-set-redox = définir l'heure décrite par CHAÎNE (pas encore disponible sur redox)
date-help-universal = afficher ou définir le Temps Universel Coordonné (UTC)

date-error-invalid-date = date invalide '{$date}'
date-error-invalid-format = format invalide '{$format}' ({$error})
date-error-expected-file-got-directory = fichier attendu, répertoire obtenu {$path}
date-error-date-overflow = débordement de date '{$date}'
date-error-setting-date-not-supported-macos = la définition de la date n'est pas prise en charge par macOS
date-error-setting-date-not-supported-redox = la définition de la date n'est pas prise en charge par Redox
date-error-cannot-set-date = impossible de définir la date
date-error-extra-operand = opérande supplémentaire '{$operand}'
Expand Down
Loading
Loading