diff -ruN debconf/Debconf/Client/ConfModule.pm debconf.new/Debconf/Client/ConfModule.pm --- debconf/Debconf/Client/ConfModule.pm 2001-11-17 13:36:37.000000000 -0500 +++ debconf.new/Debconf/Client/ConfModule.pm 2003-03-14 13:39:23.000000000 -0500 @@ -68,14 +68,14 @@ =cut sub import { - exec "/usr/share/debconf/frontend", $0, @ARGV + exec "@FINKPREFIX@/share/debconf/frontend", $0, @ARGV unless $ENV{DEBIAN_HAS_FRONTEND}; # Make the Exporter still work. Debconf::Client::ConfModule->export_to_level(1, @_); # A truely gross hack. This only is needed if - # /usr/share/debconf/confmodule is loaded, and then this + # @FINKPREFIX@/share/debconf/confmodule is loaded, and then this # perl module is used. In that case, this module needs to write # to fd #3, rather than stdout. See changelog 0.3.74. if (exists $ENV{DEBCONF_REDIR} && $ENV{DEBCONF_REDIR}) { @@ -134,8 +134,8 @@ =head1 SEE ALSO The debconf specification -(/usr/share/doc/debian-policy/debconf_specification.html.gz), -and tutorial (/usr/share/doc/debconf-doc/tutorial.html). +(@FINKPREFIX@/share/doc/debian-policy/debconf_specification.html.gz), +and tutorial (@FINKPREFIX@/share/doc/debconf-doc/tutorial.html). =head1 AUTHOR diff -ruN debconf/Debconf/Config.pm debconf.new/Debconf/Config.pm --- debconf/Debconf/Config.pm 2001-08-28 19:03:08.000000000 -0400 +++ debconf.new/Debconf/Config.pm 2003-03-14 13:39:23.000000000 -0500 @@ -16,8 +16,8 @@ showold admin_email log debug); our $config=fields::new('Debconf::Config'); -our @config_files=("$ENV{HOME}/.debconfrc", "/etc/debconf.conf", - "/usr/share/debconf/debconf.conf"); +our @config_files=("$ENV{HOME}/.debconfrc", "@FINKPREFIX@/etc/debconf.conf", + "@FINKPREFIX@/share/debconf/debconf.conf"); =head1 DESCRIPTION diff -ruN debconf/Debconf/DbDriver/File.pm debconf.new/Debconf/DbDriver/File.pm --- debconf/Debconf/DbDriver/File.pm 2001-12-09 13:21:38.000000000 -0500 +++ debconf.new/Debconf/DbDriver/File.pm 2003-03-17 22:41:59.000000000 -0500 @@ -156,8 +156,8 @@ $fh->autoflush(1); # Ensure it is synced, because I've had problems with disk caching # resulting in truncated files. - $fh->sync; - +# $fh->sync; + system("sync"); # Now rename the old file to -old (if doing backups), and put -new # in its place. if (-e $this->{filename} && $this->{backup}) { diff -ruN debconf/Debconf/FrontEnd/Dialog.pm debconf.new/Debconf/FrontEnd/Dialog.pm --- debconf/Debconf/FrontEnd/Dialog.pm 2002-02-08 10:46:38.000000000 -0500 +++ debconf.new/Debconf/FrontEnd/Dialog.pm 2003-03-14 13:39:23.000000000 -0500 @@ -62,7 +62,7 @@ $this->capb('backup'); # Autodetect if whiptail or dialog is available and set magic numbers. - if (-x "/usr/bin/whiptail" && ! defined $ENV{FORCE_DIALOG} && + if (-x "@FINKPREFIX@/bin/whiptail" && ! defined $ENV{FORCE_DIALOG} && ! defined $ENV{FORCE_GDIALOG}) { $this->program('whiptail'); $this->dashsep('--'); @@ -72,7 +72,7 @@ $this->titlespacer(10); $this->columnspacer(3); } - elsif (-x "/usr/bin/dialog" && ! defined $ENV{FORCE_GDIALOG}) { + elsif (-x "@FINKPREFIX@/bin/dialog" && ! defined $ENV{FORCE_GDIALOG}) { $this->program('dialog'); $this->dashsep(''); # dialog does not need (or support) # double-dash separation @@ -83,7 +83,7 @@ $this->columnspacer(2); } # Disabled until it supports --passwordbox and --nocancel -# elsif (-x "/usr/bin/gdialog") { +# elsif (-x "@FINKPREFIX@/bin/gdialog") { # $this->program}(gdialog); # $this->borderwidth(5); # $this->borderheight(6); diff -ruN debconf/Makefile debconf.new/Makefile --- debconf/Makefile 2001-12-01 22:23:15.000000000 -0500 +++ debconf.new/Makefile 2003-03-14 13:39:23.000000000 -0500 @@ -13,43 +13,43 @@ # Anything that goes in the debconf-utils package. install-utils: - install -d $(prefix)/usr/bin + install -d $(prefix)/bin find . -maxdepth 1 -perm +100 -type f -name 'debconf-*' | grep -v debconf-show | \ - xargs -i install {} $(prefix)/usr/bin + xargs -i install {} $(prefix)/bin # Install all else. install-rest: $(MAKE) -C po install install -d $(prefix)/etc \ $(prefix)/var/cache/debconf \ - $(prefix)/usr/share/debconf \ - $(prefix)/usr/share/pixmaps + $(prefix)/share/debconf \ + $(prefix)/share/pixmaps install -m 0644 debconf.conf $(prefix)/etc/ - install -m 0644 debian-logo.xpm $(prefix)/usr/share/pixmaps/ + install -m 0644 debian-logo.xpm $(prefix)/share/pixmaps/ # This one is the ultimate backup copy. - grep -v '^#' debconf.conf > $(prefix)/usr/share/debconf/debconf.conf + grep -v '^#' debconf.conf > $(prefix)/share/debconf/debconf.conf # Make module directories. find Debconf -type d |grep -v CVS | \ - xargs -i install -d $(prefix)/usr/share/perl5/{} + xargs -i install -d $(prefix)/lib/perl5/{} # Install modules. find Debconf -type f -name '*.pm' |grep -v CVS | \ - xargs -i install -m 0644 {} $(prefix)/usr/share/perl5/{} + xargs -i install -m 0644 {} $(prefix)/lib/perl5/{} # Special case for back-compatability. - install -d $(prefix)/usr/share/perl5/Debian/DebConf/Client + install -d $(prefix)/lib/perl5/Debian/DebConf/Client cp Debconf/Client/ConfModule.stub \ - $(prefix)/usr/share/perl5/Debian/DebConf/Client/ConfModule.pm + $(prefix)/lib/perl5/Debian/DebConf/Client/ConfModule.pm # Other libs and helper stuff. - install -m 0644 confmodule.sh confmodule $(prefix)/usr/share/debconf/ - install frontend $(prefix)/usr/share/debconf/ - install -m 0755 transition_db.pl fix_db.pl $(prefix)/usr/share/debconf/ + install -m 0644 confmodule.sh confmodule $(prefix)/share/debconf/ + install frontend $(prefix)/share/debconf/ + install -m 0755 transition_db.pl fix_db.pl $(prefix)/share/debconf/ # Install essential programs. - install -d $(prefix)/usr/sbin + install -d $(prefix)/sbin find . -maxdepth 1 -perm +100 -type f -name 'dpkg-*' -or -name debconf-show | \ - xargs -i install {} $(prefix)/usr/sbin + xargs -i install {} $(prefix)/sbin # Now strip all pod documentation from all .pm files and scripts. - find $(prefix)/usr/share/perl5/ $(prefix)/usr/sbin \ - $(prefix)/usr/share/debconf/frontend \ - $(prefix)/usr/share/debconf/*.pl \ + find $(prefix)/lib/perl5/ $(prefix)/sbin \ + $(prefix)/share/debconf/frontend \ + $(prefix)/share/debconf/*.pl \ -name '*.pm' -or -name 'dpkg-*' | \ grep -v Client/ConfModule | xargs perl -i.bak -ne ' \ print $$_."# This file was preprocessed, do not edit!\n" \ diff -ruN debconf/confmodule debconf.new/confmodule --- debconf/confmodule 2001-05-14 18:42:40.000000000 -0400 +++ debconf.new/confmodule 2003-03-14 13:39:23.000000000 -0500 @@ -10,7 +10,7 @@ # Ok, this is pretty crazy. Since there is no FrontEnd, this # program execs a FrontEnd. It will then run a new copy of $0 that # can talk to it. - exec /usr/share/debconf/frontend $0 "$@" + exec @FINKPREFIX@/share/debconf/frontend $0 "$@" fi # Only do this once. diff -ruN debconf/confmodule.sh debconf.new/confmodule.sh --- debconf/confmodule.sh 2001-01-09 19:56:01.000000000 -0500 +++ debconf.new/confmodule.sh 2003-03-14 13:39:23.000000000 -0500 @@ -12,7 +12,7 @@ # Ok, this is pretty crazy. Since there is no FrontEnd, this # program execs a FrontEnd. It will then run a new copy of $0 that # can talk to it. - exec /usr/share/debconf/frontend $0 $* + exec @FINKPREFIX@/share/debconf/frontend $0 $* fi # Only do this once. diff -ruN debconf/debconf.conf debconf.new/debconf.conf --- debconf/debconf.conf 2002-03-26 21:11:44.000000000 -0500 +++ debconf.new/debconf.conf 2003-03-14 13:39:23.000000000 -0500 @@ -15,14 +15,14 @@ # text file. Name: configdb Driver: File -Filename: /var/cache/debconf/config.dat +Filename: @FINKPREFIX@/var/cache/debconf/config.dat # Set up the templatedb database, which is likewise a single flat text file # by default. Name: templatedb Driver: File Mode: 644 -Filename: /var/cache/debconf/templates.dat +Filename: @FINKPREFIX@/var/cache/debconf/templates.dat # Well that was pretty straightforward, and it will be enough for most # people's needs, but debconf's database drivers can be used to do much @@ -35,7 +35,7 @@ # fails to use it it will not abort. #Name: remotedb #Driver: DirTree -#Directory: /mnt/otherhost/var/cache/debconf/config +#Directory: /mnt/otherhost@FINKPREFIX@/var/cache/debconf/config #Readonly: true #Required: false # diff -ruN debconf/debian/apt.conf debconf.new/debian/apt.conf --- debconf/debian/apt.conf 2001-02-22 02:39:37.000000000 -0500 +++ debconf.new/debian/apt.conf 2003-03-14 13:39:24.000000000 -0500 @@ -1,3 +1,3 @@ // Pre-configure all packages with debconf before they are installed. // If you don't like it, comment it out. -DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";}; +DPkg::Pre-Install-Pkgs {"@FINKPREFIX@/sbin/dpkg-preconfigure --apt || true";}; diff -ruN debconf/debian/changelog debconf.new/debian/changelog --- debconf/debian/changelog 2002-03-28 14:52:33.000000000 -0500 +++ debconf.new/debian/changelog 2003-03-14 13:39:24.000000000 -0500 @@ -1068,7 +1068,7 @@ cdebconf versions. The ones that themselves - used /etc/debconf.conf + used @FINKPREFIX@/debconf.conf as their config file. * And I had to write @@ -2596,7 +2596,7 @@ debconf (0.2.84) unstable; urgency=low - * Added code to postinst to delete long-obsolete /etc/debconf.cfg + * Added code to postinst to delete long-obsolete @FINKPREFIX@/debconf.cfg -- Joey Hess Tue, 8 Feb 2000 14:41:13 -0800 @@ -3867,7 +3867,7 @@ debconf (0.1.26) unstable; urgency=low * Added a config script and templates for debconf itself. It uses - them to configure what frontend to use, etc. /etc/debconf.cfg is no + them to configure what frontend to use, etc. @FINKPREFIX@/debconf.cfg is no more. * Modified Config.pm so it contains functions that return values, not just hard coded values. The functions now try to pull values out of @@ -3978,7 +3978,7 @@ debconf (0.1.16) unstable; urgency=low * Got rid of the DEBIAN_FRONTEND environment variable entirely. Instead, - /etc/debconf.cfg has a variable in it to specify the default frontend + @FINKPREFIX@/debconf.cfg has a variable in it to specify the default frontend to use. * Also added a question priority variable to the config file. * Oh yeah, the big change is I fixed the postinst hang bug. Or rather, @@ -4019,7 +4019,7 @@ debconf (0.1.13) unstable; urgency=low * Gtk::FrontEnd now has the xpm it uses inlined into the file. - * /etc/debconf.cfg now holds configurable debconf settings. Config.pm is + * @FINKPREFIX@/debconf.cfg now holds configurable debconf settings. Config.pm is just a link to it now. -- Joey Hess Thu, 9 Sep 1999 18:54:53 -0700 @@ -4149,7 +4149,7 @@ * Dialog frontend only clears the screen just before displaying a non-gdialog dialog box. * Depend on the version of apt that really works with debconf. - * A postinst and postrm modify /etc/apt/apt.conf to make apt use + * A postinst and postrm modify @FINKPREFIX@/apt/apt.conf to make apt use dpkg-preconfig to configure packages. (The file's not actually part of apt, so this is not too evil). diff -ruN debconf/debian/config debconf.new/debian/config --- debconf/debian/config 2001-08-28 19:03:09.000000000 -0400 +++ debconf.new/debian/config 2003-03-16 02:36:34.000000000 -0500 @@ -5,11 +5,11 @@ # file doesn't exist yet, this package is being preconfiged, and # we might as well just exit and wait until the postinst # runs the config script. -if [ ! -e /usr/share/debconf/confmodule ]; then +if [ ! -e @FINKPREFIX@/share/debconf/confmodule ]; then exit fi -. /usr/share/debconf/confmodule +. @FINKPREFIX@/share/debconf/confmodule # Establish the preliminaries. db_version 2.0 diff -ruN debconf/debian/postinst debconf.new/debian/postinst --- debconf/debian/postinst 2002-01-11 13:58:57.000000000 -0500 +++ debconf.new/debian/postinst 2003-03-14 13:39:24.000000000 -0500 @@ -2,38 +2,38 @@ # This directory unexpectedly lingered around for two people, still # containing .pm files that broke debconf upgrades. I don't know why. -if [ -d /usr/lib/perl5/Debconf ]; then - rm -rf /usr/lib/perl5/Debconf +if [ -d @FINKPREFIX@/var/lib/perl5/Debconf ]; then + rm -rf @FINKPREFIX@/var/lib/perl5/Debconf fi # Transition from old database format before debconf starts up. if [ -z "$DEBIAN_HAS_FRONTEND" -a "$1" = configure ] && \ dpkg --compare-versions "$2" lt 0.9.00; then - if [ -e /var/lib/debconf/config.db -o -e /var/lib/debconf/templates.db ]; then - /usr/share/debconf/transition_db.pl + if [ -e @FINKPREFIX@/var/lib/debconf/config.db -o -e @FINKPREFIX@/var/lib/debconf/templates.db ]; then + @FINKPREFIX@/share/debconf/transition_db.pl fi # This package used to add itself to apt.conf. That could result in # a zero-byte file, since it no longer does. Detect that and remove # the file. - if [ ! -s /etc/apt/apt.conf ]; then - rm -f /etc/apt/apt.conf + if [ ! -s @FINKPREFIX@/etc/apt/apt.conf ]; then + rm -f @FINKPREFIX@/etc/apt/apt.conf fi fi # Fix up broken db's before debconf starts up. if [ -z "$DEBIAN_HAS_FRONTEND" -a "$1" = configure ] && \ dpkg --compare-versions "$2" lt 1.0.25; then - /usr/share/debconf/fix_db.pl + @FINKPREFIX@/share/debconf/fix_db.pl fi -. /usr/share/debconf/confmodule +. @FINKPREFIX@/share/debconf/confmodule # Remove old debconf database, and associated cruft in /var/lib/debconf. # In fact, the whole directory can go! Earlier versions of debconf in the # 0.9.x series kept it just in case, so make sure to delete it on upgrade # from any of those versions, or even older versions. if [ "$1" = configure ] && dpkg --compare-versions "$2" lt 0.9.50; then - rm -rf /var/lib/debconf + rm -rf @FINKPREFIX@/var/lib/debconf fi # Kill db cruft. @@ -52,6 +52,6 @@ fi # This file is long obsolete, and was a conffile, so wasn't auto-removed. -rm -f /etc/debconf.cfg +rm -f @FINKPREFIX@/etc/debconf.cfg #DEBHELPER# diff -ruN debconf/debian/preinst debconf.new/debian/preinst --- debconf/debian/preinst 2001-03-25 17:51:43.000000000 -0500 +++ debconf.new/debian/preinst 2003-03-14 13:39:24.000000000 -0500 @@ -2,6 +2,6 @@ #DEBHELPER# # Move conffile. -if [ -e /etc/apt/apt.conf.d/debconf ]; then - mv -f /etc/apt/apt.conf.d/debconf /etc/apt/apt.conf.d/70debconf +if [ -e @FINKPREFIX@/etc/apt/apt.conf.d/debconf ]; then + mv -f @FINKPREFIX@/etc/apt/apt.conf.d/debconf @FINKPREFIX@/etc/apt/apt.conf.d/70debconf fi diff -ruN debconf/debian/templates debconf.new/debian/templates --- debconf/debian/templates 2002-01-16 13:45:33.000000000 -0500 +++ debconf.new/debian/templates 2003-03-14 15:29:41.000000000 -0500 @@ -32,8 +32,8 @@ For example, this question is of medium priority, and if your priority were already 'high' or 'critical', you wouldn't see this question. . - If you are new to the Debian GNU/Linux system choose 'critical' now, - so you only see the most important questions. + If you are new to the Fink Packaging system choose 'medium' now, + so you only see the more important questions. Template: debconf/showold Type: boolean diff -ruN debconf/doc/Makefile debconf.new/doc/Makefile --- debconf/doc/Makefile 2001-12-01 22:23:15.000000000 -0500 +++ debconf.new/doc/Makefile 2003-03-17 22:31:18.000000000 -0500 @@ -19,8 +19,8 @@ xargs -i sh -c "cd .. ; $(pod2man) --section=8 {} > doc/man/gen/{}.8" %.html: %.xml html.dsl - jade -V nochunks -t sgml -d html.dsl \ - /usr/lib/sgml/declaration/xml.dcl $< > $@ + openjade -V nochunks -t sgml -d html.dsl \ + @FINKPREFIX@/share/sgml/openjade-1.3.2/pubtext/xml.dcl $< > $@ -tidy -i -m -f /dev/null $@ %.txt: %.html diff -ruN debconf/doc/README.LDAP debconf.new/doc/README.LDAP --- debconf/doc/README.LDAP 2002-02-19 12:09:50.000000000 -0500 +++ debconf.new/doc/README.LDAP 2003-03-14 13:39:24.000000000 -0500 @@ -12,7 +12,7 @@ To get this to work, you need to do the following: -1) Get /usr/share/doc/debconf-doc/debconf.schema into your DS. +1) Get @FINKPREFIX@/share/doc/debconf-doc/debconf.schema into your DS. 2) Configure debconf to use the LDAP database in some fashion. The debconf.conf(5) man page has documentation and examples. diff -ruN debconf/doc/TODO debconf.new/doc/TODO --- debconf/doc/TODO 2002-02-22 16:56:49.000000000 -0500 +++ debconf.new/doc/TODO 2003-03-14 13:39:24.000000000 -0500 @@ -5,7 +5,7 @@ usable from bug even. * The ConfModule should not return the backup return code, ever, if the confmodule it talks to has not indicated it has that capability. -* Get rid of the horrendous fd #3 hack in /usr/share/debconf/confmodule. +* Get rid of the horrendous fd #3 hack in @FINKPREFIX@/share/debconf/confmodule. Unfortuantly, many packages probably depend on the hack. Options are to find all such packages (by examining/auditing all packages that use debconf), to come up with a new shell interface that is so much cooler diff -ruN debconf/doc/man/confmodule.3 debconf.new/doc/man/confmodule.3 --- debconf/doc/man/confmodule.3 2002-02-07 16:32:39.000000000 -0500 +++ debconf.new/doc/man/confmodule.3 2003-03-14 13:39:24.000000000 -0500 @@ -3,7 +3,7 @@ confmodule \- communicate with Debian configuration system FrontEnd. .SH SYNOPSIS #!/bin/sh -e - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule db_version 2.0 db_capb 'backup' CAPB=$RET diff -ruN debconf/doc/man/confmodule.pt_BR.3 debconf.new/doc/man/confmodule.pt_BR.3 --- debconf/doc/man/confmodule.pt_BR.3 2001-12-01 22:23:15.000000000 -0500 +++ debconf.new/doc/man/confmodule.pt_BR.3 2003-03-14 13:39:24.000000000 -0500 @@ -3,7 +3,7 @@ confmodule \- comunica-se com o FronEnd do sistema de configuração Debian. .SH RESUMO #!/bin/sh -e - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule db_version 2.0 db_capb 'backup' CAPB=$RET diff -ruN debconf/doc/man/debconf-devel.8 debconf.new/doc/man/debconf-devel.8 --- debconf/doc/man/debconf-devel.8 2002-02-11 15:21:16.000000000 -0500 +++ debconf.new/doc/man/debconf-devel.8 2003-03-14 13:39:24.000000000 -0500 @@ -1,3 +1,4 @@ + .TH DEBCONF-DEVEL 8 .SH NAME debconf \- developers guide @@ -95,7 +96,7 @@ This is another question, of boolean type. .P For some real-life examples of templates files, see -/var/lib/dpkg/info/debconf.templates, and other .templates files in that +@FINKPREFIX@/var/lib/dpkg/info/debconf.templates, and other .templates files in that directory. .P Let's look at each of the fields in turn.. @@ -368,7 +369,7 @@ to relieve this minor drudgery. .P For shell programming, there is the -/usr/share/debconf/confmodule library, which you can source at the top of +@FINKPREFIX@/share/debconf/confmodule library, which you can source at the top of a shell script, and talk to debconf in a fairly natural way, using lower-case versions of the debconf protocol commands, that are prefixed with "db_" (ie, "db_input" and "db_go"). For details, see @@ -378,13 +379,13 @@ .BR Debconf::Client::ConfModule(3) perl module. .P -The rest of this manual will use the /usr/share/debconf/confmodule library +The rest of this manual will use the @FINKPREFIX@/share/debconf/confmodule library in example shell scripts. Here is an example config script using that library, that just asks a question: .P #!/bin/sh set -e - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule db_set mypackage/reboot-now false db_input high mypackage/reboot-now || true db_go || true @@ -400,7 +401,7 @@ .P #!/bin/sh set -e - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule db_get mypackage/reboot-now if [ "$RET" = true ]; then shutdown -r now @@ -418,7 +419,7 @@ ask questions using debconf, so that pre-configuration will work. .TP .B * -Always source /usr/share/debconf/confmodule at the top of your postinst, +Always source @FINKPREFIX@/share/debconf/confmodule at the top of your postinst, even if you won't be running any db_* commands in it. This is required to make sure the config script gets a change to run (see HACKS for details). @@ -450,14 +451,14 @@ scripts. .P Note that if your package's sole use of debconf is in the postrm, you should -make your package's postinst sources /usr/share/debconf/confmodule, to give +make your package's postinst sources @FINKPREFIX@/share/debconf/confmodule, to give debconf a chance to load up your templates file into its database. Then the templates will be available when your package is being pourged. .P You can also use debconf in other, stand alone programs. The issue to watch out for here is that debconf is not intended to be, and must not be used as a registry. This is unix after all, and programs are configured by files in -/etc, not by some nebulous debconf database (that is only a cache anyway +@FINKPREFIX@/etc, not by some nebulous debconf database (that is only a cache anyway and might get blown away). So think long and hard before using debconf in a standalone program. .P @@ -553,7 +554,7 @@ .P For details about setting this up, see .BR debconf.conf (5) , -and note that /etc/debconf.conf makes a good template for a personal +and note that @FINKPREFIX@/etc/debconf.conf makes a good template for a personal ~/.debconfrc file. .RE .SH "ADVANCED PROGRAMING WITH DEBCONF" @@ -576,9 +577,9 @@ Your config script will look something like this: .P #!/bin/sh - CONFIGFILE=/etc/foo.conf + CONFIGFILE=@FINKPREFIX@/etc/foo.conf set -e - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule # Load config file, if it exists. if [ -e $CONFIGFILE ]; then @@ -598,9 +599,9 @@ And the postinst will look something like this: .P #!/bin/sh - CONFIGFILE=/etc/foo.conf + CONFIGFILE=@FINKPREFIX@/etc/foo.conf set -e - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule # Generate config file, if it doesn't exist. # An alternative is to copy in a template @@ -654,7 +655,7 @@ .P #!/bin/sh set -e - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule db_capb backup STATE=1 @@ -780,8 +781,8 @@ prerm scripts of all related packages (replacing with the package name): .P - if [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule + if [ -e @FINKPREFIX@/share/debconf/confmodule ]; then + . @FINKPREFIX@/share/debconf/confmodule # I no longer claim this question. db_unregister shared/window-manager @@ -817,7 +818,7 @@ or other program that uses it starts up. After all, they expect to be able to talk to debconf right away. The way this is accomplished for now is that when such a script loads a debconf library (like -/usr/share/debconf/confmodule), and debconf is not already running, it is +@FINKPREFIX@/share/debconf/confmodule), and debconf is not already running, it is started up, and a new copy of the script is re-execed. The only noticeable result is that you need to put the line that loads a debconf library at the very top of the script, or weird things will happen. We hope to address @@ -828,13 +829,13 @@ and when it loads them. When the config, preinst, and postinst scripts invoke debconf, it will automatically figure out where the templates file is, and load it. Standalone programs that use debconf will cause debconf to -look for templates files in /usr/share/debconf/progname.templates. And if a +look for templates files in @FINKPREFIX@/share/debconf/progname.templates. And if a postrm wants to use debconf at purge time, the templates won't be available unless debconf had a chance to load them in its postinst. This is messy, but rather unavoidable. In the future some of these programs may be able to use debconf-loadtemplate by hand though. .P -Finally, /usr/share/debconf/confmodule's historic behavior of playing with +Finally, @FINKPREFIX@/share/debconf/confmodule's historic behavior of playing with file descriptions and setting up a fd #3 that talks to debconf, can cause all sorts of trouble when a postinst runs a daemon, since the daemon ends up talking to debconf, and debconf can't figure out when the script @@ -846,13 +847,13 @@ is the debconf user's guide. .P The debconf specification in debian policy is the canonical definition of -the debconf protocol. /usr/doc/debian-policy/debconf_specification.txt.gz +the debconf protocol. @FINKPREFIX@/doc/debian-policy/debconf_specification.txt.gz .P .BR debconf.conf (5) has much useful information, including some info about the backend database. .P The debconf tutorial walks you through converting an existing package to -use debconf. /usr/doc/debconf-doc/tutorial.txt.gz +use debconf. @FINKPREFIX@/doc/debconf-doc/tutorial.txt.gz .SH AUTHOR Joey Hess diff -ruN debconf/doc/man/debconf.8 debconf.new/doc/man/debconf.8 --- debconf/doc/man/debconf.8 2002-03-07 21:27:12.000000000 -0500 +++ debconf.new/doc/man/debconf.8 2003-03-14 13:39:24.000000000 -0500 @@ -22,7 +22,7 @@ If you use apt (version 0.5 or above), and you have apt-utils installed, each package apt installs will be automatically preconfigured. This is controlled via -.I /etc/apt/apt.conf.d/70debconf +.I @FINKPREFIX@/etc/apt/apt.conf.d/70debconf .P Sometimes you might want to preconfigure a package by hand, when you're not installing it with apt. You can use @@ -163,14 +163,14 @@ .SH Backend Database Debconf uses a rather flexible and potentially complicated backend database for storing data such as the answers to questions. The file -.B /etc/debconf.conf +.B @FINKPREFIX@/etc/debconf.conf is used to configure this database. If you need to set up something complicated, like make debconf read a remote database to get defaults, with local overrides, read the .B debconf.conf (5) man page for all the gory details. Generally, the backend database is located in -.B /var/cache/debconf/ +.B @FINKPREFIX@/var/cache/debconf/ .SH Developing for Debconf Package developers and others who want to develop packages that use debconf should read diff -ruN debconf/doc/man/debconf.conf.5 debconf.new/doc/man/debconf.conf.5 --- debconf/doc/man/debconf.conf.5 2002-02-19 12:09:24.000000000 -0500 +++ debconf.new/doc/man/debconf.conf.5 2003-03-14 13:39:24.000000000 -0500 @@ -2,7 +2,7 @@ .SH NAME debconf.conf \- debconf configuration file .SH DESCRIPTION -Debconf is a configuration system for Debian packages. /etc/debconf.conf +Debconf is a configuration system for Debian packages. @FINKPREFIX@/etc/debconf.conf and ~/.debconfrc are configuration files debconf uses to determine which databases it should use. These databases are used for storing two types of information; dynamic config data the user enters into it, and static @@ -17,12 +17,12 @@ Name: configdb Driver: File - Filename: /var/cache/debconf/config.dat + Filename: @FINKPREFIX@/var/cache/debconf/config.dat Name: templatedb Driver: File Mode: 644 - Filename: /var/cache/debconf/templates.dat + Filename: @FINKPREFIX@/var/cache/debconf/templates.dat .SH "FILE FORMAT" The format of this file is a series of stanzas, each separated by at least one wholly blank line. Comment lines beginning with a "#" character are @@ -103,7 +103,7 @@ The remainder of each database stanza is used to provide configuration specific to that driver. For example, the Text driver needs to know a directory to put the database in, so you might say: - Filename: /var/cache/debconf/config.dat + Filename: @FINKPREFIX@/var/cache/debconf/config.dat .SH DRIVERS A number of drivers are available, and more can be written with little difficulty. Drivers come in three general types. First there are real drivers @@ -146,7 +146,7 @@ .P Name: mydb Driver: File - Filename: /var/cache/debconf/mydb.dat + Filename: @FINKPREFIX@/var/cache/debconf/mydb.dat .RE .TP .B DirTree @@ -178,7 +178,7 @@ .P Name: mydb Driver: DirTree - Directory: /var/cache/debconf/mydb + Directory: @FINKPREFIX@/var/cache/debconf/mydb Extension: .txt .RE .TP @@ -204,7 +204,7 @@ the directory. .P For information about setting up a LDAP server for debconf, read -/usr/share/doc/debconf-doc/README.LDAP (from the debconf-doc package). +@FINKPREFIX@/share/doc/debconf-doc/README.LDAP (from the debconf-doc package). .P To use this database driver, you must have the libnet-ldap-perl package installed. Debconf suggests that package, but does not depend on it. @@ -416,13 +416,13 @@ # This is my own local database. Name: mydb Driver: DirTree - Directory: /var/cache/debconf/config + Directory: @FINKPREFIX@/var/cache/debconf/config # This is another database that I use to hold # only X server configuration. Name: X Driver: File - File: /etc/X11/debconf.dat + File: @FINKPREFIX@/etc/X11/debconf.dat Mode: 644 # It's sorta hard to work out what questions # belong to X; it should be using a deeper @@ -450,7 +450,7 @@ # passwords safe and secure. Name: passwords Driver: File - File: /etc/debconf/passwords + File: @FINKPREFIX@/etc/debconf/passwords Mode: 600 Owner: root Group: root @@ -475,7 +475,7 @@ Driver: File Mode: 644 Format: db - Directory: /var/cache/debconf/templates + Directory: @FINKPREFIX@/var/cache/debconf/templates .SH NOTES If you use something like ${HOME} in this file, it will be replaced with the value of the named environment variable. @@ -492,7 +492,7 @@ An override driver, which can override the value field or flags of all requests that pass through it. .SH FILES -/etc/debconf.conf +@FINKPREFIX@/etc/debconf.conf .P ~/.debconfrc .SH SEE ALSO diff -ruN debconf/doc/man/debconf.conf.pt_BR.5 debconf.new/doc/man/debconf.conf.pt_BR.5 --- debconf/doc/man/debconf.conf.pt_BR.5 2002-02-19 11:45:14.000000000 -0500 +++ debconf.new/doc/man/debconf.conf.pt_BR.5 2003-03-14 13:39:24.000000000 -0500 @@ -5,7 +5,7 @@ This translated man page is out of date -- it does not document the LDAP database driver. See the English version for a more current version. .SH DESCRIÇÃO -Debconf é um sistema de configuração de pacotes Debian. /etc/debconf.conf +Debconf é um sistema de configuração de pacotes Debian. @FINKPREFIX@/etc/debconf.conf e ~/.debconfrc são arquivos de configuração que o debconf usa para determinar quais base de dados deve usar. Estas base de dados são usadas para armazenar dois tipos de informação; dados de configuração dinâmicos @@ -21,12 +21,12 @@ Name: configdb Driver: File - Filename: /var/cache/debconf/config.dat + Filename: @FINKPREFIX@/var/cache/debconf/config.dat Name: templatedb Driver: File Mode: 644 - Filename: /var/cache/debconf/templates.dat + Filename: @FINKPREFIX@/var/cache/debconf/templates.dat .SH "FORMATO DO ARQUIVO" O formato deste arquivo é uma série de estrofes, cada uma separada por pelo menos uma linha conpletamente em branco. Linhas de comentário @@ -116,7 +116,7 @@ configuração específica para o controlador. Por exemplo, o controlador Text precisa saber o diretório onde colocar a base de dados, então você poderia dizer: - Filename: /var/cache/debconf/config.dat + Filename: @FINKPREFIX@/var/cache/debconf/config.dat .SH CONTROLADORES Diversos controladores estão disponíveis, e outros podem ser escritos com pouco esforço. Controladores existem em três tipos genéricos. Primeiro, @@ -162,7 +162,7 @@ .P Name: mydb Driver: File - Filename: /var/cache/debconf/mydb.dat + Filename: @FINKPREFIX@/var/cache/debconf/mydb.dat .RE .TP .B DirTree @@ -195,7 +195,7 @@ .P Name: mydb Driver: DirTree - Directory: /var/cache/debconf/mydb + Directory: @FINKPREFIX@/var/cache/debconf/mydb Extension: .txt .RE .TP @@ -375,13 +375,13 @@ # Esta é minha prória base de dados local. Name: mydb Driver: DirTree - Directory: /var/cache/debconf/config + Directory: @FINKPREFIX@/var/cache/debconf/config # Esta é outra base de dados que eu uso para # armazenar somente a configuração do servidor X. Name: X Driver: File - File: /etc/X11/debconf.dat + File: @FINKPREFIX@/etc/X11/debconf.dat Mode: 644 # É meio complicado descobrir quais questões # pertencem ao X; deveria estr usando uma profunda @@ -417,7 +417,7 @@ # armazenar senhas protegidas e seguras. Name: passwords Driver: File - File: /etc/debconf/passwords + File: @FINKPREFIX@/etc/debconf/passwords Mode: 600 Owner: root Group: root @@ -443,7 +443,7 @@ Driver: File Mode: 644 Format: db - Directory: /var/cache/debconf/templates + Directory: @FINKPREFIX@/var/cache/debconf/templates .SH NOTAS Caso você utilize algo como ${HOME} neste arquivo, isso será substituído com o valor da variável de ambiente nomeada. @@ -460,7 +460,7 @@ Um controlador de sobreescrita que pode sobreescrever o valor dos campos ou assinala todas as requisições que passam através do mesmo. .SH ARQUIVOS -/etc/debconf.conf +@FINKPREFIX@/etc/debconf.conf .P ~/.debconfrc .SH VEJA TAMBÉM diff -ruN debconf/doc/man/debconf.pt_BR.8 debconf.new/doc/man/debconf.pt_BR.8 --- debconf/doc/man/debconf.pt_BR.8 2001-12-01 22:23:15.000000000 -0500 +++ debconf.new/doc/man/debconf.pt_BR.8 2003-03-14 13:39:24.000000000 -0500 @@ -175,11 +175,11 @@ para todos os detalhes sangrentos.Geralmente, o backend de base de dados está localizado em the backend database is located in -.B /var/cache/debconf/ +.B @FINKPREFIX@/var/cache/debconf/ .SH Desenvolvendo para o Debconf Desenvolvedores de pacotes e outros que queiram usar o debconf devem ler o Tutorial dos Programadores Debconf -(/usr/share/doc/debconf-doc/tutorial*). +(@FINKPREFIX@/share/doc/debconf-doc/tutorial*). .P Resumidamente, o debconf se comunica com os scripts dos mantenedores ou outros programas através da entrada e saída padrão, usando uma linguagem diff -ruN debconf/doc/man/dpkg-preconfigure.pt_BR.8.pod debconf.new/doc/man/dpkg-preconfigure.pt_BR.8.pod --- debconf/doc/man/dpkg-preconfigure.pt_BR.8.pod 2001-12-01 22:23:15.000000000 -0500 +++ debconf.new/doc/man/dpkg-preconfigure.pt_BR.8.pod 2003-03-14 13:39:24.000000000 -0500 @@ -35,7 +35,7 @@ pacotes a partir d entrada padrão (stdin) ao invés de obtê-los como parâmetros. Tipicamente isto é usado para fazer o apt executar dpkg-preconfigure em todos os pacotes antes que sejam instalados. Para -fazer isso, adicione algo como isso ao /etc/apt/apt.conf : +fazer isso, adicione algo como isso ao @FINKPREFIX@/etc/apt/apt.conf : // Préconfigure todos os pacotes antes // que eles sejam instalados. diff -ruN debconf/doc/namespace.txt debconf.new/doc/namespace.txt --- debconf/doc/namespace.txt 2001-07-07 14:53:17.000000000 -0400 +++ debconf.new/doc/namespace.txt 2003-03-14 13:39:24.000000000 -0500 @@ -14,4 +14,4 @@ Currently the following shared templates and questions exist: shared/news/server - Prompt for hostname of the news server. -shared/mailname - Prompt for contents of /etc/mailname +shared/mailname - Prompt for contents of @FINKPREFIX@/etc/mailname diff -ruN debconf/doc/tutorial.xml debconf.new/doc/tutorial.xml --- debconf/doc/tutorial.xml 2002-03-06 21:08:08.000000000 -0500 +++ debconf.new/doc/tutorial.xml 2003-03-14 13:39:24.000000000 -0500 @@ -107,7 +107,7 @@ case "$like" in n*|N*) echo "Poor misguided one. Why are you installing this package, then?" - /etc/init.d/subliminal_messages start "I like debian." + @FINKPREFIX@/etc/init.d/subliminal_messages start "I like debian." ;; esac @@ -362,7 +362,7 @@ shell script - You can source /usr/share/debconf/confmodule, + You can source @FINKPREFIX@/share/debconf/confmodule, which will make a number of shell functions available to you. Each shell function corresponds to a command in the protocol (lowercased, and with @@ -492,7 +492,7 @@ case "$like" in n*|N*) echo "Poor misguided one. Why are you installing this package, then?" - /etc/init.d/subliminal_messages start "I like debian." + @FINKPREFIX@/etc/init.d/subliminal_messages start "I like debian." ;; esac @@ -504,11 +504,11 @@ #!/bin/sh -e # Source debconf library. -. /usr/share/debconf/confmodule +. @FINKPREFIX@/share/debconf/confmodule db_get foo/like_debian if [ "$RET" = "false" ]; then - /etc/init.d/subliminal_messages start "I like debian." + @FINKPREFIX@/etc/init.d/subliminal_messages start "I like debian." fi @@ -520,9 +520,9 @@ "purge" command (make sure you don't fail if debconf has already been removed, though): -if [ "$1" = "purge" -a -e /usr/share/debconf/confmodule ]; then +if [ "$1" = "purge" -a -e @FINKPREFIX@/share/debconf/confmodule ]; then # Source debconf library. - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule # Remove my changes to the db. db_purge fi @@ -852,8 +852,8 @@ prerm scripts of all related packages (replacing <package> with the package name): -if [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule +if [ -e @FINKPREFIX@/share/debconf/confmodule ]; then + . @FINKPREFIX@/share/debconf/confmodule # I no longer claim this question. db_unregister shared/window-manager @@ -893,7 +893,7 @@ If you're doing this type of thing, you might find it useful to - drop template files in /usr/share/debconf/$0.templates, where $0 is + drop template files in @FINKPREFIX@/share/debconf/$0.templates, where $0 is the name of the program that is running. Debconf will load such templates up when the program runs. diff -ruN debconf/dpkg-preconfigure debconf.new/dpkg-preconfigure --- debconf/dpkg-preconfigure 2003-03-17 22:38:02.000000000 -0500 +++ debconf.new/dpkg-preconfigure 2003-03-16 11:39:09.000000000 -0500 @@ -36,7 +36,7 @@ Run in apt mode. It will expect to read a set of package filenames from stdin, rather than getting them as parameters. Typically this is used to make apt run dpkg-preconfigure on all packages before they are installed. -To do this, add something like this to /etc/apt/apt.conf: +To do this, add something like this to @FINKPREFIX@/etc/apt/apt.conf: // Pre-configure all packages before // they are installed. @@ -127,7 +127,7 @@ exit(1); } -if (! -x "/usr/bin/apt-extracttemplates") { +if (! -x "@FINKPREFIX@/bin/apt-extracttemplates") { warn gettext("delaying package configuration, since apt-utils is not installed"); exit; } @@ -146,7 +146,7 @@ # characters. It has happened that the list of packages to # configure is more than that, which requires splitting it up into # multiple apt-extracttemplates runs. - my $command_max=20000; # LINUX SPECIFIC!! + my $command_max=16384; # Mac OS X SPECIFIC!! # I could use POSIX::ARG_MAX, but that would be slow. my $static_len=length("apt-extracttemplates"); my $len=$static_len; diff -ruN debconf/dpkg-reconfigure debconf.new/dpkg-reconfigure --- debconf/dpkg-reconfigure 2002-03-15 20:30:25.000000000 -0500 +++ debconf.new/dpkg-reconfigure 2003-03-14 13:39:24.000000000 -0500 @@ -67,7 +67,7 @@ =cut -my $infodir="/var/lib/dpkg/info"; +my $infodir="@FINKPREFIX@/var/lib/dpkg/info"; use strict; use Debconf::Db; @@ -208,7 +208,7 @@ my @ret; local $/="\n\n"; - open (STATUS, ") { push @ret, $1 diff -ruN debconf/fix_db.pl debconf.new/fix_db.pl --- debconf/fix_db.pl 2002-01-11 14:15:03.000000000 -0500 +++ debconf.new/fix_db.pl 2003-03-14 13:39:24.000000000 -0500 @@ -71,8 +71,8 @@ # templates belonging to all installed packages all over again. # This also means that if any of the stuff above resulted in a necessary # question and template being deleted, it will be reinstated now. -foreach my $templatefile (glob("/var/lib/dpkg/info/*.templates")) { - my ($package) = $templatefile =~ m:/var/lib/dpkg/info/(.*?).templates:; +foreach my $templatefile (glob("@FINKPREFIX@/var/lib/dpkg/info/*.templates")) { + my ($package) = $templatefile =~ m:@FINKPREFIX@/var/lib/dpkg/info/(.*?).templates:; Debconf::Template->load($templatefile, $package); } diff -ruN debconf/frontend debconf.new/frontend --- debconf/frontend 2001-11-06 19:54:24.000000000 -0500 +++ debconf.new/frontend 2003-03-14 13:39:25.000000000 -0500 @@ -35,10 +35,10 @@ if ($ARGV[0]=~m!^.*/(.*?)\.(?:postinst|postrm|prerm)$!) { $package=$1; } -elsif (-e "/var/lib/dpkg/tmp.ci/control") { +elsif (-e "@FINKPREFIX@/var/lib/dpkg/tmp.ci/control") { # The preinst is running, presumably. Now it gets really ugly, because # I have to parse the control file. - open (CONTROL, "< /var/lib/dpkg/tmp.ci/control") + open (CONTROL, "< @FINKPREFIX@/var/lib/dpkg/tmp.ci/control") || die "Debconf: unable to open control file: $!"; while () { if (/^Package: (.*)/) { @@ -74,7 +74,7 @@ unless ($ARGV[0]=~m/(.*)config$/ && trytemplate("${1}templates")) { # Finally, look in debconf lib directory for the base # filename with .templates appended. - unless ($ARGV[0]=~m!^(?:.*/)?(.*)! && trytemplate("/usr/share/debconf/templates/${1}.templates")) { + unless ($ARGV[0]=~m!^(?:.*/)?(.*)! && trytemplate("@FINKPREFIX@/share/debconf/templates/${1}.templates")) { debug developer => "Couldn't find a templates file." } } @@ -89,7 +89,7 @@ # lets you dpkg -i somepackage.deb and have its config script be run first. # # If it is the preinst, everything is in this weird directory deep in -# /var/lib/dpkg. +# @FINKPREFIX@/var/lib/dpkg. if ($ARGV[0] =~/^(.*[.\/])(?:postinst|preinst)$/) { my $base=$1; diff -ruN debconf/po/Makefile debconf.new/po/Makefile --- debconf/po/Makefile 2002-01-18 12:11:51.000000000 -0500 +++ debconf.new/po/Makefile 2003-03-14 13:39:25.000000000 -0500 @@ -10,8 +10,8 @@ install: all for file in $(MOFILES); do \ lang=`echo $$file | sed 's/\.mo//'`; \ - install -d $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/; \ - install -m 0644 $$file $(prefix)/usr/share/locale/$$lang/LC_MESSAGES/debconf.mo; \ + install -d $(prefix)/share/locale/$$lang/LC_MESSAGES/; \ + install -m 0644 $$file $(prefix)/share/locale/$$lang/LC_MESSAGES/debconf.mo; \ done debconf.pot: $(POTFILES) diff -ruN debconf/samples/demo debconf.new/samples/demo --- debconf/samples/demo 2002-03-18 22:49:00.000000000 -0500 +++ debconf.new/samples/demo 2003-03-14 13:39:25.000000000 -0500 @@ -7,7 +7,7 @@ if [ -e confmodule ]; then . confmodule else - . /usr/share/debconf/confmodule + . @FINKPREFIX@/share/debconf/confmodule fi db_version 2.0 diff -ruN debconf/samples/tutorial debconf.new/samples/tutorial --- debconf/samples/tutorial 1999-11-15 18:40:48.000000000 -0500 +++ debconf.new/samples/tutorial 2003-03-14 13:39:25.000000000 -0500 @@ -1,7 +1,7 @@ #!/bin/sh -e # Source debconf library. -. /usr/share/debconf/confmodule +. @FINKPREFIX@/share/debconf/confmodule # Do you like debian? db_input medium foo/like_debian || true diff -ruN debconf/samples/tutorial-back debconf.new/samples/tutorial-back --- debconf/samples/tutorial-back 2000-12-04 23:19:50.000000000 -0500 +++ debconf.new/samples/tutorial-back 2003-03-14 13:39:25.000000000 -0500 @@ -1,7 +1,7 @@ #!/bin/sh -e # Source debconf library. -. /usr/share/debconf/confmodule +. @FINKPREFIX@/share/debconf/confmodule db_version 2.0 # This conf script is capable of backing up diff -ruN debconf/transition_db.pl debconf.new/transition_db.pl --- debconf/transition_db.pl 2001-03-18 19:12:35.000000000 -0500 +++ debconf.new/transition_db.pl 2003-03-14 13:39:25.000000000 -0500 @@ -6,7 +6,7 @@ use Debconf::Question; use Debconf::Template; -my $dir = shift || '/var/lib/debconf'; +my $dir = shift || '@FINKPREFIX@/var/lib/debconf'; Debconf::Db->load;