summaryrefslogtreecommitdiff
path: root/lorry.tar-importer
Commit message (Collapse)AuthorAgeFilesLines
* lorry.tar-importer: Improve support for PAX extended headerspedro/fix-gcc-tar-importPedro Alvarez Piedehierro2018-05-211-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes the tar files will contain PAX extended headers to deal with cases where the information needed doesn't fit initial header. One of these cases is when the path is larger than 100 characters. An extended header will appear before the block including the contents of this file, including information about the entire path. The PAX extended headers contain one or multiple records constructed as follows: "%d %s=%s\n", <length>, <keyword>, <value> This commit makes sure that we always read the extended header blocks, and in the case of finding one, we parse its records looking for 'path' information. If this information is found, is stored for the next iteration. As a side effect, this commit also fixes a bug where we weren't ignoring the extended header contents because the truncated path was ending on '/' and the script was skipping any actions given that it thought that it was a folder (and it wasn't).
* Ignore extended header fields in tar archivesRichard Ipsum2015-08-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bsd tar stores file attributes as extended headers, which are ignored by gnu tar. The tar importer currently treats these headers as regular files, so regular files containing attribute data are created on extraction even though they never existed at archive creation. This can be a problem for CPAN imports, some CPAN distributions are created using bsd tar, the extended headers in these archives result in a modified directory structure, e.g. where the structure on the developer's machine would be Foo: META.json META.yml Makefile.PL ... in trove we could have, Foo: Foo/ Foo/META.json Foo/META.yml Foo/Makefile.PL PAXHeader/ PAXHeader/Foo ... this structure causes the default build-commands to fail because they expect to find Makefile.PL in the repo's root dir. Change-Id: Ia8f90c3be7b31f7a4ac774022cb606fc1c57c002
* Make tarball lorries reproducibleRichard Ipsum2015-07-141-6/+6
| | | | | | | We don't want the sha to depend on where the lorry was imported from or the time at which the lorry occurred, or the user's environment. Change-Id: Iccc54f358a1a6133438984e769485b702ebb1a2e
* Fix up Lorry to expect repositories to be bare.Daniel Silverstone2012-09-241-0/+205
This patch makes Lorry always create bare repositories where it can (Note that it cannot for CVS imports) and to create tarballs of bare repositories (if not disabled) which will be more efficient than bundles for creation and cloning. We may be able to disable bundles later.