# dpkg-split

## NAME



           dpkg-split - Debian package archive split/join tool
    


## SYNOPSIS



           **dpkg-split**[_option_...] _command_
    


## DESCRIPTION



           **dpkg-split** splits Debian binary package files into smaller parts
           and reassembles them again, to support the storage of large
           package files on small media such as floppy disks.
    
           It can be operated manually using the **--split** , **--join** and **--info**
           options.
    
           It also has an automatic mode, invoked using the **--auto** option,
           where it maintains a queue of parts seen but not yet reassembled
           and reassembles a package file when it has seen all of its parts.
           The **--listq** and **--discard** options allow the management of the
           queue.
    
           All splitting, joining and queueing operations produce informative
           messages on standard output; these may safely be ignored.
    


## COMMANDS



           **-s** , **--split** _complete-archive_ [_prefix_]
               Splits a single Debian binary package into several parts.
    
               The parts are named _prefix_**.**_N_**of** _M_**.deb** where _N_ is the part
               number, starting at 1, and _M_ is the total number of parts
               (both in decimal).
    
               If no _prefix_ is supplied then the _complete-archive_ filename is
               taken, including directory, with any trailing **.deb** removed.
    
           **-j** , **--join** _part_...
               Joins the parts of a package file together, reassembling the
               original file as it was before it was split.
    
               The part files given as arguments must be all the parts of
               exactly the same original binary file.  Each part must occur
               exactly once in the argument list, though the parts to not
               need to be listed in order.
    
               The parts must of course all have been generated with the same
               part size specified at split time, which means that they must
               usually have been generated by the same invocation of **dpkg-**
               **split --split**.
    
               The parts' filenames are not significant for the reassembly
               process.
    
               By default the output file is called _package_**_**_version_**_**_arch_**.deb**.
    
           **-I** , **--info** _part_...
               Prints information, in a human-readable format, about the part
               file(s) specified.  Arguments which are not binary package
               parts produce a message saying so instead (but still on
               standard output).
    
           **-a** , **--auto -o** _complete-output part_
               Automatically queue parts and reassemble a package if
               possible.
    
               The _part_ specified is examined, and compared with other parts
               of the same package (if any) in the queue of packages file
               parts.
    
               If all parts of the package file of which _part_ is a part are
               available then the package is reassembled and written to
               _complete-output_ (which should not usually already exist,
               though this is not an error).
    
               If not then the _part_ is copied into the queue and _complete-_
               _output_ is not created.
    
               If _part_ is not a split binary package part then **dpkg-split**
               will exit with status **1** ; if some other trouble occurs then it
               will exit with status **2**.
    
               The **--output** or **-o** option must be supplied when using **--auto**.
               (If this were not mandatory the calling program would not know
               what output file to expect.)
    
           **-l** , **--listq**
               Lists the contents of the queue of packages to be reassembled.
    
               For each package file of which parts are in the queue the
               output gives the name of the package, the parts in the queue,
               and the total number of bytes stored in the queue.
    
           **-d** , **--discard**[_package_...]
               This discards parts from the queue of those waiting for the
               remaining parts of their packages.
    
               If no _package_ is specified then the queue is cleared
               completely; if any are specified then only parts of the
               relevant package(s) are deleted.
    
           **-?** , **--help**
               Show the usage message and exit.
    
           **--version**
               Show the version and exit.
    


## OPTIONS



           **--depotdir** _directory_
               Specifies an alternative directory for the queue of parts
               awaiting automatic reassembly.  The default is
               **/usr/local/var/lib/dpkg/parts**.
    
           **--admindir** _directory_
               Set the administrative directory to _directory_ (since dpkg
               1.21.10).  This is where the _statoverride_ file is stored.
               Defaults to « _/usr/local/var/lib/dpkg_ » if **DPKG_ADMINDIR** has not
               been set.
    
           **--root** _directory_
               Set the root directory to **directory**(since dpkg 1.21.10),
               which sets the installation directory to « _directory_ » and the
               administrative directory to « _directory_**/usr/local/var/lib/dpkg** »
               if **DPKG_ROOT** has not been set.
    
           **-S** , **--partsize** _kibibytes_
               Specifies the maximum part size when splitting, in kibibytes
               (1024 bytes).  The default is 450 KiB.
    
           **-o** , **--output** _complete-output_
               Specifies the output file name for a reassembly.
    
               This overrides the default for a manual reassembly (**--join**)
               and is mandatory for an automatic queue-or-reassemble
               (**--auto**).
    
           **-Q** , **--npquiet**
               When doing automatic queue-or-reassembly **dpkg-split** usually
               prints a message if it is given a _part_ that is not a binary
               package part.  This option suppresses this message, to allow
               programs such as **dpkg** to cope with both split and unsplit
               packages without producing spurious messages.
    
           **--msdos**
               Forces the output filenames generated by **--split** to be MSDOS-
               compatible.
    
               This mangles the prefix - either the default derived from the
               input filename or the one supplied as an argument:
               alphanumerics are lowercased, plus signs are replaced by **x** 's
               and all other characters are discarded.
    
               The result is then truncated as much as is necessary, and
               filenames of the form _prefixN_**of** _M_**.deb** are generated.
    


## EXIT STATUS



           **0** The requested split, merge, or other command succeeded.
               **--info** commands count as successful even if the files are not
               binary package parts.
    
           **1** Only occurs with **--auto** and indicates that the _part_ file was
               not a binary package part.
    
           **2** Fatal or unrecoverable error due to invalid command-line
               usage, a file that looked like a package part file but was
               corrupted, or interactions with the system, such as accesses
               to the database, memory allocations, etc.
    


## ENVIRONMENT



           **DPKG_ROOT**
               If set and **--root** option has not been specified, it will be
               used as the filesystem root directory (since dpkg 1.21.10).
    
           **DPKG_ADMINDIR**
               If set and the **--admindir** or **--root** options have not been
               specified, it will be used as the **dpkg** data directory (since
               dpkg 1.21.10).
    
           **DPKG_DEBUG**
               Sets the debug mask (since dpkg 1.21.10) from an octal value.
               The currently accepted flags are described in the **dpkg --debug**
               option, but not all these flags might have an effect on this
               program.
    
           **DPKG_COLORS**
               Sets the color mode (since dpkg 1.18.5).  The currently
               accepted values are: **auto**(default), **always** and **never**.
    
           **DPKG_NLS**
               If set, it will be used to decide whether to activate Native
               Language Support, also known as internationalization (or i18n)
               support (since dpkg 1.22.7).  The accepted values are: **0** and **1**
               (default).
    
           **SOURCE_DATE_EPOCH**
               If set, it will be used as the timestamp (as seconds since the
               epoch) in the deb-split(5)'s **ar**(5) container.
    
               Since dpkg 1.18.11.
    


## FILES



           _/usr/local/var/lib/dpkg/parts_
               The default queue directory for part files awaiting automatic
               reassembly.
    
               The filenames used in this directory are in a format internal
               to **dpkg-split** and are unlikely to be useful to other programs,
               and in any case the filename format should not be relied upon.
    


## SECURITY



           Examining or joining untrusted split package archives should be
           considered a security boundary, and any breakage of that boundary
           stemming from these operations should be considered a security
           vulnerability.  Performing these operations over untrusted data as
           root is strongly discouraged.
    
           Auto-accumulating and discarding split package parts are
           considered privileged operations that might allow root escalation.
           These operations must never be delegated to an untrusted user or
           be done on untrusted packages, as that might allow root access to
           the system.
    
           Splitting package archives should only be performed over trusted
           data.
    


## BUGS



           Full details of the packages in the queue are impossible to get
           without digging into the queue directory yourself.
    
           There is no easy way to test whether a file that may be a binary
           package part is one.
    


* * *