X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FConfig.pm;h=9e538e1ccb4f067eb94d4a5cfe4b8c048f2de949;hb=3540ed87aca7f53a5eb0763460e94db2b7fecf4e;hp=a212a799754112a1e56af4c64f9efd10ab083f18;hpb=5c6f0551430028f1283e0cef76be004922340150;p=debbugs.git diff --git a/Debbugs/Config.pm b/Debbugs/Config.pm index a212a79..9e538e1 100644 --- a/Debbugs/Config.pm +++ b/Debbugs/Config.pm @@ -59,6 +59,8 @@ BEGIN { qw($gMaintainerFileOverride $gPseudoMaintFile $gPseudoDescFile $gPackageSource), qw($gVersionPackagesDir $gVersionIndex $gBinarySourceMap $gSourceBinaryMap), qw($gVersionTimeIndex), + qw($gSimpleVersioning), + qw($gCVETracker), qw($gSendmail $gLibPath $gSpamScan @gExcludeFromControl), qw(%gSeverityDisplay @gTags @gSeverityList @gStrongSeverities), qw(%gTagsSingleLetter), @@ -67,7 +69,9 @@ BEGIN { qw(%gObsoleteSeverities), qw(@gPostProcessall @gRemovalDefaultDistributionTags @gRemovalDistributionTags @gRemovalArchitectures), qw(@gRemovalStrongSeverityDefaultDistributionTags), + qw(@gAffectsDistributionTags), qw(@gDefaultArchitectures), + qw($gMachineName), qw($gTemplateDir), qw($gDefaultPackage), qw($gSpamMaxThreads $gSpamSpamsPerThread $gSpamKeepRunning $gSpamScan $gSpamCrossassassinDb), @@ -202,9 +206,21 @@ Domain where subscriptions to package lists happen =cut - set_default(\%config,'subscription_domain',undef); + +=item cve_tracker $gCVETracker + +URI to CVE security tracker; in bugreport.cgi, CVE-2001-0002 becomes +linked to http://$config{cve_tracker}CVE-2001-002 + +Default: security-tracker.debian.org/tracker/ + +=cut + +set_default(\%config,'cve_tracker','security-tracker.debian.org/tracker/'); + + =back =cut @@ -270,11 +286,27 @@ Email address where packages with an unknown maintainer will be sent Default: $config{maintainer_email} +=cut + +set_default(\%config,'unknown_maintainer_email',$config{maintainer_email}); + +=item machine_name + +The name of the machine that this instance of debbugs is running on +(currently used for debbuging purposes and web page output.) + +Default: qx(hostname --fqdn) + =back =cut -set_default(\%config,'unknown_maintainer_email',$config{maintainer_email}); +my $_old_path = $ENV{PATH}; +$ENV{PATH} = '/bin:/usr/bin:/usr/local/bin'; +my $temp_hostname = qx(hostname --fqdn); +chomp $temp_hostname; +set_default(\%config,'machine_name',$temp_hostname); +$ENV{PATH} = $_old_path; =head2 BTS Mailing Lists @@ -299,6 +331,8 @@ set_default(\%config,'unknown_maintainer_email',$config{maintainer_email}); =item mirror_list +=item strong_list + =cut set_default(\%config, 'submit_list', 'bug-submit-list'); @@ -332,11 +366,39 @@ set_default(\%config,'bug_subscription_domain',$config{list_domain}); =over +=item mailer + +Name of the mailer to use + +Default: exim + =cut set_default(\%config,'mailer','exim'); + + +=item bug + +Default: bug + +=item ubug + +Default: ucfirst($config{bug}); + +=item bugs + +Default: bugs + +=item ubugs + +Default: ucfirst($config{ubugs}); + +=cut + set_default(\%config,'bug','bug'); +set_default(\%config,'ubug',ucfirst($config{bug})); set_default(\%config,'bugs','bugs'); +set_default(\%config,'ubugs',ucfirst($config{bugs})); =item remove_age @@ -707,11 +769,24 @@ set_default(\%config,'template_dir','/usr/share/debbugs/templates'); set_default(\%config,'maintainer_file',$config{config_dir}.'/Maintainers'); set_default(\%config,'maintainer_file_override',$config{config_dir}.'/Maintainers.override'); +set_default(\%config,'source_maintainer_file',$config{config_dir}.'/Source_maintainers'); +set_default(\%config,'source_maintainer_file_override',undef); set_default(\%config,'pseudo_maint_file',$config{config_dir}.'/pseudo-packages.maint'); set_default(\%config,'pseudo_desc_file',$config{config_dir}.'/pseudo-packages.description'); set_default(\%config,'package_source',$config{config_dir}.'/indices/sources'); +=item simple_versioning + +If true this causes debbugs to ignore version information and just +look at whether a bug is done or not done. Primarily of interest for +debbugs installs which don't track versions. defaults to false. + +=cut + +set_default(\%config,'simple_versioning',0); + + =item version_packages_dir Location where the version package information is kept; defaults to @@ -941,6 +1016,10 @@ set_default(\%config,'html_expire_note', sub read_config{ my ($conf_file) = @_; + if (not -e $conf_file) { + print STDERR "configuration file '$conf_file' doesn't exist; skipping it"; + return; + } # first, figure out what type of file we're reading in. my $fh = new IO::File $conf_file,'r' or die "Unable to open configuration file $conf_file for reading: $!"; @@ -998,7 +1077,7 @@ sub __convert_name{ $hash_name =~ s/^([\$\%\@])g//; my $glob_type = $1; my $glob_name = 'g'.$hash_name; - $hash_name =~ s/(HTML|CGI)/ucfirst(lc($1))/ge; + $hash_name =~ s/(HTML|CGI|CVE)/ucfirst(lc($1))/ge; $hash_name =~ s/^([A-Z]+)/lc($1)/e; $hash_name =~ s/([A-Z]+)/'_'.lc($1)/ge; return $hash_name unless wantarray;