debbugs-2.4.1ubuntu1/0000755000175000017500000000000007670052014013136 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/Makefile0000644000175000017500000000454507570413241014610 0ustar jw2328jw2328# top-level Makefile for debbugs # probably requires GNU make to run properly sbin_dir := $(DESTDIR)/usr/sbin 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)) htmls_in := $(wildcard html/*.html.in) cgis := $(wildcard cgi/*.cgi cgi/*.pl) install_exec := install -m755 -p install_data := install -m644 -p install: install_mostfiles # install basic debbugs documentation $(install_data) COPYING UPGRADE README debian/README.mail $(doc_dir) # configure debbugs $(sbin_dir)/debbugsconfig install_mostfiles: # create the directories if they aren't there for dir in $(sbin_dir) $(etc_dir)/html $(etc_dir)/indices \ $(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-h $(scripts_dir) $(examples_dir) $(man8_dir); \ do test -d $$dir || $(install_exec) -d $$dir; done # install the scripts $(foreach script,$(scripts_in), $(install_exec) $(script) $(scripts_dir)/$(patsubst scripts/%.in,%,$(script));) $(install_data) scripts/errorlib.in $(scripts_dir)/errorlib # install examples $(install_data) scripts/config.in $(examples_dir)/config $(install_data) scripts/text.in $(examples_dir)/text $(install_data) debian/crontab misc/nextnumber misc/Maintainers \ misc/Maintainers.override misc/pseudo-packages.description \ misc/sources $(examples_dir) # install the HTML pages etc $(foreach html, $(htmls_in), $(install_data) $(html) $(etc_dir)/html;) $(install_data) html/htaccess $(var_dir)/www/db/.htaccess # install the CGIs for cgi in $(cgis); do $(install_exec) $$cgi $(var_dir)/www/cgi; done $(install_exec) cgi/bugs-fetch2.pl.in $(var_dir)/www/cgi/bugs-fetch2.pl # install debbugsconfig $(install_exec) debian/debbugsconfig $(sbin_dir) $(install_data) debian/debbugsconfig.8 $(man8_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 debbugs-2.4.1ubuntu1/COPYING0000644000175000017500000004307006763547414014214 0ustar jw2328jw2328 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. debbugs-2.4.1ubuntu1/debbugs-dump0000755000175000017500000000620007103411555015440 0ustar jw2328jw2328#!/usr/bin/perl -w push(@INC,'.'); use strict; use Debbugs::Config qw(%Globals &ParseConfigFile); #use Debvote::Email qw(&InitEmailTags &LoadEmail &ProcessTags %gtags); use Debbugs::DBase; use Getopt::Long; ############################################################################# # Customization Variables ############################################################################# ############################################################################# # Gloabal Variable Declaration ############################################################################# my $VERSION = '3.01'; #External Version number my $BANNER = "DebBugs v$VERSION"; #Version Banner - text form my $FILE = 'debbugs-dump'; #File name my $config = ''; my @config = undef; ############################################################################# # Commandline parsing ############################################################################# # Hash used to process commandline options my $verbose = 0; my $quiet = 0; my $debug = 0; my %opthash = (# ------------------ actions "config|c=s" => \$config, "help|h" => \&syntax, "version|V" => \&banner, "verbose|v!" => \$verbose, "quiet|q!" => \$quiet, "debug|d+" => \$debug, # Count the -d flags ); Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev'); GetOptions(%opthash) or &syntax( 1 ); if ( $debug > 1 ) { print "D2: Commandline:\n"; print "\tconfig = $config\n" unless $config eq ''; print "\tverbos\n" if $verbose; print "\tquiet\n" if $quiet; print "\tdebug = $debug\n"; } $Globals{ 'debug' } = $debug; $Globals{ 'quiet' } = $quiet; $Globals{ 'verbose' } = $verbose; ############################################################################# # Read Config File and parse ############################################################################# $config = "./debbugs.cfg" if( $config eq '' ); print "D1: config file=$config\n" if $Globals{ 'debug' }; @config = ParseConfigFile( $config ); ## Put Real Code Here my @bugs = Debbugs::DBase::GetBugList(["db", "archive"]); print "Active Bugs:"; foreach (@bugs) { print " $_"; } print "\n"; foreach (@bugs) { Debbugs::DBase::OpenRecord( $_ ); Debbugs::DBase::OpenLogfile( $_ ); Debbugs::DBase::ReadLogfile( $_ ); Debbugs::DBase::CloseLogfile(); Debbugs::DBase::ReadRecord( $_ ); foreach my $key ( keys( %Record ) ) { print "Key= $key Value = " . $Record{ $key } . "\n"; } Debbugs::DBase::CloseRecord(); } ############################################################################# # Ack Back ############################################################################# sub syntax { print "$BANNER\n"; print <<"EOT-EOT-EOT"; Syntax: $FILE [options] -c, --config CFGFILE read CFGFILE for configuration (default=./debvote.cfg) -h, --help display this help text -v, --verbose verbose messages -q, --quiet cancels verbose in a config file -V, --version display Debvote version and exit -d, --debug turn debug messages ON (multiple -d for more verbose) EOT-EOT-EOT exit $_[0]; } debbugs-2.4.1ubuntu1/README0000644000175000017500000001036607664370030014030 0ustar jw2328jw2328 DEBIAN BUG TRACKING SYSTEM -------------------------- This bug tracking system was developed by Ian Jackson from 1994-1997, with assistance from nCipher Corporation Limited in 1997. nCipher allowed Ian to redistribute modifications he made to the system while working as an employee of nCipher. ============================================================================= SYSTEM REQUIREMENTS ============================================================================= - GNU date - GNU gzip - Perl 5 (5.005 is known to work) - Mailtools and MIME-tools perl modules to manipulate email - Lynx 2.7 or later - The bug system requires its own mail domain. It comes with code which understands how exim, qmail and sendmail deliver mail for such a domain to a script. - A webserver. For the old system of static HTML pages generated for bug reports and index pages, this is easiest if the bug system can write directly to the webspace; for the new system of CGI scripts that generate web pages on the fly, write access is not required. - Somewhere to run CGI scripts (unless you don't need the web forms for searching for bugs by number, package, maintainer or submitter). ============================================================================= INSTALLATION INSTRUCTIONS ============================================================================= Install the Debian package and read /usr/share/doc/debbugs/README.Debian file. If you can't use the .deb, do the following: 1. Run "make install" from the source directory. 2. Edit the config files in /etc/debbugs/ directory to suit your needs. Re-run debbugsconfig when you're finished to regenerate the documentation. 3. Set up the mail arrangements to deliver mail to the right place, and to set up a blackhole mail alias if you need one. Ensure that owner@bugs, the address of the BTS owner, if that's what you're using, is handled by the MTA. All other email should be piped into the receive script. 4. Set up your HTTP server to point people looking for bug reports to /var/lib/debbugs/www and set /var/lib/debbugs/www/cgi as a valid CGI directory. 5. Test things a bit, by sending mail messages to the bug system and running /usr/lib/debbugs/processall and/or /usr/lib/debbugs/rebuild. The latter updates index files used by the CGI scripts. If you're feeling brave, you can link /var/lib/debbugs/spool/index.db to index.db.realtime and .../index.archive to index.archive.realtime to remove the need for the rebuild script; this is still semi-experimental. 6. If all seems well then install the crontab from /usr/share/doc/debbugs/examples/crontab. Notes: Each line of /etc/debbugs/Maintainers file needs to be formatted like this: "package maintainer name ". If you need a template, look in /usr/share/doc/debbugs/examples/ directory. ============================================================================= FURTHER INFORMATION ============================================================================= Web: http://benham.net/debbugs/ Email: debian-debbugs@lists.debian.org (mailing list) debian-debbugs-request@lists.debian.org with the word subscribe in the subject line ============================================================================= COPYRIGHT AND LACK-OF-WARRANTY NOTICE ============================================================================= Copyright 1999 Darren O. Benham Copyright 1994,1995,1996,1997 Ian Jackson Copyright 1997 nCipher Corporation Limited This bug system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program and documentation is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program, or one should be available above; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Darren Benham 14 Oct, 1999 debbugs-2.4.1ubuntu1/UPGRADE0000644000175000017500000001410107667577323014172 0ustar jw2328jw2328 Debbugs upgrade notes +=====================+ From 2.4 to 2.4.1 ----------------- Add the following variables to the /etc/debbugs/config file: $gHTMLSuffix = ".html"; The use of $gCGIDomain has been cleaned up; formerly, it needed to begin with "http://", which was confusingly inconsistent with all the other domain variables. If you worked around this in your configuration, you will need to recheck it. From 2.3 to 2.4 --------------- Add the following variables to the /etc/debbugs/config file: $gWebHost = "localhost"; # e.g. www.debian.org $gWebHostBugDir = "Bugs"; # e.g. Bugs # For now, don't change this one manually! $gWebDomain = "$gWebHost/$gWebHostBugDir"; $gCGIDomain = "$gWebDomain/Bugs/cgi"; # e.g. cgi.debian.org $gPackagePages = "packages.debian.org"; # e.g. packages.debian.org $gSubscriptionDomain = "packages.something"; # e.g. packages.qa.debian.org $gMaintainerFileOverride = "$gConfigDir/Maintainers.override"; $gUnknownMaintainerEmail = "$gMaintainerEmail"; $gPackageSource = "$gConfigDir/indices/sources"; $gWebDomain will probably exist already; change it as shown above. $gSubscriptionDomain is optional. $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: ############################################################################ # Description of the tags ############################################################################ $gHTMLTagDesc = "
patch
A patch or some other easy procedure for fixing the $gBug is included in the $gBug logs. If there\'s a patch, but it doesn\'t resolve the $gBug adequately or causes some other problems, this tag should not be used.
wontfix
This $gBug won\'t be fixed. Possibly because this is a choice between two arbitrary ways of doing things and the maintainer and submitter prefer different ways of doing things, possibly because changing the behaviour will cause other, worse, problems for others, or possibly for other reasons.
moreinfo
This $gBug can\'t be addressed until more information is provided by the submitter. The $gBug will be closed if the submitter doesn\'t provide ore information in a reasonable (few months) timeframe. This is for $gBugs like \"It doesn\'t work\". What doesn\'t work?
unreproducible
This $gBug can\'t be reproduced on the maintainer\'s system. Assistance from third parties is needed in diagnosing the cause of the problem.
fixed
This $gBug is fixed or worked around, but there\'s still an issue that needs to be resolved. (This will eventually replace the \"fixed\" severity)
stable
This $gBug affects the stable distribution in particular. This is only intended to be used for ease in identifying release critical $gBugs that affect the stable distribution. It\'ll be replaced eventually with 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 --------------- There are three new scripts that have to be installed in CGI and the front page (or any other search you have set up) needs to be changed to use these scripts. They are: * bugreport.cgi * common.pl * pkgreport.cgi Add the following variables to the /etc/debbugs/config file: (the /usr/share/doc/debbugs/examples/config file can be used as a reference) $gSummaryList = "summary.list"; #debian-bugs-report@lists $gSaveOldBugs = 1; Make sure you do not have a double ,, as shown here if you're using the default severities. Also, 'fixed' was added to the default severities: - 'normal',"Normal $gBugs",, + 'normal',"Normal $gBugs", + 'fixed',"NMU Fixed $gBugs", These have been added to the /etc/debbugs/text file: +############################################################################ +# Here is a blurb to point people to ftp archive of directions. It is +# used by the receive script when bouncing a badly formatted email +# +# $gTextInstructions = "$gBadEmailPrefix +# $gBadEmailPrefix Instructions are available from ftp.debian.org in /debian +# $gBadEmailPrefix and at all Debian mirror sites, in the files: +# $gBadEmailPrefix doc/bug-reporting.txt +# $gBadEmailPrefix doc/bug-log-access.txt +# $gBadEmailPrefix doc/bug-maint-info.txt +# $gBadEmailPrefix"; +############################################################################ +$gTextInstructions = "$gBadEmailPrefix"; + + $gHTMLStart = ""; #this is used by HTML generation to create the "uniform look" The following code was added to /etc/debbugs/text if you use the new fixed severity
wishlist -
for any feature request, and also for any $gBugs that are very difficult - to fix due to major design considerations."; +
for any feature request, and also for any $gBugs that are very + difficult to fix due to major design considerations."; + +
fixed +
fixed in the current version in the unstable archive but the fix has + not been fixed by the person responsible. In All such entries in /etc/debbugs/text, if you replace with $gHTMLStart, all html pages will have the same look (as specified in $gHTMLStart): $gSummaryIndex = "$gProject $gBug report logs - summary index $gPackageLog = "$gProject $gBug report logs - index by package debbugs-2.4.1ubuntu1/build0000755000175000017500000000616207565767724014220 0ustar jw2328jw2328#!/bin/sh set -e cwd="`pwd`" date="`date +'%d %h %Y'`" process () { (cd config && rm -f trace && m4 -P -I "$config" -DDB_DATE="$date" \ common/init.m4 config.m4 common/main.m4 - common/final.m4 ) } txtconvert () { src=$1; dst=$2 echo " generating $dst from $src ..." rm -f html/txt/$dst.html html/txt/$dst.out perl -ne 'print unless m/^Other pages:$/ .. /^\/' \ html/$src.out >html/txt/$dst.html HOME=/dev/null lynx -nolist -dump -cfg=/dev/null \ file://localhost/$cwd/html/txt/$dst.html >html/txt/$dst.out rm html/txt/$dst.html } config=local if [ $# != 0 ]; then config="$1"; shift; fi if [ $# != 0 ]; then echo >&2 'usage: ./build []'; false; fi if [ ! -f config/$config/config.m4 ]; then echo >&2 "no such config: $config"; false; fi errs="`echo 'm4_undivert(1)' | process | sed -ne '/[^ \t]/ s/^/ /p'`" if [ "x$errs" != x ] then echo >&2 'unexpected residues:' echo "$errs" false fi echo "macro substitutions ..." for f in `find -name '*.in'` do h="`echo $f | sed -e 's/\.in$//'`" process <"$f" >"$h.out" mv config/trace "$h.trace" if egrep 'DBC?U?_' /dev/null "$h.out" then echo >&2 'undefined macros' false fi [ ! -x "$f" ] || chmod +x "$h.out" done echo "documentation conversion ..." txtconvert Reporting.html bug-reporting.txt txtconvert Access.html bug-log-access.txt txtconvert server-request.html bug-log-mailserver.txt txtconvert Developer.html bug-maint-info.txt txtconvert server-control.html bug-maint-mailcontrol.txt txtconvert server-refcard.html bug-mailserver-refcard.txt cgilibexist=`echo 'test -f DBC_CGILIB_PATH && echo true || echo false' | process` htaccesspath=`echo DBC_HTACCESS_PATH | process` rm -f install install.new process <<'END' >install.new #!/bin/sh set -e test -d DBC_BASE || mkdir DBC_BASE bugsid () { echo "installing $1 ..." test -d "$2" || mkdir "$2" cd "$1" for f in *.out do h="`echo $f | sed -e 's/\.out$//'`" rm -f "$2/$f" cp "./$f" "$2/" mv -f "$2/$f" "$2/$h" done cd "$3" } bugsid scripts DBC_SCRIPT_PATH .. bugsid html DBC_HTML_PATH .. bugsid html/txt DBC_DOCDIR_PATH ../.. bugsid cgi DBC_CGI_PATH .. END if [ "x$htaccesspath" != x ]; then process <>install.new cat <<'END2' >$htaccesspath.new DBC_HTACCESS_CONTENTS END2 mv -f $htaccesspath.new $htaccesspath END fi if $cgilibexist then cgiii='cgi-lib already exists in DBC_CGILIB_PATH' else cgiii=' DBC_CGILIB_PATH' process <<'END' >>install.new echo "installing cgi-lib.pl ..." cp cgi/cgi-lib.pl DBC_CGILIB_PATH.new mv -f DBC_CGILIB_PATH.new DBC_CGILIB_PATH END fi process >>install.new <<'END' echo "setting up bugs database ..." DBC_SCRIPT_PATH/initialise echo "done." echo "You will have to intall the crontab (misc/crontab.out) yourself." exit 0 END chmod +x install.new mv -f install.new install cgi="`cd cgi && echo *.out | sed -e 's/\.out//g'`" process <{LOG} = new FileHandle; # $self->{AGE} = undef; # $self->{PEERS} = []; $self->{log} = []; $self->{Load} = &Load; bless ($self); return $self; } my %logClass = (); my %logType = (); sub Load { my ($self, $handle) = (shift, shift); foreach (keys %$self) { print "key=$_\n"; } while (<$handle>) { chomp; my ($char, $class, $type) = ($_, $logClass{ $_ }, $logType{ $_ }); my $msg = ""; while (<$handle>) { chomp; if ( $_ eq "\3" ) { last; } else { $msg .= "$_\n"; } } if( defined($class) ) { print "found handler $type for $char\n"; my $log = $class->new($msg); my @log = $self->{log}; push @log, ($log); } else { print "undefined handler for $char\n"; } } } BEGIN { use Exporter (); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); # set the version for version checking $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(new); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(); } 1; debbugs-2.4.1ubuntu1/Debbugs/DBase/Log.pm0000644000175000017500000000277307103411403016547 0ustar jw2328jw2328# TODO: Implement 'stale' checks, so that there is no need to explicitly # write out a record, before closing. package Debbugs::DBase::Log; use strict; sub new { my $self = {}; # $self->{LOG} = new FileHandle; # $self->{AGE} = undef; # $self->{PEERS} = []; $self->{log} = []; bless ($self); return $self; } my %logClass = (); my %logType = (); sub Register { my ($char, $type, $class) = (shift, shift, shift); $logClass{ $char } = $class; $logType{ $char } = $type; } sub Load { my ($self, $handle) = (shift, shift); foreach (keys %$self) { print "key=$_\n"; } while (<$handle>) { chomp; my ($char, $class, $type) = ($_, $logClass{ $_ }, $logType{ $_ }); my $msg = ""; while (<$handle>) { chomp; if ( $_ eq "\3" ) { last; } else { $msg .= "$_\n"; } } if( defined($class) ) { print "found handler $type for $char\n"; my $log = $class->new($msg); my @log = $self->{log}; push @log, ($log); } else { print "undefined handler for $char\n"; } } } BEGIN { use Exporter (); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); # set the version for version checking $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(new); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(); } 1; debbugs-2.4.1ubuntu1/Debbugs/DBase/Log/0000755000175000017500000000000007670052014016210 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/Debbugs/DBase/Log/Message.pm0000644000175000017500000000070307103411403020122 0ustar jw2328jw2328# TODO: Implement 'stale' checks, so that there is no need to explicitly # write out a record, before closing. package Debbugs::DBase::Log::Message; use strict; BEGIN { Debbugs::DBase::Log::Register("\7", "Message", "Debbugs::DBase::Log::Message"); } sub new { my $self = {}; $self->{TYPE} = "Message"; $self->{MSG} = shift; bless ($self); return $self; } END { } # module clean-up code here (global destructor) 1; debbugs-2.4.1ubuntu1/Debbugs/DBase/Log/Html.pm0000644000175000017500000000066707103411403017453 0ustar jw2328jw2328# TODO: Implement 'stale' checks, so that there is no need to explicitly # write out a record, before closing. package Debbugs::DBase::Log::Html; use strict; BEGIN { Debbugs::DBase::Log::Register("\6", "Html", "Debbugs::DBase::Log::Html"); } sub new { my $self = {}; $self->{TYPE} = "Html"; $self->{MSG} = shift; bless ($self); return $self; } END { } # module clean-up code here (global destructor) 1; debbugs-2.4.1ubuntu1/Debbugs/DBase/Log/Mail.pm0000644000175000017500000000121507103411403017417 0ustar jw2328jw2328# TODO: Implement 'stale' checks, so that there is no need to explicitly # write out a record, before closing. package Debbugs::DBase::Log::Mail; use Debbugs::DBase::LogEntry; use Exporter; use strict; BEGIN { use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @ISA = ( "Debbugs::DBase::LogEntry" ); Debbugs::DBase::Log::Register("\2", "Mail", "Debbugs::DBase::Log::Mail"); } sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; $self->{TYPE} = "Html"; $self->{MSG} = shift; bless ($self, $class); return $self; } END { } # module clean-up code here (global destructor) 1; debbugs-2.4.1ubuntu1/Debbugs/Common.pm0000644000175000017500000000222507103014371016273 0ustar jw2328jw2328package Debbugs::Common; use strict; BEGIN { use Exporter (); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); # set the version for version checking $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(&fail &NameToPathHash &sani &quit); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(); } use vars @EXPORT_OK; use Debbugs::Config qw(%Globals); use FileHandle; my @cleanups; my $DEBUG = new FileHandle; sub fail { print "$_[0]\n"; exit 1; } sub NameToPathHash { # 12345 -> 5/4/3/12345 # 12 -> s/2/1/12 my $name = $_[0]; my $tmp = $name; $name =~ /^.*?(.)(.)(.)$/ ; if(!defined($1)) { $name =~ /^(.*?)(.)(.)$/ ; $tmp = "$1$2$3"."s"; } $tmp =~ /^.*?(.)(.)(.)$/ ; return "$3/$2/$1/$name"; } sub DEBUG { print $DEBUG $_; } sub quit { DEBUG("quitting >$_[0]<\n"); my $u; while ($u= $cleanups[$#cleanups]) { &$u; } die "*** $_[0]\n"; } sub sani { HTML::Entities::encode($a); } 1; END { } # module clean-up code here (global destructor) debbugs-2.4.1ubuntu1/Debbugs/Config.pm0000644000175000017500000001316307104056025016256 0ustar jw2328jw2328package Debbugs::Config; # assumes Some/Module.pm use strict; BEGIN { use Exporter (); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); # set the version for version checking $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(%Globals %GTags %Strong %Severity ); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(%Globals %GTags %Severity %Strong &ParseConfigFile &ParseXMLConfigFile); } use vars @EXPORT_OK; use Debbugs::Common; use Debbugs::Email; # initialize package globals, first exported ones %Severity = (); %Strong = (); $Severity{ 'Text' } = (); %GTags = (); %Globals = ( "debug" => 0, "verbose" => 0, "quiet" => 0, ##### domains "email-domain" => "bugs.domain.com", "list-domain" => "lists.domain.com", "web-domain" => "web.domain.com", "cgi-domain" => "cgi.domain.com", ##### identification "project-short" => "debbugs", "project-long" => "Debbugs Test Project", "owner-name" => "Fred Flintstone", "owner-email" => "owner\@bugs.domain.com", ##### directories "work-dir" => "/var/lib/debbugs/spool", "spool-dir" => "/var/lib/debbugs/spool/incoming", "www-dir" => "/var/lib/debbugs/www", "doc-dir" => "/var/lib/debbugs/www/txt", ##### files "maintainer-file" => "/etc/debbugs/Maintainers", "pseudo-description" => "/etc/debbugs/pseudo-packages.description"); my %ConfigMap = ( "Email Domain" => "email-domain", "List Domain" => "list-domain", "Web Domain" => "web-domain", "CGI Domain" => "cgi-domain", "Short Name" => "project-short", "Long Name" => "project-long", "Owner Name" => "owner-name", "Owner Email" => "owner-email", "Errors Email" => "errors-email", "Owner Webpage" => "owner-webpage", "Spool Dir" => "spool-dir", "Work Dir" => "work-dir", "Web Dir" => "www-dir", "Doc Dir" => "doc-dir", "Template Dir" => "template-dir", "Not-Don-Con" => "not-don-con", "Maintainer File" => "maintainer-file", "Pseudo Description File" => "pseudo-description", "Submit List" => "submit-list", "Maint List" => "maint-list", "Quiet List" => "quiet-list", "Forwarded List" => "forwarded-list", "Done List" => "done-list", "Request List" => "request-list", "Submitter List" => "submitter-list", "Control List" => "control-list", "Summary List" => "summary-list", "Mirror List" => "mirror-list", "Mailer" => "mailer", "Singular Term" => "singluar", "Plural Term" => "plural", "Expire Age" => "expire-age", "Save Expired Bugs" => "save-expired", "Mirrors" => "mirrors", "Default Severity" => "default-severity", "Normal Severity" => "normal-severity", ); my %GTagsMap = ( "email-domain" => "EMAIL_DOMAIN", "list-domain" => "LIST_DOMAIN", "web-domain" => "WEB_DOMAIN", "cgi-domain" => "CGI_DOMAIN", "project-short" => "SHORT_NAME", "project-long" => "LONG_NAME", "owner-name" => "OWNER_NAME", "owner-email" => "OWNER_EMAIL", "submit-list" => "SUBMIT_LIST", "quiet-list" => "QUIET_LIST", "forwarded-list" => "FORWARDED_LIST", "done-list" => "DONE_LIST", "request-list" => "REQUEST_LIST", "submitter-list" => "SUBMITTER_LIST", "control-list" => "CONTROL_LIST", "summary-list" => "SUMMARY_LIST", "mirror-list" => "MIRROR_LIST", "mirrors" => "MIRRORS" ); sub strip { my $string = $_[0]; chop $string while $string =~ /\s$/; return $string; } ############################################################################# # Read Config File and parse ############################################################################# sub ParseConfigFile { my $configfile = $_[0]; my @config; my $votetitle = ''; my $ballottype = ''; #load config file print "V: Loading Config File\n" if $Globals{ "verbose" }; open(CONFIG,$configfile) or &fail( "E: Unable to open `$configfile'" ); @config = ; close CONFIG; #parse config file print "V: Parsing Config File\n" if $Globals{ "verbose" }; print "D3: Parse Config:\n@config\n" if $Globals{ 'debug' } > 2; print "D1: Configuration\n" if $Globals{ 'debug' }; for( my $i=0; $i<=$#config; $i++) { $_ = $config[$i]; chop $_; next unless length $_; next if /^#/; if ( /^([^:=]*)\s*[:=]\s*([^#]*)/i ) { my $key = strip( $1 ); my $value = strip( $2 ); $value = "" if(!defined($value)); if ( $key =~ /Severity\s+#*(\d+)\s*(.*)/ ) { my $options = $2; my $severity = $1; if( $options =~ /\btext\b/ ) { $Severity{ 'Text' }{ $severity } = $value; print "D2: (config) Severity $severity text = $value\n" if $Globals{ 'debug' } > 1; } else { $Severity{ $1 } = $value; print "D2: (config) Severity $severity = $value" if $Globals{ 'debug' } > 1; if( $options =~ /\bdefault\b/ ) { $Globals{ "default-severity" } = $severity; print ", default" if $Globals{ 'debug' } > 1; } if( $options =~ /\bstrong\b/ ) { $Strong{ $severity } = 1; print ", strong" if $Globals{ 'debug' } > 1; } print "\n" if $Globals{ 'debug' } > 1; } next; } else { my $map = $ConfigMap{$key}; if(defined($map)) { $Globals{ $map } = $value; print "$key = '$value'" if $Globals{ 'debug' } > 1; my $gtag = $GTagsMap{ $map }; if(defined($gtag)) { $GTags{ $gtag } = $value; print "GTag = '$gtag'" if $Globals{ 'debug' } > 1; } print "\n" if $Globals{ 'debug' } > 1; next; } else { print "$key\n"; } } } print "Unknown line in config!($_)\n"; next; } return @config; } END { } # module clean-up code here (global destructor) debbugs-2.4.1ubuntu1/Debbugs/DBase.pm0000644000175000017500000001727607123054033016036 0ustar jw2328jw2328# TODO: Implement 'stale' checks, so that there is no need to explicitly # write out a record, before closing. package Debbugs::DBase; # assumes Some/Module.pm use strict; BEGIN { use Exporter (); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); # set the version for version checking $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw(); } use vars @EXPORT_OK; use Fcntl ':flock'; use Debbugs::Config; use Debbugs::Email; use Debbugs::Common; use Debbugs::DBase::Log; use Debbugs::DBase::Log::Html; use Debbugs::DBase::Log::Message; use Debbugs::DBase::Log::Mail; use FileHandle; use File::Basename qw(&dirname); use File::Path; my $OpenedRecord = 0; my $OpenedLog = 0; my $FileHandle; my $LogfileHandle = new FileHandle; sub ParseVersion1Record { my @data = @_; my @fields = ( "originator", "date", "subject", "msgid", "package", "keywords", "done", "forwarded", "mergedwith", "severity" ); my $i = 0; my $tag; my (%record, %btags); print "D2: (DBase) Record Fields:\n" if $Globals{ 'debug' } > 1; foreach my $line ( @data ) { chop( $line ); $tag = $fields[$i]; $record{ $tag } = $line; print "\t $tag = $line\n" if $Globals{ 'debug' } > 1; $i++; $btags{ "BUG_$tag" } = $line; } return ( \%record, \%btags ); } sub ParseVersion2Record { # I envision the next round of records being totally different in # meaning. In order to maintain compatability, version tagging will be # implemented in the next go around and different versions will be sent # off to different functions to be parsed and interpreted into a format # that the rest of the system will understand. All data will be saved # in whatever 'new" format exists. The difference will be a "Version: x" # at the top of the file. print "No version 2 records are understood at this time\n"; exit 1; } sub ReadRecord { my ($recordnum, $with_log, $new) = (shift, shift, shift); my @data; my $record; my $btags; #Open Status File print "V: Reading status $recordnum\n" if $Globals{ 'verbose' }; if( $OpenedRecord != $recordnum ) { if( defined( $FileHandle ) ) { print "D1: Closing status $recordnum\n" if $Globals{ 'debug' }; $OpenedRecord = 0; close $FileHandle; $FileHandle = undef; } print "D1: Opening status $recordnum\n" if $Globals{ 'debug' }; $FileHandle = &OpenFile( ["db", "archive"], $recordnum, ".status", "status", $new ); if( !defined( $FileHandle ) ) { return undef; } } else { print "D1: Reusing status $recordnum\n" if $Globals{ 'debug' }; } #Lock status file print "D1: Locking status $recordnum\n" if $Globals{ 'debug' }; flock( $FileHandle, LOCK_EX ) || &fail( "Unable to lock record $recordnum\n" ); #Read in status file contents print "D1: Loading status $recordnum\n" if $Globals{ 'debug' }; seek( $FileHandle, 0, 0 ); @data = <$FileHandle>; #Parse Status File Contents if ( scalar( @data ) =~ /Version: (\d*)/ ) { if ( $1 == 2 ) { &ParseVersion2Record( @data ); } else { &fail( "Unknown record version: $1\n"); } } else { ($record, $btags) = &ParseVersion1Record( @data ); } if( $with_log ) { #DO READ IN LOG RECORD DATA STUFF } return ($record, $btags); } sub WriteRecord { my ($recordnum, %record) = @_; my @fields = ( "originator", "date", "subject", "msgid", "package", "keywords", "done", "forwarded", "mergedwith", "severity" ); #Open Status File print "V: Writing status $recordnum\n" if $Globals{ 'verbose' }; if( $OpenedRecord != $recordnum ) { if( defined( $FileHandle ) ) { print "D1: Closing status $recordnum\n" if $Globals{ 'debug' }; $OpenedRecord = 0; close $FileHandle; $FileHandle = undef; } print "D1: Opening status $recordnum\n" if $Globals{ 'debug' }; $FileHandle = &OpenFile( ["db", "archive"], $recordnum, ".status", "status", "old" ); if( !defined( $FileHandle ) ) { return undef; } } else { print "D1: Reusing status $recordnum\n" if $Globals{ 'debug' }; } #Lock status file print "D1: Locking status $recordnum\n" if $Globals{ 'debug' }; flock( $FileHandle, LOCK_EX ) || &fail( "Unable to lock record $recordnum\n" ); #Read in status file contents print "D1: Saving status $recordnum\n" if $Globals{ 'debug' }; seek( $FileHandle, 0, 0 ); for( my $i = 0; $i < $#fields; $i++ ) { if ( defined( $record{ $fields[$i] } ) ) { print $FileHandle $record{ $fields[$i] } . "\n"; } else { print $FileHandle "\n"; } } } sub GetFileName { my ($prePaths, $stub, $postPath, $desc, $new) = (shift, shift, shift, shift, shift); my $path; foreach my $prePath (@$prePaths) { $path = "/" . $prePath . "/" . $stub . $postPath; print "V: Opening $desc $stub\n" if $Globals{ 'verbose' }; print "D2: (DBase) trying $path\n" if $Globals{ 'debug' } > 1; if( ! -r $Globals{ "work-dir" } . $path ) { $path = "/" . $prePath . "/" . &NameToPathHash($stub) . $postPath; print "D2: (DBase) trying $path\n" if $Globals{ 'debug' } > 1; if( ! -r $Globals{ "work-dir" } . $path ) { next if( !$new =~ "new" ); } } if( -r $Globals{ "work-dir" } . $path ) { return $path; } if( ( ! -r $Globals{ "work-dir" } . $path ) && defined($new) && $new =~ "new") { my $dir = dirname( $path ); if ( ! -d $Globals{ "work-dir" } . $dir ) { mkpath($Globals{ "work-dir" } . $dir); } return $path; } } return undef; } sub OpenFile { my ($prePaths, $stub, $postPath, $desc, $new) = (shift, shift, shift, shift, shift); my $fileName = GetFileName($prePaths, $stub, $postPath, $desc, $new); my $handle = new FileHandle; open( $handle, $Globals{ "work-dir" } . $fileName ) && return $handle; return undef; } sub OpenLogfile { my $record = $_[0]; if ( $record ne $OpenedLog ) { $LogfileHandle = OpenFile(["db", "archive"], $record, ".log", "log"); $OpenedLog = $record; } } sub ReadLogfile { my $record = $_[0]; if ( $record eq $OpenedLog ) { seek( $LogfileHandle, 0, 0 ); my $log = new Debbugs::DBase::Log; $log->Load($LogfileHandle); } } sub CloseLogfile { print "V: Closing log $OpenedLog\n" if $Globals{ 'verbose' }; close $LogfileHandle; $OpenedLog = 0; } sub GetBugList { # TODO: This is ugly, but the easiest for me to implement. # If you have a better way, then please send a patch. # my $dir = new FileHandle; my $prefix; my $paths = shift; my @paths; if ( !defined($paths) ) { @paths = ("db"); } else { @paths = @$paths; } my @ret; my $path; foreach $path (@paths) { $prefix = $Globals{ "work-dir" } . "/" . $path . "/"; opendir $dir, $prefix; my @files = readdir($dir); closedir $dir; foreach (grep { /\d*\d\d.status/ } @files) { next if ( ! -s $prefix . "/" . $_ ); s/.status$//; push @ret, $_; # print "$_ -> $_\n"; } foreach (grep { /^[s0-9]$/ } @files) { my $_1 = $_; opendir $dir, $prefix . $_1; my @files = grep { /^\d$/ } readdir($dir); closedir $dir; foreach (@files) { my $_2 = $_; opendir $dir, "$prefix$_1/$_2"; my @files = grep { /^\d$/ } readdir($dir); close $dir; foreach (@files) { my $_3 = $_; opendir $dir, "$prefix$_1/$_2/$_3"; my @files = grep { /\d*\d\d.status/ } readdir($dir); close $dir; foreach (@files) { next if ( ! -s "$prefix$_1/$_2/$_3/$_" ); s/.status$//; push @ret, $_; # print "$_ -> $_1/$_2/$_3/$_\n"; } } } } } return @ret; } 1; END { } # module clean-up code here (global destructor) debbugs-2.4.1ubuntu1/Debbugs/Email.pm0000644000175000017500000000420407066323057016105 0ustar jw2328jw2328package Debbugs::Email; use strict; BEGIN { use Exporter (); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); # set the version for version checking $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw( %GTags ); %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ], # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw( %GTags ); } use vars @EXPORT_OK; use Debbugs::Config qw(%Globals); # initialize package globals, first exported ones %GTags= ( ); ############################################################################# # Initialize Global Tags ############################################################################# sub InitEmailTags { my @config = @_; print "V: Initializing Email Tags\n" if $Globals{ 'verbose' }; for( my $i=0; $i<=$#config; $i++) { $_ = $config[$i]; chop $_; next unless length $_; next if /^#/; if ( /^GTAG\s*[:=]\s*(\S)+\s*[:=]\s*([^#]*)/i ) { $GTags{ $1 } = $2; print "D2: (email) GTag $1=$GTags{$1}\n" if $Globals{ 'debug' } > 1; } } } ############################################################################# # Load File with Tags ############################################################################# sub LoadEmail { my $emailfile = $_[0]; my @email; open( LETTER, $emailfile ) or &::fail( "Unable to open $emailfile: $!" ); @email = ; close LETTER; &ProcessTags( \@email, \%GTags, "GTAG" ); return @email; } ############################################################################# # Process Tags ############################################################################# sub ProcessTags { my ($email, $tagsin, $marker) = @_; my %tags=%$tagsin; my $tag; print "V: Processing Template Mail\n" if $Globals{ 'verbose' }; foreach my $line ( @$email ) { while( $line =~ /\%$marker\_(\S*)\%/s ) { if( defined( $tags{ $1 } ) ) { $tag = $tags{ $1 }; } else { $tag = "(missed tag $1)"; } $line =~ s/\%$marker\_(\S*)\%/$tag/; } } 1; } END { } # module clean-up code here (global destructor) 1; debbugs-2.4.1ubuntu1/Debbugs/Log.pm0000644000175000017500000001277507651310577015616 0ustar jw2328jw2328package Debbugs::Log; use strict; use Exporter (); use vars qw($VERSION @ISA @EXPORT); BEGIN { $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw(read_log_records write_log_records); } =head1 NAME Debbugs::Log - an interface to debbugs .log files =head1 DESCRIPTION The Debbugs::Log module provides a convenient way for scripts to read and write the .log files used by debbugs to store the complete textual records of all bug transactions. =head2 The .log File Format .log files consist of a sequence of records, of one of the following four types. ^A, ^B, etc. represent those control characters. =over 4 =item incoming-recv ^G [mail] ^C [mail] must start with /^Received: \(at \S+\) by \S+;/, and is copied to the output. =item autocheck Auto-forwarded messages are recorded like this: ^A [mail] ^C C<[mail]> must contain /^X-Debian-Bugs(-\w+)?: This is an autoforward from \S+/. The first line matching that is removed; all lines in the message body that begin with 'X' will be copied to the output, minus the 'X'. Nothing in debbugs actually generates this record type any more, but it may still be in old .logs at some sites. =item recips ^B [recip]^D[recip]^D[...] OR -t ^E [mail] ^C Each [recip] is output after "Message sent"; C<-t> represents the same sendmail option, indicating that the recipients are taken from the headers of the message itself. =item html ^F [html] ^C [html] is copied unescaped to the output. The record immediately following this one is considered "boring" and only shown in certain output modes. No other types of records are permitted, and the file must end with a ^C line. =back =head2 Perl Record Representation Each record is a hash. The C field is C, C, C, or C as above; C and C contain text as above; C is a reference to an array of recipients (strings), or undef for C<-t>. =head1 FUNCTIONS =over 4 =item read_log_records Takes a .log filehandle as input, and returns an array of all records in that file. Throws exceptions using die(), so you may want to wrap this in an eval(). =cut sub read_log_records (*) { my $logfh = shift; # This comes from bugreport.cgi, but is much simpler since it doesn't # worry about the details of output. my %states = ( 1 => 'autocheck', 2 => 'recips', 3 => 'kill-end', 5 => 'go', 6 => 'html', 7 => 'incoming-recv', ); my @records; my $normstate = 'kill-init'; my $linenum = 0; my $record = {}; while (defined (my $line = <$logfh>)) { chomp $line; ++$linenum; if (length($line) == 1 and exists $states{ord($line)}) { # state transitions my $newstate = $states{ord($line)}; # disallowed transitions $_ = "$normstate $newstate"; unless (/^(go|go-nox|html) kill-end$/ or /^(kill-init|kill-end) (incoming-recv|autocheck|recips|html)$/ or /^kill-body go$/) { die "transition from $normstate to $newstate at $linenum disallowed"; } if ($newstate =~ /^(autocheck|recips|html|incoming-recv)$/) { $record->{type} = $newstate; } elsif ($newstate eq 'kill-end') { push @records, $record; $record = {}; } $normstate = $newstate; next; } $_ = $line; if ($normstate eq 'incoming-recv') { my $pl = $_; unless (/^Received: \(at \S+\) by \S+;/) { die "bad line '$pl' in state incoming-recv"; } $normstate = 'go'; $record->{text} .= "$_\n"; } elsif ($normstate eq 'html') { $record->{text} .= "$_\n"; } elsif ($normstate eq 'go') { s/^\030//; $record->{text} .= "$_\n"; } elsif ($normstate eq 'go-nox') { $record->{text} .= "$_\n"; } elsif ($normstate eq 'recips') { if (/^-t$/) { undef $record->{recips}; } else { # preserve trailing null fields, e.g. #2298 $record->{recips} = [split /\04/, $_, -1]; } $normstate = 'kill-body'; } elsif ($normstate eq 'autocheck') { $record->{text} .= "$_\n"; next if !/^X-Debian-Bugs(-\w+)?: This is an autoforward from (\S+)/; $normstate = 'autowait'; } elsif ($normstate eq 'autowait') { $record->{text} .= "$_\n"; next if !/^$/; $normstate = 'go-nox'; } else { die "state $normstate at line $linenum ('$_')"; } } die "state $normstate at end" unless $normstate eq 'kill-end'; return @records; } =item write_log_records Takes a filehandle and a list of records as input, and prints the .log format representation of those records to that filehandle. =cut sub write_log_records (*@) { my $logfh = shift; my @records = @_; for my $record (@records) { my $type = $record->{type}; my $text = $record->{text}; die "type '$type' with no text field" unless defined $text; if ($type eq 'autocheck') { print $logfh "\01\n$text\03\n"; } elsif ($type eq 'recips') { print $logfh "\02\n"; my $recips = $record->{recips}; if (defined $recips) { die "recips not undef or array" unless ref($recips) eq 'ARRAY'; print $logfh join("\04", @$recips) . "\n"; } else { print $logfh "-t\n"; } $text =~ s/^([\01-\07\030])/\030$1/gm; print $logfh "\05\n$text\03\n"; } elsif ($type eq 'html') { print $logfh "\06\n$text\03\n"; } elsif ($type eq 'incoming-recv') { $text =~ s/^([\01-\07\030])/\030$1/gm; print $logfh "\07\n$text\03\n"; } else { die "unknown type '$type'"; } } 1; } =back =head1 CAVEATS This module does none of the formatting that bugreport.cgi et al do. It's simply a means for extracting and rewriting raw records. =cut 1; debbugs-2.4.1ubuntu1/debbugs-service0000755000175000017500000007276407123054033016151 0ustar jw2328jw2328#!/usr/bin/perl -w # Usage: service .nn # Temps: incoming/P.nn use strict; use Debbugs::Config; use Debbugs::Email; use Debbugs::DBase; use Debbugs::Common; use Getopt::Long; use MIME::Parser; ############################################################################# # Gloabal Variable Declaration ############################################################################# my $VERSION = '3.01'; #External Version number my $BANNER = "DebBugs v$VERSION"; #Version Banner - text form my $FILE = 'debbugs-service'; #File name my $config = ''; my @config = undef; my $inputfilename; #file specified on commandline my @inputfile; my @imputlog; my $control; #call to control or request my @body; #list of commands my $replyto; #address of to send reply to my $transcript = ''; #building of return message my %LTags; #Tags Local to this email my @message; #holds copy of msg to apply tags ############################################################################# # Commandline parsing ############################################################################# # Hash used to process commandline options my $verbose = 0; my $quiet = 0; my $debug = 0; my %opthash = (# ------------------ actions "config|c=s" => \$config, "help|h" => \&syntax, "version|V" => \&banner, "verbose|v!" => \$verbose, "quiet|q!" => \$quiet, "debug|d+" => \$debug, # Count the -d flags ); Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev'); GetOptions(%opthash) or &syntax( 1 ); if ( $debug > 1 ) { print "D2: Commandline:\n"; print "\tconfig = $config\n" unless $config eq ''; print "\tverbos\n" if $verbose; print "\tquiet\n" if $quiet; print "\tdebug = $debug\n"; } $Globals{ 'debug' } = $debug; $Globals{ 'quiet' } = $quiet; $Globals{ 'verbose' } = $verbose; ############################################################################# # Read Config File and parse ############################################################################# $config = "./debbugs.cfg" if( $config eq '' ); print "D1: config file=$config\n" if $Globals{ 'debug' }; @config = Debbugs::Config::ParseConfigFile( $config ); ############################################################################# # Load in template emails ############################################################################# @notify_done_email = Debbugs::Email::LoadEmail( $Globals{ 'template-dir' }.'/'.$Globals{ 'not-don-con' } ); ############################################################################# # Find file name and load input file ############################################################################# $_=shift; m/^[RC]\.\d+$/ || &fail("bad argument"); $control= m/C/; $inputfilename = $_; if (!rename( $Globals{ 'spool-dir' }."G$inputfilename", $Globals{ 'spool-dir' }."P$inputfilename")) { $_=$!.''; m/no such file or directory/i && exit 0; &fail("renaming to lock: $!"); } ############################################################################ # Set up MIME Message class ############################################################################ my $parser = new MIME::Parser; $parser->output_dir("$ENV{HOME}/mimemail"); $parser->output_prefix("part"); $parser->output_to_core(100000); my $inputmail = $parser->parse_in("P$inputfilename") or die "couldn't parse MIME file"; #for use when stdin in stead of file is used #my $inputmail = $parser->read(\*STDIN) or die "couldn't parse MIME stream"; ############################################################################ # Extract first part (if mime type) for processing. All else assumed junk ############################################################################ if ( $inputmail->is_multipart ) { my $parts = $inputmail->parts( 0 ); while( $parts->is_multipart ) { $parts = $parts->parts( 0 ); } @body = $parts->bodyhandle->as_lines; } else { @body = $inputmail->bodyhandle->as_lines; } $inputmail->head->count('From') || &fail( "no From header" ); ############################################################################ # Determine Reply To address ############################################################################ my $header = $input->mail->head; $replyto= $header->count( "Reply-to" ) ? $header->get( "Reply-to" ) : $header->get( "From" ); ############################################################################ # Add Email info to Local Tags (LTags) ############################################################################ $LTags{ 'REPLY_TO' ) = $replyto; $LTags{ 'CC_TO' ) = $header->get( 'CC' ) if $header->count( 'CC' ); $LTags{ 'MESSAGE_ID' } = $header->get( 'Message-id' ) if $header->count( 'Message-id' ); $LTags{ 'MESSAGE_BODY' } = join( '\n', @body ); $LTags( 'MESSAGE_DATA' } = "control"; $LTags{ 'MESSAGE_DATE' } = $header->get( 'Date' ) if $header->count( 'Date'); if ( $header->count( 'Subject' ) ) { $LTags{ 'MESSAGE_SUBJECT' } = $header->get( 'Subject' ); } else { &transcript( < $_\n"); $action= ''; if (m/^stop\s/i || m/^quit\s/i || m/^--/ || m/^thank\s/i) { &transcript("Stopping processing here.\n\n"); last; } elsif (m/^debug\s+(\d+)$/i && $1 >= 0 && $1 <= 1000) { $debug= $1+0; &transcript("Debug level $debug.\n\n"); } elsif (m/^(send|get)\s+\#?(\d{2,})$/i) { $ref= $2+0; $reffile= $ref; $reffile =~ s,^..,$&/$&,; &sendlynxdoc( "db/$reffile.html", "logs for $gBug#$ref" ); } elsif (m/^send-detail\s+\#?(\d+)$/i) { $ref= $1+0; $reffile= $ref; $reffile =~ s,^..,$&/$&,; &sendlynxdoc("db/$reffile-b.html","additional logs for $gBug#$ref"); } elsif (m/^index(\s+full)?$/i) { &sendlynxdoc("db/ix/full.html",'full index'); } elsif (m/^index-summary\s+by-package$/i) { &sendlynxdoc("db/ix/psummary.html",'summary index sorted by package/title'); } elsif (m/^index-summary(\s+by-number)?$/i) { &sendlynxdoc("db/ix/summary.html",'summary index sorted by number/date'); } elsif (m/^index(\s+|-)pack(age)?s?$/i) { &sendlynxdoc("db/ix/packages.html",'index of packages'); } elsif (m/^index(\s+|-)maints?$/i) { &sendlynxdoc("db/ix/maintainers.html",'index of maintainers'); } elsif (m/^index(\s+|-)maint\s+(\S.*\S)$/i) { $substrg= $2; $matches=0; opendir(DBD,"$gWebDir/db/ma") || die $!; while (defined($_=readdir(DBD))) { next unless m/^l/ && m/\.html$/; &transcript("F|$_\n") if $dl>1; $filename= $_; s/^l//; s/\.html$//; &transcript("P|$_\n") if $dl>2; while (s/-(..)([^_])/-$1_-$2/) { } &transcript("P|$_\n") if $dl>2; s/^(.{0,2})_/$1-20_/g; while (s/([^-]..)_/$1-20_/) { }; &transcript("P|$_\n") if $dl>2; s/^,(.*),(.*),([^,]+)$/$1-40_$2-20_-28_$3-29_/; &transcript("P|$_\n") if $dl>2; s/^([^,]+),(.*),(.*),$/$1-20_-3c_$2-40_$3-3e_/; &transcript("P|$_\n") if $dl>2; s/\./-2e_/g; &transcript("P|$_\n") if $dl>2; $out=''; while (m/-(..)_/) { $out.= $`.sprintf("%c",hex($1)); $_=$'; } $out.=$_; &transcript("M|$out\n") if $dl>1; next unless index(lc $out, lc $substrg)>=0; &transcript("S|$filename\n") if $dl>0; &transcript("S|$out\n") if $dl>0; $matches++; &sendlynxdocraw("db/ma/$filename","$gBug list for maintainer \`$out'"); } if ($matches) { &transcript("$gBug list(s) for $matches maintainer(s) sent.\n\n"); } else { &transcript("No maintainers found containing \`$substrg'.\n". "Use \`index-maint' to get list of maintainers.\n\n"); } $ok++; } elsif (m/^index(\s+|-)pack(age)?s?\s+(\S.*\S)$/i) { $substrg= $+; $matches=0; opendir(DBD,"$gWebDir/db/pa") || die $!; while (defined($_=readdir(DBD))) { next unless m/^l/ && m/\.html$/; &transcript("F|$_\n") if $dl>1; $filename= $_; s/^l//; s/\.html$//; next unless index(lc $_, lc $substrg)>=0; &transcript("S|$filename\n") if $dl>0; &transcript("S|$out\n") if $dl>0; $matches++; &sendlynxdocraw("db/pa/$filename","$gBug list for package \`$_'"); } if ($matches) { &transcript("$gBug list(s) for $matches package(s) sent.\n\n"); } else { &transcript("No packages found containing \`$substrg'.\n". "Use \`index-packages' to get list of packages.\n\n"); } $ok++; } elsif (m/^send-unmatched(\s+this|\s+-?0)?$/i) { &sendlynxdoc("db/ju/unmatched-1.html","junk (this week)"); } elsif (m/^send-unmatched\s+(last|-1)$/i) { &sendlynxdoc("db/ju/unmatched-2.html","junk (last week)"); } elsif (m/^send-unmatched\s+(old|-2)$/i) { &sendlynxdoc("db/ju/unmatched-3.html","junk (two weeks ago)"); } elsif (m/^getinfo\s+(\S+)$/i) { $file= $1; if ($file =~ m/^\./ || $file !~ m/^[-.0-9a-z]+$/ || $file =~ m/\.gz$/) { &transcript("Filename $file is badly formatted.\n\n"); } elsif (open(P,"$gDocDir/$file")) { $ok++; &transcript("Info file $file appears below.\n\n"); $extras.= "\n---------- Info file $file follows:\n\n"; while(

) { $extras.= $_; } close(P); } else { &transcript("Info file $file does not exist.\n\n"); } } elsif (m/^help$/i) { &sendhelp; &transcript("\n"); $ok++; } elsif (m/^refcard$/i) { &sendtxthelp("bug-mailserver-refcard.txt","mailservers' reference card"); } elsif (m/^subscribe/i) { &transcript(<= 3) { &transcript("Too many unknown commands, stopping here.\n\n"); last; } } elsif (m/^close\s+\#?(\d+)$/i) { $ok++; $ref= $1; if ( &setbug ) { if(length($s_done)) { &transcript("$gBug is already closed, cannot re-close.\n\n"); &nochangebug; } else { $action= "$gBug closed, ack sent to submitter - they'd better know why !"; do { CLOSE BUG RECORD &addmaintainers($s_package); if ( length( $gDoneList ) > 0 && length( $gListDomain ) > 0 ) { &addccaddress("$gDoneList\@$gListDomain"); } $s_done= $replyto; @message = @notify_done_email; &Debbugs::Email::ProcessTags( \@message, \@BTags, "BTAG" ); &Debbugs::Email::ProcessTags( \@message, \@LTags, "LTAG" ); &sendmailmessage( join( "\n", @message), $s_originator ); Save the bug record } while (&getnextbug); } } } elsif (m/^reassign\s+\#?(\d+)\s+(\S.*\S)$/i) { $ok++; $ref= $1; $newpackage= $2; $newpackage =~ y/A-Z/a-z/; if (&setbug) { if (length($s_package)) { $action= "$gBug reassigned from package \`$s_package'". " to \`$newpackage'."; } else { $action= "$gBug assigned to package \`$newpackage'."; } do { &addmaintainers($s_package); &addmaintainers($newpackage); $s_package= $newpackage; } while (&getnextbug); } } elsif (m/^reopen\s+\#?(\d+)$/i ? ($noriginator='', 1) : m/^reopen\s+\#?(\d+)\s+\=$/i ? ($noriginator='', 1) : m/^reopen\s+\#?(\d+)\s+\!$/i ? ($noriginator=$replyto, 1) : m/^reopen\s+\#?(\d+)\s+(\S.*\S)$/i ? ($noriginator=$2, 1) : 0) { $ok++; $ref= $1; if (&setbug) { if (!length($s_done)) { &transcript("$gByg is already open, cannot reopen.\n\n"); &nochangebug; } else { $action= $noriginator eq '' ? "$gBug reopened, originator not changed." : "$gBug reopened, originator set to $noriginator."; do { &addmaintainers($s_package); $s_originator= $noriginator eq '' ? $s_originator : $noriginator; $s_done= ''; } while (&getnextbug); } } } elsif (m/^forwarded\s+\#?(\d+)\s+(\S.*\S)$/i) { $ok++; $ref= $1; $whereto= $2; if (&setbug) { if (length($s_forwarded)) { $action= "Forwarded-to-address changed from $s_forwarded to $whereto."; } else { $action= "Noted your statement that $gBug has been forwarded to $whereto."; } if (length($s_done)) { $extramessage= "(By the way, this $gBug is currently marked as done.)\n"; } do { &addmaintainers($s_package); if (length($gFowardList)>0 && length($gListDomain)>0 ) { &addccaddress("$gFowardList\@$gListDomain"); } $s_forwarded= $whereto; } while (&getnextbug); } } elsif (m/^notforwarded\s+\#?(\d+)$/i) { $ok++; $ref= $1; if (&setbug) { if (!length($s_forwarded)) { &transcript("$gBug is not marked as having been forwarded.\n\n"); &nochangebug; } else { $action= "Removed annotation that $gBug had been forwarded to $s_forwarded."; do { &addmaintainers($s_package); $s_forwarded= ''; } while (&getnextbug); } } } elsif (m/^severity\s+\#?(\d+)\s+([-0-9a-z]+)$/i || m/^priority\s+\#?(\d+)\s+([-0-9a-z]+)$/i) { $ok++; $ref= $1; $newseverity= $2; if (!grep($_ eq $newseverity, @severities, "$gDefaultSeverity")) { &transcript("Severity level \`$newseverity' is not known.\n". "Recognised are: ".join(' ',@showseverities).".\n\n"); } elsif (&setbug) { $printseverity= $s_severity; $printseverity= "$gDefaultSeverity" if $printseverity eq ''; $action= "Severity set to \`$newseverity'."; do { &addmaintainers($s_package); $s_severity= $newseverity; } while (&getnextbug); } } elsif (m/^retitle\s+\#?(\d+)\s+(\S.*\S)\s*$/i) { $ok++; $ref= $1; $newtitle= $2; if (&getbug) { &foundbug; &addmaintainers($s_package); $s_subject= $newtitle; $action= "Changed $gBug title."; &savebug; &transcript("$action\n"); if (length($s_done)) { &transcript("(By the way, that $gBug is currently marked as done.)\n"); } &transcript("\n"); } else { ¬foundbug; } } elsif (m/^unmerge\s+\#?(\d+)$/i) { $ok++; $ref= $1; if (&setbug) { if (!length($s_mergedwith)) { &transcript("$gBug is not marked as being merged with any others.\n\n"); &nochangebug; } else { $mergelowstate eq 'locked' || die "$mergelowstate ?"; $action= "Disconnected #$ref from all other report(s)."; @newmergelist= split(/ /,$s_mergedwith); $discref= $ref; do { &addmaintainers($s_package); $s_mergedwith= ($ref == $discref) ? '' : join(' ',grep($_ ne $ref,@newmergelist)); } while (&getnextbug); } } } elsif (m/^merge\s+(\d+(\s+\d+)+)\s*$/i) { $ok++; @tomerge= sort { $a <=> $b } split(/\s+/,$1); @newmergelist= (); &getmerge; while (defined($ref= shift(@tomerge))) { &transcript("D| checking merge $ref\n") if $dl; $ref+= 0; next if grep($_ eq $ref,@newmergelist); if (!&getbug) { ¬foundbug; @newmergelist=(); last } &foundbug; &transcript("D| adding $ref ($s_mergewith)\n") if $dl; $mismatch= ''; &checkmatch('package','m_package',$s_package); &checkmatch('forwarded addr','m_forwarded',$s_forwarded); &checkmatch('severity','m_severity',$s_severity); &checkmatch('done mark','m_done',length($s_done) ? 'done' : 'open'); if (length($mismatch)) { &transcript("Mismatch - only $Bugs in same state can be merged:\n". $mismatch."\n"); &cancelbug; @newmergelist=(); last; } push(@newmergelist,$ref); push(@tomerge,split(/ /,$s_mergedwith)); &cancelbug; } if (@newmergelist) { @newmergelist= sort { $a <=> $b } @newmergelist; $action= "Merged @newmergelist."; for $ref (@newmergelist) { &getbug || die "huh ? $gBug $ref disappeared during merge"; &addmaintainers($s_package); $s_mergedwith= join(' ',grep($_ ne $ref,@newmergelist)); &savebug; } &transcript("$action\n\n"); } &endmerge; } else { &transcript("Unknown command or malformed arguments to command.\n\n"); if (++$unknowns >= 5) { &transcript("Too many unknown commands, stopping here.\n\n"); last; } } } if ($procline>$#msg) { &transcript(">\nEnd of message, stopping processing here.\n\n"); } if (!$ok) { &transcript("No commands successfully parsed; sending the help text(s).\n"); &sendhelp; &transcript("\n"); } &transcript("MC\n") if $dl>1; @maintccs= (); for $maint (keys %maintccreasons) { &transcript("MM|$maint|\n") if $dl>1; next if $maint eq $replyto; $reasonstring= ''; $reasonsref= $maintccreasons{$maint}; &transcript("MY|$maint|\n") if $dl>2; for $p (sort keys %$reasonsref) { &transcript("MP|$p|\n") if $dl>2; $reasonstring.= ', ' if length($reasonstring); $reasonstring.= $p.' ' if length($p); $reasonstring.= join(' ',map("#$_",sort keys %{$$reasonsref{$p}})); } push(@maintccs,"$maint ($reasonstring)"); push(@maintccaddrs,"$maint"); } if (@maintccs) { &transcript("MC|@maintccs|\n") if $dl>2; $maintccs= "Cc: ".join(",\n ",@maintccs)."\n"; } else { $maintccs = ""; } $reply= < ${transcript}Please contact me if you need assistance. $gMaintainer (administrator, $gProject $gBugs database) $extras END $repliedshow= join(', ',$replyto,@maintccaddrs); &filelock("lock/-1"); open(AP,">>db/-1.log") || &quit("open db/-1.log: $!"); print(AP "\2\n$repliedshow\n\5\n$reply\n\3\n". "\6\n". "Request received from ". &sani($header{'from'})."\n". "to ".&sani($controlrequestaddr)."\n". "\3\n". "\7\n",@log,"\n\3\n") || &quit("writing db/-1.log: $!"); close(AP) || &quit("open db/-1.log: $!"); &unfilelock; utime(time,time,"db"); &sendmailmessage($reply,$replyto,@maintccaddrs); unlink("incoming/P$nn") || &quit("unlinking incoming/P$nn: $!"); sub get_addresses { return map { $_->address() } map { Mail::Address->parse($_) } @_; } sub sendmailmessage { local ($message,@recips) = @_; print "mailing to >@recips<\n" if $debug; $c= open(D,"|-"); defined($c) || &quit("mailing forking for sendmail: $!"); if (!$c) { # ie, we are the child process exec '/usr/lib/sendmail','-f'."$gMaintainerEmail",'-odi','-oem','-oi',get_addresses(@recips); die $!; } print(D $message) || &quit("writing to sendmail process: $!"); $!=0; close(D); $? && &quit("sendmail gave exit status $? ($!)"); $midix++; } sub sendhelp { &sendtxthelpraw("bug-log-mailserver.txt","instructions for request\@$gEmailDomain"); &sendtxthelpraw("bug-maint-mailcontrol.txt","instructions for control\@$gEmailDomain") if $control; } #sub unimplemented { # &transcript("Sorry, command $_[0] not yet implemented.\n\n"); #} sub checkmatch { local ($string,$mvarname,$svarvalue) = @_; local ($mvarvalue); if (@newmergelist) { eval "\$mvarvalue= \$$mvarname"; &transcript("D| checkmatch \`$string' /$mvarname/$mvarvalue/$svarvalue/\n") if $dl; $mismatch .= "Values for \`$string' don't match:\n". " #$newmergelist[0] has \`$mvarvalue';\n". " #$ref has \`$svarvalue'\n" if $mvarvalue ne $svarvalue; } else { &transcript("D| setupmatch \`$string' /$mvarname/$svarvalue/\n") if $dl; eval "\$$mvarname= \$svarvalue"; } } # High-level bug manipulation calls # Do announcements themselves # # Possible calling sequences: # setbug (returns 0) # # setbug (returns 1) # &transcript(something) # nochangebug # # setbug (returns 1) # $action= (something) # do { # (modify s_* variables) # } while (getnextbug); sub nochangebug { &dlen("nochangebug"); $state eq 'single' || $state eq 'multiple' || die "$state ?"; &cancelbug; &endmerge if $manybugs; $state= 'idle'; &dlex("nochangebug"); } sub setbug { &dlen("setbug $ref"); $state eq 'idle' || die "$state ?"; if (!&getbug) { ¬foundbug; &dlex("setbug => 0s"); return 0; } @thisbugmergelist= split(/ /,$s_mergedwith); if (!@thisbugmergelist) { &foundbug; $manybugs= 0; $state= 'single'; $sref=$ref; &dlex("setbug => 1s"); return 1; } &cancelbug; &getmerge; $manybugs= 1; if (!&getbug) { ¬foundbug; &endmerge; &dlex("setbug => 0mc"); return 0; } &foundbug; $state= 'multiple'; $sref=$ref; &dlex("setbug => 1m"); return 1; } sub getnextbug { &dlen("getnextbug"); $state eq 'single' || $state eq 'multiple' || die "$state ?"; &savebug; if (!$manybugs || !@thisbugmergelist) { length($action) || die; &transcript("$action\n$extramessage\n"); &endmerge if $manybugs; $state= 'idle'; &dlex("getnextbug => 0"); return 0; } $ref= shift(@thisbugmergelist); &getbug || die "bug $ref disappeared"; &foundbug; &dlex("getnextbug => 1"); return 1; } # Low-level bug-manipulation calls # Do no announcements # # getbug (returns 0) # # getbug (returns 1) # cancelbug # # getmerge # $action= (something) # getbug (returns 1) # savebug/cancelbug # getbug (returns 1) # savebug/cancelbug # [getbug (returns 0)] # &transcript("$action\n\n") # endmerge sub notfoundbug { &transcript("$gBug number $ref not found.\n\n"); } sub foundbug { &transcript("$gBug#$ref: $s_subject\n"); } sub getmerge { &dlen("getmerge"); $mergelowstate eq 'idle' || die "$mergelowstate ?"; &filelock('lock/merge'); $mergelowstate='locked'; &dlex("getmerge"); } sub endmerge { &dlen("endmerge"); $mergelowstate eq 'locked' || die "$mergelowstate ?"; &unfilelock; $mergelowstate='idle'; &dlex("endmerge"); } sub getbug { &dlen("getbug $ref"); $lowstate eq 'idle' || die "$state ?"; if (&lockreadbug($ref)) { $sref= $ref; $lowstate= "open"; &dlex("getbug => 1"); $extramessage=''; return 1; } $lowstate= 'idle'; &dlex("getbug => 0"); return 0; } sub cancelbug { &dlen("cancelbug"); $lowstate eq 'open' || die "$state ?"; &unfilelock; $lowstate= 'idle'; &dlex("cancelbug"); } sub savebug { &dlen("savebug $ref"); $lowstate eq 'open' || die "$lowstate ?"; length($action) || die; $ref == $sref || die "read $sref but saving $ref ?"; open(L,">>db/$ref.log") || &quit("opening db/$ref.log: $!"); print(L "\6\n". "".&sani($action)."\n". "Request was from ".&sani($header{'from'})."\n". "to ".&sani($controlrequestaddr).". \n". "\3\n". "\7\n",@log,"\n\3\n") || &quit("writing db/$ref.log: $!"); close(L) || &quit("closing db/$ref.log: $!"); open(S,">db/$ref.status.new") || &quit("opening db/$ref.status.new: $!"); print(S "$s_originator\n". "$s_date\n". "$s_subject\n". "$s_msgid\n". "$s_package\n". "$s_keywords\n". "$s_done\n". "$s_forwarded\n". "$s_mergedwith\n". "$s_severity\n") || &quit("writing db/$ref.status.new: $!"); close(S) || &quit("closing db/$ref.status.new: $!"); rename("db/$ref.status.new","db/$ref.status") || &quit("installing new db/$ref.status: $!"); &unfilelock; $lowstate= "idle"; &dlex("savebug"); } sub dlen { return if !$dl; &transcript("C> @_ ($state $lowstate $mergelowstate)\n"); } sub dlex { return if !$dl; &transcript("R> @_ ($state $lowstate $mergelowstate)\n"); } sub transcript { print $_[0] if $debug; $transcript.= $_[0]; } sub sendlynxdoc { &sendlynxdocraw; &transcript("\n"); $ok++; } sub sendtxthelp { &sendtxthelpraw; &transcript("\n"); $ok++; } sub sendtxthelpraw { local ($relpath,$description) = @_; $doc=''; open(D,"$gDocDir/$relpath") || &quit("open doc file $relpath: $!"); while() { $doc.=$_; } close(D); &transcript("Sending $description in separate message.\n"); &sendmailmessage(< END $ok++; } sub sendlynxdocraw { local ($relpath,$description) = @_; $doc=''; open(L,"lynx -nolist -dump $wwwbase/$relpath 2>&1 |") || &quit("fork for lynx: $!"); while() { $doc.=$_; } $!=0; close(L); if ($? == 255 && $doc =~ m/^\n*lynx: Can\'t access start file/) { &transcript("Information ($description) is not available -\n". "perhaps the $gBug does not exist or is not on the WWW yet.\n"); $ok++; } elsif ($?) { &transcript("Error getting $description (code $? $!):\n$doc\n"); } else { &transcript("Sending $description.\n"); &sendmailmessage(< END $ok++; } } sub addccaddress { my ($cca) = @_; $maintccreasons{$cca}{''}{$ref}= 1; } sub addmaintainers { # Data structure is: # maintainer email address &c -> assoc of packages -> assoc of bug#'s my ($p, $addmaint, $pshow); &ensuremaintainersloaded; $anymaintfound=0; $anymaintnotfound=0; for $p (split(m/[ \t?,()]+/,$_[0])) { $p =~ y/A-Z/a-z/; $pshow= ($p =~ m/[-+.a-z0-9]+/ ? $& : ''); if (defined($maintainerof{$p})) { $addmaint= $maintainerof{$p}; &transcript("MR|$addmaint|$p|$ref|\n") if $dl>2; $maintccreasons{$addmaint}{$p}{$ref}= 1; print "maintainer add >$p|$addmaint<\n" if $debug; } else { print "maintainer none >$p<\n" if $debug; } } } sub ensuremaintainersloaded { my ($a,$b); return if $maintainersloaded++; open(MAINT,"$gMaintainerFile") || die &quit("maintainers open: $!"); while () { m/^(\S+)\s+(\S.*\S)\n$/ || &quit("maintainers bogus \`$_'"); $a= $1; $b= $2; $a =~ y/A-Z/a-z/; $maintainerof{$1}= $2; } close(MAINT); } sub syntax { print "$BANNER\n"; print <<"EOT-EOT-EOT"; Syntax: $FILE [options] -c, --config CFGFILE read CFGFILE for configuration (default=./debvote.cfg) -h, --help display this help text -v, --verbose verbose messages -q, --quiet cancels verbose in a config file -V, --version display Debvote version and exit -d, --debug turn debug messages ON (multiple -d for more verbose) EOT-EOT-EOT exit $_[0]; } debbugs-2.4.1ubuntu1/export0000755000175000017500000000130506763547414014423 0ustar jw2328jw2328#!/bin/sh set -e if [ $# != 1 ]; then echo >&2 'need version'; exit 1; fi version="$1"; shift tag="`echo \"release-$version\" | sed -e 's/\./-/g'`" cvs -Q tag -F "$tag" cd .. rm -rf bugs-export-temp$$ "debbugs-$version" rm -f "debbugs-$version.tar" "debbugs-$version.tar.gz" mkdir bugs-export-temp$$ cd bugs-export-temp$$ cvs -Q co -r "$tag" bugsdb mv bugsdb "../debbugs-$version" cd .. rm -rf bugs-export-temp$$ tar --exclude CVS \ --exclude ncipher \ --exclude '*.out' \ --exclude '*.trace' \ --exclude '*.new' \ --exclude '*~' \ --exclude 'trace' \ -cf "debbugs-$version.tar" "debbugs-$version" gzip -9 "debbugs-$version.tar" rm -rf "debbugs-$version" echo "../debbugs-$version.tar.gz created." debbugs-2.4.1ubuntu1/cgi/0000755000175000017500000000000007670052014013700 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/cgi/.cvsignore0000644000175000017500000000001606763547415015715 0ustar jw2328jw2328*.out *.trace debbugs-2.4.1ubuntu1/cgi/bugreport.cgi0000755000175000017500000002727407664167260016431 0ustar jw2328jw2328#!/usr/bin/perl -wT package debbugs; use strict; use POSIX qw(strftime tzset); use MIME::Parser; use MIME::Decoder; use IO::Scalar; use IO::Lines; #require '/usr/lib/debbugs/errorlib'; require './common.pl'; require '/etc/debbugs/config'; require '/etc/debbugs/text'; use vars(qw($gEmailDomain $gHTMLTail $gSpoolDir $gWebDomain)); my %param = readparse(); my $tail_html; my $ref = $param{'bug'} || quitcgi("No bug number"); $ref =~ /(\d+)/ or quitcgi("Invalid bug number"); $ref = $1; my $short = "#$ref"; my $msg = $param{'msg'} || ""; my $att = $param{'att'}; my $boring = ($param{'boring'} || 'no') eq 'yes'; my $terse = ($param{'terse'} || 'no') eq 'yes'; my $reverse = ($param{'reverse'} || 'no') eq 'yes'; my $mbox = ($param{'mbox'} || 'no') eq 'yes'; my $mime = ($param{'mime'} || 'yes') eq 'yes'; # Not used by this script directly, but fetch these so that pkgurl() and # friends can propagate them correctly. my $archive = ($param{'archive'} || 'no') eq 'yes'; my $repeatmerged = ($param{'repeatmerged'} || 'yes') eq 'yes'; set_option('archive', $archive); set_option('repeatmerged', $repeatmerged); my $buglog = buglog($ref); if ($ENV{REQUEST_METHOD} eq 'HEAD' and not defined($att) and not $mbox) { print "Content-Type: text/html\n"; my @stat = stat $buglog; if (@stat) { my $mtime = strftime '%a, %d %b %Y %T GMT', gmtime($stat[9]); print "Last-Modified: $mtime\n"; } print "\n"; exit 0; } sub display_entity ($$$$\$\@); sub display_entity ($$$$\$\@) { my $entity = shift; my $ref = shift; my $top = shift; my $xmessage = shift; my $this = shift; my $attachments = shift; my $head = $entity->head; my $disposition = $head->mime_attr('content-disposition'); $disposition = 'inline' if not defined $disposition or $disposition eq ''; my $type = $entity->effective_type; my $filename = $entity->head->recommended_filename; $filename = '' unless defined $filename; if ($top) { $$this .= htmlsanit($entity->stringify_header) unless ($terse); $$this .= "\n"; } unless (($top and $type =~ m[^text(?:/plain)?(?:;|$)]) or ($type =~ m[^multipart/])) { push @$attachments, $entity; my @dlargs = ($ref, "msg=$xmessage", "att=$#$attachments"); push @dlargs, "filename=$filename" if $filename ne ''; my $printname = $filename; $printname = 'Message part ' . ($#$attachments + 1) if $filename eq ''; $$this .= '[$printname } . "($type, $disposition)]\n\n"; if ($msg and defined($att) and $att eq $#$attachments) { my $head = $entity->head; chomp(my $type = $entity->effective_type); my $body = $entity->stringify_body; print "Content-Type: $type"; print "; name=$filename" if $filename ne ''; print "\n\n"; my $decoder = new MIME::Decoder($head->mime_encoding); $decoder->decode(new IO::Scalar(\$body), \*STDOUT); exit(0); } } return if $disposition eq 'attachment' and not defined($att); return unless ($type =~ m[^text/?] and $type !~ m[^text/html(?:;|$)]) or $type =~ m[^application/pgp(?:;|$)] or $entity->is_multipart; if ($entity->is_multipart) { my @parts = $entity->parts; foreach my $part (@parts) { display_entity($part, $ref, 0, $xmessage, $$this, @$attachments); $$this .= "\n"; } } else { $$this .= htmlsanit($entity->bodyhandle->as_string) unless ($terse); } } my %maintainer = %{getmaintainers()}; my %pkgsrc = %{getpkgsrc()}; my $indexentry; my $descriptivehead; my $showseverity; my $tpack; my $tmain; $ENV{"TZ"} = 'UTC'; tzset(); my $dtime = strftime "%a, %e %b %Y %T UTC", localtime; $tail_html = $debbugs::gHTMLTail; $tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; my %status = %{getbugstatus($ref)}; unless (%status) { print < $debbugs::gProject $debbugs::gBug report logs - $short

$debbugs::gProject $debbugs::gBug report logs - $short

There is no record of $debbugs::gBug $short. Try the search page instead.

$tail_html EOF exit 0; } $|=1; $tpack = lc $status{'package'}; my @tpacks = splitpackages($tpack); if ($status{severity} eq 'normal') { $showseverity = ''; #} elsif (grep($status{severity} eq $_, @strongseverities)) { # $showseverity = "Severity: $status{severity};\n"; } else { $showseverity = "Severity: $status{severity};\n"; } $indexentry .= "

$showseverity"; $indexentry .= htmlpackagelinks($status{package}, 0); $indexentry .= "Reported by: " . htmlsanit($status{originator}) . ";\n"; my $dummy = strftime "%a, %e %b %Y %T UTC", localtime($status{date}); $indexentry .= "Date: ".$dummy.";\n
"; my @descstates; push @descstates, "Tags: " . htmlsanit(join(", ", sort(split(/\s+/, $status{tags})))) . "" if length($status{tags}); my @merged= split(/ /,$status{mergedwith}); if (@merged) { my $descmerged = 'merged with '; my $mseparator = ''; for my $m (@merged) { $descmerged .= $mseparator."#$m"; $mseparator= ",\n"; } push @descstates, $descmerged; } if (length($status{done})) { push @descstates, "Done: ".htmlsanit($status{done}); } elsif (length($status{forwarded})) { push @descstates, "Forwarded to ".maybelink($status{forwarded}); } $indexentry .= join(";\n", @descstates) . ";\n
" if @descstates; $descriptivehead = $indexentry; foreach my $pkg (@tpacks) { my $tmaint = defined($maintainer{$pkg}) ? $maintainer{$pkg} : '(unknown)'; my $tsrc = defined($pkgsrc{$pkg}) ? $pkgsrc{$pkg} : '(unknown)'; $descriptivehead .= "Maintainer for $pkg is\n". ''.htmlsanit($tmaint).''; $descriptivehead .= ";\nSource for $pkg is\n". '$tsrc" if ($tsrc ne "(unknown)"); $descriptivehead .= ".\n
"; } open L, "<$buglog" or &quitcgi("open log for $ref: $!"); if ($buglog !~ m#^\Q$gSpoolDir/db-h/#) { $descriptivehead .= "\n

Bug is archived. No further changes may be made.

"; } my $log=''; my $xmessage = 1; my $suppressnext = 0; my $found_msgid = 0; my %seen_msgid = (); my $thisheader = ''; my $this = ''; my $cmsg = 1; my $normstate= 'kill-init'; my $linenum = 0; my @mail = (); my @mails = (); while(my $line = ) { $linenum++; if ($line =~ m/^.$/ and 1 <= ord($line) && ord($line) <= 7) { # state transitions my $newstate; my $statenum = ord($line); $newstate = 'autocheck' if ($statenum == 1); $newstate = 'recips' if ($statenum == 2); $newstate = 'kill-end' if ($statenum == 3); $newstate = 'go' if ($statenum == 5); $newstate = 'html' if ($statenum == 6); $newstate = 'incoming-recv' if ($statenum == 7); # disallowed transitions: $_ = "$normstate $newstate"; unless (m/^(go|go-nox|html) kill-end$/ || m/^(kill-init|kill-end) (incoming-recv|autocheck|recips|html)$/ || m/^kill-body go$/) { &quitcgi("$ref: Transition from $normstate to $newstate at $linenum disallowed"); } #$this .= "\n
states: $normstate $newstate
\n"; # if ($newstate eq 'go') { # $this .= "
\n";
#		}
		if ($newstate eq 'html') {
			$this = '';
		}

		if ($newstate eq 'kill-end') {

			my $show = 1;
			$show = $boring
				if ($suppressnext && $normstate ne 'html');

			$show = ($xmessage == $msg) if ($msg);

			push @mails, join( '', @mail ) if ( $mbox && @mail );
			if ($show) {
				if (not $mime and @mail) {
					$this .= htmlsanit(join '', @mail);
				} elsif (@mail) {
					my $parser = new MIME::Parser;
					$parser->tmp_to_core(1);
					$parser->output_to_core(1);
#					$parser->output_under("/tmp");
					my $entity = $parser->parse( new IO::Lines \@mail );
					# TODO: make local subdir, clean it ourselves
					# the following does NOT delete the msg dirs in /tmp
					END { if ( $entity ) { $entity->purge; } if ( $parser ) { $parser->filer->purge; } }
					my @attachments = ();
					display_entity($entity, $ref, 1, $xmessage, $this, @attachments);
				}
#				if ($normstate eq 'go' || $normstate eq 'go-nox') {
				if ($normstate ne 'html') {
					$this = "
\n$this
\n"; } if ($normstate eq 'html') { $this .= " Full text available."; } $this = "$thisheader$this" if $thisheader && !( $normstate eq 'html' );; $thisheader = ''; my $delim = $terse ? "

" : "


"; if ($reverse) { $log = "$this\n$delim$log"; } else { $log .= "$this\n$delim\n"; } } $xmessage++ if ($normstate ne 'html'); $suppressnext = $normstate eq 'html'; $found_msgid = 0; } $normstate = $newstate; @mail = (); next; } $_ = $line; if ($normstate eq 'incoming-recv') { my $pl= $_; $pl =~ s/\n+$//; m/^Received: \(at (\S+)\) by (\S+)\;/ || &quitcgi("bad line \`$pl' in state incoming-recv"); $thisheader = "

Message received at ".htmlsanit("$1\@$2") . ":

\n"; $this = ''; $normstate= 'go'; push @mail, $_; } elsif ($normstate eq 'html') { $this .= $_; } elsif ($normstate eq 'go') { s/^\030//; if (!$suppressnext && !$found_msgid && /^Message-ID: <(.*)>/i) { my $msgid = $1; $found_msgid = 1; if ($seen_msgid{$msgid}) { $suppressnext = 1; } else { $seen_msgid{$msgid} = 1; } } if (@mail) { push @mail, $_; } else { $this .= htmlsanit($_); } } elsif ($normstate eq 'go-nox') { next if !s/^X//; if (!$suppressnext && !$found_msgid && /^Message-ID: <(.*)>/i) { my $msgid = $1; $found_msgid = 1; if ($seen_msgid{$msgid}) { $suppressnext = 1; } else { $seen_msgid{$msgid} = 1; } } if (@mail) { push @mail, $_; } else { $this .= htmlsanit($_); } } elsif ($normstate eq 'recips') { if (m/^-t$/) { $thisheader = "

Message sent:

\n"; } else { s/\04/, /g; s/\n$//; $thisheader = "

Message sent to ".htmlsanit($_).":

\n"; } $this = ""; $normstate= 'kill-body'; } elsif ($normstate eq 'autocheck') { next if !m/^X-Debian-Bugs(-\w+)?: This is an autoforward from (\S+)/; $normstate= 'autowait'; $thisheader = "

Message received at $2:

\n"; $this = ''; push @mail, $_; } elsif ($normstate eq 'autowait') { next if !m/^$/; $normstate= 'go-nox'; } else { &quitcgi("$ref state $normstate line \`$_'"); } } &quitcgi("$ref state $normstate at end") unless $normstate eq 'kill-end'; close(L); if ( $mbox ) { print "Content-Type: text/plain\n\n"; foreach ( @mails ) { my @lines = split( "\n", $_, -1 ); if ( $lines[ 1 ] =~ m/^From / ) { my $tmp = $lines[ 0 ]; $lines[ 0 ] = $lines[ 1 ]; $lines[ 1 ] = $tmp; } if ( !( $lines[ 0 ] =~ m/^From / ) ) { my $date = strftime "%a %b %d %T %Y", localtime; unshift @lines, "From unknown $date"; } map { s/^(>*From )/>$1/ } @lines[ 1 .. $#lines ]; $_ = join( "\n", @lines ) . "\n"; } print join("", @mails ); exit 0; } print "Content-Type: text/html\n\n"; print "\n"; print "\n" . "$debbugs::gProject $debbugs::gBug report logs - $short\n" . "\n" . '' . "\n"; print "

" . "$debbugs::gProject $debbugs::gBug report logs - $short" . "
" . htmlsanit($status{subject}) . "

\n"; print "$descriptivehead\n"; printf "

View this report as an mbox folder.

\n", mboxurl($ref); print "
"; print "$log"; print $tail_html; print "\n"; exit 0; debbugs-2.4.1ubuntu1/cgi/bugs-fetch2.pl.in0000644000175000017500000000337707573130356016775 0ustar jw2328jw2328#!/usr/bin/perl require './common.pl'; require '/etc/debbugs/config'; %map= ($gMirrors); my %in = readparse(); if ($in{'type'} eq 'ref') { $_= $in{'ref'}; s/^\s+//; s/^\#//; s/^\s+//; s/^0*//; s/\s+$//; if (m/\D/ || !m/\d/) { print <Bug number not numeric

Invalid input to specific bug fetch form

You must type a number, being the bug reference number. There should be no nondigits in your entry. END exit(0); } $suburl= $_; $suburl =~ s,^..,$&/$&,; $suburl.= '.html'; } elsif ($in{'type'} eq 'package') { $_= $in{'package'}; s/^\s+//; s/\s+$//; y/A-Z/a-z/; if (m/^[^0-9a-z]/ || m/[^-+.0-9a-z]/) { print <Package name contains invalid characters

Invalid input to package buglist fetch form

You must type a package name. Package names start with a letter or digit and contain only letters, digits and the characters - + . (hyphen, plus, full stop). END exit(0); } $suburl= "pa/l$_.html"; } else { print <here. (If this link does not work then the bug or package does not exist in the tracking system any more, or does not yet, or never did.) END exit(0); debbugs-2.4.1ubuntu1/cgi/common.pl0000644000175000017500000004400007667775435015554 0ustar jw2328jw2328#!/usr/bin/perl -w use DB_File; use Fcntl qw/O_RDONLY/; $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require "$lib_path/errorlib"; my $common_archive = 0; my $common_repeatmerged = 1; my %common_include = (); my %common_exclude = (); my $common_raw_sort = 0; my $common_bug_reverse = 0; my $common_pending_reverse = 0; my $common_severity_reverse = 0; my @common_pending_include = (); my @common_pending_exclude = (); my @common_severity_include = (); my @common_severity_exclude = (); my $debug = 0; sub set_option { my ($opt, $val) = @_; if ($opt eq "archive") { $common_archive = $val; } if ($opt eq "repeatmerged") { $common_repeatmerged = $val; } if ($opt eq "exclude") { my @vals; @vals = ( $val ) if (ref($val) eq "" && $val ); @vals = ( $$val ) if (ref($val) eq "SCALAR" && $$val ); @vals = @{$val} if (ref($val) eq "ARRAY" ); %common_exclude = map { if (/^(.*):(.*)$/) { ($1, $2) } else { ($_, 1) } } split /[\s,]+/, join ',', @vals; } if ($opt eq "include") { my @vals; @vals = ( $val, ) if (ref($val) eq "" && $val ); @vals = ( $$val, ) if (ref($val) eq "SCALAR" && $$val ); @vals = @{$val} if (ref($val) eq "ARRAY" ); %common_include = map { if (/^(.*):(.*)$/) { ($1, $2) } else { ($_, 1) } } split /[\s,]+/, join ',', @vals; } if ($opt eq "raw") { $common_raw_sort = $val; } if ($opt eq "bug-rev") { $common_bug_reverse = $val; } if ($opt eq "pend-rev") { $common_pending_reverse = $val; } if ($opt eq "sev-rev") { $common_severity_reverse = $val; } if ($opt eq "pend-exc") { my @vals; @vals = ( $val ) if (ref($val) eq "" && $val ); @vals = ( $$val ) if (ref($val) eq "SCALAR" && $$val ); @vals = @{$val} if (ref($val) eq "ARRAY" ); @common_pending_exclude = @vals if (@vals); } if ($opt eq "pend-inc") { my @vals; @vals = ( $val, ) if (ref($val) eq "" && $val ); @vals = ( $$val, ) if (ref($val) eq "SCALAR" && $$val ); @vals = @{$val} if (ref($val) eq "ARRAY" ); @common_pending_include = @vals if (@vals); } if ($opt eq "sev-exc") { my @vals; @vals = ( $val ) if (ref($val) eq "" && $val ); @vals = ( $$val ) if (ref($val) eq "SCALAR" && $$val ); @vals = @{$val} if (ref($val) eq "ARRAY" ); @common_severity_exclude = @vals if (@vals); } if ($opt eq "sev-inc") { my @vals; @vals = ( $val ) if (ref($val) eq "" && $val ); @vals = ( $$val ) if (ref($val) eq "SCALAR" && $$val ); @vals = @{$val} if (ref($val) eq "ARRAY" ); @common_severity_include = @vals if (@vals); } } sub readparse { my ($in, $key, $val, %ret); if (defined $ENV{"QUERY_STRING"} && $ENV{"QUERY_STRING"} ne "") { $in=$ENV{QUERY_STRING}; } elsif(defined $ENV{"REQUEST_METHOD"} && $ENV{"REQUEST_METHOD"} eq "POST") { read(STDIN,$in,$ENV{CONTENT_LENGTH}); } else { return; } foreach (split(/[&;]/,$in)) { s/\+/ /g; ($key, $val) = split(/=/,$_,2); $key=~s/%(..)/pack("c",hex($1))/ge; $val=~s/%(..)/pack("c",hex($1))/ge; if ( exists $ret{$key} ) { if ( !exists $ret{"&$key"} ) { $ret{"&$key"} = [ $ret{$key} ]; } push @{$ret{"&$key"}},$val; } $ret{$key}=$val; } $debug = 1 if (defined $ret{"debug"} && $ret{"debug"} eq "aj"); return %ret; } sub quitcgi { my $msg = shift; print "Content-Type: text/html\n\n"; print "Error\n"; print "An error occurred. Dammit.\n"; print "Error was: $msg.\n"; print "\n"; exit 0; } #sub abort { # my $msg = shift; # my $Archive = $common_archive ? "archive" : ""; # print header . start_html("Sorry"); # print "Sorry bug #$msg doesn't seem to be in the $Archive database.\n"; # print end_html; # exit 0; #} # Split a package string from the status file into a list of package names. sub splitpackages { my $pkgs = shift; return unless defined $pkgs; return split /[ \t?,()]+/, $pkgs; } # Generate a comma-separated list of HTML links to each package given in # $pkgs. $pkgs may be empty, in which case an empty string is returned, or # it may be a comma-separated list of package names. sub htmlpackagelinks { my $pkgs = shift; return unless defined $pkgs and $pkgs ne ''; my $strong = shift; my @pkglist = splitpackages($pkgs); my $openstrong = $strong ? '' : ''; my $closestrong = $strong ? '' : ''; return 'Package' . (@pkglist > 1 ? 's' : '') . ': ' . join(', ', map { '' . $openstrong . htmlsanit($_) . $closestrong . '' } @pkglist ) . ";\n"; } sub htmlindexentry { my $ref = shift; my %status = %{getbugstatus($ref)}; return htmlindexentrystatus(%status) if (%status); return ""; } sub htmlindexentrystatus { my $s = shift; my %status = %{$s}; my $result = ""; if ($status{severity} eq 'normal') { $showseverity = ''; } elsif (grep($status{severity} eq $_, @debbugs::gStrongSeverities)) { $showseverity = "Severity: $status{severity};\n"; } else { $showseverity = "Severity: $status{severity};\n"; } $result .= htmlpackagelinks($status{"package"}, 1); $result .= $showseverity; $result .= "Reported by: " . htmlsanit($status{originator}) . ""; $result .= ";\nTags: " . htmlsanit(join(", ", sort(split(/\s+/, $status{tags})))) . "" if (length($status{tags})); my @merged= split(/ /,$status{mergedwith}); my $mseparator= ";\nmerged with "; for my $m (@merged) { $result .= $mseparator."#$m"; $mseparator= ", "; } if (length($status{done})) { $result .= ";\nDone: " . htmlsanit($status{done}); } else { if (length($status{forwarded})) { $result .= ";\nForwarded to " . maybelink($status{forwarded}); } my $daysold = int((time - $status{date}) / 86400); # seconds to days if ($daysold >= 7) { my $font = ""; my $efont = ""; $font = "em" if ($daysold > 30); $font = "strong" if ($daysold > 60); $efont = "" if ($font); $font = "<$font>" if ($font); my $yearsold = int($daysold / 365); $daysold -= $yearsold * 365; $result .= ";\n $font"; my @age; push @age, "1 year" if ($yearsold == 1); push @age, "$yearsold years" if ($yearsold > 1); push @age, "1 day" if ($daysold == 1); push @age, "$daysold days" if ($daysold > 1); $result .= join(" and ", @age); $result .= " old$efont"; } } $result .= "."; return $result; } sub submitterurl { my $ref = shift || ""; my $params = "submitter=" . emailfromrfc822($ref); $params .= "&archive=yes" if ($common_archive); $params .= "&repeatmerged=no" unless ($common_repeatmerged); return urlsanit("pkgreport.cgi" . "?" . $params); } sub mainturl { my $ref = shift || ""; my $params = "maint=" . emailfromrfc822($ref); $params .= "&archive=yes" if ($common_archive); $params .= "&repeatmerged=no" unless ($common_repeatmerged); return urlsanit("pkgreport.cgi" . "?" . $params); } sub pkgurl { my $ref = shift; my $params = "pkg=$ref"; $params .= "&archive=yes" if ($common_archive); $params .= "&repeatmerged=no" unless ($common_repeatmerged); return urlsanit("pkgreport.cgi" . "?" . "$params"); } sub srcurl { my $ref = shift; my $params = "src=$ref"; $params .= "&archive=yes" if ($common_archive); $params .= "&repeatmerged=no" unless ($common_repeatmerged); return urlsanit("pkgreport.cgi" . "?" . "$params"); } sub urlsanit { my $url = shift; $url =~ s/%/%25/g; $url =~ s/\+/%2b/g; my %saniarray = ('<','lt', '>','gt', '&','amp', '"','quot'); $url =~ s/([<>&"])/\&$saniarray{$1};/g; return $url; } sub htmlsanit { my %saniarray = ('<','lt', '>','gt', '&','amp', '"','quot'); my $in = shift || ""; $in =~ s/([<>&"])/\&$saniarray{$1};/g; return $in; } sub maybelink { my $in = shift; if ($in =~ /^[a-zA-Z0-9+.-]+:/) { # RFC 1738 scheme return qq{} . htmlsanit($in) . ''; } else { return htmlsanit($in); } } sub bugurl { my $ref = shift; my $params = "bug=$ref"; foreach my $val (@_) { $params .= "\&msg=$1" if ($val =~ /^msg=([0-9]+)/); $params .= "\&archive=yes" if (!$common_archive && $val =~ /^archive.*$/); } $params .= "&archive=yes" if ($common_archive); $params .= "&repeatmerged=no" unless ($common_repeatmerged); return urlsanit("bugreport.cgi" . "?" . "$params"); } sub dlurl { my $ref = shift; my $params = "bug=$ref"; my $filename = ''; foreach my $val (@_) { $params .= "\&$1=$2" if ($val =~ /^(msg|att)=([0-9]+)/); $filename = $1 if ($val =~ /^filename=(.*)$/); } $params .= "&archive=yes" if ($common_archive); my $pathinfo = ''; $pathinfo = "/$filename" if $filename ne ''; return urlsanit("bugreport.cgi$pathinfo?$params"); } sub mboxurl { my $ref = shift; return urlsanit("bugreport.cgi" . "?" . "bug=$ref&mbox=yes"); } sub allbugs { return @{getbugs(sub { 1 })}; } sub htmlizebugs { $b = $_[0]; my @bugs = @$b; my @rawsort; my %section = (); my %displayshowpending = ("pending", "outstanding", "pending-fixed", "pending upload", "fixed", "fixed in NMU", "done", "resolved", "forwarded", "forwarded to upstream software authors"); if (@bugs == 0) { return "

No reports found!

\n"; } if ( $common_bug_reverse ) { @bugs = sort {$b<=>$a} @bugs; } else { @bugs = sort {$a<=>$b} @bugs; } my %seenmerged; foreach my $bug (@bugs) { my %status = %{getbugstatus($bug)}; next unless %status; if (%common_include) { my $okay = 0; foreach my $t (split /\s+/, $status{tags}) { $okay = 1, last if (defined $common_include{$t}); } if (defined $common_include{subj}) { if (index($status{subject}, $common_include{subj}) > -1) { $okay = 1; } } next unless ($okay); } if (%common_exclude) { my $okay = 1; foreach my $t (split /\s+/, $status{tags}) { $okay = 0, last if (defined $common_exclude{$t}); } if (defined $common_exclude{subj}) { if (index($status{subject}, $common_exclude{subj}) > -1) { $okay = 0; } } next unless ($okay); } next if @common_pending_include and not grep { $_ eq $status{pending} } @common_pending_include; next if @common_severity_include and not grep { $_ eq $status{severity} } @common_severity_include; next if grep { $_ eq $status{pending} } @common_pending_exclude; next if grep { $_ eq $status{severity} } @common_severity_exclude; my @merged = sort {$a<=>$b} ($bug, split(/ /, $status{mergedwith})); next unless ($common_repeatmerged || !$seenmerged{$merged[0]}); $seenmerged{$merged[0]} = 1; my $html = sprintf "
  • #%d: %s\n
    ", bugurl($bug), $bug, htmlsanit($status{subject}); $html .= htmlindexentrystatus(\%status) . "\n"; $section{$status{pending} . "_" . $status{severity}} .= $html; push @rawsort, $html if $common_raw_sort; } my $result = ""; my $anydone = 0; if ($common_raw_sort) { $result .= "
      \n" . join("", @rawsort ) . "
    \n"; } else { my @pendingList = qw(pending forwarded pending-fixed fixed done); @pendingList = reverse @pendingList if $common_pending_reverse; #print STDERR join(",",@pendingList)."\n"; #print STDERR join(",",@common_pending_include).":$#common_pending_include\n"; foreach my $pending (@pendingList) { my @severityList = @debbugs::gSeverityList; @severityList = reverse @severityList if $common_severity_reverse; #print STDERR join(",",@severityList)."\n"; # foreach my $severity(@debbugs::gSeverityList) { foreach my $severity(@severityList) { $severity = $debbugs::gDefaultSeverity if ($severity eq ''); next unless defined $section{${pending} . "_" . ${severity}}; $result .= "

    $debbugs::gSeverityDisplay{$severity} - $displayshowpending{$pending}

    \n"; #$result .= "(A list of all such bugs is available).\n"; #$result .= "(A list of all such bugs used to be available).\n"; $result .= "
      \n"; $result .= $section{$pending . "_" . $severity}; $result .= "
    \n"; $anydone = 1 if ($pending eq "done"); } } } $result .= $debbugs::gHTMLExpireNote if ($anydone); return $result; } sub countbugs { my $bugfunc = shift; if ($common_archive) { open I, "<$debbugs::gSpoolDir/index.archive" or &quitcgi("bugindex: $!"); } else { open I, "<$debbugs::gSpoolDir/index.db" or &quitcgi("bugindex: $!"); } my %count = (); while() { if (m/^(\S+)\s+(\d+)\s+(\d+)\s+(\S+)\s+\[\s*([^]]*)\s*\]\s+(\w+)\s+(.*)$/) { my @x = $bugfunc->(pkg => $1, bug => $2, status => $4, submitter => $5, severity => $6, tags => $7); local $_; $count{$_}++ foreach @x; } } close I; return %count; } sub getbugs { my $bugfunc = shift; my $opt = shift; my @result = (); if (!$common_archive && defined $opt && -e "$debbugs::gSpoolDir/by-$opt.idx") { my %lookup; print STDERR "optimized\n" if ($debug); tie %lookup, DB_File => "$debbugs::gSpoolDir/by-$opt.idx", O_RDONLY or die "$0: can't open $debbugs::gSpoolDir/by-$opt.idx ($!)\n"; while ($key = shift) { my $bugs = $lookup{$key}; if (defined $bugs) { push @result, (unpack 'N*', $bugs); } } untie %lookup; print STDERR "done optimized\n" if ($debug); } else { if ( $common_archive ) { open I, "<$debbugs::gSpoolDir/index.archive" or &quitcgi("bugindex: $!"); } else { open I, "<$debbugs::gSpoolDir/index.db" or &quitcgi("bugindex: $!"); } while() { if (m/^(\S+)\s+(\d+)\s+(\d+)\s+(\S+)\s+\[\s*([^]]*)\s*\]\s+(\w+)\s+(.*)$/) { if ($bugfunc->(pkg => $1, bug => $2, status => $4, submitter => $5, severity => $6, tags => $7)) { push (@result, $2); } } } close I; } @result = sort {$a <=> $b} @result; return \@result; } sub emailfromrfc822 { my $email = shift; $email =~ s/\s*\(.*\)\s*//; $email = $1 if ($email =~ m/<(.*)>/); return $email; } sub maintencoded { my $input = shift; my $encoded = ''; while ($input =~ m/\W/) { $encoded.=$`.sprintf("-%02x_",unpack("C",$&)); $input= $'; } $encoded.= $input; $encoded =~ s/-2e_/\./g; $encoded =~ s/^([^,]+)-20_-3c_(.*)-40_(.*)-3e_/$1,$2,$3,/; $encoded =~ s/^(.*)-40_(.*)-20_-28_([^,]+)-29_$/,$1,$2,$3/; $encoded =~ s/-20_/_/g; $encoded =~ s/-([^_]+)_-/-$1/g; return $encoded; } my $_maintainer; sub getmaintainers { return $_maintainer if $_maintainer; my %maintainer; open(MM,"$gMaintainerFile") or &quitcgi("open $gMaintainerFile: $!"); while() { next unless m/^(\S+)\s+(\S.*\S)\s*$/; ($a,$b)=($1,$2); $a =~ y/A-Z/a-z/; $maintainer{$a}= $b; } close(MM); open(MM,"$gMaintainerFileOverride") or &quitcgi("open $gMaintainerFileOverride: $!"); while() { next unless m/^(\S+)\s+(\S.*\S)\s*$/; ($a,$b)=($1,$2); $a =~ y/A-Z/a-z/; $maintainer{$a}= $b; } close(MM); $_maintainer = \%maintainer; return $_maintainer; } my $_pkgsrc; my $_pkgcomponent; sub getpkgsrc { return $_pkgsrc if $_pkgsrc; my %pkgsrc; my %pkgcomponent; open(MM,"$gPackageSource") or &quitcgi("open $gPackageSource: $!"); while() { next unless m/^(\S+)\s+(\S+)\s+(\S.*\S)\s*$/; ($a,$b,$c)=($1,$2,$3); $a =~ y/A-Z/a-z/; $pkgsrc{$a}= $c; $pkgcomponent{$a}= $b; } close(MM); $_pkgsrc = \%pkgsrc; $_pkgcomponent = \%pkgcomponent; return $_pkgsrc; } sub getpkgcomponent { return $_pkgcomponent if $_pkgcomponent; getpkgsrc(); return $_pkgcomponent; } my $_pseudodesc; sub getpseudodesc { return $_pseudodesc if $_pseudodesc; my %pseudodesc; open(PSEUDO, "< $gPseudoDescFile") or &quitcgi("open $gPseudoDescFile: $!"); while() { next unless m/^(\S+)\s+(\S.*\S)\s*$/; $pseudodesc{lc $1} = $2; } close(PSEUDO); $_pseudodesc = \%pseudodesc; return $_pseudodesc; } sub getbugstatus { my $bugnum = shift; my %status; my $location = getbuglocation( $bugnum, "status" ); return {} if ( !$location ); %status = %{ readbug( $bugnum, $location ) }; $status{tags} = $status{keywords}; $status{"package"} =~ s/\s*$//; $status{"package"} = 'unknown' if ($status{"package"} eq ''); $status{"severity"} = 'normal' if ($status{"severity"} eq ''); $status{"pending"} = 'pending'; $status{"pending"} = 'forwarded' if (length($status{"forwarded"})); $status{"pending"} = 'pending-fixed' if ($status{"tags"} =~ /\bpending\b/); $status{"pending"} = 'fixed' if ($status{"tags"} =~ /\bfixed\b/); $status{"pending"} = 'done' if (length($status{"done"})); return \%status; } sub getsrcpkgs { my $src = shift; return () if !$src; my %pkgsrc = %{getpkgsrc()}; my @pkgs; foreach ( keys %pkgsrc ) { push @pkgs, $_ if $pkgsrc{$_} eq $src; } return @pkgs; } sub buglog { my $bugnum = shift; my $dir = getlocationpath( getbuglocation( $bugnum, "log" ) ); my $hash = get_hashname( $bugnum ); return "" if ( !$dir ); return "$dir/$hash/$bugnum.log"; } 1; debbugs-2.4.1ubuntu1/cgi/pkgindex.cgi0000755000175000017500000001216307662755732016225 0ustar jw2328jw2328#!/usr/bin/perl -wT package debbugs; use strict; use POSIX qw(strftime tzset nice); #require '/usr/lib/debbugs/errorlib'; require './common.pl'; require '/etc/debbugs/config'; require '/etc/debbugs/text'; nice(5); my %param = readparse(); my $indexon = $param{'indexon'} || 'pkg'; if ($indexon !~ m/^(pkg|src|maint|submitter)$/) { quitcgi("You have to choose something to index on"); } my $repeatmerged = ($param{'repeatmerged'} || "yes") eq "yes"; my $archive = ($param{'archive'} || "no") eq "yes"; my $sortby = $param{'sortby'} || 'alpha'; if ($sortby !~ m/^(alpha|count)$/) { quitcgi("Don't know how to sort like that"); } #my $include = $param{'include'} || ""; #my $exclude = $param{'exclude'} || ""; my $Archived = $archive ? " Archived" : ""; my %maintainers = %{&getmaintainers()}; my %strings = (); $ENV{"TZ"} = 'UTC'; tzset(); my $dtime = strftime "%a, %e %b %Y %T UTC", localtime; my $tail_html = $debbugs::gHTMLTail; $tail_html = $debbugs::gHTMLTail; $tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; set_option("repeatmerged", $repeatmerged); set_option("archive", $archive); #set_option("include", { map {($_,1)} (split /[\s,]+/, $include) }) # if ($include); #set_option("exclude", { map {($_,1)} (split /[\s,]+/, $exclude) }) # if ($exclude); my %count; my $tag; my $note; my %htmldescrip = (); my %sortkey = (); if ($indexon eq "pkg") { $tag = "package"; %count = countbugs(sub {my %d=@_; return splitpackages($d{"pkg"})}); $note = "

    Note that with multi-binary packages there may be other\n"; $note .= "reports filed under the different binary package names.

    \n"; foreach my $pkg (keys %count) { $sortkey{$pkg} = lc $pkg; $htmldescrip{$pkg} = sprintf('%s ' . '(maintainer: %s)', pkgurl($pkg), htmlsanit($pkg), mainturl($maintainers{$pkg}), htmlsanit($maintainers{$pkg} || "(unknown)")); } } elsif ($indexon eq "src") { $tag = "source package"; my $pkgsrc = getpkgsrc(); %count = countbugs(sub {my %d=@_; return map { $pkgsrc->{$_} || $_ } splitpackages($d{"pkg"}); }); $note = ""; foreach my $src (keys %count) { $sortkey{$src} = lc $src; $htmldescrip{$src} = sprintf('%s ' . '(maintainer: %s)', srcurl($src), htmlsanit($src), mainturl($maintainers{$src}), htmlsanit($maintainers{$src} || "(unknown)")); } } elsif ($indexon eq "maint") { $tag = "maintainer"; %count = countbugs(sub {my %d=@_; return map { emailfromrfc822($maintainers{$_}) || () } splitpackages($d{"pkg"}); }); $note = "

    Note that maintainers may use different Maintainer fields for\n"; $note .= "different packages, so there may be other reports filed under\n"; $note .= "different addresses.

    \n"; my %email2maint = (); for my $x (values %maintainers) { my $y = emailfromrfc822($x); $email2maint{$y} = $x unless (defined $email2maint{$y}); } foreach my $maint (keys %count) { $sortkey{$maint} = lc $email2maint{$maint} || "(unknown)"; $htmldescrip{$maint} = sprintf('%s', mainturl($maint), htmlsanit($email2maint{$maint}) || "(unknown)") } } elsif ($indexon eq "submitter") { $tag = "submitter"; my %fullname = (); %count = countbugs(sub {my %d=@_; my $f = $d{"submitter"} || ""; my $em = emailfromrfc822($f); $fullname{$em} = $f if (!defined $fullname{$em}); return $em; }); foreach my $sub (keys %count) { $sortkey{$sub} = lc $fullname{$sub}; $htmldescrip{$sub} = sprintf('%s', submitterurl($sub), htmlsanit($fullname{$sub})); } $note = "

    Note that people may use different email accounts for\n"; $note .= "different bugs, so there may be other reports filed under\n"; $note .= "different addresses.

    \n"; } my $result = "
      \n"; my @orderedentries; if ($sortby eq "count") { @orderedentries = sort { $count{$a} <=> $count{$b} } keys %count; } else { # sortby alpha @orderedentries = sort { $sortkey{$a} cmp $sortkey{$b} } keys %count; } foreach my $x (@orderedentries) { $result .= "
    • " . $htmldescrip{$x} . " has $count{$x} " . ($count{$x} == 1 ? "bug" : "bugs") . "
    • \n"; } $result .= "
    \n"; print "Content-Type: text/html\n\n"; print "\n"; print "\n" . "$debbugs::gProject$Archived $debbugs::gBug reports by $tag\n" . "\n" . '' . "\n"; print "

    " . "$debbugs::gProject$Archived $debbugs::gBug report logs by $tag" . "

    \n"; print $note; print $result; print "
    \n"; print "$tail_html"; print "\n"; debbugs-2.4.1ubuntu1/cgi/pkgreport.cgi0000755000175000017500000002272407663447645016437 0ustar jw2328jw2328#!/usr/bin/perl -wT package debbugs; use strict; use POSIX qw(strftime tzset nice); #require '/usr/lib/debbugs/errorlib'; require './common.pl'; require '/etc/debbugs/config'; require '/etc/debbugs/text'; use vars qw($gPackagePages $gWebDomain); if ($ENV{REQUEST_METHOD} eq 'HEAD') { print "Content-Type: text/html\n\n"; exit 0; } nice(5); my %param = readparse(); my $repeatmerged = ($param{'repeatmerged'} || "yes") eq "yes"; my $archive = ($param{'archive'} || "no") eq "yes"; my $include = $param{'&include'} || $param{'include'} || ""; my $exclude = $param{'&exclude'} || $param{'exclude'} || ""; my $raw_sort = ($param{'raw'} || "no") eq "yes"; my $bug_rev = ($param{'bug-rev'} || "no") eq "yes"; my $pend_rev = ($param{'pend-rev'} || "no") eq "yes"; my $sev_rev = ($param{'sev-rev'} || "no") eq "yes"; my $pend_exc = $param{'&pend-exc'} || $param{'pend-exc'} || ""; my $pend_inc = $param{'&pend-inc'} || $param{'pend-inc'} || ""; my $sev_exc = $param{'&sev-exc'} || $param{'sev-exc'} || ""; my $sev_inc = $param{'&sev-inc'} || $param{'sev-inc'} || ""; my ($pkg, $src, $maint, $maintenc, $submitter, $severity, $status, $tag); my %which = ( 'pkg' => \$pkg, 'src' => \$src, 'maint' => \$maint, 'maintenc' => \$maintenc, 'submitter' => \$submitter, 'severity' => \$severity, 'tag' => \$tag, ); my @allowedEmpty = ( 'maint' ); my $found; foreach ( keys %which ) { $status = $param{'status'} || 'open' if /^severity$/; if (($found = $param{$_})) { ${ $which{$_} } = $found; last; } } if (!$found && !$archive) { foreach ( @allowedEmpty ) { if (exists($param{$_})) { ${ $which{$_} } = ''; $found = 1; last; } } } if (!$found) { my $which; if (($which = $param{'which'})) { if (grep( /^\Q$which\E$/, @allowedEmpty)) { ${ $which{$which} } = $param{'data'}; $found = 1; } elsif (($found = $param{'data'})) { ${ $which{$which} } = $found if (exists($which{$which})); } } } quitcgi("You have to choose something to select by") if (!$found); my $Archived = $archive ? " Archived" : ""; my $this = ""; my %indexentry; my %strings = (); $ENV{"TZ"} = 'UTC'; tzset(); my $dtime = strftime "%a, %e %b %Y %T UTC", localtime; my $tail_html = $debbugs::gHTMLTail; $tail_html = $debbugs::gHTMLTail; $tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; set_option("repeatmerged", $repeatmerged); set_option("archive", $archive); set_option("include", $include); set_option("exclude", $exclude); set_option("raw", $raw_sort); set_option("bug-rev", $bug_rev); set_option("pend-rev", $pend_rev); set_option("sev-rev", $sev_rev); set_option("pend-exc", $pend_exc); set_option("pend-inc", $pend_inc); set_option("sev-exc", $sev_exc); set_option("sev-inc", $sev_inc); my $title; my @bugs; if (defined $pkg) { $title = "package $pkg"; @bugs = @{getbugs(sub {my %d=@_; return grep($pkg eq $_, splitpackages($d{"pkg"})) }, 'package', $pkg)}; } elsif (defined $src) { $title = "source $src"; my @pkgs = getsrcpkgs($src); push @pkgs, $src if ( !grep(/^\Q$src\E$/, @pkgs) ); @bugs = @{getbugs(sub {my %d=@_; foreach my $try (splitpackages($d{"pkg"})) { return 1 if grep($try eq $_, @pkgs); } return 0; }, 'package', @pkgs)}; } elsif (defined $maint) { my %maintainers = %{getmaintainers()}; $title = "maintainer $maint"; my @pkgs = (); foreach my $p (keys %maintainers) { my $me = $maintainers{$p}; $me =~ s/\s*\(.*\)\s*//; $me = $1 if ($me =~ m/<(.*)>/); push @pkgs, $p if ($me eq $maint); } if ($maint eq "") { @bugs = @{getbugs(sub {my %d=@_; my $me; foreach my $try (splitpackages($d{"pkg"})) { ($me = $maintainers{$try} || "") =~ s/\s*\(.*\)\s*//; $me = $1 if ($me =~ m/<(.*)>/); return 1 if $me eq $maint; } return 0; })}; } else { @bugs = @{getbugs(sub {my %d=@_; my $me; foreach my $try (splitpackages($d{"pkg"})) { ($me = $maintainers{$try} || "") =~ s/\s*\(.*\)\s*//; $me = $1 if ($me =~ m/<(.*)>/); return 1 if $me eq $maint; } return 0; }, 'package', @pkgs)}; } } elsif (defined $maintenc) { my %maintainers = %{getmaintainers()}; $title = "encoded maintainer $maintenc"; @bugs = @{getbugs(sub {my %d=@_; foreach my $try (splitpackages($d{"pkg"})) { return 1 if maintencoded($maintainers{$try} || "") eq $maintenc; } return 0; })}; } elsif (defined $submitter) { $title = "submitter $submitter"; @bugs = @{getbugs(sub {my %d=@_; my $se; ($se = $d{"submitter"} || "") =~ s/\s*\(.*\)\s*//; $se = $1 if ($se =~ m/<(.*)>/); return $se eq $submitter; }, 'submitter-email', $submitter)}; } elsif (defined($severity) && defined($status)) { $title = "$status $severity bugs"; @bugs = @{getbugs(sub {my %d=@_; return ($d{"severity"} eq $severity) && ($d{"status"} eq $status); })}; } elsif (defined($severity)) { $title = "$severity bugs"; @bugs = @{getbugs(sub {my %d=@_; return ($d{"severity"} eq $severity); }, 'severity', $severity)}; } elsif (defined($tag)) { $title = "bugs tagged $tag"; @bugs = @{getbugs(sub {my %d = @_; my %tags = map { $_ => 1 } split ' ', $d{"tags"}; return exists $tags{$tag}; })}; } my $result = htmlizebugs(\@bugs); print "Content-Type: text/html\n\n"; print "\n"; print "\n" . "$debbugs::gProject$Archived $debbugs::gBug report logs: $title\n" . "\n" . '' . "\n"; print "

    " . "$debbugs::gProject$Archived $debbugs::gBug report logs: $title" . "

    \n"; my $showresult = 1; if (defined $pkg || defined $src) { my %maintainers = %{getmaintainers()}; my $maint = $pkg ? $maintainers{$pkg} : $maintainers{$src} ? $maintainers{$src} : undef; if (defined $maint) { print "

    Maintainer for " . ( defined($pkg) ? $pkg : "source package $src" ) . " is " . htmlsanit($maint) . ".

    \n"; } if (defined $maint or @bugs) { my %pkgsrc = %{getpkgsrc()}; my $srcforpkg; if (defined $pkg) { $srcforpkg = $pkgsrc{$pkg}; defined $srcforpkg or $srcforpkg = $pkg; } my @pkgs = getsrcpkgs($pkg ? $srcforpkg : $src); undef $srcforpkg unless @pkgs; @pkgs = grep( !/^\Q$pkg\E$/, @pkgs ) if ( $pkg ); if ( @pkgs ) { @pkgs = sort @pkgs; if ($pkg) { print "You may want to refer to the following packages that are part of the same source:
    \n"; } else { print "You may want to refer to the following individual bug pages:
    \n"; } push @pkgs, $src if ( $src && !grep(/^\Q$src\E$/, @pkgs) ); print join( ", ", map( "$_", @pkgs ) ); print ".\n"; } if ($pkg) { my @references; my $pseudodesc = getpseudodesc(); if (defined($pseudodesc) and exists($pseudodesc->{$pkg})) { push @references, "to the list of other pseudo-packages"; } else { push @references, sprintf "to the %s package page", urlsanit("http://${debbugs::gPackagePages}/$pkg"), htmlsanit("$pkg"); } if ($srcforpkg) { if (defined $debbugs::gSubscriptionDomain) { push @references, "to the Package Tracking System"; } # Only output this if the source listing is non-trivial. if (@pkgs or $pkg ne $srcforpkg) { push @references, sprintf "to the source package %s's bug page", srcurl($srcforpkg), htmlsanit($srcforpkg); } } if (@references) { $references[$#references] = "or $references[$#references]" if @references > 1; print "

    You might like to refer ", join(", ", @references), ".

    \n"; } } print "

    If you find a bug not listed here, please\n"; printf "report it.

    \n", urlsanit("http://${debbugs::gWebDomain}/Reporting${debbugs::gHTMLSuffix}"); } else { print "

    There is no record of the " . (defined($pkg) ? htmlsanit($pkg) . " package" : htmlsanit($src) . " source package") . ", and no bugs have been filed against it.

    "; $showresult = 0; } } elsif (defined $maint || defined $maintenc) { print "

    Note that maintainers may use different Maintainer fields for\n"; print "different packages, so there may be other reports filed under\n"; print "different addresses.\n"; } elsif (defined $submitter) { print "

    Note that people may use different email accounts for\n"; print "different bugs, so there may be other reports filed under\n"; print "different addresses.\n"; } print $result if $showresult; print "


    \n"; print "$tail_html"; print "\n"; debbugs-2.4.1ubuntu1/debian/0000755000175000017500000000000011135603630014355 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/debian/.cvsignore0000644000175000017500000000001207615622624016362 0ustar jw2328jw2328files tmp debbugs-2.4.1ubuntu1/debian/README.Debian0000644000175000017500000000263607234643375016444 0ustar jw2328jw2328Debbugs, the Debian Bug Tracking System ======================================= Configuration ------------- On initial installation, debbugsconfig will be run, and it will copy the basic configuration files to /etc/debbugs. Edit those files to suit your needs, and re-run debbugsconfig. WWW --- It's up to you to set up the httpd. The basics: web files are located into /var/lib/debbugs/www and the CGI scripts are in /var/lib/debbugs/www/cgi. Point your server's configuration to these places. Mail ---- It's up to you to set up the MTA. The basics: mail has to be DELIVERED to the script /usr/lib/debbugs/receive via stdin. Important environment variables set by the MTA are used so it has to be processed from within the MTA. See README.mail for more information. Cron ---- Check the sample crontab in /usr/share/doc/debbugs/examples for what should be run, in what order and how often. Summary ------- This was released into the distro NOW in order to start getting feed back. The system is stable enough to use in mission critical situations. The bugs that will show up will be in appearance. Variables that didn't expand right when describing how to "foobar" or some such. Also, people have already been asking for mods and changes and I'm having trouble keeping track. This way, people can start submitting bug and wishlist reports to the BTS. -- Darren O. Benham , Sat, 27 Mar 1999 10:45:35 -0800 debbugs-2.4.1ubuntu1/debian/README.mail0000644000175000017500000001622007565740056016177 0ustar jw2328jw2328Setting up MTAs for Debbugs =========================== Config ------ Be sure to set the $gMailer variable correctly in /etc/debbugs/config. The options are (all lower case) exim, qmail and sendmail. Exim ---- I've seen two types of setting up Exim used. 1) If the machine is dedicated and all e-mail goes to the debbugs script, add this in the transport section: debbugs_pipe: driver = pipe user = group = command = /usr/lib/debbugs/receive return_output Do not use root user/group, it is very unsafe. You could even add a new (locked) account "debbugs", and use that. Either user or group needs write access. And AT THE TOP of the directors section, add this: debbugs: driver = smartuser transport = debbugs_pipe local_parts = submit:bugs:maintonly:quiet:forwarded:done:close:request:submitter:control:^\\d+ 2) If the domain is a virtual host on a machine that needs it, there are many ways of handling it. I think the neatest was to use the above transport and director, except to add the following line to the director's options: domains = Alternatively, Chad Miller suggests: The method I discovered involved adding at the top of the routers section: debbugs_router: driver = domainlist transport = debbugs_transport route_list = "bugs.foo.bar;bugs.baz.quux" where bugs.foo.bar and bugs.baz.quux are mail-domains for which I want to receive bug requests only. Next, add anywhere in the transports section: debbugs_transport: driver = pipe command = /usr/lib/debbugs/receive user = group = current_directory = /etc/debbugs home_directory = /var/lib/debbugs/spool (current_directory may need to be /var/lib/debbugs/spool, depending on your setup.) Next, the mail domains MUST NOT be in the "local_domains" list! Instead, we MUST put them in the "relay_domains" list. Essentially, this tells exim that we agree ("relay_domains") to relay mail for those zones ("debbugs_router") and "send" the mail using a pipe ("debbugs_transport"). Qmail ----- From Tommi Virtanen (tv@debian.org), amended by Daniel Ruoso (daniel@ruoso.com): Here's my suggestion for safe & secure installation under qmail: Create a separate user for the debbugs system. # adduser --system --group --home /home/misc/debbugs debbugs Give control of a virtual domain to that user # echo bugs.example.com:debbugs >>/etc/qmail/virtualdomains Give the user access to the bug databases # chown -R debbugs:debbugs /var/lib/debbugs/* Set the BTS owner address # echo '&me@my.example.com' >~debbugs/.qmail-owner Make the BTS handle it's mail # echo '|/usr/lib/debbugs/receive' >~debbugs/.qmail-default Reload the virtualdomains config file # /etc/init.d/qmail reload That's it! Sendmail -------- From Wichert Akkerman (wakkerma@debian.org): First of all make sure that debbugs is configured for sendmail: look at /etc/debbugs/config for the $gMailer variable and make sure it is set to 'sendmail'. Next make sure that your DNS is configured properly. For sendmail this means you cannot use a CNAME for the debbugs-domain, since that gets remapped to the canonical name and thus bypasses the mailertable we need. This is an example of a working DNS entry: bugs IN 192.168.2.100 0 MX mailgate.mors.net HINFO "PC Pentium" "Debbugs 2.0" Now that that is finished it is time to configure sendmail itself. First make sure that sendmail does not consider the debbugs-domain as local by making sure it is not listed in /etc/mail/sendmail.cw . Now start your favourite editor and load /etc/mail/sendmail.mc . We need to make two changes there: add a mailertable and define the debbugs delivery agent. The mailertable is needed to tell sendmail to use the debbugs to deliver mail destined for your debbugs server. To enable the mailertable put the following line in your sendmail.mc file: FEATURE(mailertable, `text -o /etc/mail/mailertable')dnl This tells sendmail to use the textfile /etc/mail/mailertable as the database containing the table. You can also use a db database if you want to add a lot of entries in there since that is faster. If you want to do that use the following line instead: FEATURE(mailertable, `hash -o /etc/mail/mailertable.db')dnl You can create the database using the following command: makemap hash mailertable.db < mailertable Where mailertable is the textfile containing the data. The next thing we need to do is tell sendmail about the debbugs delivery agent. To do this add the following two lines to your sendmail.mc file, preferably just after the MAILER commands: Mdebbugs, P=/usr/lib/debbugs/receive, F=SDFMlhudb80, U=:, S=10/30, R=20/30, D=/tmp, T=DNS/RFC822/X-Unix, A=receive $u Where and should be replaced with the user and group you use for debbugs. Okay, we are now done with sendmail.mc and are ready to add the entry in your mailertable. Save sendmail.mc and load /etc/mail/mailertable in your editor. Put a single line in there just like this one: bugs.your.net debbugs:yournet (please note there are tabs between those words). This tells sendmail that mail destined for the host bugs.your.net should be handled by the debbugs delivery agent using yournet as the hostname. If you decided to use a db database instead of the plain textfile don't forget to run makemap now! Now the final step: run sendmailconfig to regenerate sendmail.cf and restart sendmail with the new configuration. Your system should now be up and running. Congratulations! Postfix ------- It seems Bdale isn't around currently, so I'll just mail this here directly. This is a short description of how to get debbugs working with postfix. If someone can verify this and give me some feedback if would be appreciated. Lets assume that you are going to install bugs.domain.net, and you are going to run it on the machine master.domain.net. DNS setup: point the MX to the machine running debbugs: bugs.domain.net MX 50 master.domain.net. In /etc/postfix/main.cf enable the transport maps by inserting the following line: transport_maps = hash:/etc/postfix/transport Now create /etc/postfix/transport and insert: bugs.domain.net debbugs: This tells postfix to use the debbugs transport agent to deliver any mail send to bugs.domain.net. Now we need to make a database from that that postfix can use: # makemap hash transport Now we need to teach postfix what the debbugs transport agent is. Edit /etc/postfix/master.cf and add: debbugs unix - n n - - pipe flags=F user=debbugs argv=/usr/lib/debbugs/receive $recipient This assumes that you are running debbugs with uid debbugs (the package doesn't do that by default, but I generally chown /var/lib/debbugs/* to a new debbugs account just to be safe). Finally add bugs.domain.net to mydestination in main.cf: mydestination = $myhostname localhost.$mydomain bugs.domain.org Now that all this is done, restart postfix and it should be working.. Wichert. debbugs-2.4.1ubuntu1/debian/TODO0000644000175000017500000000050106763547416015065 0ustar jw2328jw2328TODO ==== I'll be working on 2.x changes and 3.0 concurrently... Major Goals ----------- 1) Allow multiple archives on the same machine. This is actually a feature that was lost from 1.0 in order to have runtime configurability. 2) Move the database from flat files into... something else. LDAP or MySQL or...? 3) debbugs-2.4.1ubuntu1/debian/changelog0000644000175000017500000003223211135603630016231 0ustar jw2328jw2328debbugs (2.4.1ubuntu1) jaunty; urgency=low * Prefer postfix as MTA as is the Ubuntu way. -- James Westby Wed, 21 Jan 2009 11:21:11 +0000 debbugs (2.4.1) unstable; urgency=low * Colin Watson: - Exit the CGI scripts straight away if the HTTP method is HEAD, to save pointless work. - Display pending+fixed bugs as "fixed in NMU", not "pending upload". - Add a man page for debbugsconfig. - Report original tags when changing them, closes: #170630. - Add missing
      tags to db2html's output, closes: #50746. - Add a 'submitter' command to service, based on a patch by Matt Kraai. - Remove the final use of cgi-lib.pl, so it's gone. Remove copyright notices that were there due to using it. - Accept ';' as well as '&' as a CGI argument separator. - db2html now works with the new hashed database layout. - Disable the fixed severity in favour of the tag. - MIME-encoded messages to bugs are displayed in decoded form on the web interface (unless the "mime=no" parameter is used), closes: #136114. - Add facility to search by tag. - Fix rebuild script and add it to the example crontab, closes: #139696. - Silence postinst warning if spool/db doesn't exist, closes: #194892. - Clean up the definition and use of $gCGIDomain, closes: #139697. * Adam Heath: - Convert all code to use global read/write functions, instead of having it duplicated everywhere. - Trim trailing whitespace from pseudoheader values. Closes: #153590. - Warn when reassigning to an unknown package. Closes: #60595. * Josip Rodin: - Added a terse=yes mode for bugreport.cgi, possibly useful for monstrously long bugs. - Purged needless date(1) forks, replaced with strftime. -- Colin Watson Fri, 6 Jun 2003 09:25:30 +0100 debbugs (2.4) experimental; urgency=low * Updating the package with what's in CVS, even though this might completely break things for people who've been using the previous also broken package. :) Upped the minor version since the changes are noticeable, and uploaded to experimental, just in case. * Applied speedup patch, that uses references, instead of copies. Thanks to Thomas Smith. Closes: #87176. [Adam] * Reverted some parts of the speedup patch because it breaks the API. [Anthony] * Bugs that are tagged fixed are now listed in a separate section in the web pages. Patch from Colin Watson. Closes: #86922. [Adam] * Added support for an additional Maintainers.override file, which is read after the normal one. This allows the normal one to be externally updated, but still have local overrides. [Adam] * Put and on the same line as the title since some lame browsers don't seem to like it otherwise. [Josip] * Include a mailto: URI in the header for a bug report. [Adam] * Added support for filtering on subject with include=subj:foo (exact match, case sensitive). [Anthony] * Added a missing http://, thanks to Julian Gilbey. [Anthony] * Use by-*.idx indices to speed up pkgreport.cgi. [Anthony] * Support "maint=" in pkgreport to give packages without a maintainer. [Anthony] * Updated Postfix documentation. [Darren] * Use two variables in order to reduce the amount of path hard-coding. * Added support for storing the files in a hashed directory (db-h), with the same hash layout as archive/. [Adam] * Added support for tracing of bug state changes. This date is in $gSpoolDir/debbugs.trace. It is locked (as debbugs.trace.lock) while accessed, and appended to. Currently, nothing uses this trace file and it isn't even cleaned up, which can be easily fixed with a simple cron job. [Adam] * Tell sendmail to queue outgoing mail for later delivery, instead of immediate delivery. [Adam] * Added a keywords header to outgoing email responses. [Adam] * Use Resent-From: if From: doesn't exist. [Adam] * Added appropriate Reply-To: lines for the ACK messages that could use them. [Josip] * Add $gUnknownMaintainerEmail to the list of maintainers to mail in case an package with no maintainer is referenced. [Adam] * processall locks 'incoming-cleaner' before starting, so we don't have multiple copies of it running at the same time. [Adam] * Sort bugs tagged 'pending' as 'pending upload', between 'forwarded' and 'fixed'. [Adam] * Add support for searching by source package. pkgreport.cgi takes src=, and both pkgreport.cgi and bugreport.cgi have enhanced HTML headers now. [Adam] * Add support in the CGIs for: * 'raw' sorting. This does no grouping based on status or severity, and just lists bugs in number order. * reversing the order that bugs are displayed. This does not affect severity or status ordering. * inclusions/exclusions of status and severity. Also, support reverse sorting of the above. * Make it possible to ban people from control@bugs. [Anthony] * Don't lie about missing Subject:s being an RFC822 violation, because they aren't. [Anthony, Josip] * Added preliminary support for ###-request. [Adam] * Added preliminary fast indexing support. [Adam/Anthony (?)] * Added preliminary support for CC:ing @packages.qa.debian.org. [Anthony] * Added preliminary cloning support. [Anthony] * Link to submitter's web page, patch from Matt Kraai. [Josip] * The autoconfig thing in the description is gone, closes: #124537. * Fix viewing archived bugs by source package, closes: #121082, #146484. [Colin] * Depends: libmailtools-perl rather than mailtools, closes: #113028. * Add MIME support to process and service, and depend on libmime-perl as a result, closes: #36813. [Colin] * Trim Bug#12345: from the Subject:, not "Bug#12345: [", closes: #78123. [Anthony] * Be more careful about loop detection, closes: #113514. [Adam, Colin] * Relax the syntax for 'tags' slightly, since people seem to use it that way accidentally a lot, closes: #96164. [Colin] * Give better feedback from pkgreport.cgi when querying a non-existent package name, closes: #93433. [Colin] * Remove support for -fixed address from receive, since nothing else supports it. [Colin] * Prevent people from reading the first line of arbitrary files through bugreport.cgi, thanks to Max . [Colin] * Add working-for-me instructions for exim setup on non-dedicated sites, together with Chad Miller's suggestions, closes: #78688. [Colin] * Fix a few typos, closes: #146745, #152751. * Update the copyright file with the current list of maintainers and a pointer to ViewCVS. * Remove lynx-cfg, and use 'lynx -cfg=/dev/null' instead. [Colin] * Various other things, not worth mentioning here. -- Colin Watson Sun, 17 Nov 2002 17:54:49 +0000 debbugs (2.3-4) unstable; urgency=low * Added a check for unwanted characters in the part of request passed on to sendlynxdoc that gets passed to shell. [Josip] * Applied Rob Browning's patches to remove more Debian-only stuff, closes: #80077. [Josip] * Fixed the nextnumber misplacement (it should be in spool dir, not config dir), and added a note about running debbugsconfig after changes to config file, thanks to Rob for the hints. [Josip] * Changed Maintainer: to point to debian-debbugs. Added myself to Uploaders:. [Josip] * Fixed Lintian errors: file-in-etc-not-marked-as-conffile (except for lynx-cfg which is a gross hack anyway), virtual-package-depends-without-real-package-depends, debian-changelog-file-contains-user-emacs-settings. -- Josip Rodin Thu, 7 Feb 2002 17:30:17 +0100 debbugs (2.3-3) unstable; urgency=low * Fixed examples installation, debbugsconfig should actually work now, closes: #77126. [Josip] * Removed all traces of the package after purging, in postrm. [Josip] * Added pkgindex.cgi, package/maintainer/submitter indices. [Anthony] * Moved readparse to common.pl, since it's, well, common to all the cgi stuff. Other fixes in common.pl. [Anthony] * Moved some of the pkgreport.cgi logic from common.pl into pkgreport.cgi. [Anthony] * Random typo fixes in the CGIs. [Anthony] * Made the CGI scripts use the common.pl from their directory and not /usr/lib/debbugs nor ~ajt/newajbug. That stuff should actually _work_ now, argh. [Josip] * Added bug subject and package name in closing messages. [Josip] * Fixed errorlib filename (removed the .in part), this stuff should actually _work_ now, argh. I shouldn't be repeating myself. [Josip] * Escape +'s in URLs, closes: #75220. [Anthony] * Skip checking for new installs or the config file, debbugsconfig needs to regenerate the HTML, and it will detect existing conffiles. [Josip] -- Josip Rodin Fri, 1 Dec 2000 15:01:40 +0100 debbugs (2.3-2) unstable; urgency=low * Tweaks to the [pkg|bug]report.cgi scripts * Merged README and README.Debian (not quite yet) * Sundry of patchs from netgod.. see list archives for details :) + a bug report that's already been closed, it seems, #36147 + the send|get command will accept two digits, closes: #39063 + fixed reference to Debian in the copyright, closes: #39540 * Provided a CNAME in control@ as well as submit@ for severity * mailsummary mails $gSummaryList@$gListDomain now, closes: #36181. * Ray's fixes are now included, one way or another, closes: #37210. A bug's severity is set to default one before trying to merge it, which fixes #47026 filed against bugs.debian.org, and closes: #50106. * The ACKs now clearly says which addresses should be mailed, closes: #48610. * Fixed how /usr/lib/debbugs is prepended to $PATH, closes: #63216. * The $gHTMLSeverityDesc variable is now properly terminated, closes: #67702. * Policy 3.2.1 compliance, includes Build-Depends: debhelper, which closes: #70356. * Doesn't install the Maintainers and pseudo-packages.description files in the /etc/debbugs directory, it instead copies it from templates if they don't exist, closes: #70749, #37120. * A `priority' command now handles severities, closes: #45818. * Fixes and additions to scripts by Adam Heath. * Fixes and several new features in the CGI scripts by Anthony Towns. * Small fixes and updates to scripts, build system and docs by Josip Rodin. -- Josip Rodin Wed, 8 Nov 2000 19:12:01 +0100 debbugs (2.3-1) unstable; urgency=low * Fixed the send message bug that resulted in the same words (subject) being printed out over and over and over again * Added CGI scripts to make retrieval of individual bug reports realtime * Created upgrade notes from 2.2 to 2.3 * Added a variable for where the "mailsummary" reports go * Added optional bug archiving for expired bugs * Added "fixed" to the default severities * Some scripts are now perl -w clean. * Added "severity display" to "Summary of outstanding reports" (db/ix/summary.html and db/ix/psummary.html) * Added a variable to allow for a uniformed and starting text tag * Send both message that closes and original bug to bug submitter * Fixed X-Debbugs-CC header * Improved ability to skip pgp signed and mime encoded messages when looking for commands (control@ and request@) and pseudo headers (submit@) * Cosmetic changes... -- Darren Benham Tue, 27 Jul 1999 11:27:22 -0700 debbugs (2.2-3) unstable; urgency=low * Perl Depends change -- Darren Benham Tue, 27 Jul 1999 11:27:22 -0700 debbugs (2.2-2) unstable; urgency=low * Added mailtools to dependency -- Darren Benham Thu, 13 May 1999 13:13:15 -0700 debbugs (2.2-1) unstable; urgency=low * NATIVE Qmail (mailer) support! No more "other MTA" needed for Qmail users! * Improved sendmail support. * Changed lynx dependancies to simply "lynx" * fixed bad spelling in service script (fixes #36205) -- Darren Benham Thu, 8 Apr 1999 16:00:32 -0700 debbugs (2.1-1) unstable; urgency=low * Added variable in "bad email" message (receive) * Fixed SUBSTITUTE_DTIME in main html pages * Changed crontab sample (had bad directories) * Added some documentation for MTA setup * Added support for sendmail * Removed use of btoa to move change around. It's non-free. -- Darren Benham Thu, 1 Apr 1999 14:17:01 -0800 debbugs (2.0-1) unstable; urgency=low * First public release of deb * Config modification implemented -- Darren Benham Sat, 27 Mar 1999 10:37:37 -0800 debbugs (1.0-4) unstable; urgency=low * Tried a stopgap measure for config files -- Darren Benham Mon, 15 Feb 1999 22:11:08 -0800 debbugs (1.0-3) unstable; urgency=low * $gListDomain yet again * removed nextnumber, config and text from deb for time bing -- Darren Benham Wed, 10 Feb 1999 11:09:47 -0800 debbugs (1.0-2) unstable; urgency=low * internal release * fixed scripting bugs in list email -- Darren Benham Wed, 10 Feb 1999 10:39:18 -0800 debbugs (1.0-1) unstable; urgency=low * Initial Release. -- Darren Benham Thu, 21 Jan 1999 20:55:51 -0800 debbugs-2.4.1ubuntu1/debian/conffiles0000644000175000017500000000040407565767724016301 0ustar jw2328jw2328/etc/debbugs/html/Access.html.in /etc/debbugs/html/Developer.html.in /etc/debbugs/html/Reporting.html.in /etc/debbugs/html/index.html.in /etc/debbugs/html/server-control.html.in /etc/debbugs/html/server-refcard.html.in /etc/debbugs/html/server-request.html.in debbugs-2.4.1ubuntu1/debian/control0000644000175000017500000000174711135602445015774 0ustar jw2328jw2328Source: debbugs Section: misc Priority: optional Maintainer: Debbugs developers Uploaders: Josip Rodin , Colin Watson Standards-Version: 3.2.1 Build-Depends-Indep: debhelper Package: debbugs Architecture: all Depends: perl5 | perl, postfix | mail-transport-agent, libmailtools-perl, ed, libmime-perl, libio-stringy-perl Recommends: httpd, links | lynx Description: The bug tracking system based on the active Debian BTS Debian has a bug tracking system which files details of bugs reported by users and developers. Each bug is given a number, and is kept on file until it is marked as having been dealt with. The system is mainly controlled by e-mail, but the bug reports can be viewed using the WWW. . This version is fully functional, but it does not automatically configure. See /usr/share/doc/debbugs/README.Debian after installation. . Note: there might be various issues with this package, caveat emptor. debbugs-2.4.1ubuntu1/debian/copyright0000644000175000017500000000266307664636623016343 0ustar jw2328jw2328This package was debianized by Johnie Ingram on Tue, Jan 6 10:20:12 EST 1998. It is maintained by the Debbugs developers , who are currently: Adam Heath Josip Rodin Anthony Towns Colin Watson Former developers have been: Ian Jackson Darren Benham The sources can be found at: http://cvs.debian.org/?cvsroot=debbugs Copyright 1999 Darren O. Benham Copyright 1994,1995,1996,1997 Ian Jackson Copyright 1997 nCipher Corporation Limited This bug system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program and documentation is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program, or one should be available above; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. On Debian systems, the full text of the GPL can be found in /usr/share/common-licenses/GPL. debbugs-2.4.1ubuntu1/debian/crontab0000644000175000017500000000102107664263473015745 0ustar jw2328jw2328# Example crontab for bugs system. MAILTO=owner@bugs.benham 3,18,33,48 * * * * /usr/lib/debbugs/processall >/dev/null 7,22,37,52 * * * * /usr/lib/debbugs/rebuild db-h 9,39 * * * * /usr/lib/debbugs/html-control >/dev/null 22 7 * * * touch /var/lib/debbugs/spool/db-h 23 7 * * 3 /usr/lib/debbugs/age-1 24 7 * * * /usr/lib/debbugs/expire >/dev/null 25 8 * * * /usr/lib/debbugs/rebuild archive 23 16 * * 5 /usr/lib/debbugs/mailsummary undone >/dev/null 23 16 * * 2 /usr/lib/debbugs/mailsummary bymaint >/dev/null debbugs-2.4.1ubuntu1/debian/debbugsconfig0000755000175000017500000000751407570414360017123 0ustar jw2328jw2328#!/usr/bin/perl # debbugsconfig: copies debbugs configuration files from templates, and # creates documentation in HTML and text # Copyright (C) 1999 Darren Benham # Copyright (C) 2000 Josip Rodin # Licensed under the version 2 of the GNU General Public License as # published by the Free Software Foundation use POSIX qw(strftime); if (@ARGV) { print STDOUT <> $name" or die "open $name: $!"; close TOUCH; print "created empty $name.\n"; } } sub writefiles { local ($html, $text, $name) = @_; # first HTML unlink("$gWebDir/$html.html"); open(DEST, ">$gWebDir/$html.html") || die "\n$gWebDir/$html.html: $!"; print DEST $name; close(DEST); print "$html.html "; # now text return if ($text eq ""); # for index.html # This should be done with pipes instead of a temporary files, but lynx # doesn't read HTML from stdin :/ open(DEST, ">$gDocDir/$text.html") || die "\n$gDocDir/$text.html: $!"; $name =~ s,\nOther pages:\n.*?
      ,,si; print DEST $name; close(DEST); unlink("$gDocDir/$text.txt"); $ENV{'HOME'} = "/tmp"; $ENV{'TERM'} = "linux"; if (-x "/usr/bin/links") { system ("rm -rf /tmp/.links/") == 0 || die; system ("links -dump $gDocDir/$text.html > $gDocDir/$text.txt") == 0 || die "\nunable to write $gDocDir/$text.txt\n"; system ("rm -rf /tmp/.links/"); } elsif (-x "/usr/bin/lynx") { system ("lynx -nolist -dump -cfg=/dev/null $gDocDir/$text.html > $gDocDir/$text.txt") == 0 || die "\nunable to write $gDocDir/$text.txt\n"; } else { print "unable to write text versions of the HTMLs!"; print "if you need them, install links or lynx and run debbugsconfig again"; return; } unlink("$gDocDir/$text.html") || die "\ncan't remove temporary file $gDocDir/$text.html: $!"; print "$text.txt "; } debbugs-2.4.1ubuntu1/debian/debbugsconfig.80000644000175000017500000000500307570414263017257 0ustar jw2328jw2328.TH DEBBUGSCONFIG 8 .SH NAME debbugsconfig \- copy basic debbugs configuration files from templates .SH SYNOPSIS .B debbugsconfig .SH DESCRIPTION .B debbugsconfig will copy basic debbugs configuration files from templates if the files do not already exist, and will also create BTS user documentation in HTML and text. It should be run on installation and whenever .I /etc/debbugs/config or .I /etc/debbugs/text are changed. .SH FILES .B debbugsconfig creates the following template configuration files in .I $gConfigDir .RI ( /etc/debbugs by default): .RS .TP .I config General debbugs configuration file. .TP .I text Longer messages output by debbugs. .TP .I Maintainers Index of maintainers for each package. This will typically be automatically generated. .TP .I Maintainers.override Manual overrides for the maintainer index. .TP .I pseudo-packages.description Descriptions of any entries in the system's maintainer index that do not correspond to \(lqreal\(rq packages. For example, the Debian Project uses pseudo-packages for bugs against facilities such as the Debian web site, the mailing list archives, and the bug tracking system itself. .TP .I sources Index of source packages corresponding to each package. This may be used when several packages are produced from a single source, in which case the bug tracking system will group them together with links in the web front-end. .RE .PP .B debbugsconfig creates the following template state files in .I $gSpoolDir .RI ( /var/lib/debbugs/spool by default): .RS .TP .I nextnumber The file which records the tracking number that will be assigned to the next incoming bug report. .TP .I index.archive.realtime Real-time index of archived bugs. Created empty. .TP .I index.db.realtime Real-time index of non-archived bugs. Created empty. .RE .PP .B debbugsconfig creates the following documents in .I $gWebDir .RI ( /var/lib/debbugs/www by default): .RS .TP .I index.html Main contents page. .TP .IR Access.html ", " bug-log-access.txt Description of how to access bug reports. .TP .IR Reporting.html ", " bug-reporting.txt Advice on reporting bugs. .TP .IR server-control.html ", " bug-maint-mailcontrol.txt Introduction to the bug control and manipulation mail server. .TP .IR server-refcard.html ", " bug-mailserver-refcard.txt Mail servers' reference card. .TP .IR server-request.html ", " bug-log-mailserver.txt Introduction to the bug system request server. .RE .SH AUTHORS .B debbugsconfig was originally written by Darren Benham and later rewritten by Josip Rodin. Colin Watson wrote this man page. debbugs-2.4.1ubuntu1/debian/dirs0000644000175000017500000000045707565746524015275 0ustar jw2328jw2328etc/debbugs/html etc/debbugs/indices usr/lib/debbugs usr/sbin usr/share/doc/debbugs/examples var/lib/debbugs/indices var/lib/debbugs/www/cgi var/lib/debbugs/www/db 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-h debbugs-2.4.1ubuntu1/debian/docs0000644000175000017500000000003307167455576015254 0ustar jw2328jw2328UPGRADE debian/README.mail debbugs-2.4.1ubuntu1/debian/postinst0000755000175000017500000000160207664774600016207 0ustar jw2328jw2328#!/bin/sh -e 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" ]; then if [ -d "$spool/db-h" ]; then echo "Cannot migrate bug database to hashed format, because" >&2 echo "$spool/db-h already exists." >&2 echo "Rectify the situation and run the following command by hand:" >&2 echo " /usr/sbin/debbugs-dbhash \"$spool/db\" \"$spool/db-h\"" >&2 else 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 fi fi fi fi if [ -f /etc/debbugs/nextnumber ]; then rm -f /etc/debbugs/nextnumber fi #DEBHELPER# debbugs-2.4.1ubuntu1/debian/postrm0000644000175000017500000000013607204602743015632 0ustar jw2328jw2328#!/bin/sh if [ "$1" = "purge" ]; then rm -rf /etc/debbugs /var/lib/debbugs fi #DEBHELPER# debbugs-2.4.1ubuntu1/debian/rules0000755000175000017500000000173007570413241015443 0ustar jw2328jw2328#!/usr/bin/make -f # Made with the aid of dh_make, by Craig Small # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. # Some lines taken from debmake, by Cristoph Lameter. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 tmp_dir := $(CURDIR)/debian/tmp build: # There is nothing to build here, so this rule can be left empty. clean: dh_testdir dh_testroot #something to remove all trace and *.trace files? dh_clean build-stamp binary-arch: # nothing to do, as there aren't any architecture-dependent packages binary-indep: build install dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install_mostfiles DESTDIR=$(tmp_dir) dh_installdocs dh_installchangelogs dh_strip dh_compress -X examples/text dh_fixperms #chown bugs.bugs $(var_dir)/spool/incoming dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean install binary-indep binary-arch binary debbugs-2.4.1ubuntu1/devel/0000755000175000017500000000000007670052014014235 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/devel/debbugs.cfg0000644000175000017500000000276707104056025016343 0ustar jw2328jw2328########################################################################## # These are the hash keys that are used in %Debbugs::Config::Globals # ########################################################################## Email Domain = "email-domain" List Domain = "list-domain" Web Domain = "web-domain" CGI Domain = "cgi-domain" Short Name = "project-short" Long Name = "project-long" Owner Name = "owner-name" Owner Email = "owner-email" Errors Email = "errors-email" Spool Dir = "spool-dir" Work Dir = "work-dir" Web Dir = "www-dir" Doc Dir = "doc-dir" Template Dir = "template-dir" Not-Don-Con = "not-don-con" Maintainer File = "maintainer-file" Submit List = "submit-list" Maint List = "maint-list" Quiet List = "quiet-list" Forwarded List = "forwarded-list" Done List = "done-list" Request List = "request-list" Submitter List = "submitter-list" Control List = "control-list" Summary List = "summary-list" Mirror List = "mirror-list" Mailer = "mailer" Singular Term = "singular' Plural Term = "plural" Expire Age = "expire-age" Save Expired Bugs = "save-expired" Mirrors = "mirrors" Default Severity = "default-severity" Normal Severity = "normal-severity" ########################################################################## # These are stored in %Debbugs::Config::Severities keyed on their # # ########################################################################## Severity #1 = fixed Severity #2 = wishlist Severity #3 = normal Severity #4 = important Severity #5 = grave Severity #6 = critical debbugs-2.4.1ubuntu1/devel/predef.tags0000644000175000017500000000517207103423754016373 0ustar jw2328jw2328############################################################################ # Tags that come from configuration data # ############################################################################ Tag Config Field Variable ----------------------- ----------------------- ---------------------------- OWNER_EMAIL Owner Email Globals->owner-email OWNER_NAME Owner Name Globals->owner-name LONG_NAME Long Name Globals->project-long SHORT_NAME Short Name Globals->project-short EMAIL_DOMAIN Email Domain Globals->email-domain LIST_DOMAIN List Domain Globals->list-domain WEB_DOMAIN Web Domain Globals->web-domain CGI_DOMAIN CGI Domain Globals->cgi-domain SUBMIT_LIST Submit List Globals->submit-list MAINT_LIST Maint List Globals->maint-list QUIET_LIST Quiet List Globals->quiet-list FORWARDED_LIST Forwarded List Globals->forwarded-list DONE_LIST Done List Globals->done-list REQUEST_LIST Request List Globals->request-list SUBMITTER_LIST Submitter List Globals->submitter-list CONTROL_LIST Control List Globals->control-list SUMMARY_LIST Summary List Globals->summary-list MIRROR_LIST Mirror List Globals->mirror-list MIRROS Mirrors Globals->mirrors ############################################################################ # Tags that come from processing the email/doing what wants to be done # ############################################################################ Tag Meaining/Source ----------------------- ---------------------------------------------------- REPLY_TO Person who sent the email being processed CC_TO CC addresses MESSAGE_ID ID of email being processed MESSAGE_BODY Body of the message being processed MESSAGE_DATE Date of message being processed MESSAGE_SUBJECT Subject of message being processed MESSAGE_DATA Location for what ever data is being generated (normally services script) ############################################################################ # Tags that draw data out from the various fields of the bug Record # ############################################################################ Tag Record Field ----------------------- ---------------------------------------------------- BUG_ORIGINATOR Record->originator BUG_DATE Record->date BUG_SUBJECT Record->subject BUG_MSGID Record->msgid BUG_PACKAGE Record->package BUG_KEYWORDS Record->keywords BUG_DONE Record->done BUG_FORWARDED Record->forwarded BUG_MERGEDWITH Record->mergedwith BUG_SEVERITY Record->severity debbugs-2.4.1ubuntu1/email/0000755000175000017500000000000007670052014014225 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/email/badnumber.txt0000644000175000017500000000242707103406235016731 0ustar jw2328jw2328From: GTAG_MAINTAINER_EMAIL (GTAG_PROJECT GTAG_BUG Tracking System) To: LTAG_REPLYTO Subject: Unknown problem report GTAG_BUG#LTAG_BUG_NUMBER (LTAG_SUBJECT) Message-ID: In-Reply-To: LTAG_HEADER_MSG_ID References: LTAG_HEADER_MSG_ID LTAG_MESSAGE_ID X-GTAG_PROJECT-PR-Message: error You sent a message to the GTAG_BUG tracking system which gave (in the Subject line or encoded into the recipient at GTAG_EMAIL_DOMAIN), the number of a nonexistent GTAG_BUG report (LTAG_BUG_NUMBER). This may be because that GTAG_BUG report has been resolved for more than GTAG_REMOVE_AGE days, and the record of it has been expunged, or because you mistyped the GTAG_BUG report number. Your message was dated LTAG_HEADER_DATE and was sent to LTAG_TO_ADDRESS\@GTAG_EMAIL_DOMAIN. It had Message-ID LTAG_HEADER_MSG_ID and Subject LTAG_SUBJECT. It has been filed (under junk) but otherwise ignored. Please consult your records to find the correct GTAG_BUG report number, or contact me, the system administrator, for assistance. GTAG_MAINTAINER_NAME (administrator, GTAG_PROJECT GTAG_BUG database) (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) debbugs-2.4.1ubuntu1/email/forwarded.txt0000644000175000017500000000157207103406235016747 0ustar jw2328jw2328From: GTAG_MAINTAINER_EMAIL (GTAG_PROJECT GTAG_BUG Tracking System) To: LTAG_REPLYTO ${noticecc} Subject: GTAG_BUG#LTAG_BUG_NUMBER: marked as forwarded (LTAG_SUBJECT) Message-ID: In-Reply-To: LTAG_HEADER_MSG_ID References: LTAG_HEADER_MSG_ID LTAG_MESSAGE_ID X-GTAG_PROJECT-PR-Message: forwarded LTAG_BUG_NUMBER Your message dated LTAG_HEADER_DATE with message-id LTAG_HEADER_MSG_ID and subject line LTAG_SUBJECT has caused the GTAG_PROJECT GTAG_BUG report #LTAG_BUG_NUMBER, regarding LTAG_SUBJECT to be marked as having been forwarded to the upstream software author(s) LTAG_FORWARD. GTAG_MAINTAINER_NAME (administrator, GTAG_PROJECT GTAG_BUG database) (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) debbugs-2.4.1ubuntu1/email/notify-closed-control.txt0000644000175000017500000000111007234643375021230 0ustar jw2328jw2328From: GTAG_MAINTAINER_EMAIL (GTAG_PROJECT GTAG_BUG Tracking System) To: BTAG_BUG_ORIGINATOR Subject: Bug #BTAG_BUG_NUMBER closed by developer Message-ID: In-Reply-To: LTAG_HEADER_MSG_ID References: LTAG_HEADER_MSG_ID LTAG_MESSAGE_ID X-GTAG_PROJECT-PR-Message: closed BTAG_BUG_NUMBER This is an automatic notification regarding your GTAG_BUG report. It has been marked as closed by one of the developers, namely LTAG_REPLY_TO. GTAG_BUG_CLOSURE_MSG_BODY GTAG_MAINTAINER_NAME (administrator, GTAG_PROJECT GTAG_BUG database) debbugs-2.4.1ubuntu1/examples/0000755000175000017500000000000007670052014014754 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/examples/debbugs.cfg0000644000175000017500000000571007104056025017051 0ustar jw2328jw2328########################################################################## # Domain Names # ########################################################################## Email Domain = bugs.somewhere.com List Domain = lists.somewhere.com Web Domain = www.somewhere.com CGI Domain = cgi.somewhere.com ########################################################################## # Identification # ########################################################################## Short Name = Debian Long Name = Debian GNU/Linux Owner Name = Darren Benham Owner Email = owner@bugs.somewhere.com ########################################################################## # Paths/files # ########################################################################## Spool Dir = /var/lib/debbugs/spool/incoming Work Dir = /var/lib/debbugs/spool Web Dir = /var/lib/debbugs/www Doc Dir = /var/lib/debbugs/www/txt Template Dir = /etc/debbugs/emails Maintainer File = /etc/debbugs/Maintainers ########################################################################## # Emails # # *-con are control/request responses. Without -con are used by process # # not-* are notifing submitter responeses # # *-don[-con] are respones relating to "done" or "close" actions # ########################################################################## Not-Don-Con = notify-done-control.txt ########################################################################## # Lists # ########################################################################## Submit List = project-bugs-dist Maint List = project-bugs-private Quiet List = project-bugs-private Forwarded List = project-bugs-forwarded Done List = project-bugs-closed Request List = project-bugs-request Submitter List = project-bugs-submitter Control List = project-bugs-dist Summary List = project-bugs-reports Mirror List = bts-mirrors ########################################################################## # Other Configuration Issues # ########################################################################## Mailer = exim Singular Term = bug Plural Term = bugs Expire Age = 28 Save Expired Bugs = true Mirrors = bugs.us.somewhere.com, bugs.uk.somewhere.com, bugs.jp.somewhere.com ########################################################################## # Severity Information # ########################################################################## Severities = 6 Default Severity = 3 Normal Severity = 3 Severity #1 = fixed Severity #2 = wishlist Severity #3 = normal Severity #4 = important Severity #5 = grave Severity #6 = critical debbugs-2.4.1ubuntu1/examples/debbugs.cfg.20000644000175000017500000000222307103375476017222 0ustar jw2328jw2328Email Domain = bugs.doogie.org List Domain = lists.doogie.org Web Domain = bugs.doogie.org CGI Domain = bugs.doogie.org/cgi Short Name = doogbugs Long Name = DoogBugs Test Project Owner Name = Adam Heath Owner Email = adam@doogie.org Owner Webpage = http://doogie.org/adam Spool Dir = /var/lib/debbugs/spool/incoming Work Dir = /var/lib/debbugs/spool Web Dir = /var/lib/debbugs/www Doc Dir = /var/lib/debbugs/www/txt Maintainer File = /etc/debbugs/Maintainers Pseudo Description File = /etc/debbugs/pseudo-packages.description Maint List = doogbugs-maint Quiet List = doogbugs-quiet Forwarded List = doogbugs-forwarded Done List = doogbugs-done Request List = doogbugs-request Submitter List = doogbugs-submitter Control List = doogbugs-control Summary List = doogbugs-summary Mirror List = doogbugs-mirrors Mailer = exim Singular Term = doogbug Plural Term = doogbugs Expire Age = 28 Save Expired Bugs = yes Mirrors = Severity 0 strong = critical Severity 1 strong = grave Severity 2 default = normal Severity 3 = fixed Severity 4 = wishlist Severity 0 text = Critical Severity 1 text = Grave Severity 2 text = Normal Severity 3 text = Fixed Severity 4 text = Wishlist debbugs-2.4.1ubuntu1/html/0000755000175000017500000000000007670052014014102 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/html/txt/0000755000175000017500000000000007670052014014721 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/html/txt/.cvsignore0000644000175000017500000000000606763547415016735 0ustar jw2328jw2328*.out debbugs-2.4.1ubuntu1/html/.cvsignore0000644000175000017500000000001606763547415016117 0ustar jw2328jw2328*.out *.trace debbugs-2.4.1ubuntu1/html/Access.html.in0000644000175000017500000000252407170107261016601 0ustar jw2328jw2328$gAccessHtml = < $gProject $gBugs - Accessing the logs

      Accessing $gBug reports in the tracking system logs

      Each message received at or sent by the $gBug processing system is logged and made available in a number of ways. $gHTMLCopies

      There is a mailserver which can send $gBug reports as plain text on request. To use it send the word help as the sole contents of an email to request (the Subject of the message is ignored), or read the instructions on the World Wide Web or in the file bug-log-mailserver.txt.


      Other pages:

      $gHTMLTail HTML_END debbugs-2.4.1ubuntu1/html/Developer.html.in0000644000175000017500000002064307661112344017332 0ustar jw2328jw2328$gDeveloperHtml = < $gProject - Developers' information

      Developers' information regarding the $gBug processing system

      Initially, a $gBug report is submitted by a user as an ordinary mail message to submit\@$gEmailDomain. This will then be given a number, acknowledged to the user, and forwarded to a mailing list (if configured). If the submitter included a Package line listing a package with a known maintainer the maintainer will get a copy too.

      The Subject line will have $gBug#nnn: added, and the Reply-To will be set to include both the submitter of the report and nnn\@$gEmailDomain.

      Closing $gBug reports

      A developer who receives a $gBug from the tracking system, or sees it on the mailing list, and takes responsibility for it should hit Reply in their favourite mailreader, and then edit the To field to say nnn-done\@$gEmailDomain instead of nnn\@$gEmailDomain (nnn-close is provided as an alias for nnn-done).

      The address of the original submitter of the $gBug report will be included in the default To field, because the $gBug system included it in the Reply-To.

      `Done' messages are automatically forwarded to the $gDoneList mailing list, if the mailing list has been set up.

      The person closing the $gBug and the person who submitted it will each get a notification about the change in status of the report.

      Followup messages

      If a developer wishes to reply to a $gBug report they may simply reply to the message (that will not mark the bug as done). Their reply will (by default, if they respect the Reply-To: header) go to nnn\@$gEmailDomain, and to the original submitter of the $gBug report (note: this is two distinct addresses). The $gBug tracking system will receive the message at nnn\@$gEmailDomain, pass it on to the package maintainer, file the reply with the rest of the logs for that bug report and forward it to a designated mailing list ($gSubmitList\@$gEmailDomain).

      A developer may explicitly mail the bug's submitter with an email to nnn-submitter\@$gEmailDomain.

      If you wish to send a followup message which is not appropriate for any mailing list you can do so by sending it to nnn-quiet\@$gEmailDomain or nnn-maintonly\@$gEmailDomain. Mail to nnn-quiet\@$gEmailDomain is filed in the $gBug Tracking System but is not delivered to any individuals or mailing lists. Mail to nnn-maintonly\@$gEmailDomain is filed in the $gBug Tracking System and is delivered only to the maintainer of the package in question.

      Do not use the `reply to all recipients' or `followup' feature of your mailer unless you intend to edit down the recipients substantially. In particular, see that you don't send followup messages both to nnn\@$gEmailDomain and to submit\@$gEmailDomain, because the $gBug system will then get two copies of it and each one will be forwarded to the designated mailing list separately.

      Severity levels

      The $gBug system records a severity level with each $gBug report. This is set to $gDefaultSeverity by default, but can be overridden either by supplying a Severity line in the pseudo-header when the $gBug is submitted (see the instructions for reporting $gBugs), or by using the severity command with the control request server. Separate multiple tags with commas, spaces, or both.

      The severity levels are:

      $gHTMLSeverityDesc

      Tags for $gBug reports

      Each $gBug can have zero or more of a set of given tags. These tags are displayed in the list of $gBugs when you look at a package's page, and when you look at the full $gBug log.

      Tags can be set by supplying a Tags line in the pseudo-header when the $gBug is submitted (see the instructions for reporting $gBugs), or by using the tags command with the control request server.

      The current $gBug tags are:

      $gHTMLTagDesc

      Recording that you have passed on a $gBug report

      When a developer forwards a $gBug report to the developer of the upstream source package from which the $gProject package is derived, they should note this in the $gBug tracking system as follows:

      Make sure that the To field of your message to the author to has only the author(s) address(es) in it; put both the person who reported the $gBug and nnn-forwarded\@$gEmailDomain in the CC field.

      Ask the author to preserve the CC to nnn-forwarded\@$gEmailDomain when they reply, so that the $gBug tracking system will file their reply with the original report.

      When the $gBug tracking system gets a message at nnn-forwarded it will mark the relevant $gBug as having been forwarded to the address(es) in the To field of the message it gets, if the $gBug is not already marked as forwarded.

      You can also manipulate the `forwarded to' information by sending messages to control\@$gEmailDomain.

      Summary postings

      Every Friday, a list of outstanding $gBug reports is posted to a summary mailing list (if set up), sorted by age of report. Every Tuesday, a list of $gBug reports that have gone unanswered too long is posted, sorted by package maintainer. $gBadMaintHtml

      Reopening, reassigning and manipulating $gBugs

      It is possible to reassign $gBug reports to other packages, to reopen erroneously-closed ones, to modify the information saying to where, if anywhere, a $gBug report has been forwarded, to change the severities and titles of reports and to merge and unmerge $gBug reports. This is done by sending mail to control\@$gEmailDomain.

      The format of these messages is described in another document available on the World Wide Web or in the file bug-maint-mailcontrol.txt. A plain text version can also be obtained by mailing the word help to the server at the address above.

      More-or-less obsolete subject-scanning feature

      Messages that arrive at submit or $gBugs whose Subject starts Bug#nnn will be treated as having been sent to nnn\@$gEmailDomain. This is both for backwards compatibility with mail forwarded from the old addresses, and to catch followup mail sent to submit by mistake (for example, by using reply to all recipients).

      A similar scheme operates for maintonly, done, quiet and forwarded, which treat mail arriving with a Subject tag as having been sent to the corresponding nnn-whatever\@$gEmailDomain address.

      Messages arriving at plain forwarded and done - ie, with no $gBug report number in the address - and without a $gBug number in the Subject will be filed under `junk' and kept for a few weeks, but otherwise ignored.


      Other pages:

      $gHTMLTail HTML_END debbugs-2.4.1ubuntu1/html/Reporting.html.in0000644000175000017500000002217207661112345017356 0ustar jw2328jw2328$gReportingHtml = < $gProject $gBugs - how to report a $gBug

      How to report a $gBug in $gProject

      Important things to note before sending

      Please don't report several unrelated $gBugs - especially ones in different packages - in a single $gBug report.

      You should check if your $gBug report has already been filed by someone else before submitting it. Lists of currently outstanding $gBugs are available on the World Wide Web and elsewhere - see other documents for details. You can submit your comments to an existing $gBug report #<number> by sending e-mail to <number>\@$gEmailDomain

      If you can't seem to determine which package contains the problem, please send e-mail to the $gMaintainerEmail asking for advice. $gHTMLPseudoDesc

      If you'd like to send a copy of your $gBug report to additional recipients (such as mailing lists), you shouldn't use the usual e-mail headers, but a different method, described below.

      Sending the bug report using an automatic bug report tool

      There is a program that was developed in Debian to help reporting $gBug reports, it's called reportbug. It will guide you through the bug reporting process step by step, and probably ease filing bugs that way.

      Emacs users can also use the debian-bug command provided by the debbugs-el package. When called with M-x debian-bug, it will ask for all necessary information in a similar way to reportbug.

      Sending the bug report via e-mail

      Send mail to submit\@$gEmailDomain, as described below.

      Of course, like with any email, you should include a clear, descriptive Subject line in your main mail header. The subject you give will be used as the initial $gBug title in the tracking system, so please try to make it informative!

      You need to put a pseudo-header at the start of the body of the message. That means that the first line of the message body should say:

      Package: <something>
      

      Replace <something> with the name of the package which has the $gBug.

      The second line of the message should say:

      Version: <something>
      

      Replace <something> with the version of the package.

      You need to supply a correct Package line in the pseudo-header in order for the $gBug tracking system to deliver the message to the package's maintainer.

      $gHTMLFindPackage

      The pseudo-header fields should start at the very start of their lines.

      $gHTMLPseudoDesc

      Please include in your report:

      • The exact and complete text of any error messages printed or logged. This is very important!
      • Exactly what you typed or did to demonstrate the problem.
      • A description of the incorrect behaviour: exactly what behaviour you were expecting, and what you observed. A transcript of an example session is a good way of showing this.
      • A suggested fix, or even a patch, if you have one.
      • Details of the configuration of the program with the problem. Include the complete text of its configuration files. $gXtraBugInfo

      Include any detail that seems relevant - you are in very little danger of making your report too long by including too much information. If they are small please include in your report any files you were using to reproduce the problem (uuencoding them if they may contain odd characters etc.).

      Example

      A $gBug report, with mail header, looks something like this:

        To: submit\@$gEmailDomain
        From: diligent\@testing.linux.org
        Subject: Hello says `goodbye'
      
        Package: hello
        Version: 1.3-16
      
        When I invoke `hello' without arguments from an ordinary shell
        prompt it prints `goodbye', rather than the expected `hello, world'.
        Here is a transcript:
      
        $ hello
        goodbye
        $ /usr/bin/hello
        goodbye
        $
      
        I suggest that the output string, in hello.c, be corrected.
      
        I am using Debian GNU/Linux 2.2, kernel 2.2.17-pre-patch-13
        and libc6 2.1.3-10.
      

      Sending copies of $gBug reports to other addresses

      Sometimes it is necessary to send a copy of a $gBug report to somewhere else besides the mailing list and the package maintainer, which is where they are normally sent.

      You could do this by CC'ing your $gBug report to the other address(es), but then the other copies would not have the $gBug report number put in the Reply-To field and the Subject line. When the recipients reply they will probably preserve the submit\@$gEmailDomain entry in the header and have their message filed as a new $gBug report. This leads to many duplicated reports.

      The right way to do this is to use the X-Debbugs-CC header. Add a line like this to your message's mail header (not to the pseudo header with the Package field):

        X-Debbugs-CC: other-list\@cosmic.edu
      
      This will cause the $gBug tracking system to send a copy of your report to the address(es) in the X-Debbugs-CC line as well as to any mailing list.

      This feature can often be combined usefully with mailing quiet - see below.

      Severity levels

      If a report is of a particularly serious $gBug, or is merely a feature request that, you can set the severity level of the $gBug as you report it. This is not required, however, and the developers will assign an appropriate severity level to your report if you do not.

      To assign a severity level, put a line like this one in the pseudo-header:

      Severity: <severity>
      

      Replace <severity> with one of the available severity levels, as described in the developers' documentation.

      Assigning tags

      You can set tags on a $gBug as you are reporting it. For example, if you are including a patch with your $gBug report, you may wish to set the patch tag. This is not required, and the developers will set tags on your report as and when it is appropriate.

      To set tags, put a line like this one in the pseudo-header:

      Tags: <tags>
      

      Replace <tags> with one or more of the available tags, as described in the developers' documentation. Separate multiple tags with commas, spaces, or both.

      Not forwarding to the mailing list - minor $gBug reports

      If a $gBug report is minor (for example, a documentation typo or other trivial build problem), or you're submitting many reports at once, send them to maintonly\@$gEmailDomain or quiet\@$gEmailDomain. maintonly will send the report on to the package maintainer (provided you supply a correct Package line in the pseudo-header and the maintainer is known), and quiet will not forward it anywhere at all but only file it as a $gBug (useful if, for example, you are submitting many similar $gBugs and want to post only a summary).

      If you do this the $gBug system will set the Reply-To of any forwarded message so that replies will by default be processed in the same way as the original report.

      $gBug reports against unknown packages

      If the $gBug tracking system doesn't know who the maintainer of the relevant package is it'll forward the report to the mailing list even if maintonly was used.

      When sending to maintonly\@$gEmailDomain or nnn-maintonly\@$gEmailDomain you should make sure that the $gBug report is assigned to the right package, by putting a correct Package at the top of an original submission of a report, or by using the control\@$gEmailDomain service to (re)assign the report appropriately first if it isn't correct already. $gXtraReportingInfo


      Other pages:

      $gHTMLTail HTML_END debbugs-2.4.1ubuntu1/html/htaccess0000644000175000017500000000004506763547415015641 0ustar jw2328jw2328ExpiresActive on ExpiresDefault A600 debbugs-2.4.1ubuntu1/html/index.html.in0000644000175000017500000000565607667577323016545 0ustar jw2328jw2328$gIndexHtml = < $gProject $gBug tracking system

      $gProject $gBug tracking system main contents page

      $gProject has a $gBug tracking system (BTS) in which we file details of $gBugs reported by users and developers. Each $gBug is given a number, and is kept on file until it is marked as having been dealt with.

      $gHTMLCopies

      Documentation about the $gBug tracking system

      Viewing $gBug reports on the WWW

      Find a bug by number:

      as mbox

      Find bugs by: package source package maintainer email submitter email tag
      What to search for:

      The following bug report indices are available:

      $gHTMLOtherPages $gHTMLTail HTML_END debbugs-2.4.1ubuntu1/html/server-control.html.in0000644000175000017500000002440507666112135020374 0ustar jw2328jw2328$gControlHtml = < $gProject $gBug system - control mail server commands

      Introduction to the $gBug control and manipulation mailserver

      In addition to the mailserver on request\@$gEmailDomain which allows the retrieval of $gBug data and documentation by email, there is another server on control\@$gEmailDomain which also allows $gBug reports to be manipulated in various ways.

      The control server works just like the request server, except that it has some additional commands; in fact, it's the same program. The two addresses are only separated to avoid users making mistakes and causing problems while merely trying to request information.

      Please see the introduction to the request server available on the World Wide Web, in the file bug-log-mailserver.txt, or by sending help to either mailserver, for details of the basics of operating the mailservers and the common commands available when mailing either address.

      The reference card for the mailservers is available via the WWW, in bug-mailserver-refcard.txt or by email using the refcard command.

      Commands available at the control mailserver

      reassign bugnumber package
      Records that $gBug #${gBug}number is a $gBug in package. This can be used to set the package if the user forgot the pseudo-header, or to change an earlier assignment. No notifications are sent to anyone (other than the usual information in the processing transcript).
      reopen bugnumber [ originator-address | = | ! ]
      Reopens #bugnumber if it is closed.

      By default, or if you specify =, the original submitter is still as the originator of the report, so that they will get the ack when it is closed again.

      If you supply an originator-address the originator will be set to the address you supply. If you wish to become the new originator of the reopened report you can use the ! shorthand or specify your own email address.

      It is usually a good idea to tell the person who is about to be recorded as the originator that you're reopening the report, so that they will know to expect the ack which they'll get when it is closed again.

      If the $gBug is not closed then reopen won't do anything, not even change the originator. To change the originator of an open $gBug report, use the submitter command; note that this will inform the original submitter of the change.

      submitter bugnumber originator-address | !
      Changes the originator of #bugnumber to originator-address.

      If you wish to become the new originator of the report you can use the ! shorthand or specify your own email address.

      While the reopen command changes the originator of other bugs merged with the one being reopened, submitter does not affect merged bugs.

      forwarded bugnumber address
      Notes that bugnumber has been forwarded to the upstream maintainer at address. This does not actually forward the report. This can be used to change an existing incorrect forwarded-to address, or to record a new one for a $gBug that wasn't previously noted as having been forwarded.
      notforwarded bugnumber
      Forgets any idea that bugnumber has been forwarded to any upstream maintainer. If the $gBug was not recorded as having been forwarded then this will do nothing.
      retitle bugnumber new-title
      Changes the title of a $gBug report to that specified (the default is the Subject mail header from the original report).

      Unlike most of the other $gBug-manipulation commands when used on one of a set of merged reports this will change the title of only the individual $gBug requested, and not all those with which it is merged.

      severity bugnumber severity
      Set the severity level for $gBug report #bugnumber to severity. No notification is sent to the user who reported the $gBug.

      For their meanings please consult the general developers' documentation for the $gBug system.

      clone bugnumber [ new IDs ]
      The clone control command allows you to duplicate a $gBug report. It is useful in the case where a single report actually indicates that multiple distinct $gBugs have occurred. "New IDs" are negative numbers, separated by spaces, which may be used in subsequent control commands to refer to the newly duplicated $gBugs. A new report is generated for each new ID.

      Example usage:

              clone 12345 -1 -2
              reassign -1 foo
              retitle -1 foo: foo sucks
              reassign -2 bar
              retitle -2 bar: bar sucks when used with foo
              severity -2 wishlist
              clone 123456 -3
              reassign -3 foo
              retitle -3 foo: foo sucks
              merge -1 -3
        
      merge bugnumber bugnumber ...
      Merges two or more $gBug reports. When reports are merged opening, closing, marking or unmarking as forwarded and reassigning any of the $gBugs to a new package will have an identical effect on all of the merged reports.

      Before $gBugs can be merged they must be in exactly the same state: either all open or all closed, with the same forwarded-to upstream author address or all not marked as forwarded, all assigned to the same package or package(s) (an exact string comparison is done on the package to which the $gBug is assigned), and all of the same severity. If they don't start out in the same state you should use reassign, reopen and so forth to make sure that they are before using merge.

      If any of the $gBugs listed in a merge command is already merged with another $gBug then all the reports merged with any of the ones listed will all be merged together. Merger is like equality: it is reflexive, transitive and symmetric.

      Merging reports causes a note to appear on each report's logs; on the WWW pages this includes links to the other $gBugs.

      Merged reports are all expired simultaneously, and only when all of the reports each separately meet the criteria for expiry.

      unmerge bugnumber
      Disconnects a $gBug report from any other reports with which it may have been merged. If the report listed is merged with several others then they are all left merged with each other; only their associations with the $gBug explicitly named are removed.

      If many $gBug reports are merged and you wish to split them into two separate groups of merged reports you must unmerge each report in one of the new groups separately and then merge them into the required new group.

      You can only unmerge one report with each unmerge command; if you want to disconnect more than one $gBug simply include several unmerge commands in your message.

      tags bugnumber [ + | - | = ] tag
      Sets a particular tag for the $gBug report #bugnumber to tag. No notification is sent to the user who reported the $gBug. + means adding, - means subtracting, and = means ignoring the current tags and setting them afresh. The default action is adding.

      Available tags currently include patch, wontfix, moreinfo, unreproducible, help, pending, fixed, security, upstream, potato, woody, sarge, sid and experimental.

      For their meanings please consult the general developers' documentation for the $gBug system.

      close bugnumber
      Close $gBug report #bugnumber.

      A notification is sent to the user who reported the $gBug, but (in contrast to mailing bugnumber-done@$gEmailDomain) the text of the mail which caused the $gBug to be closed is not included in that notification. The maintainer who closes a report should ensure, probably by sending a separate message, that the user who reported the $gBug knows why it is being closed. The use of this command is therefore deprecated.

      quit
      stop
      thank...
      --...
      Tells the control server to stop processing the message; the remainder of the message can include explanations, signatures or anything else, none of it will be detected by the control server.
      #...
      One-line comment. The # must be at the start of the line.

      Other pages:

      $gHTMLTail HTML_END debbugs-2.4.1ubuntu1/html/server-refcard.html.in0000644000175000017500000000741207631400500020305 0ustar jw2328jw2328$gRefcardHtml = < $gProject $gBug system - mail servers' reference card

      Mail servers' reference card

      Full documentation of the mail servers is available on the WWW, in the files bug-log-mailserver.txt and bug-maint-mailcontrol.txt or by sending the word help to each mailserver.

      Synopsis of commands available at request@$gEmailDomain

      • send bugnumber
      • send-detail bugnumber
      • index [full]
      • index-summary by-package
      • index-summary by-number
      • index-maint
      • index maint maintainer
      • index-packages
      • index packages package
      • send-unmatched [this|0]
      • send-unmatched last|-1
      • send-unmatched old|-2
      • getinfo filename (see below)
      • help
      • refcard
      • quit|stop|thank...|--...
      • #... (comment)
      • debug level

      List of info files for getinfo

      • maintainers
      • override.stable
      • override.development
      • override.contrib
      • override.non-free
      • override.experimental
      • override.codeword
      • pseudo-packages.description
      • pseudo-packages.maintainers

      Synopsis of extra commands available at control mailserver

      • close bugnumber (you must separately tell originator why)
      • reassign bugnumber package
      • severity bugnumber severity
      • reopen bugnumber [ originator-address | = | ! ]
      • submitter bugnumber originator-address | !
      • forwarded bugnumber address
      • notforwarded bugnumber
      • retitle bugnumber new-title
      • merge bugnumber bugnumber ...
      • unmerge bugnumber

      reopen with = or no originator address leaves the originator as the original submitter; ! sets it to you, the person doing the reopen.

      $gHTMLSeverityDesc

      Other pages:

      $gHTMLTail HTML_END debbugs-2.4.1ubuntu1/html/server-request.html.in0000644000175000017500000001440007632760061020376 0ustar jw2328jw2328$gRequestHtml = < $gProject $gBug system - $gBug logs by mail server

      Introduction to the $gBug system request server

      There is a mailserver which can send the $gBug reports and indices as plain text on request.

      To use it you send a mail message to request\@$gEmailDomain. The Subject of the message is ignored, except for generating the Subject of the reply.

      The body you send should be a series of commands, one per line. You'll receive a reply which looks like a transcript of your message being interpreted, with a response to each command. No notifications are sent to anyone for most commands; however, the messages are logged and made available in the WWW pages.

      Any text on a line starting with a hash sign # is ignored; the server will stop processing when it finds a line starting with quit, stop, thank or two hyphens (to avoid parsing a signature). It will also stop if it encounters too many unrecognised or badly-formatted commands. If no commands are successfully handled it will send the help text for the server.

      Commands available

      send bugnumber
      send-detail bugnumber
      Requests the transcript for the $gBug report in question. send-detail sends all of the `boring' messages in the transcript as well, such as the various auto-acks.
      index [full]
      index-summary by-package
      index-summary by-number
      Request the full index (with full details, and including done and forwarded reports), or the summary sorted by package or by number, respectively.
      index-maint
      Requests the index page giving the list of maintainers with $gBugs (open and recently-closed) in the tracking system.
      index maint maintainer
      Requests the index pages of $gBugs in the system for the maintainer maintainer. The search term is an exact match. The $gBug index will be sent in a separate message.
      index-packages
      Requests the index page giving the list of packages with $gBugs (open and recently-closed) in the tracking system.
      index packages package
      Requests the index pages of $gBugs in the system for the package package. The search term is an exact match. The $gBug index will be sent in a separate message.
      send-unmatched [this|0]
      send-unmatched last|-1
      send-unmatched old|-2
      Requests logs of messages not matched to a particular $gBug report, for this week, last week and the week before. (Each week ends on a Wednesday.)
      getinfo filename
      Request a file containing information about package(s) and or maintainer(s) - the files available are:
      maintainers
      The unified list of packages' maintainers, as used by the tracking system. $gCreateMaintainers
      pseudo-packages.description
      pseudo-packages.maintainers
      List of descriptions and maintainers respectively for pseudo-packages.
      refcard
      Requests that the mailservers' reference card be sent in plain ASCII.
      help
      Requests that this help document be sent by email in plain ASCII.
      quit
      stop
      thank...
      --...
      Stops processing at this point of the message. After this you may include any text you like, and it will be ignored. You can use this to include longer comments than are suitable for #, for example for the benefit of human readers of your message (reading it via the tracking system logs or due to a CC or BCC).
      #...
      One-line comment. The # must be at the start of the line.
      debug level
      Sets the debugging level to level, which should be a nonnegative integer. 0 is no debugging; 1 is usually sufficient. The debugging output appears in the transcript. It is not likely to be useful to general users of the $gBug system.

      There is a reference card for the mailservers, available via the WWW, in bug-mailserver-refcard.txt or by email using the refcard command (see above).

      If you wish to manipulate $gBug reports you should use the control\@gEmailDomain address, which understands a superset of the commands listed above. This is described in another document, available on the WWW, in the file bug-maint-mailcontrol.txt, or by sending help to control\@$gEmailDomain.

      In case you are reading this as a plain text file or via email: an HTML version is available via the $gBug system main contents page http://$gWebDomain/.


      Other pages:

      $gHTMLTail HTML_END debbugs-2.4.1ubuntu1/migrate/0000755000175000017500000000000007670052014014566 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/migrate/debbugs-dbhash0000755000175000017500000000202707565737000017367 0ustar jw2328jw2328#! /usr/bin/perl -w # Migrate an old-style database to the new hashed (db-h) form. use strict; use File::Copy; if (@ARGV != 2) { print < sample-doc John Smith test Mary Jane debbugs-2.4.1ubuntu1/misc/Maintainers.override0000644000175000017500000000005707565746524020131 0ustar jw2328jw2328overridden Paul Brown debbugs-2.4.1ubuntu1/misc/crontab.in0000644000175000017500000000076007575517663016100 0ustar jw2328jw2328# Example crontab for bugs system. You can just install the crontab.out # version of this file if you like. DBC_CRONTAB_MAILTO DBC_PROCESS_FREQ * * * DBC_SCRIPT_PATH/processall >/dev/null DBC_HTMLCHECK_FREQ * * * DBC_SCRIPT_PATH/html-control >/dev/null 22 7 * * * touch DBC_SPOOL_PATH/db-h 23 7 * * 3 DBC_SCRIPT_PATH/age-1 24 7 * * * DBC_SCRIPT_PATH/expire >/dev/null 23 16 * * 5 DBC_SCRIPT_PATH/mailsummary undone >/dev/null 23 16 * * 2 DBC_SCRIPT_PATH/mailsummary bymaint >/dev/null debbugs-2.4.1ubuntu1/misc/nextnumber0000644000175000017500000000000306763547415016214 0ustar jw2328jw232810 debbugs-2.4.1ubuntu1/misc/pseudo-packages.description0000644000175000017500000000007306763547415021431 0ustar jw2328jw2328other Other packages test Test Package Pseudo debbugs-2.4.1ubuntu1/misc/sources0000644000175000017500000000011207565746524015514 0ustar jw2328jw2328extra main extra sample main sample sample-doc main sample test main test debbugs-2.4.1ubuntu1/misc/updateseqs0000644000175000017500000000002106763547415016203 0ustar jw2328jw232800000000000001 0 debbugs-2.4.1ubuntu1/scripts/0000755000175000017500000000000007670052015014626 5ustar jw2328jw2328debbugs-2.4.1ubuntu1/scripts/.cvsignore0000644000175000017500000000001606763547415016642 0ustar jw2328jw2328*.out *.trace debbugs-2.4.1ubuntu1/scripts/age-1.in0000755000175000017500000000035307416025400016050 0ustar jw2328jw2328#!/bin/sh # $Id: age-1.in,v 1.3 2002/01/06 10:46:24 ajt Exp $ set -e cd /var/lib/debbugs/spool/db-h test -f ./-3.log && rm ./-3.log test -f ./-2.log && mv ./-2.log ./-3.log test -f ./-1.log && mv ./-1.log ./-2.log #rm -f ../stamp.html debbugs-2.4.1ubuntu1/scripts/config.debian0000644000175000017500000000674207667577323017274 0ustar jw2328jw2328# This is the bugs.debian.org debbugs configuration file. # $Id: config.debian,v 1.20 2003/06/05 08:26:59 cjwatson Exp $ # Domains $gEmailDomain = "bugs.debian.org"; $gListDomain = "lists.debian.org"; $gWebDomain = "www.debian.org/Bugs"; $gHTMLSuffix = ""; $gPackagePages = "packages.debian.org"; $gCGIDomain = "bugs.debian.org/cgi-bin"; $gMirrors = ""; # comma separated list $gSubscriptionDomain = "packages.qa.debian.org"; # Project identification $gProject = "Debian"; $gProjectTitle = "Debian GNU/Linux"; # Person(s) responsible for this installation $gMaintainer = "Debian bug tracking system administrator"; # should be plural but that would require changes to other scripts $gMaintainerEmail = "owner\@bugs.debian.org"; # BTS mailing lists, at $gListDomain $gSubmitList = "debian-bugs-dist"; $gMaintList = "debian-bugs-dist"; $gQuietList = "debian-bugs-dist"; $gFowardList = "debian-bugs-forwarded"; $gDoneList = "debian-bugs-closed"; $gRequestList = "debian-bugs-dist"; $gSubmitterList = "debian-bugs-dist"; $gControlList = "debian-bugs-dist"; $gSummaryList = "debian-bugs-reports"; $gMirrorList = "debian-bugs-mirror"; # sends to all mirrors # Various configurable options $gMailer = "exim"; # valid: exim, qmail and sendmail $gBug = "Bug"; # how to spell `bug' $gBugs = "Bugs"; # how to spell `bugs' $gRemoveAge = 28; # days after closed bugs are cleaned out $gSaveOldBugs = 1; # whether to archive such bugs $gDefaultSeverity = "normal"; $gShowSeverities = "critical, grave, serious, important, normal, minor, wishlist, fixed"; @gStrongSeverities = ( "critical", "grave", "serious" ); @gSeverityList = ( "critical", "grave", "serious", "important", "normal", "minor", "wishlist", "fixed" ); %gObsoleteSeverities = ( fixed => 'Use the fixed tag instead.' ); %gSeverityDisplay = ( "critical", "Critical bugs", "grave", "Grave functionality bugs", "serious", "Serious policy violations", "important", "Important bugs", "normal", "Normal bugs", "minor", "Minor bugs", "fixed", "NMU Fixed bugs", "wishlist", "Wishlist items" ); @gTags = ( "patch", "wontfix", "moreinfo", "unreproducible", "fixed", "potato", "woody", "sid", "help", "security", "upstream", "pending", "sarge", "experimental", "d-i", "confirmed", "ipv6", "lfs" ); # better don't change this $gBounceFroms = "^mailer|^da?emon|^post.*mast|^root|^wpuser|^mmdf|^smt.*|^mrgate|^vmmail|^mail.*system|^uucp|-maiser-|^mal\@|^mail.*agent|^tcpmail|^bitmail|^mailman"; # Directories -- do _not_ change their locations. # They are currently hardcoded, variables are here for future expansion. $gConfigDir = "/org/bugs.debian.org/etc"; # directory where this file is $gSpoolDir = "/org/bugs.debian.org/spool"; # working directory $gIndicesDir = "/org/bugs.debian.org/indices"; # directory where the indices are $gIncomingDir = "incoming"; # unprocessed e-mails $gWebDir = "/org/bugs.debian.org/www"; # base location of web pages $gDocDir = "/org/ftp.debian.org/ftp/doc"; # location of text doc files # Required data files $gMaintainerFile = "$gConfigDir/Maintainers"; $gMaintainerFileOverride = "$gConfigDir/Maintainers.override"; $gUnknownMaintainerEmail = "unknown-package\@qa.debian.org"; $gPseudoDescFile = "$gConfigDir/pseudo-packages.description"; $gPackageSource = "$gConfigDir/indices/sources"; debbugs-2.4.1ubuntu1/scripts/config.in0000644000175000017500000000731307667432377016452 0ustar jw2328jw2328# This is the template debbugs configuration file. # You *must* edit it in order for debbugs to work. # $Id: config.in,v 1.18 2003/06/04 18:05:51 cjwatson Exp $ # Domains $gEmailDomain = "bugs.something"; # e.g. bugs.debian.org $gListDomain = "lists.something"; # e.g. lists.debian.org $gWebHost = "localhost"; # e.g. www.debian.org $gWebHostBugDir = "Bugs"; # e.g. Bugs # For now, don't change this one manually! $gWebDomain = "$gWebHost/$gWebHostBugDir"; $gHTMLSuffix = ".html"; $gCGIDomain = "$gWebDomain/Bugs/cgi"; # e.g. cgi.debian.org $gMirrors = ""; # comma separated list $gPackagePages = "packages.debian.org"; # e.g. packages.debian.org $gSubscriptionDomain = "packages.something"; # e.g. packages.qa.debian.org # Project identification $gProject = "Something"; # e.g. Debian $gProjectTitle = "Something DebBugs Test"; # e.g. Debian GNU/Linux # Person(s) responsible for this installation $gMaintainer = "Local DebBugs Owner"; # e.g. Ian Jackson $gMaintainerWebpage = "http://localhost/~owner"; # e.g. http://www.debian.org/~iwj $gMaintainerEmail = "root\@something"; # e.g. owner@bugs.debian.org $gUnknownMaintainerEmail = "$gMaintainerEmail"; # e.g. unknown-package@qa.debian.org # BTS mailing lists, at $gListDomain # if you don't want lists, set them all to $gMaintainerEmail # if you don't want that mail at all, filter it out somehow :) $gSubmitList = "bug-submit-list"; # e.g. debian-bugs-dist $gMaintList = "bug-maint-list"; # e.g. debian-bugs-dist $gQuietList = "bug-quiet-list"; # e.g. debian-bugs-dist $gFowardList = "bug-forward-list"; # e.g. debian-bugs-forwarded $gDoneList = "bug-done-list"; # e.g. debian-bugs-closed $gRequestList = "bug-request-list"; # e.g. debian-bugs-dist $gSubmitterList = "bug-submitter-list"; # e.g. debian-bugs-dist $gControlList = "bug-control-list"; # e.g. debian-bugs-dist $gSummaryList = "bug-summary-list"; # e.g. debian-bugs-reports $gMirrorList = "bug-mirrors-list"; # sends to all mirrors # Various configurable options $gMailer = "exim"; # valid: exim, qmail and sendmail $gBug = "bug"; # how to spell `bug' $gBugs = "bugs"; # how to spell `bugs' $gRemoveAge = 28; # days after closed bugs are cleaned out $gSaveOldBugs = 1; # whether to archive such bugs $gDefaultSeverity = "normal"; $gShowSeverities = "critical, grave, normal, minor, wishlist"; @gStrongSeverities = ( 'critical', 'grave' ); @gSeverityList = ( 'critical', 'grave', 'normal', 'wishlist' ); %gSeverityDisplay = ( 'critical', "Critical $gBugs", 'grave', "Grave $gBugs", 'normal', "Normal $gBugs", 'wishlist', "Wishlist items" ); @gTags = ( 'patch', 'wontfix', 'moreinfo', 'unreproducible', 'fixed', 'stable' ); # better don't change this $gBounceFroms = "^mailer|^da?emon|^post.*mast|^root|^wpuser|^mmdf|^smt.*|^mrgate|^vmmail|^mail.*system|^uucp|-maiser-|^mal\@|^mail.*agent|^tcpmail|^bitmail|^mailman"; # Directories -- do _not_ change their locations. # They are currently hardcoded, variables are here for future expansion. $gConfigDir = "/etc/debbugs"; # directory where this file is $gSpoolDir = "/var/lib/debbugs/spool"; # working directory $gIncomingDir = "incoming"; # unprocessed e-mails $gWebDir = "/var/lib/debbugs/www"; # base location of web pages $gDocDir = "/var/lib/debbugs/www/txt"; # location of text doc files $gAJDbDir = "/var/lib/debbugs/spool/db"; # AJ's database dir $gAJIndex = "/debian/home/ajt/ajbug/pkgindex"; # AJ's package index # Required data files $gMaintainerFile = "$gConfigDir/Maintainers"; $gMaintainerFileOverride = "$gConfigDir/Maintainers.override"; $gPseudoDescFile = "$gConfigDir/pseudo-packages.description"; $gPackageSource = "$gConfigDir/indices/sources"; debbugs-2.4.1ubuntu1/scripts/config.in.default0000644000175000017500000000377307653337163020073 0ustar jw2328jw2328# $Id: config.in.default,v 1.4 2003/04/28 23:51:15 cjwatson Exp $ #domains $gEmailDomain = "bugs.top.domain"; #bugs.debian.org $gListDomain = "lists.top.domain"; #lists.debian.org $gWebDomain = "www.top.domain"; #www.debian.org/Bugs $gCGIDomain = "cgi.top.domain"; #cgi.debian.org #Identification $gProject = "project"; #Debian $gProjectTitle = "project title"; #Debian GNU/Linux #person responsible for this installation $gMaintainer = "name"; #Ian Jackson $gMaintainerWebpage = "url"; #http://www.debian.org/~iwj $gMaintainerEmail = "address"; #ownder@bugs.debian.org #directories $gSpoolDir = "/var/lib/debbugs/spool"; #working directory $gIncomingDir = "incoming"; #unprocessed emails $gWebDir = "/var/lib/debbugs/www"; #base location of web pages $gDocDir = "/usr/lib/debbugs"; #location of doc files #data files $gMaintainerFile = "/etc/debbugs/Maintainers"; $gMaintainerFileOverride = "/etc/debbugs/Maintainers.override"; $gPseudoDescFile = "/etc/debbugs/pseudo-packages.description"; #lists $gSubmitList = "submit.list"; #debian-bugs-dist@lists $gMaintList = "maint.list"; # $gQuietList = "quiet.list"; # $gFowardList = "forward.list"; #debian-bugs-forwarded@lists $gDoneList = "done.list"; #debian-bugs-closed@lists $gRequestList = "request.list"; $gSubmitterList = "submitter.list"; $gControlList = "control.list"; $gMirrorList = "mirrors.list"; #sends to all mirrors #config $gMailer='exim'; $gRemoveAge = 28; #days $gDefaultSeverity = 'normal'; @gStrongSeverities= ('critical','grave'); @gSeverityList= ('critical','grave','','wishlist'); %gSeverityDisplay=('critical','Critical bugs', 'grave','Grave bugs', 'normal','Normal bugs', 'wishlist','Wishlist items'); #dont change $gBounceFroms = "^mailer|^da?emon|^post.*mast|^root|^wpuser|^mmdf|^smt.*|\\$emd|^mrgate|^vmmail|^mail.*system|^uucp|-maiser-|^mal\@|^mail.*agent|^tcpmail|^bitmail|^mailman"; debbugs-2.4.1ubuntu1/scripts/db2html.in0000755000175000017500000006025407664153222016531 0ustar jw2328jw2328#!/usr/bin/perl # $Id: db2html.in,v 1.18 2003/05/25 14:43:30 joy Exp $ # usage: db2html [-diff] [-stampfile=] [-lastrun=] #load the necessary libraries/configuration $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require("$config_path/config"); require("$config_path/text"); require("$lib_path/errorlib"); $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; use POSIX qw(strftime tzset); $ENV{"TZ"} = 'UTC'; tzset(); #set current working directory chdir("$gSpoolDir") || die "chdir spool: $!\n"; #setup variables $diff = 0; $stampfile = 'stamp.html'; $tail_html = $gHTMLTail; $expirynote_html = $gHTMLExpireNote; $shorthead = ' Ref * Package Keywords/Subject Submitter'; $shortindex = ''; $amonths = -1; $indexunmatched = ''; %displayshowpendings = ('pending','outstanding', 'done','resolved', 'forwarded','forwarded to upstream software authors'); #set timestamp for html files $dtime = strftime "%a, %e %b %Y %T UTC", localtime; $tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; #check for commandline switches while (@ARGV && $ARGV[0] =~ m/^-/) { if ($ARGV[0] eq '-diff') { $diff=1; } elsif ($ARGV[0] =~ m/^-lastrun\=([0-9.]+)$/) { $lastrun= $1; undef $stampfile; } elsif ($ARGV[0] =~ m/^-full$/) { undef $lastrun; undef $stampfile; } elsif ($ARGV[0] =~ m/^-stampfile\=(\S+)$/) { $stampfile= $1; } else { &quit("bad usage"); } shift; } #check for remaing argument, only one... @ARGV==1 or die; $wwwbase= shift(@ARGV); #get starting time defined($startdate= time) || &quit("failed to get time: $!"); $|=1; #if stamp file was given, if (defined($stampfile)) { if (open(X,"< $stampfile")) { $lastrun= -M X; close(X); printf "progress last run %.7f days\n",$lastrun; } else { print "progress stamp file $stampfile: $! - full\n"; } } #only process file if greater than last run... if (defined($lastrun) && -M "db-h" > $lastrun) { $_= $gHTMLStamp; s/SUBSTITUTE_DTIME/$dtime/o; s/\<\!\-\-updateupdate\-\-\>.*\<\!\-\-\/updateupdate\-\-\>/check/; &file('ix/zstamp.html','non',$_."\n"); print "noremoves"; # print "db2html: no changes since last run\n"; exit 0; } #parse maintainer file open(MM,"$gMaintainerFile") || &quit("open $gMaintainerFile: $!"); while() { m/^(\S+)\s+(\S.*\S)\s*$/ || &quit("$gMaintainerFile: \`$_'"); ($a,$b)=($1,$2); $a =~ y/A-Z/a-z/; $maintainer{$a}= $b; } close(MM); #load all database files opendir(D,'db-h') || &quit("opendir db-h: $!"); @dirs = sort { $a <=> $b } grep(s#^#db-h/#,grep(/^\d+$/,readdir(D))); closedir(D); foreach my $dir (@dirs) { opendir(D,$dir); push @files, sort { $a <=> $b } grep(/^-?\d+\.log$/,readdir(D)); closedir(D); } for $pending (qw(pending done forwarded)) { for $severity (@showseverities) { eval "\$index${pending}${severity}= \$iiindex${pending}${severity}= ''; 1;" or &quit("reset \$index${pending}${severity}: $@"); } } for $f (@files) { next unless $f =~ m/^(-?\d+)\.log$/; $ref= $1; #((print STDERR "$ref\n"), #next #) # unless $ref =~ m/^-/ || $ref =~ m/^124/; &filelock("lock/$ref"); $preserveonly= defined($lastrun) && -M "db-h/".get_hashname($ref)."/$ref.log" > $lastrun; if ($ref =~ m/^-\d$/) { $week= $ref eq '-1' ? 'this week' : $ref eq '-2' ? 'last week' : $ref eq '-3' ? 'two weeks ago' : ($ref-1)." weeks ago"; $linkto= "ju/unmatched$ref"; $short= "junk, $week"; $descriptivehead= "This includes messages sent to done\@$gEmailDomain\n". "which did not have a $gBug reference number in the Subject line\n". "or which contained an\n". "unknown or out of date $gBug report number (these cause a warning\n". "to be sent to the sender) and details about the messages\n". "sent to request@$gEmailDomain (all of which". "produce replies).\n"; $indexlink= "Messages not matched to a specific $gBug report - $week"; $data->{subject}= ''; $indexentry= ''; undef $tpack; undef $tmaint; undef $iiref; $tpackfile= "pnone.html"; $indexpart= 'unmatched'; } else { $data=readbug($ref); $_= $data->{package}; y/A-Z/a-z/; $_= $` if m/[^-+._a-z0-9()]/; $tpack= $_; if ($data->{severity} eq '' || $data->{severity} eq 'normal') { $showseverity= ''; $addseverity= $gDefaultSeverity; } elsif (grep($data->{severity} eq $_, @strongseverities)) { $showseverity= "Severity: $data->{severity};\n"; $addseverity= $data->{severity}; } else { $showseverity= "Severity: $data->{severity};\n"; $addseverity= $data->{severity}; } $days= int(($startdate - $data->{date})/86400); close(S); $indexlink= "#$ref: ".&sani($data->{subject}); $indexentry= ''; $packfile= length($tpack) ? "pa/l$tpack.html" : "pa/none.html"; $indexentry .= "Package: ". &sani($data->{package}).";\n" if length($data->{package}); $indexentry .= $showseverity; $indexentry .= "Reported by: ".&sani($data->{originator}); $indexentry .= ";\nKeywords: ".&sani($data->{keywords}) if length($data->{keywords}); $linkto= $ref; $linkto =~ s,^..,$&/$&,; @merged= split(/ /,$data->{mergedwith}); if (@merged) { $mseparator= ";\nmerged with "; for $m (@merged) { $mfile= $m; $mfile =~ s,^..,$&/$&,; $indexentry .= $mseparator."#$m"; $mseparator= ",\n"; } } $daysold=$submitted=''; if (length($data->{done})) { $indexentry .= ";\nDone: ".&sani($data->{done}); $indexpart= "done$addseverity"; } elsif (length($data->{forwarded})) { $indexentry .= ";\nForwarded to ".&sani($data->{forwarded}); $indexpart= "forwarded$addseverity"; } else { $cmonths= int($days/30); if ($cmonths != $amonths) { $msg= $cmonths == 0 ? "Submitted in the last month" : $cmonths == 1 ? "Over one month old" : $cmonths == 2 ? "Over two months old - attention is required" : "OVER $cmonths MONTHS OLD - ATTENTION IS REQUIRED"; $shortindex .= "
    • $msg:

      \n$shorthead\n";
                      $amonths= $cmonths;
                  }
                  $pad= 6-length(sprintf("%d",$f));
                  $thissient=
                      ($pad>0 ? ' 'x$pad : '').
                      sprintf("%d",$linkto,$ref).
                      &sani(sprintf(" %-1.1s %-10.10s %-35.35s %-.25s\n",
      						$data->{severity},
                              $data->{package},
                              (length($data->{keywords}) ? $data->{keywords}.'/' : '').
                              $data->{subject}, $data->{originator}));
                  $shortindex.= $thissient;
                  $sient{"$ref $data->{package}"}= $thissient;
                  if ($days >= 7) 
      			{ 	$font= $days <= 30 ? '' :
                      	$days <= 60 ? 'em' :
                          'strong';
                      $efont= length($font) ? "" : '';
                      $font= length($font) ? "<$font>" : '';
                      $daysold= "; $font$days days old$efont";
                  }
                  if ($preserveonly) {
                      $submitted = 'THIS IS A BUG IN THE BUG PROCESSOR';
                  } else {
                      $submitted = strftime "%a, %e %b %Y %T %Z", localtime($data->{date});
                  }
                  $submitted= "; dated $submitted";
                  $indexpart= "pending$addseverity";
              }
              $iiref= $ref;
              $short= $ref; $short =~ s/^\d+/#$&/;
              $tmaint= defined($maintainer{$tpack}) ? $maintainer{$tpack} : '(unknown)';
              $qpackage= &sani($_);
              $descriptivehead= $indexentry.$submitted.";\nMaintainer for $qpackage is\n".
                  ''.&sani($tmaint).'.';
              $indexentry .= $daysold;
              $indexentry .= ".";
          }
          $indexadd='';
          $indexadd .= "" if defined($iiref);
          $indexadd .= "
    • ".$indexlink.""; $indexadd .= "
      \n".$indexentry if length($indexentry); $indexadd .= "" if defined($iiref); $indexadd .= "\n"; $estr= "\$index$indexpart = \$indexadd.\$index$indexpart; 1;"; eval($estr) || &quit("eval add to \$index$indexpart ($estr) failed: $@"); #print STDERR ">$estr|$indexadd<\n"; $indexadd= "\n" if defined($iiref); eval("\$iiindex$indexpart = \$indexadd.\$iiindex$indexpart; 1;") || &quit("eval add to \$iiindex$indexpart failed: $@"); if (defined($tmaint)) { $countpermaint{$tmaint} += length($data->{done}) ? 0 : length($data->{forwarded}) ? 0 : 1; eval("\$permaint${indexpart}{\$tmaint} .= \$indexadd; 1;") || &quit("eval add to \$permaint${indexpart}{\$tmaint} failed: $@"); } if (defined($tpack)) { $countperpack{$tpack} += length($data->{done}) ? 0 : length($data->{forwarded}) ? 0 : 1; eval("\$perpack${indexpart}{\$tpack} .= \$indexadd; 1;") || &quit("eval add to \$perpack${indexpart}{\$tpack} failed: $@"); } if ($preserveonly) { &preserve("$linkto.html"); &preserve("$linkto-b.html"); &unfilelock; next; } my $hash = get_hashname($ref); open(L,"db-h/$hash/$ref.log") || &quit("open db-h/$hash/$ref.log: $!"); $log=''; $boring=''; $xmessage= 0; $normstate= 'kill-init'; $suppressnext= 0; while() { if (m/^\07$/) { $normstate eq 'kill-init' || $normstate eq 'kill-end' || &quit("$ref ^G in state $normstate"); $normstate= 'incoming-recv'; } elsif (m/^\01$/) { $normstate eq 'kill-init' || $normstate eq 'kill-end' || &quit("$ref ^A in state $normstate"); $normstate= 'autocheck'; } elsif (m/^\02$/) { $normstate eq 'kill-init' || $normstate eq 'kill-end' || &quit("$ref ^B in state $normstate"); $normstate= 'recips'; } elsif (m/^\03$/) { $normstate eq 'go' || $normstate eq 'go-nox' || $normstate eq 'html' || &quit("$ref ^C in state $normstate"); $this .= "
    • \n" if $normstate eq 'go' || $normstate eq 'go-nox'; if ($normstate eq 'html') { $xmessage++; $this .= " Full text". " available."; } if ($suppressnext && $normstate ne 'html') { $ntis= $this; $ntis =~ s:\:
      :i;
                      $boring .= "
      \n$ntis\n"; } else { $log = $this. "
      \n". $log; } $suppressnext= $normstate eq 'html'; $normstate= 'kill-end'; } elsif (m/^\05$/) { $normstate eq 'kill-body' || &quit("^E in state $normstate"); $this .= "
      \n";
                  $normstate= 'go';
              } elsif (m/^\06$/) {
                  $normstate eq 'kill-init' || $normstate eq 'kill-end' ||
                      &quit("$ref ^F in state $normstate");
                  $normstate= 'html'; $this= '';
              } elsif ($normstate eq 'incoming-recv') {
                  $pl= $_; $pl =~ s/\n+$//;
                  m/^Received: \(at (\S+)\) by (\S+)\;/ ||
                      &quit("bad line \`$pl' in state incoming-recv");
                  $this = "

      Message received at ".&sani("$1\@$2").":


      \n". "
      \n".
                          "$_";
                  $normstate= 'go';
              } elsif ($normstate eq 'html') {
                  $this .= $_;
              } elsif ($normstate eq 'go') {
                  s/^\030//;
                  $this .= &sani($_);
              } elsif ($normstate eq 'go-nox') {
                  next if !s/^X//;
                  $this .= &sani($_);
              } elsif ($normstate eq 'recips') {
                  if (m/^-t$/) {
                      $this = "

      Message sent:


      \n"; } else { s/\04/, /g; s/\n$//; $this = "

      Message sent to ".&sani($_).":


      \n"; } $normstate= 'kill-body'; } elsif ($normstate eq 'autocheck') { next if !m/^X-Debian-Bugs(-\w+)?: This is an autoforward from (\S+)/; $normstate= 'autowait'; $this = "

      Message received at $2:


      \n"; } elsif ($normstate eq 'autowait') { next if !m/^$/; $normstate= 'go-nox'; $this .= "
      \n";
              } else {
                  &quit("$ref state $normstate line \`$_'");
              }
          }
          &quit("$ref state $normstate at end") unless $normstate eq 'kill-end';
          close(L);
          if (length($boring)) {
              &file("$linkto-b.html",'non',
                    "$gProject $gBug report logs - ".
                    "$short, boring messages\n".
                    "\n".
                    "$gHTMLStart

      $gProject $gBugreport logs -". "\n $short,". " boring messages

      \n$boring\n
      \n". $tail_html."\n"); } &file("$linkto.html",'non', "$gProject $gBug report logs - ". "$short\n". "\n". "$gHTMLStart

      $gProject $gBug report logs - $short
      \n". &sani($data->{subject})."

      ". "$descriptivehead\n". "\n
      \n". $log. $tail_html."\n"); &unfilelock; } sub maintsort { $_= $_[0]; s/([^<>()]+) \(([^()<>]+)\)/$2 \<$1\>/; s/\s+/ /g; s/^\s*//; $email= s/ *\<[^<>()]+\>$//g ? $& : ''; $_= "$1 $_" if s/ (\S+)$//; $_.= $email; $_; } sub maintencoded { return $maintencoded{$_[0]} if defined($maintencoded{$_[0]}); local ($input)= @_; local ($todo,$encoded)= ($input); while ($todo =~ m/\W/) { $encoded.=$`.sprintf("-%02x_",unpack("C",$&)); $todo= $'; } $encoded.= $todo; $encoded =~ s/-2e_/\./g; $encoded =~ s/^([^,]+)-20_-3c_(.*)-40_(.*)-3e_/$1,$2,$3,/; $encoded =~ s/^(.*)-40_(.*)-20_-28_([^,]+)-29_$/,$1,$2,$3/; $encoded =~ s/-20_/_/g; $encoded =~ s/-([^_]+)_-/-$1/g; $maintencoded{$input}= $encoded; } for $tmaint (keys %countpermaint) { $_= $tmaint; $after=$before=$sort2d=$sort2s=$sort1d=$sort1s=''; $after= "$&$after" if s/\s*\<[^<>()]+\>\s*$//; $after= "$&$after" if s/\s*\)\s*$//; $after= "$&$after" if s/\s*,.*$//; $before.= $& if s/^.*\(\s*//; $sort2d= $& if s/\S+$//; $sort1d= $_; while (s/^([^()<>]+)\. */$1 /) { }; s/\s+$//; y/A-Za-z/a-zA-Z/; $sort1s= $_; $sort2s= $sort2d; $sort2s =~ y/A-Za-z/a-zA-Z/; $maintsort{$tmaint}= $sort2s.' '.$sort1s.' '.$before.$sort1d.$sort2d.$after; $maintdisplay{$tmaint}= &sani($before).''.&sani($sort1d.$sort2d).''.&sani($after); } sub heading ($$) { my ($pt,$sv) = @_; return $displayshowseverities{$sv}.' - '.$displayshowpendings{$pt}; } sub makeindex ($$$) { my ($varprefix,$varsuffix,$tkey) = @_; my ($pending,$severity,$anydone,$text); $anydone= 0; $text= ''; for $pending (qw(pending forwarded done)) { for $severity (@showseverities) { $estr= "\$value= \\${varprefix}${pending}${severity}${varsuffix}; 1;"; #print STDERR $estr; eval $estr or &quit("eval get \$${varprefix}${pending}${severity} failed: $@"); #print STDERR ">$$value<\n"; next unless length($$value); $text.= "
      \n

      ".&heading($pending,$severity).":

      \n". "(List of all". " such $gBugs is available.)\n
        \n". $$value. "
      \n"; $anydone=1 if $pending eq 'done'; } } $text.= $expirynote_html if $anydone; return $text; } &file("ix/full.html",'def', $gFullIndex. makeindex('$index',"",''). "
      \n". $tail_html."\n"); &file("ju/junk.html",'non', $gJunkIndex. "
      \n

      Junk (messages without a specific $gBug report number):

      \n". "(\`this week' is everything since last Wednesday.)\n
        \n". $indexunmatched. "

      \n". $tail_html."\n"); $nobugs_html= "No reports are currently in this state."; $who_html= $gProject; $owner_addr= $gMaintainerEmail; $otherindex_html= "For other kinds of index or for other information about $gProject and the $gBug system, see the $gBug system top-level contents WWW page. "; for $pending (qw(pending forwarded done)) { for $severity (@showseverities) { eval "\$value= \\\$iiindex${pending}${severity}; 1;" or &quit("eval get \$iiindex${pendingtype}${severity} failed: $@"); $value= \$nobugs_html if !length($$value); $headstring= &heading($pending,$severity); &file("si/$pending$severity.html",'ref', "$who_html $gBug reports: $headstring\n". "\n". "$gHTMLStart

      $who_html $gBug reports: $headstring

      \n". $otherindex_html. ($pending eq 'done' ? "

      \n$expirynote_html" : ''). "


      \n
        \n". $$value. "
      \n
      \n". $tail_html."\n"); } } sub individualindexes ($\@&\%&&$$$$$&&) { my ($filename,$keysref,$getfilenameref,$countref,$getdisplayref, $getsimpledisplayref,$what,$caveat,$whatplural,$abbrev,$ihead, $getxinforef,$getxindexref) = @_; my ($itext,$i,$tkey,$sani,$count,$tfilename,$refto,$backnext,$xitext,$bugbugs); $itext=''; for ($i=0; $i<=$#$keysref; $i++) { $tkey= $$keysref[$i]; $tfilename= &$getfilenameref($tkey); $sani= &$getsimpledisplayref($tkey); $count= $$countref{$tkey}; $count= $count >= 1 ? "$count" : "no"; $bugbugs= $count == 1 ? "$gBug" : "$gBugs"; $xitext= &$getxindexref($tkey); $xitext= length($xitext) ? "$count $bugbugs; $xitext" : "$count outstanding $bugbugs"; $itext .= "
    • ".&$getdisplayref($tkey).""."\n". " ($xitext)\n"; $backnext= ''; if ($i>0) { $refto= $$keysref[$i-1]; $xitext= &$getxindexref($refto); $xitext= " ($xitext)" if length($xitext); $backnext .= "
      \nPrevious $what in list, ".&$getdisplayref($refto)."". "$xitext\n"; } if ($i<$#$keysref) { $refto= $$keysref[$i+1]; $xitext= &$getxindexref($refto); $xitext= " ($xitext)" if length($xitext); $backnext .= "
      \nNext $what in list, ".&$getdisplayref($refto)."". "$xitext\n"; } &file($tfilename,'ref', "$gProject $gBug reports: $what $sani\n". "\n". "$gHTMLStart

      $gProject $gBug reports: $what $sani

      \n". &$getxinforef($tkey). $caveat. "See the listing of $whatplural.\n". $backnext. &makeindex("\$per${abbrev}","{\$tkey}",$tkey). "
      \n". $tail_html."\n"); } &file($filename,'non', $ihead. "
        \n". $itext. "

      \n". $tail_html."\n"); } @maintainers= sort { $maintsort{$a} cmp $maintsort{$b}; } keys %countpermaint; individualindexes('ix/maintainers.html', @maintainers, sub { 'ma/l'.&maintencoded($_[0]).'.html'; }, %countpermaint, sub { $maintdisplay{$_[0]}; }, sub { &sani($_[0]); }, 'maintainer', "Note that there may be other reports filed under different variations on the maintainer\'s name and email address.

      ", 'maintainers', 'maint', $gMaintIndex, sub { return ''; }, sub { return ''; }); @packages= sort keys %countperpack; individualindexes('ix/packages.html', @packages, sub { length($_[0]) ? "pa/l$_[0].html" : 'pa/none.html'; }, %countperpack, sub { length($_[0]) ? $_[0] : 'not specified'; }, sub { &sani(length($_[0]) ? $_[0] : 'not specified'); }, 'package', "Note that with multi-binary packages there may be other reports filed under the different binary package names.

      ", 'packages', 'pack', $gPackageIndex, sub { return unless defined($maintainer{$_[0]}); $tmaint= $maintainer{$_[0]}; return "Maintainer for $_[0] is ".&sani($tmaint).".\n

      \n"; }, sub { return unless defined($maintainer{$_[0]}); $tmaint= $maintainer{$_[0]}; return "".&sani($tmaint).""; }); &file('ix/summary.html','non', $gSummaryIndex. "


      \n".
            $shortindex.
            "

      \n". $tail_html."\n"); $bypackageindex=''; for $k (map {$_->[0] } sort { $a->[2] cmp $b->[2] || $a->[1] <=> $b->[1] } map { [$_, split(' ',$_,2)] } keys %sient) { $bypackageindex.= $sient{$k}; } &file('ix/psummary.html','non', $gPackageLog. "
      \n$shorthead\n".
            $bypackageindex.
            "

      \n". $tail_html."\n"); open(P,"$gPseudoDescFile") || &quit("$gPseudoDescFile: $!"); $ppd=''; while(

      ) { s/\s*\n$//; $ppd.= &sani($_)."\n"; } close(P); &file('ix/pseudopackages.html','non', $gPseudoIndex. "


      \n$ppd".
            "

      \n". $tail_html."\n"); $_= $gHTMLStamp; s/SUBSTITUTE_DTIME/$dtime/o; &file('ix/zstamp.html','non',$_."\n"); sub notimestamp ($) { $_= $_[0]; s/\<\!\-\-timestamp\-\-\>\n.*\n\<\!\-\-\/timestamp\-\-\>\n//; return $_; } sub file { local ($name,$ii,$file)= @_; if ($diff) { $cmppath= "$wwwbase/$name".($ii eq 'ref' ? '.ref' : ''); if (open(ORIG,"$cmppath")) { undef $/; $orig= ; $/= "\n"; close(ORIG); if (¬imestamp($orig) eq ¬imestamp($file)) { print "preserve $name\n"; return; } defined($c= open(P,"-|")) or &quit("pipe/fork for diff: $!"); if (!$c) { open(Q,"|diff -e $cmppath -") or die "pipe/fork II for diff: $!\n"; print Q $file or die "write orig to diff: $!\n"; close(Q); $?==0 || $?==256 or die "diff gave $?\n"; exit($?>>8); } undef $/; $difftxt=

      ; $/= "\n"; close(P); $?==0 || $?==256 or die "diff fork gave $?\n"; if ($?==0) { print "preserve $name\n"; return; } $v= (split(/\n/,$difftxt)); print "diff $v $ii $name\n${difftxt}thatdiff $name\n" or &quit("stdout (diff): $!"); return; } } $v= (split(/\n/,$file)); print "file $v $ii $name\n${file}thatfile $name\n" or &quit("stdout: $!"); } sub preserve { print "preserve $_[0]\n"; } print "end\n"; while ($u= $cleanups[$#cleanups]) { &$u; } exit 0; debbugs-2.4.1ubuntu1/scripts/errorlib.in0000755000175000017500000002015107670051320016776 0ustar jw2328jw2328# -*- perl -*- # $Id: errorlib.in,v 1.28.2.1 2003/06/06 08:37:36 cjwatson Exp $ sub F_SETLK { 6; } sub F_WRLCK{ 1; } $flockstruct= 'sslll'; # And there ought to be something for this too. sub get_hashname { return "" if ( $_[ 0 ] < 0 ); return sprintf "%02d", $_[ 0 ] % 100; } sub unlockreadbugmerge { local ($rv) = @_; &unfilelock if $rv >= 2; &unfilelock if $rv >= 1; } sub lockreadbugmerge { local ($lref, $location) = @_; local $data; if (!($data = &lockreadbug($lref, $location))) { return ( 0, undef ); } if (!length($data{mergedwith})) { return ( 1, $data ); } &unfilelock; &filelock('lock/merge'); if (!&lockreadbug($lref, $location)) { &unfilelock; return ( 0, undef ); } return ( 2, $data ); } sub getbuglocation { my ( $bugnum, $ext ) = @_; my $archdir = sprintf "%02d", $bugnum % 100; return 'archive' if ( -r "$gSpoolDir/archive/$archdir/$bugnum.$ext" ); return 'db-h' if ( -r "$gSpoolDir/db-h/$archdir/$bugnum.$ext" ); return 'db' if ( -r "$gSpoolDir/db/$bugnum.$ext" ); return undef; } sub getlocationpath { my ($location) = @_; if ($location eq 'archive') { return "$gSpoolDir/archive"; } elsif ($location eq 'db') { return "$gSpoolDir/db"; } else { return "$gSpoolDir/db-h"; } } sub readbug { local ($lref, $location) = @_; my $hash = get_hashname($lref); $path = getlocationpath($location); if (!open(S,"$path/$hash/$lref.status")) { &unfilelock; return undef; } my %data; chop($data{originator}= ); chop($data{date}= ); chop($data{subject}= ); chop($data{msgid}= ); chop($data{package}= ); chop($data{keywords}= ); chop($data{done}= ); chop($data{forwarded}= ); chop($data{mergedwith}= ); chop($data{severity}= ); close(S); $data{severity} = 'normal' if $data{severity} eq ''; return \%data; } sub lockreadbug { local ($lref, $location) = @_; &filelock("lock/$lref"); return readbug($lref, $location); } sub writebug { local ($ref, $data, $location) = @_; my $hash = get_hashname($ref); my $change; $path = getlocationpath($location); open(S,">$path/$hash/$ref.status.new") || &quit("opening $path/$hash/$ref.status.new: $!"); print(S "$data->{originator}\n". "$data->{date}\n". "$data->{subject}\n". "$data->{msgid}\n". "$data->{package}\n". "$data->{keywords}\n". "$data->{done}\n". "$data->{forwarded}\n". "$data->{mergedwith}\n". "$data->{severity}\n") || &quit("writing $path/$hash/$ref.status.new: $!"); close(S) || &quit("closing $path/$hash/$ref.status.new: $!"); if (-e "$path/$hash/$ref.status") { $change = 'change'; } else { $change = 'new'; } rename("$path/$hash/$ref.status.new","$path/$hash/$ref.status") || &quit("installing new $path/$hash/$ref.status: $!"); &bughook($change,$ref, "$data->{originator}\n". "$data->{date}\n". "$data->{subject}\n". "$data->{msgid}\n". "$data->{package}\n". "$data->{keywords}\n". "$data->{done}\n". "$data->{forwarded}\n". "$data->{mergedwith}\n". "$data->{severity}\n"); } sub unlockwritebug { writebug(@_); &unfilelock; } sub filelock { # NB - NOT COMPATIBLE WITH `with-lock' local ($lockfile,$flockpushno,$evalstring,$count,$errors,@s1,@s2) = @_; $flockpushno= $#filelocks+1; $count= 10; $errors= ''; for (;;) { $evalstring= " open(FLOCK${flockpushno},\"> \$lockfile\") || die \"open: \$!\"; \$flockwant= pack(\$flockstruct,&F_WRLCK,0,0,1,0);". ($] >= 5.000 ? " fcntl(FLOCK$flockpushno,&F_SETLK,\$flockwant) || die \"setlk: \$!\";" : " \$z= syscall(&SYS_fcntl,fileno(FLOCK$flockpushno),&F_SETLK,\$flockwant) < 0 && die \"syscall fcntl setlk: \$!\";") ." (\@s1= lstat(\$lockfile)) || die \"lstat: \$!\"; (\@s2= stat(FLOCK$flockpushno)) || die \"fstat: \$!\"; join(',',\@s1) eq join(',',\@s2) || die \"file switched\"; 1; "; last if eval $evalstring; $errors .= $@; eval "close(FLOCK$flockpushno);"; if (--$count <=0) { $errors =~ s/\n+$//; &quit("failed to get lock on file $lockfile: $errors // $evalstring"); } sleep 10; } push(@cleanups,'unfilelock'); push(@filelocks,$lockfile); } sub unfilelock { if (@filelocks == 0) { warn "unfilelock called with no active filelocks!\n"; return; } local ($lockfile) = pop(@filelocks); pop(@cleanups); eval 'close(FLOCK'.($#filelocks+1).');' || warn "failed to close lock file $lockfile: $!"; unlink($lockfile) || warn "failed to remove lock file $lockfile: $!"; } sub quit { print DEBUG "quitting >$_[0]<\n"; local ($u); while ($u= $cleanups[$#cleanups]) { &$u; } die "*** $_[0]\n"; } %saniarray= ('<','lt', '>','gt', '&','amp', '"','quot'); sub sani { local ($in) = @_; local ($out); while ($in =~ m/[<>&"]/) { $out.= $`. '&'. $saniarray{$&}. ';'; $in=$'; } $out.= $in; $out; } sub update_realtime { my ($file, $bug, $new) = @_; # update realtime index.db open(IDXDB, "<$file") or die "Couldn't open $file"; open(IDXNEW, ">$file.new"); my $line; my @line; while($line = ) { @line = split /\s/, $line; last if ($line[1] >= $bug); print IDXNEW $line; $line = ""; } if ($new eq "NOCHANGE") { print IDXNEW $line if ($line ne "" && $line[1] == $ref); } elsif ($new eq "REMOVE") { 0; } else { print IDXNEW $new; } if ($line ne "" && $line[1] > $bug) { print IDXNEW $line; $line = ""; } print IDXNEW while(); close(IDXNEW); close(IDXDB); rename("$file.new", $file); return $line; } sub bughook_archive { my $ref = shift; &filelock("debbugs.trace.lock"); &appendfile("debbugs.trace","archive $ref\n"); my $line = update_realtime( "$gSpoolDir/index.db.realtime", $ref, "REMOVE"); update_realtime("$gSpoolDir/index.archive.realtime", $ref, $line); &unfilelock; } sub bughook { my ( $type, $ref ) = ( shift, shift ); &filelock("debbugs.trace.lock"); &appendfile("debbugs.trace","$type $ref\n",@_); my @stuff=split /\n/, "$_[0]\n\n\n\n\n\n\n"; my $whendone = "open"; my $severity = $gDefaultSeverity; (my $pkglist = $stuff[4]) =~ s/[,\s]+/,/g; $pkglist =~ s/^,+//; $pkglist =~ s/,+$//; $whendone = "forwarded" if length $stuff[7]; $whendone = "done" if length $stuff[6]; $severity = $stuff[9] if length $stuff[9]; my $k = sprintf "%s %d %d %s [%s] %s %s\n", $pkglist, $ref, $stuff[1], $whendone, $stuff[0], $severity, $stuff[5]; update_realtime("$gSpoolDir/index.db.realtime", $ref, $k); &unfilelock; } sub appendfile { my $file = shift; if (!open(AP,">>$file")) { print DEBUG "failed open log<\n"; print DEBUG "failed open log err $!<\n"; &quit("opening $file (appendfile): $!"); } print(AP @_) || &quit("writing $file (appendfile): $!"); close(AP) || &quit("closing $file (appendfile): $!"); } sub getmailbody { my $entity = shift; my $type = $entity->effective_type; if ($type eq 'text/plain' or ($type =~ m#text/# and $type ne 'text/html') or $type eq 'application/pgp') { return $entity->bodyhandle; } elsif ($type eq 'multipart/alternative') { # RFC 2046 says we should use the last part we recognize. for my $part (reverse $entity->parts) { my $ret = getmailbody($part); return $ret if $ret; } } else { # For other multipart types, we just pretend they're # multipart/mixed and run through in order. for my $part ($entity->parts) { my $ret = getmailbody($part); return $ret if $ret; } } return undef; } sub escapelog { my @log = @_; map { s/^([\01-\07\030])/\030$1/gm } @log; return \@log; } @severities= grep { not exists $gObsoleteSeverities{$_} } @gSeverityList; @showseverities= @severities; grep ($_= $_ eq '' ? $gDefaultSeverity : $_, @showseverities); @strongseverities= @gStrongSeverities; %displayshowseverities= %gSeverityDisplay; 1; debbugs-2.4.1ubuntu1/scripts/expire.in0000755000175000017500000000643107664141132016463 0ustar jw2328jw2328#!/usr/bin/perl # $Id: expire.in,v 1.16 2003/05/25 13:17:14 cjwatson Exp $ # Load modules and set envirnment use File::Copy; $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require("$config_path/config"); require("$config_path/text"); require("$lib_path/errorlib"); $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; chdir("$gSpoolDir") || die "chdir spool: $!\n"; #global variables $debug = 0; defined($startdate= time) || &quit("failed to get time: $!"); #get list of bugs (ie, status files) opendir(DIR,"db-h") || &quit("opendir db: $!\n"); @dirs = sort { $a <=> $b } grep(s,^,db-h/,, grep(m/^\d+$/,readdir(DIR))); close(DIR); foreach my $dir (@dirs) { opendir(DIR,$dir); push @list, sort { $a <=> $b } grep(s/\.status$//,grep(m/^\d+\.status$/,readdir(DIR))); close(DIR); } #process each bug (ie, status file) while (length($ref=shift(@list))) { print STDERR "$ref considering\n" if $debug; ($bfound, $data)= &lockreadbugmerge($ref); print STDERR "$ref read $bfound\n" if $debug; $bfound || next; print "$ref read ok (done $data->{done})\n" if $debug; (&unlockreadbugmerge($bfound), next) unless length($data->{done}); print "$ref read done\n" if $debug; @aref= ($ref); if (length($data->{mergedwith})) { push(@aref,split / /,$data->{mergedwith}); } print "$ref aref @aref\n" if $debug; $oktoremove= 1; for $mref (@aref) { print "$ref $mref check\n" if $debug; if ($mref != $ref) { print "$ref $mref reading\n" if $debug; $newdata = &lockreadbug($mref) || die "huh $mref ?"; print "$ref $mref read ok\n" if $debug; $bfound++; } else { $newdata = $data; } print "$ref $mref read/not\n" if $debug; $expectmerge= join(' ',grep($_ != $mref, sort { $a <=> $b } @aref)); $newdata->{mergedwith} eq $expectmerge || die "$ref -> $mref: ($newdata->{mergedwith}) vs. ($expectmerge) (@aref)"; print "$ref $mref merge-ok\n" if $debug; length($newdata->{done}) || die "$ref -> $mref"; print "$ref $mref done-ok\n" if $debug; $days= -M "db-h/".get_hashname($mref)."/$mref.log"; print "ref $mref days $days\n" if $debug; if ($days <= $gRemoveAge) { print "$ref $mref saved\n" if $debug; $oktoremove= 0; } } if ($oktoremove) { print "$ref removing\n" if $debug; for $mref (@aref) { print "$ref removing $mref\n" if $debug; my $dir = get_hashname($mref); if ( $gSaveOldBugs ) { `mkdir -p "archive/$dir"`; link( "db-h/$dir/$mref.log", "archive/$dir/$mref.log" ) || copy( "db-h/$dir/$mref.log", "archive/$dir/$mref.log" ); link( "db-h/$dir/$mref.status", "archive/$dir/$mref.status" ) || copy( "db-h/$dir/$mref.status", "archive/$dir/$mref.status" ); link( "db-h/$dir/$mref.report", "archive/$dir/$mref.report" ) || copy( "db-h/$dir/$mref.report", "archive/$dir/$mref.report" ); print("archived $mref to archive/$dir (from $ref)\n") || &quit("output old: $!"); } unlink("db-h/$dir/$mref.log", "db-h/$dir/$mref.status", "db-h/$dir/$mref.report"); print("deleted $mref (from $ref)\n") || &quit("output old: $!"); bughook_archive($mref); } } print "$ref unlocking $bfound\n" if $debug; for ($i=0; $i<$bfound; $i++) { &unfilelock; } print "$ref unlocking done\n" if $debug; } close(STDOUT) || &quit("close stdout: $!"); debbugs-2.4.1ubuntu1/scripts/html-control.in0000755000175000017500000000631307670047544017621 0ustar jw2328jw2328#!/usr/bin/perl # $Id: html-control.in,v 1.11 2003/06/06 08:23:00 cjwatson Exp $ use POSIX qw(strftime tzset ENOENT); $ENV{"TZ"} = 'UTC'; tzset(); $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require("$config_path/config"); require("$lib_path/errorlib"); $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; chdir("$gSpoolDir") || die "chdir spool: $!\n"; #push(@INC,"$lib_path"); &filelock("html.fcntl-lock"); unlink("html-data.gz") || $!==&ENOENT or &quit("remove html-data.gz: $!"); sub nonawful ($) { rename("stamp.html.run","stamp.html") or warn "warning: put back stamp.html: $!"; &quit($_[0]); } if (open(US,'updateseqs') && -f 'stamp.html') { chop($lastmain=); chop($lastsub=); close(US); $lastsub++; $args= "-diff -stampfile=stamp.html.run"; rename("stamp.html","stamp.html.run") or &quit("rename stamp.html: $!"); } else { $lastsub=0; $lastmain = strftime "%Y%m%d%H%M%S", localtime; $args= '-full'; unlink('stamp.html') || $!==&ENOENT or &quit("excise stale stamp.html: $!"); } open(X,">stamp.html.new") or &quit("stamp.html.new: $!"); close(X) or &quit("close stamp.html.new: $!"); open(US,'>updateseqs.new') || &quit("create updateseqs.new: $!"); print(US "$lastmain\n$lastsub\n") || &quit("write updateseqs.new: $!"); close(US) || &quit("close updateseqs.new: $!"); rename('updateseqs.new','updateseqs') or nonawful("install updateseqs: $!"); sub runshell ($&) { my ($cmd,$errhref) = @_; print "xx $cmd\n"; system $cmd; !$? && !length($stderr) or &$errhref("$cmd failed - gave $? / $stderr"); } $sequences="$lastmain $lastsub"; $seqmid= $sequences; $seqmid =~ y/ /-/; open(MM,">html-data.mail") or nonawful("open html-data.mail: $!"); if ( length( $gListDomain ) > 0 && length( $gMirrorList ) > 0 ) { print(MM < X-$gProject=PR: update $sequences END ) or nonawful("write html-data.mail header: $!"); } else { print(MM < X-$gProject=PR: update $sequences END ) or nonawful("write html-data.mail header: $!"); } close(MM) or nonawful("close html-data.mail: $!"); runshell("$lib_path/db2html $args 2>&1 >html-data $gWebDir/db", sub { &nonawful; }); runshell("$lib_path/html-install $gWebDir/db &1",sub { &quit; }); #runshell("gzip -9 html-data 2>&1",sub { &quit; }); #runshell("btoa 2>&1 >html-data.mail",sub { &quit; }); #runshell('2>&1 '.join(' ',('/usr/lib/sendmail','-f'."$gMaintainerEmail")).' -oem -oi -t ) { chomp; if (m/^end$/) { print "end, removing\n"; for $k (keys %remove) { unlink($k) || $!==&ENOENT or die "$k: $!"; } for $k (keys %rmdir) { rmdir($k) || $!==&ENOTEMPTY || $!==EEXIST or die "$k: $!"; } exit 0; } elsif (s/^progress //) { y/-+:._!#=,0-9a-zA-Z //cd; print " progress $_\n"; } elsif (m/^preserve ($filenamere)$/o) { delete $remove{$1}; delete $remove{"$1.ref"}; print " preserve $1\n"; } elsif (m/^(file|diff) (\d+) (ref|def|non) ($filenamere)$/o) { $filediff= $1; $linestodo= $2; $ii= $3; $file= $4; print " $filediff $ii $file\n"; delete $remove{$file}; delete $remove{"$file.ref"} if $ii eq 'ref'; $file =~ m,^(..)/, or die $file; mkdir($1,0777) || $!==EEXIST or die $!; $tranfile= $file; $tranfile.= '.ref' if $ii eq 'ref'; open(DT,"> recv.tmp") or die $!; if ($filediff eq 'diff') { print DT "r $tranfile\n" or die $!; } $indata= 0; while ($linestodo--) { $z=; if ($filediff eq 'diff') { if ($indata) { $indata=0 if $incmd && m/^\.$/; } elsif ($z =~ m/^[0-9,]+[ac]/) { $indata= 1; } elsif ($z !~ m/^[0-9,]+[ds]/) { die "SECURITY $file >$z<"; } } print DT $z or die $!; } if ($filediff eq 'diff') { print DT "w new.tmp\nq\n" or die $!; } close(DT) or die $!; ($z=) eq "that$filediff $file\n" or die die "not confirmed >$z<"; if ($filediff eq 'diff') { $q= `ed -s &1`; length($q) || $? and die "ed $q $?"; rename("new.tmp","$tranfile") or die "$tranfile $!"; unlink("recv.tmp") or die $!; } else { rename("recv.tmp","$tranfile") or die "$tranfile $!"; } if ($ii eq 'ref') { open(I,"$tranfile") or die $!; open(O,"> ref.tmp") or die $!; while () { if (m/^\<\!\-\-ii (\d+)\-\-\>$/) { defined($iival{$1}) or die "$tranfile $1"; print O $iival{$1} or die $!; } else { print O or die $!; } } close(I) or die $!; close(O) or die $!; rename("ref.tmp","$file") or die $!; } elsif ($ii eq 'def') { open(I,"$file") or die $!; undef $cdef; $ctext= ''; while () { if (s/^\<\!\-\-iid (\d+)\-\-\>//) { defined($cdef) and die $file; $cdef= $1; $ctext= $_; } elsif (s/\<\!\-\-\/iid\-\-\>\n$//) { defined($cdef) or die $file; $iival{$cdef}= $ctext.$_."\n"; $ctext=''; undef $cdef; } else { $ctext.= $_ if defined($cdef); } } } } elsif (m/^noremoves$/) { print "noremoves\n"; exit 0; } else { die " huh ? $_"; } } die "eof $!"; debbugs-2.4.1ubuntu1/scripts/mailsummary.in0000755000175000017500000000555707653337163017550 0ustar jw2328jw2328#!/usr/bin/perl # $Id: mailsummary.in,v 1.11 2003/04/28 23:51:15 cjwatson Exp $ $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require("$config_path/config"); require("$lib_path/errorlib"); $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; chdir("$gSpoolDir") || die "chdir spool: $!\n"; #open(DEBUG,">&4"); if ($ARGV[0] eq 'undone') { $vdef= "(no outstanding $gBug reports on file, or problem running script)\n"; $subject= "Unanswered problem reports by date"; $intro= "The following problem reports have not yet been marked as `taken up\' by a message to done\@$gEmailDomain or or `forwarded\' by a message to forwarded\@$gEmailDomain." ; } elsif ($ARGV[0] eq 'bymaint') { $vdef= "(no outstanding $gBug reports on file, or problem running script)\n"; $subject= "Unanswered problem reports by maintainer and package"; $intro= "The following problem reports have not yet been marked as `taken up\' by a message to done\@$gEmailDomain or or `forwarded\' by a message to forwarded\@$gEmailDomain. The maintainer listed against each package is derived from the Maintainer field of the package found in the development tree; there is an override file that can be amended to get the right results if you have taken over a package and do not expect to issue a new version soon. Variant versions of the Maintainer field for the same actual package maintainer will be listed separately. Maintainers with few outstanding $gBugs appear first, to avoid those with few $gBugs being lost deep in the message. " ; } elsif ($ARGV[0] eq 'veryold') { $vdef= ''; $subject= "Overdue problem reports by age"; $intro= "The following problem reports are very old but have not yet been marked as `taken up\' by a message to done\@$gEmailDomain as forwarded to a developer by CCing a message to forwarded\@$gEmailDomain. Please help ensure that these $gBugs are dealt with quickly, even if you are not the package maintainer in question. (NB a full list of outstanding $gBug reports is posted periodically - this is a partial list only!) " } else { die "urgk, wrong argument @ARGV"; } $v=`$lib_path/summary $ARGV[0]`; $? && die "undone failed $?: $!\n"; $v= $vdef if $v eq ''; exit 0 if $v eq ''; open(D, '| '.join(' ',('/usr/lib/sendmail','-f'.$gMaintainerEmail)).' -odq -oem -oi -t') || die "start sendmail: $!"; print D <$gWebDomain/txt END close(D); $? && die "sendmail failed $?: $!\n"; print length($v)," bytes of summary posted.\n"; debbugs-2.4.1ubuntu1/scripts/process.in0000755000175000017500000010727607670051320016652 0ustar jw2328jw2328#!/usr/bin/perl # $Id: process.in,v 1.71.2.1 2003/06/06 08:37:36 cjwatson Exp $ # # Usage: process nn # Temps: incoming/Pnn use POSIX qw(strftime tzset); $ENV{"TZ"} = 'UTC'; tzset(); use Mail::Address; use MIME::Parser; $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require "$config_path/config"; require "$lib_path/errorlib"; $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; chdir( "$gSpoolDir" ) || die "chdir spool: $!\n"; #open(DEBUG,"> /tmp/debbugs.debug"); umask(002); open DEBUG, ">/dev/null"; defined( $intdate= time ) || &quit( "failed to get time: $!" ); $_=shift; m/^([BMQFDU])(\d*)\.\d+$/ || &quit("bad argument"); $codeletter= $1; $tryref= length($2) ? $2+0 : -1; $nn= $_; if (!rename("incoming/G$nn","incoming/P$nn")) { $_=$!.''; m/no such file or directory/i && exit 0; &quit("renaming to lock: $!"); } $baddress= 'submit' if $codeletter eq 'B'; $baddress= 'maintonly' if $codeletter eq 'M'; $baddress= 'quiet' if $codeletter eq 'Q'; $baddress= 'forwarded' if $codeletter eq 'F'; $baddress= 'done' if $codeletter eq 'D'; $baddress= 'submitter' if $codeletter eq 'U'; $baddress || &quit("bad codeletter $codeletter"); $baddressroot= $baddress; $baddress= "$tryref-$baddress" if $tryref>=0; open(M,"incoming/P$nn"); @log=; close(M); @msg=@log; chomp @msg; print DEBUG "###\n",join("##\n",@msg),"\n###\n"; $tdate = strftime "%a, %d %h %Y %T UTC", localtime; $fwd= <output_under("$gSpoolDir/mime.tmp"); my $entity = eval { $parser->parse_data(join('',@log)) }; if ($entity and $entity->head->tags) { @headerlines = @{$entity->head->header}; chomp @headerlines; my $entity_body = getmailbody($entity); @bodylines = $entity_body ? $entity_body->as_lines() : (); chomp @bodylines; # set $i to beginning of encoded body data, so we can dump it out # verbatim later $i = 0; ++$i while $msg[$i] =~ /./; } else { # Legacy pre-MIME code, kept around in case MIME::Parser fails. for ($i = 0; $i <= $#msg; $i++) { $_ = $msg[$i]; last unless length($_); while ($msg[$i+1] =~ m/^\s/) { $i++; $_ .= "\n".$msg[$i]; } push @headerlines, $_; } @bodylines = @msg[$i..$#msg]; } for my $hdr (@headerlines) { $_ = $hdr; s/\n\s/ /g; &finish if m/^x-loop: (\S+)$/i && $1 eq "$gMaintainerEmail"; my $ins = !m/^subject:/i && !m/^reply-to:/i && !m/^return-path:/i && !m/^From / && !m/^X-Debbugs-CC:/i; $fwd .= $hdr."\n" if $ins; # print DEBUG ">$_<\n"; if (s/^(\S+):\s*//) { my $v = lc $1; print DEBUG ">$v=$_<\n"; $header{$v} = $_; } else { print DEBUG "!>$_<\n"; } } # remove blank lines shift @bodylines while @bodylines and $bodylines[0] !~ /\S/; # Strip off RFC2440-style PGP clearsigning. if (@bodylines and $bodylines[0] =~ /^-----BEGIN PGP SIGNED/) { shift @bodylines while @bodylines and length $bodylines[0]; shift @bodylines while @bodylines and $bodylines[0] !~ /\S/; for my $findsig (0 .. $#bodylines) { if ($bodylines[$findsig] =~ /^-----BEGIN PGP SIGNATURE/) { $#bodylines = $findsig - 1; last; } } map { s/^- // } @bodylines; } # extract pseudo-headers for my $phline (@bodylines) { last if $phline !~ m/^([\w]+):\s*(\S.*)/; my ($fn, $fv) = ($1, $2); $fv =~ s/\s*$//; print DEBUG ">$fn|$fv|\n"; $fn = lc $fn; $fv = lc $fv; $pheader{$fn} = $fv; print DEBUG ">$fn~$fv<\n"; } $fwd .= join("\n",@msg[$i..$#msg]); print DEBUG "***\n$fwd\n***\n"; if (defined $header{'resent-from'} && !defined $header{'from'}) { $header{'from'} = $header{'resent-from'}; } defined($header{'from'}) || &quit("no From header"); $replyto= defined($header{'reply-to'}) ? $header{'reply-to'} : $header{'from'}; $_= $replyto; $_= "$2 <$1>" if m/^([^\<\> \t\n\(\)]+) \(([^\(\)\<\>]+)\)$/; $replytocompare= $_; print DEBUG "replytocompare >$replytocompare<\n"; if (!defined($header{'subject'})) { $brokenness.= <= 0) { ($bfound, $data)= &lockreadbugmerge($tryref); if ($bfound) { $ref= $tryref; } else { &htmllog("Reply","sent", $replyto,"Unknown problem report number $tryref."); &sendmessage(< In-Reply-To: $header{'message-id'} References: $header{'message-id'} $data->{msgid} Precedence: bulk X-$gProject-PR-Message: error You sent a message to the $gBug tracking system which gave (in the Subject line or encoded into the recipient at $gEmailDomain), the number of a nonexistent $gBug report (#$tryref). This may be because that $gBug report has been resolved for more than $gRemoveAge days, and the record of it has been expunged, or because you mistyped the $gBug report number. Your message was dated $header{'date'} and was sent to $baddress\@$gEmailDomain. It had Message-ID $header{'message-id'} and Subject $subject. It has been filed (under junk) but otherwise ignored. Please consult your records to find the correct $gBug report number, or contact me, the system administrator, for assistance. $gMaintainer (administrator, $gProject $gBugs database) (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) END &appendlog; &finish; } } else { &filelock('lock/-1'); } if ($codeletter eq 'D' || $codeletter eq 'F') { if ($replyto =~ m/$gBounceFroms/o || $header{'from'} =~ m/$gBounceFroms/o) { &quit("bounce detected ! Mwaap! Mwaap!"); } $markedby= $header{'from'} eq $replyto ? $replyto : "$header{'from'} (reply to $replyto)"; if ($codeletter eq 'F') { (&appendlog,&finish) if length($data->{forwarded}); $receivedat= "forwarded\@$gEmailDomain"; $markaswhat= 'forwarded'; $set_forwarded= $header{'to'}; if ( length( $gListDomain ) > 0 && length( $gFowardList ) > 0 ) { $generalcc= "$gFowardList\@$gListDomain"; } else { $generalcc=''; } } else { (&appendlog,&finish) if length($data->{done}); $receivedat= "done\@$gEmailDomain"; $markaswhat= 'done'; $set_done= $header{'from'}; if ( length( $gListDomain ) > 0 && length( $gDoneList ) > 0 ) { $generalcc= "$gDoneList\@$gListDomain"; } else { $generalcc=''; } } if ($ref<0) { &htmllog("Warning","sent",$replyto,"Message ignored."); &sendmessage(< In-Reply-To: $header{'message-id'} References: $header{'message-id'} $data->{msgid} Precedence: bulk X-$gProject-PR-Message: error You sent a message to the $gProject $gBug tracking system old-style unified mark as $markaswhat address ($receivedat), without a recognisable $gBug number in the Subject. Your message has been filed under junk but otherwise ignored. If you don't know what I'm talking about then probably either: (a) you unwittingly sent a message to done\@$gEmailDomain because you replied to all recipients of the message a developer used to mark a $gBug as done and you modified the Subject. In this case, please do not be alarmed. To avoid confusion do not do it again, but there is no need to apologise or mail anyone asking for an explanation. (b) you are a system administrator, reading this because the $gBug tracking system is responding to a misdirected bounce message. In this case there is a serious mail system misconfiguration somewhere - please contact me immediately. Your message was dated $header{'date'} and had message-id $header{'message-id'} and subject $subject. If you need any assistance or explanation please contact me. $gMaintainer (administrator, $gProject $gBugs database) END &appendlog; &finish; } &checkmaintainers; $noticeccval.= join(', ', grep($_ ne $replyto,@maintaddrs)); $noticeccval =~ s/\s+\n\s+/ /g; $noticeccval =~ s/^\s+/ /; $noticeccval =~ s/\s+$//; $generalcc = join(', ', $generalcc, @addsrcaddrs); $generalcc =~ s/\s+\n\s+/ /g; $generalcc =~ s/^\s+/ /; $generalcc =~ s/\s+$//; if (length($noticeccval)) { $noticecc= "Cc: $noticeccval\n"; } if (length($generalcc)) { $noticecc.= "Bcc: $generalcc\n"; } @process= ($ref,split(/ /,$data->{mergedwith})); $orgref= $ref; for $ref (@process) { if ($ref != $orgref) { &unfilelock; $data = &lockreadbug($ref) || die "huh ? $ref from $orgref out of @process"; } $data->{done}= $set_done if defined($set_done); $data->{forwarded}= $set_forwarded if defined($set_forwarded); writebug($ref, $data); my $hash = get_hashname($ref); open(O,"db-h/$hash/$ref.report") || &quit("read original report: $!"); $x= join('',); close(O); if ($codeletter eq 'F') { &htmllog("Reply","sent",$replyto,"You have marked $gBug as forwarded."); &sendmessage(<{subject}) Message-ID: In-Reply-To: $header{'message-id'} References: $header{'message-id'} $data->{msgid} Precedence: bulk X-$gProject-PR-Message: forwarded $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Your message dated $header{'date'} with message-id $header{'message-id'} has caused the $gProject $gBug report #$ref, regarding $data->{subject} to be marked as having been forwarded to the upstream software author(s) $data->{forwarded}. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) $gMaintainer (administrator, $gProject $gBugs database) END } else { &htmllog("Reply","sent",$replyto,"You have taken responsibility."); &sendmessage(<{subject}) Message-ID: In-Reply-To: $header{'message-id'} References: $header{'message-id'} $data->{msgid} Precedence: bulk X-$gProject-PR-Message: closed $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Your message dated $header{'date'} with message-id $header{'message-id'} and subject line $subject has caused the attached $gBug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the $gBug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) $gMaintainer (administrator, $gProject $gBugs database) END &htmllog("Notification","sent",$data->{originator}, "$gBug acknowledged by developer."); &sendmessage(<{originator} Subject: $gBug#$ref acknowledged by developer ($header{'subject'}) Message-ID: In-Reply-To: $data->{msgid} References: $header{'message-id'} $data->{msgid} X-$gProject-PR-Message: they-closed $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Reply-To: $ref\@$gEmailDomain This is an automatic notification regarding your $gBug report #$ref: $data->{subject}, which was filed against the $data->{package} package. It has been closed by one of the developers, namely $markedby. Their explanation is attached below. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact the developer, by replying to this email. $gMaintainer (administrator, $gProject $gBugs database) END } &appendlog; } &finish; } if ($ref<0) { if ($codeletter eq 'U') { &htmllog("Warning","sent",$replyto,"Message not forwarded."); &sendmessage(< In-Reply-To: $header{'message-id'} References: $header{'message-id'} $data->{msgid} Precedence: bulk X-$gProject-PR-Message: error You sent a message to the $gProject $gBug tracking system send to $gBug report submitter address $baddress\@$gEmailDomain, without a recognisable $gBug number in the Subject. Your message has been filed under junk but otherwise ignored. If you don't know what I'm talking about then probably either: (a) you unwittingly sent a message to $baddress\@$gEmailDomain because you replied to all recipients of the message a developer sent to a $gBug's submitter and you modified the Subject. In this case, please do not be alarmed. To avoid confusion do not do it again, but there is no need to apologise or mail anyone asking for an explanation. (b) you are a system administrator, reading this because the $gBug tracking system is responding to a misdirected bounce message. In this case there is a serious mail system misconfiguration somewhere - please contact me immediately. Your message was dated $header{'date'} and had message-id $header{'message-id'} and subject $subject. If you need any assistance or explanation please contact me. $gMaintainer (administrator, $gProject $gBugs database) END &appendlog; &finish; } if (!defined($pheader{'package'})) { &htmllog("Warning","sent",$replyto,"Message not forwarded."); &sendmessage(< In-Reply-To: $header{'message-id'} References: $header{'message-id'} $data->{msgid} Precedence: bulk X-$gProject-PR-Message: error Your message didn't have a Package: line at the start (in the pseudo-header following the real mail header), or didn't have a pseudo-header at all. This makes it much harder for us to categorise and deal with your problem report. Please _resubmit_ your report to $baddress\@$gEmailDomain and tell us which package the report is on. For help, check out http://$gWebDomain/Reporting$gHTMLSuffix. Your message was dated $header{'date'} and had message-id $header{'message-id'} and subject $subject. The complete text of it is attached to this message. If you need any assistance or explanation please contact me. $gMaintainer (administrator, $gProject $gBugs database) END &appendlog; &finish; } else { $data->{package}= $pheader{'package'}; } $data->{keywords}= ''; if (defined($pheader{'keywords'})) { $data->{keywords}= $pheader{'keywords'}; } elsif (defined($pheader{'tags'})) { $data->{keywords}= $pheader{'tags'}; } if (length($data->{keywords})) { my @kws; my %gkws = map { ($_, 1) } @gTags; foreach my $kw (sort split(/[,\s]+/, lc($data->{keywords}))) { push @kws, $kw if (defined $gkws{$kw}); } $data->{keywords} = join(" ", @kws); } $data->{severity}= ''; if (defined($pheader{'severity'}) || defined($pheader{'priority'})) { $data->{severity}= $pheader{'severity'}; $data->{severity}= $pheader{'priority'} unless ($data->{severity}); $data->{severity} =~ s/^\s*(.+)\s*$/$1/; if (!grep($_ eq $data->{severity}, @severities, "$gDefaultSeverity")) { $brokenness.= <{severity} was not recognised. The default severity $gDefaultSeverity is being used instead. The recognised values are: $gShowSeverities. END # if we use @gSeverityList array in the above line, perl -c gives: # In string, @gSeverityList now must be written as \@gSeverityList at # process line 452, near "$gDefaultSeverity is being used instead. $data->{severity}= ''; } } &filelock("nextnumber.lock"); open(N,"nextnumber") || &quit("nextnumber: read: $!"); $v=; $v =~ s/\n$// || &quit("nextnumber bad format"); $ref= $v+0; $v += 1; $newref=1; &overwrite('nextnumber', "$v\n"); &unfilelock; my $hash = get_hashname($ref); &overwrite("db-h/$hash/$ref.log",''); $data->{originator} = $replyto; $data->{date} = $intdate; $data->{subject} = $subject; $data->{msgid} = $header{'message-id'}; writebug($ref, $data); &overwrite("db-h/$hash/$ref.report", join("\n",@msg)."\n"); } &checkmaintainers; print DEBUG "maintainers >@maintaddrs<\n"; $orgsender= defined($header{'sender'}) ? "Original-Sender: $header{'sender'}\n" : ''; $newsubject= $subject; $newsubject =~ s/^$gBug#$ref:*\s*//; $xcchdr= $header{ 'x-debbugs-cc' }; if ($xcchdr =~ m/\S/) { push(@resentccs,$xcchdr); $resentccexplain.= <{originator}, "$gBug#$ref."); &sendmessage(<{originator},@resentccs],[@bccs]); Subject: $gBug#$ref: $newsubject Reply-To: $replyto, $ref-quiet\@$gEmailDomain ${orgsender}Resent-To: $data->{originator} ${resentcc}Resent-Date: $tdate Resent-Message-ID: Resent-Sender: $gMaintainerEmail X-$gProject-PR-Message: report $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} $fwd END } elsif ($codeletter eq 'B') { &htmllog($newref ? "Report" : "Information", "forwarded", join(', ',"$gSubmitList\@$gListDomain",@resentccs), "$gBug#$ref". (length($data->{package})? "; Package ".&sani($data->{package})."" : ''). "."); &sendmessage(< Resent-Sender: $gMaintainerEmail X-$gProject-PR-Message: report $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} $fwd END } elsif (@resentccs or @bccs) { # D and F done far earlier; B just done - so this must be M or Q # We preserve whichever it was in the Reply-To (possibly adding # the $gBug#). if (@resentccs) { &htmllog($newref ? "Report" : "Information", "forwarded", $resentccval, "$gBug#$ref". (length($data->{package}) ? "; Package ".&sani($data->{package})."" : ''). "."); } else { &htmllog($newref ? "Report" : "Information", "stored", "", "$gBug#$ref". (length($data->{package}) ? "; Package ".&sani($data->{package})."" : ''). "."); } &sendmessage(< Resent-Sender: $gMaintainerEmail X-$gProject-PR-Message: report $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} $fwd END } $htmlbreak= length($brokenness) ? "

      \n".&sani($brokenness)."\n

      \n" : ''; $htmlbreak =~ s/\n\n/\n

      \n\n/g; if (length($resentccval)) { $htmlbreak = " Copy sent to ".&sani($resentccval).".". $htmlbreak; } if ($newref) { &htmllog("Acknowledgement","sent",$replyto, ($veryquiet ? "New $gBug report received and filed, but not forwarded." : "New $gBug report received and forwarded."). $htmlbreak); &sendmessage($veryquiet ? < In-Reply-To: $header{'message-id'} References: $header{'message-id'} Precedence: bulk X-$gProject-PR-Message: ack-quiet $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Reply-To: $ref-quiet\@$gEmailDomain Thank you for the problem report you have sent regarding $gProject. This is an automatically generated reply, to let you know your message has been received. It has not been forwarded to the developers or their mailing list; you should ensure that the developers are aware of the problem you have entered into the system - preferably quoting the $gBug reference number, #$ref. $resentccexplain If you wish to submit further information on your problem, please send it to $ref-$baddressroot\@$gEmailDomain (and *not* to $baddress\@$gEmailDomain). Please do not reply to the address at the top of this message, unless you wish to report a problem with the $gBug-tracking system. $brokenness $gMaintainer (administrator, $gProject $gBugs database) END From: $gMaintainerEmail ($gProject $gBug Tracking System) To: $replyto Subject: $gBug#$ref: Acknowledgement of maintainer-only report ($subject) Message-ID: In-Reply-To: $header{'message-id'} References: $header{'message-id'} Precedence: bulk X-$gProject-PR-Message: ack-maintonly $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Reply-To: $ref-maintonly\@$gEmailDomain Thank you for the problem report you have sent regarding $gProject. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers (but not the mailing list, as you requested) for their attention; they will reply in due course. $resentccexplain If you wish to submit further information on your problem, please send it to $ref-$baddressroot\@$gEmailDomain (and *not* to $baddress\@$gEmailDomain). Please do not reply to the address at the top of this message, unless you wish to report a problem with the $gBug-tracking system. $brokenness $gMaintainer (administrator, $gProject $gBugs database) END From: $gMaintainerEmail ($gProject $gBug Tracking System) To: $replyto Subject: $gBug#$ref: Acknowledgement ($subject) Message-ID: In-Reply-To: $header{'message-id'} References: $header{'message-id'} Precedence: bulk X-$gProject-PR-Message: ack $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Reply-To: $ref\@$gEmailDomain Thank you for the problem report you have sent regarding $gProject. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers mailing list for their attention; they will reply in due course. $resentccexplain If you wish to submit further information on your problem, please send it to $ref\@$gEmailDomain (and *not* to $baddress\@$gEmailDomain). Please do not reply to the address at the top of this message, unless you wish to report a problem with the $gBug-tracking system. $brokenness $gMaintainer (administrator, $gProject $gBugs database) END } elsif ($codeletter ne 'U' and $header{'precedence'} !~ /\b(?:bulk|junk|list)\b/) { &htmllog("Acknowledgement","sent",$replyto, ($veryquiet ? "Extra info received and filed, but not forwarded." : $codeletter eq 'M' ? "Extra info received and forwarded to maintainer." : "Extra info received and forwarded to list."). $htmlbreak); &sendmessage($veryquiet ? < In-Reply-To: $header{'message-id'} References: $header{'message-id'} Precedence: bulk X-$gProject-PR-Message: ack-info-quiet $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Reply-To: $ref-quiet\@$gEmailDomain Thank you for the additional information you have supplied regarding this problem report. It has NOT been forwarded to the developers, but will accompany the original report in the $gBug tracking system. Please ensure that you yourself have sent a copy of the additional information to any relevant developers or mailing lists. $resentccexplain If you wish to continue to submit further information on your problem, please send it to $ref-$baddressroot\@$gEmailDomain, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the $gBug-tracking system. $brokenness $gMaintainer (administrator, $gProject $gBugs database) END From: $gMaintainerEmail ($gProject $gBug Tracking System) To: $replyto Subject: $gBug#$ref: Info received for maintainer only (was $subject) Message-ID: In-Reply-To: $header{'message-id'} References: $header{'message-id'} Precedence: bulk X-$gProject-PR-Message: ack-info-maintonly $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Reply-To: $ref-maintonly\@$gEmailDomain Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) (but not to the mailing list) to accompany the original report. $resentccexplain If you wish to continue to submit further information on your problem, please send it to $ref-$baddressroot\@$gEmailDomain, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the $gBug-tracking system. $brokenness $gMaintainer (administrator, $gProject $gBugs database) END From: $gMaintainerEmail ($gProject $gBug Tracking System) To: $replyto Subject: $gBug#$ref: Info received (was $subject) Message-ID: In-Reply-To: $header{'message-id'} References: $header{'message-id'} Precedence: bulk X-$gProject-PR-Message: ack-info $ref X-$gProject-PR-Package: $data->{package} X-$gProject-PR-Keywords: $data->{keywords} Disabled-Doogie-Reply-To: $ref\@$gEmailDomain Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) and to the developers mailing list to accompany the original report. $resentccexplain If you wish to continue to submit further information on your problem, please send it to $ref\@$gEmailDomain, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the $gBug-tracking system. $brokenness $gMaintainer (administrator, $gProject $gBugs database) END } &appendlog; &finish; sub overwrite { local ($f,$v) = @_; open(NEW,">$f.new") || &quit("$f.new: create: $!"); print(NEW "$v") || &quit("$f.new: write: $!"); close(NEW) || &quit("$f.new: close: $!"); rename("$f.new","$f") || &quit("rename $f.new to $f: $!"); } sub appendlog { my $hash = get_hashname($ref); if (!open(AP,">>db-h/$hash/$ref.log")) { print DEBUG "failed open log<\n"; print DEBUG "failed open log err $!<\n"; &quit("opening db-h/$hash/$ref.log (li): $!"); } print(AP "\7\n",@{escapelog(@log)},"\n\3\n") || &quit("writing db-h/$hash/$ref.log (li): $!"); close(AP) || &quit("closing db-h/$hash/$ref.log (li): $!"); } sub finish { utime(time,time,"db"); local ($u); while ($u= $cleanups[$#cleanups]) { &$u; } unlink("incoming/P$nn") || &quit("unlinking incoming/P$nn: $!"); exit $_[0]; } &quit("wot no exit"); sub chldhandle { $chldexit = 'yes'; } sub htmllog { local ($whatobj,$whatverb,$where,$desc) = @_; my $hash = get_hashname($ref); open(AP,">>db-h/$hash/$ref.log") || &quit("opening db-h/$hash/$ref.log (lh): $!"); print(AP "\6\n". "$whatobj $whatverb". ($where eq '' ? "" : " to ".&sani($where).""). ":
      \n". $desc. "\n\3\n") || &quit("writing db-h/$hash/$ref.log (lh): $!"); close(AP) || &quit("closing db-h/$hash/$ref.log (lh): $!"); } sub get_addresses { return map { $_->address() } map { Mail::Address->parse($_) } @_; } sub stripbccs { my $msg = shift; my $ret = ''; my $bcc = 0; while ($msg =~ s/(.*\n)//) { local $_ = $1; if (/^$/) { $ret .= $_; last; } if ($bcc) { # strip continuation lines too next if /^\s/; $bcc = 0; } if (/^Bcc:/i) { $bcc = 1; } else { $ret .= $_; } } return $ret . $msg; } sub sendmessage { local ($msg,$recips,$bcc) = @_; if ((!ref($recips) && $recips eq '') || @$recips == 0) { $recips = ['-t']; } $msg = "X-Loop: $gMaintainerEmail\n" . $msg; my $hash = get_hashname($ref); #save email to the log open(AP,">>db-h/$hash/$ref.log") || &quit("opening db-h/$hash/$ref.log (lo): $!"); print(AP "\2\n",join("\4",@$recips),"\n\5\n", @{escapelog(stripbccs($msg))},"\n\3\n") || &quit("writing db-h/$hash/$ref.log (lo): $!"); close(AP) || &quit("closing db-h/$hash/$ref.log (lo): $!"); if (ref($bcc)) { shift @$recips if $recips->[0] eq '-t'; push @$recips, @$bcc; } #if debugging.. save email to a log # open AP, ">>debug"; # print AP join( '|', @$recips )."\n>>"; # print AP get_addresses( @$recips ); # print AP "<<\n".$msg; # print AP "\n--------------------------------------------------------\n"; # close AP; #start mailing $_ = ''; $SIG{'CHLD'}='chldhandle'; #print DEBUG "mailing sigchild set up<\n"; $chldexit = 'no'; $c= open(U,"-|"); #print DEBUG "mailing opened pipe fork<\n"; defined($c) || die $!; #print DEBUG "mailing opened pipe fork ok $c<\n"; if (!$c) { # ie, we are in the child process #print DEBUG "mailing child<\n"; unless (open(STDERR,">&STDOUT")) { #print DEBUG "mailing child opened stderr<\n"; print STDOUT "redirect stderr: $!\n"; #print DEBUG "mailing child opened stderr fail<\n"; exit 1; #print DEBUG "mailing child opened stderr fail exit !?<\n"; } #print DEBUG "mailing child opened stderr ok<\n"; $c= open(D,"|-"); #print DEBUG "mailing child forked again<\n"; defined($c) || die $!; #print DEBUG "mailing child forked again ok $c<\n"; if (!$c) { # ie, we are the child process #print DEBUG "mailing grandchild<\n"; exec '/usr/lib/sendmail','-f'."$gMaintainerEmail",'-odq','-oem','-oi',get_addresses(@$recips); #print DEBUG "mailing grandchild exec failed<\n"; die $!; #print DEBUG "mailing grandchild died !?<\n"; } #print DEBUG "mailing child not grandchild<\n"; print(D $msg) || die $!; #print DEBUG "mailing child printed msg<\n"; close(D); #print DEBUG "mailing child closed pipe<\n"; die "\n*** command returned exit status $?\n" if $?; #print DEBUG "mailing child exit status ok<\n"; exit 0; #print DEBUG "mailing child exited ?!<\n"; } #print DEBUG "mailing parent<\n"; $results=''; #print DEBUG "mailing parent results emptied<\n"; while( $chldexit eq 'no' ) { $results.= $_; } #print DEBUG "mailing parent results read >$results<\n"; close(U); #print DEBUG "mailing parent results closed<\n"; $results.= "\n*** child returned exit status $?\n" if $?; #print DEBUG "mailing parent exit status ok<\n"; $SIG{'CHLD'}='DEFAULT'; #print DEBUG "mailing parent sigchild default<\n"; if (length($results)) { &quit("running sendmail: $results"); } #print DEBUG "mailing parent results ok<\n"; } sub checkmaintainers { return if $maintainerschecked++; return if !length($data->{package}); open(MAINT,"$gMaintainerFile") || die &quit("maintainers open: $!"); while () { m/^\n$/ && next; m/^\s*$/ && next; m/^(\S+)\s+(\S.*\S)\s*\n$/ || &quit("maintainers bogus \`$_'"); $a= $1; $b= $2; $a =~ y/A-Z/a-z/; $maintainerof{$1}= $2; } close(MAINT); open(MAINT,"$gMaintainerFileOverride") || die &quit("maintainers.override open: $!"); while () { m/^\n$/ && next; m/^\s*$/ && next; m/^(\S+)\s+(\S.*\S)\s*\n$/ || &quit("maintainers.override bogus \`$_'"); $a= $1; $b= $2; $a =~ y/A-Z/a-z/; $maintainerof{$1}= $2; } close(MAINT); open(SOURCES,"$gPackageSource") || &quit("pkgsrc open: $!"); while () { next unless m/^(\S+)\s+\S+\s+(\S.*\S)\s*$/; ($a,$b)=($1,$2); $a =~ y/A-Z/a-z/; $pkgsrc{$a} = $b; } close(SOURCES); $anymaintfound=0; $anymaintnotfound=0; for $p (split(m/[ \t?,()]+/,$data->{package})) { $p =~ y/A-Z/a-z/; if (defined $gSubscriptionDomain) { if (defined($pkgsrc{$p})) { push @addsrcaddrs, "$pkgsrc{$p}\@$gSubscriptionDomain"; } else { push @addsrcaddrs, "$p\@$gSubscriptionDomain"; } } if (defined($maintainerof{$p})) { print DEBUG "maintainer add >$p|$maintainerof{$p}<\n"; $addmaint= $maintainerof{$p}; push(@maintaddrs,$addmaint) unless $addmaint eq $replyto || grep($_ eq $addmaint, @maintaddrs); $anymaintfound++; } else { print DEBUG "maintainer none >$p<\n"; push(@maintaddrs,$gUnknownMaintainerEmail) unless $anymaintnotfound; $anymaintnotfound++; last; } } } debbugs-2.4.1ubuntu1/scripts/processall.in0000755000175000017500000000352207566015774017351 0ustar jw2328jw2328#!/usr/bin/perl # $Id: processall.in,v 1.9 2002/11/17 22:45:16 cjwatson Exp $ # # Usage: processall # # Uses up: incoming/I.nn # Temps: incoming/[GP].nn # Creates: incoming/E.nn # Stop; process/stop $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require "$config_path/config"; require "$lib_path/errorlib"; $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; use File::Path; chdir( "$gSpoolDir" ) || die 'chdir spool: $!\n'; push( @INC, "$lib_path" ); #open(DEBUG,">&4"); umask(002); $|=1; undef %fudged; &filelock('incoming-cleaner'); for (;;) { if (-f 'stop') { print(STDERR "stop file created\n") || die $!; last; } if (!@ids) { opendir(DIR,"incoming") || die $!; while ( defined( $_= readdir(DIR) )) { push(@ids,$_) if s/^I//; } last unless @ids; @ids= sort(@ids); } stat("$gMaintainerFile") || die "stat $gMaintainerFile: $!\n"; $nf= @ids; $id= shift(@ids); unless (rename("incoming/I$id","incoming/G$id")) { if ($fudged{$id}) { die "$id already fudged once! $!\n"; } $fudged{$id}= 1; next; } if ($id =~ m/^[RC]/) { print(STDOUT "[$nf] $id service ...") || die $!; defined($c=fork) || die $!; if (!$c) { exec("$lib_path/service",$id); die $!; } } elsif ($id =~ m/^[BMQFDU]/) { print(STDOUT "[$nf] $id process ...") || die $!; defined($c=fork) || die $!; if (!$c) { exec("$lib_path/process",$id); die $!; } } else { die "bad name $id"; } $cc=waitpid($c,0); $cc == $c || die "$cc $c $!"; $status=$?; if ($status) { print(STDERR "$id: process failed ($status $!) - now in [PG]$id\n") || die $!; } print(STDOUT " done\n") || die $!; rmtree("$gSpoolDir/mime.tmp",0,1); $ndone++; } &unfilelock; exit(0); debbugs-2.4.1ubuntu1/scripts/rebuild.in0000755000175000017500000000305007666130423016612 0ustar jw2328jw2328#!/usr/bin/perl -w # $Id: rebuild.in,v 1.11 2003/05/31 13:41:39 cjwatson Exp $ # Load modules and set environment use File::Copy; $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require("$config_path/config"); require("$lib_path/errorlib"); use vars qw($gSpoolDir); $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; chdir("$gSpoolDir") || die "chdir spool: $!\n"; #global variables $debug = 0; @ARGV==0 and &quit( "no archive given on the commandline" ); my $archive = shift(@ARGV); my $index = "index.$archive"; $index = 'index.db' if $archive eq 'db-h'; open IDXFILE, "> $index" or &quit( "trying to reset index file: $!" ); #get list of bugs (ie, status files) my @files; for ($subdir=0; $subdir<100; $subdir++ ) { my $path = sprintf( "$archive/%.2d", $subdir ); opendir(DIR,$path) || next; my @list= grep(m/^\d+\.status$/,readdir(DIR)); closedir DIR; grep(s/\.status$//,@list); push @files, @list; } @files = sort { $a <=> $b } @files; #process each bug (ie, status file) for my $ref (@files) { print STDERR "$ref considering\n" if $debug; my $data = readbug($ref, $archive); $data->{severity} =~ y/A-Z/a-z/; (my $pkglist = $data->{package}) =~ s/[,\s]+/,/g; $pkglist =~ s/^,+//; $pkglist =~ s/,+$//; my $whendone = 'open'; $whendone = 'forwarded' if length $data->{forwarded}; $whendone = 'done' if length $data->{done}; printf IDXFILE "%s %d %d %s [%s] %s %s\n", $pkglist, $ref, $data->{date}, $whendone, $data->{originator}, $data->{severity}, $data->{keywords}; } close IDXFILE; debbugs-2.4.1ubuntu1/scripts/receive.in0000755000175000017500000001010407615613650016606 0ustar jw2328jw2328#!/usr/bin/perl # $Id: receive.in,v 1.15 2003/01/28 23:52:08 cjwatson Exp $ # usage: mail is piped directly into program #set umask in order to have group-writable incoming/* #umask(002); #load configuration file $config_path = '/etc/debbugs'; #$lib_path = '/usr/lib/debbugs'; require "$config_path/config"; $ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'}; #set source of mail delivery #sets any prefix needed to get mailer to add it to error mail if ( $gMailer eq 'exim' ) { $gBadEmailPrefix = ''; $_ = $ENV{'LOCAL_PART'}; } elsif ( $gMailer eq 'qmail' ) { $gBadEmailPrefix = '//'; $_ = $ENV{'DEFAULT'}; # $_ = $ENV{'RECIPIENT'}; # s/^\w+-bugs--?//; } else { $gBadEmailPrefix = ''; $_ = $ARGV[0]; s/\>//; s/\T.$id") || &failure("open temporary file: $!"); printf(FILE "Received: (at %s) by $gEmailDomain; %d %s %d %02d:%02d:%02d +0000\n", $addrrec, $mday,$months[$mon],$year+1900, $hour,$min,$sec) || &failure("write header to temporary file: $!"); while() { print(FILE) || &failure("write temporary file: $!"); } close(FILE) || &failure("close temporary file: $!"); rename("T.$id","I$queue.$id") || &failure("rename spool message: $!"); exit(0); sub failure { length($id) && unlink("T.$id"); print STDERR "bugs receive failure: @_\n"; exit(75); # EX_TEMPFAIL } debbugs-2.4.1ubuntu1/scripts/service.in0000755000175000017500000010247607667577323016657 0ustar jw2328jw2328#!/usr/bin/perl # $Id: service.in,v 1.77 2003/06/05 08:26:59 cjwatson Exp $ # ^ more or less ^ # # Usage: service .nn # Temps: incoming/P.nn use Mail::Address; use File::Copy; use MIME::Parser; $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require "$config_path/config"; require "$lib_path/errorlib"; $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; chdir("$gSpoolDir") || die "chdir spool: $!\n"; # open(DEBUG,">&4"); open DEBUG, ">/dev/null"; $debug = 0; umask(002); $_=shift; m/^[RC]\.\d+$/ || &quit("bad argument"); $control= m/C/; $nn= $_; if (!rename("incoming/G$nn","incoming/P$nn")) { $_=$!.''; m/no such file or directory/i && exit 0; &quit("renaming to lock: $!"); } open(M,"incoming/P$nn"); @log=; @msg=@log; close(M); chomp @msg; print "###\n",join("##\n",@msg),"\n###\n" if $debug; my $parser = new MIME::Parser; mkdir "$gSpoolDir/mime.tmp", 0777; $parser->output_under("$gSpoolDir/mime.tmp"); my $entity = eval { $parser->parse_data(join('',@log)) }; # header and decoded body respectively my (@headerlines, @bodylines); if ($entity and $entity->head->tags) { @headerlines = @{$entity->head->header}; chomp @headerlines; my $entity_body = getmailbody($entity); @bodylines = $entity_body ? $entity_body->as_lines() : (); chomp @bodylines; } else { # Legacy pre-MIME code, kept around in case MIME::Parser fails. my $i; for ($i = 0; $i <= $#msg; $i++) { $_ = $msg[$i]; last unless length($_); while ($msg[$i+1] =~ m/^\s/) { $i++; $_ .= "\n".$msg[$i]; } push @headerlines, $_; } @bodylines = @msg[$i..$#msg]; } for (@headerlines) { s/\n\s/ /g; print ">$_<\n" if $debug; if (s/^(\S+):\s*//) { my $v = lc $1; print ">$v=$_<\n" if $debug; $header{$v} = $_; } else { print "!>$_<\n" if $debug; } } # Strip off RFC2440-style PGP clearsigning. if (@bodylines and $bodylines[0] =~ /^-----BEGIN PGP SIGNED/) { shift @bodylines while @bodylines and length $bodylines[0]; shift @bodylines while @bodylines and $bodylines[0] !~ /\S/; for my $findsig (0 .. $#bodylines) { if ($bodylines[$findsig] =~ /^-----BEGIN PGP SIGNATURE/) { $#bodylines = $findsig - 1; last; } } map { s/^- // } @bodylines; } grep(s/\s+$//,@bodylines); print "***\n",join("\n",@bodylines),"\n***\n" if $debug; if (defined $header{'resent-from'} && !defined $header{'from'}) { $header{'from'} = $header{'resent-from'}; } defined($header{'from'}) || &quit("no From header"); delete $header{'reply-to'} if ( defined($header{'reply-to'}) && $header{'reply-to'} =~ m/^\s*$/ ); if ( defined($header{'reply-to'}) && $header{'reply-to'} ne "" ) { $replyto = $header{'reply-to'}; } else { $replyto = $header{'from'}; } $controlrequestaddr= $control ? "control\@$gEmailDomain" : "request\@$gEmailDomain"; $transcript=''; &transcript("Processing commands for $controlrequestaddr:\n\n"); $dl= 0; $state= 'idle'; $lowstate= 'idle'; $mergelowstate= 'idle'; $midix=0; $extras=""; my $quickabort = 0; my $fuckheads = "(" . join("|", @gFuckheads) . ")"; if (@gFuckheads and $replyto =~ m/$fuckheads/) { &transcript("This service is unavailable.\n\n"); $quickabort = 1; } my %clonebugs = (); my @bcc = (); for ($procline=0; $procline<=$#bodylines; $procline++) { $state eq 'idle' || print "$state ?\n"; $lowstate eq 'idle' || print "$lowstate ?\n"; $mergelowstate eq 'idle' || print "$mergelowstate ?\n"; if ($quickabort) { &transcript("Stopping processing here.\n\n"); last; } $_= $bodylines[$procline]; s/\s+$//; next unless m/\S/; &transcript("> $_\n"); next if m/^\s*\#/; $action= ''; if (m/^stop/i || m/^quit/i || m/^--/ || m/^thank/i) { &transcript("Stopping processing here.\n\n"); last; } elsif (m/^debug\s+(\d+)$/i && $1 >= 0 && $1 <= 1000) { $dl= $1+0; &transcript("Debug level $dl.\n\n"); } elsif (m/^(send|get)\s+\#?(\d{2,})$/i) { $ref= $2+0; &sendlynxdoc("bugreport.cgi?bug=$ref","logs for $gBug#$ref"); } elsif (m/^send-detail\s+\#?(\d{2,})$/i) { $ref= $1+0; &sendlynxdoc("bugreport.cgi?bug=$ref&boring=yes", "detailed logs for $gBug#$ref"); } elsif (m/^index(\s+full)?$/i) { &transcript("This BTS function is currently disabled, sorry.\n\n"); $ok++; # well, it's not really ok, but it fixes #81224 :) } elsif (m/^index-summary\s+by-package$/i) { &transcript("This BTS function is currently disabled, sorry.\n\n"); $ok++; # well, it's not really ok, but it fixes #81224 :) } elsif (m/^index-summary(\s+by-number)?$/i) { &transcript("This BTS function is currently disabled, sorry.\n\n"); $ok++; # well, it's not really ok, but it fixes #81224 :) } elsif (m/^index(\s+|-)pack(age)?s?$/i) { &sendlynxdoc("pkgindex.cgi?indexon=pkg",'index of packages'); } elsif (m/^index(\s+|-)maints?$/i) { &sendlynxdoc("pkgindex.cgi?indexon=maint",'index of maintainers'); } elsif (m/^index(\s+|-)maint\s+(\S+)$/i) { $maint = $2; &sendlynxdoc("pkgreport.cgi?maint=" . urlsanit($maint), "$gBug list for maintainer \`$maint'"); $ok++; } elsif (m/^index(\s+|-)pack(age)?s?\s+(\S.*\S)$/i) { $package = $+; &sendlynxdoc("pkgreport.cgi?pkg=" . urlsanit($package), "$gBug list for package $package"); $ok++; } elsif (m/^send-unmatched(\s+this|\s+-?0)?$/i) { &transcript("This BTS function is currently disabled, sorry.\n\n"); $ok++; # well, it's not really ok, but it fixes #81224 :) } elsif (m/^send-unmatched\s+(last|-1)$/i) { &transcript("This BTS function is currently disabled, sorry.\n\n"); $ok++; # well, it's not really ok, but it fixes #81224 :) } elsif (m/^send-unmatched\s+(old|-2)$/i) { &transcript("This BTS function is currently disabled, sorry.\n\n"); $ok++; # well, it's not really ok, but it fixes #81224 :) } elsif (m/^getinfo\s+([\w-.]+)$/i) { # the following is basically a Debian-specific kludge, but who cares $req = $1; if ($req =~ /^maintainers$/i && -f "$gConfigDir/Maintainers") { &sendinfo("local", "$gConfigDir/Maintainers", "Maintainers file"); } elsif ($req =~ /^override\.(\w+)\.([\w-.]+)$/i) { $req =~ s/.gz$//; &sendinfo("ftp.d.o", "$req", "override file for $2 part of $1 distribution"); } elsif ($req =~ /^pseudo-packages\.(description|maintainers)$/i && -f "$gConfigDir/$req") { &sendinfo("local", "$gConfigDir/$req", "$req file"); } else { &transcript("Info file $req does not exist.\n\n"); } } elsif (m/^help/i) { &sendhelp; &transcript("\n"); $ok++; } elsif (m/^refcard/i) { &sendtxthelp("bug-mailserver-refcard.txt","mail servers' reference card"); } elsif (m/^subscribe/i) { &transcript(<= 3) { &transcript("Too many unknown commands, stopping here.\n\n"); last; } #### interesting ones start here } elsif (m/^close\s+\#?(-?\d+)$/i) { $ok++; $ref= $1; if (&setbug) { &transcript("'close' is deprecated; see http://$gWebDomain/Developer$gHTMLSuffix#closing.\n"); if (length($data->{done})) { &transcript("$gBug is already closed, cannot re-close.\n\n"); &nochangebug; } else { $action= "$gBug closed, send any further explanations to $data->{originator}"; do { &addmaintainers($data->{package}); if ( length( $gDoneList ) > 0 && length( $gListDomain ) > 0 ) { &addccaddress("$gDoneList\@$gListDomain"); } $data->{done}= $replyto; $message= <{originator} Subject: $gBug#$ref acknowledged by developer ($header{'subject'}) References: $header{'message-id'} $data->{msgid} In-Reply-To: $data->{msgid} Message-ID: Reply-To: $ref\@$gEmailDomain This is an automatic notification regarding your $gBug report #$ref: $data->{subject}, which was filed against the $data->{package} package. It has been marked as closed by one of the developers, namely $replyto. You should be hearing from them with a substantive response shortly, in case you haven't already. If not, please contact them directly. $gMaintainer (administrator, $gProject $gBugs database) END &sendmailmessage($message,$data->{originator}); } while (&getnextbug); } } } elsif (m/^reassign\s+\#?(-?\d+)\s+(\S.*\S)$/i) { $ok++; $ref= $1; $newpackage= $2; $newpackage =~ y/A-Z/a-z/; if (&setbug) { if (length($data->{package})) { $action= "$gBug reassigned from package \`$data->{package}'". " to \`$newpackage'."; } else { $action= "$gBug assigned to package \`$newpackage'."; } do { &addmaintainers($data->{package}); &addmaintainers($newpackage); $data->{package}= $newpackage; } while (&getnextbug); } } elsif (m/^reopen\s+\#?(-?\d+)$/i ? ($noriginator='', 1) : m/^reopen\s+\#?(-?\d+)\s+\=$/i ? ($noriginator='', 1) : m/^reopen\s+\#?(-?\d+)\s+\!$/i ? ($noriginator=$replyto, 1) : m/^reopen\s+\#?(-?\d+)\s+(\S.*\S)$/i ? ($noriginator=$2, 1) : 0) { $ok++; $ref= $1; if (&setbug) { if (!length($data->{done})) { &transcript("$gBug is already open, cannot reopen.\n\n"); &nochangebug; } else { $action= $noriginator eq '' ? "$gBug reopened, originator not changed." : "$gBug reopened, originator set to $noriginator."; do { &addmaintainers($data->{package}); $data->{originator}= $noriginator eq '' ? $data->{originator} : $noriginator; $data->{done}= ''; } while (&getnextbug); } } } elsif (m/^submitter\s+\#?(-?\d+)\s+\!$/i ? ($newsubmitter=$replyto, 1) : m/^submitter\s+\#?(-?\d+)\s+(\S.*\S)$/i ? ($newsubmitter=$2, 1) : 0) { $ok++; $ref= $1; if ($ref =~ m/^-\d+$/ && defined $clonebugs{$ref}) { $ref = $clonebugs{$ref}; } if (&getbug) { &foundbug; &addmaintainers($data->{package}); $oldsubmitter= $data->{originator}; $data->{originator}= $newsubmitter; $action= "Changed $gBug submitter from $oldsubmitter to $newsubmitter."; &savebug; &transcript("$action\n"); if (length($data->{done})) { &transcript("(By the way, that $gBug is currently marked as done.)\n"); } &transcript("\n"); $message= <{msgid} In-Reply-To: $data->{msgid} Message-ID: Reply-To: $ref\@$gEmailDomain The submitter address recorded for your $gBug report #$ref: $data->{subject} has been changed. The new submitter address for this report is $newsubmitter. This change was made by $replyto. If it was incorrect, please contact them directly. $gMaintainer (administrator, $gProject $gBugs database) END &sendmailmessage($message,$oldsubmitter); } else { ¬foundbug; } } elsif (m/^forwarded\s+\#?(-?\d+)\s+(\S.*\S)$/i) { $ok++; $ref= $1; $whereto= $2; if (&setbug) { if (length($data->{forwarded})) { $action= "Forwarded-to-address changed from $data->{forwarded} to $whereto."; } else { $action= "Noted your statement that $gBug has been forwarded to $whereto."; } if (length($data->{done})) { $extramessage= "(By the way, this $gBug is currently marked as done.)\n"; } do { &addmaintainers($data->{package}); if (length($gFowardList)>0 && length($gListDomain)>0 ) { &addccaddress("$gFowardList\@$gListDomain"); } $data->{forwarded}= $whereto; } while (&getnextbug); } } elsif (m/^notforwarded\s+\#?(-?\d+)$/i) { $ok++; $ref= $1; if (&setbug) { if (!length($data->{forwarded})) { &transcript("$gBug is not marked as having been forwarded.\n\n"); &nochangebug; } else { $action= "Removed annotation that $gBug had been forwarded to $data->{forwarded}."; do { &addmaintainers($data->{package}); $data->{forwarded}= ''; } while (&getnextbug); } } } elsif (m/^severity\s+\#?(-?\d+)\s+([-0-9a-z]+)$/i || m/^priority\s+\#?(-?\d+)\s+([-0-9a-z]+)$/i) { $ok++; $ref= $1; $newseverity= $2; if (!grep($_ eq $newseverity, @gSeverityList, "$gDefaultSeverity")) { &transcript("Severity level \`$newseverity' is not known.\n". "Recognized are: $gShowSeverities.\n\n"); } elsif (exists $gObsoleteSeverities{$newseverity}) { &transcript("Severity level \`$newseverity' is obsolete. " . "$gObsoleteSeverities{$newseverity}\n\n"); } elsif (&setbug) { $printseverity= $data->{severity}; $printseverity= "$gDefaultSeverity" if $printseverity eq ''; $action= "Severity set to \`$newseverity'."; do { &addmaintainers($data->{package}); $data->{severity}= $newseverity; } while (&getnextbug); } } elsif (m/^tags?\s+\#?(-?\d+)\s+(([=+-])\s*)?(\S.*)?$/i) { $ok++; $ref = $1; $addsubcode = $3; $tags = $4; $addsub = "add"; if (defined $addsubcode) { $addsub = "sub" if ($addsubcode eq "-"); $addsub = "add" if ($addsubcode eq "+"); $addsub = "set" if ($addsubcode eq "="); } my @okaytags = (); my @badtags = (); foreach my $t (split /[\s,]+/, $tags) { if (!grep($_ eq $t, @gTags)) { push @badtags, $t; } else { push @okaytags, $t; } } if (@badtags) { &transcript("Unknown tag/s: ".join(', ', @badtags).".\n". "Recognized are: ".join(' ', @gTags).".\n\n"); } if (&setbug) { if ($data->{keywords} eq '') { &transcript("There were no tags set.\n"); } else { &transcript("Tags were: $data->{keywords}\n"); } if ($addsub eq "set") { $action= "Tags set to: " . join(", ", @okaytags); } elsif ($addsub eq "add") { $action= "Tags added: " . join(", ", @okaytags); } elsif ($addsub eq "sub") { $action= "Tags removed: " . join(", ", @okaytags); } do { &addmaintainers($data->{package}); $data->{keywords} = '' if ($addsub eq "set"); if ($addsub eq "sub") { foreach my $t (@badtags) { $data->{keywords} = join ' ', grep $_ ne $t, split ' ', $data->{keywords}; } } foreach my $t (@okaytags) { $data->{keywords} = join ' ', grep $_ ne $t, split ' ', $data->{keywords}; $data->{keywords} = "$t $data->{keywords}" unless($addsub eq "sub"); } $data->{keywords} =~ s/\s*$//; } while (&getnextbug); } } elsif (m/^retitle\s+\#?(-?\d+)\s+(\S.*\S)\s*$/i) { $ok++; $ref= $1; $newtitle= $2; if ($ref =~ m/^-\d+$/ && defined $clonebugs{$ref}) { $ref = $clonebugs{$ref}; } if (&getbug) { &foundbug; &addmaintainers($data->{package}); $data->{subject}= $newtitle; $action= "Changed $gBug title."; &savebug; &transcript("$action\n"); if (length($data->{done})) { &transcript("(By the way, that $gBug is currently marked as done.)\n"); } &transcript("\n"); } else { ¬foundbug; } } elsif (m/^unmerge\s+\#?(-?\d+)$/i) { $ok++; $ref= $1; if (&setbug) { if (!length($data->{mergedwith})) { &transcript("$gBug is not marked as being merged with any others.\n\n"); &nochangebug; } else { $mergelowstate eq 'locked' || die "$mergelowstate ?"; $action= "Disconnected #$ref from all other report(s)."; @newmergelist= split(/ /,$data->{mergedwith}); $discref= $ref; do { &addmaintainers($data->{package}); $data->{mergedwith}= ($ref == $discref) ? '' : join(' ',grep($_ ne $ref,@newmergelist)); } while (&getnextbug); } } } elsif (m/^merge\s+(-?\d+(\s+-?\d+)+)\s*$/i) { $ok++; @tomerge= sort { $a <=> $b } split(/\s+/,$1); @newmergelist= (); my %tags = (); &getmerge; while (defined($ref= shift(@tomerge))) { &transcript("D| checking merge $ref\n") if $dl; $ref+= 0; if ($ref =~ m/^-\d+$/ && defined $clonebugs{$ref}) { $ref = $clonebugs{$ref}; } next if grep($_ eq $ref,@newmergelist); if (!&getbug) { ¬foundbug; @newmergelist=(); last } &foundbug; &transcript("D| adding $ref ($data->{mergedwith})\n") if $dl; $mismatch= ''; &checkmatch('package','m_package',$data->{package}); &checkmatch('forwarded addr','m_forwarded',$data->{forwarded}); $data->{severity} = '$gDefaultSeverity' if $data->{severity} eq ''; &checkmatch('severity','m_severity',$data->{severity}); &checkmatch('done mark','m_done',length($data->{done}) ? 'done' : 'open'); foreach my $t (split /\s+/, $data->{keywords}) { $tags{$t} = 1; } if (length($mismatch)) { &transcript("Mismatch - only $gBugs in same state can be merged:\n". $mismatch."\n"); &cancelbug; @newmergelist=(); last; } push(@newmergelist,$ref); push(@tomerge,split(/ /,$data->{mergedwith})); &cancelbug; } if (@newmergelist) { @newmergelist= sort { $a <=> $b } @newmergelist; $action= "Merged @newmergelist."; for $ref (@newmergelist) { &getbug || die "huh ? $gBug $ref disappeared during merge"; &addmaintainers($data->{package}); $data->{mergedwith}= join(' ',grep($_ ne $ref,@newmergelist)); $data->{keywords}= join(' ', keys %tags); &savebug; } &transcript("$action\n\n"); } &endmerge; } elsif (m/^clone\s+#?(\d+)\s+((-\d+\s+)*-\d+)\s*$/i) { $ok++; $origref = $1; @newclonedids = split /\s+/, $2; $newbugsneeded = scalar(@newclonedids); $ref = $origref; if (&setbug) { if (length($data->{mergedwith})) { &transcript("$gBug is marked as being merged with others.\n\n"); &nochangebug; } else { &filelock("nextnumber.lock"); open(N,"nextnumber") || &quit("nextnumber: read: $!"); $v=; $v =~ s/\n$// || &quit("nextnumber bad format"); $firstref= $v+0; $v += $newbugsneeded; open(NN,">nextnumber"); print NN "$v\n"; close(NN); &unfilelock; $lastref = $firstref + $newbugsneeded - 1; if ($newbugsneeded == 1) { $action= "$gBug $origref cloned as bug $firstref."; } else { $action= "$gBug $origref cloned as bugs $firstref-$lastref."; } &getnextbug; my $ohash = get_hashname($origref); $ref = $firstref; for $newclonedid (@newclonedids) { $clonebugs{$newclonedid} = $ref; my $hash = get_hashname($ref); copy("db-h/$ohash/$origref.log", "db-h/$hash/$ref.log"); copy("db-h/$ohash/$origref.status", "db-h/$hash/$ref.status"); copy("db-h/$ohash/$origref.report", "db-h/$hash/$ref.report"); &bughook('new', $ref, "$data->{originator}\n$data->{date}\n$data->{subject}\n$data->{msgid}\n$data->{package}\n$data->{keywords}\n$data->{done}\n$data->{forwarded}\n$data->{mergedwith}\n$data->{severity}\n"); $ref++; } } } } else { &transcript("Unknown command or malformed arguments to command.\n\n"); if (++$unknowns >= 5) { &transcript("Too many unknown commands, stopping here.\n\n"); last; } } } if ($procline>$#bodylines) { &transcript(">\nEnd of message, stopping processing here.\n\n"); } if (!$ok && !quickabort) { &transcript("No commands successfully parsed; sending the help text(s).\n"); &sendhelp; &transcript("\n"); } &transcript("MC\n") if $dl>1; @maintccs= (); for $maint (keys %maintccreasons) { &transcript("MM|$maint|\n") if $dl>1; next if $maint eq $replyto; $reasonstring= ''; $reasonsref= $maintccreasons{$maint}; &transcript("MY|$maint|\n") if $dl>2; for $p (sort keys %$reasonsref) { &transcript("MP|$p|\n") if $dl>2; $reasonstring.= ', ' if length($reasonstring); $reasonstring.= $p.' ' if length($p); $reasonstring.= join(' ',map("#$_",sort keys %{$$reasonsref{$p}})); } if (length($reasonstring) > 40) { (substr $reasonstring, 37) = "..."; } $reasonstring = "" if (!defined($reasonstring)); push(@maintccs,"$maint ($reasonstring)"); push(@maintccaddrs,"$maint"); } $maintccs = ""; if (@maintccs) { &transcript("MC|@maintccs|\n") if $dl>2; $maintccs .= "Cc: " . join(",\n ",@maintccs) . "\n"; } if (!defined $header{'subject'} || $header{'subject'} eq "") { $header{'subject'} = "your mail"; } $reply= < Precedence: bulk ${transcript}Please contact me if you need assistance. $gMaintainer (administrator, $gProject $gBugs database) $extras END $repliedshow= join(', ',$replyto,@maintccaddrs); &filelock("lock/-1"); open(AP,">>db-h/-1.log") || &quit("open db-h/-1.log: $!"); print(AP "\2\n$repliedshow\n\5\n$reply\n\3\n". "\6\n". "Request received from ". &sani($header{'from'})."\n". "to ".&sani($controlrequestaddr)."\n". "\3\n". "\7\n",@{escapelog(@log)},"\n\3\n") || &quit("writing db-h/-1.log: $!"); close(AP) || &quit("open db-h/-1.log: $!"); &unfilelock; utime(time,time,"db-h"); &sendmailmessage($reply,$replyto,@maintccaddrs,@bcc); unlink("incoming/P$nn") || &quit("unlinking incoming/P$nn: $!"); sub get_addresses { return map { $_->address() } map { Mail::Address->parse($_) } @_; } sub sendmailmessage { local ($message,@recips) = @_; $message = "X-Loop: $gMaintainerEmail\n" . $message; print "mailing to >@recips<\n" if $debug; $c= open(D,"|-"); defined($c) || &quit("mailing forking for sendmail: $!"); if (!$c) { # ie, we are the child process exec '/usr/lib/sendmail','-f'."$gMaintainerEmail",'-odb','-oem','-oi',get_addresses(@recips); die $!; } print(D $message) || &quit("writing to sendmail process: $!"); $!=0; close(D); $? && &quit("sendmail gave exit status $? ($!)"); $midix++; } sub sendhelp { &sendtxthelpraw("bug-log-mailserver.txt","instructions for request\@$gEmailDomain"); &sendtxthelpraw("bug-maint-mailcontrol.txt","instructions for control\@$gEmailDomain") if $control; } #sub unimplemented { # &transcript("Sorry, command $_[0] not yet implemented.\n\n"); #} sub checkmatch { local ($string,$mvarname,$svarvalue) = @_; local ($mvarvalue); if (@newmergelist) { eval "\$mvarvalue= \$$mvarname"; &transcript("D| checkmatch \`$string' /$mvarname/$mvarvalue/$svarvalue/\n") if $dl; $mismatch .= "Values for \`$string' don't match:\n". " #$newmergelist[0] has \`$mvarvalue';\n". " #$ref has \`$svarvalue'\n" if $mvarvalue ne $svarvalue; } else { &transcript("D| setupmatch \`$string' /$mvarname/$svarvalue/\n") if $dl; eval "\$$mvarname= \$svarvalue"; } } # High-level bug manipulation calls # Do announcements themselves # # Possible calling sequences: # setbug (returns 0) # # setbug (returns 1) # &transcript(something) # nochangebug # # setbug (returns 1) # $action= (something) # do { # (modify s_* variables) # } while (getnextbug); sub nochangebug { &dlen("nochangebug"); $state eq 'single' || $state eq 'multiple' || die "$state ?"; &cancelbug; &endmerge if $manybugs; $state= 'idle'; &dlex("nochangebug"); } sub setbug { &dlen("setbug $ref"); if ($ref =~ m/^-\d+/) { if (!defined $clonebugs{$ref}) { ¬foundbug; &dlex("setbug => noclone"); return 0; } $ref = $clonebugs{$ref}; } $state eq 'idle' || die "$state ?"; if (!&getbug) { ¬foundbug; &dlex("setbug => 0s"); return 0; } @thisbugmergelist= split(/ /,$data->{mergedwith}); if (!@thisbugmergelist) { &foundbug; $manybugs= 0; $state= 'single'; $sref=$ref; &dlex("setbug => 1s"); return 1; } &cancelbug; &getmerge; $manybugs= 1; if (!&getbug) { ¬foundbug; &endmerge; &dlex("setbug => 0mc"); return 0; } &foundbug; $state= 'multiple'; $sref=$ref; &dlex("setbug => 1m"); return 1; } sub getnextbug { &dlen("getnextbug"); $state eq 'single' || $state eq 'multiple' || die "$state ?"; &savebug; if (!$manybugs || !@thisbugmergelist) { length($action) || die; &transcript("$action\n$extramessage\n"); &endmerge if $manybugs; $state= 'idle'; &dlex("getnextbug => 0"); return 0; } $ref= shift(@thisbugmergelist); &getbug || die "bug $ref disappeared"; &foundbug; &dlex("getnextbug => 1"); return 1; } # Low-level bug-manipulation calls # Do no announcements # # getbug (returns 0) # # getbug (returns 1) # cancelbug # # getmerge # $action= (something) # getbug (returns 1) # savebug/cancelbug # getbug (returns 1) # savebug/cancelbug # [getbug (returns 0)] # &transcript("$action\n\n") # endmerge sub notfoundbug { &transcript("$gBug number $ref not found.\n\n"); } sub foundbug { &transcript("$gBug#$ref: $data->{subject}\n"); } sub getmerge { &dlen("getmerge"); $mergelowstate eq 'idle' || die "$mergelowstate ?"; &filelock('lock/merge'); $mergelowstate='locked'; &dlex("getmerge"); } sub endmerge { &dlen("endmerge"); $mergelowstate eq 'locked' || die "$mergelowstate ?"; &unfilelock; $mergelowstate='idle'; &dlex("endmerge"); } sub getbug { &dlen("getbug $ref"); $lowstate eq 'idle' || die "$state ?"; if (($data = &lockreadbug($ref))) { $sref= $ref; $lowstate= "open"; &dlex("getbug => 1"); $extramessage=''; return 1; } $lowstate= 'idle'; &dlex("getbug => 0"); return 0; } sub cancelbug { &dlen("cancelbug"); $lowstate eq 'open' || die "$state ?"; &unfilelock; $lowstate= 'idle'; &dlex("cancelbug"); } sub savebug { &dlen("savebug $ref"); $lowstate eq 'open' || die "$lowstate ?"; length($action) || die; $ref == $sref || die "read $sref but saving $ref ?"; my $hash = get_hashname($ref); open(L,">>db-h/$hash/$ref.log") || &quit("opening db-h/$hash/$ref.log: $!"); print(L "\6\n". "".&sani($action)."\n". "Request was from ".&sani($header{'from'})."\n". "to ".&sani($controlrequestaddr).". \n". "\3\n". "\7\n",@{escapelog(@log)},"\n\3\n") || &quit("writing db-h/$hash/$ref.log: $!"); close(L) || &quit("closing db-h/$hash/$ref.log: $!"); unlockwritebug($ref, $data); $lowstate= "idle"; &dlex("savebug"); } sub dlen { return if !$dl; &transcript("C> @_ ($state $lowstate $mergelowstate)\n"); } sub dlex { return if !$dl; &transcript("R> @_ ($state $lowstate $mergelowstate)\n"); } sub transcript { print $_[0] if $debug; $transcript.= $_[0]; } sub urlsanit { my $url = shift; $url =~ s/%/%25/g; $url =~ s/\+/%2b/g; my %saniarray = ('<','lt', '>','gt', '&','amp', '"','quot'); $url =~ s/([<>&"])/\&$saniarray{$1};/g; return $url; } sub sendlynxdoc { &sendlynxdocraw; &transcript("\n"); $ok++; } sub sendtxthelp { &sendtxthelpraw; &transcript("\n"); $ok++; } sub sendtxthelpraw { local ($relpath,$description) = @_; $doc=''; open(D,"$gDocDir/$relpath") || &quit("open doc file $relpath: $!"); while() { $doc.=$_; } close(D); &transcript("Sending $description in separate message.\n"); &sendmailmessage(< Precedence: bulk END $ok++; } sub sendlynxdocraw { local ($relpath,$description) = @_; $doc=''; open(L,"lynx -nolist -dump http://$gCGIDomain/\Q$relpath\E 2>&1 |") || &quit("fork for lynx: $!"); while() { $doc.=$_; } $!=0; close(L); if ($? == 255 && $doc =~ m/^\n*lynx: Can\'t access start file/) { &transcript("Information ($description) is not available -\n". "perhaps the $gBug does not exist or is not on the WWW yet.\n"); $ok++; } elsif ($?) { &transcript("Error getting $description (code $? $!):\n$doc\n"); } else { &transcript("Sending $description.\n"); &sendmailmessage(< Precedence: bulk END $ok++; } } sub addccaddress { my ($cca) = @_; $maintccreasons{$cca}{''}{$ref}= 1; } sub addmaintainers { # Data structure is: # maintainer email address &c -> assoc of packages -> assoc of bug#'s my ($p, $addmaint, $pshow); &ensuremaintainersloaded; $anymaintfound=0; $anymaintnotfound=0; for $p (split(m/[ \t?,()]+/,$_[0])) { $p =~ y/A-Z/a-z/; $pshow= ($p =~ m/[-+.a-z0-9]+/ ? $& : ''); if (defined $gSubscriptionDomain) { if (defined($pkgsrc{$p})) { push @bcc, "$pkgsrc{$p}\@$gSubscriptionDomain"; } else { push @bcc, "$p\@$gSubscriptionDomain"; } } if (defined($maintainerof{$p})) { $addmaint= $maintainerof{$p}; &transcript("MR|$addmaint|$p|$ref|\n") if $dl>2; $maintccreasons{$addmaint}{$p}{$ref}= 1; print "maintainer add >$p|$addmaint<\n" if $debug; } else { print "maintainer none >$p<\n" if $debug; &transcript("Warning: Unknown package '$p'\n"); &transcript("MR|unknown-package|$p|$ref|\n") if $dl>2; $maintccreasons{$gUnknownMaintainerEmail}{$p}{$ref}= 1; } } } sub ensuremaintainersloaded { my ($a,$b); return if $maintainersloaded++; open(MAINT,"$gMaintainerFile") || die &quit("maintainers open: $!"); while () { m/^\n$/ && next; m/^\s*$/ && next; m/^(\S+)\s+(\S.*\S)\s*\n$/ || &quit("maintainers bogus \`$_'"); $a= $1; $b= $2; $a =~ y/A-Z/a-z/; $maintainerof{$1}= $2; } close(MAINT); open(MAINT,"$gMaintainerFileOverride") || die &quit("maintainers.override open: $!"); while () { m/^\n$/ && next; m/^\s*$/ && next; m/^(\S+)\s+(\S.*\S)\s*\n$/ || &quit("maintainers.override bogus \`$_'"); $a= $1; $b= $2; $a =~ y/A-Z/a-z/; $maintainerof{$1}= $2; } open(SOURCES, "$gPackageSource") || &quit("pkgsrc open: $!"); while () { next unless m/^(\S+)\s+\S+\s+(\S.*\S)\s*$/; my ($a, $b) = ($1, $2); $pkgsrc{lc($a)} = $b; } close(SOURCES); } sub sendinfo { local ($wherefrom,$path,$description) = @_; if ($wherefrom eq "ftp.d.o") { $doc = `lynx -nolist -dump http://ftp.debian.org/debian/indices/$path.gz 2>&1 | gunzip -cf` or &quit("fork for lynx/gunzip: $!"); $! = 0; if ($? == 255 && $doc =~ m/^\n*lynx: Can\'t access start file/) { &transcript("$description is not available.\n"); $ok++; return; } elsif ($?) { &transcript("Error getting $description (code $? $!):\n$doc\n"); return; } } elsif ($wherefrom eq "local") { open P, "$path"; $doc = do { local $/;

      }; close P; } else { &transcript("internal errror: info files location unknown.\n"); $ok++; return; } &transcript("Sending $description.\n"); &sendmailmessage(< Precedence: bulk $description follows: END $ok++; &transcript("\n"); } debbugs-2.4.1ubuntu1/scripts/summary.in0000755000175000017500000000660307655020020016655 0ustar jw2328jw2328#!/usr/bin/perl # $Id: summary.in,v 1.8 2003/05/03 20:01:20 doogie Exp $ $config_path = '/etc/debbugs'; $lib_path = '/usr/lib/debbugs'; require("$config_path/config"); require("$lib_path/errorlib"); $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; chdir("$gSpoolDir") || die "chdir spool: $!\n"; #open(DEBUG,">&4"); $mode= shift(@ARGV); open(M,"$gMaintainerFile") || &quit("open $gMaintainerFile: $!"); while () { m/^(\S+)\s+(\S.*\S)\s*$/ || warn "$_ ?"; ($a,$b)=($1,$2); $a =~ y/A-Z/a-z/; $maintainer{$a}= $b; } close(M); open(M,"$gMaintainerFileOverride") || &quit("open $gMaintainerFileOverride: $!"); while () { m/^(\S+)\s+(\S.*\S)\s*$/ || warn "$_ ?"; ($a,$b)=($1,$2); $a =~ y/A-Z/a-z/; $maintainer{$a}= $b; } close(M); defined($startdate= time) || &quit("failed to get time: $!"); opendir(DIR,"db-h") || &quit("opendir db-h: $!\n"); @dirs = sort { $a <=> $b } grep(s,^,db-h/,, grep(m/^\d+$/,readdir(DIR))); closedir(DIR); foreach my $dir (@dirs) { opendir(DIR,$dir); push @list, sort { $a <=> $b } grep(s/\.status$//,grep(m/^\d+\.status$/,readdir(DIR))); closedir(DIR); } $head= $mode eq 'bymaint' ? ' Package Ref Subject' : ' Ref Package Keywords/Subject Package maintainer'; $amonths=-1; while (length($f=shift(@list))) { if (!($data = lockreadbug($f))) { next; } $_= $data->{package}; y/A-Z/a-z/; $_= $` if m/[^-+._a-z0-9]/; $data->{maintainer}= defined($maintainer{$_}) ? $maintainer{$_} : length($_) ? "(unknown -- \`$_')" : "(unknown)"; if ($mode eq 'undone' || $mode eq 'veryold') { &unfilelock; next if length($data->{done}) || length($data->{forwarded}); $cmonths= int(($startdate - $data->{date})/2592000); # 3600*24*30 (30 days) next if $mode eq 'veryold' && $cmonths < 2; if ($cmonths != $amonths) { $msg= $cmonths == 0 ? "Submitted in the last month" : $cmonths == 1 ? "Over one month old" : $cmonths == 2 ? "Over two months old - attention is required" : "OVER $cmonths MONTHS OLD - ATTENTION IS REQUIRED"; print "\n$msg:\n$head\n"; $amonths= $cmonths; } printf("%6d %-10.10s %-30.30s %-.31s\n", $f, $data->{package}, (length($data->{keywords}) ? $data->{keywords}.'/' : '').$data->{subject}, $data->{maintainer}) || &quit("output undone: $!"); } elsif ($mode eq 'bymaint') { &unfilelock; next if length($data->{done}) || length($data->{forwarded}); $string{$f}= sprintf(" %-10.10s %6d %-.59s\n", $data->{package}, $f, $data->{subject}); $data->{maintainer}= "(unknown)" if $data->{maintainer} =~ m/^\(unknown \-\-/; $maintainercnt{$data->{maintainer}}++; $maintainerlist{$data->{maintainer}}.= " $f"; } else { &quit("badmode $mode"); } } if ($mode eq 'bymaint') { print("$head\n") || &quit("output head: $!"); for $m (sort { $maintainercnt{$a} <=> $maintainercnt{$b} } keys %maintainercnt) { printf("\n%s (%d $gBugs):\n",$m,$maintainercnt{$m}) || &quit("output mainthead: $!"); for $i (sort { $string{$a} cmp $string{$b} } split(/ /,$maintainerlist{$m})) { printf($string{$i}) || &quit("output 1bymaint: $!"); } } } close(STDOUT) || &quit("close stdout: $!"); debbugs-2.4.1ubuntu1/scripts/text.in0000644000175000017500000003456607667432377016203 0ustar jw2328jw2328# $Id: text.in,v 1.20 2003/06/04 18:05:51 cjwatson Exp $ ############################################################################ # Here is a blurb to point people to ftp archive of directions. It is # used by the receive script when bouncing a badly formatted email # # $gTextInstructions = "$gBadEmailPrefix # $gBadEmailPrefix Instructions are available from ftp.debian.org in /debian # $gBadEmailPrefix and at all Debian mirror sites, in the files: # $gBadEmailPrefix doc/bug-reporting.txt # $gBadEmailPrefix doc/bug-log-access.txt # $gBadEmailPrefix doc/bug-maint-info.txt # $gBadEmailPrefix"; ############################################################################ $gTextInstructions = "$gBadEmailPrefix"; ############################################################################ # Here is a blurb for any mirrors of the web site. Here's a sample: # #$gHTMLCopies = "

      Copies of the logs are available on the World Wide Web at
      # http://mirror1.domain
      # http://mirror2.domain"; ############################################################################ $gHTMLCopies = ""; ############################################################################ # notice other links you want to note, like your list archives or project # home page. # #$gHTMLOtherPages = "Other Links of note:
      # The Debian Project
      # Description of URL"; ############################################################################ $gHTMLOtherPages = ""; ############################################################################ # list of other links you want to note, like your list archives or project # home page. Some pages already have links in a list, this adds them to # the end of the list. # #$gHTMLOtherPageList = "

    • # The Debian Project #
    • Description of URL"; ############################################################################ $gHTMLOtherPageList = ""; ############################################################################ # gives explanation of bad maintainer situation and instructions on how to # correct. ############################################################################ $gBadMaintHtml = ""; ############################################################################ # give directions here for how to find the proper title for Package: # pseudo header line. ############################################################################ $gHTMLFindPackage = ""; ############################################################################ # If you have pseudo packages, place a blurb here. For example: # $gHTMLPseudoDesc = "

      There are some pseudo-packages available for putting in # the Package line when reporting a $gBug in something other than an # actual $gProject software package. There is # a list of these on the $gBugs WWW # pages."; ############################################################################ $gHTMLPseudoDesc = ""; ############################################################################ # List any extra information you would like included in bug reports. For # example: # $gXtraBugInfo = "

    • What kernel version you're using (type # uname -a), your shared C library (type ls -l # /lib/libc.so.6 or dpkg -s libc6 | grep ^Version), and # any other details about your Debian system, if it seems appropriate. # For example, if you had a problem with a Perl script, you would want to # provide the version of the `perl' binary (type perl -v or # dpkg -s perl-5.005 | grep ^Version:)."; ############################################################################ $gXtraBugInfo = ""; ############################################################################ # List any extra information you would like about reporting bugs ############################################################################ $gXtraReportingInfo = ""; ############################################################################ # Process used by system to create Maintainers index file ############################################################################ $gCreateMaintainers = ""; ########################################################################### # You shouldn't have to modify anything below here unless it's for personal # preference. Be very careful and don't touch unless you *know* what # you're doing. Much of the stuff has hardcoded duplicates elsewhere. ############################################################################ # Description of the severities ############################################################################ $gHTMLSeverityDesc = "
      critical
      makes unrelated software on the system (or the whole system) break, or causes serious data loss, or introduces a security hole on systems where you install the package.
      grave
      makes the package in question unusable or mostly so, or causes data loss, or introduces a security hole allowing access to the accounts of users who use the package.
      normal
      the default value, for normal $gBugs.
      wishlist
      for any feature request, and also for any $gBugs that are very difficult to fix due to major design considerations."; ############################################################################ # Description of the tags ############################################################################ $gHTMLTagDesc = "
      patch
      A patch or some other easy procedure for fixing the $gBug is included in the $gBug logs. If there\'s a patch, but it doesn\'t resolve the $gBug adequately or causes some other problems, this tag should not be used.
      wontfix
      This $gBug won\'t be fixed. Possibly because this is a choice between two arbitrary ways of doing things and the maintainer and submitter prefer different ways of doing things, possibly because changing the behaviour will cause other, worse, problems for others, or possibly for other reasons.
      moreinfo
      This $gBug can\'t be addressed until more information is provided by the submitter. The $gBug will be closed if the submitter doesn\'t provide more information in a reasonable (few months) timeframe. This is for $gBugs like \"It doesn\'t work\". What doesn\'t work?
      unreproducible
      This $gBug can\'t be reproduced on the maintainer\'s system. Assistance from third parties is needed in diagnosing the cause of the problem.
      fixed
      This $gBug is fixed or worked around, but there\'s still an issue that needs to be resolved.
      stable
      This $gBug affects the stable distribution in particular. This is only intended to be used for ease in identifying release critical $gBugs that affect the stable distribution. It\'ll be replaced eventually with something a little more flexible, probably. "; ############################################################################ # shows up at the start of (most) html pages. ############################################################################ $gHTMLStart = ""; ############################################################################ # shows up at the end of (most) html pages. ############################################################################ $gHTMLTail = "
      $gMaintainer <$gMaintainerEmail>. Last modified: SUBSTITUTE_DTIME

      Debian $gBug tracking system
      Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.

      "; ############################################################################ # Message on when reports are purged. ############################################################################ $gHTMLExpireNote = "(Closed $gBugs are archived $gRemoveAge days after the last related message is received.)"; ############################################################################ # Makeup of the stamp page ############################################################################ $gHTMLStamp = " $gProject $gBugs - timestamp page $gHTMLStart

      Is this $gBug log or mirror up to date?

      Unlike all the other $gBug pages, this small timestamp page is updated every time the update check job runs. If the timestamp here is recent it\'s likely that the mirror in which you\'re reading it is up to date.

      The last update was at SUBSTITUTE_DTIME; The logs are usually checked every hour and updated if necessary.

      For the $gBug index or for other information about $gProject and the $gBug system, see the $gBug system main contents page.


      $gMaintainerEmail, through the $gProject $gBug database
      "; ############################################################################ # Makeup of the indices pages ############################################################################ $gFullIndex = " $gProject $gBugs - full index $gHTMLStart

      $gProject $gBug report logs - index

      This index gives access to $gBugs sent to submit\@$gEmailDomain but not yet marked as done, and to $gBugs marked as done but not yet purged from the database (this happens $gRemoveAge days after the last message relating to the report).

      For other kinds of indices or for other information about $gProject and the $gBug system, see $gBug system top-level contents WWW page. "; $gJunkIndex = " $gProject $gBug reports - Junk $gHTMLStart

      $gProject $gBug reports - Junk

      This is the index page for logs of messages not associated with a specific $gBug report.

      For other kinds of indices or for other information about $gProject and the $gBug system, see $gBug system top-level contents WWW page. "; $gMaintIndex = " $gProject $gBug reports by maintainer $gHTMLStart

      $gProject $gBug reports by maintainer

      This page lists the package maintainers against whose packages there are outstanding, forwarded or recently-closed $gBug reports. A maintainer who has several versions of their email address in the Maintainer package control file field may appear several times.

      If the maintainers information here is not accurate, please see the developers\' instructions to find how this can happen and what to do about it.

      For other kinds of indices or for other information about $gProject and the $gBug system, see $gBug system top-level contents WWW page. "; $gPackageIndex = " $gProject $gBug reports by package $gHTMLStart

      $gProject $gBug reports by package

      This page lists the package against which there are outstanding, forwarded or recently-closed $gBug reports. A multi-binary package may appear several times, once for each binary package name and once for the source package name (if it is different).

      For other kinds of indices or for other information about $gProject and the $gBug system, see $gBug system top-level contents WWW page. "; $gSummaryIndex = " $gProject $gBug report logs - summary index $gHTMLStart

      $gProject $gBug report logs - summary index

      This summary index briefly lists $gBugs sent to submit\@$gEmailDomain but not yet marked as done, or as forwarded to an upstream author. Here they are sorted by reference number (and therefore by submission date, too).

      For other kinds of indices or for other information about $gProject and the $gBug system, see $gBug system top-level contents WWW page.

      The * column lists the first letter of the severity of the $gBug. "; $gPackageLog = " $gProject $gBug report logs - index by package $gHTMLStart

      $gProject $gBug report logs - index by package

      This summary index briefly lists $gBugs sent to submit\@$gEmailDomain but not yet marked as done, or as forwarded to an upstream author. Here they are sorted by package name.

      For other kinds of indices or for other information about $gProject and the $gBug system, see $gBug system top-level contents WWW page. "; $gPseudoIndex = " $gProject $gBug report pseudo-packages $gHTMLStart

      $gProject $gBug report pseudo-packages

      This page lists the pseudo-packages available for use in the Package: line in $gBug reports.

      See the instructions for reporting a $gBug for details of how to specify a Package: line.

      For other kinds of indices or for other information about $gProject and the $gBug system, see $gBug system top-level contents WWW page. ";