]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Config.pm
* Add support for affects_distribution_tags
[debbugs.git] / Debbugs / Config.pm
index b54f7c9b26595d0f5bc6476d7887bac825fd23c3..a212a799754112a1e56af4c64f9efd10ab083f18 100644 (file)
@@ -50,6 +50,7 @@ BEGIN {
                                 qw($gSubmitList $gMaintList $gQuietList $gForwardList),
                                 qw($gDoneList $gRequestList $gSubmitterList $gControlList),
                                 qw($gStrongList),
+                                qw($gBugSubscriptionDomain),
                                 qw($gPackageVersionRe),
                                 qw($gSummaryList $gMirrorList $gMailer $gBug),
                                 qw($gBugs $gRemoveAge $gSaveOldBugs $gDefaultSeverity),
@@ -60,12 +61,16 @@ BEGIN {
                                 qw($gVersionTimeIndex),
                                 qw($gSendmail $gLibPath $gSpamScan @gExcludeFromControl),
                                 qw(%gSeverityDisplay @gTags @gSeverityList @gStrongSeverities),
+                                qw(%gTagsSingleLetter),
                                 qw(%gSearchEstraier),
                                 qw(%gDistributionAliases),
+                                qw(%gObsoleteSeverities),
                                 qw(@gPostProcessall @gRemovalDefaultDistributionTags @gRemovalDistributionTags @gRemovalArchitectures),
                                 qw(@gRemovalStrongSeverityDefaultDistributionTags),
                                 qw(@gDefaultArchitectures),
                                 qw($gTemplateDir),
+                                qw($gDefaultPackage),
+                                qw($gSpamMaxThreads $gSpamSpamsPerThread $gSpamKeepRunning $gSpamScan $gSpamCrossassassinDb),
                                ],
                     text     => [qw($gBadEmailPrefix $gHTMLTail $gHTMLExpireNote),
                                 ],
@@ -74,6 +79,7 @@ BEGIN {
      @EXPORT_OK = ();
      Exporter::export_ok_tags(qw(globals text config));
      $EXPORT_TAGS{all} = [@EXPORT_OK];
+     $ENV{HOME} = '' if not defined $ENV{HOME};
 }
 
 use File::Basename qw(dirname);
@@ -142,7 +148,7 @@ concatenation of L</web_host> and L</web_host_bug_dir>
 
 =cut
 
-set_default(\%config,'web_domain',$config{web_host}.'/'.$config{web_host_bug_dir});
+set_default(\%config,'web_domain',$config{web_host}.($config{web_host}=~m{/$}?'':'/').$config{web_host_bug_dir});
 
 =item html_suffix $gHTMLSuffix
 
@@ -293,8 +299,6 @@ set_default(\%config,'unknown_maintainer_email',$config{maintainer_email});
 
 =item mirror_list
 
-=back
-
 =cut
 
 set_default(\%config,   'submit_list',   'bug-submit-list');
@@ -309,6 +313,21 @@ set_default(\%config,  'summary_list',  'bug-summary-list');
 set_default(\%config,   'mirror_list',   'bug-mirror-list');
 set_default(\%config,   'strong_list',   'bug-strong-list');
 
+=item bug_subscription_domain
+
+Domain of list for messages regarding a single bug; prefixed with
+bug=${bugnum}@ when bugs are actually sent out. Set to undef or '' to
+disable sending messages to the bug subscription list.
+
+Default: list_domain
+
+=back
+
+=cut
+
+set_default(\%config,'bug_subscription_domain',$config{list_domain});
+
+
 =head2 Misc Options
 
 =over
@@ -398,6 +417,37 @@ set_default(\%config,'default_architectures',
            [qw(i386 amd64 arm powerpc sparc alpha)]
           );
 
+=item affects_distribution_tags
+
+List of tags which restrict the buggy state to a set of distributions.
+
+The set of distributions that are buggy is the intersection of the set
+of distributions that would be buggy without reference to these tags
+and the set of these tags that are distributions which are set on a
+bug.
+
+Setting this to [] will remove this feature.
+
+Default: @{$config{distributions}}
+
+=cut
+
+set_default(\%config,'affects_distribution_tags',
+           [@{$config{distributions}}],
+          );
+
+=item removal_unremovable_tags
+
+Bugs which have these tags set cannot be archived
+
+Default: []
+
+=cut
+
+set_default(\%config,'removal_unremovable_tags',
+           [],
+          );
+
 =item removal_distribution_tags
 
 Tags which specifiy distributions to check
@@ -471,10 +521,26 @@ Default: '[A-Za-z0-9:+\.-]+'
 
 =cut
 
+
 set_default(\%config,'package_version_re',
            '[A-Za-z0-9:+\.~-]+');
 
 
+=item default_package
+
+This is the name of the default package. If set, bugs assigned to
+packages without a maintainer and bugs missing a Package: psuedoheader
+will be assigned to this package instead.
+
+Defaults to unset, which is the traditional debbugs behavoir
+
+=cut
+
+set_default(\%config,'default_package',
+           undef
+          );
+
+
 =item control_internal_requester
 
 This address is used by Debbugs::Control as the request address which
@@ -512,27 +578,118 @@ set_default(\%config,'exclude_from_control',[]);
 
 
 
+=item default_severity
+
+The default severity of bugs which have no severity set
+
+Default: normal
+
+=cut
 
 set_default(\%config,'default_severity','normal');
-set_default(\%config,'show_severities','critical, grave, normal, minor, wishlist');
-set_default(\%config,'strong_severities',[qw(critical grave)]);
-set_default(\%config,'severity_list',[qw(critical grave normal wishlist)]);
+
+=item severity_display
+
+A hashref of severities and the informative text which describes them.
+
+Default:
+
+ {critical => "Critical $config{bugs}",
+  grave    => "Grave $config{bugs}",
+  normal   => "Normal $config{bugs}",
+  wishlist => "Wishlist $config{bugs}",
+ }
+
+=cut
+
 set_default(\%config,'severity_display',{critical => "Critical $config{bugs}",
                                         grave    => "Grave $config{bugs}",
+                                        serious  => "Serious $config{bugs}",
+                                        important=> "Important $config{bugs}",
                                         normal   => "Normal $config{bugs}",
+                                        minor    => "Minor $config{bugs}",
                                         wishlist => "Wishlist $config{bugs}",
                                        });
 
+=item show_severities
+
+A scalar list of the severities to show
+
+Defaults to the concatenation of the keys of the severity_display
+hashlist with ', ' above.
+
+=cut
+
+set_default(\%config,'show_severities',join(', ',keys %{$config{severity_display}}));
+
+=item strong_severities
+
+An arrayref of the serious severities which shoud be emphasized
+
+Default: [qw(critical grave)]
+
+=cut
+
+set_default(\%config,'strong_severities',[qw(critical grave)]);
+
+=item severity_list
+
+An arrayref of a list of the severities
+
+Defaults to the keys of the severity display hashref
+
+=cut
+
+set_default(\%config,'severity_list',[keys %{$config{severity_display}}]);
+
+=item obsolete_severities
+
+A hashref of obsolete severities with the replacing severity
+
+Default: {}
+
+=cut
+
+set_default(\%config,'obsolete_severities',{});
+
+=item tags
+
+An arrayref of the tags used
+
+Default: [qw(patch wontfix moreinfo unreproducible fixed)] and also
+includes the distributions.
+
+=cut
+
 set_default(\%config,'tags',[qw(patch wontfix moreinfo unreproducible fixed),
                             @{$config{distributions}}
                            ]);
 
+set_default(\%config,'tags_single_letter',
+           {patch => '+',
+            wontfix => '',
+            moreinfo => 'M',
+            unreproducible => 'R',
+            fixed   => 'F',
+           }
+          );
+
 set_default(\%config,'bounce_froms','^mailer|^da?emon|^post.*mast|^root|^wpuser|^mmdf|^smt.*|'.
            '^mrgate|^vmmail|^mail.*system|^uucp|-maiser-|^mal\@|'.
            '^mail.*agent|^tcpmail|^bitmail|^mailman');
 
 set_default(\%config,'config_dir',dirname(exists $ENV{DEBBUGS_CONFIG_FILE}?$ENV{DEBBUGS_CONFIG_FILE}:'/etc/debbugs/config'));
 set_default(\%config,'spool_dir','/var/lib/debbugs/spool');
+
+=item usertag_dir
+
+Directory which contains the usertags
+
+Default: $config{spool_dir}/user
+
+=cut
+
+set_default(\%config,'usertag_dir',$config{spool_dir}.'/user');
 set_default(\%config,'incoming_dir','incoming');
 set_default(\%config,'web_dir','/var/lib/debbugs/www');
 set_default(\%config,'doc_dir','/var/lib/debbugs/www/txt');
@@ -625,6 +782,91 @@ Whether or not spamscan is being used; defaults to 0 (not being used
 
 set_default(\%config,'spam_scan',0);
 
+=item spam_crossassassin_db
+
+Location of the crosassassin database, defaults to
+spool_dir/../CrossAssassinDb
+
+=cut
+
+set_default(\%config,'spam_crossassassin_db',$config{spool_dir}.'/../CrossAssassinDb');
+
+=item spam_max_cross
+
+Maximum number of cross-posted messages
+
+=cut
+
+set_default(\%config,'spam_max_cross',6);
+
+
+=item spam_spams_per_thread
+
+Number of spams for each thread (on average). Defaults to 200
+
+=cut
+
+set_default(\%config,'spam_spams_per_thread',200);
+
+=item spam_max_threads
+
+Maximum number of threads to start. Defaults to 20
+
+=cut
+
+set_default(\%config,'spam_max_threads',20);
+
+=item spam_keep_running
+
+Maximum number of seconds to run without restarting. Defaults to 3600.
+
+=cut
+
+set_default(\%config,'spam_keep_running',3600);
+
+=item spam_mailbox
+
+Location to store spam messages; is run through strftime to allow for
+%d,%m,%Y, et al. Defaults to 'spool_dir/../mail/spam/assassinated.%Y-%m-%d'
+
+=cut
+
+set_default(\%config,'spam_mailbox',$config{spool_dir}.'/../mail/spam/assassinated.%Y-%m-%d');
+
+=item spam_crossassassin_mailbox
+
+Location to store crossassassinated messages; is run through strftime
+to allow for %d,%m,%Y, et al. Defaults to
+'spool_dir/../mail/spam/crossassassinated.%Y-%m-%d'
+
+=cut
+
+set_default(\%config,'spam_crossassassin_mailbox',$config{spool_dir}.'/../mail/spam/crossassassinated.%Y-%m-%d');
+
+=item spam_local_tests_only
+
+Whether only local tests are run, defaults to 0
+
+=cut
+
+set_default(\%config,'spam_local_tests_only',0);
+
+=item spam_user_prefs
+
+User preferences for spamassassin, defaults to $ENV{HOME}/.spamassassin/user_prefs
+
+=cut
+
+set_default(\%config,'spam_user_prefs',"$ENV{HOME}/.spamassassin/user_prefs");
+
+=item spam_rules_dir
+
+Site rules directory for spamassassin, defaults to
+'/usr/share/spamassassin'
+
+=cut
+
+set_default(\%config,'spam_rules_dir','/usr/share/spamassassin');
 
 =back
 
@@ -664,6 +906,8 @@ set_default(\%config,'text_instructions',$config{bad_email_prefix});
 
 This shows up at the end of (most) html pages
 
+In many pages this has been replaced by the html/tail template.
+
 =cut
 
 set_default(\%config,'html_tail',<<END);