Ticket #27702: patch_for_gnu_tar.patch

File patch_for_gnu_tar.patch, 2.4 KB (added by richard.maynard@…, 14 years ago)

Patch to have dpkg-deb use GNU tar instead of TAR from ports. Apply in dpkg-VERSION/dpkg-deb/ directory wth patch -p0 < patchfile.patch

  • .c

    old new  
    350350    m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
    351351    if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
    352352    if (chdir(BUILDCONTROLDIR)) ohshite(_("failed to chdir to .../DEBIAN"));
    353     execlp(TAR, "tar", "-cf", "-", "--format=gnu", ".", NULL);
    354     ohshite(_("failed to exec tar -cf"));
     353    execlp(TAR, "gnutar", "-cf", "-", "--format=gnu", ".", NULL);
     354    ohshite(_("failed to exec gnutar -cf"));
    355355  }
    356356  close(p1[1]);
    357357  /* Create a temporary file to store the control data in. Immediately unlink
     
    373373  }
    374374  close(p1[0]);
    375375  waitsubproc(c2,"gzip -9c",0);
    376   waitsubproc(c1,"tar -cf",0);
     376  waitsubproc(c1,"gnutar -cf",0);
    377377  if (fstat(gzfd,&controlstab)) ohshite(_("failed to fstat tmpfile (control)"));
    378378  /* We have our first file for the ar-archive. Write a header for it to the
    379379   * package and insert it.
     
    423423    m_dup2(p1[0],0); close(p1[0]); close(p1[1]);
    424424    m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
    425425    if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
    426     execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "-T", "-", "--no-recursion", NULL);
    427     ohshite(_("failed to exec tar -cf"));
     426    execlp(TAR, "gnutar", "-cf", "-", "--format=gnu", "--null", "-T", "-", "--no-recursion", NULL);
     427    ohshite(_("failed to exec gnutar -cf"));
    428428  }
    429429  close(p1[0]);
    430430  close(p2[1]);
     
    457457      add_to_filist(fi,&symlist,&symlist_end);
    458458    else {
    459459      if (write(p1[1], fi->fn, strlen(fi->fn)+1) ==- 1)
    460         ohshite(_("failed to write filename to tar pipe (data)"));
     460        ohshite(_("failed to write filename to gnutar pipe (data)"));
    461461    }
    462462  close(p3[0]);
    463463  waitsubproc(c3,"find",0);
    464464
    465465  for (fi= symlist;fi;fi= fi->next)
    466466    if (write(p1[1], fi->fn, strlen(fi->fn)+1) == -1)
    467       ohshite(_("failed to write filename to tar pipe (data)"));
     467      ohshite(_("failed to write filename to gnutar pipe (data)"));
    468468  /* All done, clean up wait for tar and gzip to finish their job */
    469469  close(p1[1]);
    470470  free_filist(symlist);
    471   waitsubproc(c2,"<compress> from tar -cf",0);
    472   waitsubproc(c1,"tar -cf",0);
     471  waitsubproc(c2,"<compress> from gnutar -cf",0);
     472  waitsubproc(c1,"gnutar -cf",0);
    473473  /* Okay, we have data.tar.gz as well now, add it to the ar wrapper */
    474474  if (!oldformatflag) {
    475475    const char *datamember;