ericvaandering / DocDB

Working repository for DocDB
25 stars 18 forks source link

RetrieveArchive 8.8.9 includes unwanted file in tar/zip archives #91

Closed lauramengel closed 6 years ago

lauramengel commented 6 years ago

Please "--exclude=filenamehere" or or "-x filenamehere" in the 4 tar/zip system commands in RetrieveArchive.

The code in 8.7.23 already does this.

lauramengel commented 6 years ago

From: Eric

I suspect I missed a forward porting of a patch. Good to know, should be trivial

Sounds good. Is there some way to figure out if we missed any other patches?

ericvaandering commented 6 years ago

Actually, I did not miss the patch. Looking at FSUtilities.pm it seems the file can be included if you are using the combination of regular tar and gzip, but not if $GTar is defined. Can you check what you have in ProjectGlobals.pm? You should have GNU Tar on the system which can do this in one go rather than relying on piping UNIX tar into gzip.

I'll check if UNIX tar has the correct option.

lauramengel commented 6 years ago

Hi. I see as you say that both 8.7.23 and 8.8.9 have the excludes in FSUtilties.

However, RetrieveArchive is different between 8.7.23 and 8.8.9. The code in 8.7.23 RetrieveArchive does the exclude on the four system commands, but the 8.8.9 does not.

To answer your questions:

The system running DocDB has /bin/tar -bash-4.2$ /bin/tar --version tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc.

All the related lines in ProjectGlobals.pm are commented out.

$Tar = ""; # Set this if you don't have GNU tar

$GTar = "/bin/tar "; # Set this if you do have GNU tar (e.g. Linux)

$GZip = "/bin/gzip "; # Currently only needed if non-GNU tar

$GUnzip = "/bin/gunzip "; # Currently only needed if non-GNU tar

$Unzip = "/usr/bin/unzip -q ";

$Zip = "/usr/bin/zip -q -r "; # Set to "" in ProjectGlobals if not installed

But DocDBGlobals in 8.8.9 has them defined: $Tar = ""; $GTar = "/bin/tar "; $GZip = "/bin/gzip "; $GUnzip = "/bin/gunzip "; $Unzip = "/usr/bin/unzip -q "; $Zip = "/usr/bin/zip -q -r "; # Set to "" in ProjectGlobals if not installed if (!$Tar && $GTar) { $Tar = $GTar; }

ericvaandering commented 6 years ago

Fixed by #94

There isn't really a way to easily see missed commits this old. We were on CVS which doesn't give a nice history (you can't actually see merges) and the code has diverged too much.