aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-06-15 11:52:18 +0000
committerWerner Koch <[email protected]>2023-07-05 10:05:57 +0000
commit47cce2020dc8242899d44cb1805c5a4c102b6b0a (patch)
treea8ee45e3d7f2580add49aa880fb21237d6002cc8
parentgpg: New option --no-compress as alias for -z0. (diff)
downloadgnupg-47cce2020dc8242899d44cb1805c5a4c102b6b0a.tar.gz
gnupg-47cce2020dc8242899d44cb1805c5a4c102b6b0a.zip
gpgtar: New option --no-compress.
* tools/gpgtar.c: Add option --no-compress. * tools/gpgtar.h (opt): Add field no_compress. * tools/gpgtar-create.c (gpgtar_create): Pass -z0 to gpg. -- This option is probably easier to remember than --gpg-args '-z0'.
-rw-r--r--doc/tools.texi6
-rw-r--r--tools/gpgtar-create.c2
-rw-r--r--tools/gpgtar.c3
-rw-r--r--tools/gpgtar.h1
4 files changed, 12 insertions, 0 deletions
diff --git a/doc/tools.texi b/doc/tools.texi
index a68976ce6..8381a6340 100644
--- a/doc/tools.texi
+++ b/doc/tools.texi
@@ -1988,6 +1988,12 @@ default is to take the directory name from the input filename. If no
input filename is known a directory named @file{GPGARCH} is used.
This option is deprecated in favor of option @option{--directory}.
+@item --no-compress
+@opindex no-compress
+This option tells gpg to disable compression (i.e. using option -z0).
+It is useful for archiving only large files which are are already
+compressed (e.g. a set of videos).
+
@item --gpg @var{gpgcmd}
@opindex gpg
Use the specified command @var{gpgcmd} instead of @command{gpg}.
diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c
index 33e02b99d..8cb65c7e2 100644
--- a/tools/gpgtar-create.c
+++ b/tools/gpgtar-create.c
@@ -1283,6 +1283,8 @@ gpgtar_create (char **inpattern, const char *files_from, int null_names,
ccparray_put (&ccp, "--recipient");
ccparray_put (&ccp, arg->d);
}
+ if (opt.no_compress)
+ ccparray_put (&ccp, "-z0");
for (arg = opt.gpg_arguments; arg; arg = arg->next)
ccparray_put (&ccp, arg->d);
diff --git a/tools/gpgtar.c b/tools/gpgtar.c
index 9d791f75a..e4ae0ea01 100644
--- a/tools/gpgtar.c
+++ b/tools/gpgtar.c
@@ -75,6 +75,7 @@ enum cmd_and_opt_values
oSetFilename,
oNull,
oUtf8Strings,
+ oNoCompress,
oBatch,
oAnswerYes,
@@ -118,6 +119,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oSetFilename, "set-filename", "@"),
ARGPARSE_s_n (oOpenPGP, "openpgp", "@"),
ARGPARSE_s_n (oCMS, "cms", "@"),
+ ARGPARSE_s_n (oNoCompress, "no-compress", "@"),
ARGPARSE_s_n (oBatch, "batch", "@"),
ARGPARSE_s_n (oAnswerYes, "yes", "@"),
@@ -344,6 +346,7 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts)
case oFilesFrom: files_from = pargs->r.ret_str; break;
case oNull: null_names = 1; break;
case oUtf8Strings: opt.utf8strings = 1; break;
+ case oNoCompress: opt.no_compress = 1; break;
case aList:
case aDecrypt:
diff --git a/tools/gpgtar.h b/tools/gpgtar.h
index 6df3418f0..0b6fa2b12 100644
--- a/tools/gpgtar.h
+++ b/tools/gpgtar.h
@@ -33,6 +33,7 @@ struct
int quiet;
int dry_run;
int utf8strings;
+ int no_compress;
const char *gpg_program;
strlist_t gpg_arguments;
const char *outfile;