* manpage for dpkg-source et al now available.
* dpkg-changelog-mode.el installed in site-lisp, but still no autoload.
* dpkg-source prints correct string for not-understood tar -vvt output.
* dpkg-source parsing of tar -vvt output made more robust.
* dpkg-buildpackage prints usage message on usage error.
* dpkg-gencontrol can print usage message.
* -T<varlistfile> option added to dpkg-source.
* Description of -f<fileslistfile> corrected in dpkg-distaddfile usage.
* -m<maintainer> synopsis changed in dpkg-genchanges usage.
* debian/substvars may now contain blank lines.
-- Ian Jackson <ian@chiark.chu.cam.ac.uk> Thu, 8 Aug 1996 02:36:04 +0100
dpkglibdir = $(libdir)/dpkg
methodsdir = $(dpkglibdir)/methods
parsechangelogdir = $(dpkglibdir)/parsechangelog
+elispdir = $(libdir)/emacs/site-lisp
datadir = /var/lib/dpkg
methodsdatadir = $(datadir)/methods
methodsmnt = $(datadir)/methods/mnt
$(BOURNESHELL) $(srcdir)/mkinstalldirs $(bindir) $(sbindir) \
$(man1dir) $(man5dir) $(man8dir) $(devdocdir) $(infodir) \
$(libdir) $(dpkglibdir) $(methodsdir) $(parsechangelogdir) \
- $(datadir) $(pinfodir) $(pupdatesdir) $(methodsdatadir) \
- $(methodsmnt) $(altsdatadir) $(altsetcdir) $(partsdir)
+ $(elispdir) $(datadir) $(pinfodir) $(pupdatesdir) \
+ $(methodsdatadir) $(methodsmnt) $(altsdatadir) \
+ $(altsetcdir) $(partsdir)
set -e; for d in $(SUBDIRS) ; do \
cd $$d ; \
$(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' \
+dpkg (1.3.1) experimental; urgency=LOW
+
+ * manpage for dpkg-source et al now available.
+ * dpkg-changelog-mode.el installed in site-lisp, but still no autoload.
+
+ * dpkg-source prints correct string for not-understood tar -vvt output.
+ * dpkg-source parsing of tar -vvt output made more robust.
+
+ * dpkg-buildpackage prints usage message on usage error.
+ * dpkg-gencontrol can print usage message.
+ * -T<varlistfile> option added to dpkg-source.
+ * Description of -f<fileslistfile> corrected in dpkg-distaddfile usage.
+ * -m<maintainer> synopsis changed in dpkg-genchanges usage.
+ * debian/substvars may now contain blank lines.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk> Thu, 8 Aug 1996 02:36:04 +0100
+
dpkg (1.3.0) experimental; urgency=LOW
* dpkg can install named pipes.
link never being removed at all.
ChangeLog begins Thu Aug 25 11:46:27 1994 for dpkg 0.93.5.
+
+Local variables:
+mode: dpkg-changelog
+End:
libdir = $(prefix)/lib
dpkglibdir = $(libdir)/dpkg
parsechangelogdir = $(dpkglibdir)/parsechangelog
+elispdir = $(libdir)/emacs/site-lisp
etcdir= /etc
altsetcdir = $(etcdir)/alternatives
perlpath = @perlpath@
-MAN1 = dpkg-name
+MAN1 = dpkg-name dpkg-source
+LSMAN = dpkg-source.$(man1)
+LSMANL= dpkg-gencontrol dpkg-genchanges dpkg-buildpackage \
+ dpkg-distaddfile dpkg-parsechangelog
EXC = dpkg-name dpkg-source dpkg-genchanges dpkg-gencontrol \
dpkg-buildpackage dpkg-parsechangelog dpkg-distaddfile
MAN8 = update-rc.d start-stop-daemon update-alternatives install-info \
SBIN = update-rc.d start-stop-daemon update-alternatives install-info \
dpkg-scanpackages dpkg-divert cleanup-info
LIB = controllib.pl
-CHGLGS = cl-dpkg
+ELISP = dpkg-changelog-mode.el
+CHGLGS= cl-dpkg
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
install: all
for f in $(EXC) ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
for f in $(MAN1) ; do $(INSTALL_DATA) $$f.1 $(man1dir)/$$f.$(man1) ; done
+ for f in $(LSMANL) ; do ln -s $(LSMAN) $(man1dir)/$$f.$(man1) ; done
for f in $(SBIN) ; do $(INSTALL_PROGRAM) $$f $(sbindir)/$$f ; done
for f in $(MAN8) ; do $(INSTALL_DATA) $$f.8 $(man8dir)/$$f.$(man8) ; done
- for f in $(LIB) ; do $(INSTALL_DATA) $$f $(dpkglibdir)/$$f; done
+ for f in $(LIB) ; do $(INSTALL_DATA) $$f $(dpkglibdir)/$$f ; done
+ for f in $(ELISP) ; do $(INSTALL_DATA) $$f $(elispdir)/$$f ; done
for f in $(CHGLGS) ; do $(INSTALL_PROGRAM) $$f \
$(dpkglibdir)/parsechangelog/`echo $$f | sed -e 's/^cl-//'` ; \
done
$varlistfile="./$varlistfile" if $varlistfile =~ m/\s/;
if (open(SV,"< $varlistfile")) {
while (<SV>) {
- next if m/^\#/;
+ next if m/^\#/ || !m/\S/;
s/\s*\n$//;
m/^(\w+)\=/ ||
&error("bad line in substvars file $varlistfile at line $.");
-us) signsource=: ;;
-uc) signchanges=: ;;
-b|-B) binaryonly=$1 ;;
- *) echo >&2 "$progname: unknown option or argument $1"; exit 2 ;;
+ *) echo >&2 "$progname: unknown option or argument $1"
+ usageversion; exit 2 ;;
esac
shift
done
--- /dev/null
+;; dpkg-changelog.el --- change log maintenance for dpkg-style changelogs
+
+;; Keywords: maint
+
+;; Copyright (C) 1996 Ian Jackson
+;; This file is part of dpkg.
+;;
+;; It is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; dpkg is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with your Debian installation, in /usr/doc/copyright/GPL.
+;; If not, write to the Free Software Foundation, 675 Mass Ave,
+;; Cambridge, MA 02139, USA.
+
+(require 'add-log)
+
+(defvar dpkg-changelog-urgencies
+ '((?l."LOW") (?m."MEDIUM") (?h."HIGH"))
+ "alist of keystrokes vs. urgency values dpkg-changelog-urgency ^c^u.")
+
+(defvar dpkg-changelog-distributions
+ '((?s."stable") (?u."unstable") (?c."contrib") (?n."non-free") (?e."experimental"))
+ "alist of keystrokes vs. distribution values for dpkg-changelog-distribution ^c^d.")
+
+(defvar dpkg-changelog-mode-map nil
+ "Keymap for dpkg changelog major mode.")
+(if dpkg-changelog-mode-map
+ nil
+ (setq dpkg-changelog-mode-map (make-sparse-keymap))
+ (define-key dpkg-changelog-mode-map "\C-c\C-a" 'dpkg-changelog-add-entry)
+ (define-key dpkg-changelog-mode-map "\C-c\C-f" 'dpkg-changelog-finalise-last-version)
+ (define-key dpkg-changelog-mode-map "\C-c\C-c" 'dpkg-changelog-finalise-and-save)
+ (define-key dpkg-changelog-mode-map "\C-c\C-v" 'dpkg-changelog-add-version)
+ (define-key dpkg-changelog-mode-map "\C-c\C-d" 'dpkg-changelog-distribution)
+ (define-key dpkg-changelog-mode-map "\C-c\C-u" 'dpkg-changelog-urgency)
+ (define-key dpkg-changelog-mode-map "\C-c\C-e"
+ 'dpkg-changelog-unfinalise-last-version))
+
+(defun dpkg-changelog-add-entry ()
+ "Add a new change entry to a dpkg-style changelog."
+ (interactive)
+ (if (eq (dpkg-changelog-finalised-p) t)
+ (error "most recent version has been finalised - use ^c^e or ^c^v"))
+ (goto-char (point-min))
+ (re-search-forward "\n --")
+ (backward-char 5)
+ (if (prog1 (looking-at "\n") (forward-char 1))
+ nil
+ (insert "\n"))
+ (insert " * ")
+ (save-excursion (insert "\n")))
+
+(defun dpkg-changelog-headervalue (arg re alist)
+ (let (a b v k
+ (lineend (save-excursion (end-of-line) (point))))
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward re lineend)
+ (setq a (match-beginning 1)
+ b (match-end 1))
+ (goto-char a)
+ (if arg nil
+ (message (mapconcat
+ (function (lambda (x) (format "%c:%s" (car x) (cdr x))))
+ alist " "))
+ (while (not v)
+ (setq k (read-char))
+ (setq v (assoc k alist))))
+ (delete-region a b)
+ (if arg nil (insert (cdr v))))
+ (if arg (goto-char a))))
+
+(defun dpkg-changelog-urgency (arg)
+ "Without argument, prompt for a key for a new urgency value (using
+dpkg-changelog-urgencies). With argument, delete the current urgency
+and position the cursor to type a new one."
+ (interactive "P")
+ (dpkg-changelog-headervalue
+ arg
+ "\\;[^\n]* urgency=\\(\\sw+\\)"
+ dpkg-changelog-urgencies))
+
+(defun dpkg-changelog-distribution (arg)
+ "Without argument, prompt for a key for a new distribution value (using
+dpkg-changelog-distributions). With argument, delete the current distribution
+and position the cursor to type a new one."
+ (interactive "P")
+ (dpkg-changelog-headervalue
+ arg
+ ") \\(.*\\)\\;"
+ dpkg-changelog-distributions))
+
+(defun dpkg-changelog-finalised-p ()
+ "Check whether the most recent dpkg-style changelog entry is
+finalised yet (ie, has a maintainer name and email address and a
+release date."
+ (save-excursion
+ (goto-char (point-min))
+ (if (re-search-forward "\n\\S-" (point-max) t) nil
+ (goto-char (point-max)))
+ (if (re-search-backward "\n --" (point-min) t)
+ (forward-char 4)
+ (beginning-of-line)
+ (insert " --\n\n")
+ (backward-char 2))
+ (cond
+ ((looking-at "[ \n]+\\S-[^\n\t]+\\S- <[^ \t\n<>]+> \\S-[^\t\n]+\\S-[ \t]*\n")
+ t)
+ ((looking-at "[ \t]*\n")
+ nil)
+ ("finalisation line has bad format (not ` -- maintainer <email> date')"))))
+
+(defun dpkg-changelog-add-version ()
+ "Add a new version section to a dpkg-style changelog file."
+ (interactive)
+ (let ((f (dpkg-changelog-finalised-p)))
+ (and (stringp f) (error f))
+ (or f (error "previous version not yet finalised")))
+ (goto-char (point-min))
+ (let ((headstring
+ (if (looking-at "\\(\\S-+ ([^()\n\t ]*[^0-9\n\t()]\\)\\([0-9]+\\)\\()[^\n]*\\)")
+ (concat (match-string 1)
+ (number-to-string (+ 1 (string-to-number (match-string 2))))
+ (match-string 3))
+ (let ((pkg (read-string "Package name: "))
+ (ver (read-version "New version (including any revision): ")))
+ (concat pkg " (" ver ") unstable; urgency="
+ (cdr (car dpkg-changelog-urgencies)))))))
+ (insert headstring "\n\n * ")
+ (save-excursion
+ (if (re-search-backward "\;[^\n]* urgency=\\(\\sw+\\)" (point-min) t)
+ (progn (goto-char (match-beginning 1))
+ (delete-region (point) (match-end 1))
+ (insert (cdr (car dpkg-changelog-urgencies))))))
+ (save-excursion (insert "\n\n --\n\n"))))
+
+(defun dpkg-changelog-finalise-and-save ()
+ "Finalise, if necessary, and then save a dpkg-style changelog file."
+ (interactive)
+ (let ((f (dpkg-changelog-finalised-p)))
+ (and (stringp f) (error f))
+ (or f (dpkg-changelog-finalise-last-version)))
+ (save-buffer))
+
+(defun dpkg-changelog-finalise-last-version ()
+ "Remove the `finalisation' information (maintainer's name and email
+address and release date) so that new entries can be made."
+ (interactive)
+ (or add-log-full-name (setq add-log-full-name (user-full-name)))
+ (or add-log-mailing-address (setq add-log-mailing-address user-mail-address))
+ (and (dpkg-changelog-finalised-p) (dpkg-changelog-unfinalise-last-version))
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward "\n --\\([ \t]*\\)")
+ (delete-region (match-beginning 1) (match-end 1))
+ (insert " " add-log-full-name " <" add-log-mailing-address "> ")
+ (let* ((dp "822-date")
+ (r (call-process dp nil t)))
+ (or (= r 0) (error (concat dp " returned error status " (prin1-to-string r)))))
+ (backward-char)
+ (or (looking-at "\n")
+ (error (concat "expected newline after date from " dp)))
+ (delete-char 1)))
+
+(defun dpkg-changelog-unfinalise-last-version ()
+ "Remove the `finalisation' information (maintainer's name and email
+address and release date) so that new entries can be made."
+ (interactive)
+ (if (dpkg-changelog-finalised-p) nil
+ (error "most recent version is not finalised"))
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward "\n --")
+ (let ((dels (point)))
+ (end-of-line)
+ (delete-region dels (point)))))
+
+(defun dpkg-changelog-mode ()
+ "Major mode for editing dpkg-style change logs.
+Runs `dpkg-changelog-mode-hook'."
+ (interactive)
+ (kill-all-local-variables)
+ (text-mode)
+ (setq major-mode 'dpkg-changelog-mode
+ mode-name "dpkg changelog"
+ left-margin 2
+ fill-prefix " "
+ fill-column 74)
+ (use-local-map dpkg-changelog-mode-map)
+ ;; Let each entry behave as one paragraph:
+ (set (make-local-variable 'paragraph-start) "\\*")
+ (set (make-local-variable 'paragraph-separate) "\\*\\|\\s-*$|\\S-")
+ ;; Let each version behave as one page.
+ ;; Match null string on the heading line so that the heading line
+ ;; is grouped with what follows.
+ (set (make-local-variable 'page-delimiter) "^\\<")
+ (set (make-local-variable 'version-control) 'never)
+ (run-hooks 'dpkg-changelog-mode-hook))
+
+(provide 'dpkg-changelog)
Usage:
dpkg-addfile <filename> <section> <priority>
-Options: -f<fileslistfile> get files list from this file
+Options: -f<fileslistfile> write files here instead of debian/files
";
}
-f<fileslistfile> get .deb files list from this file
-v<sinceversion> include all changes later than version
-d<changesdescription> use change description from this file
- -m<maintaineraddress> override changelog's maintainer value
+ -m<maintainer> override changelog's maintainer value
-u<uploadfilesdir> directory with files (default is \`..'
-F<changelogformat> force change log format
- -D<field>=<value> override or add a field and value
- -U<field> remove a field
-V<name>=<value> set a substitution variable
-T<varlistfile> read variables here, not debian/substvars
+ -D<field>=<value> override or add a field and value
+ -U<field> remove a field
";
}
push(@INC,$dpkglibdir);
require 'controllib.pl';
-sub usage {
+sub usageversion {
print STDERR
"Debian GNU/Linux dpkg-gencontrol $version. Copyright (C) 1996
Ian Jackson. This is free software; see the GNU General Public Licence
--- /dev/null
+.\" Hey, Emacs! This is an -*- nroff -*- source file.
+.\" Authors: Ian Jackson
+.TH DPKG\-SOURCE 1 "7th Auguest" "Debian Project" "Debian GNU/Linux manual"
+.SH NAME
+dpkg\-source, dpkg\-gencontrol, dpkg\-genchanges,
+dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
+\- Debian source package tools
+.SH SYNOPSIS
+.B dpkg-source
+.BI "-x " filename .dsc
+.br
+.B dpkg-source -b
+.RI [ options "] " directory " [" orig-directory |'']
+.br
+.B dpkg-gencontrol
+.RI [ options ]
+.br
+.B dpkg-genchanges
+.RI [ options ]
+.br
+.B dpkg-buildpackage
+.RI [ options ]
+.br
+.B dpkg-distaddfile
+.RI [ options ] " filename section priority"
+.br
+.B dpkg-parsechangelog
+.RI [ options ]
+.SH DESCRIPTION
+.B dpkg-source
+packs and unpacks Debian source archives.
+
+.B dpkg-gencontrol
+reads information from an unpacked Debian source tree and generates a
+binary package control file on standard output; it also adds an entry
+for the binary package to
+.BR debian/files .
+
+.B dpkg-genchanges
+reads information from an unpacked and built Debian source tree and
+from the files it has generated and generates a Debian upload control
+file
+.RB ( .changes " file)."
+
+.B dpkg-buildpackage
+Is a control script which can be used to help automate the building of
+a package.
+
+.B dpkg-distaddfile
+adds an entry for a named file to
+.BR debian/files .
+
+.B dpkg-parsechangelog
+reads and parses the changelog of an unpacked Debian source tree and
+outputs the information in it to standard output in a machine-readable
+form.
+
+None of these commands allow multiple options to be combined into one,
+and they do not allow the value for an option to be specified in a
+separate argument.
+.SH COMMON OPTIONS
+Many of these programs share options; these are described here,
+together with the programs that accept them.
+.TP
+.BI -h
+Display the particular program's version and usage message, including
+a synopsis of the options it understands. This option is understood
+by all the source package tools.
+.TP
+.BI -v version
+In
+.BR dpkg-genchanges " and " dpkg-parsechangelog
+this causes changelog information from all versions strictly later
+than
+.I version
+(which must appear in the changelog file) to be used.
+
+In
+.BR dpkg-gencontrol
+it sets the version number of the binary package which will be
+generated.
+.TP
+.BI -V name = value
+Set an output substitution variable.
+This option is understood by
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
+See below for a discussion of output substitution.
+.TP
+.BI -T substvarsfile
+Read substitution variables from
+.IR substvarsfile ;
+the default is
+.BR debian/substvars .
+This option is understood by
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
+.TP
+.BI -D field = value
+Override or add an output control file field.
+This option is understood by
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
+.TP
+.BI -U field
+Remove an output control file field.
+This option is understood by
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
+.TP
+.BR -b | -B
+For
+.BR dpkg-genchanges " and " dpkg-buildpackage
+this specifies that a binary-only build is taking place.
+.B -b
+indicates that no source files are to be built and/or distributed, and
+.B -B
+that no architecture-independent binary package files are to be
+distributed either.
+
+.B -b
+tells
+.B dpkg-source
+to build a source package (rather than to extract one) - see below.
+.TP
+.BI -c controlfile
+Specifies the main source control file to read information from. The
+default is
+.BR debian/control .
+This option is understood by
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
+.TP
+.BI -l changelogfile
+Specifies the change log file to read information from. The
+default is
+.BR debian/changelog .
+This option is understood by
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
+.TP
+.BI -f fileslistfile
+Read or write the list of files to be uploaded here, rather than using
+.BR debian/files .
+This option is understood by
+.BR dpkg-gencontrol ", " dpkg-genchanges " and " dpkg-distaddfile .
+.TP
+.BI -F changelogformat
+Specifies the format of the changelog. By default the format is read
+from a special line near the bottom of the changelog (see the
+programmers' manual) or failing that defaults to
+.BR dpkg .
+This option is understood by
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges .
+.SH DPKG-SOURCE OPTIONS
+.TP
+.B -x
+Extract a source package. One non-option argument should be supplied,
+the name of the Debian source control file
+.RB ( .dsc ).
+No options are useful with
+.BR "dpkg-source -x" .
+.B dpkg-source
+will read the names of the other file(s) making up the source package
+from the control file; they are assumed to be in the same directory as
+the
+.BR .dsc .
+.TP
+.B -b
+Build: pack up a source tree. One or two non-option arguments should
+be supplied. The first is taken as the name of the directory
+containing the unpacked source tree. If a second argument is supplied
+it should either be the name of the original source directory or the
+empty string if the package is a Debian-specific one and so has no
+Debianisation diffs. If no second argument is supplied then
+.B dpkg-source
+will assume the directory
+.IB directory .orig
+if exists or the empty string (no original source, and so no diff) if
+it doesn't.
+.SH DPKG-GENCONTROL OPTIONS
+.B dpkg-gencontrol
+does not take any non-option arguments.
+.TP
+.BI -p package
+Generate information for the binary package
+.IR package .
+If the source control file lists several binary packages then this
+option may be omitted; otherwise it is essential to select which
+binary package's information to generate.
+.TP
+.BR -is ", " -ip ", " -isp
+Include the
+.BR Section " and " Priority
+fields for this package from the main source control file in the
+binary package control file being generated. Usually this information
+is not included here, but only in the
+.B .changes
+file.
+.B -isp
+includes both fields,
+.BR -is " only the " Section " and " -ip " only the " Priority .
+.SH DPKG-GENCHANGES OPTIONS
+.B dpkg-gencontrol
+does not take any non-option arguments.
+.TP
+.BI -d changesdescription
+Read the description of the changes from the file
+.I changesdescription
+rather than using the information from the source tree's changelog
+file.
+.TP
+.BI -m maintaineraddress
+Use
+.I maintaineraddress
+as the name and email address of the maintainer for this upload,
+rather than using the information from the source tree's changelog.
+.TP
+.BI -u uploadfilesdir
+Look for the files to be uploaded in
+.I uploadfilesdir
+rather than
+.B ..
+.RB ( dpkg-genchanges
+needs to find these files so that it can include their sizes and
+checksums in the
+.B .changes
+file).
+.SH DPKG-BUILDPACKAGE OPTIONS
+.B dpkg-buildpackage
+does not take any non-option arguments.
+.TP
+.BI -r gain-root-command
+When
+.B dpkg-buildpackage
+needs to execute part of the build process as root, it prefixes the
+command it executes with
+.I gain-root-command
+if one has been specified.
+.I gain-root-command
+should be the name of a program on the
+.B PATH
+and will get as arguments the name of the real command to run and the
+arguments it should take.
+.I gain-root-command
+should not contain spaces or any other shell metacharacters.
+.TP
+.BI -p pgp-command
+When
+.B dpkg-buildpackage
+needs to execute PGP to sign a source control
+.RB ( .dsc )
+file or a
+.B .changes
+file it will run
+.I pgp-command
+(searching the
+.B PATH
+if necessary) instead of
+.BR pgp .
+.I pgp-command
+will get all the arguments that
+.B pgp
+would have done.
+.I pgp-command
+should not contain spaces or any other shell metacharacters.
+.TP
+.BR -us ", " -uc
+Do not PGP-sign the source package or the changelog, respectively.
+.SH DPKG-DISTADDFILE ARGUMENTS
+.B dpkg-distaddfile
+does not take any non-common options. It takes three non-option
+arguments, the filename and the section and priority for the
+.B .changes
+file.
+
+The filename should be specified relative to the directory where
+.B dpkg-genchanges
+will expect to find the files, usually
+.BR .. ,
+rather than being a pathname relative to the current directory when
+.B dpkg-distaddfile
+is run.
+.SH DPKG-PARSECHANGELOG ARGUMENTS
+.B dpkg-parsechangelog
+does not take any non-common options or non-option arguments.
+.SH VARIABLE SUBSTITUTION
+Before
+.BR dpkg-source ", " dpkg-gencontrol " and " dpkg-genchanges
+write their control information (to the source control file
+.B .dsc
+for
+.B dpkg-source
+and to standard output for
+.BR dpkg-gencontrol " and " dpkg-genchanges )
+they perform some variable substitutions on the output file.
+
+A variable substitution has the form
+.BI ${ variable-name }\fR.
+Variable substitutions are performed repeatedly until none are left;
+the full text of the field after the substitution is rescanned to look
+for more substitutions.
+
+After all the substitutions have been done each occurence of the
+string
+.B ${}
+(which is not a legal substitution) is replaced with a
+.B $
+sign.
+
+Variables whose names consist entirely of alphanumerics can be set
+using the
+.B -V
+common option.
+
+They can be also specified in the file
+.B debian/substvars
+(or whatever other file is specified using the
+.B -T
+option). This file consists of lines of the form
+.IB name = value
+(where
+.B name
+is a string of alphanumerics). Trailing whitespace on each line,
+blank lines, and lines starting with a
+.B #
+symbol (comments) are ignored.
+
+Additionally, the following standard variables are available:
+.TP
+.BI arch
+The current build architecture (from
+.BR "dpkg \-\-print-architecture" ).
+.TP
+.B sourceversion
+The source package version (from the changelog file).
+.TP
+.BI f: fieldname
+The value of the output field
+.IR fieldname .
+.TP
+.B Format
+The
+.B .changes
+file format version generated by this version of the source packaging
+scripts. If you set this variable the contents of the
+.B Format
+field in the
+.B .changes
+file will change too.
+.TP
+.BR newline ", " space ", " tab
+These variables each hold the corresponding character.
+.SH FILES
+.TP
+.B debian/control
+The main source control information file, giving version-independent
+information about the source package and the binary packages it can
+produce.
+.TP
+.B debian/changelog
+The changelog file, used to obtain version-dependent information about
+the source package, such as the urgency and distribution of an upload,
+the changes made since a particular release, and the source version
+number itself.
+.TP
+.B debian/files
+The list of generated files which are part of the upload being
+prepared.
+.B dpkg-gencontrol
+adds the presumed filenames of binary packages whose control files it
+generates here;
+.B dpkg-distaddfile
+can be used to add additional files.
+.B dpkg-genchanges
+reads the data here when producing a
+.B .changes
+file.
+.TP
+.B debian/substvars
+List of substitution variables and values.
+.SH BUGS
+The point at which field overriding occurs compared to certain
+standard output field settings is rather confused.
+
+The binary package entries in the
+.B debian/files
+file will be passed through variable substitution twice. This should
+not matter, since
+.BR $ ", " { " and " }
+are not legal in package names or version numbers.
+.SH SEE ALSO
+.B dpkg
+.IR "programmers' manual" ,
+.IR "Debian policy manual" ,
+.BR dpkg\-deb (8),
+.BR dpkg (8),
+.BR dselect (8).
+.SH AUTHOR
+The utilities 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.
--- /dev/null
+.\" Hey, Emacs! This is an -*- nroff -*- source file.
+.\" Authors: Ian Jackson
+.TH DPKG\-SOURCE 8 "7th Auguest" "Debian Project" "Debian GNU/Linux manual"
+.SH NAME
+dpkg\-source, dpkg\-genchanges, dpkg\-gencontrol,
+dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
+\- Debian source packaging tools
+.SH SYNOPSIS
+.B dpkg-deb
+.BR -b | --build
+.IR directory " [" archive | directory ]
+.br
+.B dpkg-deb
+.BR -I | --info
+.IR archive " [" control\-file\-name " ..]"
+.br
+.B dpkg-deb
+.BR -f | --field
+.IR archive " [" control\-field\-name " ...]"
+.br
+.B dpkg-deb
+.BR -c | --contents
+.I archive
+.br
+.B dpkg-deb
+.BR -x | --extract | -X | --vextract
+.I archive directory
+.br
+.B dpkg-deb --fsys-tarfile
+.I archive
+.br
+.B dpkg-deb --control
+.I archive directory
+.SH DESCRIPTION
+.B dpkg-deb
+packs, unpacks and provides information about Debian archives.
+
+Use
+.B dpkg
+to install and remove packages from your system.
+
+You can also invoke
+.B dpkg\-deb
+by calling
+.B dpkg
+with whatever options you want to pass to
+.BR dpkg\-deb ". " dpkg
+will spot that you wanted
+.B dpkg\-deb
+and run it for you.
+.SH ACTION OPTIONS
+.TP
+.BR --build ", " -b
+Creates a debian archive from the filesystem tree stored in
+.IR directory ". " directory
+must have a
+.B DEBIAN
+subdirectory, which contains the control information files such
+as the control file itself. This directory will
+.I not
+appear in the binary package's filesystem archive, but instead
+the files in it will be put in the binary package's control
+information area.
+
+Unless you specify
+.BR \-\-no\-check ", " dpkg\-deb "
+will read
+.B DEBIAN/control
+and parse it. It will check it for syntax errors and other problems,
+and display the name of the binary package being built.
+.B dpkg\-deb
+will also check the permissions of the maintainer scripts and other
+files found in the
+.B DEBIAN
+control information directory.
+
+If no
+.I archive
+is specified then
+.B dpkg\-deb
+will write the package into the file
+.IR directory \fB.deb\fR.
+
+If the archive to be created already exists it will be overwritten.
+
+If the second argument is a directory then
+.B dpkg\-deb
+will write to the file
+.IB package _ version _ arch .deb\fR,
+or
+.IB package _ version .deb
+if no
+.B Architecture
+field is present in the package control file. When a target directory
+is specified, rather than a file, the
+.B \-\-no\-check
+option may not be used (since
+.B dpkg\-deb
+needs to read and parse the package control file to determine which
+filename to use).
+.TP
+.BR \-\-info ", " -I
+Provides information about a binary package archive.
+
+If no
+.IR control\-file\-name s
+are specified then it will print a summary of the contents of the
+package as well as its control file.
+
+If any
+.IR control\-file\-name s
+are specified then
+.B dpkg\-deb
+will print them in the order they were specified; if any of the
+components weren't present it will print an error message to stderr
+about each one and exit with status 2.
+.TP
+.BR \-\-field ", " -f
+Extracts control file information from a binary package archive.
+
+If no
+.BR control\-file\-field s
+are specified then it will print the whole control file.
+
+If any are specified then
+.B dpkg\-deb
+will print their contents, in the order in which they appear in the
+control file. If more than one
+.BR control\-file\-field
+is specified then
+.B dpkg\-deb
+will precede each with its field name (and a colon and space).
+
+No errors are reported for fields requested but not found.
+.TP
+.BR --contents ", " -c
+Lists the contents of the filesystem tree archive portion of the
+package archive. It is currently produced in the format generated by
+.BR tar 's
+verbose listing.
+.TP
+.BR --extract ", " -x ", " \-\-vextract ", " -X
+Extracts the filesystem tree from a package archive into the specified
+directory.
+
+.BR \-\-vextract " (" -X ")"
+prints a listing of the files extracted as it goes, while
+.BR \-\-extract " (" -x ")"
+is silent unless an error occurs.
+
+Note that extracting a package to the root directory will
+.I not
+result in a correct installation ! Use
+.B dpkg
+to install packages.
+
+.I directory
+(but not its parents) will be created if necessary.
+.TP
+.BR --fsys-tarfile
+Extracts the filesystem tree data from a binary package and sends it
+to standard output in
+.B tar
+format. Together with
+.B tar
+this can be used to extract a particular file from a package archive.
+.TP
+.BR --control ", " -e
+Extracs the control information files from a package archive into the
+specified directory.
+
+If no directory is specified then a subdirectory
+.B DEBIAN
+in the current directory is used.
+
+The target directory (but not its parents) will be created if
+necessary.
+.TP
+.BR --help ", " -h
+Prints
+.BR dpkg\-deb 's
+usage message, giving a summary of its options and their uses.
+.TP
+.BR --version
+Prints
+.BR dpkg\-deb 's
+version number.
+.TP
+.BR --licence
+Prints information about
+.BR dpkg\-deb 's
+copyright licensing and lack of warranty. (The American spelling
+.B \-\-license
+is also supported.)
+.SH OTHER OPTIONS
+.TP
+.BR --new
+Ensures that
+.B dpkg\-deb
+builds a `new' format archive. This is the default.
+.TP
+.BR --old
+Forces
+.B dpkg\-deb
+to build an `old' format archive. This old archive format is less
+easily parsed by non-Debian tools and is now obsolete; its only use is
+when building packages to be parsed by versions of dpkg older than
+0.93.76 (September 1995), which was released as i386 a.out only.
+.TP
+.BR --no-check
+Inhibit's
+.BR "dpkg\-deb \-\-build" 's
+usual checks on the proposed contents of an archive. You can build
+any archive you want, no matter how broken, this way.
+.TP
+.BR --debug ", " -D
+Enables debugging output. This is not very interesting.
+.SH BUGS
+.B dpkg-deb -I
+.IB package1 .deb
+.IB package2 .deb
+does the wrong thing.
+
+There is no authentication on
+.B .deb
+files; in fact, there isn't even a straightforward checksum.
+
+Do not attempt to use just
+.B dpkg\-deb
+to install software ! You must use
+.B dpkg
+proper to ensure that all the files are correctly placed and the
+package's scripts run and its status and contents recorded.
+.SH SEE ALSO
+.BR deb (5),
+.BR deb-control (5),
+.BR dpkg (5),
+.BR dpkg (8),
+.BR dselect (8).
+.SH AUTHOR
+.B dpkg\-deb
+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.
Options: -c<controlfile> get control info from this file\n".
"(for -b) -l<changelogfile> get per-version info from this file
-F<changelogformat> force change log format
+ -V<name>=<value> set a substitution variable
+ -T<varlistfile> read variables here, not debian/substvars
-D<field>=<value> override or add a .dsc field and value
-U<field> remove a field
- -V<name>=<value> set a substitution variable
-h print this message
Relative filenames for -c and -l are interpreted starting at the
source tree's top level directory. If <orig-directory> is omitted then
$remove{$1}= 1;
} elsif (m/^-V(\w+)[=:]/) {
$substvar{$1}= $';
+ } elsif (m/^-T/) {
+ $varlistfile= $';
} elsif (m/^-h$/) {
&usageversion; exit(0);
} elsif (m/^--$/) {
" ($expectprefix)");
$fn =~ m,/\.\./, &&
&error("tarfile contains object with /../ in its name ($pname)");
+ push(@filesinarchive,$fn);
}
close(CPIO); $? && subprocerr("cpio");
$/= "\n";
exec('tar','-vvtf','-'); &syserr("exec tar -vvtf -");
}
close(GZIP);
+ $efix= 0;
file:
- while (defined($fn= <TAR>)) {
- $fn =~ s/\n$//;
- $fn =~ m,^(\S{10})\s+\S+/\S+\s+\d+\s+\w+\s+\d+\s+\d+:\d\d\s+\d+ (.*)$, ||
+ while (length($_= <TAR>)) {
+ s/\n$//;
+ m,^(\S{10})\s, ||
&error("tarfile contains unknown object listed by tar as \`$_'");
- $_= $1; $fn= $2;
+ $fn= $filesinarchive[$efix++];
+ substr($_,length($_)-length($fn)-1) eq " $fn" ||
+ &error("tarfile contains unexpected object listed by tar as \`$_',".
+ " expected \`$fn'");
+ $_= $1;
s/^([-dpsl])// ||
&error("tarfile contains object \`$fn' with unknown or forbidden type \`".
substr($_,0,1)."'");
-#define DPKG_VERSION "1.3.0" /* This line modified by Makefile */
+#define DPKG_VERSION "1.3.1" /* This line modified by Makefile */