Pass --wildcards to tar on build (rhbz#206841)
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 3 Jul 2007 11:13:13 +0000 (14:13 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 3 Jul 2007 11:13:13 +0000 (14:13 +0300)
Tar no longer accepts globbing by default as it's incompatible with
traditional implementations:
http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00001.html

Rpm needs to work with upstream tar really, the --wildcards option has been
supported since 2001 so older versions shouldn't suffer either.

build.c

diff --git a/build.c b/build.c
index a8ad538..459ab76 100644 (file)
--- a/build.c
+++ b/build.c
@@ -161,7 +161,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
            /* Try again */
            (void) pclose(fp);
 
-           sprintf(cmd, "%s < %s | tar xOvf - \\*.spec 2>&1 > %s",
+           sprintf(cmd, "%s < %s | tar xOvf - --wildcards \\*.spec 2>&1 > %s",
                    zcmds[res & 0x3], arg, tmpSpecFile);
            if (!(fp = popen(cmd, "r"))) {
                rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m\n"));