diff --git a/mmdebstrap b/mmdebstrap index ee1973e..ca171be 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -3658,9 +3658,13 @@ sub main() { # figure out whether a tarball has to be created in the end $options->{maketar} = 0; $options->{makesqfs} = 0; - if ( defined $tar_compressor + if ( + defined $tar_compressor or $options->{target} =~ /\.tar$/ - or $options->{target} eq '-') { + or $options->{target} eq '-' + or -p $options->{target} # named pipe (fifo) + or -c $options->{target} # character special like /dev/null + ) { $options->{maketar} = 1; # check if the compressor is installed if (defined $tar_compressor) { @@ -4567,30 +4571,31 @@ https URI, then the packages apt-transport-https and ca-certificates will be installed inside the chroot. If any mirror contains a tor+xxx URI, then the apt-transport-tor package will be installed inside the chroot. -The optional I argument can either be the path to a directory, the -path to a tarball filename, the path to a squashfs image or C<->. If I -ends with C<.tar>, or with any of the filename extensions listed in the -section B, then I will be interpreted as a path to a -tarball filename. If I ends with C<.squashfs> or C<.sqfs>, then -I will be interpreted as a path to a squashfs image. If I is -the path to a tarball filename or a squashfs image or if I is C<-> or -if no I was specified, B will create a temporary chroot +The optional I argument can either be the path to a directory, the path +to a tarball filename, the path to a squashfs image, a FIFO, a character +special device, or C<->. If I ends with C<.tar>, or with any of the +filename extensions listed in the section B, or if I is a +FIFO or a character special device, then I will be interpreted as a +path to a tarball filename. If I ends with C<.squashfs> or C<.sqfs>, +then I will be interpreted as a path to a squashfs image. If I +is the path to a tarball filename or a squashfs image or if I is C<-> +or if no I was specified, B will create a temporary chroot directory in C<$TMPDIR> or F. If I is the path to a tarball -filename, B will create a tarball of that directory and store it -as I, optionally applying a compression algorithm as indicated by its -filename extension. If I is C<-> or if no I was specified, -then an uncompressed tarball of that directory will be sent to standard -output. When B creates a tarball it also stores extended -attributes. To preserve the extended attributes, you have to pass B<--xattrs ---xattrs-include='*'> to tar when extracting the tarball. If I is the -path to a squashfs image, B will create an xz compressed image -with a blocksize of 1048576 bytes. If I does neither end with C<.tar> -nor with any of the filename extensions listed in the section B, -nor with C<.squashfs> or C<.sqfs>, then I will be interpreted as the -path to a directory. If the directory already exists, it must either be empty -or only contain an empty C directory. If a directory is chosen as -output in any other mode than B, then its contents will have wrong -ownership information and special device files will be missing. +filename, B will create a tarball of that directory and store it as +I, optionally applying a compression algorithm as indicated by its +filename extension. If I is C<-> or if no I was specified, then +an uncompressed tarball of that directory will be sent to standard output. When +B creates a tarball it also stores extended attributes. To preserve +the extended attributes, you have to pass B<--xattrs --xattrs-include='*'> to +tar when extracting the tarball. If I is the path to a squashfs image, +B will create an xz compressed image with a blocksize of 1048576 +bytes. If I does neither end with C<.tar> nor with any of the filename +extensions listed in the section B, nor with C<.squashfs> or +C<.sqfs>, then I will be interpreted as the path to a directory. If the +directory already exists, it must either be empty or only contain an empty +C directory. If a directory is chosen as output in any other mode +than B, then its contents will have wrong ownership information and +special device files will be missing. The I may be a valid release code name (eg, sid, stretch, jessie) or a symbolic name (eg, unstable, testing, stable, oldstable). Any suite name that