Skip to content
Draft
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
8 changes: 4 additions & 4 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ jobs:
mv -T target target.cache
fi
# Check that we don't cross-build uudoc
# also do not try to generate manpages for part of hashsum
# also do not try to generate manpages for part of cksum
make install-manpages PREFIX=/tmp/usr UTILS=true RUSTC_ARCH="--target aarch64-unknown-linux-gnu"
# build (host)
make build
Expand Down Expand Up @@ -372,8 +372,8 @@ jobs:
set -x
DESTDIR=/tmp/ make PROFILE=release MULTICALL=n install
# Check that the utils are present
test -f /tmp/usr/local/bin/hashsum
# Check that hashsum symlinks are present
test -f /tmp/usr/local/bin/cksum
# Check that cksum symlinks are present
test -h /tmp/usr/local/bin/b2sum
test -h /tmp/usr/local/bin/md5sum
test -h /tmp/usr/local/bin/sha1sum
Expand All @@ -386,7 +386,7 @@ jobs:
run: |
set -x
DESTDIR=/tmp/ make PROFILE=release MULTICALL=y LN="ln -svf" install
# Check that relative symlinks of hashsum are present
# Check that relative symlinks of cksum are present
[ $(readlink /tmp/usr/local/bin/b2sum) = coreutils ]
[ $(readlink /tmp/usr/local/bin/md5sum) = coreutils ]
[ $(readlink /tmp/usr/local/bin/sha512sum) = coreutils ]
Expand Down
1 change: 0 additions & 1 deletion .vscode/cspell.dictionaries/jargon.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ hardfloat
hardlink
hardlinks
hasher
hashsums
hwcaps
infile
iflag
Expand Down
1 change: 0 additions & 1 deletion .vscode/cspell.dictionaries/workspace.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ chroot
cksum
csplit
dircolors
hashsum
hostid
logname
mkdir
Expand Down
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ feat_common_core = [
"false",
"fmt",
"fold",
"hashsum",
"head",
"join",
"link",
Expand Down Expand Up @@ -453,7 +452,6 @@ false = { optional = true, version = "0.5.0", package = "uu_false", path = "src/
fmt = { optional = true, version = "0.5.0", package = "uu_fmt", path = "src/uu/fmt" }
fold = { optional = true, version = "0.5.0", package = "uu_fold", path = "src/uu/fold" }
groups = { optional = true, version = "0.5.0", package = "uu_groups", path = "src/uu/groups" }
hashsum = { optional = true, version = "0.5.0", package = "uu_hashsum", path = "src/uu/hashsum" }
head = { optional = true, version = "0.5.0", package = "uu_head", path = "src/uu/head" }
hostid = { optional = true, version = "0.5.0", package = "uu_hostid", path = "src/uu/hostid" }
hostname = { optional = true, version = "0.5.0", package = "uu_hostname", path = "src/uu/hostname" }
Expand Down
18 changes: 8 additions & 10 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ PROGS := \
false \
fmt \
fold \
hashsum \
head \
hostname \
join \
Expand Down Expand Up @@ -184,7 +183,7 @@ SELINUX_PROGS := \
chcon \
runcon

HASHSUM_PROGS := \
CKSUM_PROGS := \
b2sum \
md5sum \
sha1sum \
Expand All @@ -203,8 +202,8 @@ ifeq ($(SELINUX_ENABLED),1)
endif

UTILS ?= $(filter-out $(SKIP_UTILS),$(PROGS))
ifneq ($(filter hashsum,$(UTILS)),hashsum)
HASHSUM_PROGS :=
ifneq ($(filter cksum,$(UTILS)),cksum)
CKSUM_PROGS :=
endif

ifneq ($(findstring stdbuf,$(UTILS)),)
Expand Down Expand Up @@ -236,7 +235,6 @@ TEST_PROGS := \
factor \
false \
fold \
hashsum \
head \
install \
link \
Expand Down Expand Up @@ -386,7 +384,7 @@ build-uudoc:

install-manpages: build-uudoc
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1
$(foreach prog, $(INSTALLEES) $(HASHSUM_PROGS), \
$(foreach prog, $(INSTALLEES) $(CKSUM_PROGS), \
$(BUILDDIR)/uudoc manpage $(prog) > $(DESTDIR)$(DATAROOTDIR)/man/man1/$(PROG_PREFIX)$(prog).1 $(newline) \
)
else
Expand All @@ -399,7 +397,7 @@ install-completions: build-uudoc
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
$(foreach prog, $(INSTALLEES) $(HASHSUM_PROGS) , \
$(foreach prog, $(INSTALLEES) $(CKSUM_PROGS), \
$(BUILDDIR)/uudoc completion $(prog) zsh > $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(PROG_PREFIX)$(prog) $(newline) \
$(BUILDDIR)/uudoc completion $(prog) bash > $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/$(PROG_PREFIX)$(prog).bash $(newline) \
$(BUILDDIR)/uudoc completion $(prog) fish > $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/$(PROG_PREFIX)$(prog).fish $(newline) \
Expand Down Expand Up @@ -461,16 +459,16 @@ ifeq (${MULTICALL}, y)
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) $(newline) \
)
$(foreach prog, $(HASHSUM_PROGS), \
$(foreach prog, $(CKSUM_PROGS), \
cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) $(newline) \
)
$(if $(findstring test,$(INSTALLEES)), cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)coreutils $(PROG_PREFIX)[)
else
$(foreach prog, $(INSTALLEES), \
$(INSTALL) -m 755 $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog) $(newline) \
)
$(foreach prog, $(HASHSUM_PROGS), \
cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)hashsum $(PROG_PREFIX)$(prog) $(newline) \
$(foreach prog, $(CKSUM_PROGS), \
cd $(INSTALLDIR_BIN) && $(LN) $(PROG_PREFIX)cksum $(PROG_PREFIX)$(prog) $(newline) \
)
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) -m 755 $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
endif
Expand Down
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ pub fn main() {
"false" | "true" => {
phf_map.entry(krate, format!("(r#{krate}::uumain, r#{krate}::uu_app)"));
}
"hashsum" => {
phf_map.entry(krate, format!("({krate}::uumain, {krate}::uu_app_custom)"));
"cksum" => {
phf_map.entry(krate, format!("({krate}::uumain, {krate}::uu_app)"));

let map_value = format!("({krate}::uumain, {krate}::uu_app_common)");
let map_value = format!("({krate}::uumain, {krate}::uu_app)");
phf_map.entry("md5sum", map_value.clone());
phf_map.entry("sha1sum", map_value.clone());
phf_map.entry("sha224sum", map_value.clone());
Expand Down
2 changes: 1 addition & 1 deletion docs/compiles_table.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
target,arch,base32,base64,basename,cat,chgrp,chmod,chown,chroot,cksum,comm,cp,csplit,cut,date,df,dircolors,dirname,du,echo,env,expand,expr,factor,false,fmt,fold,groups,hashsum,head,hostid,hostname,id,install,join,kill,link,ln,logname,ls,mkdir,mkfifo,mknod,mktemp,more,mv,nice,nl,nohup,nproc,numfmt,od,paste,pathchk,pinky,printenv,printf,ptx,pwd,readlink,realpath,rm,rmdir,seq,shred,shuf,sleep,sort,split,stat,stdbuf,sum,sync,tac,tail,tee,test,timeout,touch,tr,true,truncate,tsort,tty,uname,unexpand,uniq,unlink,uptime,users,wc,who,whoami,yes,chcon,pr,dir,vdir,dd,basenc,runcon
target,arch,base32,base64,basename,cat,chgrp,chmod,chown,chroot,cksum,comm,cp,csplit,cut,date,df,dircolors,dirname,du,echo,env,expand,expr,factor,false,fmt,fold,groups,head,hostid,hostname,id,install,join,kill,link,ln,logname,ls,mkdir,mkfifo,mknod,mktemp,more,mv,nice,nl,nohup,nproc,numfmt,od,paste,pathchk,pinky,printenv,printf,ptx,pwd,readlink,realpath,rm,rmdir,seq,shred,shuf,sleep,sort,split,stat,stdbuf,sum,sync,tac,tail,tee,test,timeout,touch,tr,true,truncate,tsort,tty,uname,unexpand,uniq,unlink,uptime,users,wc,who,whoami,yes,chcon,pr,dir,vdir,dd,basenc,runcon
aarch64-unknown-linux-gnu,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
i686-unknown-linux-gnu,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
powerpc64-unknown-linux-gnu,0,0,0,0,0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Expand Down
7 changes: 0 additions & 7 deletions docs/src/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ packages.

`rm` can display a progress bar when the `-g`/`--progress` flag is set.

## `hashsum` (deprecated)

This utility does not exist in GNU coreutils. `hashsum` is a utility that
supports computing the checksums with several algorithms. The flags and options
are identical to the `*sum` family of utils (`sha1sum`, `sha256sum`, `b2sum`,
etc.). This utility will be removed in the future and it is advised to use `cksum --untagged` instead.

## `more`

We provide a simple implementation of `more`, which is not part of GNU
Expand Down
7 changes: 0 additions & 7 deletions fuzz/fuzz_targets/fuzz_non_utf8_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ static PATH_PROGRAMS: &[&str] = &[
"vdir",
"mkfifo",
"mknod",
"hashsum",
// File I/O utilities
"dd",
"sync",
Expand Down Expand Up @@ -252,12 +251,6 @@ fn test_program_with_non_utf8_path(program: &str, path: &PathBuf) -> CommandResu
OsString::from("bs=1"),
OsString::from("count=1"),
],
// Hashsum needs algorithm
"hashsum" => vec![
OsString::from(program),
OsString::from("--md5"),
path_os.to_owned(),
],
// Encoding/decoding programs
"base32" | "base64" | "basenc" => vec![OsString::from(program), path_os.to_owned()],
"df" => vec![OsString::from(program), path_os.to_owned()],
Expand Down
6 changes: 3 additions & 3 deletions src/common/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ fn get_canonical_util_name(util_name: &str) -> &str {
// uu_test aliases - '[' is an alias for test
"[" => "test",

// hashsum aliases - all these hash commands are aliases for hashsum
// cksum aliases - all these hash commands are aliases for cksum
"md5sum" | "sha1sum" | "sha224sum" | "sha256sum" | "sha384sum" | "sha512sum" | "b2sum" => {
"hashsum"
"cksum"
}

"dir" => "ls", // dir is an alias for ls
Expand Down Expand Up @@ -98,7 +98,7 @@ mod tests {
fn test_get_canonical_util_name() {
// Test a few key aliases
assert_eq!(get_canonical_util_name("["), "test");
assert_eq!(get_canonical_util_name("md5sum"), "hashsum");
assert_eq!(get_canonical_util_name("md5sum"), "cksum");
assert_eq!(get_canonical_util_name("dir"), "ls");

// Test passthrough case
Expand Down
6 changes: 3 additions & 3 deletions src/uu/cksum/locales/en-US.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cksum-about = Print CRC and size for each file
cksum-usage = cksum [OPTIONS] [FILE]...
cksum-about = Print checksum and size for each file
cksum-usage = cksum (multicall-binary for {md5,b2,sha*}sum) [OPTIONS] [FILE]...
cksum-after-help = DIGEST determines the digest algorithm and default output format:

- sysv: (equivalent to sum -s)
Expand All @@ -16,7 +16,7 @@ cksum-after-help = DIGEST determines the digest algorithm and default output for
# Help messages
cksum-help-algorithm = select the digest type to use. See DIGEST below
cksum-help-untagged = create a reversed style checksum, without digest type
cksum-help-tag = create a BSD style checksum, undo --untagged (default)
cksum-help-tag = create a BSD style checksum (default of cksum)
cksum-help-length = digest length in bits; must not exceed the max for the blake2 algorithm and must be a multiple of 8
cksum-help-raw = emit a raw binary digest, not hexadecimal
cksum-help-strict = exit non-zero for improperly formatted checksum lines
Expand Down
6 changes: 3 additions & 3 deletions src/uu/cksum/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cksum-about = Afficher le CRC et la taille de chaque fichier
cksum-usage = cksum [OPTION]... [FICHIER]...
cksum-about = Afficher le ckecksum et la taille de chaque fichier
cksum-usage = cksum (multicall-binary for {md5,b2,sha*}sum) [OPTION]... [FICHIER]...
cksum-after-help = DIGEST détermine l'algorithme de condensé et le format de sortie par défaut :

- sysv : (équivalent à sum -s)
Expand All @@ -16,7 +16,7 @@ cksum-after-help = DIGEST détermine l'algorithme de condensé et le format de s
# Messages d'aide
cksum-help-algorithm = sélectionner le type de condensé à utiliser. Voir DIGEST ci-dessous
cksum-help-untagged = créer une somme de contrôle de style inversé, sans type de condensé
cksum-help-tag = créer une somme de contrôle de style BSD, annuler --untagged (par défaut)
cksum-help-tag = créer une somme de contrôle de style BSD, annuler --untagged (default of cksum)
cksum-help-length = longueur du condensé en bits ; ne doit pas dépasser le maximum pour l'algorithme blake2 et doit être un multiple de 8
cksum-help-raw = émettre un condensé binaire brut, pas hexadécimal
cksum-help-strict = sortir avec un code non-zéro pour les lignes de somme de contrôle mal formatées
Expand Down
Loading