]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2002-11-17 16:07:00 by cjwatson]
authorcjwatson <>
Mon, 18 Nov 2002 00:07:00 +0000 (16:07 -0800)
committercjwatson <>
Mon, 18 Nov 2002 00:07:00 +0000 (16:07 -0800)
Install debbugs-dbhash and run it on upgrade from << 2.4. Mention this and
a few other things in the upgrade instructions.

Makefile
UPGRADE
debian/dirs
debian/postinst

index 4e80faa326f909e15013dc7c52b1a46e33b6ed7b..01e1189e749a14af3e13f4b5a51d3d615a4e82e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,8 @@ etc_dir         := $(DESTDIR)/etc/debbugs
 var_dir                := $(DESTDIR)/var/lib/debbugs
 scripts_dir    := $(DESTDIR)/usr/lib/debbugs
 doc_dir                := $(DESTDIR)/usr/share/doc/debbugs
+man_dir                := $(DESTDIR)/usr/share/man
+man8_dir       := $(man_dir)/man8
 examples_dir   := $(doc_dir)/examples
 
 scripts_in     := $(filter-out scripts/config.in scripts/errorlib.in scripts/text.in, $(wildcard scripts/*.in))
@@ -26,8 +28,8 @@ install_mostfiles:
        # create the directories if they aren't there
        for dir in $(sbin_dir) $(etc_dir)/html $(var_dir)/indices \
 $(var_dir)/www/cgi $(var_dir)/www/db $(var_dir)/www/txt $(var_dir)/spool/lock \
-$(var_dir)/spool/archive $(var_dir)/spool/incoming $(var_dir)/spool/db \
-$(scripts_dir) $(examples_dir); \
+$(var_dir)/spool/archive $(var_dir)/spool/incoming $(var_dir)/spool/db-h \
+$(scripts_dir) $(examples_dir) $(man8_dir); \
           do test -d $$dir || $(install_exec) -d $$dir; done
 
        # install the scripts
@@ -51,6 +53,9 @@ $(scripts_dir) $(examples_dir); \
 
        # install debbugsconfig
        $(install_exec) debian/debbugsconfig $(sbin_dir)
+       # install the debbugs-dbhash migration tool
+       $(install_exec) migrate/debbugs-dbhash $(sbin_dir)
+       $(install_data) migrate/debbugs-dbhash.8 $(man8_dir)
 
        # install the updateseqs file
        $(install_data) misc/updateseqs $(var_dir)/spool
diff --git a/UPGRADE b/UPGRADE
index f90ea760869680cf7134e559bca825d25fa7b277..4b466d381eeea808f3416c6734326d3d0f4d27e0 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -13,8 +13,22 @@ $gWebHostBugDir = "Bugs";                            # e.g. Bugs
 $gWebDomain = "$gWebHost/$gWebHostBugDir";
 $gCGIDomain = "$gWebDomain/Bugs/cgi";                  # e.g. cgi.debian.org
 $gPackagePages = "packages.debian.org";                 # e.g. packages.debian.org
+$gMaintainerFileOverride = "$gConfigDir/Maintainers.override";
+$gUnknownMaintainerEmail = "$gMaintainerEmail";
+$gPackageSource = "$gConfigDir/indices/sources";
 
-($gWebDomain will probably exist already, change it as shown above.)
+$gWebDomain will probably exist already; change it as shown above.
+
+$gMaintainerFileOverride is the name of a file used to manually override the
+Maintainers file (which is often automatically generated).
+
+$gUnknownMaintainerEmail is the address to mail when a bug report arrives
+for a package with no maintainer in $gMaintainerFile or
+$gMaintainerFileOverride.
+
+$gPackageSource is a file containing three tab-separated columns: package
+name, component (e.g. main, contrib, non-free), and the corresponding source
+package name.
 
 Add the following variable to the /etc/debbugs/text file:
 
@@ -55,6 +69,11 @@ $gHTMLTagDesc = "
   something a little more flexible, probably.
 ";
 
+The bug database is now stored in a hashed directory format (db-h).  You
+will need to migrate your database to this new format.  The
+/usr/sbin/debbugs-dbhash program is provided to help you perform this
+migration.
+
 From 2.2 to 2.3
 ---------------
 
index 568eb0cc6d1c5112d417e52c201a1c1a7ee21d4e..6f477fa07e88e41796c583a71def948605c95f65 100644 (file)
@@ -9,4 +9,4 @@ var/lib/debbugs/www/txt
 var/lib/debbugs/spool/lock
 var/lib/debbugs/spool/archive
 var/lib/debbugs/spool/incoming
-var/lib/debbugs/spool/db
+var/lib/debbugs/spool/db-h
index 41b1d8533dd58f8dee12daa9449322c7fb0b0833..5a8a38783a5de0630c673c11f1421c07a018f60b 100755 (executable)
@@ -2,6 +2,24 @@
 
 if [ "$1" = "configure" ]; then
   /usr/sbin/debbugsconfig
+  if dpkg --compare-versions "$2" lt 2.4; then
+    spool=`perl -e 'require "/etc/debbugs/config"; print $gSpoolDir;'`
+    if [ -d "$spool/db" ] && [ ! -d "$spool/db-h" ]; then
+      echo "Migrating bug database to hashed format." >&2
+      /usr/sbin/debbugs-dbhash "$spool/db" "$spool/db-h"
+      echo "You can remove bug logs from $spool/db" >&2
+      echo "after ensuring that the new database works." >&2
+    else
+      echo "Cannot migrate bug database to hashed format, because:" >&2
+      if [ -d "$spool/db" ]; then
+       echo "$spool/db-h already exists."
+      else
+       echo "$spool/db is missing."
+      fi
+      echo "Rectify the situation and run the following command by hand:" >&2
+      echo "  /usr/sbin/debbugs-dbhash \"$spool/db\" \"$spool/db-h\"" >&2
+    fi
+  fi
 fi
 
 if [ -f /etc/debbugs/nextnumber ]; then