]> git.donarmstrong.com Git - debbugs.git/blob - Debbugs/Config.pm
merge changes from source
[debbugs.git] / Debbugs / Config.pm
1 # This module is part of debbugs, and is released
2 # under the terms of the GPL version 2, or any later
3 # version at your option.
4 # See the file README and COPYING for more information.
5 #
6 # Copyright 2007 by Don Armstrong <don@donarmstrong.com>.
7
8 package Debbugs::Config;
9
10 =head1 NAME
11
12 Debbugs::Config -- Configuration information for debbugs
13
14 =head1 SYNOPSIS
15
16  use Debbugs::Config;
17
18 # to get the compatiblity interface
19
20  use Debbugs::Config qw(:globals);
21
22 =head1 DESCRIPTION
23
24 This module provides configuration variables for all of debbugs.
25
26 =head1 CONFIGURATION FILES
27
28 The default configuration file location is /etc/debbugs/config; this
29 configuration file location can be set by modifying the
30 DEBBUGS_CONFIG_FILE env variable to point at a different location.
31
32 =cut
33
34 use warnings;
35 use strict;
36 use vars qw($VERSION $DEBUG %EXPORT_TAGS @EXPORT_OK @EXPORT $USING_GLOBALS %config);
37 use base qw(Exporter);
38
39 BEGIN {
40      # set the version for version checking
41      $VERSION     = 1.00;
42      $DEBUG = 0 unless defined $DEBUG;
43      $USING_GLOBALS = 0;
44
45      @EXPORT = ();
46      %EXPORT_TAGS = (globals => [qw($gEmailDomain $gListDomain $gWebHost $gWebHostBugDir),
47                                  qw($gWebDomain $gHTMLSuffix $gCGIDomain $gMirrors),
48                                  qw($gPackagePages $gSubscriptionDomain $gProject $gProjectTitle),
49                                  qw($gMaintainer $gMaintainerWebpage $gMaintainerEmail $gUnknownMaintainerEmail),
50                                  qw($gSubmitList $gMaintList $gQuietList $gForwardList),
51                                  qw($gDoneList $gRequestList $gSubmitterList $gControlList),
52                                  qw($gStrongList),
53                                  qw($gPackageVersionRe),
54                                  qw($gSummaryList $gMirrorList $gMailer $gBug),
55                                  qw($gBugs $gRemoveAge $gSaveOldBugs $gDefaultSeverity),
56                                  qw($gShowSeverities $gBounceFroms $gConfigDir $gSpoolDir),
57                                  qw($gIncomingDir $gWebDir $gDocDir $gMaintainerFile),
58                                  qw($gMaintainerFileOverride $gPseudoMaintFile $gPseudoDescFile $gPackageSource),
59                                  qw($gVersionPackagesDir $gVersionIndex $gBinarySourceMap $gSourceBinaryMap),
60                                  qw($gVersionTimeIndex),
61                                  qw($gSendmail $gLibPath $gSpamScan @gExcludeFromControl),
62                                  qw(%gSeverityDisplay @gTags @gSeverityList @gStrongSeverities),
63                                  qw(%gSearchEstraier),
64                                  qw(%gDistributionAliases),
65                                  qw(@gPostProcessall @gRemovalDefaultDistributionTags @gRemovalDistributionTags @gRemovalArchitectures),
66                                  qw(@gRemovalStrongSeverityDefaultDistributionTags),
67                                 ],
68                      text     => [qw($gBadEmailPrefix $gHTMLTail $gHTMLExpireNote),
69                                  ],
70                      config   => [qw(%config)],
71                     );
72      @EXPORT_OK = ();
73      Exporter::export_ok_tags(qw(globals text config));
74      $EXPORT_TAGS{all} = [@EXPORT_OK];
75 }
76
77 use File::Basename qw(dirname);
78 use IO::File;
79 use Safe;
80
81 =head1 CONFIGURATION VARIABLES
82
83 =head2 General Configuration
84
85 =over
86
87 =cut
88
89 # read in the files;
90 %config = ();
91 # untaint $ENV{DEBBUGS_CONFIG_FILE} if it's owned by us
92 # This enables us to test things that are -T.
93 if (exists $ENV{DEBBUGS_CONFIG_FILE}) {
94      if (${[stat($ENV{DEBBUGS_CONFIG_FILE})]}[4] = $<) {
95           $ENV{DEBBUGS_CONFIG_FILE} =~ /(.+)/;
96           $ENV{DEBBUGS_CONFIG_FILE} = $1;
97      }
98      else {
99           die "Environmental variable DEBBUGS_CONFIG_FILE set, and $ENV{DEBBUGS_CONFIG_FILE} is not owned by the user running this script.";
100      }
101 }
102 read_config(exists $ENV{DEBBUGS_CONFIG_FILE}?$ENV{DEBBUGS_CONFIG_FILE}:'/etc/debbugs/config');
103
104 =item email_domain $gEmailDomain
105
106 The email domain of the bts
107
108 =cut
109
110 set_default(\%config,'email_domain','bugs.something');
111
112 =item list_domain $gListDomain
113
114 The list domain of the bts, defaults to the email domain
115
116 =cut
117
118 set_default(\%config,'list_domain',$config{email_domain});
119
120 =item web_host $gWebHost
121
122 The web host of the bts; defaults to the email domain
123
124 =cut
125
126 set_default(\%config,'web_host',$config{email_domain});
127
128 =item web_host_bug_dir $gWebHostDir
129
130 The directory of the web host on which bugs are kept, defaults to C<''>
131
132 =cut
133
134 set_default(\%config,'web_host_bug_dir','');
135
136 =item web_domain $gWebDomain
137
138 Full path of the web domain where bugs are kept, defaults to the
139 concatenation of L</web_host> and L</web_host_bug_dir>
140
141 =cut
142
143 set_default(\%config,'web_domain',$config{web_host}.'/'.$config{web_host_bug_dir});
144
145 =item html_suffix $gHTMLSuffix
146
147 Suffix of html pages, defaults to .html
148
149 =cut
150
151 set_default(\%config,'html_suffix','.html');
152
153 =item cgi_domain $gCGIDomain
154
155 Full path of the web domain where cgi scripts are kept. Defaults to
156 the concatentation of L</web_host> and cgi.
157
158 =cut
159
160 set_default(\%config,'cgi_domain',$config{web_domain}.($config{web_domain}=~m{/$}?'':'/').'cgi');
161
162 =item mirrors @gMirrors
163
164 List of mirrors [What these mirrors are used for, no one knows.]
165
166 =cut
167
168
169 set_default(\%config,'mirrors',[]);
170
171 =item package_pages  $gPackagePages
172
173 Domain where the package pages are kept; links should work in a
174 package_pages/foopackage manner. Defaults to undef, which means that
175 package links will not be made.
176
177 =cut
178
179
180 set_default(\%config,'package_pages',undef);
181
182 =item package_pages  $gUsertagPackageDomain
183
184 Domain where where usertags of packages belong; defaults to $gPackagePages
185
186 =cut
187
188 set_default(\%config,'usertag_package_domain',$config{package_pages});
189
190
191 =item subscription_domain $gSubscriptionDomain
192
193 Domain where subscriptions to package lists happen
194
195 =cut
196
197
198 set_default(\%config,'subscription_domain',undef);
199
200 =back
201
202 =cut
203
204
205 =head2 Project Identification
206
207 =over
208
209 =item project $gProject
210
211 Name of the project
212
213 Default: 'Something'
214
215 =cut
216
217 set_default(\%config,'project','Something');
218
219 =item project_title $gProjectTitle
220
221 Name of this install of Debbugs, defaults to "L</project> Debbugs Install"
222
223 Default: "$config{project} Debbugs Install"
224
225 =cut
226
227 set_default(\%config,'project_title',"$config{project} Debbugs Install");
228
229 =item maintainer $gMaintainer
230
231 Name of the maintainer of this debbugs install
232
233 Default: 'Local DebBugs Owner's
234
235 =cut
236
237 set_default(\%config,'maintainer','Local DebBugs Owner');
238
239 =item maintainer_webpage $gMaintainerWebpage
240
241 Webpage of the maintainer of this install of debbugs
242
243 Default: "$config{web_domain}/~owner"
244
245 =cut
246
247 set_default(\%config,'maintainer_webpage',"$config{web_domain}/~owner");
248
249 =item maintainer_email
250
251 Email address of the maintainer of this Debbugs install
252
253 Default: 'root@'.$config{email_domain}
254
255 =cut
256
257 set_default(\%config,'maintainer_email','root@'.$config{email_domain});
258
259 =item unknown_maintainer_email
260
261 Email address where packages with an unknown maintainer will be sent
262
263 Default: $config{maintainer_email}
264
265 =back
266
267 =cut
268
269 set_default(\%config,'unknown_maintainer_email',$config{maintainer_email});
270
271 =head2 BTS Mailing Lists
272
273
274 =over
275
276 =item submit_list
277
278 =item maint_list
279
280 =item forward_list
281
282 =item done_list
283
284 =item request_list
285
286 =item submitter_list
287
288 =item control_list
289
290 =item summary_list
291
292 =item mirror_list
293
294 =back
295
296 =cut
297
298 set_default(\%config,   'submit_list',   'bug-submit-list');
299 set_default(\%config,    'maint_list',    'bug-maint-list');
300 set_default(\%config,    'quiet_list',    'bug-quiet-list');
301 set_default(\%config,  'forward_list',  'bug-forward-list');
302 set_default(\%config,     'done_list',     'bug-done-list');
303 set_default(\%config,  'request_list',  'bug-request-list');
304 set_default(\%config,'submitter_list','bug-submitter-list');
305 set_default(\%config,  'control_list',  'bug-control-list');
306 set_default(\%config,  'summary_list',  'bug-summary-list');
307 set_default(\%config,   'mirror_list',   'bug-mirror-list');
308 set_default(\%config,   'strong_list',   'bug-strong-list');
309
310 =head2 Misc Options
311
312 =over
313
314 =cut
315
316 set_default(\%config,'mailer','exim');
317 set_default(\%config,'bug','bug');
318 set_default(\%config,'bugs','bugs');
319
320 =item remove_age
321
322 Age at which bugs are archived/removed
323
324 Default: 28
325
326 =cut
327
328 set_default(\%config,'remove_age',28);
329
330 =item save_old_bugs
331
332 Whether old bugs are saved or deleted
333
334 Default: 1
335
336 =cut
337
338 set_default(\%config,'save_old_bugs',1);
339
340 =item distribution_aliases
341
342 Map of distribution aliases to the distribution name
343
344 Default:
345          {experimental => 'experimental',
346           unstable     => 'unstable',
347           testing      => 'testing',
348           stable       => 'stable',
349           oldstable    => 'oldstable',
350           sid          => 'unstable',
351           lenny        => 'testing',
352           etch         => 'stable',
353           sarge        => 'oldstable',
354          }
355
356 =cut
357
358 set_default(\%config,'distribution_aliases',
359             {experimental => 'experimental',
360              unstable     => 'unstable',
361              testing      => 'testing',
362              stable       => 'stable',
363              oldstable    => 'oldstable',
364              sid          => 'unstable',
365              lenny        => 'testing',
366              etch         => 'stable',
367              sarge        => 'oldstable',
368             },
369            );
370
371
372
373 =item distributions
374
375 List of valid distributions
376
377 Default: The values of the distribution aliases map.
378
379 =cut
380
381 my %_distributions_default;
382 @_distributions_default{values %{$config{distribution_aliases}}} = values %{$config{distribution_aliases}};
383 set_default(\%config,'distributions',[keys %_distributions_default]);
384
385 =item removal_distribution_tags
386
387 Tags which specifiy distributions to check
388
389 Default: @{$config{distributions}}
390
391 =cut
392
393 set_default(\%config,'removal_distribution_tags',
394             [@{$config{distributions}}]);
395
396 =item removal_default_distribution_tags
397
398 For removal/archival purposes, all bugs are assumed to have these tags
399 set.
400
401 Default: qw(unstable testing);
402
403 =cut
404
405 set_default(\%config,'removal_default_distribution_tags',
406             [qw(unstable testing)]
407            );
408
409 =item removal_strong_severity_default_distribution_tags
410
411 For removal/archival purposes, all bugs with strong severity are
412 assumed to have these tags set.
413
414 Default: qw(unstable testing stable);
415
416 =cut
417
418 set_default(\%config,'removal_strong_severity_default_distribution_tags',
419             [qw(unstable testing stable)]
420            );
421
422
423 =item removal_architectures
424
425 For removal/archival purposes, these architectures are consulted if
426 there is more than one architecture applicable. If the bug is in a
427 package not in any of these architectures, the architecture actually
428 checked is undefined.
429
430 Default: qw(i386 amd64 arm ppc sparc alpha);
431
432 =cut
433
434 set_default(\%config,'removal_architectures',
435             [qw(i386 amd64 arm ppc sparc alpha)]
436            );
437
438
439 =item package_name_re
440
441 The regex which will match a package name
442
443 Default: '[a-z0-9][a-z0-9\.+-]+'
444
445 =cut
446
447 set_default(\%config,'package_name_re',
448             '[a-z0-9][a-z0-9\.+-]+');
449
450 =item package_version_re
451
452 The regex which will match a package version
453
454 Default: '[A-Za-z0-9:+\.-]+'
455
456 =cut
457
458 set_default(\%config,'package_version_re',
459             '[A-Za-z0-9:+\.~-]+');
460
461
462 =item control_internal_requester
463
464 This address is used by Debbugs::Control as the request address which
465 sent a control request for faked log messages.
466
467 Default:"Debbugs Internal Request <$config{maintainer_email}>"
468
469 =cut
470
471 set_default(\%config,'control_internal_requester',
472             "Debbugs Internal Request <$config{maintainer_email}>",
473            );
474
475 =item control_internal_request_addr
476
477 This address is used by Debbugs::Control as the address to which a
478 faked log message request was sent.
479
480 Default: "internal_control\@$config{email_domain}";
481
482 =cut
483
484 set_default(\%config,'control_internal_request_addr',
485             'internal_control@'.$config{email_domain},
486            );
487
488
489 =item exclude_from_control
490
491 Addresses which are not allowed to send messages to control
492
493 =cut
494
495 set_default(\%config,'exclude_from_control',[]);
496
497
498
499
500 set_default(\%config,'default_severity','normal');
501 set_default(\%config,'show_severities','critical, grave, normal, minor, wishlist');
502 set_default(\%config,'strong_severities',[qw(critical grave)]);
503 set_default(\%config,'severity_list',[qw(critical grave normal wishlist)]);
504 set_default(\%config,'severity_display',{critical => "Critical $config{bugs}",
505                                          grave    => "Grave $config{bugs}",
506                                          normal   => "Normal $config{bugs}",
507                                          wishlist => "Wishlist $config{bugs}",
508                                         });
509
510 set_default(\%config,'tags',[qw(patch wontfix moreinfo unreproducible fixed),
511                              @{$config{distributions}}
512                             ]);
513
514 set_default(\%config,'bounce_froms','^mailer|^da?emon|^post.*mast|^root|^wpuser|^mmdf|^smt.*|'.
515             '^mrgate|^vmmail|^mail.*system|^uucp|-maiser-|^mal\@|'.
516             '^mail.*agent|^tcpmail|^bitmail|^mailman');
517
518 set_default(\%config,'config_dir',dirname(exists $ENV{DEBBUGS_CONFIG_FILE}?$ENV{DEBBUGS_CONFIG_FILE}:'/etc/debbugs/config'));
519 set_default(\%config,'spool_dir','/var/lib/debbugs/spool');
520 set_default(\%config,'incoming_dir','incoming');
521 set_default(\%config,'web_dir','/var/lib/debbugs/www');
522 set_default(\%config,'doc_dir','/var/lib/debbugs/www/txt');
523 set_default(\%config,'lib_path','/usr/lib/debbugs');
524
525 set_default(\%config,'maintainer_file',$config{config_dir}.'/Maintainers');
526 set_default(\%config,'maintainer_file_override',$config{config_dir}.'/Maintainers.override');
527 set_default(\%config,'pseudo_maint_file',$config{config_dir}.'/pseudo-packages.maint');
528 set_default(\%config,'pseudo_desc_file',$config{config_dir}.'/pseudo-packages.description');
529 set_default(\%config,'package_source',$config{config_dir}.'/indices/sources');
530
531
532 =item version_packages_dir
533
534 Location where the version package information is kept; defaults to
535 spool_dir/../versions/pkg
536
537 =cut
538
539 set_default(\%config,'version_packages_dir',$config{spool_dir}.'/../versions/pkg');
540
541 =item version_time_index
542
543 Location of the version/time index file. Defaults to
544 spool_dir/../versions/idx/versions_time.idx if spool_dir/../versions
545 exists; otherwise defaults to undef.
546
547 =cut
548
549
550 set_default(\%config,'version_time_index', -d $config{spool_dir}.'/../versions' ? $config{spool_dir}.'/../versions/indices/versions_time.idx' : undef);
551
552 =item version_index
553
554 Location of the version index file. Defaults to
555 spool_dir/../versions/indices/versions.idx if spool_dir/../versions
556 exists; otherwise defaults to undef.
557
558 =cut
559
560 set_default(\%config,'version_index',-d $config{spool_dir}.'/../versions' ? $config{spool_dir}.'/../versions/indices/versions.idx' : undef);
561
562 =item binary_source_map
563
564 Location of the binary -> source map. Defaults to
565 spool_dir/../versions/indices/bin2src.idx if spool_dir/../versions
566 exists; otherwise defaults to undef.
567
568 =cut
569
570 set_default(\%config,'binary_source_map',-d $config{spool_dir}.'/../versions' ? $config{spool_dir}.'/../versions/indices/binsrc.idx' : undef);
571
572 =item source_binary_map
573
574 Location of the source -> binary map. Defaults to
575 spool_dir/../versions/indices/src2bin.idx if spool_dir/../versions
576 exists; otherwise defaults to undef.
577
578 =cut
579
580 set_default(\%config,'source_binary_map',-d $config{spool_dir}.'/../versions' ? $config{spool_dir}.'/../versions/indices/srcbin.idx' : undef);
581
582
583
584 set_default(\%config,'post_processall',[]);
585
586 =item sendmail
587
588 Sets the sendmail binary to execute; defaults to /usr/lib/sendmail
589
590 =cut
591
592 set_default(\%config,'sendmail','/usr/lib/sendmail');
593
594 =item spam_scan
595
596 Whether or not spamscan is being used; defaults to 0 (not being used
597
598 =cut
599
600 set_default(\%config,'spam_scan',0);
601
602
603 =back
604
605
606 =head2 Text Fields
607
608 The following are the only text fields in general use in the scripts;
609 a few additional text fields are defined in text.in, but are only used
610 in db2html and a few other specialty scripts.
611
612 Earlier versions of debbugs defined these values in /etc/debbugs/text,
613 but now they are required to be in the configuration file. [Eventually
614 the longer ones will move out into a fully fledged template system.]
615
616 =cut
617
618 =over
619
620 =item bad_email_prefix
621
622 This prefixes the text of all lines in a bad e-mail message ack.
623
624 =cut
625
626 set_default(\%config,'bad_email_prefix','');
627
628
629 =item text_instructions
630
631 This gives more information about bad e-mails to receive.in
632
633 =cut
634
635 set_default(\%config,'text_instructions',$config{bad_email_prefix});
636
637 =item html_tail
638
639 This shows up at the end of (most) html pages
640
641 =cut
642
643 set_default(\%config,'html_tail',<<END);
644  <ADDRESS>$config{maintainer} &lt;<A HREF=\"mailto:$config{maintainer_email}\">$config{maintainer_email}</A>&gt;.
645  Last modified:
646  <!--timestamp-->
647  SUBSTITUTE_DTIME
648  <!--timestamp-->
649  <P>
650  <A HREF=\"http://$config{web_domain}/\">Debian $config{bug} tracking system</A><BR>
651  Copyright (C) 1999 Darren O. Benham,
652  1997,2003 nCipher Corporation Ltd,
653  1994-97 Ian Jackson.
654  </ADDRESS>
655 END
656
657
658 =item html_expire_note
659
660 This message explains what happens to archive/remove-able bugs
661
662 =cut
663
664 set_default(\%config,'html_expire_note',
665             "(Closed $config{bugs} are archived $config{remove_age} days after the last related message is received.)");
666
667 =back
668
669 =cut
670
671
672 sub read_config{
673      my ($conf_file) = @_;
674      # first, figure out what type of file we're reading in.
675      my $fh = new IO::File $conf_file,'r'
676           or die "Unable to open configuration file $conf_file for reading: $!";
677      # A new version configuration file must have a comment as its first line
678      my $first_line = <$fh>;
679      my ($version) = defined $first_line?$first_line =~ /VERSION:\s*(\d+)/i:undef;
680      if (defined $version) {
681           if ($version == 1) {
682                # Do something here;
683                die "Version 1 configuration files not implemented yet";
684           }
685           else {
686                die "Version $version configuration files are not supported";
687           }
688      }
689      else {
690           # Ugh. Old configuration file
691           # What we do here is we create a new Safe compartment
692           # so fucked up crap in the config file doesn't sink us.
693           my $cpt = new Safe or die "Unable to create safe compartment";
694           # perldoc Opcode; for details
695           $cpt->permit('require',':filesys_read','entereval','caller','pack','unpack','dofile');
696           $cpt->reval(qq(require '$conf_file';));
697           die "Error in configuration file: $@" if $@;
698           # Now what we do is check out the contents of %EXPORT_TAGS to see exactly which variables
699           # we want to glob in from the configuration file
700           for my $variable (@{$EXPORT_TAGS{globals}}) {
701                my ($hash_name,$glob_name,$glob_type) = __convert_name($variable);
702                my $var_glob = $cpt->varglob($glob_name);
703                my $value; #= $cpt->reval("return $variable");
704                # print STDERR "$variable $value",qq(\n);
705                if (defined $var_glob) {{
706                     no strict 'refs';
707                     if ($glob_type eq '%') {
708                          $value = {%{*{$var_glob}}} if defined *{$var_glob}{HASH};
709                     }
710                     elsif ($glob_type eq '@') {
711                          $value = [@{*{$var_glob}}] if defined *{$var_glob}{ARRAY};
712                     }
713                     else {
714                          $value = ${*{$var_glob}};
715                     }
716                     # We punt here, because we can't tell if the value was
717                     # defined intentionally, or if it was just left alone;
718                     # this tries to set sane defaults.
719                     set_default(\%config,$hash_name,$value) if defined $value;
720                }}
721           }
722      }
723 }
724
725 sub __convert_name{
726      my ($variable) = @_;
727      my $hash_name = $variable;
728      $hash_name =~ s/^([\$\%\@])g//;
729      my $glob_type = $1;
730      my $glob_name = 'g'.$hash_name;
731      $hash_name =~ s/(HTML|CGI)/ucfirst(lc($1))/ge;
732      $hash_name =~ s/^([A-Z]+)/lc($1)/e;
733      $hash_name =~ s/([A-Z]+)/'_'.lc($1)/ge;
734      return $hash_name unless wantarray;
735      return ($hash_name,$glob_name,$glob_type);
736 }
737
738 # set_default
739
740 # sets the configuration hash to the default value if it's not set,
741 # otherwise doesn't do anything
742 # If $USING_GLOBALS, then sets an appropriate global.
743
744 sub set_default{
745      my ($config,$option,$value) = @_;
746      my $varname;
747      if ($USING_GLOBALS) {
748           # fix up the variable name
749           $varname = 'g'.join('',map {ucfirst $_} split /_/, $option);
750           # Fix stupid HTML names
751           $varname =~ s/(Html|Cgi)/uc($1)/ge;
752      }
753      # update the configuration value
754      if (not $USING_GLOBALS and not exists $config->{$option}) {
755           $config->{$option} = $value;
756      }
757      elsif ($USING_GLOBALS) {{
758           no strict 'refs';
759           # Need to check if a value has already been set in a global
760           if (defined *{"Debbugs::Config::${varname}"}) {
761                $config->{$option} = *{"Debbugs::Config::${varname}"};
762           }
763           else {
764                $config->{$option} = $value;
765           }
766      }}
767      if ($USING_GLOBALS) {{
768           no strict 'refs';
769           *{"Debbugs::Config::${varname}"} = $config->{$option};
770      }}
771 }
772
773
774 ### import magick
775
776 # All we care about here is whether we've been called with the globals or text option;
777 # if so, then we need to export some symbols back up.
778 # In any event, we call exporter.
779
780 sub import {
781      if (grep /^:(?:text|globals)$/, @_) {
782           $USING_GLOBALS=1;
783           for my $variable (map {@$_} @EXPORT_TAGS{map{(/^:(text|globals)$/?($1):())} @_}) {
784                my $tmp = $variable;
785                no strict 'refs';
786                # Yes, I don't care if these are only used once
787                no warnings 'once';
788                # No, it doesn't bother me that I'm assigning an undefined value to a typeglob
789                no warnings 'misc';
790                my ($hash_name,$glob_name,$glob_type) = __convert_name($variable);
791                $tmp =~ s/^[\%\$\@]//;
792                *{"Debbugs::Config::${tmp}"} = ref($config{$hash_name})?$config{$hash_name}:\$config{$hash_name};
793           }
794      }
795      Debbugs::Config->export_to_level(1,@_);
796 }
797
798
799 1;