Blame SOURCES/cpio-2.9-rh.patch

5c2053
From: Pavel Raiskup <praiskup@redhat.com>
5c2053
Date: Mon, 14 Sep 2015 09:27:21 +0200
5c2053
Subject: [PATCH 1/7] make '-c' equivalent to '-H newc'
5c2053
5c2053
diff --git a/doc/cpio.texi b/doc/cpio.texi
5c2053
index e631934..a788b5d 100644
5c2053
--- a/doc/cpio.texi
5c2053
+++ b/doc/cpio.texi
5c2053
@@ -261,7 +261,8 @@ Sets the I/O block size to @var{block-size} * 512 bytes.
5c2053
 @item -B
5c2053
 Set the I/O block size to 5120 bytes.
5c2053
 @item -c
5c2053
-Use the old portable (ASCII) archive format.
5c2053
+Identical to "-H newc", use the new (SVR4) portable format.  If you wish the old
5c2053
+portable (ASCII) archive format, use "-H odc" instead.
5c2053
 @item -C @var{number}
5c2053
 @itemx --io-size=@var{number}
5c2053
 Set the I/O block size to the given @var{number} of bytes.
5c2053
@@ -343,7 +344,8 @@ Equivalent to @option{-sS}.
5c2053
 @item -B
5c2053
 Set the I/O block size to 5120 bytes.
5c2053
 @item -c
5c2053
-Use the old portable (ASCII) archive format.
5c2053
+Identical to "-H newc", use the new (SVR4) portable format.  If you wish the old
5c2053
+portable (ASCII) archive format, use "-H odc" instead.
5c2053
 @item -C @var{number}
5c2053
 @itemx --io-size=@var{number}
5c2053
 Set the I/O block size to the given @var{number} of bytes.
5c2053
@@ -454,7 +456,8 @@ Sets the I/O block size to @var{block-size} * 512 bytes.
5c2053
 @item -B
5c2053
 Set the I/O block size to 5120 bytes.
5c2053
 @item -c
5c2053
-Use the old portable (ASCII) archive format.
5c2053
+Identical to "-H newc", use the new (SVR4) portable format.  If you wish the old
5c2053
+portable (ASCII) archive format, use "-H odc" instead.
5c2053
 @item -C @var{number}
5c2053
 @itemx --io-size=@var{number}
5c2053
 Set the I/O block size to the given @var{number} of bytes.
5c2053
@@ -600,7 +603,8 @@ block size is 512 bytes.
5c2053
 
5c2053
 @item -c
5c2053
 [@ref{copy-in},@ref{copy-out},@ref{copy-pass}]
5c2053
-@*Use the old portable (ASCII) archive format.
5c2053
+@*Identical to "-H newc", use the new (SVR4) portable format.  If you wish the
5c2053
+old portable (ASCII) archive format, use "-H odc" instead.
5c2053
 
5c2053
 @item -C @var{io-size}
5c2053
 @itemx --io-size=@var{io-size}
5c2053
diff --git a/src/main.c b/src/main.c
5c2053
index a13861f..a875a13 100644
5c2053
--- a/src/main.c
5c2053
+++ b/src/main.c
5c2053
@@ -124,7 +124,7 @@ static struct argp_option options[] = {
5c2053
   {"block-size", BLOCK_SIZE_OPTION, N_("BLOCK-SIZE"), 0,
5c2053
    N_("Set the I/O block size to BLOCK-SIZE * 512 bytes"), GRID+1 },
5c2053
   {NULL, 'c', NULL, 0,
5c2053
-   N_("Use the old portable (ASCII) archive format"), GRID+1 },
5c2053
+   N_("Identical to \"-H newc\", use the new (SVR4) portable format. If you wish the old portable (ASCII) archive format, use \"-H odc\" instead."), GRID+1 },
5c2053
   {"dot", 'V', NULL, 0, 
5c2053
    N_("Print a \".\" for each file processed"), GRID+1 },
5c2053
   {"io-size", 'C', N_("NUMBER"), 0,
5c2053
@@ -329,6 +329,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
5c2053
     case 'c':		/* Use the old portable ASCII format.  */
5c2053
       if (archive_format != arf_unknown)
5c2053
 	USAGE_ERROR ((0, 0, _("Archive format multiply defined")));
5c2053
+#define SVR4_COMPAT
5c2053
 #ifdef SVR4_COMPAT
5c2053
       archive_format = arf_newascii; /* -H newc.  */
5c2053
 #else