Dumb test looking for either a Copyright header or sign that the file
was autogenerated (e.g. by `go generate`) in all non-Godep .go files.
Also moves the actual unit/functional tests after the pre-flight checks
(gofmt, go vet, this new check)
this introduces tar extraction inside a chroot. This is done spawning a
new process. Instead of creating a new executable (difficult to find,
package etc...) it adds the concept of a multicall process (like busybox).
Now a new multicall command "extracttar" is added.
tar.ExtractTar executes this new command passing a pipe to send the
filesMap and the tar contents to stdin.
The incomplete "insecure link" checks are removed from the the tar
functions. Additionally these functions are now not exported and the
extraction directory is always the root directory.
Restore the extracted entry uid and gid. This uses tar header Uid and Gid
values and ignores header's Uname and Gname.
As the tests are usually run as a unprivileged user the generated test tars'
entries are defaulted to the running user uid and gid. For this reason tests
are implictly verifing that the os.Chown/os.LChows calls works but it's
difficult to create a more comprehensive test using different uid and gid
values.
Add an overwrite option to ExtractTar so, calling the function on a non empty
directory, will overwrite existing files instead of returning an error.
It's needed during ACI rendering, as (in the actual implementation), extracting
a dependency list of ACIs over the same directory, the files provided by the
next ACI in the list have to overwrite the ones previously extracted.