Archive-Tar-Wrapper

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    reasons. For this reason, Archive::Tar::Wrapper offers a utility
    functions that mounts the RAM disk and returns the temporary directory
    it's located in:

        # Create new ramdisk (as root):
        my $tmpdir = Archive::Tar::Wrapper->ramdisk_mount(
            type => 'tmpfs',
            size => '20m',   # 20 MB
        );

        # Delete a ramdisk (as root):
        Archive::Tar::Wrapper->ramdisk_unmount();

    Optionally, the ramdisk_mount() command accepts a "tmpdir" parameter
    pointing to a temporary directory for the RAM disk if you wish to set it
    yourself instead of letting Archive::Tar::Wrapper create it
    automatically.

KNOWN LIMITATIONS
    *   Currently, only "tar" programs supporting the "z" option (for
        compressing/decompressing) are supported. Future version will use
        "gzip" alternatively.

    *   Currently, you can't add empty directories to a tarball directly.
        You could add a temporary file within a directory, and then remove()
        the file.

    *   If you delete a file, the empty directories it was located in stay
        in the tarball. You could try to locate() them and delete them. This
        will be fixed, though.

    *   Filenames containing newlines are causing problems with the list
        iterators. To be fixed.

    *   If you ask Archive::Tar::Wrapper to add a file to a tarball, it
        copies it into a temporary directory and then calls the system tar
        to wrap up that directory into a tarball.

        This approach has limitations when it comes to file permissions: If
        the file to be added belongs to a different user/group,
        Archive::Tar::Wrapper will adjust the uid/gid/permissions of the
        target file in the temporary directory to reflect the original
        file's settings, to make sure the system tar will add it like that
        to the tarball, just like a regular tar run on the original file
        would. But this will fail of course if the original file's uid is
        different from the current user's, unless the script is running with
        superuser rights. The tar program by itself (without
        Archive::Tar::Wrapper) works differently: It'll just make a note of
        a file's uid/gid/permissions in the tarball (which it can do without
        superuser rights) and upon extraction, it'll adjust the permissions
        of newly generated files if the -p option is given (default for
        superuser).

BUGS
    Archive::Tar::Wrapper doesn't currently handle filenames with embedded
    newlines.

  Microsoft Windows support
    Support on Microsoft Windows is limited.

    Versions below Windows 10 will not be supported for desktops, and for
    servers only Windows 2012 and above.

    The GNU "tar.exe" program doesn't work properly with the current
    interface of Archive::Tar::Wrapper.

    You must use the "bsdtar.exe" and make sure it appears first in the
    "PATH" environment variable than the GNU tar (if it is installed). See
    <http://libarchive.org/> for details about how to download and install
    "bsdtar.exe", or go to <http://gnuwin32.sourceforge.net/packages.html>
    for a direct download. Be sure to look for the "bzip2" program package
    to install it as well.

    Windows 10 might come already with "bsdtar" program already installed.
    Please search for that on the appropriate page (Microsoft keeps changing
    the link to keep track of it here).

    Having spaces in the path string to the tar program might be an issue
    too. Although there is some effort in terms of workaround it, you best
    might avoid it completely by installing in a different path than
    "C:\Program Files". Installing both "bsdtar" and "bzip2" in
    "C:\GnuWin32" will probably be enough when running the installers.

SEE ALSO
    *   Linux Gazette article from Ben Okopnik, issue 87
        <https://linuxgazette.net/87/okopnik.html>.

BUGS
    Please report any bugs or feature requests on the bugtracker website
    <https://github.com/haarg/Archive-Tar-Wrapper/issues>

    When submitting a bug or request, please include a test-file or a patch
    to an existing test-file that illustrates the bug or desired feature.

AUTHORS
    *   Mike Schilli <cpan@perlmeister.com>

    *   Alceu Rodrigues de Freitas Junior <glasswalk3r@yahoo.com.br>

CONTRIBUTORS
    *   Chris Weyl <cweyl@alumni.drew.edu>

    *   David Cantrell <david@cantrell.org.uk>

    *   David Precious <davidp@preshweb.co.uk>

    *   Graham Knop <haarg@haarg.org>

    *   intrigeri <intrigeri@boum.org>

    *   Kent Fredric <kentfredric@gmail.com>

    *   Mark Gardner <mjg+github@phoenixtrap.com>

    *   Mike Schilli <github@perlmeister.com>

    *   Mohammad S Anwar <mohammad.anwar@yahoo.com>

    *   Paulo Custodio <pauloscustodio@gmail.com>

    *   Randy Stauner <randy@magnificent-tears.com>



( run in 0.794 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )