|
|
3568d3 |
From 836f4e735cf368542f14005e41d2f84ec29dfd60 Mon Sep 17 00:00:00 2001
|
|
|
3568d3 |
From: Yann Collet <yann.collet.73@gmail.com>
|
|
|
3568d3 |
Date: Sat, 4 Dec 2021 10:29:49 -0800
|
|
|
3568d3 |
Subject: [PATCH] fix man page installation
|
|
|
3568d3 |
|
|
|
3568d3 |
for variant redirectors (`xxh32sum`, `xxh64sum` and `xxh128sum`).
|
|
|
3568d3 |
fix #647, reported by @jpalus.
|
|
|
3568d3 |
|
|
|
3568d3 |
Also : slightly updated man page text, for clarity and accuracy.
|
|
|
3568d3 |
---
|
|
|
3568d3 |
Makefile | 14 ++++++++------
|
|
|
3568d3 |
cli/xxhsum.1 | 8 ++++----
|
|
|
3568d3 |
cli/xxhsum.1.md | 8 +++++---
|
|
|
3568d3 |
3 files changed, 17 insertions(+), 13 deletions(-)
|
|
|
3568d3 |
|
|
|
3568d3 |
diff --git a/Makefile b/Makefile
|
|
|
3568d3 |
index 2fbefbc..63273e1 100644
|
|
|
3568d3 |
--- a/Makefile
|
|
|
3568d3 |
+++ b/Makefile
|
|
|
3568d3 |
@@ -457,6 +457,7 @@ endif
|
|
|
3568d3 |
|
|
|
3568d3 |
INSTALL_PROGRAM ?= $(INSTALL)
|
|
|
3568d3 |
INSTALL_DATA ?= $(INSTALL) -m 644
|
|
|
3568d3 |
+INSTALL_DIR ?= $(INSTALL) -d -m 755
|
|
|
3568d3 |
|
|
|
3568d3 |
|
|
|
3568d3 |
# Escape special symbols by putting each character into its separate class
|
|
|
3568d3 |
@@ -496,7 +497,7 @@ libxxhash.pc: libxxhash.pc.in
|
|
|
3568d3 |
.PHONY: install
|
|
|
3568d3 |
install: lib libxxhash.pc xxhsum ## install libraries, CLI, links and man page
|
|
|
3568d3 |
@echo Installing libxxhash
|
|
|
3568d3 |
- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)
|
|
|
3568d3 |
+ $(Q)$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
|
|
|
3568d3 |
$(Q)$(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR)
|
|
|
3568d3 |
$(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR)
|
|
|
3568d3 |
$(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR)
|
|
|
3568d3 |
@@ -508,19 +509,20 @@ ifeq ($(DISPATCH),1)
|
|
|
3568d3 |
$(Q)$(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR)
|
|
|
3568d3 |
endif
|
|
|
3568d3 |
@echo Installing pkgconfig
|
|
|
3568d3 |
- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
|
|
|
3568d3 |
+ $(Q)$(INSTALL_DIR) $(DESTDIR)$(PKGCONFIGDIR)/
|
|
|
3568d3 |
$(Q)$(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/
|
|
|
3568d3 |
@echo Installing xxhsum
|
|
|
3568d3 |
- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
|
|
|
3568d3 |
+ $(Q)$(INSTALL_DIR) $(DESTDIR)$(BINDIR)/
|
|
|
3568d3 |
$(Q)$(INSTALL_PROGRAM) xxhsum $(DESTDIR)$(BINDIR)/xxhsum
|
|
|
3568d3 |
$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh32sum
|
|
|
3568d3 |
$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh64sum
|
|
|
3568d3 |
$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh128sum
|
|
|
3568d3 |
@echo Installing man pages
|
|
|
3568d3 |
+ $(Q)$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/
|
|
|
3568d3 |
$(Q)$(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1
|
|
|
3568d3 |
- $(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh32sum.1
|
|
|
3568d3 |
- $(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh64sum.1
|
|
|
3568d3 |
- $(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh128sum.1
|
|
|
3568d3 |
+ $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh32sum.1
|
|
|
3568d3 |
+ $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh64sum.1
|
|
|
3568d3 |
+ $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1
|
|
|
3568d3 |
@echo xxhash installation completed
|
|
|
3568d3 |
|
|
|
3568d3 |
.PHONY: uninstall
|
|
|
3568d3 |
diff --git a/cli/xxhsum.1 b/cli/xxhsum.1
|
|
|
3568d3 |
index 27e6808..715fc4b 100644
|
|
|
3568d3 |
--- a/cli/xxhsum.1
|
|
|
3568d3 |
+++ b/cli/xxhsum.1
|
|
|
3568d3 |
@@ -1,14 +1,14 @@
|
|
|
3568d3 |
-.TH "XXHSUM" "1" "November 2021" "xxhsum 0.8.1" "User Commands"
|
|
|
3568d3 |
+.TH "XXHSUM" "1" "December 2021" "xxhsum 0.8.1" "User Commands"
|
|
|
3568d3 |
.SH "NAME"
|
|
|
3568d3 |
\fBxxhsum\fR \- print or check xxHash non\-cryptographic checksums
|
|
|
3568d3 |
.SH "SYNOPSIS"
|
|
|
3568d3 |
\fBxxhsum [<OPTION>] \|\.\|\.\|\. [<FILE>] \|\.\|\.\|\.\fR \fBxxhsum \-b [<OPTION>] \|\.\|\.\|\.\fR
|
|
|
3568d3 |
.P
|
|
|
3568d3 |
-\fBxxh32sum\fR is equivalent to \fBxxhsum \-H0\fR \fBxxh64sum\fR is equivalent to \fBxxhsum \-H1\fR \fBxxh128sum\fR is equivalent to \fBxxhsum \-H2\fR
|
|
|
3568d3 |
+\fBxxh32sum\fR is equivalent to \fBxxhsum \-H0\fR, \fBxxh64sum\fR is equivalent to \fBxxhsum \-H1\fR, \fBxxh128sum\fR is equivalent to \fBxxhsum \-H2\fR
|
|
|
3568d3 |
.SH "DESCRIPTION"
|
|
|
3568d3 |
Print or check xxHash (32, 64 or 128 bits) checksums\. When no \fIFILE\fR, read standard input, except if it\'s the console\. When \fIFILE\fR is \fB\-\fR, read standard input even if it\'s the console\.
|
|
|
3568d3 |
.P
|
|
|
3568d3 |
-\fBxxhsum\fR supports a command line syntax similar but not identical to md5sum(1)\. Differences are: \fBxxhsum\fR doesn\'t have text/binary mode switch (\fB\-b\fR, \fB\-t\fR); \fBxxhsum\fR always treats files as binary file; \fBxxhsum\fR has a hash bit width switch (\fB\-H\fR);
|
|
|
3568d3 |
+\fBxxhsum\fR supports a command line syntax similar but not identical to md5sum(1)\. Differences are: \fBxxhsum\fR doesn\'t have text/binary mode switch (\fB\-b\fR, \fB\-t\fR); \fBxxhsum\fR always treats files as binary file; \fBxxhsum\fR has a hash selection switch (\fB\-H\fR);
|
|
|
3568d3 |
.P
|
|
|
3568d3 |
As xxHash is a fast non\-cryptographic checksum algorithm, \fBxxhsum\fR should not be used for security related purposes\.
|
|
|
3568d3 |
.P
|
|
|
3568d3 |
@@ -19,7 +19,7 @@ As xxHash is a fast non\-cryptographic checksum algorithm, \fBxxhsum\fR should n
|
|
|
3568d3 |
Displays xxhsum version and exits
|
|
|
3568d3 |
.TP
|
|
|
3568d3 |
\fB\-H\fR\fIHASHTYPE\fR
|
|
|
3568d3 |
-Hash selection\. \fIHASHTYPE\fR means \fB0\fR=XXH32, \fB1\fR=XXH64, \fB2\fR=XXH128, \fB3\fR=XXH3\. Alternatively, \fIHASHTYPE\fR \fB32\fR=XXH32, \fB64\fR=XXH64, \fB128\fR=XXH128\. Default value is \fB1\fR (64bits)
|
|
|
3568d3 |
+Hash selection\. \fIHASHTYPE\fR means \fB0\fR=XXH32, \fB1\fR=XXH64, \fB2\fR=XXH128, \fB3\fR=XXH3\. Note that \fB\-H3\fR triggers \fB\-\-tag\fR, which can\'t be skipped (this is to reduce risks of confusion with \fB\-H2\fR (\fBXXH64\fR))\. Alternatively, \fIHASHTYPE\fR \fB32\fR=XXH32, \fB64\fR=XXH64, \fB128\fR=XXH128\. Default value is \fB1\fR (64bits)
|
|
|
3568d3 |
.TP
|
|
|
3568d3 |
\fB\-\-tag\fR
|
|
|
3568d3 |
Output in the BSD style\.
|
|
|
3568d3 |
diff --git a/cli/xxhsum.1.md b/cli/xxhsum.1.md
|
|
|
3568d3 |
index 777d1ca..df2cb91 100644
|
|
|
3568d3 |
--- a/cli/xxhsum.1.md
|
|
|
3568d3 |
+++ b/cli/xxhsum.1.md
|
|
|
3568d3 |
@@ -7,8 +7,8 @@ SYNOPSIS
|
|
|
3568d3 |
`xxhsum [<OPTION>] ... [<FILE>] ...`
|
|
|
3568d3 |
`xxhsum -b [<OPTION>] ...`
|
|
|
3568d3 |
|
|
|
3568d3 |
-`xxh32sum` is equivalent to `xxhsum -H0`
|
|
|
3568d3 |
-`xxh64sum` is equivalent to `xxhsum -H1`
|
|
|
3568d3 |
+`xxh32sum` is equivalent to `xxhsum -H0`,
|
|
|
3568d3 |
+`xxh64sum` is equivalent to `xxhsum -H1`,
|
|
|
3568d3 |
`xxh128sum` is equivalent to `xxhsum -H2`
|
|
|
3568d3 |
|
|
|
3568d3 |
|
|
|
3568d3 |
@@ -23,7 +23,7 @@ When <FILE> is `-`, read standard input even if it's the console.
|
|
|
3568d3 |
Differences are:
|
|
|
3568d3 |
`xxhsum` doesn't have text/binary mode switch (`-b`, `-t`);
|
|
|
3568d3 |
`xxhsum` always treats files as binary file;
|
|
|
3568d3 |
-`xxhsum` has a hash bit width switch (`-H`);
|
|
|
3568d3 |
+`xxhsum` has a hash selection switch (`-H`);
|
|
|
3568d3 |
|
|
|
3568d3 |
As xxHash is a fast non-cryptographic checksum algorithm,
|
|
|
3568d3 |
`xxhsum` should not be used for security related purposes.
|
|
|
3568d3 |
@@ -38,6 +38,8 @@ OPTIONS
|
|
|
3568d3 |
|
|
|
3568d3 |
* `-H`<HASHTYPE>:
|
|
|
3568d3 |
Hash selection. <HASHTYPE> means `0`=XXH32, `1`=XXH64, `2`=XXH128, `3`=XXH3.
|
|
|
3568d3 |
+ Note that `-H3` triggers `--tag`, which can't be skipped
|
|
|
3568d3 |
+ (this is to reduce risks of confusion with `-H2` (`XXH64`)).
|
|
|
3568d3 |
Alternatively, <HASHTYPE> `32`=XXH32, `64`=XXH64, `128`=XXH128.
|
|
|
3568d3 |
Default value is `1` (64bits)
|
|
|
3568d3 |
|
|
|
3568d3 |
--
|
|
|
3568d3 |
2.36.1
|
|
|
3568d3 |
|