From dda90a63b61beb50b4e2b931f8dccd25646a582c Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Sun, 17 Nov 2002 16:07:00 -0800 Subject: [PATCH] [project @ 2002-11-17 16:07:00 by cjwatson] Install debbugs-dbhash and run it on upgrade from << 2.4. Mention this and a few other things in the upgrade instructions. --- Makefile | 9 +++++++-- UPGRADE | 21 ++++++++++++++++++++- debian/dirs | 2 +- debian/postinst | 18 ++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4e80faa..01e1189 100644 --- 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 f90ea76..4b466d3 100644 --- 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 --------------- diff --git a/debian/dirs b/debian/dirs index 568eb0c..6f477fa 100644 --- a/debian/dirs +++ b/debian/dirs @@ -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 diff --git a/debian/postinst b/debian/postinst index 41b1d85..5a8a387 100755 --- a/debian/postinst +++ b/debian/postinst @@ -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 -- 2.39.2