浏览代码

dpkg 1.4.1

Guy Maor 27 年之前
父节点
当前提交
144d638476
共有 100 个文件被更改,包括 5295 次插入10783 次删除
  1. 15 0
      .cvsignore
  2. 1 1
      COPYING
  3. 2251 0
      ChangeLog
  4. 143 113
      INSTALL
  5. 76 0
      Makefile.am
  6. 0 134
      Makefile.in
  7. 0 72
      NEWS
  8. 24 0
      acconfig.h
  9. 3 1
      archtable
  10. 0 0
      attic/README
  11. 0 0
      attic/dpkg-deb/dpkg-deb.8-vuori
  12. 0 0
      attic/dpkg/dpkg.8-null
  13. 0 0
      attic/dpkg/junk
  14. 0 0
      attic/dpkg/lib.pl
  15. 0 0
      attic/dpkg/perl-dpkg.pl
  16. 0 0
      attic/dselect/dselect.junk
  17. 0 0
      attic/dselect/kt.c
  18. 48 0
      attic/scripts/debian-changelog-mode.el
  19. 0 0
      attic/scripts/start-stop-daemon.pl
  20. 1 1
      scripts/update-rc.d.sh
  21. 0 0
      attic/split/magic
  22. 0 0
      attic/split/mkdeb.sh
  23. 0 0
      attic/split/old-mksplit.sh
  24. 0 0
      attic/split/split.junk
  25. 44 0
      automake/dpkg.m4
  26. 209 0
      automake/tl_canon.m4
  27. 231 0
      automake/tools.m4
  28. 5 4
      config.h.bot
  29. 0 218
      config.h.in
  30. 0 2533
      configure
  31. 83 107
      configure.in
  32. 4 0
      debian/.cvsignore
  33. 8 0
      debian/50dpkg-dev.el
  34. 21 0
      debian/README.compile
  35. 494 1
      debian/changelog
  36. 5 2
      debian/control
  37. 2 2
      debian/copyright
  38. 4 4
      debian/postinst
  39. 5 5
      debian/preinst
  40. 123 46
      debian/rules
  41. 1 0
      debian/shlibs
  42. 15 14
      debian/shlibs.default.i386
  43. 0 1
      debian/shlibs.default.m68k
  44. 1 0
      debian/shlibs.local
  45. 0 1
      debian/substvars
  46. 147 0
      doc/ChangeLog
  47. 110 0
      doc/Makefile.am
  48. 0 93
      doc/Makefile.in
  49. 58 0
      doc/changelog
  50. 1 1
      doc/deb-old.5
  51. 二进制
      doc/developer-keys.pgp
  52. 552 0
      doc/internals.sgml
  53. 0 1123
      doc/lout.li
  54. 2 2
      doc/manuals-version
  55. 0 97
      doc/obsolete/dependency-ordering.txt
  56. 0 111
      doc/obsolete/descriptions.txt
  57. 0 44
      doc/obsolete/disappear-replace.txt
  58. 0 0
      doc/obsolete/diversions.txt
  59. 0 101
      doc/obsolete/dpkg.texi
  60. 0 123
      doc/obsolete/dselect-methods.txt
  61. 0 43
      doc/obsolete/essential-flag.txt
  62. 0 173
      doc/obsolete/maintainer-script-args.txt
  63. 0 59
      doc/obsolete/version-ordering.txt
  64. 0 105
      doc/obsolete/virtual-dependencies.txt
  65. 0 1619
      doc/policy.sgml
  66. 0 3370
      doc/programmer.sgml
  67. 18 0
      doc/texinfo.debian_mapping
  68. 94 0
      doc/texinfo.dtd
  69. 120 0
      doc/texinfo.texi_mapping
  70. 1 0
      dpkg-deb/.cvsignore
  71. 36 0
      dpkg-deb/Makefile.am
  72. 0 66
      dpkg-deb/Makefile.in
  73. 49 48
      dpkg-deb/build.c
  74. 0 3
      dpkg-deb/debugmake
  75. 58 46
      dpkg-deb/extract.c
  76. 26 26
      dpkg-deb/info.c
  77. 35 29
      dpkg-deb/main.c
  78. 1 0
      dselect/.cvsignore
  79. 74 0
      dselect/Makefile.am
  80. 0 119
      dselect/Makefile.in
  81. 7 6
      dselect/basecmds.cc
  82. 4 4
      dselect/baselist.cc
  83. 4 4
      dselect/basetop.cc
  84. 4 4
      dselect/bindings.cc
  85. 4 4
      dselect/curkeys.cc
  86. 0 3
      dselect/debugmake
  87. 2 0
      dselect/dselect.h
  88. 0 30
      dselect/kt.cc
  89. 6 6
      dselect/main.cc
  90. 5 5
      dselect/methkeys.cc
  91. 4 4
      dselect/methlist.cc
  92. 4 4
      dselect/method.cc
  93. 12 9
      dselect/methparse.cc
  94. 6 5
      dselect/mkcurkeys.pl
  95. 1 1
      dselect/mkhelpmsgs.pl
  96. 4 4
      dselect/pkgcmds.cc
  97. 21 21
      dselect/pkgdepcon.cc
  98. 4 4
      dselect/pkgdisplay.cc
  99. 4 4
      dselect/pkginfo.cc
  100. 0 0
      dselect/pkgkeys.cc

+ 15 - 0
.cvsignore

@@ -0,0 +1,15 @@
+ABOUT-NLS
+Makefile.in
+aclocal.m4
+config.guess
+config.h.in
+config.sub
+configure
+install-sh
+ltconfig
+ltmain.sh
+missing
+mkinstalldirs
+stamp-h.in
+intl
+config.log

+ 1 - 1
COPYING

@@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
 
 		     END OF TERMS AND CONDITIONS
 
-	    How to Apply These Terms to Your New Programs
+	Appendix: How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it

文件差异内容过多而无法显示
+ 2251 - 0
ChangeLog


+ 143 - 113
INSTALL

@@ -1,146 +1,176 @@
-   This is a generic INSTALL file for utilities distributions.
-If this package does not come with, e.g., installable documentation or
-data files, please ignore the references to them below.
+Basic Installation
+==================
+
+   These are generic installation instructions.
 
    The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation, and
-creates the Makefile(s) (one in each subdirectory of the source
-directory).  In some packages it creates a C header file containing
-system-dependent definitions.  It also creates a file `config.status'
-that you can run in the future to recreate the current configuration.
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes a while.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
 
-To compile this package:
+  4. Type `make install' to install the programs and any data files and
+     documentation.
 
-1.  Configure the package for your system.
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
 
-   Normally, you just `cd' to the directory containing the package's
-source code and type `./configure'.  If you're using `csh' on an old
-version of System V, you might need to type `sh configure' instead to
-prevent `csh' from trying to execute `configure' itself.
+Compilers and Options
+=====================
 
-   Running `configure' takes awhile.  While it is running, it
-prints some messages that tell what it is doing.  If you don't want to
-see any messages, run `configure' with its standard output redirected
-to `/dev/null'; for example, `./configure >/dev/null'.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
 
-   To compile the package in a different directory from the one
-containing the source code, you must use a version of `make' that
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
 supports the `VPATH' variable, such as GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.  If
-for some reason `configure' is not in the source code directory that
-you are configuring, then it will report that it can't find the source
-code.  In that case, run `configure' with the option `--srcdir=DIR',
-where DIR is the directory that contains the source code.
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
 
    By default, `make install' will install the package's files in
 `/usr/local/bin', `/usr/local/man', etc.  You can specify an
 installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.  Alternately, you can do so by consistently
-giving a value for the `prefix' variable when you run `make', e.g.,
-     make prefix=/usr/gnu
-     make prefix=/usr/gnu install
+option `--prefix=PATH'.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH' or set the `make'
-variable `exec_prefix' to PATH, the package will use PATH as the prefix
-for installing programs and libraries.  Data files and documentation
-will still use the regular prefix.  Normally, all files are installed
-using the same prefix.
-
-   Some packages pay attention to `--with-PACKAGE' options to
-`configure', where PACKAGE is something like `gnu-as' or `x' (for the
-X Window System).  They may also pay attention to `--enable-FEATURE'
-options, where FEATURE indicates an optional part of the package.  The
-README should mention any `--with-' and `--enable-' options that the
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
 package recognizes.
 
-   `configure' also recognizes the following options:
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
 
 `--help'
      Print a summary of the options to `configure', and exit.
 
 `--quiet'
 `--silent'
+`-q'
      Do not print messages saying which checks are being made.
 
-`--verbose'
-     Print the results of the checks.
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
 
 `--version'
      Print the version of Autoconf used to generate the `configure'
      script, and exit.
 
-`--x-includes=DIR'
-     X include files are in DIR.
-
-`--x-libraries=DIR'
-     X library files are in DIR.
-
-   `configure' also accepts and ignores some other options.
-
-   On systems that require unusual options for compilation or linking
-that the package's `configure' script does not know about, you can give
-`configure' initial values for variables by setting them in the
-environment.  In Bourne-compatible shells, you can do that on the
-command line like this:
-
-     CC='gcc -traditional' LIBS=-lposix ./configure
+`configure' also accepts some other, not widely useful, options.
 
-On systems that have the `env' program, you can do it like this:
-
-     env CC='gcc -traditional' LIBS=-lposix ./configure
-
-   Here are the `make' variables that you might want to override with
-environment variables when running `configure'.
-
-   For these variables, any value given in the environment overrides the
-value that `configure' would choose:
-
- - Variable: CC
-     C compiler program.  The default is `cc'.
-
- - Variable: INSTALL
-     Program to use to install files.  The default is `install' if you
-     have it, `cp' otherwise.
-
-   For these variables, any value given in the environment is added to
-the value that `configure' chooses:
-
- - Variable: DEFS
-     Configuration options, in the form `-Dfoo -Dbar...'.  Do not use
-     this variable in packages that create a configuration header file.
-
- - Variable: LIBS
-     Libraries to link with, in the form `-lfoo -lbar...'.
-
-   If you need to do unusual things to compile the package, we encourage
-you to figure out how `configure' could check whether to do them, and
-mail diffs or instructions to the address given in the README so we
-can include them in the next release.
-
-2.  Type `make' to compile the package.  If you want, you can override
-the `make' variables CFLAGS and LDFLAGS like this:
-
-	make CFLAGS=-O2 LDFLAGS=-s
-
-3.  If the package comes with self-tests and you want to run them,
-type `make check'.  If you're not sure whether there are any, try it;
-if `make' responds with something like
-	make: *** No way to make target `check'.  Stop.
-then the package does not come with self-tests.
-
-4.  Type `make install' to install programs, data files, and
-documentation.
-
-5.  You can remove the program binaries and object files from the
-source directory by typing `make clean'.  To also remove the
-Makefile(s), the header file containing system-dependent definitions
-(if the package uses one), and `config.status' (all the files that
-`configure' created), type `make distclean'.
-
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need it if you want to regenerate
-`configure' using a newer version of `autoconf'.

+ 76 - 0
Makefile.am

@@ -0,0 +1,76 @@
+## Process this file with automake to produce a Makefile.in
+
+AUTOMAKE_OPTIONS	= 1.1 foreign
+
+if HAVE_CPLUSPLUS
+CPPSUBDIRS		= dselect methods
+else
+CPPSUBDIRS		=
+endif
+
+SUBDIRS			= po intl include lib main dpkg-deb split \
+			  md5sum scripts $(CPPSUBDIRS) doc
+
+## Directory definitions
+
+pkglocalstatedir	= $(sharedstatedir)/@PACKAGE@
+pkglibdir		= $(libdir)/@PACKAGE@
+
+docdir			= $(prefix)/doc
+pkgdocdir		= $(docdir)/@PACKAGE@
+
+## Various options
+
+CFLAGS			= @CFLAGS@ @CWARNS@ -g $(XCFLAGS)
+OPTCFLAGS		= @OPTCFLAGS@ @CWARNS@ -g $(XCFLAGS)
+LDFLAGS			= @LDFLAGS@ $(XLDFLAGS)
+LIBS			= @LIBS@ $(XLIBS)
+
+export CFLAGS OPTCFLAGS LDFLAGS LIBS
+
+## Automake variables
+
+# Can set this to "build" (wrapper found in debmake)
+DEBIAN_BUILD		= dpkg-buildpackage
+
+# May want to add -a<arch>?
+DEBIAN_FLAGS		=
+
+BUILT_SOURCES		= version.h config.h
+EXTRA_DIST		= archtable COPYING INSTALL 
+
+CLEANFILES		= version.h.new
+DISTCLEANFILES		= version.h config.h
+MAINTAINERCLEANFILES	= libtool
+
+DISTDEBFILES		= 50dpkg-dev.el changelog control copyright \
+			  dev-README postinst preinst prerm rules \
+			  shlibs shlibs.default.i386 shlibs.local
+
+MAINTCLEANFILES		= Makefile.in aclocal.m4 config.guess \
+			  config.h.in config.sub configure install-sh \
+			  ltconfig ltmain.sh mkinstalldirs ABOUT-NLS \
+			  po/Makefile.in.in po/stamp-cat-id po/cat-id-tbl.c \
+			  po/dpkg.pot stamp-h.in missing
+## Rules
+
+.PHONY: install-data-local uninstall-local dist-hook maintainer-clean-local
+
+uninstall-local:
+	-for d in $(pkglocalstatedir) $(pkglibdir) $(pkgdocdir); do \
+		[ -e $$d ] && rmdir $$d; \
+	done
+
+dist-hook:
+	$(mkinstalldirs) $(distdir)/debian
+	set -e; for i in $(DISTDEBFILES); do \
+		cp -p $(srcdir)/debian/$$i $(distdir)/debian/; \
+	done
+	$(mkinstalldirs) $(distdir)/automake
+	cp -dp $(top_srcdir)/automake/[a-z]* $(distdir)/automake/
+
+maintainer-clean-local:
+	-cd $(srcdir) && rm -f $(MAINTCLEANFILES)
+	-$(RM) -r $(srcdir)/intl
+
+## End of file.

+ 0 - 134
Makefile.in

@@ -1,134 +0,0 @@
-# Copyright (C) 1994 Ian Murdock <imurdock@debian.org>
-# Copyright (C) 1994,1995 Ian Jackson <iwj10@cus.cam.ac.uk>
-#
-#   This 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.
-#
-#   This 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 dpkg; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = $(prefix)
-docdir = $(prefix)/doc
-devdocdir = $(docdir)/dpkg
-copyingfile = $(docdir)/dpkg/copyright
-infodir = $(prefix)/info
-bindir = $(exec_prefix)/bin
-sbindir = $(exec_prefix)/sbin
-libdir = $(prefix)/lib
-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
-pinfodir = $(datadir)/info
-pupdatesdir = $(datadir)/updates
-altsdatadir = $(datadir)/alternatives
-partsdir = $(datadir)/parts
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man5dir = $(mandir)/man5
-man8dir = $(mandir)/man8
-man1 = 1
-man5 = 5
-man8 = 8
-etcdir= /etc
-altsetcdir = $(etcdir)/alternatives
-
-BOURNESHELL = /bin/sh
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-CC = @CC@
-
-CFLAGS = @CFLAGS@ @CWARNS@ $(XCFLAGS)
-LDFLAGS = $(XLDFLAGS)
-ALL_CFLAGS = -I../include -I.. @DEFS@ $(CFLAGS)
-
-SUBDIRS = lib main dpkg-deb split md5sum scripts doc include dselect methods
-PORTABLEDIRS = lib dpkg-deb split md5sum
-
-.SUFFIXES:	.c .o
-
-.c.o:
-		$(CC) $(ALL_CFLAGS) -c $<
-
-all:		version
-		set -e; for d in $(SUBDIRS) ; do \
-			cd $$d ; \
-			$(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)'; \
-			cd .. ; \
-		done
-
-install:	all
-		$(BOURNESHELL) $(srcdir)/mkinstalldirs $(bindir) $(sbindir) \
-			$(man1dir) $(man5dir) $(man8dir) $(devdocdir) $(infodir) \
-			$(libdir) $(dpkglibdir) $(methodsdir) $(parsechangelogdir) \
-			$(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)' \
-				install ; \
-			cd .. ; \
-		done
-		$(INSTALL_DATA) COPYING $(copyingfile)
-
-portable:	version
-		set -e; for d in lib dpkg-deb split md5sum ; do \
-			cd $$d ; \
-			$(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' ; \
-			cd .. ; \
-		done
-
-install-portable: portable
-		$(BOURNESHELL) $(srcdir)/mkinstalldirs $(bindir) \
-			$(man1dir) $(man8dir) $(libdir) $(dpkglibdir)
-		set -e; for d in $(PORTABLEDIRS) ; do \
-			cd $$d ; \
-			$(MAKE) 'CC=$(CC)' 'LDFLAGS=$(LDFLAGS)' 'XLIBS=$(XLIBS)' \
-				install ; \
-			cd .. ; \
-		done
-#		$(INSTALL_DATA) COPYING $(copyingfile)
-
-autoconf:
-		autoheader
-		autoconf
-
-clean:
-		set -e; for d in $(SUBDIRS) ; do \
-			cd $$d ; \
-			$(MAKE) clean ; \
-			cd .. ; \
-		done
-		rm -f core version.h.new
-
-distclean:	clean
-		set -e; for d in $(SUBDIRS) ; do \
-			cd $$d ; \
-			$(MAKE) distclean ; \
-			cd .. ; \
-		done
-		rm -f Makefile *.orig *~ *.~* ./#*#
-		rm -f config.h config.status install config.cache config.log
-
-version:
-		perl insert-version.pl <version.h >version.h.new
-		cmp -s version.h.new version.h || mv version.h.new version.h

+ 0 - 72
NEWS

@@ -1,72 +0,0 @@
-(-*- indented-text -*-)
-
-
-CHANGES SINCE dpkg 0.93.7:
-
- * a Perl-based front-end with many new features has replaced dpkg.sh.
-   The new features are detailed below.  dpkg.pl is not finished,
-   however, as it does not yet support CONFLICTS, DEPENDS, OPTIONAL,
-   or RECOMMENDED.  All of the above will be supported in Debian 0.93.
-
-   In addition, it does not yet support PARTS, but that may wait until
-   Debian 0.94.  (In the meantime, we can create disk-sized packages by
-   hand.)
-
-   dpkg.pl has been constructed from code originally by Matt Welsh,
-   with additions by Carl Streeter, Ian Murdock, and Ian Jackson.
-
-New features in dpkg.pl:
-
- * dpkg.pl can now manipulate many packages at a time; dpkg.sh could
-   only manipulate one package at a time.
-
- * dpkg.pl supports pre-installation, post-installation, pre-removal,
-   and post-removal scripts.  During batch installation,
-   post-installation scripts are executed after all packages have
-   been installed.  (dpkg.sh supported all of the above except the
-   batch installation feature, because dpkg.sh did not itself support
-   batch installation.)
-
- * dpkg.pl now supports the upgrading of packages.  A newer version of
-   a package, when released, can be obtained and installed normally on
-   the system to replace an older, previously installed version of it,
-   all with a minimum of manuals steps.
-
-   During the installation process, dpkg.pl determines whether or not
-   a version of the package is currently installed on the system.  If
-   it is, it determines whether it is an older version than the
-   package being installed (in which case we are ``upgrading'', and
-   the installation proceeds after saving the configuration files and
-   removing the older version), or whether it is the same or a newer
-   version than the package being installed (in which case we are, for
-   whatever reason, attempting to install a package twice or
-   ``downgrading'', and dpkg.pl asks for confirmation).
-
- * dpkg.pl now supports automatic and intelligent configuration file
-   updates during the upgrade process.  During a package upgrade, it
-   determines when a configuration file has changed since the last
-   installation and, for those that have, prompts the user whether to
-   keep the older or newer configuration file, providing them with
-   default responses.
-
-New features in dpkg-deb:
-
- * dpkg-util.deb has been renamed to dpkg-deb, for brevity.
-
- * dpkg-deb is much less verbose, and in most cases it says nothing
-   unless an error has occurred.  The front-end is expected to provide
-   the necessary verbosity when appropriate.
-
- * `dpkg-deb --describe' now outputs the description only, without the
-   ``Description:'' label.
-
- * `dpkg-deb --list' output is now sorted by package name.
-
- * `dpkg-deb --remove' bug fix: in dpkg 0.93.7 (or earlier), some
-   directories did not get properly removed.  This has been fixed.
-
- * `dpkg-deb --version' now outputs the version information only,
-   without the `Version:'' label, and without maintainer information.
-
- * `dpkg-deb --version' now provides the version of dpkg if no
-   argument is specified.

+ 24 - 0
acconfig.h

@@ -1,5 +1,11 @@
 /* Additional tests: */
 
+/* The name of the package being compiled */
+#define PACKAGE ""
+
+/* The version of the package */
+#define VERSION ""
+
 /* Define if inline functions a la GCC are available.  */
 #undef HAVE_INLINE
 
@@ -32,3 +38,21 @@
 
 /* Set this string to append something to the version number. */
 #define ARCHBINFMT ""
+
+/* Define to the name of the distribution.  */
+#undef PACKAGE
+
+/* Define to 1 if NLS is requested.  */
+#undef ENABLE_NLS
+
+/* Define as 1 if you have catgets and don't want to use GNU gettext.  */
+#undef HAVE_CATGETS
+
+/* Define as 1 if you have gettext and don't want to use GNU gettext.  */
+#undef HAVE_GETTEXT
+
+/* Define if your locale.h file contains LC_MESSAGES.  */
+#undef HAVE_LC_MESSAGES
+
+/* Define as 1 if you have the stpcpy function.  */
+#undef HAVE_STPCPY

+ 3 - 1
archtable

@@ -16,9 +16,11 @@
 i386	i386	i486
 i486	i386	i486
 i586	i386	i486
+i686	i386	i486
 pentium	i386	i486
 sparc	sparc	sparc
 alpha	alpha	alpha
 m68k	m68k	m68k
 arm	arm	arm
-ppc	ppc	ppc
+ppc	powerpc	powerpc
+powerpc	powerpc	powerpc

README → attic/README


dpkg-deb/dpkg-deb.8-vuori → attic/dpkg-deb/dpkg-deb.8-vuori


main/dpkg.8-null → attic/dpkg/dpkg.8-null


main/junk → attic/dpkg/junk


scripts/lib.pl → attic/dpkg/lib.pl


scripts/perl-dpkg.pl → attic/dpkg/perl-dpkg.pl


dselect/junk → attic/dselect/dselect.junk


dselect/kt.c → attic/dselect/kt.c


+ 48 - 0
attic/scripts/debian-changelog-mode.el

@@ -0,0 +1,48 @@
+(defvar debian-changelog-urgencies
+  '((?l."low") (?m."medium") (?h."HIGH"))
+  "alist of keystrokes vs. urgency values for debian-changelog-urgency \\[debian-changelog-urgency].")
+
+(defvar debian-changelog-distributions
+  '((?s."stable") (?u."unstable") (?c."contrib") (?n."non-free") (?e."experimental"))
+  "alist of keystrokes vs. distribution values for debian-changelog-distribution \\[debian-changelog-distribution].")
+
+(defun debian-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 debian-changelog-distribution (arg)
+  "Without argument, prompt for a key for a new distribution value (using
+debian-changelog-distributions).  With argument, delete the current distribution
+and position the cursor to type a new one."
+  (interactive "P")
+  (debian-changelog-headervalue
+   arg
+   ") \\(.*\\)\\;"
+   debian-changelog-distributions))
+
+(defun debian-changelog-urgency (arg)
+  "Without argument, prompt for a key for a new urgency value (using
+debian-changelog-urgencies).  With argument, delete the current urgency
+and position the cursor to type a new one."
+  (interactive "P")
+  (debian-changelog-headervalue
+   arg
+   "\\;[^\n]* urgency=\\(\\sw+\\)"
+   debian-changelog-urgencies))
+

scripts/start-stop-daemon.pl → attic/scripts/start-stop-daemon.pl


+ 1 - 1
scripts/update-rc.d.sh

@@ -20,7 +20,7 @@ usage () { echo >&2 "\
 update-rc.d: error: $1.
 usage: update-rc.d <basename> remove
        update-rc.d <basename> defaults [<cn> | <scn> <kcn>]
-       update-rc.d <basename> start|stop <cn> <r> <r> .  ..."; exit 1 }
+       update-rc.d <basename> start|stop <cn> <r> <r> .  ..."; exit 1; }
 
 getinode () {
 	inode="`ls -Li1 \"$1\" | sed -e 's/^ *//; s/ .*//'`"

split/magic → attic/split/magic


dpkg-deb/mkdeb.sh → attic/split/mkdeb.sh


split/old-mksplit.sh → attic/split/old-mksplit.sh


split/junk → attic/split/split.junk


+ 44 - 0
automake/dpkg.m4

@@ -0,0 +1,44 @@
+dnl Moved from configure.in, modified to use AC_DEFUN
+dnl -- Tom Lees <tom@lpsg.demon.co.uk>
+
+dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
+AC_DEFUN(DPKG_CACHED_TRY_COMPILE,[
+ AC_MSG_CHECKING($1)
+ AC_CACHE_VAL($2,[
+  AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
+ ])
+ if test "x$$2" = xyes; then
+  true
+  $5
+ else
+  true
+  $6
+ fi
+])
+
+dnl DPKG_C_GCC_TRY_WARNS(<warnings>,<cachevar>)
+AC_DEFUN(DPKG_C_GCC_TRY_WARNS,[
+ AC_MSG_CHECKING([GCC warning flag(s) $1])
+ if test "${GCC-no}" = yes
+ then
+  AC_CACHE_VAL($2,[
+   oldcflags="${CFLAGS-}"
+   CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror"
+   AC_TRY_COMPILE([
+#include <string.h>
+#include <stdio.h>
+],[
+    strcmp("a","b"); fprintf(stdout,"test ok\n");
+], [$2=yes], [$2=no])
+   CFLAGS="${oldcflags}"])
+  if test "x$$2" = xyes; then
+   CWARNS="${CWARNS} $1"
+   AC_MSG_RESULT(ok)
+  else
+   $2=''
+   AC_MSG_RESULT(no)
+  fi
+ else
+  AC_MSG_RESULT(no, not using GCC)
+ fi
+])

+ 209 - 0
automake/tl_canon.m4

@@ -0,0 +1,209 @@
+# Our own versions of the other canonicalizing stuff
+
+dnl replace AC_CANONICAL_xxx
+
+undefine([AC_CANONICAL_HOST])
+define([AC_CANONICAL_HOST], [tl_CANONICAL_HOST])
+undefine([AC_CANONICAL_BUILD])
+define([AC_CANONICAL_BUILD], [tl_CANONICAL_BUILD])
+undefine([AC_CANONICAL_TARGET])
+define([AC_CANONICAL_TARGET], [tl_CANONICAL_TARGET])
+undefine([AC_CANONICAL_SYSTEM])
+define([AC_CANONICAL_SYSTEM], [tl_CANONICAL_SYSTEM])
+
+dnl Canonicalize the host, target, and build system types.
+AC_DEFUN(tl_CANONICAL_SYSTEM,
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_PROVIDE([AC_CANONICAL_SYSTEM])dnl
+AC_BEFORE([$0], [AC_ARG_PROGRAM])
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
+esac
+
+tl_CANONICAL_HOST
+tl_CANONICAL_TARGET
+tl_CANONICAL_BUILD
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+AC_CHECK_TOOL_PREFIX
+])
+
+dnl Subroutines of tl_CANONICAL_SYSTEM.
+
+AC_DEFUN(tl_CANONICAL_HOST,
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_PROVIDE([AC_CANONICAL_HOST])dnl
+
+# Make sure we can run config.sub.
+if $ac_config_sub sun4 >/dev/null 2>&1; then :
+else AC_MSG_ERROR(can not run $ac_config_sub)
+fi
+
+AC_MSG_CHECKING(host system type)
+
+dnl Set host_alias.
+
+if test "${GCC-no}" = "yes"; then
+changequote(, )dnl
+  libgcc="`${CC} --print-libgcc-file-name`"
+  host_alias="`echo ${libgcc} |
+	sed -e 's,^.*/gcc-lib/,,; s,/libgcc\.a$,,; s,/egcs-,/,; s,/[0-9.][0-9.]*$,,'`"
+  case ${host_alias} in
+   *-linux{,elf,aout})
+    host_alias="`echo ${host_alias} | sed 's/\([^-]*\)-linux.*/\1/'`"
+changequote([, ])dnl
+    if ar p "${libgcc}" __main.o 2>/dev/null | file - 2>/dev/null | grep ELF >/dev/null; then
+      host_alias="${host_alias}-linux"
+    else
+      host_alias="${host_alias}-linuxaout"
+    fi ;;
+  esac
+else
+  host_alias=$host
+  case "$host_alias" in
+  NONE)
+    case "$nonopt" in
+    NONE)
+      if host_alias=`$ac_config_guess`; then host_guessed=y
+      else AC_MSG_ERROR(can not guess host type; you must specify one)
+      fi ;;
+    *) host_alias=$nonopt ;;
+    esac ;;
+  esac
+fi
+
+dnl Set the other host vars.
+changequote(<<, >>)dnl
+host=`$ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+changequote([, ])dnl
+AC_MSG_RESULT($host)
+AC_SUBST(host)dnl
+AC_SUBST(host_alias)dnl
+AC_SUBST(host_cpu)dnl
+AC_SUBST(host_vendor)dnl
+AC_SUBST(host_os)dnl
+])
+
+dnl Internal use only.
+AC_DEFUN(tl_CANONICAL_TARGET,
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_PROVIDE([AC_CANONICAL_TARGET])dnl
+AC_MSG_CHECKING(target system type)
+
+dnl Set target_alias.
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+  target_cpu="`dpkg --print-architecture`"
+  if test "$target_cpu" = ""; then
+   target_alias=$host_alias
+  else
+   target_alias="`echo ${host_alias} | sed 's/[^-]*-/${target_cpu}-/'`"
+  fi
+  ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+dnl Set the other target vars.
+if test $target_alias = $host_alias; then
+  target=$host
+  target_cpu=$host_cpu
+  target_vendor=$host_vendor
+  target_os=$host_os
+elif test $target_alias = "$build_alias"; then
+  target=$build
+  target_cpu=$build_cpu
+  target_vendor=$build_vendor
+  target_os=$build_os
+else
+changequote(<<, >>)dnl
+  target=`$ac_config_sub $target_alias`
+  target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+  target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+  target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+changequote([, ])dnl
+fi
+AC_MSG_RESULT($target)
+AC_SUBST(target)dnl
+AC_SUBST(target_alias)dnl
+AC_SUBST(target_cpu)dnl
+AC_SUBST(target_vendor)dnl
+AC_SUBST(target_os)dnl
+])
+
+AC_DEFUN(tl_CANONICAL_BUILD,
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_PROVIDE([AC_CANONICAL_BUILD])dnl
+
+# Make sure we can run config.sub.
+#if $ac_config_sub sun4 >/dev/null 2>&1; then :
+#else AC_MSG_ERROR(can not run $ac_config_sub)
+#fi
+
+AC_MSG_CHECKING(build system type)
+
+dnl Set build_alias.
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if test "$host_guessed" = "y"; then
+      build_alias=$host_alias
+    else
+      if build_alias=`$ac_config_guess`; then :
+      else build_alias=$host_alias
+      fi
+    fi ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+dnl Set the other build vars.
+if test $build_alias = $host_alias; then
+  build=$host
+  build_cpu=$host_cpu
+  build_vendor=$host_vendor
+  build_os=$host_os
+else
+changequote(<<, >>)dnl
+  build=`$ac_config_sub $build_alias`
+  build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+  build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+  build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+changequote([, ])dnl
+fi
+AC_MSG_RESULT($build)
+AC_SUBST(build)dnl
+AC_SUBST(build_alias)dnl
+AC_SUBST(build_cpu)dnl
+AC_SUBST(build_vendor)dnl
+AC_SUBST(build_os)dnl
+])

+ 231 - 0
automake/tools.m4

@@ -0,0 +1,231 @@
+# tl_CHECK_TOOL_PREFIX will work _BEFORE_ AC_CANONICAL_HOST, etc., has been
+# called. It should be called again after these have been called.
+#
+# Basically we want to check if the host alias specified by the user is
+# different from the build alias. The rules work like this:-
+#
+# If host is not specified, it defaults to NONOPT
+# If build is not specified, it defaults to NONOPT
+# If nonopt is not specified, we guess all other values
+
+dnl Replace AC_CHECK_TOOL_PREFIX
+undefine([AC_CHECK_TOOL_PREFIX])
+define([AC_CHECK_TOOL_PREFIX], [tl_CHECK_TOOL_PREFIX])
+
+AC_DEFUN(tl_CHECK_TOOL_PREFIX,
+[AC_PROVIDE([AC_CHECK_TOOL_PREFIX])
+AC_BEFORE([AC_CANONICAL_HOST])
+AC_BEFORE([AC_CANONICAL_BUILD])
+dnl Quick check
+if test "$host_alias" = ""; then
+  if test $host = NONE -a $build != NONE; then
+    thost=$nonopt
+  else
+    thost=$host
+  fi
+
+  if test $thost != $build -a $thost != NONE; then
+    ac_tool_prefix=${thost}-
+    ac_tool_dir=${thost}
+  else
+    ac_tool_prefix=
+    ac_tool_dir=
+  fi
+else
+  if test $host != $build; then
+    ac_tool_prefix=${host_alias}-
+    ac_tool_dir=${host_alias}
+  else
+    ac_tool_prefix=
+    ac_tool_dir=
+  fi
+fi
+])
+
+dnl replacement for AC_CHECK_TOOL
+undefine([AC_CHECK_TOOL])
+define([AC_CHECK_TOOL], [tl_CHECK_TOOL($1, $2, $3, $4)])
+
+dnl tl_CHECK_TOOL - AC_CHECK_TOOL, with a couple of extra checks
+dnl tl_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH
+dnl [, REJECT]])
+AC_DEFUN(tl_CHECK_TOOL,
+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
+AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
+	      ifelse([$3], , [$2], ), $4, $5)
+if test "$ac_tool_dir" != ""; then
+  if test -z "$ac_cv_prog_$1" -a "$5" != "/usr/${ac_tool_dir}/bin/$2" -a \
+	"$5" != "/usr/local/${ac_tool_dir}/bin/$2"; then
+    if test -f /usr/${ac_tool_dir}/bin/$2; then $1="/usr/${ac_tool_dir}/bin/$2"
+    elif test -f /usr/local/${ac_tool_dir}/bin/$2; then $1="/usr/local/${ac_tool_dir}/bin/$2"
+    fi
+  fi
+fi
+ifelse([$3], , , [
+if test -z "$ac_cv_prog_$1"; then
+if test -n "$ac_tool_prefix"; then
+  AC_CHECK_PROG($1, $2, $2, $3, $4, $5)
+else
+  $1="$3"
+fi
+fi])
+])
+
+dnl tl_CHECK_TOOLS -
+dnl  do a tl_CHECK_TOOL for multiple tools (like AC_CHECK_PROGS)
+dnl tl_CHECK_TOOLS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
+dnl		   [, PATH]])
+AC_DEFUN(tl_CHECK_TOOLS,
+[for ac_tool in $2
+do
+tl_CHECK_TOOL($1, [$]ac_tool, [$]ac_tool, , $4)
+test -n "[$]$1" && break
+done
+ifelse([$3], , , [test -n "[$]$1" || $1="$3"
+])])
+
+dnl replace AC_PROG_CC and AC_PROG_CXX
+undefine([AC_PROG_CC])
+define([AC_PROG_CC], [tl_PROG_CC])
+undefine([AC_PROG_CXX])
+define([AC_PROG_CXX], [tl_PROG_CXX])
+
+dnl tl_PROG_CC, tl_PROG_CXX - same as old AC_PROG_CC and AC_PROG_CXX, but
+dnl use AC_CHECK_TOOL/tl_CHECK_TOOLS instead of AC_CHECK_PROG, etc.
+AC_DEFUN(tl_PROG_CC,
+[AC_BEFORE([$0], [AC_PROG_CPP])dnl
+AC_PROVIDE([AC_PROG_CC])dnl
+tl_CHECK_TOOL(CC, gcc, gcc)
+if test -z "$CC"; then
+  AC_CHECK_TOOL(CC, cc, cc, , , /usr/ucb/cc)
+  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+fi
+if test -n "$ac_tool_prefix" -a "`echo $CC | grep '$ac_tool_prefix'`" = "" \
+	-a "`echo $CC | grep -- '-b'`" = ""; then
+  if $CC -v 2>&1 | grep -q gcc; then
+    AC_CACHE_CHECK([if $CC -b${ac_tool_dir} works], tl_cv_prog_cc_bhost,[
+    old_cc="${CC}"
+    CC="${CC} -b${ac_tool_dir}"
+    AC_LANG_SAVE
+    AC_LANG_C
+    AC_TRY_COMPILER([main(){return(0);}], tl_cv_prog_cc_bhost, ac_cv_prog_cc_cross)
+    AC_LANG_RESTORE])
+    if test $tl_cv_prog_cc_bhost = "yes"; then
+      ac_cv_prog_cc_works=yes
+      cctest=yes
+    else
+      CC="${old_cc}"
+    fi
+  fi
+fi
+
+if test "$cctest" != "yes"; then
+  tl_PROG_CC_WORKS
+fi
+AC_PROG_CC_GNU
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+dnl Check whether -g works, even if CFLAGS is set, in case the package
+dnl plays around with CFLAGS (such as to build both debugging and
+dnl normal versions of a library), tasteless as that idea is.
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  AC_PROG_CC_G
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+])
+
+AC_DEFUN(tl_PROG_CXX,
+[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
+AC_PROVIDE([AC_PROG_CXX])dnl
+tl_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
+if test -n "$CXX"; then
+  if test -n "$ac_tool_prefix" -a "`echo $CXX | grep '$ac_tool_prefix'`" = "" \
+	-a "`echo $CXX | grep -- '-b'`" = ""; then
+    if $CXX -v 2>&1 | grep -q gcc; then
+      AC_CACHE_CHECK([if $CXX -b${ac_tool_dir} works], tl_cv_prog_cxx_bhost,[
+      old_cxx="${CXX}"
+      CXX="${CXX} -b${ac_tool_dir}"
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILER([main(){return(0);}], tl_cv_prog_cxx_bhost, ac_cv_prog_cxx_cross)
+      AC_LANG_RESTORE])
+      if test $tl_cv_prog_cxx_bhost = "yes"; then
+	ac_cv_prog_cxx_works=yes
+	cxxtest=yes
+      else
+	CXX="${old_cxx}"
+      fi
+    fi
+  fi
+  
+  if test "$cxxtest" != "yes"; then
+    tl_PROG_CXX_WORKS
+  fi
+  AC_PROG_CXX_GNU
+  
+  if test $ac_cv_prog_gxx = yes; then
+    GXX=yes
+dnl Check whether -g works, even if CXXFLAGS is set, in case the package
+dnl plays around with CXXFLAGS (such as to build both debugging and
+dnl normal versions of a library), tasteless as that idea is.
+    ac_test_CXXFLAGS="${CXXFLAGS+set}"
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=
+    AC_PROG_CXX_G
+    if test "$ac_test_CXXFLAGS" = set; then
+      CXXFLAGS="$ac_save_CXXFLAGS"
+    elif test $ac_cv_prog_cxx_g = yes; then
+      CXXFLAGS="-g -O2"
+    else
+      CXXFLAGS="-O2"
+    fi
+  else
+    GXX=
+    test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+  fi
+fi
+])
+
+AC_DEFUN(tl_PROG_CC_WORKS,
+[AC_PROVIDE(AC_PROG_CC_WORKS)
+AC_CACHE_CHECK([whether the C compiler ($CC $CFLAGS $LDFLAGS) works],
+	ac_cv_prog_cc_works, [
+AC_LANG_SAVE
+AC_LANG_C
+AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
+AC_LANG_RESTORE
+if test $ac_cv_prog_cc_works = no; then
+  AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])
+fi])
+AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
+AC_MSG_RESULT($ac_cv_prog_cc_cross)
+cross_compiling=$ac_cv_prog_cc_cross
+])
+
+AC_DEFUN(tl_PROG_CXX_WORKS,
+[AC_PROVIDE(AC_PROG_CXX_WORKS)
+AC_CACHE_CHECK([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works],
+	ac_cv_prog_cxx_works, [
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
+AC_LANG_RESTORE
+if test $ac_cv_prog_cxx_works = no; then
+  AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.])
+fi])
+AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler])
+AC_MSG_RESULT($ac_cv_prog_cxx_cross)
+cross_compiling=$ac_cv_prog_cxx_cross
+])

+ 5 - 4
config.h.bot

@@ -48,13 +48,14 @@
 #ifndef ATTRNORETURN
 #ifdef HAVE_GNUC25_NORETURN
 #define ATTRNORETURN noreturn
-#else
+#else /* ! HAVE_GNUC25_NORETURN */
 #define ATTRNORETURN
-#endif
-#endif
+#endif /* HAVE_GNUC25_NORETURN */
+#endif /* ATTRNORETURN */
+
 #ifndef NONRETURNING
 #define NONRETURNING FUNCATTR((ATTRNORETURN))
-#endif
+#endif /* NONRETURNING */
 
 /* Combination of both the above. */
 #ifndef NONRETURNPRINTFFORMAT

+ 0 - 218
config.h.in

@@ -1,218 +0,0 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define to empty if the keyword does not work.  */
-#undef const
-
-/* Define if you don't have vprintf but do have _doprnt.  */
-#undef HAVE_DOPRNT
-
-/* Define if you have the vprintf function.  */
-#undef HAVE_VPRINTF
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef mode_t
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef pid_t
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-#undef WORDS_BIGENDIAN
-
-/* Define if inline functions a la GCC are available.  */
-#undef HAVE_INLINE
-
-/* Define if sysinfo is available.  */
-#undef HAVE_SYSINFO
-
-/* Define if __NR_sysinfo is available.  */
-#undef HAVE_NRSYSINFO
-
-/* Define if inline functions a la GCC are available.  */
-#undef HAVE_ALPHASORT_DECLARATION
-
-/* Define if function attributes a la GCC 2.5 and higher are available.  */
-#undef HAVE_GNUC25_ATTRIB
-
-/* Define if constant functions a la GCC 2.5 and higher are available.  */
-#undef HAVE_GNUC25_CONST
-
-/* Define if nonreturning functions a la GCC 2.5 and higher are available.  */
-#undef HAVE_GNUC25_NORETURN
-
-/* Define if printf-format argument lists a la GCC are available.  */
-#undef HAVE_GNUC25_PRINTFFORMAT
-
-/* Set this to the canonical Debian architecture string for this CPU type. */
-#undef ARCHITECTURE
-
-/* Set this to 1 to build new archives by default. */
-#define BUILDOLDPKGFORMAT 0
-
-/* Set this string to append something to the version number. */
-#define ARCHBINFMT ""
-
-/* The number of bytes in a unsigned int.  */
-#undef SIZEOF_UNSIGNED_INT
-
-/* The number of bytes in a unsigned long.  */
-#undef SIZEOF_UNSIGNED_LONG
-
-/* Define if you have the alphasort function.  */
-#undef HAVE_ALPHASORT
-
-/* Define if you have the scandir function.  */
-#undef HAVE_SCANDIR
-
-/* Define if you have the strerror function.  */
-#undef HAVE_STRERROR
-
-/* Define if you have the strsignal function.  */
-#undef HAVE_STRSIGNAL
-
-/* Define if you have the strtoul function.  */
-#undef HAVE_STRTOUL
-
-/* Define if you have the unsetenv function.  */
-#undef HAVE_UNSETENV
-
-/* Define if you have the vsnprintf function.  */
-#undef HAVE_VSNPRINTF
-
-/* Define if you have the <sys/cdefs.h> header file.  */
-#undef HAVE_SYS_CDEFS_H
-
-/* These are from config.h.bot, pasted onto the end of config.h.in. */
-
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
-/* Use the definitions: */
-
-/* Give us an unsigned 32-bit data type. */
-#if SIZEOF_UNSIGNED_LONG==4
-#define UWORD32 unsigned long
-#elif SIZEOF_UNSIGNED_INT==4
-#define UWORD32 unsigned int
-#else
-#error I do not know what to use for a UWORD32.
-#endif
-
-/* The maximum length of a #! interpreter displayed by dpkg-deb. */
-#ifdef PATH_MAX
-#define INTERPRETER_MAX PATH_MAX
-#else
-#define INTERPRETER_MAX 1024
-#endif
-
-/* GNU C attributes. */
-#ifndef FUNCATTR
-#ifdef HAVE_GNUC25_ATTRIB
-#define FUNCATTR(x) __attribute__(x)
-#else
-#define FUNCATTR(x)
-#endif
-#endif
-
-/* GNU C printf formats, or null. */
-#ifndef ATTRPRINTF
-#ifdef HAVE_GNUC25_PRINTFFORMAT
-#define ATTRPRINTF(si,tc) format(printf,si,tc)
-#else
-#define ATTRPRINTF(si,tc)
-#endif
-#endif
-#ifndef PRINTFFORMAT
-#define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
-#endif
-
-/* GNU C nonreturning functions, or null. */
-#ifndef ATTRNORETURN
-#ifdef HAVE_GNUC25_NORETURN
-#define ATTRNORETURN noreturn
-#else
-#define ATTRNORETURN
-#endif
-#endif
-#ifndef NONRETURNING
-#define NONRETURNING FUNCATTR((ATTRNORETURN))
-#endif
-
-/* Combination of both the above. */
-#ifndef NONRETURNPRINTFFORMAT
-#define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
-#endif
-
-/* GNU C constant functions, or null. */
-#ifndef ATTRCONST
-#ifdef HAVE_GNUC25_CONST
-#define ATTRCONST const
-#else
-#define ATTRCONST
-#endif
-#endif
-#ifndef CONSTANT
-#define CONSTANT FUNCATTR((ATTRCONST))
-#endif
-
-/* Declare strerror if we don't have it already. */
-#ifndef HAVE_STRERROR
-const char *strerror(int);
-#endif
-
-/* Declare strsignal if we don't have it already. */
-#ifndef HAVE_STRSIGNAL
-const char *strsignal(int);
-#endif
-
-/* Declare scandir if we don't have it already. */
-#ifndef HAVE_SCANDIR
-struct dirent;
-int scandir(const char *dir, struct dirent ***namelist,
-            int (*select)(const struct dirent *),
-            int (*compar)(const void*, const void*));
-#endif
-
-/* Declare alphasort if we don't have it already. */
-#if !defined(HAVE_ALPHASORT) || !defined(HAVE_ALPHASORT_DECLARATION)
-struct dirent;
-int alphasort(const struct dirent *a, const struct dirent *b);
-#endif
-
-/* Declare unsetenv if we don't have it already. */
-#ifndef HAVE_UNSETENV
-void unsetenv(const char *x);
-#endif
-
-/* Define strtoul if we don't have it already. */
-#ifndef HAVE_STRTOUL
-#define strtoul strtol
-#endif
-
-/* Sort out sysinfo */
-#if !defined(HAVE_SYSINFO) && defined(HAVE_NRSYSINFO)
-#include <linux/sys.h>
-#include <linux/kernel.h>
-#include <linux/unistd.h>
-static inline _syscall1(int,sysinfo,struct sysinfo*,info)
-#endif
-
-/* Define WCOREDUMP if we don't have it already - coredumps won't be
- * detected, though.
- */
-#ifndef WCOREDUMP
-#define WCOREDUMP(x) 0
-#endif
-
-/* Set BUILDOLDPKGFORMAT to 1 to build old-format archives by default.
- */
-#ifndef BUILDOLDPKGFORMAT
-#define BUILDOLDPKGFORMAT 0
-#endif

文件差异内容过多而无法显示
+ 0 - 2533
configure


+ 83 - 107
configure.in

@@ -1,83 +1,84 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(include/dpkg.h)
-AC_CONFIG_HEADER(config.h)
+AC_PREREQ([2.12])
 
-AC_PREFIX_DEFAULT(/usr)
+AC_INIT(include/dpkg.h.in)
+AM_CONFIG_HEADER(config.h)
+
+tl_CHECK_TOOL_PREFIX
+
+tl_PROG_CC
+tl_CANONICAL_SYSTEM
+tl_CHECK_TOOL_PREFIX
 
-AC_PROG_CC
+tl_PROG_CXX
 AC_PROG_CXX
+AM_CONDITIONAL(HAVE_CPLUSPLUS, [test "$CXX" != ""])
+
+tl_CHECK_TOOL(LD, ld, ld)
+
+AM_INIT_AUTOMAKE(dpkg,[`sed -n '1s/dpkg (\([0-9.]\+\)).*/\1/p' ${srcdir}/debian/changelog`])
+ACLOCAL="$ACLOCAL -I automake"
+AC_MSG_CHECKING(dpkg version)
+AC_MSG_RESULT($VERSION)
+
+AC_PREFIX_DEFAULT(/usr)
 
 dpkg_archset=''
 AC_ARG_WITH(arch,
-[  --with-arch=value       set/override (Debian) architecture value],
+[  --with-arch=value	  set/override (Debian) architecture value (deprecated)],
 [
  if test "x$with_arch" = x; then
   AC_MSG_ERROR(--with-arch requires an architecture name)
  fi
  dpkg_archset="${with_arch}"
+ dpkg_tmp="`awk '$1 == "'$target_cpu'" { print $2 }' $srcdir/archtable`"
+ if test "x$dpkg_tmp" = "x"; then
+  AC_MSG_WARN([unable to find specified architecture $dpkg_archset in archtable])
+ elif test "x$dpkg_tmp" != "x$dpkg_archset"; then
+  AC_MSG_WARN([canonical architecture is $dpkg_tmp (from archtable)])
+ fi
 ],[
  AC_MSG_CHECKING(system architecture)
- dpkg_archwhy=''
- AC_CACHE_VAL(dpkg_cv_arch,[
-  dpkg_arch="`dpkg --print-architecture 2>/dev/null`"
-  if test "x$dpkg_arch" != x; then
-   dpkg_archwhy="  (obtained from dpkg)"
-  elif test "${GCC-no}" = yes; then
-changequote(, )dnl
-   dpkg_arch="`${CC} --print-libgcc-file-name |
-	sed -e 's,^.*/gcc-lib/,,; s,/libgcc\.a$,,; s,/[0-9.][0-9.]*$,,; s/-.*$//'`"
-changequote([, ])dnl
-   if test "x`echo \"$dpkg_arch\" | tr -d a-z0-9-`" != x -o "x$dpkg_arch" = x
-   then
-    dpkg_arch=""
-    dpkg_archwhy=" (bad output from --print-libgcc-file-name)"
-   else
-    dpkg_arch2="`awk '$1 == "'$dpkg_arch'" { print $2 }' $srcdir/archtable`"
-    if test "x$dpkg_arch2" = "x$dpkg_arch"; then
-     dpkg_archwhy=" (obtained from gcc)"
-    elif test "x$dpkg_arch2" != x; then
-     dpkg_archwhy=" (from gcc, canonical form of $dpkg_arch)"
-     dpkg_arch="$dpkg_arch2"
-    else
-     dpkg_archwhy=" (from gcc, but not in archtable)"
-    fi
-   fi
-  else
-   dpkg_archwhy=''
-  fi
-  dpkg_cv_arch="$dpkg_arch"
- ])
- if test "x$dpkg_cv_arch" != x; then
-  AC_MSG_RESULT("$dpkg_cv_arch$dpkg_archwhy")
-  dpkg_archset="${dpkg_cv_arch}"
- else
-  AC_MSG_RESULT("failed$dpkg_archwhy")
+ dpkg_archset="`awk '$1 == "'$target_cpu'" { print $2 }' $srcdir/archtable`"
+ # Finish off
+ if test "x$dpkg_archset" = "x"; then
+  AC_MSG_ERROR(failed: use --with-arch= or --target=)
  fi
+ AC_MSG_RESULT($dpkg_archset)
 ])
+
 if test "x$dpkg_archset" != x
 then
- AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_cv_arch}")
+ AC_DEFINE_UNQUOTED(ARCHITECTURE, "${dpkg_archset}")
 fi
 
 if test "x${dpkg_archset}" = xi386; then
- AC_MSG_CHECKING(for i386 system/binary format)
- dpkg_libgcc="`$CC --print-libgcc-file-name 2>/dev/null`"
- case "$dpkg_libgcc" in
-  *-linux*)
-   if ar p "$dpkg_libgcc" __main.o 2>/dev/null | file - 2>/dev/null | grep ELF >/dev/null; then
-    AC_MSG_RESULT(Linux ELF)
-    dpkg_cc_binfmt=elf
-   else
-    AC_MSG_RESULT(Linux a.out)
-    dpkg_cc_binfmt=a.out
-   fi
-   AC_DEFINE_UNQUOTED(ARCHBINFMT, " $dpkg_cc_binfmt")
-  ;;
+ AC_MSG_CHECKING(target i386 system/binary format)
+ case "${target_os}" in
+  linuxaout|linux-gnuaout)
+   AC_MSG_RESULT(Linux a.out)
+   dpkg_cc_binfmt=a.out
+   ;;
+  
+  linuxcoff|linux-gnucoff)
+   AC_MSG_RESULT(Linux COFF)
+   dpkg_cc_binfmt=coff
+   ;;
+  
+  linux|linuxelf|linux-gnu*)
+   AC_MSG_RESULT(Linux ELF)
+   dpkg_cc_binfmt=elf
+   ;;
+  
   *)
-   AC_MSG_RESULT(non-Linux)
-  ;;
+   AC_MSG_RESULT([other (${target_os})])
+   dpkg_cc_binfmt=""
+   ;;
  esac
+ if test "x$dpkg_cc_binfmt" != "x"; then
+  AC_DEFINE_UNQUOTED(ARCHBINFMT," $dpkg_cc_binfmt")
+ fi
 fi
 
 AC_ARG_WITH(newdeb,
@@ -87,6 +88,15 @@ AC_ARG_WITH(olddeb,
 [  --with-olddeb           make dpkg-deb default to old archives],
 [AC_DEFINE(BUILDOLDPKGFORMAT, 1)])
 
+dnl gettext
+
+ALL_LINGUAS="en fr"
+AM_GNU_GETTEXT
+AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
+
+dnl Other stuff
+
 AC_MSG_CHECKING(for /usr/bin/perl)
 if test -f /usr/bin/perl
 then
@@ -100,9 +110,10 @@ fi
 
 AC_STDC_HEADERS
 AC_PROG_INSTALL
-dnl AC_PROGRAM_PATH(GZIP, gzip, )   use these from $PATH
-dnl AC_PROGRAM_PATH(TAR, tar, )     use these from $PATH
-AC_PROG_RANLIB
+AM_PROG_LIBTOOL
+dnl Default in case EMACS == no
+lispdir="\$(datadir)/emacs/site-lisp"
+AM_PATH_LISPDIR
 AC_MODE_T
 AC_PID_T
 AC_SIZE_T
@@ -111,7 +122,7 @@ AC_C_CONST
 AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(unsigned long)
 AC_CHECK_SIZEOF(unsigned int)
-AC_CHECK_FUNCS(unsetenv alphasort scandir strerror strsignal strtoul vsnprintf)
+AC_CHECK_FUNCS(unsetenv alphasort scandir strerror strsignal strtoul vsnprintf lchown)
 AC_CHECK_HEADERS(sys/cdefs.h)
 
 AC_CHECK_FUNC(sysinfo,
@@ -132,26 +143,14 @@ AC_CHECK_FUNC(sysinfo,
 
 AC_SUBST(OPTCFLAGS)
 if test "${GCC-no}" = yes; then
- CFLAGS=-O2; OPTCFLAGS=-O3
+ CFLAGS="-D_REENTRANT -D_GNU_SOURCE -O2"
+ CXXFLAGS="-D_REENTRANT -D_GNU_SOURCE -O2"
+ OPTCFLAGS="-O3"
 else
- CFLAGS=-O
+ CFLAGS="-D_REENTRANT -D_GNU_SOURCE -O"
+ CXXFLAGS="-D_REENTRANT -D_GNU_SOURCE -O"
 fi
 
-dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
-define(DPKG_CACHED_TRY_COMPILE,[
- AC_MSG_CHECKING($1)
- AC_CACHE_VAL($2,[
-  AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
- ])
- if test "x$$2" = xyes; then
-  true
-  $5
- else
-  true
-  $6
- fi
-])
-
 DPKG_CACHED_TRY_COMPILE(your C compiler,dpkg_cv_c_works,
  [#include <string.h>], [strcmp("a","b")],
  AC_MSG_RESULT(works),
@@ -196,33 +195,6 @@ DPKG_CACHED_TRY_COMPILE(__attribute__((,,)),dpkg_cv_c_attribute_supported,,
 AC_SUBST(CWARNS)
 CWARNS=""
 
-dnl DPKG_C_GCC_TRY_WARNS(<warnings>,<cachevar>)
-define(DPKG_C_GCC_TRY_WARNS,[
- AC_MSG_CHECKING([GCC warning flag(s) $1])
- if test "${GCC-no}" = yes
- then
-  AC_CACHE_VAL($2,[
-   oldcflags="${CFLAGS-}"
-   CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror"
-   AC_TRY_COMPILE([
-#include <string.h>
-#include <stdio.h>
-],[
-    strcmp("a","b"); fprintf(stdout,"test ok\n");
-], [$2=yes], [$2=no])
-   CFLAGS="${oldcflags}"])
-  if test "x$$2" = xyes; then
-   CWARNS="${CWARNS} $1"
-   AC_MSG_RESULT(ok)
-  else
-   $2=''
-   AC_MSG_RESULT(no)
-  fi
- else
-  AC_MSG_RESULT(no, not using GCC)
- fi
-])
-
 DPKG_C_GCC_TRY_WARNS(-Wall -Wno-implicit, dpkg_cv_c_gcc_warn_all)
 DPKG_C_GCC_TRY_WARNS(-Wwrite-strings, dpkg_cv_c_gcc_warn_writestrings)
 DPKG_C_GCC_TRY_WARNS(-Wpointer-arith, dpkg_cv_c_gcc_warn_pointerarith)
@@ -232,6 +204,10 @@ if test "${GCC-no}" = yes; then
  CWARNS="${CWARNS} -Wmissing-prototypes -Wstrict-prototypes"
 fi
 
-AC_OUTPUT(Makefile dpkg-deb/Makefile lib/Makefile include/Makefile
-          dselect/Makefile split/Makefile methods/Makefile
-          md5sum/Makefile main/Makefile doc/Makefile scripts/Makefile)
+echo "#define DPKG_VERSION \"$VERSION\" /* This line modified by configure */" > version.h.new
+cmp -s version.h.new version.h || mv version.h.new version.h
+
+AC_OUTPUT([Makefile intl/Makefile dpkg-deb/Makefile lib/Makefile
+          include/Makefile dselect/Makefile split/Makefile methods/Makefile
+          md5sum/Makefile main/Makefile doc/Makefile scripts/Makefile
+          po/Makefile.in])

+ 4 - 0
debian/.cvsignore

@@ -0,0 +1,4 @@
+build
+tmp-main
+tmp-dev
+substvars

+ 8 - 0
debian/50dpkg-dev.el

@@ -0,0 +1,8 @@
+;; 
+;; /etc/emacs/site-start.d/50dpkg-dev.el
+;;
+;; Copyright (C) 1997, Klee Dienes <klee@mit.edu>
+;; I hereby release this progam into the public domain.
+
+(autoload 'debian-changelog-mode "/usr/lib/emacs/site-lisp/debian-changelog-mode.el"
+        "Major mode for editing Debian-style change logs." t)

+ 21 - 0
debian/README.compile

@@ -0,0 +1,21 @@
+
+To compile this package you need to have some less-then-standard packages
+installed. Here's a list:
+
+automake
+autoconf
+debiandoc-sgml
+dpkg-perl
+gettext
+libtool
+libpaperg
+lout
+psutils
+sgml-base
+sgml-data
+sgml-tools
+sgmlspm
+sp
+tetex-base
+tetex-bin
+

+ 494 - 1
debian/changelog

@@ -1,3 +1,496 @@
+dpkg (1.4.1) unstable; urgency=low
+
+  * Maintainer release by IWJ.
+  * Changed Maintainer: field description.
+  * Various changes to make the damn thing build.
+  * Add .cvsignore files.
+
+ -- Ian Jackson <ian@davenant.greenend.org.uk>  Sun,  1 Nov 1998 17:33:38 +0000
+
+dpkg (1.4.0.31) unstable; urgency=low
+
+  * dpkg/processarc.c: Make newfileslist static like the other arguments
+    for register_cleanup's cu_* functions.
+  * N-th fix for controllib.pl (simulate old behavior by trying stdin,
+    stdout, and stderr for getlogin()).
+  * Enable --force-overwrite for slink release, and comment where to do
+    so (dpkg/main.c).
+  * Recompile against ncurses4.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Thu, 22 Oct 1998 17:37:23 -0400
+
+dpkg (1.4.0.30) unstable; urgency=low
+
+  * dpkg-dev isn't allowed to have a Recommends: debian-keyring (as that's
+    in contrib), so it's now lowered to a Suggests: . Thanks to James Troup
+    for pointing this out. 
+
+ -- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl>  Sat, 26 Sep 1998 13:59:23 +0200
+
+dpkg (1.4.0.29) unstable; urgency=low
+
+  * For now, prefer PGP over GPG.
+
+ -- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl>  Tue, 22 Sep 1998 09:38:09 +0200
+
+dpkg (1.4.0.28) unstable; urgency=low
+
+  * Added gpg (GNU Privacy Guard) support:
+    * scripts/buildpackage.sh: default to GPG (unless no GPG, but only a PGP
+      secret key file is found), as GPG, unlike PGP, is DFSG-free.
+    * Updated dpkg-source(1), and added gpg(1) and pgp(1) to the SEE ALSO
+      section.
+    * Worked around broken textmode implementation in GPG.
+    * dpkg-dev now Suggests: gnupg .
+  * No longer includes developer-keys.pgp . Instead, dpkg now Suggests: and
+    dpkg-dev now Recommends: developer-keyring.
+  * Compiled with latest libstdc++ (2.9).
+
+ -- J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl>  Mon, 21 Sep 1998 13:17:14 +0200
+
+dpkg (1.4.0.27) unstable; urgency=low
+
+  * REALLY fixed dpkg-dev, and new attempt to placate installer on internals.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Fri, 27 Jul 1998 15:58:04 -0400
+
+dpkg (1.4.0.26.0.1) unstable; urgency=low
+
+  * Binary-only upload for x86 and fixed dpkg-dev
+
+ -- Daniel Jacobowitz <dan@debian.org>  Fri, 24 Jul 1998 15:58:04 -0400
+
+dpkg (1.4.0.26) unstable; urgency=low
+
+  * Non-maintainer upload.
+
+  * Make --root work with maintainer scripts (Patch by Scott Barker,
+    bugs #4863 and #3170).
+  * Fix $(lispdir) bug if compiling without emacs (noticed by Joey Hess).
+
+ -- Daniel Jacobowitz <dan@debian.org>  Thu, 23 Jul 1998 12:02:04 -0400
+
+dpkg (1.4.0.25) unstable; urgency=low
+
+  * Non-maintainer upload.
+  
+  * Add the requested -nc option to dpkg-buildpackage (Do
+    not clean source tree, useful in debugging cycles).
+  * controllib.pl: Again by popular acclamation, fix the getlogin() warnings.
+    I redirected STDERR onto fd 0 before calling getlogin().
+  * tools.m4: Fix display of whether c++ works.
+  * dpkg-deb/extract.c: glibc 2.1 and some kernels want to make
+    fflush() move the current fpos.  Until someone can fix that,
+    protect with seek.
+  * Add an extra 0, to dselect/{pkg,meth}keys.cc so it compiles again.
+  * Start using lchown() if available.
+  * Really fix #20353. (aclocal.m4 was the wrong place; that's a generated
+    file.  The correct place is in tl_canon.m4.)
+
+ -- Daniel Jacobowitz <dan@debian.org>  Tue, 21 Jul 1998 03:14:14 -0400
+
+dpkg (1.4.0.24) unstable; urgency=low
+
+  * Non-maintainer upload.
+
+  * dpkg/main.c: Turn --force-overwrite off as default.
+  * dpkg/main.c: don't list --force-overwrite as default in --force-help,
+    noticed by Peter Weiss <Peter.Weiss@Informatik.Uni-Oldenburg.DE> and
+    others. [#23542, part of #17409].
+  * dpkg/dpkg.8: replaced with a newer version from Jim Van Zandt
+    <jrv@vanzandt.mv.com>. [#21061]
+
+  * dpkg-deb/build.c (do_build): add missing \n and improve error message
+    when conffile name is too long. [#7057]
+
+  * scripts/update-alternatives.8: replaced with better man page from
+    Charles Briscoe-Smith <cpb4@ukc.ac.uk>. [#17283]
+  * scripts/dpkg-source.1: corrected logic error in documentation for
+    dpkg-gencontrol's -p option, as noticed by Oliver Elphick
+    <olly@linda.lfix.co.uk>. [#14655]
+  * scripts/controllib.pl (findarch): correct typo in error message,
+    noticed by Yann Dirson <ydirson@a2points.com>. [#22106]
+  * scripts/dpkg-buildpackage.sh: fix typo s/source version/source
+    maintainer/, noticed by Joey Hess <joey@kite.ml.org>, Adam P. Harris
+    <apharris@onshore.com> and others. [#10175, #15559]
+  * scripts/dpkg-genchanges.pl: applied patch from Roman Hodek
+    <Roman.Hodek@informatik.uni-erlangen.de> which solves problems with
+    architecture specific packages in mostly architecture independent
+    multi-binary source packages. [#14341, #20192].
+
+  * doc/Makefile.am: remove any reference to the packaging manual, as it is
+    now provided by the separate "packaging-manual" package.
+  * doc/packaging.sgml: removed.
+  * doc/developer-keys.pgp: updated to the current debian keyring.
+
+  * aclocal.m4: applied patch from Joel Klecker <jk@espy.org> to handle
+    egcs' --print-libgcc-file-name output. [#20353]
+  
+  * debian/copyright: correct FSF address.
+  * debian/rules: add code from lesstif's debian/rules to make libtool
+    less of a fool (i.e. not use -rpath and to link shared libraries
+    against libraries it depends on).  Code by Richard Braakman
+    <dark@xs4all.nl> and Yann Dirson <dirson@debian.org>.
+  * debian/rules: remove all reference to the packaging manual as it is
+    now provided by the seperate "packaging-manual" package. [#21581,
+    #21186, #22698, #23342]
+  * debian/rules: link dpkg-divert.1.gz to undocumented.7.gz as the lack
+    of a real manpage has been reported in #11093.
+  * debian/README.compile: removed gawk and bogus comment about gettext
+    being in experimental, as reported by Santiago Vila <sanvila@unex.es>
+    [#23344].  Added libpaperg (debiandoc2ps needs paperconf).
+  * debian/shlibs.default.i386: updated for glibc, reported by Herbert Xu
+    <herbert@gondor.apana.org.au>. [#13140]
+  * debian/control (dpkg-dev): depend on perl as POSIX (not a part of
+    perl-base) is needed by most of the perl dpkg-* scripts, noticed by
+    Joel Klecker <jk@espy.org>. [#22115]
+
+ -- James Troup <jjtroup@comp.brad.ac.uk>  Wed, 24 Jun 1998 14:38:52 +0200
+
+dpkg (1.4.0.23.2) frozen unstable; urgency=low
+
+  * Non-maintainer upload.
+  * dpkg/main.c: Turn --force-overwrite back on as default.
+
+ -- James Troup <jjtroup@comp.brad.ac.uk>  Tue, 23 Jun 1998 22:19:26 +0200
+
+dpkg (1.4.0.23.1) frozen unstable; urgency=low
+
+  * No real changes, only a new version code to make this go to frozen too.
+
+ -- Nils Rennebarth <nils@debian.org>  Wed, 10 Jun 1998 17:29:58 +0200
+
+dpkg (1.4.0.23) frozen unstable; urgency=low
+
+  * Non-maintainer bug-fix release
+  * Update the disk method to the hamm directory structure (Bug#21000)
+
+ -- Nils Rennebarth <nils@debian.org>  Sun,  7 Jun 1998 19:14:51 +0200
+
+dpkg (1.4.0.22) frozen unstable; urgency=medium
+
+  * Non-maintainer bug-fix release
+  * Install main changelog file as `changelog.gz' instead of
+    `changelog.dpkg.gz' (Debian Policy, section 5.8) (Bug#6052,15157)
+  * Avoid use of /tmp/*.$$ in preinst and postinst (Bug#19712)
+  * Make sure diversions file is always created with mode 0644 (Bug#19494)
+  * When removing a file, chmod it to 000 if it's a char or block
+    device or remove its s[ug]id bits, if any (Bug#6006)
+  * Minor fixes in the programmer's manual (Bug#6206)
+  * Always create readable status and available files
+    (Bug#9869,11887,14636,15786,19146)
+  * Make dpkg-gencontrol honour -DArchtecture=xxxx (Bug#9893)
+  * Allow different archs for the same binary in debian/files (Bug#9894)
+  * Added workaround in /usr/lib/dpkg/methods/disk/setup
+    to avoid bash warning (Bug#10111,10131)
+  * Recognize old .deb packages with other locales (Bug#12232)
+  * Added `SHELL=bash' to debian/rules: it uses bash-specific structs
+  * Move some files from dpkg to dpkg-dev (part of Bug#13295)
+  * Minor fix in packaging manual regarding to Standards-Version (Bug#14696)
+  * Fixed --altdir and --admindir in update-alternatives (Bug#15332)
+  * Strip /usr/lib/libdpkg* (Bug#15671)
+  * dpkg: send output of --help, --force-help and -Dhelp to stdout
+    (Bug#16051,18574)
+  * send correct signals with start-stop-daemon (Bug#17258)
+  * Make `dpkg-divert --test --remove' work as expected (Bug#19531)
+  * Determine properly the architecture if gcc is egcs (Bug#20353)
+
+ -- Juan Cespedes <cespedes@debian.org>  Sun,  5 Apr 1998 17:37:01 +0200
+
+dpkg (1.4.0.21) unstable; urgency=low
+
+  * Non-maintainer release to include a new update-rc.d
+  * Fixed date on files in the archive from 2017 and 2018 by running
+    touch foo; find . -newer foo | xargs -r touch; rm foo
+  * Changed start-stop-deamon message "No <program> found; none killed." to
+    "No <program> found running; none killed."
+
+ -- Miquel van Smoorenburg <miquels@cistron.nl>  Thu,  5 Mar 1998 14:19:46 +0100
+
+dpkg (1.4.0.20) unstable; urgency=low
+
+  * Disabled --force-overwrites.
+  * Removed core file from source
+
+ -- Michael Alan Dorman <mdorman@debian.org>  Tue,  9 Jan 2018 03:34:28 -0500
+
+dpkg (1.4.0.19) unstable; urgency=low
+
+  * Changed methods/disk.setup to use output of
+    'dpkg --print-installation-architecture' instead of hard-coded 
+    '1386' (fixes #10995).
+  * Patched dpkg-source to properly quote metacharacters in strings 
+    before using them in pattern-matching expressions (fixes #10811).
+  * Fixed several documentation typos (fixes #10764).
+  * dpkg-source now works around 100-character filename limitation of cpio
+    (fixes #10400).
+  * dpkg-source now properly handles '\ no newline in source' message from
+    patch (fixes #5041).
+  
+ -- Klee Dienes <klee@debian.org>  Sun, 13 Jul 1997 19:28:22 -0700
+
+dpkg (1.4.0.18) unstable; urgency=low
+
+  * dpkg-source now uses new -z option to GNU patch (still needs to be
+    changed to detect and use old version as well) (fixes #9904, #10005, #10007).
+  * Added i686 to archtable.
+  * shlibs.default now uses xlib6 instead of elf-x11r6lib (fixes #9926).
+  * debian-changelog-mode now uses interruptible completing type-in fields
+    instead of the previous 'select-a-letter method'.  I consider this
+    better and more standard than the previous way, but I'd welcome
+    opinions to the contrary.  Consider this a 'probationary' change for
+    now (fixes #9873, #9874).
+
+ -- Klee Dienes <klee@debian.org>  Sun, 25 May 1997 09:56:08 -0400
+
+dpkg (1.4.0.17) unstable; urgency=low
+
+  * All of the dpkg binaries (but not dpkg-dev or dselect) now speak
+    french, thanks to patches from Christophe Le Bars <clebars@teaser.fr>
+  * Fix leading spaces before day in 822-date.
+  * Changes from Tom Lees <tom@lpsg.demon.co.uk> to better support
+    building on non-Debian systems; minor Makefile fixes.
+  * Added 'ppc powerpc powerpc' to archtable.
+  * Changed documentation paper size to US/Letter instead of A4 (A4
+    may be better, but it's easier to print US/Letter on A4 than it is 
+    to print A4 on US/Letter).
+  
+ -- Klee Dienes <klee@debian.org>  Tue,  13 May 1997 15:24:31 -0400
+
+dpkg (1.4.0.16) experimental; urgency=low
+
+  * Added generated sources to GNU-format source archive so it no longer
+    requires perl to build.
+
+ -- Klee Dienes <klee@debian.org>  Sat, 10 May 1997 17:34:29 -0400
+
+dpkg (1.4.0.15) experimental; urgency=low
+
+  * Changed dpkg-genchanges to check for ($arch == $substvar{'Arch'}), not
+    ($arch ne 'all') (fixes #9688).
+  * Fixed bug in start-stop-daemon.c (was using optarg after argument
+    parsing was over) (fixes #9597, #9603, #9364).
+  * Provide 50dpkg-dev.el for xemacs as well as emacs.
+  * Explicitly provide path for debian-changelog-mode in 50dpkg-dev to use
+    .el file as workaround until xemacs can read emacs19 .elc files.
+  * Pass top_distdir explicitly to 'make dist' to accomodate bug in
+    automake_1.1o-1.
+  * Fix debian/build to make html documentation without including
+    directories in tar archives (fixes #9348).
+  
+ -- Klee Dienes <klee@debian.org>  Fri,  9 May 1997 13:17:18 -0400
+
+dpkg (1.4.0.14) experimental; urgency=low
+
+  * Fixed buglet in install-info.pl (fixes #9438).
+  * Re-write of update-rc.d.pl, primarily by Miquel van Smoorenburg
+    <miquels@cistron.nl> (fixes #9434, #9436).
+  * Renamed "dpkg Programmer's Manual" to "dpkg Internals Manual".
+  
+ -- Klee Dienes <klee@debian.org>  Tue,  6 May 1997 22:01:07 -0400
+
+dpkg (1.4.0.13) experimental; urgency=low
+
+  * Fix to start-stop-daemon so that it still takes numeric arguments (had
+    been broken in 1.4.0.12) (fixes #9598).
+  * Fix 822-date to sanity-check localtime() output (seconds must be the
+    same as GMT).
+  * Patch from Guy Maor <maor@ece.utexas.edu> to dpkg-source.pl to support
+    pristine (MD5-equivalent) upstream sources.
+  * Patch from Michael Alan Dorman <mdorman@calder.med.miami.edu> to
+    update-rc.d.pl to fix handling multiple start/stop entries on a single
+    line.
+  * Several fixes to dpkg-genchanges to support -B option (added in
+    1.4.0.12) (fixes #9340).
+  * Handle errors from 822-date in debian-changelog-mode.el.
+  * Changed cl-debian.pl to correctly handle extra whitespace in changelog
+    datestamps.
+
+ -- Klee Dienes <klee@debian.org>  Mon,  5 May 1997 18:12:43 -0400
+
+dpkg (1.4.0.12) experimental; urgency=low
+
+  * Re-wrote 822-date for clarity and to support timezone offsets >= 12h
+    (New Zealand in DST is +1300, for example) (fixes #7130).
+  * Patch from Juergen Menden <menden@morgana.camelot.de> to support
+    archdependent-only builds (fixes #8912, #9245, #5359).
+  * Fix archtable entry for powerpc (fixes #8794).
+  * Strip /sbin/* and /usr/sbin/* in debian/rules (fixes #8853).
+  * Moved start-stop-daemon to /sbin (fixes #8669).
+  * Set sharedstatedir and localstatedir for $(MAKE) install in
+    debian/rules (fixes #8852).
+  * Fixes for update-rc.d(8) from Jim Van Zandt <jrv@vanzandt.mv.com>
+    (fixes #8576).
+  * No longer do variable substitutions when generating change file (fixes
+    #5862).
+  * Support symbolic signal names in start-stop-daemon (fixes #7715).
+  * Add autoload for debian-changelog-mode to /etc/emacs/site-start.d
+    (fixes #4519, #5841).
+  * Add recommendation for gcc and make in dpkg-dev (gcc is needed for dpkg
+    --print-architecture, used by dpkg-gencontrol; make is needed for any
+    debian/rules file) (fixes #8470).
+  * Minor changes to packaging manual section on source package
+    conversion (fixes #6801).
+  * Renamed "programmer's manual" to 'packaging manual'.
+  * Start of new "programmer's manual" containing information on dpkg
+    internals and build information.  This manual uses the new
+    TeXinfo-SGML format, currently included in doc/.
+  * dselect/pkgdepcon.cc now checks for debug not NULL, not just depdebug.
+  * Changed makefiles to support building outside of source directory.
+  * Include GNU-format source distribution with other non-debian packages.
+
+ -- Klee Dienes <klee@debian.org>  Sun,  4 May 1997 11:08:19 -0500
+
+dpkg (1.4.0.11) experimental; urgency=low
+
+  * Patches for alpha and libc6 from Michael Alan Dorman
+    <mdorman@calder.med.miami.edu>.
+  * Fixed minor problems in dpkg-shlibdeps regular expressions for libc6.
+  * Fix regex to detect directory creation in dpkg-source.pl.
+  * Minor changes for automake-1.1n.
+
+ -- Klee Dienes <klee@debian.org>  Sun, 23 Mar 1997 18:09:33 -0500
+
+dpkg (1.4.0.10) unstable; urgency=medium
+
+  * Fixed bug in controllib.pl (@fowner was entire passwd entry,
+    not just [uid, gid] as it should have been).
+
+ -- Klee Dienes <klee@debian.org>  Thu, 20 Mar 1997 13:06:52 -0500
+
+dpkg (1.4.0.9) unstable; urgency=low
+
+  * Check fputs() return values for (ret >= 0), not (ret != 0) (fixes #7522).
+  * dpkg-shlibdeps no longer gives error for Java and statically linked
+    binaries (fixes #4988).
+  * Change 'details of the old format' to 'details of the new format' in
+    deb-old.5 (fixes #7605).
+  * dpkg-source -b now warns (was previously silent) if maintainer changes
+    create new subdirectories.  dpkg-source -x now warns (previously gave
+    error) if maintainer changes create new subdirectories (partially
+    fixes #6866, #6671, #5045, #6482).    
+  * Added manual page for start-stop-daemon (8). 
+  * Added C version of start-stop-daemon by 
+    Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> (fixes #1670).
+  * Converted to use GNU automake for the build process by Tom Lees 
+    <tom@lpsg.demon.co.uk>.<
+  * Preliminary support for dpkg functions as a shared library (now
+    provides libdpkg.so, but much work needs to be done in better
+    segregating and defining the interface).
+  * Preliminary internationalization support by Galen Hazelwood
+    <galenh@debian.org>.  Only the library, dpkg-deb, md5sum, and dpkg
+    have been converted so far.  No translations have yet been
+    constructed.
+  * Handle 'libc.so.6 => /lib/libc.so.6 (0x40010000)' format from libc6
+    ldd (fixes #7603, #7926, #8688, #9179, #9134, #8516).
+  * Removed policy.sgml (it has been moved to the debian-policy package).
+  * Include patch from Darren Stalder <torin@daft.com> for
+    dpkg-buildpackage to choose PGP key based on Maintainer: field of 
+    package being built (or -m<maintainer> option, if present) (fixes 
+    #7898).
+  * Changed controllib.pl to use $ENV{LOGNAME}, getlogin(), and $<
+    (in that order) to determine the intended ownership of 
+    debian/{files,substvars},  (fixes #7324, #6823, #5659, #5965, #5929,
+    #9239, #5366).
+  * Don't sign .dsc file in dpkg-buildpackage if building a binary-only
+    release (fixes #7260).
+  * Updated developer-keys.pgp to latest revision (fixes #6134).
+  
+ -- Klee Dienes <klee@debian.org>  Mon, 17 Mar 1997 16:11:24 -0500
+
+dpkg (1.4.0.8) unstable; urgency=medium
+
+  * Corrected update-rc.d for bash 2.0
+  * Updated developer-keys.pgp from
+    http://www.iki.fi/liw/debian/debian-keyring.tar.gz
+
+ -- Guy Maor <maor@ece.utexas.edu>  Mon, 3 Feb 1997 04:05:01 -0600
+
+dpkg (1.4.0.7) stable unstable; urgency=HIGH
+
+  * Fixed --assert-support-predepends failing between unpack & configure.
+  * Added --assert-working-epoch option.
+
+ -- Guy Maor <maor@ece.utexas.edu>  Sat, 25 Jan 1997 23:02:11 -0600
+
+dpkg (1.4.0.6) stable unstable; urgency=high
+
+  * Patched lib/vercmp.c to hopefully fix dselect epoch processing
+    (Bug#6204), (Bug#4590).
+  * Patched scripts/dpkg-buildpackage, scripts/dpkg-genchanges,
+    scripts/dpkg-gencontrol for epoch processing, courtesy of Loic Prylli 
+    <lprylli@graville.fdn.fr> (Bug#6138, Bug#5225).
+  * Patched dpkg-genchanges to actually honor the -u switch to specify
+    directory (Bug#5564).
+  * Applied patch to main/archive.c to correct problems setting set[gu]id
+    binaries, courtesy of Herbert Xu <herbert@greathan.apana.org.au>
+    (Bug#5479). 
+  * Applied patch to dpkg-source to correct debian-only package names,
+    courtesy of Guy Maor <maor@ece.utexas.edu> (Bug#5355).
+
+ -- Michael Alan Dorman <mdorman@calder.med.miami.edu>  Thu, 2 Jan 1997 11:36:09 -0500
+
+dpkg (1.4.0.5) stable frozen unstable; urgency=medium
+
+  * Distribution for frozen too.
+
+ -- Heiko Schlittermann <heiko@lotte.sax.de>  Thu, 5 Dec 1996 09:13:42 +0100
+
+dpkg (1.4.0.4) stable unstable; urgency=medium
+
+  * Bug2962 fixed: patch from Ian Jackson applied
+    (cursor keys won't work after search)
+  * Manuals 2.1.2.2
+
+ -- Heiko Schlittermann <heiko@lotte.sax.de>  Fri, 15 Nov 1996 20:21:18 +0100
+
+dpkg (1.4.0.3) unstable; urgency=medium
+
+  * dpkg-source -x: created bad permissions (set x-bit for
+    all files pointed to by a symlink)
+
+ -- Heiko Schlittermann <heiko@lotte.sax.de>  Fri, 18 Oct 1996 18:32:06 +0200
+
+dpkg (1.4.0.2) unstable; urgency=medium
+
+  * dpkg-buildpackage.sh: reverted the quoting change -- (you
+    should use super, sudo, realy, but not su.  Or write a wrapper
+    around su)
+  * dpkg-buildpackge.sh: passing -m, -C, -v options to dpkg-genchanges
+    more the way Ian likes ;-)
+  * dpkg-source.pl: new function deoctify() as replacement for eval()
+    (turn \ddd into the corresponding character) [rem: probably better
+    solution would be to convert cpios output names into complete \ddd 
+    representation as well tars output names] 
+  * dpkg-source.pl: fixed 2 typos in failure message on creating 
+    $origtargz.tmp-nest.
+  * main/main.c: typo `tread' -> `treat'
+  * main/enquiry.c: fixed the ignorance for some relations in --compare-versions
+  * main/enquiry.c: missing version is now handled as described in `dpkg --help'
+    (or at least as I understood `dpkg --help' PLEASE TRY IT)
+  * lib/parsehelp.c: fixed parsing of epoch information
+
+ -- Heiko Schlittermann <heiko@lotte.sax.de>  Sun, 6 Oct 1996 23:27:47 +0200
+
+dpkg (1.4.0.1) unstable; urgency=medium
+
+  * dpkg-source: doesn't get screwed up from hardlinks
+    in the archive now
+  * dpkg-source: doesn't get screwed up from `unprintable' characters
+    in file names (e.g. from the kbd package) 
+  * controllib.pl: $varlistvile -> $varlistfile (thanx Karl Sackett)
+  * dpkg-buildpackge: quoting for $rootcommand (thanx  Michael Meskes)
+    and `eval' as default $rootcommand
+  * dpkg-*, controllib.pl: created debian/files and debian/substvars
+    are chown'ed to `getlogin()' and its group
+  * doc/: mv changed to mv -f
+  * dpkg-buildpackage: added an option -a for overriding the
+    architecture in the changes _file_name_
+  * dpkg-buildpackage: pass -m* -v* .. options to dpgk-genchangelog
+  * dpkg-name moved to dpkg-dev
+
+ -- Heiko Schlittermann <heiko@lotte.sax.de>  Sat, 21 Sep 1996 22:06:01 +0200
+
 dpkg (1.4.0) unstable; urgency=low (HIGH for new source format)
 
   * Corrected buffer overrun when dpkg-deb generates filename.  (Bug#4467.)
@@ -1407,7 +1900,7 @@ Changes in dpkg 0.93.29:
 
 Changes in dpkg 0.93.28:
 
-* Removed undef of %xx_p21 in read_database_file, which caused the
+* Removed undef of 0x_p21 in read_database_file, which caused the
   the whole status database to become trashed when any update files
   were read.
 * Make infinite-loop prevention and cycle detection work.

+ 5 - 2
debian/control

@@ -1,13 +1,14 @@
 Source: dpkg
 Section: base
 Priority: required
-Maintainer: Ian Jackson <ian@chiark.greenend.org.uk>
+Maintainer: Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>
 Standards-Version: 2.1.0.0
 
 Package: dpkg
 Architecture: any
 Essential: yes
 Pre-Depends: ${shlibs:Pre-Depends}
+Suggests: developer-keyring
 Description: Package maintenance system for Debian Linux
  This package contains the programs which handle the installation and
  removal of packages on your system.
@@ -23,7 +24,9 @@ Package: dpkg-dev
 Section: devel
 Priority: important
 Architecture: all
-Recommends: cpio (>= 2.4.2-2), patch
+Depends: perl
+Recommends: cpio (>= 2.4.2-2), patch (>= 2.2-1), gcc, make
+Suggests: gnupg, developer-keyring
 Conflicts: dpkgname
 Replaces: dpkgname, dpkg (<< 1.4.0)
 Description: Package building tools for Debian Linux

+ 2 - 2
debian/copyright

@@ -30,8 +30,8 @@ for more details.
 You should have received a copy of the GNU General Public License with
 your Debian GNU/Linux system, in /usr/doc/copyright/GPL, or with the
 dpkg source package as the file COPYING.  If not, write to the Free
-Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
+Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
 
 /usr/bin/md5sum is compiled from md5.[ch] (written by Colin Plumb in
 1993 and modified by Ian Jackson in 1995) and md5sum.c (written by

+ 4 - 4
debian/postinst

@@ -142,13 +142,13 @@ if [ ! -f status ]
 then
 	echo 'Adding "status" file to dpkg system database ...'
 
-	rm -f /tmp/dpp.$$ || true
+	rm -f dpp.$$ || true
 
-	ls -1 deb/*.control >/tmp/dpp.$$
+	ls -1 deb/*.control >dpp.$$
 	sed -e 's:^deb/::; s:\.control$: Install OK Installed:;' \
-		</tmp/dpp.$$ >status.new
+		<dpp.$$ >status.new
 
-	rm /tmp/dpp.$$
+	rm dpp.$$
 	mv status.new status
 fi
 

+ 5 - 5
debian/preinst

@@ -3,7 +3,7 @@
 if [ "$1" != "upgrade" ]; then exit 0; fi
 
 set -e
-# i386elf: dpkg --assert-support-predepends
+# i386elf: [ "$2" = "1.4.0.6" ] || dpkg --assert-support-predepends
 
 oldver="$2"
 
@@ -15,21 +15,21 @@ esac
 echo '
 contemplating upgrade of dpkg from pre-0.93.50 version ...'
 
-trap 'es=$?; rm -f /tmp/bp.$$; exit $es' 0
+trap 'es=$?; rm -f /var/lib/dpkg/bp.$$; exit $es' 0
 
 perl -000 -ne 'print $x if m/^Package:\s+(\S+\n)/im &&
 			  ($x=$1) ne "dpkg\n" &&
 			  m/^Status:.*(unpacked|postinst)/im' \
-	/var/lib/dpkg/status >/tmp/bp.$$
+	/var/lib/dpkg/status >/var/lib/dpkg/bp.$$
 
-if test -s /tmp/bp.$$
+if test -s /var/lib/dpkg/bp.$$
 then
 	echo '
 
 WARNING - have you read the release notes for this upgrade ?
 
 The following packages have been unpacked but not yet configured:'
-	echo '' `cat /tmp/bp.$$`
+	echo '' `cat /var/lib/dpkg/bp.$$`
 	echo -n '
 If you proceed with the dpkg upgrade with these packages in this state
 you will LOSE ANY CONFIGURATION CHANGES that have been made to their

+ 123 - 46
debian/rules

@@ -1,31 +1,84 @@
 #!/usr/bin/make -f
 
-DIR:=$(shell pwd)
+SHELL=bash
+
+.PHONY: clean build binary binary-trees binary-arch binary-indep
+
+BUILD := $(shell pwd)/debian/build
+DIR := $(shell pwd)
 
 arch=$(shell dpkg --print-architecture)
 mcidir=debian/tmp-main/DEBIAN
 
-build:
+
+Makefile.in: Makefile.am
 	$(checkdir)
-	./configure --prefix=/usr
-	$(MAKE)
-	touch build
+	$(RM) config.status
+	mkdir -p automake
+	aclocal -I ./automake
+	autoheader
+	autoconf
+	gettextize --force
+	libtoolize --automake --copy --force
+	$(RM) config.sub config.guess 
+	ln -s /usr/share/automake/config.sub .
+	automake --add-missing
 
-clean:
+$(BUILD)/Makefile: Makefile.in
 	$(checkdir)
-	-rm -f build
-	-$(MAKE) -i distclean || $(MAKE) -f Makefile.in -i distclean
-	-rm -rf debian/tmp* *~ *.orig ./#*# tmp.* debian/files*
-	-rm -f config.cache config.status config.h install config.log
-	find -name '*~' -print0 | xargs -r0 rm --
+	$(RM) -r debian/build
+	install -d debian/build
+	cd $(BUILD) && ../../configure \
+		--enable-shared --with-included-gettext \
+		--prefix=/usr \
+		--datadir=/usr/share \
+		--sysconfdir=/etc \
+		--sharedstatedir=/var/lib \
+		--localstatedir=/var/lib
+# libtool -rpath workaround based on a suggestion by Yann Dirson
+# <dirson@debian.org>
+#
+# It is supposed to be inserted in configure.in, but I didn't want
+# to re-run autoconf (since that bloats the Debian diff unnecessarily),
+# so I just patch libtool after running configure.  -- Richard Braakman
+# <dark@xs4all.nl>
+#
+# The version of libtool included with LessTif unfortunately insists on
+# linking with -rpath, i.e. hardwiring locations. This is not desirable.
+#
+# The dummy define is improbable enough not to conflict with anything; it is
+# just here to fool libtool by making it believe it gave some useful info to
+# gcc.
+	sed < $(BUILD)/libtool > $(BUILD)/libtool.foo \
+		's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
+	mv $(BUILD)/libtool.foo $(BUILD)/libtool
+# More hackery: this will also patch the generated libtool to explicitly
+# link libraries against the libraries they depend on.  (particularly libc)
+	sed < $(BUILD)/libtool > $(BUILD)/libtool.foo '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
+	mv $(BUILD)/libtool.foo $(BUILD)/libtool
+	chmod 755 $(BUILD)/libtool
 
-binary:		binary-arch binary-indep
+clean: $(BUILD)/Makefile
+	$(checkdir)
+	$(MAKE) -C $(BUILD) -i maintainer-clean
+	$(RM) -r debian/{build,files,substvars,tmp*}
+	$(RM) $(BUILD)/dpkg-*.tar.gz
+	$(RM) po/*.gmo
+	$(RM) config.log
+	find . \( -name '*~' -o -name '#*#' \) -print0 | xargs -r0 $(RM) --
 
-binary-trees:	checkroot build
+build: $(BUILD)/Makefile
 	$(checkdir)
-	-rm -rf debian/tmp-{main,dev}
+	$(MAKE) -C $(BUILD)
+
+binary: binary-arch binary-indep
+
+binary-trees: build
+	$(checkdir)
+	-$(RM) -r debian/tmp-{main,dev}
 	install -d debian/tmp-{main,dev}/{DEBIAN,etc/dpkg,usr/doc/dpkg}
 	install -d debian/tmp-dev/usr/{lib/dpkg,doc/dpkg-dev,man/man1,man/man8,sbin,bin}
+	install -d debian/tmp-main/sbin
 	set -e; if [ $(arch) = i386 ]; then \
 		sed -e 's/^# i386elf: //' <debian/preinst >$(mcidir)/preinst ; \
 	else \
@@ -37,65 +90,89 @@ binary-trees:	checkroot build
 			debian/tmp-dev/etc/dpkg/shlibs.default ; \
 	fi
 	cp debian/{prerm,postinst} $(mcidir)/.
+	install -d debian/tmp-dev/etc/emacs/site-start.d
+	install -c debian/50dpkg-dev.el debian/tmp-dev/etc/emacs/site-start.d/
+	install -d debian/tmp-dev/etc/xemacs/site-start-19.d
+	install -c debian/50dpkg-dev.el debian/tmp-dev/etc/xemacs/site-start-19.d/
 	chmod +x $(mcidir)/{postinst,prerm,preinst}
-	$(MAKE) prefix=$(DIR)/debian/tmp-main/usr \
-		datadir=$(DIR)/debian/tmp-main/var/lib/dpkg \
-		etcdir=$(DIR)/debian/tmp-main/etc \
+	$(MAKE) -C $(BUILD) top_distdir=. dist 
+	$(MAKE) -C $(BUILD) \
+		prefix=$(DIR)/debian/tmp-main/usr \
+		sysconfdir=$(DIR)/debian/tmp-main/etc \
+		datadir=$(DIR)/debian/tmp-main/usr/share \
+		sharedstatedir=$(DIR)/debian/tmp-main/var/lib \
+		localstatedir=$(DIR)/debian/tmp-main/var/lib \
 		install
-	find debian/tmp-main/usr/man -type f | xargs gzip -9v
+	find debian/tmp-main/usr/man -type f | xargs gzip -9vf
 	set -e; for f in dpkg-buildpackage dpkg-gencontrol dpkg-distaddfile \
 		  dpkg-parsechangelog dpkg-genchanges dpkg-shlibdeps; do \
 		rm debian/tmp-main/usr/man/man1/$$f.1; \
 		ln -s dpkg-source.1.gz debian/tmp-main/usr/man/man1/$$f.1.gz ; \
 	done
-	gzip -9v debian/tmp-main/usr/doc/dpkg/changelog.*
+	ln -s ../man7/undocumented.7.gz debian/tmp-main/usr/man/man1/dpkg-divert.1.gz
+	gzip -9vf debian/tmp-main/usr/doc/dpkg/changelog*
 	cp debian/copyright debian/tmp-main/usr/doc/dpkg/copyright
 	cp debian/copyright debian/tmp-dev/usr/doc/dpkg-dev/copyright
 	cp debian/dev-README debian/tmp-dev/usr/doc/dpkg-dev/README
-	cp TODO debian/tmp-dev/usr/doc/dpkg/WISHLIST
 	set -e; for f in \
- usr/doc/dpkg/{programmer.html,policy.html,developer-keys.pgp,changelog.manuals.gz} \
+ usr/doc/dpkg/{internals.html,changelog.manuals.gz} \
  usr/bin/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage,parsechangelog} \
- usr/bin/{dpkg-distaddfile,822-date,dpkg-scanpackages} \
+ usr/bin/{dpkg-distaddfile,822-date,dpkg-scanpackages,dpkg-name} \
  usr/man/man1/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage}.1.gz \
- usr/man/man1/{dpkg-parsechangelog,dpkg-distaddfile,822-date}.1.gz \
- usr/man/man5 usr/man/man8/dpkg-scanpackages.8.gz usr/lib/emacs \
+ usr/man/man1/{dpkg-parsechangelog,dpkg-distaddfile,822-date,dpkg-name}.1.gz \
+ usr/man/man5 usr/man/man8/dpkg-scanpackages.8.gz \
  usr/lib/dpkg/parsechangelog usr/lib/dpkg/controllib.pl \
 		; do mv debian/tmp-main/$$f debian/tmp-dev/$$f; done
 
-binary-indep:	checkroot build binary-trees
+binary-indep: binary-trees
 	$(checkdir)
 	dpkg-gencontrol -pdpkg-dev -Pdebian/tmp-dev
 	chown -R root.root debian/tmp-dev
 	chmod -R g-ws,a+r,u+w debian/tmp-dev
 	dpkg-deb --build debian/tmp-dev ..
-	set -e -x; cd doc; for f in policy programmer; do \
-		debiandoc2ps -pa4 -O $$f.sgml | gzip -9v >../../$$f.ps.gz; \
-		dpkg-distaddfile -f../debian/files $$f.ps.gz byhand -; \
-		GZIP=-9v tar zcf ../../$$f.html.tar.gz $$f.html; \
-		dpkg-distaddfile -f../debian/files $$f.html.tar.gz byhand -; \
+	set -e -x; for f in internals; do \
+		if test -f $(BUILD)/doc/$$f.ps; then \
+			cp -p $(BUILD)/doc/$$f.ps $(DIR)/..; \
+		elif test -f $(DIR)/doc/$$f.ps; then \
+			cp -p $(DIR)/doc/$$f.ps $(DIR)/..; \
+		else \
+			echo "unable to locate $$f.ps"; false; \
+		fi; \
+		gzip -9vf $(DIR)/../$$f.ps; \
+		dpkg-distaddfile -f$(DIR)/debian/files $$f.ps.gz byhand -; \
+		if test -d $(BUILD)/doc/$$f.html; then \
+			GZIP=-9vf tar -C $(BUILD)/doc -zcf $(DIR)/../$$f.html.tar.gz $$f.html; \
+		elif test -d $(DIR)/doc/$$f.html; then \
+			GZIP=-9vf tar -C $(DIR)/doc -zcf $(DIR)/../$$f.html.tar.gz $$f.html; \
+		else \
+			echo "unable to locate $$f.html"; false; \
+		fi; \
+		dpkg-distaddfile -f$(DIR)/debian/files $$f.html.tar.gz byhand -; \
 	done
+	set -e; \
+		version=`sed -n 's/^Version: //p' $(DIR)/debian/tmp-dev/DEBIAN/control`; \
+		file=dpkg-$${version}.tar.gz; \
+		cp $(BUILD)/$${file} $(DIR)/..; \
+		dpkg-distaddfile -f$(DIR)/debian/files $${file} byhand -;
 
-binary-arch:	checkroot build binary-trees
-	touch debian/tmp-main/var/lib/dpkg/{status,available}
-	dpkg-shlibdeps -dPre-Depends main/dpkg dselect/dselect
+binary-arch: binary-trees
+	$(checkdir)
+	mv debian/tmp-main/usr/sbin/start-stop-daemon debian/tmp-main/sbin/start-stop-daemon
+	-strip debian/tmp-main/usr/{bin,sbin}/*	debian/tmp-main/sbin/*
+	-strip --strip-unneeded debian/tmp-main/usr/lib/libdpkg.so.*
+	-strip --strip-debug debian/tmp-main/usr/lib/libdpkg.a
+	dpkg-shlibdeps -dPre-Depends debian/tmp-main/usr/{bin,sbin}/*
 	dpkg-gencontrol -pdpkg -Pdebian/tmp-main
 	chown -R root.root debian/tmp-main
 	chmod -R g-ws,a+r,u+w debian/tmp-main
-	set -e; cd debian/tmp-main; \
-	 version=`sed -n 's/^Version: //p' DEBIAN/control`; \
-	 file=dpkg_$${version}_$(arch).nondebbin.tar; \
-	 tar cf ../../../$${file} usr var && gzip -9vf ../../../$${file}; \
-	 cd ../..; dpkg-distaddfile $${file}.gz byhand -
-	rm debian/tmp-main/var/lib/dpkg/{status,available}
+	set -e; \
+		version=`sed -n 's/^Version: //p' $(DIR)/debian/tmp-main/DEBIAN/control`; \
+		file=dpkg_$${version}_$(arch).nondebbin.tar; \
+		tar -C $(DIR)/debian/tmp-main -cf $(DIR)/../$${file} usr var; \
+		gzip -9vf $(DIR)/../$${file}; \
+		dpkg-distaddfile -f$(DIR)/debian/files $${file}.gz byhand -
 	dpkg-deb --build debian/tmp-main ..
 
 define checkdir
-	test -f include/dpkg.h
+	test -f include/dpkg.h.in
 endef
-
-checkroot:
-	$(checkdir)
-	test root = "`whoami`"
-
-.PHONY: binary source diff clean checkroot

+ 1 - 0
debian/shlibs

@@ -0,0 +1 @@
+libdpkg 0		dpkg (>= 1.4.0.9)

+ 15 - 14
debian/shlibs.default.i386

@@ -1,14 +1,15 @@
-libc 5		libc5 (>= 5.2.18)
-libm 5		libc5 (>= 5.2.18)
-libncurses 3.0	ncurses3.0
-libICE	6	elf-x11r6lib
-libPEX5	6	elf-x11r6lib
-libSM	6	elf-x11r6lib
-libX11	6	elf-x11r6lib
-libXIE	6	elf-x11r6lib
-libXaw	6	elf-x11r6lib
-libXext	6	elf-x11r6lib
-libXi	6	elf-x11r6lib
-libXmu	6	elf-x11r6lib
-libXt	6	elf-x11r6lib
-libXtst	6	elf-x11r6lib
+libc 6		libc6
+libm 6		libc6
+libncurses 3.4  ncurses3.4
+libICE  6       xlib6g (>= 3.3-5)
+libPEX5 6       xlib6g (>= 3.3-5)
+libSM   6       xlib6g (>= 3.3-5)
+libX11  6       xlib6g (>= 3.3-5)
+libXIE  6       xlib6g (>= 3.3-5)
+libXaw  6       xlib6g (>= 3.3-5)
+libXext 6       xlib6g (>= 3.3-5)
+libXi   6       xlib6g (>= 3.3-5)
+libXmu  6       xlib6g (>= 3.3-5)
+libXt   6       xlib6g (>= 3.3-5)
+libXtst 6       xlib6g (>= 3.3-5)
+libXp   6       xlib6g (>= 3.3-5)

+ 0 - 1
debian/shlibs.default.m68k

@@ -1 +0,0 @@
-shlibs.default.i386

+ 1 - 0
debian/shlibs.local

@@ -0,0 +1 @@
+libdpkg 0

+ 0 - 1
debian/substvars

@@ -1 +0,0 @@
-shlibs:Pre-Depends=libc5 (>= 5.2.18), ncurses3.0

+ 147 - 0
doc/ChangeLog

@@ -0,0 +1,147 @@
+debian-manuals (2.1.2.2) frozen unstable;
+
+  * Fixed even more typographical and grammatical errors in Policy and 
+  Programmer's manual
+  * Corrected the contact email addresses again.
+  * Added a paragraph to Policy 6.3 on taking over an old package (Guy Maor)
+  * Added a paragraph to Programmer 4.2.14 on listing distributions to load
+  a package into. (Guy Maor)
+  * Further clarification of use of absolute pathnames in scripts in 
+  Programmer 6.1. 
+
+ -- David Morris <bweaver@worf.netins.net>  Tue, 3 Dec 1996 23:28:04 -0600
+
+debian-manuals (2.1.2.1) frozen unstable;
+  
+  * Many editorial and formatting revisions with suggestions from Ian Jackson,
+  Guy Maor and others	
+  * correction of chiark address in Policy 6.2
+  * footnote in Programmers chapter 2 pointing to deb(5) manpage for 
+  description of deb file format.
+  * addition of more dpkg examples in Programmer chapter 2 
+  * Replace paragraph in Policy 4.1 outlining compiling parameters for 
+  shared libraries.
+  * Added paragraph in Programmer 6.1 on paths in maintainer scripts
+  (Bug #2481)
+  * Cleaned up language and formatting of Programmer's 12.2, shlibs
+  * Corrected contact addresses for listmaster and override-change
+
+ -- David Morris <bweaver@worf.netins.net>  Wed, 27 Nov 1996 08:17:16 -0600
+
+debian-manuals (2.1.2.0) frozen unstable;
+
+  * Mostly editorial changes in Policy Manual.
+  * Added summary of distribution criteria to Introduction
+  * Added section headings for copyright criteria
+  * Fixed typos (Bugs #4485, #4622)
+  * Added paragraph in Compilation Options related to use of shared and 
+    static libraries. (Bug #5299)
+  * Paragraph added about where to find PGP and other export restricted 
+    packages in section on Procedure
+  * Change in List administrator and in the contact address for becoming 
+    a package maintainer
+  * A paragraph added related to who to contact for package maintainer changes.
+  * Changed where to send upload announcements: uploads destined for unstable,
+    frozen, or experimental go to debian-devel-changes.
+
+  * Made some mostly editorial changes to Programmers Manual.
+  * Added a recommendation to debmake in Introduction.
+  * A further interpretation of the various Distributions is added with
+    the intent of helping people decide which one to choose. (section 4.2.14)
+  * Section 12 on Shared Libraries expanded with further technical information
+    on various shlib files
+  * Section in 2.2 on format of shlib file moved to new subsection within 12.
+  * Paragraph on adding a symlink without version number added to Shared 
+    Library Section (Guy Maor, Bug #5299)
+
+ -- David Morris <bweaver@worf.netins.net>  Fri, 22 Nov 1996 23:41:39 -0600
+
+debian-manuals (2.1.1.0) unstable;
+
+  * Hard links are forbidden in source packages (they didn't work anyway,
+    and can't easily be made to work reliably).
+  * Do not use dpkg-divert or update-alternatives without consultation.
+
+  * Do not need to declare dependencies on Essential packages.
+  * Restrictions on Pre-Depends stated in policy manual.
+  * debian/substvars file is now almost always auto-generated.
+  * Shared libraries must be installed stripped.
+  * Essential and Pre-Depends put together in policy manual.
+
+  * Explained component-wise (file-wise) vs. package-wise dependencies.
+
+ -- Ian Jackson <ian@chiark.greenend.org.uk>  Thu, 12 Sep 1996 01:00:41 +0100
+
+debian-manuals (2.1.0.0) unstable;
+
+  * Upstream changelog must be installed too (was just recommended).
+
+  * Modification to use dpkg-shlibdeps added to conversion instructions.
+  * Packages which are buggy and orphaned but which are preserved for
+    compatibility go in contrib.
+
+  * Programmers' manual source package section refers to conversion
+    instructions in policy manual.
+  * Make it clear that recommending a non-free or contrib package puts a
+    package in contrib.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Sun, 1 Sep 1996 17:47:18 +0100
+
+debian-manuals (2.0.1.0) unstable;
+
+  * varargs.h and libtermcap are obsolete - use stdarg.h and ncurses.
+  * Shared library link/library ordering corrected (aargh).
+  * When to byte-compile Elisp files.
+  * Missing final newlines not represented by dpkg-source.
+
+  * Must post upload announcements to debian-changes.
+  * Moved some sections into new `configuring and building' chapter.
+  * Typo fixes.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Sat, 31 Aug 1996 20:07:22 +0100
+
+debian-manuals (2.0.0.0) unstable;
+
+  * Footnote added OK'ing copyrights which require name changes.
+  * More detail about changelog format names.
+
+  * Problematic licence restrictions are formatted as lists.
+  * Mentioned 822-date utility as way to generate RFC822 format dates.
+  * Typos corrected.
+  * Released.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Mon, 26 Aug 1996 14:27:34 +0100
+
+debian-manuals (0.2.1.1) unstable;
+
+  * Can't overwrite directories in one package with files in another.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Sat, 24 Aug 1996 18:44:54 +0100
+
+debian-manuals (0.2.1.0) unstable;
+
+  * Policy says when and how to include original source in upload.
+
+  * Need -sa on dpkg-genchanges/dpkg-buildpackage when converting.
+
+  * Use minor patchlevel for meaning changes which don't affect packages.
+  * More verbosity about netiquette.
+  * Reorganised participation and upload policy: merged with mailing lists.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Fri, 23 Aug 1996 12:48:09 +0100
+
+debian-manuals (0.2.0.1) experimental;
+
+  * Said that system administrators' manual does not exist.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Fri, 23 Aug 1996 04:05:36 +0100
+
+debian-manuals (0.2.0.0) experimental;
+
+  * Draft releases.
+
+ -- Ian Jackson <ian@chiark.chu.cam.ac.uk>  Wed, 21 Aug 1996 15:07:53 +0100
+
+Local variables:
+mode: debian-changelog
+End:

+ 110 - 0
doc/Makefile.am

@@ -0,0 +1,110 @@
+## Process this file with automake to produce a Makefile.in
+
+AUTOMAKE_OPTIONS	= 1.1 foreign
+
+## Directory definitions
+
+docdir			= $(prefix)/doc
+pkgdocdir		= $(docdir)/@PACKAGE@
+
+## Automake variables
+
+man_MANS		= deb.5 deb-old.5 deb-control.5
+pkgdoc_DATA		= 
+EXTRA_DIST		= database-structure.fig changelog \
+			  manuals-version \
+			  $(SGMLFILES) $(man_MANS) \
+			  texinfo.dtd \
+			  texinfo.texi_mapping texinfo.debian_mapping
+
+HTMLDOCSTAMPS		= internals.html-stamp
+HTMLDIRS		= internals.html 
+SGMLFILES		= internals.sgml
+HARDCOPY		= internals.ps internals.dvi
+
+CLEANFILES		= $(srcdir)/manuals-version.new
+DISTCLEANFILES		= 
+INFOFILES		= internals.info
+
+## Rules
+
+SUFFIXES		= .html-stamp .sgml .ps .fig .monops
+
+.PHONY: all install-data-local uninstall-local dist-hook clean-local
+
+all: $(HTMLDOCSTAMPS) $(HARDCOPY) $(INFOFILES)
+
+$(srcdir)/manuals-version: $(top_srcdir)/debian/changelog
+	v=`dpkg-parsechangelog -l$< | sed -n 's/^Version: //p'` && \
+	echo "<!entity manuals-version \"$$v\">" >$@.new
+	echo "<!entity dpkg-version \"$(VERSION)\">" >>$@.new
+	(cmp -s $@.new $@ || mv -f $@.new $@) && rm -f $@.new
+
+internals.sgmls: internals.sgml texinfo.dtd manuals-version
+	nsgmls $< > $@ || ($(RM) $@ && false)
+
+internals.texi: internals.sgmls texinfo.texi_mapping
+	sgmlsasp $(srcdir)/texinfo.texi_mapping < $< > $@ || ($(RM) $@ && false)
+	perl -pi -e 's/printindex FN/printindex fn/' $@ || ($(RM) $@ && false)
+
+internals.ps: internals.dvi
+	dvips -t letter -o $@ $^
+
+internals.dvi: internals.texi
+	texi2dvi $^
+
+internals.info: internals.texi
+	makeinfo $^
+
+internals.html-stamp: internals.texi
+	-$(RM) -r $*.html*
+	mkdir $*.html
+	(cd $*.html && texi2html -monolithic ../$<)
+	ln -s internals.html $*.html/index.html
+	touch $@
+
+database-structure.ps: database-structure.fig
+	fig2dev -L ps -c -l _ -P <$< >ps
+	mv -f ps $@
+
+database-structure.monops: database-structure.ps
+	perl -pe 's:^/(col[0-7]) \{[01 ]*1[01 ]* setrgbcolor\}\
+ bind def$$::/$$1 {} bind def:' $< >ps
+	mv -f ps $@
+
+install-data-local: $(HTMLDOCSTAMPS)
+	$(mkinstalldirs) $(pkgdocdir)
+	$(INSTALL_DATA) $(top_srcdir)/debian/changelog $(pkgdocdir)/changelog
+	$(INSTALL_DATA) $(srcdir)/changelog $(pkgdocdir)/changelog.manuals
+	set -e; for f in $^; do \
+		g=`echo $$f | sed -e 's/-stamp$$//'`; \
+		cp -r $$g $(pkgdocdir)/`basename $$g`; \
+	done
+
+uninstall-local:
+	-$(RM) $(pkgdocdir)/changelog.manuals $(pkgdocdir)/changelog
+	-cd $(pkgdocdir) && rm -rf $(HTMLDIRS)
+
+dist-hook: $(HTMLDOCSTAMPS) $(HARDCOPY) internals.sgmls internals.texi internals.info
+	cp -p $^ $(distdir)
+	for f in `echo $^ | tr ' \t' '\n\n' | sed -ne 's:.html-stamp::gp'`; do set -e; \
+		$(RM) -r $(distdir)/`basename $$f.html`; \
+		mkdir $(distdir)/`basename $$f.html`; \
+		cp -p $$f.html/* $(distdir)/`basename $$f.html`; \
+	done
+	$(RM) -r $(distdir)/obsolete
+	cp -rp $(srcdir)/obsolete $(distdir)/
+	cp -p $(HARDCOPY) $(distdir)/
+
+maintainer-clean-local: doc-clean
+	$(RM) manuals-version
+	-$(RM) $(srcdir)/Makefile.in 
+
+doc-clean:
+	-$(RM) *.{aux,cp,dvi,fn,ky,log,pg,toc,tp,vr,bak}
+	-$(RM) internals.{FN,fns,sgmls,texi,info*}
+	-$(RM) -r {packaging,internals}.{texi,html-stamp,text,ps,lout}
+	-$(RM) -r {packaging,internals}.html
+	-$(RM) manuals-version*
+
+## End of file.

+ 0 - 93
doc/Makefile.in

@@ -1,93 +0,0 @@
-# Copyright (C) 1994 Ian Murdock <imurdock@debian.org>
-# Copyright (C) 1994,1995 Ian Jackson <ijackson@nyx.cs.du.edu>
-#
-#   This 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.
-#
-#   This 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 dpkg; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-infodir = $(prefix)/info
-mandir = $(prefix)/man
-man5dir = $(mandir)/man5
-man5 = 5
-docdir = $(prefix)/doc
-dpkgdocdir = $(docdir)/dpkg
-
-DIST = Makefile.in $(SRC) $(MAN)
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
-SGMLDOCSTAMPS= programmer.html-stamp policy.html-stamp
-
-# Files folded into manuals
-OBSOLETEDOCS= descriptions.txt upgrades+errors.txt \
- maintainer-script-args.txt virtual-dependencies.txt \
- auto-deconfiguration.txt dependency-ordering.txt \
- disappear-replace.txt diversions.text \
- essential-flag.txt version-ordering.txt
-
-all:		$(DPKGDOCS) $(SGMLDOCSTAMPS)
-
-manuals-version:	changelog Makefile
-		v=`dpkg-parsechangelog -lchangelog | sed -n 's/^Version: //p'` && \
-		echo "<!entity manuals-version \"$$v\">" >$@.new
-		d=`pwd | sed -e 's,/doc$$,,; s,^.*dpkg-\([0-9.]*\),\1,'` && \
-		echo "<!entity dpkg-version \"$$d\">" >>$@.new
-		mv $@.new $@
-
-%.html-stamp:	%.sgml manuals-version
-		rm -rf $*.html
-		debiandoc2html $<
-		touch $@
-
-guidelines.info: guidelines.texi
-		$(MAKEINFO) $(srcdir)/guidelines.texi
-
-database-structure.ps:	database-structure.fig
-		fig2dev -L ps -c -l _ -P <database-structure.fig >ps
-		mv ps database-structure.ps
-
-database-structure.monops: database-structure.ps
-		perl -pe 's:^/(col[0-7]) \{[01 ]*1[01 ]* setrgbcolor\}\
- bind def$$:/$$1 {} bind def:' database-structure.ps >ps
-		mv ps database-structure.monops
-
-clean:
-		rm -f $(SGMLDOCSTAMPS)
-		rm -f database-structure.ps database-structure.monops ps
-		rm -f *.{aux,cp,dvi,fn,ky,log,pg,toc,tp,vr,bak}
-		rm -f guidelines.info*
-		rm -rf {programmer,policy}.{html*,sasp*,text*,ps*,lout*}
-
-distclean:
-		rm -f Makefile *.orig *~ *.~* ./#*#
-
-install:	all
-		$(INSTALL_DATA) deb.5 $(man5dir)/deb.$(man5)
-		$(INSTALL_DATA) deb-old.5 $(man5dir)/deb-old.$(man5)
-		$(INSTALL_DATA) deb-control.5 $(man5dir)/deb-control.$(man5)
-		set -e; for f in $(SGMLDOCSTAMPS) ; do \
-			g=`echo $$f | sed -e 's/-stamp$$//'` ; \
-			cp -r $$g $(dpkgdocdir)/$$g ; \
-		done
-		$(INSTALL_DATA) developer-keys.pgp $(dpkgdocdir)/.
-		$(INSTALL_DATA) ../debian/changelog $(dpkgdocdir)/changelog.dpkg
-		$(INSTALL_DATA) changelog $(dpkgdocdir)/changelog.manuals

+ 58 - 0
doc/changelog

@@ -1,3 +1,61 @@
+debian-manuals (2.1.2.2) frozen unstable;
+
+  * Fixed even more typographical and grammatical errors in Policy and 
+  Programmer's manual
+  * Corrected the contact email addresses again.
+  * Added a paragraph to Policy 6.3 on taking over an old package (Guy Maor)
+  * Added a paragraph to Programmer 4.2.14 on listing distributions to load
+  a package into. (Guy Maor)
+  * Further clarification of use of absolute pathnames in scripts in 
+  Programmer 6.1. 
+
+ -- David Morris <bweaver@worf.netins.net>  Tue, 3 Dec 1996 23:28:04 -0600
+
+debian-manuals (2.1.2.1) frozen unstable;
+  
+  * Many editorial and formatting revisions with suggestions from Ian Jackson,
+  Guy Maor and others	
+  * correction of chiark address in Policy 6.2
+  * footnote in Programmers chapter 2 pointing to deb(5) manpage for 
+  description of deb file format.
+  * addition of more dpkg examples in Programmer chapter 2 
+  * Replace paragraph in Policy 4.1 outlining compiling parameters for 
+  shared libraries.
+  * Added paragraph in Programmer 6.1 on paths in maintainer scripts
+  (Bug #2481)
+  * Cleaned up language and formatting of Programmer's 12.2, shlibs
+  * Corrected contact addresses for listmaster and override-change
+
+ -- David Morris <bweaver@worf.netins.net>  Wed, 27 Nov 1996 08:17:16 -0600
+
+debian-manuals (2.1.2.0) frozen unstable;
+
+  * Mostly editorial changes in Policy Manual.
+  * Added summary of distribution criteria to Introduction
+  * Added section headings for copyright criteria
+  * Fixed typos (Bugs #4485, #4622)
+  * Added paragraph in Compilation Options related to use of shared and 
+    static libraries. (Bug #5299)
+  * Paragraph added about where to find PGP and other export restricted 
+    packages in section on Procedure
+  * Change in List administrator and in the contact address for becoming 
+    a package maintainer
+  * A paragraph added related to who to contact for package maintainer changes.
+  * Changed where to send upload announcements: uploads destined for unstable,
+    frozen, or experimental go to debian-devel-changes.
+
+  * Made some mostly editorial changes to Programmers Manual.
+  * Added a recommendation to debmake in Introduction.
+  * A further interpretation of the various Distributions is added with
+    the intent of helping people decide which one to choose. (section 4.2.14)
+  * Section 12 on Shared Libraries expanded with further technical information
+    on various shlib files
+  * Section in 2.2 on format of shlib file moved to new subsection within 12.
+  * Paragraph on adding a symlink without version number added to Shared 
+    Library Section (Guy Maor, Bug #5299)
+
+ -- David Morris <bweaver@worf.netins.net>  Fri, 22 Nov 1996 23:41:39 -0600
+
 debian-manuals (2.1.1.0) unstable;
 
   * Hard links are forbidden in source packages (they didn't work anyway,

+ 1 - 1
doc/deb-old.5

@@ -15,7 +15,7 @@ changed since Debian 0.93 and the new format is being phased in.
 
 The old format is described here.  Please see
 .BR deb (5)
-for details of the old format.
+for details of the new format.
 .SH FORMAT
 The file is two lines of format information as ASCII text, followed by
 two concatenated gzipped ustar files.

二进制
doc/developer-keys.pgp


+ 552 - 0
doc/internals.sgml

@@ -0,0 +1,552 @@
+<!doctype texinfo system "texinfo.dtd" [
+<!entity % manuals-version-def system "manuals-version">
+%manuals-version-def;
+]>
+
+<texinfo>
+
+<setfilename>internals.info</>
+
+<titlepage>
+<title>dpkg Internals Manual</title>
+<author>Klee Dienes</author>
+<date>Version &manuals-version; (dpkg &dpkg-version;)</date>
+<abstract>
+This manual describes the internal structure of the <code/dpkg/ package
+management system.
+</abstract>
+</titlepage>
+
+<chapter>Copyright
+
+<p>
+Copyright &copy;1997 Klee Dienes <samp/&lt;klee@@mit.edu&gt;/.
+
+<p>
+This manual is free software; you may 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.
+
+<p>
+This is distributed in the hope that it will be useful, but
+<em>without any warranty</em>; 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 with
+your Debian GNU/Linux system, in <file>/usr/doc/copyright/GPL</>, or
+with the <code/dpkg/ source package as the file <file>COPYING</>.  If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA.
+
+</chapter>
+
+<chapter>Build Notes
+
+<section>Automake
+
+<p>
+This chapter by Tom Lees &lt;tom&at;lpsg.demon.co.uk&gt on Tue, 4 Mar 1997
+21:34:57 +0000, with subsequent modifications by Klee Dienes &lt;klee&at;debian.org&gt;
+
+<p>
+This chapter contains general notes about the conversion to
+<code/automake/.  If you plan on doing anything with <code/dpkg/, you
+should probably read all of this file first.  You have been warned.
+
+<p>
+The current version of automake used is version <code/automake-1.1n/,
+which is currently a beta version.  It has several significant
+advantages over the released version, including:
+
+<itemize>
+<item>it supports emacs lisp properly
+<item>It supports libtool properly
+<item>it includes the aclocal utility
+</itemize>
+
+<p>
+The <code/aclocal/ utility is a very useful program which will automatically
+build an <file/aclocal.m4/ file from the <file/configure.in/ file to include the
+appropriate macros.
+
+<p>
+<code/automake-1.1n/ can be retreived from
+<file>ftp://ftp.cygnus.com/pub/tromey</file>
+
+<p>
+This doesn't affect anything other than rebuilding the <file/Makefile.in/ files
+from the sources.
+
+<p>
+Probably the main difference which is noticable is that instead of
+using proprietary directory names, it now supports <code/configure
+--sharedstatedir/, and <code/configure --localstatedir/. To set these
+to the Debian defaults, you should use <code>./configure
+--localstatedir=/etc --sharedstatedir=/var/lib</>.
+
+<p>
+I have also customized the canonicalizing macros found in
+<code/autoconf-2.12/ to include the old way of finding the <code/dpkg/
+``architecture'', i.e. to be a bit more smart. Instead of it trying to
+determine the architecture only, I changed it to use the `host',
+`build', and `target' system types. The target CPU type is checked
+against the archtable to find the architecture on which dpkg will run.
+
+<p>
+It uses <code/gcc --print-libgcc-file-name/ to find out the build
+architecture if possible (used later to determine ELF or <code/a.out/
+format), and also uses <code/dpkg --print-architecture/ if possible to
+modify the <samp/cpu/ field before it passes on the target alias to
+config.sub. If you want to specify the architecture, you should now
+use "--target=", rather than <code/--with-arch/, which was essentially
+a hack anyway.  The old <code/--with-arch/ is still there, but it is
+somewhat less functional. I have also moved the <code/DPKG_CACHED_/
+macros into dpkg.m4 to make configure.in a bit more readable.
+
+<p>
+I also converted to libtool 0.7 (which can be found in the Debian
+distribution now). Essentially, this means that all the dpkg tools can
+be compiled against a shared <samp/libdpkg/ without much hassle (in
+fact, it is the default). You do not need to install libtool to use
+this feature (it works like autoconf), and generally, it should not be
+needed much at all.
+
+<p>
+The new <samp/dist/ targets will build a distribution including all
+files built by the <code/debiandoc2html/, <code/debiandoc2ps/, etc.,
+which are included in the distribution so that people may build <code/dpkg/
+without these (especially useful to porters).
+
+<p>
+A target <samp/make debian/ has been added, which will build the
+Debian files from a working directory (does a <samp/make dist/
+first). Now all we need is a modified dpkg-source so that the
+<file/dpkg-1.4.0.8.tar.gz/ GNU-distribution file can be used as part
+of the Debian dsitribution.  I'm working on this, but it doesn't work
+too well at the moment (find it in examples).
+
+<p>
+I removed the <samp/make portable/ target - it doesn't do anything useful.
+
+<p>
+I have added <samp/make uninstall/ targets to aid non-Debian users who simply
+want to try out certain Debian packages, and the "dist" targets are also
+useful to build a "distribution" of the dpkg tool. Note that since automake
+automatically includes dependencies into the Makefiles in a distribution,
+if you want to modify the C files, it would be advisable to get and install
+automake, and then re-run it in the base dpkg distribution directory, so that
+automatic dependency generation will be switched back on, and any
+dependencies which change will be taken account of. The "make maintainer-clean"
+targets will remove all files which any of the following utilities create:
+
+<itemize>
+<item>automake
+<item>autoconf
+<item>aclocal
+<item>autoheader
+<item>gettextize
+<item>libtoolize
+</itemize>
+
+<p>
+If you want to modify any of the sources, I recommend that you do the following
+first (after having installed the appropriate utilities, of course):-
+
+<itemize>
+<item>
+make maintainer-clean
+<item>
+aclocal
+<item>
+autoheader
+<item>
+autoconf
+<item>
+gettextize
+<item>
+libtoolize (do not let automake run this, as it will cause it not to
+include the libtool files in the dist targets) 
+<item>
+for i in COPYING INSTALL; do ln -s /usr/share/automake/$i .; done
+<item>
+automake
+</itemize>
+
+<p>
+I have also incorporated the patches originally made by Galen
+Hazelwood to internationalize dpkg using GNU gettext - see the file
+"NOTES.intl" for more information about this.
+
+<p>
+Other minor changes are:
+
+<itemize>
+<item>
+The version number is now determined from debian/changelog, not from
+the directory name.
+<item>
+Creation of version.h now handled from configure script, not Makefile.
+<item>
+include/dpkg.h is now generated from include/dpkg.h.in by a sed
+script, inserting the appropriate directory definitions - so now it
+supports changing the dpkg directories (can install in /usr/local)
+<item>
+Updated the COPYING (1 very minor change) and INSTALL files to those
+distributed with automake-1.1l
+<item>
+Since the shared libdpkg is now installed, I also made
+include/Makefile install dpkg.h and dpkg-db.h into /usr/include by
+default
+</itemize>
+
+Questions:
+
+<itemize>
+<item>
+Should I use <samp/localstatedir/ and <samp/sharedstatedir/ instead of
+<samp/sysconfdir/ and <samp/datadir/?
+</itemize>
+
+</section>
+
+<section>Internationalization
+
+<p>
+This section by Galen Hazelwood. 
+
+<p>
+Dpkg is, to say the least, generous in its error reporting.  The vast
+majority of the output strings are error messages of one kind or another.
+And if you feel that you've stumbled into the Department of Redundancy
+Department, you would be absolutely correct.  Many of the error messages
+in dpkg.pot are duplicates, used at different points in the program.
+
+<p>
+To avoid swamping the translators completely, I made some executive decisions
+on what kinds of strings to translate.  All the strings sent to debug() are
+left alone, on the grounds that these are for dpkg developers, and not for
+the general public.  Most interal error messages were very cryptic, and
+would probably confuse the translators when seen just sitting there in
+the dpkg.pot file, and are also left alone.  (I did mark some of the more
+verbose ones for translation.)
+
+<p>
+If others disagree with me about the necessity of translating these strings,
+it's easy enough to just go through and mark them later.
+
+<p>
+I added the startup gettext code to the main routine in dselect, which was
+necessary as many of the strings in lib are translated.  Dselect is otherwise
+unchanged.
+
+<p>
+Changes:
+
+<itemize>
+<item>
+The files in intl and po were taken from gettext 0.10.26, by way of
+the gettextize program.  I altered the makefiles to remove the VERSION
+symbol, which is only used in targets which dpkg does not support.
+<item>
+aclocal.m4 was stolen from the textutils package, configure.in was
+altered to use these new tests, symbols were added to acconfig.h, and
+the two new directories were added to Makefile.in.
+<item>
+The dpkg, dpkg-deb, md5sum, split, and dselect Makefiles now look for
+headers in ../intl, and try to link with whatever i18n libraries
+configure finds.  They also now define LOCALEDIR in CFLAGS.
+<item>
+include/dpkg.h has the necessary NLS boilerplate, and the only file
+which dosen't include this (md5sum/md5sum.c) had it added directly.
+<item>
+The most intrusive change is due to a disagreement between xgettext
+and the dpkg coding style.  Although xgettext understands string
+constant concatenation, it can't handle the case where preprocessor
+symbols are used as well.  The dpkg code uses this a lot, especially
+in cases like this:
+<example>
+ohshite("error reading from " BACKEND " pipe");
+</example>
+where BACKEND is defined as "dpkg-deb".  Because xgettext can't handle
+this, I have changed this usage in all cases to something like:
+<example>
+ohshite(_("error reading from dpkg-deb pipe");
+</example>
+This isn't very kind to Ian, I know.  But what can I do?
+</itemize>
+
+</section>
+
+</chapter>
+
+<chapter>Code Internals
+
+<section>Structure Definitons
+
+<subsection>versionrevision
+<p>
+<example>
+struct versionrevision @{
+  unsigned long epoch;
+  char *version;
+  char *revision;
+@};  
+</example>
+
+<p>
+The <tt/versionrevision/ structure is used to store a Debian version specification
+</subsection>
+
+</section>
+
+<section>Functions
+
+<subsection>Parsing translation tables
+<p>
+Each of these tables is used to associate a set of strings with a
+corresponding set of integers.
+
+Current tables are:
+
+<p>
+<example>
+const struct namevalue booleaninfos[];
+</example>
+
+<p>
+Maps boolean strings (<code/"yes"/,<code/"no"/) to their binary values.
+
+<subsubsection><code/priorityinfos[]/
+
+<p>
+<example>
+const struct namevalue priorityinfos[];
+</example>
+
+<p>
+Maps priority strings to and from values of
+type <code/enum pkgpriority/.  
+Current priority values are:
+
+<table>
+<item><code/required/</item>
+required
+<item><code/important/</item>
+important
+<item><code/standard/</item>
+standard
+<item><code/recommended/</item>
+recommended
+<item><code/optional/</item>
+optional
+<item><code/extra/</item>
+extra
+<item><code/contrib/</item>
+contrib
+<item><code/other/</item>
+other
+<item><code/unknown/</item>
+unknown
+<item><code/base/</item>
+This is obsolete, but is accepted as an alias for <code/required/.
+</table>
+</subsubsection>
+
+<subsubsection><code/statusinfos[]/
+
+<p>
+<example>
+const struct namevalue statusinfos[];
+</example>
+
+Maps package status strings to values of type <code/enum ???/.
+
+Package status strings are:
+
+"not-installed" "unpacked" "half-configured" "installed"
+"half-installed" "config-files" "postinst-failed" "removal-failed"
+</subsubsection>
+
+<subsubsection><code/eflaginfos[]/
+
+<p>
+<example>
+const struct namevalue eflaginfos[];
+</example>
+</subsubsection>
+
+<subsubsection><code/wantinfos[]/
+
+<p>
+<example>
+const struct namevalue wantinfos[];
+</example>
+</subsubsection>
+
+<subsubsection><code/nicknames[]/
+
+<p>
+<example>
+const struct nickname nicknames[];
+</example>
+
+Maps obsolete control fields to their current versions.
+
+</subsubsection>
+
+</subsection>
+
+<subsection>Parsing functions
+
+<subsubsection><code/parseerr/
+<findex/parseerr()/
+
+<p>
+<example>
+void parseerr
+(FILE *file, const char *filename, int lno,
+ FILE *warnto, int *warncount, const struct pkginfo *pigp,
+ int warnonly, const char *fmt, ...);
+</example>
+
+Report an error parsing a control data stream.  Checks <var/file/ for
+error status on <var/file/, printing an error message to stderr and
+exiting with error status if an error is present on the stream.
+Formats the variable arguments according to the <code/printf/-style
+string in <var/fmt/, preceding the result with <var/filename/,
+<var/lno/, and <var/pigp/ (if not NULL).  If <var/warnonly/ is 0,
+writes the result to stderr and exits with error status.  Otherwise,
+increments <var/warncount/ and returns normally.
+</subsubsection>
+
+<subsubsection><code/illegal_packagename/
+<findex/illegal_packagename()/
+
+<p>
+<example>
+const char *illegal_packagename
+(const char *p, const char **ep) 
+</example>
+
+Checks the package name at <var/p/ for proper syntax.  Returns NULL in
+case of success, setting <var/*ep/ to point after the last character
+in the package name, including any trailing whitespace (as defined by
+isspace()).  In case of error, returns the error message as a pointer
+to a static buffer.
+</subsubsection>
+
+<subsubsection><code/informativeversion/
+<findex/informativeversion()/
+
+<p>
+<example>
+int informativeversion(const struct versionrevision *version)
+</example>
+
+<p>
+Returns true if and only if the <code/versionrevision/ is non-empty;
+otherwise returns false.
+</subsubsection>
+
+<subsubsection><code/varbufversion/
+<findex/varbufversion()/
+
+<p>
+<example>
+void varbufversion
+(struct varbuf *vb,
+ const struct versionrevision *version,
+ enum versiondisplayepochwhen vdew);
+</example>
+
+Writes a human-readable representation of <var/version/ to <var/vb/.
+Possible values of <var/vdew/:
+
+<table>
+<item><tt/vdew_never/</item>
+never include epoch
+<item><tt/vdew_nonambig/</item>
+include epoch string if non-zero
+<item><tt/vdew_always/</item>
+always include epoch string
+</table>
+</subsubsection>
+
+<subsubsection><code/versiondescribe/
+<findex/versiondescribe()/
+
+<p>
+<example>
+const char *versiondescribe
+(const struct versionrevision *version,
+ enum versiondisplayepochwhen vdew);
+</example>
+
+<p>
+Return a human-readable representation of <var/version/ as a pointer
+to a static buffer.  If the version structure is empty, return
+<code/"&lt;none&gt;"/.  Static buffers are allocated from a set of 10
+in round-robin fashion (they will be re-used after 10 successive calls
+to <code/versiondescribe/).
+</subsubsection>
+
+<subsubsection><code/parseversion/
+<findex/parseversion()/
+
+<p>
+<example>
+const char *parseversion
+(struct versionrevision *rversion, const char *string);
+</example>
+
+<p>
+Parse the contents of <var/string/ into <var/rversion/.  If
+successful, returns NULL, otherwise returns a pointer to a static
+error string.
+</subsubsection>
+
+<subsubsection><code/parsemustfield/
+<findex/parsemustfield()/
+
+<p>
+<example>
+void parsemustfield
+(FILE *file, const char *filename, int lno,
+ FILE *warnto, int *warncount,
+ const struct pkginfo *pigp, int warnonly,
+ char **value, const char *what);
+</example>
+</subsubsection>
+
+<subsubsection><code/skip_slash_dotslash/
+<findex/skip_slash_dotslash()/
+
+<p>
+<example>
+const char *skip_slash_dotslash (const char *p);
+</example>
+</subsubsection>
+
+<subsubsection><code/convert_string/
+<findex/convert_string()/
+
+<p>
+<example>
+static int convert_string
+(const char *filename, int lno, const char *what, int otherwise,
+ FILE *warnto, int *warncount, const struct pkginfo *pigp,
+ const char *startp, const struct namevalue *nvip,
+ const char **endpp) 
+</example>
+</subsubsection>
+
+</subsection>
+
+</section>
+
+<contents>
+<printindex name="fn">
+
+</texinfo>

文件差异内容过多而无法显示
+ 0 - 1123
doc/lout.li


+ 2 - 2
doc/manuals-version

@@ -1,2 +1,2 @@
-<!entity manuals-version "2.1.1.0">
-<!entity dpkg-version "1.4.0">
+<!entity manuals-version "">
+<!entity dpkg-version "1.4.1">

+ 0 - 97
doc/obsolete/dependency-ordering.txt

@@ -1,97 +0,0 @@
-To: Debian developers list <debian-devel@pixar.com>
-Subject: Note about the default for virtal package dependencies
-
-As I wrote some time ago (see below), ordering is significant in the
-Depends and Recommended fields - in the absence of other information
-dselect will suggest to the user that they select the first named
-package in a list of options.
-
-However, there is no way to specify the `order' of several packages
-which all Provide the same thing, when that thing is listed as a
-Dependency.
-
-Eg, if we have:
- Package: glibcdoc
- Recommended: info-browser
-
- Package: info
- Provides: info-browser
-
- Package: emacs
- Provides: info-browser
-
-then (if emacs and info are both in the same Class) dselect's choice
-will be essentially random.
-
-It is important to think about this problem, and to consider whether
-to list one the the packages explicitly.
-
-For example,
- Package: glibcdoc
- Recommended: info | info-browser
-
-will do the same as the above, except that it will ensure that `info'
-is the package which dselect will suggest to the user they also select
-if the user has neither it nor Emacs and asks to select glibcdoc.
-
-This is not necessary if one of the packages has a more fundamental
-Class - see the details below.
-
-Ian.
-
-------- Start of forwarded message -------
-To: Debian developers list <debian-devel@pixar.com>
-Subject: Ordering is significant in Depends: and Recommends:
-
-For dselect, the ordering of alternative packages in a Depends: or
-Recommended: line is significant.
-
-When an unsatisfied dependency (Depends or Recommended) or a conflict
-is detected dselect will go into a `recursive package list', where the
-user gets to choose how to resolve the problem.
-
-Usually dselect will suggest to the user that they select the package
-with the most `fundamental' class (eg, it will prefer Base packages to
-Optional ones), or the one that they `most wanted' to select in some
-sense.
-
-However, in the absence of other information dselect will prefer
-packages listed earlier in the unsatisfied entry in the Depends or
-Recommended field.
-
-NB: this doesn't apply to constructions of the form:
- Package: auctex
- Depends: emacs, tex
-which specifies that auctex depends on *both* emacs and tex.  In this
-case dselect will suggest to the user that they select both packages.
-
-It applies to constructions of the form:
- Package: a2gs
- Recommended: gs_x | gs_both | gs_svga
-Here, dselect will prefer gs_x because it is listed earlier.  (In the
-future I may make it more clever - it may be able to notice, to
-continue the example, that the dependencies of gs_x are not yet
-satisfied while those of gs_svga, are, and thus prefer the latter, or
-in a different situation to notice that gs_both has extra dependencies
-which are satisfied, and thus prefer it to gs_x and gs_svga.  More
-thought is needed in this area.)
-
-One final example.  In the more complicated construction:
- Package: trn
- Depends: smail | sendmail, inn | inewsinn
-dselect will prefer smail because it is a Standard package, and
-Sendmail is only Optional, and will prefer inewsinn because it is
-Recommended and inn is only Optional.  So, the default (if none of the
-other packages were selected) would be to select smail and inewsinn.
-
-However, if inewsinn were moved to Optional this would change, and inn
-would be preferred whenever the issue arose after the change.
-
-Optional fields have the same structure as Depends and Recommended
-fields, but they will not arrange for the packages they list to be
-suggested for selection, though they will be offered to the user.
-
-Ian M: can this go in an appendix to the Guidelines ?
-
-Ian.
-------- End of forwarded message -------

+ 0 - 111
doc/obsolete/descriptions.txt

@@ -1,112 +0,0 @@
-To: Debian developers list <debian-devel@pixar.com>
-Subject: Package maintainers please look at your Description fields.
-
-dselect will be much more useful when more packages are more
-informative in the Description they provide in their control file.
-
-So, when you next release a package, could you please check whether
-the `control' file has a good description of the package, formatted as
-described below ?
-
-A small amount of effort here on the part of package maintainers will
-improve the looks of things quite a bit, I think.
-
-BTW, a number of packages have been indenting continuation lines in
-their Description fields thus:
-  Description: gnomovision
-         Gnomovision is ....
-         further blurb ...
-Please don't do this.  According to the scheme described below (which
-I've now implemented), dselect interprets the extra indentation to
-mean `preformatted' text, and doesn't wordwrap it.
-
-Ian.
-
-
-The format of the Description field is as follows:
-
-Description: <single line synopsis>
- <extended description over several lines>
-
-The extended description has several kinds of line:
-
- - those starting with a single space are part of a paragraph.
-Successive lines of this form will be word-wrapped when displayed.
-The leading space will usually be stripped off.
-
- - those starting with two or more spaces.  These will be displayed
-verbatim.  If the display cannot be panned horizontally the displaying
-program will linewrap them `hard' (ie, without taking account of word
-breaks).  If it can they will be allowed to trail off to the right.
-None, one or two initial spaces may be deleted, but the number of
-spaces deleted from each line will be the same (so that you can have
-indenting work right, for example).
-
- - those containing a single space followed by a single full stop
-character.  These are rendered as blank lines.  This is the ONLY way
-to get a blank line - see below.
-
- - those containing a space, a full stop and some more characters.
-These are for future expansion.  Don't use them.
-
-IMPORTANT and not so important TIPS:
-
-* ALWAYS START EXTENDED DESCRIPTION LINES WITH AT LEAST ONE WHITESPACE
-CHARACTER.  Fields in the control file and in the Packages file are
-separated by field names starting in the first column, just as in
-RFC822.  Forgetting the whitespace will cause dpkg-deb (>=0.93.23) to
-produce a syntax error when trying to build the package.  If you force
-it to build anyway dpkg will refuse to install the resulting mess.
-
-* DO NOT INCLUDE ANY COMPLETELY EMPTY LINES.  These separate different
-records in the Packages file, and are forbidden in control files.  See
-the previous paragraph for what happens if you get this wrong.
-
-* The single line synopsis should be kept brief - certainly under 80
-characters.  My current working half-dselect displays the first 49
-characters if you're using an 80-column terminal.
-
-* Don't include the package name in the synopsis line.  The display
-software knows how to display this already, and you don't need to
-state it.
-
-* The extended description should describe what the package does, and
-what component it forms of any larger subsystem of which it is a part.
-
-* Put important information first, both in the synopis and extended
-description.  Sometimes only the first part of the synopsis or of the
-description will be displayed.  You can assume that there will usually
-be a way to see the whole extended description.
-
-* You may include information about dependencies and so forth in the
-extended description, if you wish.
-
-* Don't use tab characters.  Their effect is not predictable.
-
-Example control file for Smail:
-
-Package: smail
-Version: 3.1.29.1
-Package_Revision: 8
-Maintainer: Ian Jackson <iwj10@cus.cam.ac.uk>
-Recommended: pine | elm | emacs | mh | mailx
-Optional: metamail
-Depends: cron
-Conflicts: sendmail
-Description: Electronic mail transport system.
- Smail is the recommended mail transport agent (MTA) for Debian.
- .
- An MTA is the innards of the mail system - it takes messages from
- user-friendly mailer programs and arranges for them to be delivered
- locally or passed on to other systems as required.
- .
- In order to make use of it you must have one or more user level
- mailreader programs such as elm, pine, mailx or Emacs (which has Rmail
- and VM as mailreaders) installed.  If you wish to send messages other
- than just to other users of your system you must also have appropriate
- networking support, in the form of IP or UUCP.
-
-Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
-+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
-2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk

+ 0 - 44
doc/obsolete/disappear-replace.txt

@@ -1,44 +0,0 @@
-From ian Tue Apr 18 23:30:04 1995 
-X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
-	[nil nil nil nil nil nil nil nil nil nil nil nil "^To:" nil nil nil nil nil nil nil]
-	nil)
-X-VM-Summary-Format: "%3n %a %2d %3m  %-19.19F  %s\n"
-X-VM-Labels: nil
-X-VM-VHeader: ("Resent-" "From:" "Sender:" "To:" "Apparently-To:" "Cc:" "Subject:" "Date:") nil
-X-VM-Bookmark: 5
-To: Debian developers list <debian-devel@pixar.com>
-Subject: Handling of base packages
-
-I propose to implement the following scheme to enable obsolete base
-packages to disappear, and to allow files in the base packages to move
-between one package and another.
-
-1. When a package is installed, and contains files that are already
-marked as belonging to some other package, the older package will have
-the files that have been overwritten removed from its file list.
-
-2. When a package ceases to contain any files due to the action of
-point 1 above, its postrm script is run with the argument `disappear'
-(in place of `remove', `purge' or whatever).  It will then be moved
-into the `purge ok not-installed' state, so that it will cease to
-appear in dpkg and dselect lists.  Its conffiles will be ignored,
-*not* purged.  The prerm will *not* be run as the packaging system
-doesn't know what files are in a package until it unpacks it.
-
-This will all happen during the `unpack' phase of the replacing
-package.
-
-3. If a base system package which is being installed conflicts with
-another base system package which is currently installed on the
-system, the currently installed one will be removed first (the prerm
-will be run with `replace <package> <version>' as arguments, then the
-package will be removed, then the postrm will be run, likewise with
-`replace').  If the replacement fails the removal will be aborted,
-involving running the old packages' scripts with `abort-replace'.
-
-4. Base system packages may not be removed except under 2. or 3.
-above.  (There will be a --force-remove-base flag to allow foolhardy
-users to go ahead anyway.)
-
-Ian.
-

doc/obsolete/diversions.text → doc/obsolete/diversions.txt


+ 0 - 101
doc/obsolete/dpkg.texi

@@ -1,101 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename dpkg.info
-@settitle The @code{dpkg} Package Maintenance System
-@c %**end of header
-
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* dpkg: (dpkg).          The @code{dpkg} package maintenance system.
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-
-@setchapternewpage off
-
-@ifinfo
-This file documents the @code{dpkg} package maintenance system.
-
-Copyright (C) 1994 Ian A. Murdock
-
-Permission is granted to make and distribute verbatim copies of this
-document provided the copyright notice and this permission notice are
-preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries a copying permission
-notice identical to this one, except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-@end ignore
-
-Permission is granted to copy and distribute modified versions of this
-document under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this document
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by The Debian Linux Association.
-@end ifinfo
-
-@titlepage
-@title The @code{dpkg} Package Maintenance System
-@author Ian A. Murdock
-@page
-
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1994 Ian A. Murdock
-
-Permission is granted to make and distribute verbatim copies of this
-document provided the copyright notice and this permission notice are
-preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-document under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this document
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by The Debian Linux Association.
-@end titlepage
-
-@node Top, Overview, (dir), (dir)
-
-@top Introduction
-@menu
-* Overview::            An overview of the @code{dpkg} package
-                        maintenance system.
-* Installation::        How to install a package with @code{dpkg}.
-* Removal::             How to remove a package with @code{dpkg}.
-* Information::         How to obtain information about both
-                        installed and not-yet-installed packages.
-* Extension::           How to extend @code{dpkg} to support new
-                        package formats.
-* Guidelines::          Guidelines for creating and maintaining
-                        packages for Debian GNU/Linux.
-@end menu
-
-@node Overview
-@chapter Overview
-
-@node Installation
-@chapter Package Installation
-
-@node Removal
-@chapter Package Removal
-
-@node Information
-@chapter Package Information
-
-@node Guidelines
-@chapter Debian GNU/Linux Guidelines
-
-@node Extension
-@chapter How to Extend @code{dpkg} to Support New Package Formats
-
-@bye

+ 0 - 123
doc/obsolete/dselect-methods.txt

@@ -1,124 +0,0 @@
-From ian Sun May 14 18:21:53 +0100 1995
-To: Debian developers list <debian-devel@pixar.com>
-Subject: dselect installation method scripts
-
-Below is a (somewhat amended) repost of the posting I made a little
-while ago about the interface between dselect and the installation
-scripts it can run to extract packages.
-
-Carl Streeter has some hard disk scripts that look fairly good (I
-haven't tested them).  Anyone else looking to write such scripts
-should see his code (Carl, can you upload them please ?).
-
-Howevever, there are a few points to note:
- * Each set of scripts can support several `options' as they're called
-- this saves having different code for the CD-ROM, hard disk, &c
-methods.
- * You have to supply a /usr/[local]/lib/dpkg/methods/<method>/names
-file listing the options - see below.
-
-dselect *will* look in /usr/local/lib/dpkg/methods as well as
-/usr/lib.  Put your scripts there until you send them to me for
-inclusion in dpkg.
-
-Details if the installation method handling is below, and in
-method-scripts.txt; an example `test' method that just shows you how
-to write a `names' file and how dselect reacts is available as:
-
-ab2022c57a1198838034c5f87ea501b1  dselect-example-test-method.tar
--rw-rw-r--   1 ian      ian         10240 May 14 18:19 dselect-example-test-method.tar
-
-NB that the code in dselect to select and call installation scripts is
-ALPHA !
-
-Ian.
-
-Each `installation method' will have three scripts:
-
- * Setup installation parameters.
- * Update list of available packages.
- * Unpack.
-
-Which set of scripts is to be used is selectable by the user, from the
-`[S]etup' menu option.  Basically, the user hits `Setup', gets
-presented with a menu of choices and picks one.
-
-This (a) sets that `choice' to be the default installation method and
-(b) runs the `setup' script for that choice.
-
-The setup script should prompt the user for parameters like the site
-to NFS-mount or FTP from, the directory to use, or the directory or
-filesystem where the .deb files can be found, or the tape or floppy
-device to install from.  It should store the responses under
-/var/lib/dpkg/methods - see below.
-
-The update script should obtain a list of available packages if
-possible (this is the Packages file from the FTP sites), and copy it
-to /var/lib/dpkg/available.  Be careful not to overwrite the available
-file if something goes wrong - I'd suggest copying to `available.new'
-and renaming.  If no available list is available :-) it should print a
-message saying so.
-
-The unpack script should feed all the available .deb files to
-  dpkg --unpack --no-also-select
-(the --auto option may also be useful here).  In the future there will
-be a mechanism to allow (for example) a floppy-based installation
-scheme to tell the user which packages are still to be processed; in
-the meantime you should just keep going until the user says `stop'.
-
-If any of these scripts needs to display a message for the user, it
-should wait for the user to hit `return' before exiting so that
-dselect doesn't immediately rewrite the screen.
-
-If a script gives a non-zero exit status dselect will print a message
-about it and prompt the user for an acknowledgement.  If it exits with
-a zero exit status then dselect will immediately go back into curses
-and any message that the script printed just before exiting will not
-be visible.
-
-The scripts will be kept in /usr/lib/dpkg/methods/.  Each method
-should have a directory under methods, containing:
-  `names'  - a list of `user-visible options', see below.
-  `setup', `update', `unpack'  - executable programs.
-  `desc.<option>' - description file.
-
-A method may provide several options on the `main menu' with different
-behaviour.  For example, there might be a generic get-packages-by-FTP
-method which might provide entries in the main menu for installation
-directly from one of the Debian mirror sites as well as for
-installation from a user-specified site.
-
-The `setup', `update' and `unpack' will be invoked with three
-arguments.
-
-The first argument is the directory with the dpkg status information,
-usually /var/lib/dpkg.  They should $1/methods/<method-name> to store
-their data (remember that the user can give a --admindir option to
-dselect).
-
-The second and third argument are the name of the method and the
-option within that method, respectively.  This information is provided
-by dselect (from the user's choice of installation option).
-
-`names' will be formatted as a list of lines, each containing:
- <sequence> <option> <summary>
-
-<sequence> is a two-digit number that will be used much like rc.d
-prefixes to control the order in the main menu.  If in doubt use 50.
-
-<option> is a name which will be passed to `setup', `update' and
-`unpack' as their third argument (see above).
-
-<summary> is the menu entry string.
-
-Each option may have an extended description in `desc.<option>'.  This
-should be formatted like a Description: field entry *shifted one
-character to the left*.
-
-/var/lib/dpkg/methods will exist, and a method may use a
-/var/lib/dpkg/methods/<method> directory or file (or <method>.* files)
-to store its state.
-
-<method> and <option> must follow the rules for C identifiers.
-

+ 0 - 43
doc/obsolete/essential-flag.txt

@@ -1,43 +0,0 @@
-From ian Thu Jul  6 21:14:08 +0100 1995
-X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
-	[nil nil nil nil nil nil nil nil nil nil nil nil "^To:" nil nil nil nil nil nil nil]
-	nil)
-In-Reply-To: <m0sTw2a-00063aC@mongo.pixar.com>
-References: <m0sTw2a-00063aC@mongo.pixar.com>
-To: debian-devel@pixar.com
-Subject: Re: non-uninstallable packages
-
-Bruce Perens writes ("non-uninstallable packages"):
-> Assume that a package, such as one in the base, is supposed to be
-> non-uninstallable because it is a critical system component. We should
-> specify that in an unambiguous form, rather than indicating it by
-> specifying "Class: base" in the control file.
-> 
-> I suggest yet another control file field, called "Flags: ". This is
-> followed by a comma-delimited set of flags. An example might be:
-> 	Flags: no-uninstall
-> 
-> Another alternative would be to add control-file fields for each flag.
-> In this case, the field would appear as:
-> 	Allow-uninstall: no
-> ...and the default would be "yes".
-
-I think you're right.  Bill spotted that we were trying to overload
-the `Class' field.
-
-I don't think there's any need for a generic `Flags:' field; a simple
-extra field is fine, unless we're going to have an awful lot of
-boolean flags applying to packages (any attribute with a value is
-better handled using a field of its own anyway).
-
-I propose to call the new field `Essential', with allowable values
-`yes' and `no' and a default of `no'.
-
-This will be clearer all round, I think, than attempting to describe
-dpkg behaviour in the field name.
-
-If I don't have to make an emergency bugfix release of dpkg first this
-will be in the next version.  I'll modify dselect too.
-
-Ian.
-

+ 0 - 173
doc/obsolete/maintainer-script-args.txt

@@ -1,173 +0,0 @@
-Richard Kettlewell has asked me to document this, so here is a brief
-summary.  More documentation will probably have to wait until someone
-has time ...
-
-... hmm, it has turned out not to be so brief, and I've spent the last
-hour or so writing it.  Perhaps someone can use it as the basis for a
-spec or a manpage or something.
-
-In all cases version numbers are <version>-<revision>, if the package
-has both, or just <version>.  `upgrade' is used even when the new
-version number looks lower than the old.
-
-*** SUMMARY - listing of possible scripts with arguments:
-
- <new preinst> install
- <new preinst> install <old-version>
- <new preinst> upgrade <old-version>
- <old preinst> abort-upgrade <new-version>
-
- <postinst> configure
- <old postinst> abort-upgrade <new version>
- <conflictor's postinst> abort-remove in-favour <package> <new version>
- <deconfigured's postinst> abort-deconfigure \
-               in-favour <package-being-installed-but-failed> <version>
-               removing <conflicting-package> <version>
-
- <prerm> remove
- <old prerm> upgrade <new version>
- <new prerm> failed-upgrade <old-vppersion>
- <conflictor's prerm> remove in-favour <package> <new version>
- <deconfigured's prerm> deconfigure \
-               in-favour <package-being-installed> <version> \
-               removing <conflicting-package> <version>
-
- <postrm> remove
- <postrm> purge
- <old postrm> upgrade <new-version>
- <new postrm> failed-upgrade <old-version>
- <new postrm> abort-install
- <new postrm> abort-install <old-version>
- <new postrm> abort-upgrade <old-version>
- <disappearer's postrm> disappear <overwriter> <new version>
-
-*** INSTALLATION (unpack):
-
-The procedure on installation/upgrade/overwrite/disappear (ie, when
-running dpkg --unpack, or the unpack stage of dpkg --install) is as
-follows.  In each case if an error occurs the actions in are general
-run backwards - this means that the maintainer scripts are run with
-different arguments in reverse order.  These are the `error unwind'
-calls listed below.
-
-1a. If a version the package is already installed, call
-       <old prerm> upgrade <new version>
-1b. If this gives an error (ie, a non-zero exit status), dpkg will
-attempt instead:
-       <new prerm> failed-upgrade <old-version>
-   ... error unwind, for both the above cases:
-       <old postinst> abort-upgrade <new version>
-
-2. If a `conflicting' package is being removed at the same time:
-2a. If any packages depended on that conflicting package and
---auto-deconfigure is specified, call, for each such package:
-       <deconfigured's prerm> deconfigure \
-               in-favour <package-being-installed> <version> \
-               removing <conflicting-package> <version>
-   ... error unwind:
-       <deconfigured's postinst> abort-deconfigure \
-               in-favour <package-being-installed-but-failed> <version>
-               removing <conflicting-package> <version>
-The deconfigured packages are marked as requiring configuration, so
-that if --install is used they will be configured again if possible.
-2b. To prepare for removal of the conflicting package, call:
-       <conflictor's prerm> remove in-favour <package> <new version>
-   ... error unwind:
-       <conflictor's postinst> abort-remove in-favour <package> <new version>
-
-3a. If the package is being upgraded, call
-       <new preinst> upgrade <old-version>
-3b. otherwise, if the package had some configuration files from a
-previous version installed (ie, it is in the conffiles-only state):
-       <new preinst> install <old-version>
-3c. otherwise (ie, the package was completely purged):
-       <new preinst> install
-   ... error unwind versions, respectively:
-       <new postrm> abort-upgrade <old-version>
-       <new postrm> abort-install <old-version>
-       <new postrm> abort-install
-
-4. The new package's files are unpacked, overwriting any that may be
-on the system already, for example any from the old package or from
-another package (backups of the old files are left around, and if
-anything goes wrong dpkg will attempt to put them back as part of the
-error unwind).
-
-5a. If the package is being upgraded, call
-       <old postrm> upgrade <new-version>
-5b. If this fails, dpkg will attempt:
-       <new postrm> failed-upgrade <old-version>
-   ... error unwind, for both cases:
-       <old preinst> abort-upgrade <new-version>
-
-This is the point of no return - if dpkg gets this far, it won't back
-off past this point if an error occurs.  This will leave the package
-in a fairly bad state, which will require a successful reinstallation
-to clear up, but it's when dpkg starts doing things that are
-irreversible.
-
-6. Any files which were in the old version of the package but not in
-   the new are removed.
-7. The new file list replaces the old.
-8. The new maintainer scripts replace the old.
-
-9. Any packages all of whose files have been overwritten during the
-installation, and which aren't required for dependencies, are
-considered to have been removed.  For each such package, 
-9a. dpkg calls:
-       <disappearer's postrm> disappear <overwriter> <new version>
-9b. The package's maintainer scripts are removed.
-9c. It is noted in the status database as being in a sane state,
-namely not installed (any conffiles it may have are ignored).
-Note that disappearing packages don't have their prerm called, because
-dpkg doesn't know in advance that the package is going to vanish.
-
-10. Any files in the package we're unpacking that are also listed in
-the file lists of other packages are removed from those lists.  (This
-will lobotomise the file list of the `conflicting' package if there is
-one.)
-
-11. The backup files made at 4. are deleted.
-12. The new package's status is now sane, and recorded as `unpacked'.
-
-Here is another point of no return - if the conflicting package's
-removal fails we don't unwind the rest of the installation; the
-conflicting package is left in a half-removed limbo.
-
-13. If there was a conflicting package we go and do the removal
-actions, starting from point 2. of the removal, below.
-
-
-*** CONFIGURATION:
-
-When we configure a package (this happens with dpkg --install, or with
---configure), we first update the conffiles and then call:
-       <postinst> configure
-(I'm planning to make available as an argument the version of the most
-recent successfully-configured version of the package.)
-
-No attempt is made to unwind after errors during configuration.
-
-
-*** REMOVAL:
-
-1.     <prerm> remove
-
-2. The package's files are removed (except conffiles).
-
-3.     <postrm> remove
-
-4. All the maintainer scripts except the postrm are removed.
-
-If we aren't purging the package we stop here.  Note that packages
-which have no postrm and no conffiles are automatically purged when
-removed, as there is no difference except for the dpkg status.
-
-5. The conffiles and any backup files (~-files, #*# files, %-files,
-.dpkg-{old,new,tmp}, &c &c &c) are removed.
-
-6.     <postrm> purge
-
-7. The package's file list is removed.
-
-No attempt is made to unwind after errors during removal.

+ 0 - 59
doc/obsolete/version-ordering.txt

@@ -1,59 +0,0 @@
-(This has been edited to conform to the intent in dpkg 1.0.16.
- When recent versions of dpkg compare versions they break the Version
- into an upstream version and debian revision first, by splitting the
- Version at the last hyphen.  The revisions are only considered if the
- upstream versions compare equal.)
-
-To: debian-devel@pixar.com
-Subject: Re: dpkg 0.93.8 released
-
-[...]
-Well, here is what I came up with after a bit of thought and testing.
-I propose the following algorithm for comparing version numbers:
-
-   forever {
-     remove initial non-digit substring from string a
-     remove initial non-digit substring from string b
-     compare initial non-digit substrings lexically,
-       counting letters as coming before punctuation
-     if (they differ) return the answer
-     remove initial digit substring from string a
-     remove initial digit substring from string b
-     compare initial digit substrings numerically
-     if (they differ) return the answer
-     if (both strings are now empty)
-       the version numbers are the same, stop
-     if (one string is now empty)
-       it is the `lesser', return the answer
-   }
-
-This will have the desired results:
-   2.1 < 2.7 < 2.7a < 2.7a-2 < 2.15
-
-An implementation in Perl is attached below.
-
-Ian.
-
-#!/usr/bin/perl --
-
-if (@ARGV) {
-    print &compare(@ARGV),"\n";
-} else {
-    while(<>) { chop; chop($x=<>); print &compare($_,$x),"\n"; }
-}                
-
-sub compare {
-    local ($a,$b) = @_;
-    do {
-        $a =~ s/^\D*//; $ad= $&; $ad =~ s/\W/ /g;
-        $b =~ s/^\D*//; $bd= $&; $bd =~ s/\W/ /g;
-print "\t[$ad|$a] [$bd|$b]\n";
-        $cm = $ad cmp $bd;  return $cm if $cm;
-        $a =~ s/^\d*//; $ad= $&;
-        $b =~ s/^\d*//; $bd= $&;
-print "\t<$ad|$a> <$bd|$b>\n";
-        $cm = $ad <=> $bd;  return $cm if $cm;
-    } while (length($a) && length($b));
-print "\t{$a} {$b}\n";
-    return length($a) cmp length($b);
-}

+ 0 - 105
doc/obsolete/virtual-dependencies.txt

@@ -1,105 +0,0 @@
-To: Debian users list <debian-user@pixar.com>
-Subject: dpkg 0.93.36: dselect does virtual packages
-
-This release contains virtual package support in the C parts of the
-system, which at the moment includes dselect and dpkg-deb.
-
-It works as I outlined in a mail to debian-devel a little while ago.
-
-Package maintainers: please start adding `Provides:' fields to your
-packages.  dselect will use and understand them; dpkg-deb will check
-the syntax of the Provides field instead of warning you about it.
-dpkg will not understand the new field and will ignore it.
-
-When almost all the packages have Provides: fields in place we can
-start replacing old-style Recommended: fields.
-
-Note that we can't change Depends: fields since they're also
-interpreted by dpkg, which doesn't know about Provides (yet).
-
-[...]
---------------------
-
-From: iwj10@cus.cam.ac.uk (Ian Jackson)
-To: debian-devel@pixar.com
-Subject: `virtual' packages in Depends, Conflicts &c
-Date: Fri, 31 Mar 95 15:44 BST
-
-We're starting to have a problem with package name changes and
-multiple packages providing the same service.
-
-I liked the idea (put forward by [Bruce Perens]) of having `virtual'
-packages; it seems that it would solve many of these problems straight
-away.
-
-What I'm proposing to do is as follows:
-
-Depends, Conflicts, Recommended and Optional lines will now be able to
-contain `virtual' package names as well as real package names.
-
-Virtual packages are in the same namespace as real packages, and may
-have the same name.  The meaning of a virtual package in a
-dependency/conflicts list is exactly that of listing all the real
-packages which state that they are an instantiation of that virtual
-package.
-
-This is done with a new Provides field in the control file, with a
-syntax much like the Conflicts field.
-
-The idea is that we can have something like:
- Package: elm
- Depends: mta
-
- Package: smail
- Provides: mta
- Conflicts: mta
-
- Package: sendmail
- Provides: mta
- Conflicts: mta
-&c.  The result is equivalent to elm having said
- Depends: smail | sendmail
-
-(There'll be a special case to say that a package may conflict with a
-virtual package which it provides - clearly ...)
-
-If there are both a real and a virtual package of the same name then
-the dependency may be satisfied (or the conflict caused) by either the
-real package or any of the virtual packages which provide it.  This is
-so that, for example, supposing we have
- Package: lout
- Optional: ghostview
-(this is a fictional example - the Lout package shouldn't mention
-ghostview), and someone else comes up with a nice PostScript
-previewer, then they can just say
- Package: marvelpostview
- Provides: ghostview
-and all will work in the interim (until, say, the Lout maintainer
-changes things).
-
-If a dependency or a conflict has a version number attached then only
-real packages will be considered to see whether the relationship is
-satisfied (or prohibited, for a conflict) - it is assumed that a real
-package which provides virtual package is not of the `right' version.
-If there is demand I could arrange that a package which provides a
-virtual package may mention a version number, eg.
-  Provides: mta (2.0)
-though I tbink this is unlikely to be helpful.
-
-If you want to specify which of a set of real packages should be the
-default to satisfy a particular dependency on a virtual package, you
-can simply list the real package as alternative before the virtual
-one.  E.g.:
- Package: xbaseR6
- Recommended: xsvga | x-server
- Provides: x-base, xr6shlib
-
- Package: xsvga
- Recommended: x-base
- Provides: x-server
-
- Package: x8514
- Recommended: x-base
- Provides: x-server
-
-Ian.

文件差异内容过多而无法显示
+ 0 - 1619
doc/policy.sgml


文件差异内容过多而无法显示
+ 0 - 3370
doc/programmer.sgml


+ 18 - 0
doc/texinfo.debian_mapping

@@ -0,0 +1,18 @@
+% texinfo.debian_mapping 
+%   - sgmlsasp mapping file for TeXinfo/SGML->debiandoc/SGML
+%
+% Copyright (C) 1997 Klee Dienes <klee@mit.edu>
+%
+% This 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.
+%
+% This 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 dpkg; if not, write to the Free Software
+% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

+ 94 - 0
doc/texinfo.dtd

@@ -0,0 +1,94 @@
+<!--
+ texinfo.dtd - TeXinfo/SGML document type definition
+
+ Copyright (C) 1997 Klee Dienes <klee@mit.edu>
+
+ This 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.
+
+ This 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 dpkg; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-->
+
+<!entity at sdata "@@">
+<!entity copy sdata "@copyright{}">
+<!entity amp sdata "@&">
+<!entity lt sdata "<">
+<!entity gt sdata ">">
+<!entity lsqb sdata "[">
+<!entity rsqb sdata "]">
+<!entity bsol sdata "\">
+
+<!element setfilename - o (#pcdata)>
+
+<!element titlepage - - (title?,author?,date?,abstract?)>
+<!element texinfo - - (setfilename,titlepage?,chapter+,closing)>
+
+<!element title - - (#pcdata)>
+<!element author - - (#pcdata)>
+<!element date - - (#pcdata)>
+<!element abstract - - (#pcdata|file|samp|var|code)*>
+
+<!element quotation - - (#pcdata)>
+<!element example - - (#pcdata)>
+<!element lisp - - (#pcdata)>
+<!element smallexample - - (#pcdata)>
+<!element smalllisp - - (#pcdata)>
+<!element display - - (#pcdata)>
+<!element format - - (#pcdata)>
+
+<!element code - - (#pcdata)>
+<!element kbd - - (#pcdata)>
+<!element key - - (#pcdata)>
+<!element samp - - (#pcdata)>
+<!element var - - (#pcdata)>
+<!element file - - (#pcdata)>
+<!element dfn - - (#pcdata)>
+<!element cite - - (#pcdata)>
+
+<!element tt - - (#pcdata)+>
+<!element em - - (#pcdata)+>
+<!element it - - (#pcdata)+>
+
+<!element heading o o (#pcdata|label|code|var|file|samp)+>
+<!element body o o (#pcdata|index|ref|file|samp|var|code|example|tt|em|it|htmlurl|url|itemize|enumerate|table|ftable|vtable)+>
+
+<!element chapter - o (heading, (section|cindex|findex|vindex|kindex|pindex|tindex|p)*)>
+<!element section - o (heading, (subsection|cindex|findex|vindex|kindex|pindex|tindex|p)*)>
+<!element subsection - o (heading, (subsubsection|cindex|findex|vindex|kindex|pindex|tindex|p)*)>
+<!element subsubsection - o (heading, (cindex|findex|vindex|kindex|pindex|tindex|p)*)>
+
+<!element itemize - - (item)*>
+<!element enumerate - - (item)*>
+<!element table - - (item, body)*>
+<!element ftable - - (item, body)*>
+<!element vtable - - (item, body)*>
+
+<!element item - o (body)>
+
+<!element p - o (body)>
+
+<!element contents - o empty>
+<!element shortcontents - o empty>
+<!element summarycontents - o empty>
+
+<!element printindex - o empty>
+
+<!attlist printindex name NAME "fn">
+
+<!element closing o o (contents|shortcontents|summarycontents|printindex)*>
+
+<!element cindex - - (#pcdata|code|var|file|samp)+>
+<!element findex - - (#pcdata|code|var|file|samp)+>
+<!element vindex - - (#pcdata|code|var|file|samp)+>
+<!element kindex - - (#pcdata|code|var|file|samp)+>
+<!element pindex - - (#pcdata|code|var|file|samp)+>
+<!element tindex - - (#pcdata|code|var|file|samp)+>

+ 120 - 0
doc/texinfo.texi_mapping

@@ -0,0 +1,120 @@
+% texinfo.mapping - sgmlsasp mapping file for TeXinfo/SGML->TeXinfo
+%
+% Copyright (C) 1997 Klee Dienes <klee@mit.edu>
+%
+% This 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.
+%
+% This 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 dpkg; if not, write to the Free Software
+% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+<texinfo>    "\\input texinfo\n"
+</texinfo>   "@bye\n"
+
+<setfilename> "@setfilename "
+</setfilename> "\n"
+
+<titlepage>  "@titlepage\n"
+</titlepage> "\n@end titlepage\n"
+
+<title>  "@title "
+</title> "\n"
+
+<author> "@author "
+</author>    "\n"
+
+<chapter>    "@chapter "
+<section>    "@section "
+<subsection> "@subsection "
+<subsubsection> "@subsubsection "
+
+<heading>    ""
+</heading>   "\n"
+
+<code>  "@code{"
+</code>  "}"
+
+<kbd>   "@kbd{"
+</kbd>  "}"
+
+<key>   "@key{"
+</key>  "}"
+
+<p>	"\n\n"
+
+<samp>  "@samp{"
+</samp>  "}"
+
+<var>   "@var{"
+</var>  "}"
+
+<file>  "@file{"
+</file>  "}"
+
+<dfn>   "@dfn{"
+</dfn>  "}"
+
+<cite>  "@cite{"
+</cite>  "}"
+
+<itemize>    "@itemize @asis\n"
+</itemize>   "@end itemize\n"
+
+<table>    "@table @asis\n"
+</table>   "\n@end table\n"
+
+<item>       "@item "
+</item>      "\n"
+
+<quotation>  "@quotation\n"
+</quotation> "@end quotation\n"
+
+<example>    "@example\n"
+</example>   "@end example\n"
+
+<lisp>  "@lisp\n"
+</lisp>  "@end lisp\n"
+
+<smallexample>  "@smallexample\n"
+</smallexample> "@end smallexample\n"
+
+<smalllisp>  "@smalllisp\n"
+</smalllisp> "@end smalllisp\n"
+
+<display>    "@display\n"
+</display>   "@end display\n"
+
+<format> "@format\n"
+</format>    "@end format\n"
+
+<contents> "@contents\n"
+<shortcontents> "@shortcontents\n"
+<summarycontents> "@summarycontents\n"
+
+<cindex> "@cindex "
+</cindex> "\n"
+
+<findex> "@findex "
+</findex> "\n"
+
+<vindex> "@vindex "
+</vindex> "\n"
+
+<kindex> "@kindex "
+</kindex> "\n"
+
+<pindex> "@pindex "
+</pindex> "\n"
+
+<tindex> "@tindex "
+</tindex> "\n"
+
+<printindex> "@printindex [name]\n"

+ 1 - 0
dpkg-deb/.cvsignore

@@ -0,0 +1 @@
+Makefile.in

+ 36 - 0
dpkg-deb/Makefile.am

@@ -0,0 +1,36 @@
+## Process this file with automake to produce a Makefile.in
+
+AUTOMAKE_OPTIONS	= 1.1 foreign
+
+## Directory definitions
+
+localedir		= $(datadir)/locale
+
+## Various options
+
+CFLAGS			= @CFLAGS@ @CWARNS@ -g $(XCFLAGS) -DLOCALEDIR=\"$(localedir)\"
+OPTCFLAGS		= @CFLAGS@ @OPTCFLAGS@ @CWARNS@ -g $(XCFLAGS)
+LDFLAGS			= @LDFLAGS@ $(XLDFLAGS)
+LIBS			= @INTLLIBS@ @LIBS@ $(XLIBS)
+
+CXXFLAGS		= @CXXFLAGS@ @CWARNS@ -g $(XCXXFLAGS)
+OPTCXXFLAGS		= @CXXFLAGS @OPTCFLAGS@ @CWARNS@ -g $(XCXXFLAGS)
+
+DEFS			= -I$(top_srcdir)/include -I$(top_srcdir) -I$(srcdir) \
+			  -I$(top_builddir) -I$(top_builddir)/include -I. \
+			  -I$(top_srcdir)/intl -I$(top_builddir)/intl @DEFS@
+
+## Automake variables
+
+MAINTAINERCLEANFILES	= $(srcdir)/Makefile.in
+EXTRA_DIST		= dpkg-deb.1
+
+## Rules
+
+bin_PROGRAMS		= dpkg-deb
+man_MANS		= dpkg-deb.1
+
+dpkg_deb_SOURCES	= main.c build.c extract.c info.c dpkg-deb.h
+dpkg_deb_LDADD		= ../lib/libdpkg.la ../lib/myopt.o
+
+## End of file.

+ 0 - 66
dpkg-deb/Makefile.in

@@ -1,66 +0,0 @@
-# Copyright (C) 1994 Ian Murdock <imurdock@debian.org>
-# Copyright (C) 1994,1995 Ian Jackson <ijackson@nyx.cs.du.edu>
-#
-#   This 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.
-#
-#   This 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 dpkg; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-libdir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man1 = 1
-
-SRC = main.c build.c extract.c info.c
-OBJ = main.o build.o extract.o info.o
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-CC = @CC@
-
-CFLAGS = @CFLAGS@ @CWARNS@ -g $(XCFLAGS)
-LDFLAGS = $(XLDFLAGS)
-LIBS = -L../lib -ldpkg $(XLIBS)
-ALL_CFLAGS = -I../include -I.. @DEFS@ $(CFLAGS)
-
-.SUFFIXES:	.c .o
-
-.c.o:
-		$(CC) $(ALL_CFLAGS) -c $<
-
-all:		dpkg-deb
-
-dpkg-deb:	$(OBJ) ../lib/libdpkg.a
-		$(CC) $(LDFLAGS) -o dpkg-deb $(OBJ) $(LIBS)
-
-$(OBJ):				dpkg-deb.h ../config.h ../include/dpkg.h
-build.o:			../include/dpkg-db.h
-info.o extract.o main.o:	../include/myopt.h
-main.o:				../version.h
-
-clean:
-		rm -f *.o core dpkg-deb
-
-distclean:	clean
-		rm -f Makefile *.orig *~ *.~* ./#*#
-
-install:	all
-		$(INSTALL_PROGRAM) -s dpkg-deb $(bindir)/dpkg-deb
-		$(INSTALL_DATA) dpkg-deb.1 $(man1dir)/dpkg-deb.$(man1)

+ 49 - 48
dpkg-deb/build.c

@@ -34,9 +34,9 @@
 #include <ctype.h>
 #include <assert.h>
 
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 #include "dpkg-deb.h"
 
 #ifndef S_ISLNK
@@ -47,7 +47,7 @@ static void checkversion(const char *vstring, const char *valuename, int *errs)
   const char *p;
   if (!vstring || !*vstring) return;
   for (p=vstring; *p; p++) if (isdigit(*p)) return;
-  fprintf(stderr, BACKEND " - error: %s (`%s') doesn't contain any digits\n",
+  fprintf(stderr, _("dpkg-deb - error: %s (`%s') doesn't contain any digits\n"),
           valuename, vstring);
   (*errs)++;
 }
@@ -69,14 +69,14 @@ void do_build(const char *const *argv) {
   char conffilename[MAXCONFFILENAME+1];
   time_t thetime= 0;
   
-  directory= *argv++; if (!directory) badusage("--build needs a directory argument");
+  directory= *argv++; if (!directory) badusage(_("--build needs a directory argument"));
   subdir= 0;
   if ((debar= *argv++) !=0) {
-    if (*argv) badusage("--build takes at most two arguments");
+    if (*argv) badusage(_("--build takes at most two arguments"));
     if (debar) {
       if (stat(debar,&debarstab)) {
         if (errno != ENOENT)
-          ohshite("unable to check for existence of archive `%.250s'",debar);
+          ohshite(_("unable to check for existence of archive `%.250s'"),debar);
       } else if (S_ISDIR(debarstab.st_mode)) {
         subdir= 1;
       }
@@ -89,9 +89,9 @@ void do_build(const char *const *argv) {
     
   if (nocheckflag) {
     if (subdir)
-      ohshit("target is directory - cannot skip control file check");
-    printf(BACKEND ": warning, not checking contents of control area.\n"
-           BACKEND ": building an unknown package in `%s'.\n", debar);
+      ohshit(_("target is directory - cannot skip control file check"));
+    printf(_("dpkg-deb: warning, not checking contents of control area.\n"
+           "dpkg-deb: building an unknown package in `%s'.\n"), debar);
   } else {
     controlfile= m_malloc(strlen(directory) + sizeof(BUILDCONTROLDIR) +
                           sizeof(CONTROLFILE) + sizeof(CONFFILESFILE) +
@@ -107,20 +107,20 @@ void do_build(const char *const *argv) {
     if (strspn(checkedinfo->name,
                "abcdefghijklmnopqrstuvwxyz0123456789+-.")
         != strlen(checkedinfo->name))
-      ohshit("package name has characters that aren't lowercase alphanums or `-+.'");
+      ohshit(_("package name has characters that aren't lowercase alphanums or `-+.'"));
     if (checkedinfo->priority == pri_other) {
-      fprintf(stderr, "warning, `%s' contains user-defined Priority value `%s'\n",
+      fprintf(stderr, _("warning, `%s' contains user-defined Priority value `%s'\n"),
               controlfile, checkedinfo->otherpriority);
       warns++;
     }
     for (field= checkedinfo->available.arbs; field; field= field->next) {
-      fprintf(stderr, "warning, `%s' contains user-defined field `%s'\n",
+      fprintf(stderr, _("warning, `%s' contains user-defined field `%s'\n"),
               controlfile, field->name);
       warns++;
     }
     checkversion(checkedinfo->available.version.version,"(upstream) version",&errs);
     checkversion(checkedinfo->available.version.revision,"Debian revision",&errs);
-    if (errs) ohshit("%d errors in control file",errs);
+    if (errs) ohshit(_("%d errors in control file"),errs);
 
     if (subdir) {
       versionstring= versiondescribe(&checkedinfo->available.version,vdew_never);
@@ -131,15 +131,15 @@ void do_build(const char *const *argv) {
               arch[0] ? "_" : "", arch);
       debar= m;
     }
-    printf(BACKEND ": building package `%s' in `%s'.\n", checkedinfo->name, debar);
+    printf(_("dpkg-deb: building package `%s' in `%s'.\n"), checkedinfo->name, debar);
 
     strcpy(controlfile, directory);
     strcat(controlfile, "/" BUILDCONTROLDIR "/");
     if (lstat(controlfile,&mscriptstab)) ohshite("unable to stat control directory");
     if (!S_ISDIR(mscriptstab.st_mode)) ohshit("control directory is not a directory");
     if ((mscriptstab.st_mode & 07757) != 0755)
-      ohshit("control directory has bad permissions %03lo (must be >=0755 "
-             "and <=0775)", (unsigned long)(mscriptstab.st_mode & 07777));
+      ohshit(_("control directory has bad permissions %03lo (must be >=0755 "
+             "and <=0775)"), (unsigned long)(mscriptstab.st_mode & 07777));
 
     for (mscriptp= maintainerscripts; *mscriptp; mscriptp++) {
       strcpy(controlfile, directory);
@@ -149,13 +149,13 @@ void do_build(const char *const *argv) {
       if (!lstat(controlfile,&mscriptstab)) {
         if (S_ISLNK(mscriptstab.st_mode)) continue;
         if (!S_ISREG(mscriptstab.st_mode))
-          ohshit("maintainer script `%.50s' is not a plain file or symlink",*mscriptp);
+          ohshit(_("maintainer script `%.50s' is not a plain file or symlink"),*mscriptp);
         if ((mscriptstab.st_mode & 07557) != 0555)
-          ohshit("maintainer script `%.50s' has bad permissions %03lo "
-                 "(must be >=0555 and <=0775)",
+          ohshit(_("maintainer script `%.50s' has bad permissions %03lo "
+                 "(must be >=0555 and <=0775)"),
                  *mscriptp, (unsigned long)(mscriptstab.st_mode & 07777));
       } else if (errno != ENOENT) {
-        ohshite("maintainer script `%.50s' is not stattable",*mscriptp);
+        ohshite(_("maintainer script `%.50s' is not stattable"),*mscriptp);
       }
     }
 
@@ -164,9 +164,10 @@ void do_build(const char *const *argv) {
     if ((cf= fopen(controlfile,"r"))) {
       while (fgets(conffilename,MAXCONFFILENAME+1,cf)) {
         n= strlen(conffilename);
-        if (!n) ohshite("empty string from fgets reading conffiles");
+        if (!n) ohshite(_("empty string from fgets reading conffiles"));
         if (conffilename[n-1] != '\n') {
-          fprintf(stderr, "warning, conffile name `%.50s...' is too long", conffilename);
+          fprintf(stderr, _("warning, conffile name `%.50s...' is too long, or missing final newline\n"), 
+		  conffilename);
           warns++;
           while ((c= getc(cf)) != EOF && c != '\n');
           continue;
@@ -177,46 +178,46 @@ void do_build(const char *const *argv) {
         strcat(controlfile, conffilename);
         if (lstat(controlfile,&controlstab)) {
           if (errno == ENOENT)
-            ohshit("conffile `%.250s' does not appear in package",conffilename);
+            ohshit(_("conffile `%.250s' does not appear in package"),conffilename);
           else
-            ohshite("conffile `%.250s' is not stattable",conffilename);
+            ohshite(_("conffile `%.250s' is not stattable"),conffilename);
         } else if (!S_ISREG(controlstab.st_mode)) {
-          fprintf(stderr, "warning, conffile `%s'"
-                  " is not a plain file\n", conffilename);
+          fprintf(stderr, _("warning, conffile `%s'"
+                  " is not a plain file\n"), conffilename);
           warns++;
         }
       }
-      if (ferror(cf)) ohshite("error reading conffiles file");
+      if (ferror(cf)) ohshite(_("error reading conffiles file"));
       fclose(cf);
     } else if (errno != ENOENT) {
-      ohshite("error opening conffiles file");
+      ohshite(_("error opening conffiles file"));
     }
     if (warns) {
-      if (fprintf(stderr, BACKEND ": ignoring %d warnings about the control"
-                  " file(s)\n", warns) == EOF) werr("stderr");
+      if (fprintf(stderr, _("dpkg-deb: ignoring %d warnings about the control"
+                  " file(s)\n"), warns) == EOF) werr("stderr");
     }
   }
   if (ferror(stdout)) werr("stdout");
   
-  if (!(ar=fopen(debar,"wb"))) ohshite("unable to create `%.255s'",debar);
-  if (setvbuf(ar, 0, _IONBF, 0)) ohshite("unable to unbuffer `%.255s'",debar);
+  if (!(ar=fopen(debar,"wb"))) ohshite(_("unable to create `%.255s'"),debar);
+  if (setvbuf(ar, 0, _IONBF, 0)) ohshite(_("unable to unbuffer `%.255s'"),debar);
   m_pipe(p1);
   if (!(c1= m_fork())) {
     m_dup2(p1[1],1); close(p1[0]); close(p1[1]);
-    if (chdir(directory)) ohshite("failed to chdir to `%.255s'",directory);
-    if (chdir(BUILDCONTROLDIR)) ohshite("failed to chdir to .../" BUILDCONTROLDIR);
-    execlp(TAR,"tar","-cf","-",".",(char*)0); ohshite("failed to exec tar -cf");
+    if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
+    if (chdir(BUILDCONTROLDIR)) ohshite(_("failed to chdir to .../DEBIAN"));
+    execlp(TAR,"tar","-cf","-",".",(char*)0); ohshite(_("failed to exec tar -cf"));
   }
   close(p1[1]);
-  if (!(gz= tmpfile())) ohshite("failed to make tmpfile (control)");
+  if (!(gz= tmpfile())) ohshite(_("failed to make tmpfile (control)"));
   if (!(c2= m_fork())) {
     m_dup2(p1[0],0); m_dup2(fileno(gz),1); close(p1[0]);
-    execlp(GZIP,"gzip","-9c",(char*)0); ohshite("failed to exec gzip -9c");
+    execlp(GZIP,"gzip","-9c",(char*)0); ohshite(_("failed to exec gzip -9c"));
   }
   close(p1[0]);
   waitsubproc(c2,"gzip -9c",0);
   waitsubproc(c1,"tar -cf",0);
-  if (fstat(fileno(gz),&controlstab)) ohshite("failed to fstat tmpfile (control)");
+  if (fstat(fileno(gz),&controlstab)) ohshite(_("failed to fstat tmpfile (control)"));
   if (oldformatflag) {
     if (fprintf(ar, "%-8s\n%ld\n", OLDARCHIVEVERSION, (long)controlstab.st_size) == EOF)
       werr(debar);
@@ -236,36 +237,36 @@ void do_build(const char *const *argv) {
       werr(debar);
   }                
                 
-  if (lseek(fileno(gz),0,SEEK_SET)) ohshite("failed to rewind tmpfile (control)");
+  if (lseek(fileno(gz),0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (control)"));
   if (!(c3= m_fork())) {
     m_dup2(fileno(gz),0); m_dup2(fileno(ar),1);
-    execlp(CAT,"cat",(char*)0); ohshite("failed to exec cat (control)");
+    execlp(CAT,"cat",(char*)0); ohshite(_("failed to exec cat (control)"));
   }
   waitsubproc(c3,"cat (control)",0);
   
   if (!oldformatflag) {
     fclose(gz);
-    if (!(gz= tmpfile())) ohshite("failed to make tmpfile (data)");
+    if (!(gz= tmpfile())) ohshite(_("failed to make tmpfile (data)"));
   }
   m_pipe(p2);
   if (!(c4= m_fork())) {
     m_dup2(p2[1],1); close(p2[0]); close(p2[1]);
-    if (chdir(directory)) ohshite("failed to chdir to `%.255s'",directory);
+    if (chdir(directory)) ohshite(_("failed to chdir to `%.255s'"),directory);
     execlp(TAR,"tar","--exclude",BUILDCONTROLDIR,"-cf","-",".",(char*)0);
-    ohshite("failed to exec tar --exclude");
+    ohshite(_("failed to exec tar --exclude"));
   }
   close(p2[1]);
   if (!(c5= m_fork())) {
     m_dup2(p2[0],0); close(p2[0]);
     m_dup2(oldformatflag ? fileno(ar) : fileno(gz),1);
     execlp(GZIP,"gzip","-9c",(char*)0);
-    ohshite("failed to exec gzip -9c from tar --exclude");
+    ohshite(_("failed to exec gzip -9c from tar --exclude"));
   }
   close(p2[0]);
   waitsubproc(c5,"gzip -9c from tar --exclude",0);
   waitsubproc(c4,"tar --exclude",0);
   if (!oldformatflag) {
-    if (fstat(fileno(gz),&datastab)) ohshite("failed to fstat tmpfile (data)");
+    if (fstat(fileno(gz),&datastab)) ohshite("_(failed to fstat tmpfile (data))");
     if (fprintf(ar,
                 "%s"
                 DATAMEMBER "%-12lu0     0     100644  %-10ld`\n",
@@ -274,10 +275,10 @@ void do_build(const char *const *argv) {
                 (long)datastab.st_size) == EOF)
       werr(debar);
 
-    if (lseek(fileno(gz),0,SEEK_SET)) ohshite("failed to rewind tmpfile (data)");
+    if (lseek(fileno(gz),0,SEEK_SET)) ohshite(_("failed to rewind tmpfile (data)"));
     if (!(c3= m_fork())) {
       m_dup2(fileno(gz),0); m_dup2(fileno(ar),1);
-      execlp(CAT,"cat",(char*)0); ohshite("failed to exec cat (data)");
+      execlp(CAT,"cat",(char*)0); ohshite(_("failed to exec cat (data)"));
     }
     waitsubproc(c3,"cat (data)",0);
 

+ 0 - 3
dpkg-deb/debugmake

@@ -1,3 +0,0 @@
-#!/bin/sh
-set -x
-make XCFLAGS='-g -O0' LDFLAGS=-g LIBS='-lefence -L../lib -ldpkg' "$@"

+ 58 - 46
dpkg-deb/extract.c

@@ -34,10 +34,10 @@
 #include <assert.h>
 #include <ar.h>
 
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-deb.h"
-#include "myopt.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-deb.h>
+#include <myopt.h>
 
 static void movecontrolfiles(const char *thing) {
   char buf[200];
@@ -45,16 +45,16 @@ static void movecontrolfiles(const char *thing) {
   
   sprintf(buf, "mv %s/* . && rmdir %s", thing, thing);
   if (!(c1= m_fork())) {
-    execlp("sh","sh","-c",buf,(char*)0); ohshite("failed to exec sh -c mv foo/* &c");
+    execlp("sh","sh","-c",buf,(char*)0); ohshite(_("failed to exec sh -c mv foo/* &c"));
   }
   waitsubproc(c1,"sh -c mv foo/* &c",0);
 }
 
 static void readfail(FILE *a, const char *filename, const char *what) {
   if (ferror(a)) {
-    ohshite("error reading %s from %.255s",what,filename);
+    ohshite(_("error reading %s from %.255s"),what,filename);
   } else {
-    ohshit("unexpected end of file in %s in %.255s",what,filename);
+    ohshit(_("unexpected end of file in %s in %.255s"),what,filename);
   }
 }
 
@@ -65,14 +65,14 @@ static unsigned long parseheaderlength(const char *inh, size_t len,
   char *endp;
 
   if (memchr(inh,0,len))
-    ohshit("file `%.250s' is corrupt - %.250s length contains nulls",fn,what);
+    ohshit(_("file `%.250s' is corrupt - %.250s length contains nulls"),fn,what);
   assert(sizeof(lintbuf) > len);
   memcpy(lintbuf,inh,len);
   lintbuf[len]= ' ';
   *strchr(lintbuf,' ')= 0;
   r= strtoul(lintbuf,&endp,10);
   if (*endp)
-    ohshit("file `%.250s' is corrupt - bad digit (code %d) in %s",fn,*endp,what);
+    ohshit(_("file `%.250s' is corrupt - bad digit (code %d) in %s"),fn,*endp,what);
   return r;
 }
 
@@ -102,9 +102,12 @@ void extracthalf(const char *debar, const char *directory,
   char *cur;
   struct ar_hdr arh;
   int readfromfd, oldformat, header_done, adminmember, c;
+#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
+  fpos_t fpos;
+#endif
   
-  ar= fopen(debar,"r"); if (!ar) ohshite("failed to read archive `%.255s'",debar);
-  if (fstat(fileno(ar),&stab)) ohshite("failed to fstat archive");
+  ar= fopen(debar,"r"); if (!ar) ohshite(_("failed to read archive `%.255s'"),debar);
+  if (fstat(fileno(ar),&stab)) ohshite(_("failed to fstat archive"));
   if (!fgets(versionbuf,sizeof(versionbuf),ar)) readfail(ar,debar,"version number");
 
   if (!strcmp(versionbuf,"!<arch>\n")) {
@@ -116,26 +119,26 @@ void extracthalf(const char *debar, const char *directory,
       if (fread(&arh,1,sizeof(arh),ar) != sizeof(arh))
         readfail(ar,debar,"between members");
       if (memcmp(arh.ar_fmag,ARFMAG,sizeof(arh.ar_fmag)))
-        ohshit("file `%.250s' is corrupt - bad magic at end of first header",debar);
+        ohshit(_("file `%.250s' is corrupt - bad magic at end of first header"),debar);
       memberlen= parseheaderlength(arh.ar_size,sizeof(arh.ar_size),
                                    debar,"member length");
       if (memberlen<0)
-        ohshit("file `%.250s' is corrupt - negative member length %ld",debar,memberlen);
+        ohshit(_("file `%.250s' is corrupt - negative member length %ld"),debar,memberlen);
       if (!header_done) {
         if (memcmp(arh.ar_name,"debian-binary   ",sizeof(arh.ar_name)))
-          ohshit("file `%.250s' is not a debian binary archive (try dpkg-split?)",debar);
+          ohshit(_("file `%.250s' is not a debian binary archive (try dpkg-split?)"),debar);
         infobuf= m_malloc(memberlen+1);
         if (fread(infobuf,1, memberlen + (memberlen&1), ar) != memberlen + (memberlen&1))
           readfail(ar,debar,"header info member");
         infobuf[memberlen]= 0;
         cur= strchr(infobuf,'\n');
-        if (!cur) ohshit("archive has no newlines in header");
+        if (!cur) ohshit(_("archive has no newlines in header"));
         *cur= 0;
         cur= strchr(infobuf,'.');
-        if (!cur) ohshit("archive has no dot in version number");
+        if (!cur) ohshit(_("archive has no dot in version number"));
         *cur= 0;
         if (strcmp(infobuf,"2"))
-          ohshit("archive version %.250s not understood, get newer " BACKEND, infobuf);
+          ohshit(_("archive version %.250s not understood, get newer dpkg-deb"), infobuf);
         *cur= '.';
         strncpy(versionbuf,infobuf,sizeof(versionbuf));
         versionbuf[sizeof(versionbuf)-1]= 0;
@@ -151,12 +154,12 @@ void extracthalf(const char *debar, const char *directory,
           !memcmp(arh.ar_name,DATAMEMBER,sizeof(arh.ar_name)) ? 0 :
           -1;
         if (adminmember == -1) {
-          ohshit("file `%.250s' contains ununderstood data member %.*s, giving up",
+          ohshit(_("file `%.250s' contains ununderstood data member %.*s, giving up"),
                  debar, (int)sizeof(arh.ar_name), arh.ar_name);
         }
         if (adminmember == 1) {
           if (ctrllennum != 0)
-            ohshit("file `%.250s' contains two control members, giving up", debar);
+            ohshit(_("file `%.250s' contains two control members, giving up"), debar);
           ctrllennum= memberlen;
         }
         if (!adminmember != !admininfo) {
@@ -168,8 +171,8 @@ void extracthalf(const char *debar, const char *directory,
     }
 
     if (admininfo >= 2)
-      if (printf(" new debian package, version %s.\n"
-                 " size %ld bytes: control archive= %ld bytes.\n",
+      if (printf(_(" new debian package, version %s.\n"
+                 " size %ld bytes: control archive= %ld bytes.\n"),
                  versionbuf, (long)stab.st_size, ctrllennum) == EOF ||
           fflush(stdout)) werr("stdout");
     
@@ -182,11 +185,11 @@ void extracthalf(const char *debar, const char *directory,
     if (!fgets(ctrllenbuf,sizeof(ctrllenbuf),ar))
       readfail(ar,debar,"ctrl information length");
     if (sscanf(ctrllenbuf,"%ld%c%d",&ctrllennum,&nlc,&dummy) !=2 || nlc != '\n')
-      ohshit("archive has malformatted ctrl len `%s'",ctrllenbuf);
+      ohshit(_("archive has malformatted ctrl len `%s'"),ctrllenbuf);
 
     if (admininfo >= 2)
-      if (printf(" old debian package, version %s.\n"
-                 " size %ld bytes: control archive= %ld, main archive= %ld.\n",
+      if (printf(_(" old debian package, version %s.\n"
+                 " size %ld bytes: control archive= %ld, main archive= %ld.\n"),
                  versionbuf, (long)stab.st_size, ctrllennum,
                  (long) (stab.st_size - ctrllennum - strlen(ctrllenbuf) - l)) == EOF ||
           fflush(stdout)) werr("stdout");
@@ -199,33 +202,39 @@ void extracthalf(const char *debar, const char *directory,
   } else {
     
     if (!strncmp(versionbuf,"!<arch>",7)) {
-      if (fprintf(stderr, BACKEND
-                  ": file looks like it might be an archive which has been\n"
-                  BACKEND ":    corrupted by being downloaded in ASCII mode\n")
+      if (fprintf(stderr,
+                  _("dpkg-deb: file looks like it might be an archive which has been\n"
+                  "dpkg-deb:    corrupted by being downloaded in ASCII mode\n"))
           == EOF) werr("stderr");
     }
 
-    ohshit("`%.255s' is not a debian format archive",debar);
+    ohshit(_("`%.255s' is not a debian format archive"),debar);
 
   }
 
+#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
+  if(fgetpos(ar, &fpos)) ohshit(_("fgetpos failed"));
+#endif
   fflush(ar);
+#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
+  if(fsetpos(ar, &fpos)) ohshit(_("fsetpos failed"));
+#endif
   if (oldformat) {
     if (admininfo) {
       m_pipe(p1);
       if (!(c1= m_fork())) {
         close(p1[0]);
-        if (!(pi= fdopen(p1[1],"w"))) ohshite("failed to fdopen p1 in paste");
+        if (!(pi= fdopen(p1[1],"w"))) ohshite(_("failed to fdopen p1 in paste"));
         errno=0; if (fwrite(ctrlarea,1,ctrllennum,pi) != ctrllennum)
-          ohshit("failed to write to gzip -dc");
-        if (fclose(pi)) ohshit("failed to close gzip -dc");
+          ohshit(_("failed to write to gzip -dc"));
+        if (fclose(pi)) ohshit(_("failed to close gzip -dc"));
         exit(0);
       }
       close(p1[1]);
       readfromfd= p1[0];
     } else {
       if (lseek(fileno(ar),l+strlen(ctrllenbuf)+ctrllennum,SEEK_SET) == -1)
-        ohshite("failed to syscall lseek to files archive portion");
+        ohshite(_("failed to syscall lseek to files archive portion"));
       c1= -1;
       readfromfd= fileno(ar);
     }
@@ -233,13 +242,13 @@ void extracthalf(const char *debar, const char *directory,
     m_pipe(p1);
     if (!(c1= m_fork())) {
       close(p1[0]);
-      if (!(pi= fdopen(p1[1],"w"))) ohshite("failed to fdopen p1 in copy");
+      if (!(pi= fdopen(p1[1],"w"))) ohshite(_("failed to fdopen p1 in copy"));
       while (memberlen > 0) {
         if ((c= getc(ar)) == EOF) readfail(ar,debar,"member data");
-        if (putc(c,pi) == EOF) ohshite("failed to write to pipe in copy");
+        if (putc(c,pi) == EOF) ohshite(_("failed to write to pipe in copy"));
         memberlen--;
       }
-      if (fclose(pi) == EOF) ohshite("failed to close pipe in copy");
+      if (fclose(pi) == EOF) ohshite(_("failed to close pipe in copy"));
       exit(0);
     }
     close(p1[1]);
@@ -252,7 +261,7 @@ void extracthalf(const char *debar, const char *directory,
     m_dup2(readfromfd,0);
     if (admininfo) close(p1[0]);
     if (taroption) { m_dup2(p2[1],1); close(p2[0]); close(p2[1]); }
-    execlp(GZIP,"gzip","-dc",(char*)0); ohshite("failed to exec gzip -dc");
+    execlp(GZIP,"gzip","-dc",(char*)0); ohshite(_("failed to exec gzip -dc"));
   }
   if (readfromfd != fileno(ar)) close(readfromfd);
   close(p2[1]);
@@ -260,10 +269,10 @@ void extracthalf(const char *debar, const char *directory,
   if (taroption && directory) {
     if (chdir(directory)) {
       if (errno == ENOENT) {
-        if (mkdir(directory,0777)) ohshite("failed to create directory");
-        if (chdir(directory)) ohshite("failed to chdir to directory after creating it");
+        if (mkdir(directory,0777)) ohshite(_("failed to create directory"));
+        if (chdir(directory)) ohshite(_("failed to chdir to directory after creating it"));
       } else {
-        ohshite("failed to chdir to directory");
+        ohshite(_("failed to chdir to directory"));
       }
     }
   }
@@ -276,7 +285,7 @@ void extracthalf(const char *debar, const char *directory,
       strcat(buffer, "f");
       m_dup2(p2[0],0);
       execlp(TAR,"tar",buffer,"-",(char*)0);
-      ohshite("failed to exec tar");
+      ohshite(_("failed to exec tar"));
     }
     close(p2[0]);
     waitsubproc(c3,"tar",0);
@@ -299,13 +308,13 @@ static void controlextractvextract(int admin,
   const char *debar, *directory;
   
   if (!(debar= *argv++))
-    badusage("--%s needs a .deb filename argument",cipaction->olong);
+    badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
   if (!(directory= *argv++)) {
     if (admin) directory= EXTRACTCONTROLDIR;
-    else ohshit("--%s needs a target directory.\n"
-                "Perhaps you should be using " DPKG " --install ?",cipaction->olong);
+    else ohshit(_("--%s needs a target directory.\n"
+                "Perhaps you should be using dpkg --install ?"),cipaction->olong);
   } else if (*argv) {
-    badusage("--%s takes at most two arguments (.deb and directory",cipaction->olong);
+    badusage(_("--%s takes at most two arguments (.deb and directory"),cipaction->olong);
   }
   extracthalf(debar, directory, taroptions, admin);
 }
@@ -314,12 +323,15 @@ void do_fsystarfile(const char *const *argv) {
   const char *debar;
   
   if (!(debar= *argv++))
-    badusage("--%s needs a .deb filename argument",cipaction->olong);
+    badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
   if (*argv)
-    badusage("--%s takes only one argument (.deb filename)",cipaction->olong);
+    badusage(_("--%s takes only one argument (.deb filename)"),cipaction->olong);
   extracthalf(debar,0,0,0);
 }
    
 void do_control(const char *const *argv) { controlextractvextract(1, "x", argv); }
 void do_extract(const char *const *argv) { controlextractvextract(0, "xp", argv); }
 void do_vextract(const char *const *argv) { controlextractvextract(0, "xpv", argv); }
+
+
+

+ 26 - 26
dpkg-deb/info.c

@@ -32,10 +32,10 @@
 #include <limits.h>
 #include <ctype.h>
 
-#include "config.h"
-#include "dpkg.h"
+#include <config.h>
+#include <dpkg.h>
+#include <myopt.h>
 #include "dpkg-deb.h"
-#include "myopt.h"
 
 static void cu_info_prepare(int argc, void **argv) {
   pid_t c1;
@@ -44,15 +44,15 @@ static void cu_info_prepare(int argc, void **argv) {
   struct stat stab;
 
   directory= (char*)(argv[0]);
-  if (chdir("/")) { perror("failed to chdir to `/' for cleanup"); return; }
+  if (chdir("/")) { perror(_("failed to chdir to `/' for cleanup")); return; }
   if (lstat(directory,&stab) && errno==ENOENT) return;
-  if ((c1= fork()) == -1) { perror("failed to fork for cleanup"); return; }
+  if ((c1= fork()) == -1) { perror(_("failed to fork for cleanup")); return; }
   if (!c1) {
     execlp(RM,"rm","-rf",directory,(char*)0);
-    perror("failed to exec " RM " for cleanup"); _exit(1);
+    perror(_("failed to exec rm for cleanup")); _exit(1);
   }
-  if (waitpid(c1,&status,0) != c1) { perror("failed to wait for rm cleanup"); return; }
-  if (status) { fprintf(stderr,"rm cleanup failed, code %d\n",status); }
+  if (waitpid(c1,&status,0) != c1) { perror(_("failed to wait for rm cleanup")); return; }
+  if (status) { fprintf(stderr,_("rm cleanup failed, code %d\n"),status); }
 } 
 
 static void info_prepare(const char *const **argvp,
@@ -63,12 +63,12 @@ static void info_prepare(const char *const **argvp,
   pid_t c1;
   
   *debarp= *(*argvp)++;
-  if (!*debarp) badusage("--%s needs a .deb filename argument",cipaction->olong);
-  if (!tmpnam(dbuf)) ohshite("failed to make temporary filename");
+  if (!*debarp) badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
+  if (!tmpnam(dbuf)) ohshite(_("failed to make temporary filename"));
   *directoryp= dbuf;
 
   if (!(c1= m_fork())) {
-    execlp(RM,"rm","-rf",dbuf,(char*)0); ohshite("failed to exec rm -rf");
+    execlp(RM,"rm","-rf",dbuf,(char*)0); ohshite(_("failed to exec rm -rf"));
   }
   waitsubproc(c1,"rm -rf",0);
   push_cleanup(cu_info_prepare,-1, 0,0, 1, (void*)dbuf);
@@ -91,19 +91,19 @@ static void info_spew(const char *debar, const char *directory,
     if (co) {
       if (!(c1= m_fork())) {
         m_dup2(fileno(co),0);
-        execlp(CAT,"cat",(char*)0); ohshite("failed to exec cat component");
+        execlp(CAT,"cat",(char*)0); ohshite(_("failed to exec cat component"));
       }
       waitsubproc(c1,"cat component",0);
     } else if (errno == ENOENT) {
-      if (fprintf(stderr, BACKEND ": `%.255s' contains no control component `%.255s'\n",
+      if (fprintf(stderr, _("dpkg-deb: `%.255s' contains no control component `%.255s'\n"),
                   debar, component) == EOF) werr("stderr");
       re= 1;
     } else {
-      ohshite("open component `%.255s' (in %.255s) failed in an unexpected way",
+      ohshite(_("open component `%.255s' (in %.255s) failed in an unexpected way"),
               component, directory);
     }
   }
-  if (re) ohshit("at least one requested control component missing");
+  if (re) ohshit(_("at least one requested control component missing"));
 }
 
 static void info_list(const char *debar, const char *directory) {
@@ -116,15 +116,15 @@ static void info_list(const char *debar, const char *directory) {
   int c;
 
   cdn= scandir(".", &cdlist, &ilist_select, alphasort);
-  if (cdn == -1) ohshite("cannot scan directory `%.255s'",directory);
+  if (cdn == -1) ohshite(_("cannot scan directory `%.255s'"),directory);
 
   while (cdn-- >0) {
     cdep= *cdlist++;
     if (stat(cdep->d_name,&stab))
-      ohshite("cannot stat `%.255s' (in `%.255s')",cdep->d_name,directory);
+      ohshite(_("cannot stat `%.255s' (in `%.255s')"),cdep->d_name,directory);
     if (S_ISREG(stab.st_mode)) {
       if (!(cc= fopen(cdep->d_name,"r")))
-        ohshite("cannot open `%.255s' (in `%.255s')",cdep->d_name,directory);
+        ohshite(_("cannot open `%.255s' (in `%.255s')"),cdep->d_name,directory);
       lines= 0; interpreter[0]= 0;
       if ((c= getc(cc))== '#') {
         if ((c= getc(cc))== '!') {
@@ -138,22 +138,22 @@ static void info_list(const char *debar, const char *directory) {
         }
       }
       while ((c= getc(cc))!= EOF) { if (c == '\n') lines++; }
-      if (ferror(cc)) ohshite("failed to read `%.255s' (in `%.255s')",
+      if (ferror(cc)) ohshite(_("failed to read `%.255s' (in `%.255s')"),
                               cdep->d_name,directory);
       fclose(cc);
-      if (printf(" %7ld bytes, %5d lines   %c  %-20.127s %.127s\n",
+      if (printf(_(" %7ld bytes, %5d lines   %c  %-20.127s %.127s\n"),
                  (long)stab.st_size, lines,
                  S_IXUSR & stab.st_mode ? '*' : ' ',
                  cdep->d_name, interpreter) == EOF)
         werr("stdout");
     } else {
-      if (printf("     not a plain file          %.255s\n",cdep->d_name) == EOF)
+      if (printf(_("     not a plain file          %.255s\n"),cdep->d_name) == EOF)
         werr("stdout");
     }
   }
   if (!(cc= fopen("control","r"))) {
-    if (errno != ENOENT) ohshite("failed to read `control' (in `%.255s')",directory);
-    if (!fputs("(no `control' file in control archive!)\n",stdout)) werr("stdout");
+    if (errno != ENOENT) ohshite(_("failed to read `control' (in `%.255s')"),directory);
+    if (fputs(_("(no `control' file in control archive!)\n"),stdout) < 0) werr("stdout");
   } else {
     lines= 1;
     while ((c= getc(cc))!= EOF) {
@@ -173,7 +173,7 @@ static void info_field(const char *debar, const char *directory,
   const char *const *fp;
   int doing, c, lno, fnl;
 
-  if (!(cc= fopen("control","r"))) ohshite("could not open the `control' component");
+  if (!(cc= fopen("control","r"))) ohshite(_("could not open the `control' component"));
   doing= 1; lno= 1;
   for (;;) {
     c= getc(cc);  if (c==EOF) { doing=0; break; }
@@ -203,7 +203,7 @@ static void info_field(const char *debar, const char *directory,
     }
     if (c == EOF) break;
   }
-  if (ferror(cc)) ohshite("failed during read of `control' component");
+  if (ferror(cc)) ohshite(_("failed during read of `control' component"));
   if (doing) putc('\n',stdout);
   if (ferror(stdout)) werr("stdout");
 }
@@ -235,6 +235,6 @@ void do_field(const char *const *argv) {
 void do_contents(const char *const *argv) {
   const char *debar;
   
-  if (!(debar= *argv++) || *argv) badusage("--contents takes exactly one argument");
+  if (!(debar= *argv++) || *argv) badusage(_("--contents takes exactly one argument"));
   extracthalf(debar, 0, "tv", 0);
 }

+ 35 - 29
dpkg-deb/main.c

@@ -33,49 +33,50 @@
 #include <ctype.h>
 #include <assert.h>
 
-#include "config.h"
-#include "dpkg.h"
-#include "version.h"
-#include "myopt.h"
+#include <config.h>
+#include <dpkg.h>
+#include <version.h>
+#include <myopt.h>
+
 #include "dpkg-deb.h"
 
 static void printversion(void) {
-  if (!fputs("Debian Linux `" BACKEND "' package archive backend "
-             "version " DPKG_VERSION_ARCH ".\n"
-             "Copyright (C) 1994-1996 Ian Jackson.  This is free software; see the\n"
-             "GNU General Public Licence version 2 or later for copying conditions.\n"
-             "There is NO warranty.  See dpkg-deb --licence for details.\n",
-             stdout)) werr("stdout");
+  if (fputs(_("Debian Linux `" BACKEND "' package archive backend version "), stdout) < 0) werr("stdout");
+  if (fputs(DPKG_VERSION_ARCH ".\n", stdout) < 0) werr("stdout");
+  if (fputs(_("Copyright (C) 1994-1996 Ian Jackson.  This is free software; see the\n"
+	      "GNU General Public Licence version 2 or later for copying conditions.\n"
+	      "There is NO warranty.  See dpkg-deb --licence for details.\n"),
+	    stdout) < 0) werr("stdout");
 }
 
 static void usage(void) {
-  if (!fputs("\
-Usage: " BACKEND " -b|--build <directory> [<deb>]    Build an archive.\n\
-       " BACKEND " -c|--contents <deb>               List contents.\n\
-       " BACKEND " -I|--info <deb> [<cfile>...]      Show info to stdout.\n\
-       " BACKEND " -f|--field <deb> [<cfield>...]    Show field(s) to stdout.\n\
-       " BACKEND " -e|--control <deb> [<directory>]  Extract control info.\n\
-       " BACKEND " -x|--extract <deb> <directory>    Extract files.\n\
-       " BACKEND " -X|--vextract <deb> <directory>   Extract & list files.\n\
-       " BACKEND " --fsys-tarfile <deb>              Output filesystem tarfile.\n\
-       " BACKEND " -h|--help                         Display this message.\n\
-       " BACKEND " --version | --licence             Show version/licence.\n\
+  if (fputs(_("\
+Usage: dpkg-deb -b|--build <directory> [<deb>]    Build an archive.\n\
+       dpkg-deb -c|--contents <deb>               List contents.\n\
+       dpkg-deb -I|--info <deb> [<cfile>...]      Show info to stdout.\n\
+       dpkg-deb -f|--field <deb> [<cfield>...]    Show field(s) to stdout.\n\
+       dpkg-deb -e|--control <deb> [<directory>]  Extract control info.\n\
+       dpkg-deb -x|--extract <deb> <directory>    Extract files.\n\
+       dpkg-deb -X|--vextract <deb> <directory>   Extract & list files.\n\
+       dpkg-deb --fsys-tarfile <deb>              Output filesystem tarfile.\n\
+       dpkg-deb -h|--help                         Display this message.\n\
+       dpkg-deb --version | --licence             Show version/licence.\n\
 <deb> is the filename of a Debian format archive.\n\
 <cfile> is the name of an administrative file component.\n\
 <cfield> is the name of a field in the main `control' file.\n\
 Options:  -D for debugging output; --old or --new controls archive format;\n\
           --no-check to suppress control file check (build bad package).\n\
 \n\
-Use `" DPKG "' to install and remove packages from your system, or\n\
-`" DSELECT "' for user-friendly package management.  Packages unpacked\n\
-using `" BACKEND " --extract' will be incorrectly installed !\n",
-             stdout)) werr("stdout");
+Use `dpkg' to install and remove packages from your system, or\n\
+`dselect' for user-friendly package management.  Packages unpacked\n\
+using `dpkg-deb --extract' will be incorrectly installed !\n"),
+	    stdout) < 0) werr("stdout");
 }
 
 const char thisname[]= BACKEND;
 const char printforhelp[]=
- "Type " BACKEND " --help for help about manipulating *.deb files;\n"
- "Type " DPKG " --help for help about installing and deinstalling packages.";
+  N_("Type dpkg-deb --help for help about manipulating *.deb files;\n"
+     "Type dpkg --help for help about installing and deinstalling packages.");
 
 int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT;
 const struct cmdinfo *cipaction=0;
@@ -126,7 +127,7 @@ static const struct cmdinfo cmdinfos[]= {
 
 static void setaction(const struct cmdinfo *cip, const char *value) {
   if (cipaction)
-    badusage("conflicting actions --%s and --%s",cip->olong,cipaction->olong);
+    badusage(_("conflicting actions --%s and --%s"),cip->olong,cipaction->olong);
   cipaction= cip;
   assert(cip-cmdinfos < sizeof(dofunctions)*sizeof(dofunction*));
   action= dofunctions[cip-cmdinfos];
@@ -135,13 +136,18 @@ static void setaction(const struct cmdinfo *cip, const char *value) {
 int main(int argc, const char *const *argv) {
   jmp_buf ejbuf;
 
+  setlocale(LC_ALL, "");
+  setlocale(LC_NUMERIC, "POSIX");
+  bindtextdomain(PACKAGE, LOCALEDIR);
+  textdomain(PACKAGE);
+
   if (setjmp(ejbuf)) { /* expect warning about possible clobbering of argv */
     error_unwind(ehflag_bombout); exit(2);
   }
   push_error_handler(&ejbuf,print_error_fatal,0);
 
   myopt(&argv,cmdinfos);
-  if (!cipaction) badusage("need an action option");
+  if (!cipaction) badusage(_("need an action option"));
 
   unsetenv("GZIP");
   action(argv);

+ 1 - 0
dselect/.cvsignore

@@ -0,0 +1 @@
+Makefile.in

+ 74 - 0
dselect/Makefile.am

@@ -0,0 +1,74 @@
+## Process this file with automake to produce a Makefile.in
+
+AUTOMAKE_OPTIONS	= 1.1 foreign
+
+## Directory definitions
+
+localedir		= $(datadir)/locale
+
+## Various options
+
+CFLAGS			= @CFLAGS@ @CWARNS@ -g $(XCFLAGS) -DLOCALEDIR=\"$(localedir)\"
+OPTCFLAGS		= @CFLAGS@ @OPTCFLAGS@ @CWARNS@ -g $(XCFLAGS) -DLOCALEDIR=\"$(localedir)\"
+LDFLAGS			= @LDFLAGS@ $(XLDFLAGS)
+LIBS			= @INTLLIBS@ @LIBS@ $(XLIBS)
+
+CXXFLAGS		= @CXXFLAGS@ @CWARNS@ -g $(XCXXFLAGS) -DLOCALEDIR=\"$(localedir)\"
+OPTCXXFLAGS		= @CXXFLAGS@ @OPTCFLAGS@ @CWARNS@ -g $(XCXXFLAGS) -DLOCALEDIR=\"$(localedir)\"
+
+DEFS			= -I$(top_srcdir)/include -I$(top_srcdir) -I$(srcdir) \
+			  -I$(top_builddir) -I$(top_builddir)/include -I. \
+			  -I$(top_srcdir)/intl -I$(top_builddir)/intl @DEFS@
+## Automake variables
+
+bin_PROGRAMS		= dselect
+man_MANS		= dselect.8
+
+EXTRA_DIST		= keyoverride mkcurkeys.pl mkhelpmsgs.pl helpmsgs.src \
+			  checkunimp.pl $(man_MANS)
+
+dselect_SOURCES		= main.cc bindings.cc curkeys.cc helpmsgs.cc \
+			  basecmds.cc baselist.cc basetop.cc \
+			  pkgcmds.cc pkgdepcon.cc pkgdisplay.cc pkginfo.cc \
+			  pkgkeys.cc pkglist.cc pkgsublist.cc pkgtop.cc \
+			  methkeys.cc method.cc methparse.cc methlist.cc \
+			  dselect.h bindings.h pkglist.h method.h
+dselect_LDADD		= ../lib/libdpkg.la ../lib/myopt.o -lncurses
+
+
+BUILT_SOURCES		= curkeys.h helpmsgs.h helpmsgs.cc
+CLEANFILES		= curkeys.h.new helpmsgs.h.new helpmsgs.cc.new $(BUILT_SOURCES)
+
+DISTCLEANFILES		= updates status available *.old
+MAINTAINERCLEANFILES	= $(srcdir)/Makefile.in
+
+## Rules
+
+helpmsgs.h helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl
+	perl $(srcdir)/mkhelpmsgs.pl $<
+
+curkeys.h: keyoverride $(srcdir)/mkcurkeys.pl
+	cursesfile=`echo '#include <curses.h>' | \
+		 $(CC) -E - | grep 'curses.h' | head -1 | \
+		 sed -e 's/^[^"]*"//; s/".*$$//'`; \
+	if [ "$$cursesfile" == "" ]; then echo "can't find curses file"; exit 1; fi; \
+	perl $(srcdir)/mkcurkeys.pl $< $$cursesfile > $@.new
+	mv $@.new $@
+
+$(DEP_FILES): helpmsgs.h curkeys.h
+
+## Optimize for speed, not space, for most commonly used files
+
+pkgdepcon.o: pkgdepcon.cc
+	$(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(OPTCXXFLAGS) -c $<
+
+pkgdisplay.o: pkgdisplay.cc
+	$(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(OPTCXXFLAGS) -c $<
+
+curkeys.o: curkeys.cc
+	$(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(OPTCXXFLAGS) -c $<
+
+dist-hook:
+	cp -p helpmsgs.h helpmsgs.cc curkeys.h $(distdir)/
+
+## End of file.

+ 0 - 119
dselect/Makefile.in

@@ -1,119 +0,0 @@
-# Copyright (C) 1994 Ian Murdock <imurdock@debian.org>
-# Copyright (C) 1994,1995 Ian Jackson <ijackson@nyx.cs.du.edu>
-#
-#   This 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.
-#
-#   This 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 dpkg; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-libdir = $(prefix)/lib
-mandir = $(prefix)/man
-man8dir = $(mandir)/man8
-man8 = 8
-
-SRC =                                                                       \
- main.cc        bindings.cc    curkeys.cc     helpmsgs.cc                   \
- basecmds.cc    baselist.cc    basetop.cc                                   \
- pkgcmds.cc     pkgdepcon.cc   pkgdisplay.cc  pkginfo.cc     pkgkeys.cc     \
- pkglist.cc     pkgsublist.cc  pkgtop.cc                                    \
- methkeys.cc    method.cc      methparse.cc   methlist.cc
-
-OBJ =                                                                       \
- main.o         bindings.o     curkeys.o      helpmsgs.o                    \
- basecmds.o     baselist.o     basetop.o                                    \
- pkgcmds.o      pkgdepcon.o    pkgdisplay.o   pkginfo.o      pkgkeys.o      \
- pkglist.o      pkgsublist.o   pkgtop.o                                     \
- methkeys.o     method.o       methparse.o    methlist.o
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-CC = @CC@
-CPLUSPLUS = @CXX@
-
-CFLAGS = @CFLAGS@ @CWARNS@ -g $(XCFLAGS)
-OPTCFLAGS = @OPTCFLAGS@
-LDFLAGS = $(XLDFLAGS)
-
-EXTERNLIBS = -lncurses
-LIBS = -L../lib -ldpkg $(EXTERNLIBS) $(XLIBS)
-ALL_CFLAGS = -I../include -I.. @DEFS@ $(CFLAGS)
-ALL_CFLAGS_OPT = $(ALL_CFLAGS) $(OPTCFLAGS)
-
-.SUFFIXES:	.cc .o .c
-
-.cc.o:
-		$(CPLUSPLUS) $(ALL_CFLAGS) -c $<
-
-.c.o:
-		$(CC) $(ALL_CFLAGS) -c $<
-
-all:		dselect
-
-dselect:	$(OBJ) ../lib/libdpkg.a
-		$(CC) $(LDFLAGS) -o dselect $(OBJ) $(LIBS)
-
-# These next few files are very heavily used, and should be optimised
-# for speed rather than space.  (ALL_CFLAGS_OPT usually means -O3.)
-pkgdepcon.o:	pkgdepcon.cc
-		$(CPLUSPLUS) $(ALL_CFLAGS_OPT) -c $<
-
-pkgdisplay.o:	pkgdisplay.cc
-		$(CPLUSPLUS) $(ALL_CFLAGS_OPT) -c $<
-
-curkeys.o:	curkeys.cc curkeys.inc
-		$(CPLUSPLUS) $(ALL_CFLAGS) -c curkeys.cc
-
-helpmsgs.h helpmsgs.cc:	helpmsgs.src mkhelpmsgs.pl
-		perl mkhelpmsgs.pl
-
-curkeys.inc:	keyoverride mkcurkeys.pl
-		perl mkcurkeys.pl keyoverride \
-			`echo '#include <ncurses/curses.h>' | \
-			 $(CC) -E - | grep ncurses | head -1 | \
-			 sed -e 's/^[^"]*"//; s/".*$$//'` > curkeys.inc.new
-		mv curkeys.inc.new curkeys.inc
-
-kt:		kt.o
-		$(CC) $(LDFLAGS) -o kt kt.o $(LIBS)
-
-kt.o:		kt.c curkeys.inc
-
-clean:
-		rm -f curkeys.inc curkeys.inc.new
-		rm -f helpmsgs.h helpmsgs.cc helpmsgs.h.new helpmsgs.cc.new
-		rm -f *.o core dselect kt
-
-distclean:	clean
-		rm -f Makefile *.orig *~ *.~* ./#*#
-		rm -rf t updates status available *.old
-
-install:	all
-		$(INSTALL_PROGRAM) -s dselect $(bindir)/dselect
-
-# $(INSTALL_DATA) dselect.8 $(man8dir)/dselect.$(man8)
-
-$(OBJ):			dselect.h ../config.h ../include/dpkg.h ../include/dpkg-db.h
-main.o:						../version.h ../include/myopt.h
-method.o:					method.h
-pkgcmds.o pkgdepcon.o pkgdisplay.o pkgtop.o:	pkglist.h
-baselist.o bindings.o curkeys.o main.o:		bindings.h method.h pkglist.h
-methlist.o methkeys.o pkginfo.o pkgkeys.o:	bindings.h method.h pkglist.h
-pkglist.o pkgsublist.o methparse.o:		bindings.h method.h pkglist.h
-helpmsgs.o methlist.o pkginfo.o basecmds.o:	helpmsgs.h helpmsgs.cc

+ 7 - 6
dselect/basecmds.cc

@@ -21,14 +21,14 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "helpmsgs.h"
@@ -97,11 +97,12 @@ void baselist::kd_searchagain() {
 void baselist::kd_search() {
   werase(querywin);
   mvwaddstr(querywin,0,0, "Search for ? ");
-  echo();
+  echo(); /* fixme: ncurses documentation or implementation */
   /* fixme: make / RET do `search again' and / DEL to abort */
   if (wgetnstr(querywin,searchstring,sizeof(searchstring)-1) == ERR)
     searchstring[0]= 0;
-  noecho();
+  raise(SIGWINCH); /* fixme: ncurses and xterm arrow keys */
+  noecho(); /* fixme: ncurses */
   if (whatinfo_height) { touchwin(whatinfowin); refreshinfo(); }
   else if (info_height) { touchwin(infopad); refreshinfo(); }
   else if (thisstate_height) redrawthisstate();

+ 4 - 4
dselect/baselist.cc

@@ -21,15 +21,15 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 #include <ctype.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "bindings.h"

+ 4 - 4
dselect/basetop.cc

@@ -21,15 +21,15 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 #include <ctype.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 

+ 4 - 4
dselect/bindings.cc

@@ -21,14 +21,14 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "bindings.h"

+ 4 - 4
dselect/curkeys.cc

@@ -21,13 +21,13 @@
 
 extern "C" {
 #include <ncurses/curses.h>
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "bindings.h"
 
 const keybindings::keyname keybindings::keynames[] = {
-#include "curkeys.inc"
+#include "curkeys.h"
 };

+ 0 - 3
dselect/debugmake

@@ -1,3 +0,0 @@
-#!/bin/sh
-set -x
-make 'XCFLAGS=-g -O0' LDFLAGS=-g 'EXTERNLIBS= -lncurses_g -lefence' "$@"

+ 2 - 0
dselect/dselect.h

@@ -25,6 +25,8 @@
 #define TOTAL_LIST_WIDTH 180
 #define MAX_DISPLAY_INFO 120
 
+#include <signal.h>
+
 struct helpmenuentry {
   char key;
   const struct helpmessage *msg;

+ 0 - 30
dselect/kt.cc

@@ -1,30 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <ncurses/curses.h>
-
-struct kd { int v; const char *n; } kds[]= {
-#include "curkeys.inc"
-};
-
-int main(int argc, char **argv) {
-  int n=0, c, y,x;
-  struct kd *kdp;
-
-  initscr(); cbreak(); noecho(); nonl();
-  keypad(stdscr,TRUE);
-  getmaxyx(stdscr,y,x);
-  mvprintw(5,5,"q to quit; b to beep; (y%d x%d)",y,x);
-
-  for (;;) {
-    refresh();
-    c= getch(); if (c==ERR) { endwin(); perror("err"); exit(1); }
-    for (kdp=kds; kdp->v != -1 && kdp->v != c; kdp++);
-    n++; mvprintw(10 + (n%4),10,"n %10d  keycode %4d  %-10s  F0 + %4d",n,c,
-                  kdp->n, c-KEY_F0);
-    if (c == 'q') break;
-    if (c == 'b') beep();
-  }
-  endwin();
-  return 0;
-}

+ 6 - 6
dselect/main.cc

@@ -33,15 +33,15 @@
 #include <ctype.h>
 #include <assert.h>
 
-#include <ncurses.h>
+#include <curses.h>
 #include <term.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
-#include "version.h"
-#include "myopt.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
+#include <version.h>
+#include <myopt.h>
 }
 #include "dselect.h"
 #include "bindings.h"

+ 5 - 5
dselect/methkeys.cc

@@ -21,14 +21,14 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "bindings.h"
@@ -56,7 +56,7 @@ const keybindings::interpretation methodlist_kinterps[] = {
   { "redraw",          methodlist::kd_redraw,         0,    qa_noquit           },
   { "select-and-quit", methodlist::kd_quit,           0,    qa_quitchecksave    },
   { "abort",           methodlist::kd_abort,          0,    qa_quitnochecksave  },
-  {  0,                0,                                   qa_noquit           }
+  {  0,                0,                             0,    qa_noquit           }
 };
 
 #define C(x) ((x)-'a'+1)

+ 4 - 4
dselect/methlist.cc

@@ -21,14 +21,14 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "bindings.h"

+ 4 - 4
dselect/method.cc

@@ -36,12 +36,12 @@
 #include <fcntl.h>
 #include <sys/file.h>
 
-#include <ncurses.h>
+#include <curses.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "method.h"

+ 12 - 9
dselect/methparse.cc

@@ -33,12 +33,12 @@
 #include <ctype.h>
 #include <assert.h>
 
-#include <ncurses.h>
+#include <curses.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "bindings.h"
@@ -47,12 +47,13 @@ int noptions=0;
 struct option *options=0, *coption=0;
 struct method *methods=0;
 
-static void badmethod(const char *pathname, const char *why) __NORETURN;
-static void badmethod(const char *pathname, const char *why) {
+static void badmethod(const char *pathname, const char *why) NONRETURNING;
+static void badmethod(const char *pathname, const char *why)
+{
   ohshit("syntax error in method options file `%.250s' -- %s", pathname, why);
 }
 
-static void eofmethod(const char *pathname, FILE *f, const char *why) __NORETURN;
+static void eofmethod(const char *pathname, FILE *f, const char *why) NONRETURNING;
 static void eofmethod(const char *pathname, FILE *f, const char *why) {
   if (ferror(f)) ohshite("error reading options file `%.250s'",pathname);
   badmethod(pathname,why);
@@ -98,6 +99,8 @@ void readmethods(const char *pathbase, option **optionspp, int *nread) {
     if (methodlen > IMETHODMAXLEN)
       ohshit("method `%.250s' has name that is too long (%d > %d characters)",
              dent->d_name, methodlen, IMETHODMAXLEN);
+    /* Check if there is a localized version of this method */
+    
     strcpy(pathmeth, dent->d_name);
     strcpy(pathmeth+methodlen, "/");
     pathinmeth= pathmeth+methodlen+1;
@@ -195,12 +198,12 @@ void readmethods(const char *pathbase, option **optionspp, int *nread) {
       
       if (debug) fprintf(debug," readmethods(`%s',...) new option"
                          " index=`%s' name=`%s' summary=`%.20s'"
-                         " strlen(description=%s)=%d"
+                         " strlen(description=%s)=%ld"
                          " method name=`%s' path=`%s' pathinmeth=`%s'\n",
                          pathbase,
                          opt->index, opt->name, opt->summary,
                          opt->description ? "`...'" : "null",
-                         opt->description ? strlen(opt->description) : -1,
+                         opt->description ? (long) strlen(opt->description) : -1,
                          opt->meth->name, opt->meth->path, opt->meth->pathinmeth);
       for (optinsert= optionspp;
            *optinsert && strcmp(opt->index,(*optinsert)->index) > 0;

+ 6 - 5
dselect/mkcurkeys.pl

@@ -19,13 +19,14 @@
 # License along with this; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-@ARGV == 2 || die;
+$#ARGV == 1 || die ("usage: mkcurkeys.pl <filename> <curses.h>");
 
 open(OV,"<$ARGV[0]") || die $!;
 while (<OV>) {
-    m/^#/ && next;
-    m/\S/ || next;
-    m/^(\w+)\s+(\S.*\S)\s+$/ || die;
+    chomp;
+    /^#/ && next;		# skip comments
+    /\S/ || next;		# ignore blank lines
+    /^(\w+)\s+(\S.*\S)\s*$/ || die ("cannot parse line:\n$_\n");
     $over{$1}= $2;
     $base{$1}= '';
 }
@@ -60,7 +61,7 @@ close(NCH);
 printf(<<'END') || die $!;
 /*
  * WARNING - THIS FILE IS GENERATED AUTOMATICALLY - DO NOT EDIT
- * It is generated by mkcurkeys.pl from <ncurses/curses.h>
+ * It is generated by mkcurkeys.pl from <curses.h>
  * and keyoverride.  If you want to override things try adding
  * them to keyoverride.
  */

+ 1 - 1
dselect/mkhelpmsgs.pl

@@ -2,7 +2,7 @@
 
 $maxnlines= 22;
 
-open(SRC,"helpmsgs.src") || die $!;
+open(SRC,$ARGV[0]) || die $!;
 open(NC,">helpmsgs.cc.new") || die $!;
 open(NH,">helpmsgs.h.new") || die $!;
 

+ 4 - 4
dselect/pkgcmds.cc

@@ -21,14 +21,14 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "pkglist.h"

+ 21 - 21
dselect/pkgdepcon.cc

@@ -21,13 +21,13 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "pkglist.h"
@@ -86,7 +86,7 @@ int packagelist::resolvesuggest() {
     int index;
     for (index=0; index<nitems; index++) {
       if (!table[index]->pkg->name) continue;
-      if (depdebug)
+      if (depdebug && debug)
         fprintf(debug,"packagelist[%p]::resolvesuggest() loop[%i] %s / %d\n",
                 this, index, table[index]->pkg->name, changemade);
       dependency *depends;
@@ -102,7 +102,7 @@ int packagelist::resolvesuggest() {
         if (depends->type != dep_provides) continue;
         changemade= checkdependers(depends->list->ed,changemade);
       }
-      if (depdebug)
+      if (depdebug && debug)
         fprintf(debug,"packagelist[%p]::resolvesuggest() loop[%i] %s / -> %d\n",
                 this, index, table[index]->pkg->name, changemade);
     }
@@ -119,7 +119,7 @@ static int dep_update_best_to_change_stop(perpackagestate *& best, pkginfo *tryt
   // There's no point trying to select a pure virtual package.
   if (!trythis->clientdata) return 0;
   
-  if (depdebug)
+  if (depdebug && debug)
     fprintf(debug,"update_best_to_change(best=%s{%d}, test=%s{%d});\n",
             best ? best->pkg->name : "", best ? (int)best->spriority : -1,
             trythis->name, trythis->clientdata->spriority);
@@ -150,7 +150,7 @@ static int dep_update_best_to_change_stop(perpackagestate *& best, pkginfo *tryt
   return 0;
   
  yes:
-  if (depdebug) fprintf(debug,"update_best_to_change(); yes\n");
+  if (depdebug && debug) fprintf(debug,"update_best_to_change(); yes\n");
 
   best=trythis->clientdata; return 0;
 }
@@ -167,7 +167,7 @@ int packagelist::deselect_one_of(pkginfo *per, pkginfo *ped, dependency *display
   er= per->clientdata;  // these can be changed by add
   ed= ped->clientdata;
   
-  if (depdebug)
+  if (depdebug && debug)
     fprintf(debug,"packagelist[%p]::deselect_one_of(): er %s{%d} ed %s{%d} [%p]\n",
             this, er->pkg->name, er->spriority, ed->pkg->name, ed->spriority, display);
   
@@ -184,7 +184,7 @@ int packagelist::deselect_one_of(pkginfo *per, pkginfo *ped, dependency *display
   
   else best= ed;                                      // ... failing that, the second
 
-  if (depdebug)
+  if (depdebug && debug)
     fprintf(debug,"packagelist[%p]::deselect_one_of(): best %s{%d}\n",
             this, best->pkg->name, best->spriority);
 
@@ -203,7 +203,7 @@ int packagelist::resolvedepcon(dependency *depends) {
   deppossi *possi, *provider;
   int r, foundany;
 
-  if (depdebug) {
+  if (depdebug && debug) {
     fprintf(debug,"packagelist[%p]::resolvedepcon([%p] %s --%s-->",
             this,depends,depends->up->name,relatestrings[depends->type]);
     for (possi=depends->list; possi; possi=possi->next)
@@ -237,7 +237,7 @@ int packagelist::resolvedepcon(dependency *depends) {
     for (possi= depends->list;
          possi && !deppossatisfied(possi,&fixbyupgrade);
          possi= possi->next);
-    if (depdebug)
+    if (depdebug && debug)
       fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): depends found %s\n",
               this,depends,
               possi ? possi->ed->name : "[none]");
@@ -249,7 +249,7 @@ int packagelist::resolvedepcon(dependency *depends) {
     if (depends->type == dep_suggests) return r;
 
     if (fixbyupgrade) {
-      if (depdebug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): "
+      if (depdebug && debug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): "
                             "fixbyupgrade %s\n", this,depends,fixbyupgrade->pkg->name);
       best= fixbyupgrade;
     } else {
@@ -270,12 +270,12 @@ int packagelist::resolvedepcon(dependency *depends) {
         if (!foundany) addunavailable(possi);
       }
       if (!best) {
-        if (depdebug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): "
+        if (depdebug && debug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): "
                               "mustdeselect nobest\n", this,depends);
         return r;
       }
     }
-    if (depdebug)
+    if (depdebug && debug)
       fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): select best=%s{%d}\n",
               this,depends, best->pkg->name, best->spriority);
     if (best->spriority >= sp_selecting) return r;
@@ -285,7 +285,7 @@ int packagelist::resolvedepcon(dependency *depends) {
     
   mustdeselect:
     best= depends->up->clientdata;
-    if (depdebug)
+    if (depdebug && debug)
       fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): mustdeselect best=%s{%d}\n",
               this,depends, best->pkg->name, best->spriority);
 
@@ -298,20 +298,20 @@ int packagelist::resolvedepcon(dependency *depends) {
     
   case dep_conflicts:
 
-    if (depdebug)
+    if (depdebug && debug)
       fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict\n",
               this,depends);
     
     if (would_like_to_install(depends->up->clientdata->selected,depends->up) == 0)
       return 0;
 
-    if (depdebug)
+    if (depdebug && debug)
       fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict installing 1\n",
               this,depends);
 
     if (!deppossatisfied(depends->list,0)) return 0;
 
-    if (depdebug)
+    if (depdebug && debug)
       fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict satisfied - ouch\n",
               this,depends);
 
@@ -326,7 +326,7 @@ int packagelist::resolvedepcon(dependency *depends) {
       if (provider->up->up == depends->up) continue; // conflicts & provides same thing
       r= deselect_one_of(depends->up, provider->up->up, depends);  if (r) return r;
     }
-    if (depdebug)
+    if (depdebug && debug)
       fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): no desel\n", this,depends);
     return 0;
     
@@ -365,7 +365,7 @@ int packagelist::deppossatisfied(deppossi *possi, perpackagestate **fixbyupgrade
       return 0;
     }
   }
-  if (possi->verrel != deppossi::dvr_none) return 0;
+  if (possi->verrel != dvr_none) return 0;
   deppossi *provider;
   if (possi->ed->installed.valid) {
     for (provider= possi->ed->installed.depended;

+ 4 - 4
dselect/pkgdisplay.cc

@@ -21,14 +21,14 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <signal.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "pkglist.h"

+ 4 - 4
dselect/pkginfo.cc

@@ -21,14 +21,14 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ncurses.h>
+#include <curses.h>
 #include <assert.h>
 #include <ctype.h>
 
 extern "C" {
-#include "config.h"
-#include "dpkg.h"
-#include "dpkg-db.h"
+#include <config.h>
+#include <dpkg.h>
+#include <dpkg-db.h>
 }
 #include "dselect.h"
 #include "bindings.h"

+ 0 - 0
dselect/pkgkeys.cc


部分文件因为文件数量过多而无法显示