* dpkg --record-avail puts data in Size field.
* strip / for rmdir(2) in cleanup to work around kernel bug. (Bug#3275.)
* dpkg-split --msdos no longer allows `-' and other chars in filenames.
* manual dpkg-split(8) written.
* dpkg-split minor typo in --auto usage error message fixed.
* dpkg-deb(8) very minor cosmetic fix to --build option.
-- Ian Jackson <ian@chiark.chu.cam.ac.uk> Tue, 25 Jun 1996 03:00:14 +0100
* remove old docs from /usr/doc/dpkg.
other stuff unlikely to get done soon
+ * Filename field generated by --record-avail handle split packages somehow.
* understand Replaces in dselect
* provide way for package to declare ownership of files for dpkg -S
and -L without having dpkg act on this
* `fake' or `null' packages
* --purge remove empty directories which used too contain conffiles
* conffiles handling options, including `replace removed files'
+ * `diff' option at conffile prompt
done
* highlight or pre-sort or something new or changed packages,
+dpkg (1.2.8); priority=LOW
+
+ * dpkg --record-avail puts data in Size field.
+ * strip / for rmdir(2) in cleanup to work around kernel bug. (Bug#3275.)
+ * dpkg-split --msdos no longer allows `-' and other chars in filenames.
+
+ * manual dpkg-split(8) written.
+ * dpkg-split minor typo in --auto usage error message fixed.
+ * dpkg-deb(8) very minor cosmetic fix to --build option.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk> Tue, 25 Jun 1996 03:00:14 +0100
+
dpkg (1.2.7); priority=LOW
* dpkg-scanpackages syntax errors fixed.
#!/usr/bin/make -f
package=dpkg
-version=1.2.7
+version=1.2.8
archi=$(shell dpkg --print-architecture)
DIR:=$(shell pwd)
It documents the utility programs which are provided with <tt/dpkg/
for managing various system configuration and similar issues (such as
<tt/update-rc.d/ and <tt/install-info/.
-<p>
It also documents the interaction between <tt/dselect/'s core and the
access method scripts it uses to actually install the selected
The binary package has two main sections: the first part consists of
various control information files and scripts used by <tt/dpkg/ when
-installing and removing, and the second part is an archive (currently
-a <tt/tar/ archive) containing files and directories to be installed.
+installing and removing.
+<p>
+
+The second part is an archive (currently a <tt/tar/ archive)
+containing files and directories to be installed. See <ref
+id="controlarea">.
+<p>
+
In the future binary packages may also contain other components, such
as checksums and digital signatures.
<p>
-The control information files are described in <ref id="controlarea"
-name="the control information section">.
<sect1>Creating package files -- <tt/dpkg-deb/
You need to add one special directory to the root of the miniature
filesystem tree you're creating: <tt/DEBIAN/. It should contain the
control information files, notably the main package control file (see
-<ref id="controlarea" name="later"> for details of what files to put
-here.
+<ref id="controlarea">).
<p>
The <tt/DEBIAN/ directory will not appear in the filesystem archive of
This is the key description file used by <tt/dpkg/. It specifies the
package's name and version, gives its description for the user, states
-its relationships with other packages, and so forth. Its format is
-described in more detail in <ref id="controlfile"
-name="its own section">.
+its relationships with other packages, and so forth.
+See <ref id="controlfile">.
<tag><tt/postinst/, <tt/preinst/, <tt/postrm/, <tt/prerm/</tag>
during installation, upgrade and removal of packages. They allow the
package to deal with matters which are particular to that package or
require more complicated processing than that provided by <tt/dpkg/.
-Details of when and how they are called are in <ref
-id="maintainerscripts">.
+Details of when and how they are called are in
+<ref id="maintainerscripts">.
<tag/<tt/conffiles//
This file contains a list of configuration files which are to be
-handled automatically by <tt/dpkg/. Details of this mechanism are in
-<ref id="conffiles" name="a separate section">. Note that not all a
-package's configuration files should be listed here.
+handled automatically by <tt/dpkg/ (see <ref id="conffiles">). Note
+that not necessarily every configuration file should be listed here.
</descrip>
<tag/<tt/Version//
-This lists the package's version number. See the section on version
-numbers <ref id="versions" name="later"> for details.
+This lists the package's version number - see <ref id="versions">.
This field is mandatory.
<tt/Conflicts/, <tt/Provides/, <tt/Replaces/</tag>
These fields describe the package's relationships with other packages.
-Their syntax and semantics are described in the package relationships
-section <ref id="depconoverwr" name="later">.
+Their syntax and semantics are described in <ref id="depconoverwr">.
<tag/<tt/Source//
This field contains a description of the package, in a special format.
<p>
-It is very important that you read the section <ref id="descriptions"
-name="later"> on how to write a description.
+It is very important that you read <ref id="descriptions">.
<tag/<tt/Essential//
<tt/postrm/ afterwards.
<p>
-See <ref id="maintscripts-instact" name="later"> for details of
-exactly when and how these scripts are called and with what arguments.
+See <ref id="maintscripts-instact"> for details of exactly when and
+how these scripts are called and with what arguments.
<sect>Declaring relationships between packages<label id="depconoverwr">
<p>
This is done using the <tt/Depends/, <tt/Recommends/, <tt/Suggests/,
-<tt/Conflicts/, <tt/Provides/ and <tt/Replaces control file fields.
+<tt/Conflicts/, <tt/Provides/ and <tt/Replaces/ control file fields.
<p>
<sect>Syntax of relationship fields
to particular versions of each named package. This is done in
parentheses after each individual package name; the parentheses should
contain a relation from the list below followed by a version number,
-in the format described in <ref id="versions" name="the version number
-section, above">.
+in the format described in <ref id="versions">.
<p>
The relations allowed are
**** WRITE THIS
+</descrip>
+
<sect1>Alternative packages - <tt/Conflicts/
**** WRITE THIS
**** WRITE THIS
-<sect1>Overwriting files - <tt/Replaces/
+<sect1>Overwriting files - <tt/Replaces/<label id="replaces">
**** WRITE THIS
-<tt/<</
-<tt/<</
-<tt/<</
-<descrip>
-<tag><
-
<sect>Order of processing steps and maintainer script arguments<label id="maintscripts-instact">
<sect1>Summary of ways maintainer scripts are called
<p>
It is an error for a package to contains files which are on the system
-in another package, unless <tt/Replaces/ is used (see <ref
-id="replaces" name="earlier">). Currently the <tt/--force-overwrite/
-flag is enabled, downgrading it to a warning, but this will not always
-be the case.
+in another package, unless <tt/Replaces/ is used
+(see <ref id="replaces">). Currently the <tt/--force-overwrite/ flag
+is enabled, downgrading it to a warning, but this will not always be
+the case.
<p>
Packages which overwrite each other's files produce behaviour which
and run it for you.
.SH ACTION OPTIONS
.TP
-.BR -b ", " --build
+.BR --build ", " -b
Creates a debian archive from the filesystem tree stored in
.IR directory ". " directory
must have a
void cu_cidir(int argc, void **argv) {
char *cidir= (char*)argv[0];
char *cidirrest= (char*)argv[1];
- *cidirrest= 0;
+ cidirrest[-1]= 0;
ensure_pathname_nonexisting(cidir);
}
pfilename= filename;
}
+ if (stat(filename,&stab)) ohshite("existence check failed");
+
if (!f_noact) {
/* We can't `tentatively-reassemble' packages. */
if (!reasmbuf) {
parsedb(cidir, pdb_recordavailable|pdb_rejectstatus|pdb_weakclassification,
&pkg,0,0);
+ pkg->files= nfmalloc(sizeof(struct filedetails));
+ pkg->files->next= 0;
+ pkg->files->name= pkg->files->msdosname= pkg->files->md5sum= 0;
+ pkg->files->size= nfmalloc(30);
+ sprintf(pkg->files->size,"%lu",(unsigned long)stab.st_size);
if (cipaction->arg == act_avail) {
printf("Recorded info about %s from %s.\n",pkg->name,pfilename);
.\" Hey, Emacs! This is an -*- nroff -*- source file.
-.TH DPKG\-SPLIT 8 "29th November 1995" "Debian Project" "Debian GNU/Linux"
+.\" Authors: Ian Jackson
+.TH dpkg-split 1 "23rd June 1996" "Debian Linux"
.SH NAME
-dpkg\-split \- Debian multipart package manipulation tool
+dpkg\-split \- Debian package archive split/join tool
+.SH SYNOPSIS
+.B dpkg-split
+.BR -s | --split
+.IR complete\-archive " [" prefix ]
+.br
+.B dpkg-split
+.BR -j | --join
+.IR "part part " ...
+.br
+.B dpkg-split
+.BR -I | --info
+.IR "part part " ...
+.br
+.B dpkg-split
+.BR -a | --auto
+.BI -o " complete\-output part"
+.br
+.B dpkg-split
+.BR -l | --listq
+.br
+.B dpkg-split
+.BR -d | --discard
+.RI [ "package package " ...]
.SH DESCRIPTION
+.B 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
+.BR --split ", " --join " and " --info
+options.
+
+It also has an automatic mode, invoked using the
+.B --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
+.BR --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.
+.SH ACTION OPTIONS
+.TP
+.BR --split ", " -s
+Splits a single Debian binary package into several parts.
+
+The parts are named
+.IB prefix . N of M .deb
+where
+.I N
+is the part number, starting at 1, and
+.I M
+is the total number of parts (both in decimal).
+
+If no
+.I prefix
+is supplied then the
+.I complete\-archive
+filename is taken, including directory, with any trailing
+.B .deb
+removed.
+.TP
+.BR --join ", " -j
+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
+.BR "dpkg-split --split" .
+
+The parts' filenames are not significant for the reassembly process.
+
+By default the output file is called
+.IB package - version .deb
+\&.
+.TP
+.BR --info ", " -I
+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).
+.TP
+.BR --auto ", " -a
+Automatically queue parts and reassemble a package if possible.
+
+The
+.I 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
+.I part
+is a part are available then the package is reassembled and written to
+.I complete\-output
+(which should not usually already exist, though this is not an
+error).
+
+If not then the
+.I part
+is copied into the queue and
+.I complete\-output
+is not created.
+
+If
+.I part
+is not a split binary package part then
.B dpkg\-split
-does not have a useful man page. Please do not report this as a bug,
-as this has already been done many times.
+will exit with status 1; if some other trouble occurs then it will
+exit with status 2.
-Instead, if you are a competent and accurate writer and are willing to
-spend the time reading the source code and writing good manpages
-please write a better man page than this one.
+The
+.BR --output " or " -o
+option must be supplied when using
+.BR --auto .
+(If this were not mandatory the calling program would not know what
+output file to expect.)
+.TP
+.BR --listq ", " -l
+Lists the contents of the queue of packages to be reassembled.
-Type
-.B dpkg\-split \-\-help
-for a brief summary of how to use dpkg.
+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.
+.TP
+.BR --discard ", " -d
+This discards parts from the queue of those waiting for the remaining
+parts of their packages.
+If no
+.I package
+is specified then the queue is cleared completely; if any are
+specified then only parts of the relevant package(s) are deleted.
+.TP
+.BR --help ", " -h
+Prints
+.BR dpkg\-split 's
+usage message, giving a summary of its options and their uses.
+.TP
+.BR --version
+Prints
+.BR dpkg\-split 's
+version number.
+.TP
+.BR --licence
+Prints information about
+.BR dpkg\-split 's
+copyright licensing and lack of warranty. (The American spelling
+.B \-\-license
+is also supported.)
+.SH OTHER OPTIONS
+.TP
+.BI --depotdir " directory"
+Specifies an alternative directory for the queue of parts awaiting
+automatic reassembly. The default is
+.BR /var/lib/dpkg .
+.TP
+.BI --partsize\fR|\fB-S " kbytes"
+Specifies the maximum part size when splitting, in kilobytes (1024
+bytes). The default is 450Kb.
+.TP
+.BI --output\fR|\fB-O " complete\-output"
+Specifies the output file name for a reassembly.
+
+This overrides the default for a manual reassembly
+.RB ( \-\-join )
+and is mandatory for an automatic queue-or-reassemble
+.RB ( \-\-auto ).
+.TP
+.BR --npquiet ", " -Q
+When doing automatic queue-or-reassembly
+.B dpkg\-split
+usually prints a message if it is given a
+.I part
+that is not a binary package part. This option suppresses this
+message, to allow programs such as
+.B dpkg
+to cope with both split and unsplit packages without producing
+spurious messages.
+.TP
+.BR --msdos
+Forces the output filenames generated by
+.B \-\-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
+.BR x 's
+and all other characters are discarded.
+
+The result is then truncated as much as is necessary, and filenames of
+the form
+.IB "prefixN" of M .deb
+are generated.
+.SH EXIT STATUS
+An exit status of 0 indicates that the requested split, merge, or
+other command succeeded.
+.B \-\-info
+commands count as successful even if the files are not binary package
+parts.
+
+An exit status of 1 occurs only with
+.B \-\-auto
+and indicates that the
+.I part
+file was not a binary package part.
+
+An exit status of 2 indicates some kind of trouble, such as a system
+call failure, a file that looked like a package part file but was
+corrupted, a usage error or some other problem.
+.SH BUGS
+.B dpkg\-split
+uses some rather out-of-date conventions for the the filenames of
+Debian packages.
+
+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.
+
+The architecture is not represented in the part files' header, only in
+the control information of the contained binary package file, and it
+is not present in the filenames generated.
+.SH FILES
+.TP
+.B /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
+.B dpkg\-split
+and are unlikely to be useful to other programs, and in any case the
+filename format should not be relied upon.
+.SH SEE ALSO
+.BR dpkg\-split (5),
+.BR dpkg\-deb (5),
+.BR dpkg\-deb (8),
+.BR dpkg (8)
.SH AUTHOR
-Ian Jackson <ijackson@gnu.ai.mit.edu>.
+.B dpkg\-split
+and this manpage were written by Ian Jackson. They are
+Copyright (C) 1995-1996
+by him and released under the GNU General Public Licence; there is NO
+WARRANTY. See
+.B /usr/doc/copyright/dpkg
+and
+.B /usr/doc/copyright/GPL
+for details.
if ($msdos) {
$prefixdir= $prefix; $prefixdir =~ s:(/?)/*[^/]+$:$1:;
$cleanprefix= $prefix; $cleanprefix =~ s:^.*/+::;
- $cleanprefix =~ y/-A-Za-z0-9+/-a-za-z0-9x/d;
+ $cleanprefix =~ y/A-Za-z0-9+/a-za-z0-9x/;
+ $cleanprefix =~ y/a-z0-9//cd;
}
sub add {
if ($msdos) {
$prefixdir= $prefix; $prefixdir =~ s:(/?)/*[^/]+$:$1:;
$cleanprefix= $prefix; $cleanprefix =~ s:^.*/+::;
- $cleanprefix =~ y/-A-Za-z0-9+/-a-za-z0-9x/d;
+ $cleanprefix =~ y/A-Za-z0-9+/a-za-z0-9x/;
+ $cleanprefix =~ y/a-z0-9//cd;
}
sub add {
if (!outputfile) badusage("--auto requires the use of the --output option");
if (!(partfile= *argv++) || *argv)
- badusage("--auto requires exactly one part file arguments");
+ badusage("--auto requires exactly one part file argument");
refi= nfmalloc(sizeof(struct partqueue));
part= fopen(partfile,"r");
-#define DPKG_VERSION "1.2.5" /* This line modified by Makefile */
+#define DPKG_VERSION "1.2.8" /* This line modified by Makefile */