Index: head/en_US.ISO8859-1/htdocs/cgi/Gnats.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/Gnats.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/Gnats.pm (nonexistent) @@ -1,41 +0,0 @@ -# $FreeBSD$ -package Gnats; - -# We probably don't have "our" in this Perl -use vars qw/ - $gnats_root - $query_pr - $submission_address - $submission_program - $use_mail - /; - -$gnats_root="/usr/local/libexec/gnats"; -$query_pr="/usr/local/bin/query-pr.web"; -$submission_address="freebsd-gnats-submit\@FreeBSD.org"; -$use_mail=1; - -if ($use_mail) { - if (-e "/usr/lib/sendmail") { $submission_program = "/usr/lib/sendmail -t" }; - if (-e "/usr/sbin/sendmail") { $submission_program = "/usr/sbin/sendmail -t" }; -} else { - if (-e "$gnats_root/queue-pr") { $submission_program = "$gnats_root/queue-pr -q" }; -} - -##### End site specific stuff - -BEGIN { - use Exporter(); - use vars qw/$VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS/; - $VERSION = 0.01; # Has to have two decimal places - @ISA = qw/Exporter/; - # Names for sets of symbols - %EXPORT_TAGS = ( - 'standard'=>[qw/$gnats_root $query_pr $submission_address - $submission_program/], - ); - Exporter::export_tags('standard'); - Exporter::export_ok_tags('standard'); -} - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/Gnats.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/query-pr-summary.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/query-pr-summary.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/query-pr-summary.cgi (nonexistent) @@ -1,473 +0,0 @@ -#!/usr/bin/perl -T -# $FreeBSD$ - -$html_mode = 1 if $ENV{'DOCUMENT_ROOT'}; -$self_ref = $ENV{'SCRIPT_NAME'}; -($query_pr_ref = $self_ref) =~ s/-summary//; - -$ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin'; - -$project = 'FreeBSD'; -$mail_prefix = 'freebsd-'; -$mail_unass = 'freebsd-bugs'; -$ports_unass = 'ports-bugs'; -$closed_too = 0; - -require './cgi-lib.pl'; -require './cgi-style.pl'; -require './query-pr-lib.pl'; - -if (!$ENV{'QUERY_STRING'} or $ENV{'QUERY_STRING'} eq 'query') { - print &html_header("Query $project problem reports"); - &displayform; - print &html_footer; - exit(0); -} - -if ($html_mode) { - $query_args = '--restricted '; - &ReadParse(*input); -} else { - &Getopts('CcqRr:s:T:'); - - $input{'responsible'} = 'summary' if $opt_R; - if ($opt_r) { - ($input{'responsible'}) = ($opt_r =~ m/^(\^?[-_a-zA-Z0-9@.]*\$?)$/); - die 'Insecure args' if ($input{'responsible'} ne $opt_r) - } - if ($opt_s) { - ($input{'state'}) = ($opt_s =~ m/^([a-zA-Z]*)$/); - die 'Insecure args' if ($input{'state'} ne $opt_s) - } - $input{'quiet'} = 'yes' if $opt_q; - if ($opt_C) { - $query_args = '--confidential=yes '; - } elsif (!$opt_c) { - $query_args = '--restricted '; - } - if ($opt_T) { - ($tag) = ($opt_T =~ m/^(\^?[-_a-zA-Z0-9@.]*\$?)$/); - die 'Insecure args' if ($tag ne $opt_T); - $input{'text'} = '\[' . $tag . '\]'; - } -} - -$closed_too = 1 if $input{'state'} eq 'closed' || - ($input{'closedtoo'} && ($input{'multitext'} || $input{'text'} || $input{'responsible'} || $input{'originator'})); - -#------------------------------------------------------------------------ - -%mons = ('Jan', '01', 'Feb', '02', 'Mar', '03', - 'Apr', '04', 'May', '05', 'Jun', '06', - 'Jul', '07', 'Aug', '08', 'Sep', '09', - 'Oct', '10', 'Nov', '11', 'Dec', '12'); - - -if ($html_mode) { - - $pr = '
';    $pr_e = '
'; - $h1 = '

'; $h1_e = '

'; - $h3 = '

'; $h3_e = '

'; - $hr = '
'; - - $table = ""; - $table_e = '
'; - - # Customizations for the look and feel of the summary tables. - $t_style = ""; - -} else { - - $pr = ''; $pr_e = ''; - $h1 = ''; $h1_e = ''; - $h3 = ''; $h3_e = ''; - $hr = "\n----------------------------------------" . - "---------------------------------------\n"; - - $table = ''; - $table_e = ''; -} - -sub cgiparam { - local ($result) = @_; - - $result =~ s/[^A-Za-z0-9+.@-]/"%".sprintf("%02X", unpack("C", $&))/ge; - $result; -} - -sub header_info { - if ($html_mode) { - print &html_header("Current $project problem reports"); - } - else { - print "Current $project problem reports\n"; - } - if (!$input{'quiet'}) { - print "The following is an old and incomplete of current problems submitted by $project users. "; - if ($html_mode) { - print <FreeBSD has migrated to Bugzilla. Please update your bookmarks and try your search there. -EOM - } - } - - if ($html_mode) { - -# These self references are attempts to only change a single variable at a time. -# If someone does a multiple-variable query they will probably do weird things. - -$self_ref1 = $self_ref . '?'; -$self_ref1 .= 'sort=' . html_fixline($input{'sort'}) if $input{'sort'}; -print "

You may view summaries by Severity, "; -$self_ref1 .= '&' if ($self_ref1 !~/\?$/); -print "State, "; -print "Category, or "; -print "Responsible Party.\n"; - -$self_ref2 = $self_ref . '?'; -foreach ('category', 'originator', 'priority', 'class', 'responsible', - 'severity', 'state', 'submitter', 'text', 'multitext', 'closedtoo') { - if ($input{$_}) { - $self_ref2 .= '&' if ($self_ref2 !~/\?$/); - $self_ref2 .= $_ . '=' . cgiparam($input{$_}); - } -} - -print 'You may also sort by '; -print "Last-Modified, "; -print "Category, or "; -print "Responsible Party.\n"; -print "Or formulate a specific query.\n"; - -$self_ref3 = $self_ref . '?'; -foreach ('category', 'originator', 'priority', 'class', 'responsible', - 'severity', 'state', 'submitter', 'text', 'multitext', 'sort') { - if ($input{$_}) { - $self_ref3 .= '&' if ($self_ref2 !~/\?$/); - $self_ref3 .= $_ . '=' . cgiparam($input{$_}); - } -} - -if ($input{'closedtoo'}) { - print "Do not show closed reports."; -} else { - print "Include closed reports too."; -} - -print "

\n"; - - } -} - -&header_info; - -#Usage: query-pr [-FGhiPRqVx] [-C confidential] [-c category] [-d directory] -# [-e severity] [-m mtext] [-O originator] [-o outfile] [-p priority] -# [-L class] [-r responsible] [-S submitter] [-s state] [-t text] -# [-b date] [-a date] [-B date] [-M date] [-z date] [-Z date] -# [-y synopsis] [-A release] [--full] [--help] [--print-path] [--version] -# [--summary] [--sql] [--skip-closed] [--category=category] -# [--confidential=yes|no] [--directory=directory] [--output=outfile] -# [--originator=name] [--priority=level] [--class=class] -# [--responsible=person] [--release=release] [--restricted] -# [--quarter=quarter] [--keywords=regexp] -# [--required-before=date] [--required-after=date] -# [--arrived-before=date] [--arrived-after=date] -# [--modified-before=date] [--modified-after=date] -# [--closed-before=date] [--closed-after=date] -# [--severity=severity] [--state=state] [--submitter=submitter] -# [--list-categories] [--list-classes] [--list-responsible] -# [--list-states] [--list-submitters] [--list-config] -# [--synopsis=synopsis] [--text=text] [--multitext=mtext] [PR] [PR]... - -$query_args .= ' --skip-closed' unless $closed_too; - -# Only read the appropriate PR's. -foreach ('category', 'originator', 'priority', 'class', 'responsible', - 'release', 'severity', 'state', 'submitter', 'text', 'multitext') { - if ($input{$_} && $input{$_} ne 'summary') { - # Check if the arguments provided by user are secure. - # This is required to be able to run this script in - # taint mode (perl -T) - if ($input{$_} =~ /^([-^'\/\[\]\@\s\w.]+)$/) { - $d = $1; - $d =~ s/^"(.*)"$/$&/; - $d =~ s/'/\\'/; - $query_args .= " --${_}='$d'"; - } else { - print "Insecure data in ${_}! Ignoring this filter.
". - "Only alphanumeric characters and ', /, -, [, ], ^, @ are allowed."; - } - } -} - -&read_gnats($query_args); - -if ($input{'sort'} eq 'lastmod') { - @prs = sort {$lastmod{$b} cmp $lastmod{$a}} @prs; -} elsif ($input{'sort'} eq 'category') { - @prs = sort {($ca,$na)=split(m|/|,$a); ($cb,$nb)=split(m|/|,$b); $ca eq $cb ? $na <=> $nb : $ca cmp $cb} @prs; -} elsif ($input{'sort'} eq 'responsible') { - @prs = sort {$resp{$a} cmp $resp{$b}} @prs; -} else { - $input{'sort'} = 'none'; -} - -if ($#prs < $[) { - print "${h1}Please try bugzilla for an up to date search mechanism.${h1_e}\n"; - -} elsif ($input{'responsible'} eq 'summary') { - &resp_summary; - -} elsif ($input{'state'} eq 'summary') { - &state_summary; - -} elsif ($input{'category'} eq 'summary') { - &cat_summary; - -} elsif ($input{'severity'} eq '') { - &severity_summary; - -} else { - &printcnt(&gnats_summary(1, $html_mode)); - -} - -print &html_footer if $html_mode; - -exit(0); - -#------------------------------------------------------------------------ - -sub getline { - local($_) = @_; - ($tag,$remainder) = split(/[ \t]+/, $_, 2); - return $remainder; -} - -sub html_fixline { - local($line) = @_[0]; - - $line =~ s/&/&/g; - $line =~ s//>/g; - - $line; -} - -sub printcnt { - local($cnt) = $_[0]; - - if ($cnt) { - printf("%d problem%s total.\n\n", $cnt, $cnt == 1 ? '' : 's'); - } -} - -sub cat_summary { - &get_categories; - foreach (keys %status) { - s|/\d+||; - $cat{$_}++; - } - foreach (@categories) { - next unless $cat{$_}; # skip categories with no bugs. - print "${h3}Problems in category: $_ ($catdesc{$_})${h3_e}\n"; - if (/^(\w+)/) { - &printcnt(&gnats_summary("\$cat eq \"$1\"", $html_mode)); - } else { - print "\n??? weird category $_\n"; - } - } -} - -sub resp_query { - local($resp) = @_[0]; - local($cnt); - - $cnt = &gnats_summary("\$resp eq \"$resp\"", $html_mode); - print "${hr}${b}No problem reports assigned to $resp${b_e}\n" - if (!$input{"quiet"} && $cnt == 0); -} - -sub resp_summary { - local($who, %who); - - foreach (keys %resp) { - $who{$resp{$_}}++; - } - foreach $who (sort keys %who) { - $cnt = &gnats_summary("\$resp eq \"$who\"", $html_mode); - } -} - -sub state_summary { - &get_states; - foreach (@states) { - next if ($_ eq "closed" && !$input{"closedtoo"}); - print "${h3}Problems in state: $_${h3_e}\n"; - if (/^(\w)/) { - &printcnt(&gnats_summary("\$state eq \"$1\" ", $html_mode)); - } else { - print "\n??? bad state $state\n"; - } - } -} - -sub severity_summary { - print "${h3}Critical problems${h3_e}\n"; - &printcnt(&gnats_summary('$severity eq "critical"', $html_mode)); - - print "${h3}Serious problems${h3_e}\n"; - &printcnt(&gnats_summary('$severity eq "serious"', $html_mode)); - - print "${h3}Non-critical problems${h3_e}\n"; - &printcnt(&gnats_summary('$severity eq "non-critical"', $html_mode)); -} - -sub read_gnats { - local($report) = @_[0]; - - open(Q, "query-pr.web $report 2>/dev/null |") || die "Cannot query the PR's\n"; - - while() { - chop; - if(/^>Number:/) { - $number = &getline($_); - - } elsif (/Arrival-Date:/) { - $date = &getline($_); - # strip timezone if any (between HH:MM:SS and YYYY at end of line): - $date =~ s/(\d\d:\d\d:\d\d)\D+(\d{4})$/\1 \2/; - ($dow,$mon,$day,$time,$year,$xtra) = split(/[ \t]+/, $date); - $day = "0$day" if $day =~ /^[0-9]$/; - $date = "$year/$mons{$mon}/$day"; - - } elsif (/>Last-Modified:/) { - $lastmod = &getline($_); - if ($lastmod =~ /^[ ]*$/) { - $lastmod = $date; - } else { - # strip timezone if any (between HH:MM:SS and YYYY at end of line): - $lastmod =~ s/(\d\d:\d\d:\d\d)\D+(\d{4})$/\1 \2/; - ($dow,$mon,$day,$time,$year,$xtra) = split(/[ \t]+/, $lastmod); - $day = "0$day" if $day =~ /^[0-9]$/; - $lastmod = "$year/$mons{$mon}/$day"; - } - - } elsif (/>Category:/) { - $cat = &getline($_); - - } elsif (/>Severity:/) { - $sev = &getline($_); - - } elsif (/>Responsible:/) { - $resp = &getline($_); - $resp =~ s/@.*//; - $resp =~ tr/A-Z/a-z/; - $resp = "" if (($resp =~ /$mail_unass/o) or ($resp =~ /$ports_unass/o)); - $resp =~ s/^$mail_prefix//; - - } elsif (/>State:/) { - $status = &getline($_); - $status =~ s/(.).*/\1/; - - } elsif (/>Synopsis:/) { - $syn = &getline($_); - $syn =~ s/[\t]+/ /g; - - - } elsif (/^$/) { - $_ = sprintf("%s/%s", $cat, $number); - - $status{$_} = $status; - $date{$_} = $date; - $resp{$_} = $resp; - $syn{$_} = $syn; - $sev{$_} = $sev; - $lastmod{$_} = $lastmod; - push(@prs,$_); - } - } - close(Q); -} - -sub gnats_summary { - local($report) = @_[0]; - local($htmlmode) = @_[1]; - local($counter) = 0; - - foreach (@prs) { - $state = $status{$_}; - $date = $date{$_}; - $resp = $resp{$_}; - $syn = $syn{$_}; - $severity = $sev{$_}; - ($cat, $number) = m|^([^/]+)/(\d+)$|; - - next if (($report ne '') && (eval($report) == 0)); - - if ($htmlmode) { - $title = "$_"; - $syn = &html_fixline($syn); - gnats_summary_line_html($counter, $state, $date, $title, $resp, $syn); - } else { - $title = $_; - gnats_summary_line_text($counter, $state, $date, $title, $resp, $syn); - } - - $counter++; - } - - if ($htmlmode) { - print "${table_e}\n" if $counter; - } else { - print "${pr_e}\n" if $counter; - } - - $counter; -} - -sub gnats_summary_line_html { - local($counter) = shift; - local($state) = shift; - local($date) = shift; - local($title) = shift; - local($resp) = shift; - local($syn) = shift; - - if ($counter == 0) { - print "$tableSSubmittedTrackerResp.Description\n" - } - - print "$state$date$title$resp$syn\n"; -} - -sub gnats_summary_line_text { - local($counter) = shift; - local($state) = shift; - local($date) = shift; - local($title) = shift; - local($resp) = shift; - local($syn) = shift; - - # Print the banner line if this is the first iteration. - print "${pr}\nS Submitted Tracker Resp. Description${hr}" - if ($counter == 0); - print "$state $date $title" . - (' ' x (17 - length($_))) . - $resp . (' ' x (10 - length($resp))) . - substr($syn,0,39) . "\n"; -} Property changes on: head/en_US.ISO8859-1/htdocs/cgi/query-pr-summary.cgi ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/dosendpr.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/dosendpr.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/dosendpr.cgi (nonexistent) @@ -1,226 +0,0 @@ -#!/usr/bin/perl -# -# Send-pr perl script to send a pr. -# -# Copyright (c) 1996 Free Range Media -# -# Copying and distribution permitted under the conditions of the -# GNU General Public License Version 2. -# (http://www.gnu.ai.mit.edu/copyleft/gpl.html) -# -# $FreeBSD$ - -use Socket; -use CGI qw/:standard/; -use DB_File; -use Fcntl qw(:DEFAULT :flock); -require "./Gnats.pm"; import Gnats; - -my $blackhole = "dnsbl.njabl.org"; -my $openproxyip = "127.0.0.9"; -my $blackhole_err = 0; -my $openproxy; - -my $expiretime = 2700; -$dbpath = "/usr/local/www/var/confirm-code/sendpr-code.db"; - -# Maximum size of patch that we'll accept from send-pr.html. -$maxpatch = 102400; - -my $patchbuf; -my $patchhandle; - -# Environment variables to stuff in the PR header. -my @ENV_captures = qw/ REMOTE_HOST - REMOTE_ADDR - REMOTE_PORT - HTTP_REFERER - HTTP_CLIENT_IP - HTTP_FORWARDED - HTTP_VIA - HTTP_X_FORWARDED_FOR /; - -# env2hdr (@ENV_captures) -# Returns X-header style headers for inclusion in the header of a PR -sub env2hdr (@) { - my $headers = ""; - foreach my $var (@_) { - next unless $ENV{$var}; - $headers .= "X-$var: $ENV{$var}\n"; - } - return $headers; -} - -# isopenproxy ($ip, $blackhole_zone, $positive_ip) -# Returns undef on error, 0 if DNS lookup fails, $positive_ip if verified -# proxy. A DNS lookup failing can either means that there was a network -# problem, or that the IP is not listed in the blackhole zone. -sub isopenproxy ($$$) { - # If $? is already set, then a successful gethostbyname() leaves it set - local $?; - my ($ip, $zone, $proxyip) = @_; - my ($reversed_ip, $packed); - if (!defined $proxyip) { return undef }; - - $reversed_ip = join('.', reverse split(/\./, $ip)); - $packed = gethostbyname("${reversed_ip}.${blackhole}"); - return undef if $?; - - if ($packed && (inet_ntoa($packed) eq $proxyip)) { - return $proxyip; - } else { - return 0; - } -} - -sub prerror { - print start_html("Problem Report Error"); - print "

There is an error in the configuration of the problem\n", - "report form generator. Please back up one page and report\n", - "the problem to the owner of that page.
", - "Report $_[0].

"; - print end_html(); - exit (1); -} - -sub piloterror { - print start_html("Problem Report Error"); - print "

There is an error with your problem\n", - "report submission.\n", - "The problem was: $_[0].

"; - print end_html(); - exit (1); -} - -print header(); - -&prerror("request method problem") if $ENV{'REQUEST_METHOD'} eq 'GET'; - -if (!$submission_program) { &prerror("submit program problem"); } - -if ($patchhandle = upload('patch')) { -# use bytes; - unless ((uploadInfo($patchhandle)->{'Content-Type'} =~ m!^text/.*!) || - (uploadInfo($patchhandle)->{'Content-Type'} =~ m!^application/shar$!)) { - &piloterror("

Patch file has wrong content type: got " . - uploadInfo($patchhandle)->{'Content-Type'} . - " but was expecting one matching text/.* or application/shar.

" . - "

Try renaming the file to have a .txt extension" . - " to convince your browser to do the right thing.

"); - } - read($patchhandle,$patchbuf,$maxpatch + 1); - if (length($patchbuf) > $maxpatch) { - &piloterror("Patch file too big (over ${maxpatch} bytes)"); - } -} - -# Verify the code... - -$db_obj = tie(%db_hash, 'DB_File', $dbpath, O_CREAT|O_RDWR, 0644) - or die "dbcreate $dbpath $!"; -$fd = $db_obj->fd; -open(DB_FH, "+<&=$fd") or die "fdopen $!"; - -unless (flock (DB_FH, LOCK_EX | LOCK_NB)) { - unless (flock (DB_FH, LOCK_EX)) { die "flock: $!" } -} - -$codeentered = param('code-confirm'); -$codeentered =~ s/.*/\U$&/; # Turn input uppercase -$currenttime = time(); -if (defined($codeentered) && $codeentered && $db_hash{$codeentered} && - (($currenttime - $expiretime) <= $db_hash{$codeentered})) { - if (!param('email') || !param('originator') || - !param('synopsis')) { - print start_html("Problem Report Error"); - print "

Bad Data

You need to specify at least your ", - "electronic mail address, your name and a synopsis ", - "of the problem.
Please return to the form and add the ", - "missing information. Thank you.

"; - print end_html(); - - exit(1); - } -} else { - print start_html("Problem Report Error"); - print "

Incorrect confirmation code

You need to enter the correct ", - "code from the image displayed. Please return to the form and enter the ", - "code exactly as shown. Thank you.

"; - print end_html(); - - exit(1); -} - -# This code has now been used, so remove it. -delete $db_hash{"$codeentered"}; - -# Sweep for and remove expired codes. -foreach $randomcode (keys %db_hash) { - if ( ($currenttime - $expiretime) >= $db_hash{$randomcode}) { - delete $db_hash{"$randomcode"}; - } -} -$db_obj->sync(); # to flush -flock(DB_FH, LOCK_UN); -undef $db_obj; # removing the last reference to the DB - # closes it. Closing DB_FH is implicit. -untie %db_hash; - - -$openproxy = isopenproxy($ENV{'REMOTE_ADDR'}, $blackhole, $openproxyip); -if (defined $openproxy) { - if ($openproxy) { - &prerror("$ENV{'REMOTE_ADDR'} is an open proxy server"); - } -} else { - $blackhole_err++; -} - -# Build the PR. -$pr = "To: $submission_address\n" . - "From: " . param('originator') . " <" . param('email') . ">\n" . - "Subject: " . param('synopsis') . "\n" . - env2hdr(@ENV_captures); -if ($blackhole_err) { - $pr .= "X-REMOTE_ADDR-Is-Open-Proxy: Maybe\n"; -} - -$pr .= "X-Send-Pr-Version: www-3.1\n" . - "X-GNATS-Notify: \n\n" . - ">Submitter-Id:\t" . param('submitterid') . "\n" . - ">Originator:\t" . param('originator') . "\n" . - ">Organization:\t" . param('organization') . "\n" . - ">Confidential:\t" . param('confidential') . "\n" . - ">Synopsis:\t" . param('synopsis') . "\n" . - ">Severity:\t" . param('severity') . "\n" . - ">Priority:\t" . param('priority') . "\n" . - ">Category:\t" . param('category') . "\n" . - ">Class:\t\t" . param('class') . "\n" . - ">Release:\t" . param('release') . "\n" . - ">Environment:\t" . param('environment') . "\n" . - ">Description:\n" . param('description') . "\n" . - ">How-To-Repeat:\n" . param('howtorepeat') . "\n" . - ">Fix:\n" . param('fix') . "\n"; - -if (length($patchbuf) > 0) { - $pr .= "\nPatch attached with submission follows:\n\n" - . $patchbuf . "\n"; -} - -# remove any carriage returns that appear in the report. -$pr =~ s/\r//g; - -if (open (SUBMIT, "|$submission_program")){ - - print SUBMIT $pr; - print SUBMIT "\n.\n"; - close (SUBMIT); - print start_html("Thank you for the problem report"); - print "

Thank You

", - "

Thank you for the problem report. You should receive confirmation", - " of your report by electronic mail within a day.

"; -} else { - print start_html("Error raising problem report"); - print "

Error

An error occured processing your problem report.

"; -} -print end_html(); Property changes on: head/en_US.ISO8859-1/htdocs/cgi/dosendpr.cgi ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/MIMEIterator.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/MIMEIterator.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/MIMEIterator.pm (nonexistent) @@ -1,153 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::MIMEIterator; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: $email - GnatsPR::Section::Email instance. -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my $email = shift; - - my $self = { - idxlist => [ -1 ], - email => undef - }; - - bless $self, $class; - - $self->{email} = $email; - - return $self; -} - - -#------------------------------------------------------------------------------ -# Func: next() -# Desc: Return next iterator element. -# -# Args: n/a -# -# Retn: $next -#------------------------------------------------------------------------------ - -sub next -{ - my $self = shift; - - my $curr = $self->_current(); - - while (1) { - my $next = ++$self->{idxlist}->[$#{$self->{idxlist}}]; - - # Past last element? - if ($next > $#{$curr->{mimeparts}}) { - # Back out - pop @{$self->{idxlist}}; - - # Reached the root - $#{$self->{idxlist}} > -1 - or return undef; - - $curr = $self->_current(); - next; - } - - last; - } - - my $rpart = $curr->{mimeparts}->[$self->{idxlist}->[$#{$self->{idxlist}}]]; - - # Container part? - find a leaf node - while ($#{$rpart->{mimeparts}} > -1) { - $rpart = $rpart->{mimeparts}->[0]; - push @{$self->{idxlist}}, 0; - } - - return $rpart; -} - - -#------------------------------------------------------------------------------ -# Func: isfirst() -# Desc: Determine if the iterator is at the first element. -# -# Args: n/a -# -# Retn: $isfirst - true/false -#------------------------------------------------------------------------------ - -sub isfirst -{ - my $self = shift; - - return ( - $#{$self->{idxlist}} == 0 - and $self->{idxlist}->[$#{$self->{idxlist}}] == 0 - ); -} - - -#------------------------------------------------------------------------------ -# Func: _current() -# Desc: Traverse to, and return, the current container element. -# -# Args: n/a -# -# Retn: $curr -#------------------------------------------------------------------------------ - -sub _current -{ - my $self = shift; - my $curr = $self->{email}; - - # Find current MIME part container - for (my $depth = 0; $depth < $#{$self->{idxlist}}; $depth++) { - $curr = $curr->{mimeparts}->[$self->{idxlist}->[$depth]]; - } - - return $curr; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/MIMEIterator.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section.pm (nonexistent) @@ -1,58 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package Section; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: n/a -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - - my $self = { - }; - - bless $self, $class; - return $self; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile.inc =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile.inc (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile.inc (nonexistent) @@ -1,4 +0,0 @@ -# $FreeBSD$ - -WEBBASE?= /data/cgi/GnatsPR -DOC_PREFIX?= ${.CURDIR}/../../../../.. Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile.inc ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Email.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Email.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Email.pm (nonexistent) @@ -1,189 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::Section::Email; - -use GnatsPR::Section::MIME; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: $header - Raw e-mail header. -# $body - Raw message body. -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my ($header, $body) = @_; - - my $self = { - headerblob => '', - bodyblob => '', - - headers => {}, - - mimeparts => [] - }; - - bless $self, $class; - - $self->{headerblob} = $header; - $self->{bodyblob} = $body; - - $self->ParseHeader() if ($header); - $self->ParseBody() if ($body); - - return $self; -} - - -#------------------------------------------------------------------------------ -# Func: ParseHeader() -# Desc: Parse header blob into fields. -# -# Args: n/a -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub ParseHeader -{ - my $self = shift; - - my $key; - - foreach my $line (split /\n/, $self->{headerblob}) { - if ($line =~ /^(\S+):\s*(.*)$/) { - my $val = $2; - $key = lc $1; - - # Ignore multiple defs (e.g. Received: headers) - exists $self->{headers}->{$key} - and next; - - $self->{headers}->{$key} = $val; - } elsif ($line =~ /^\s*(.*)$/) { - my $val = $1; - - defined $key - or next; - - # No field to append to - exists $self->{headers}->{$key} - or next; - - $self->{headers}->{$key} .= ' '.$val; - } - } -} - - -#------------------------------------------------------------------------------ -# Func: ParseBody() -# Desc: Parse body blob. -# -# Args: n/a -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub ParseBody -{ - # XXX: recurse to second-level parts - - my $self = shift; - - $self->{mimeparts} = []; - - # First of all - attempt to split into MIME parts - # Note that since GNATS nukes a bunch of the headers - # that we need, this is purely of a heuristic nature. - - # Technically less permissive than RFC1341 - - my $nextbound = qr/^--([A-Za-z0-9'()+_,-.\/:=?]{6,70})$/m; - my $first = 1; - - while ($self->{bodyblob} =~ s/$nextbound//m) { - my $last; - - if ($first) { - my $boundary = $1; - $nextbound = qr/^--\Q$boundary\E(--)?$/m; - $last = 0; - $first = 0; - } else { - $last = ($2 and $2 eq '--'); - } - - # Promote to MIME part - - push @{$self->{mimeparts}}, - new GnatsPR::Section::MIME( - substr($self->{bodyblob}, 0, $-[0], '') - ) - unless ($-[0] == 0); - } - - if (!@{$self->{mimeparts}}) { - # No parts - just plain text - push @{$self->{mimeparts}}, - new GnatsPR::Section::MIME($self->{bodyblob}); - } -} - - -#------------------------------------------------------------------------------ -# Func: Header() -# Desc: Return a header field. -# -# Args: $key - Header name, case insensitive. -# -# Retn: $val - Value. -#------------------------------------------------------------------------------ - -sub Header -{ - my $self = shift; - my ($key) = @_; - - return $self->{headers}->{lc $key}; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Email.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/StateChange.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/StateChange.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/StateChange.pm (nonexistent) @@ -1,117 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::Section::StateChange; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: n/a -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - - my $self = { - what => '', # State or Responsible - from => '', # Change from - to => '', # Change to - why => '', # Reason for change - when => '', # Date of change - by => '' # Who changed it - }; - - bless $self, $class; - - return $self; -} - - -#------------------------------------------------------------------------------ -# Accessors -#------------------------------------------------------------------------------ - -sub what -{ - my $self = shift; - $self->{what} = $_[0] if @_; - return $self->{what}; -} - -sub from -{ - my $self = shift; - $self->{from} = $_[0] if @_; - return $self->{from}; -} - -sub to -{ - my $self = shift; - $self->{to} = $_[0] if @_; - return $self->{to}; -} - -sub why -{ - my $self = shift; - - if (scalar @_) { - $self->{why} = $_[0]; - $self->{why} =~ s/^\s+//; - $self->{why} =~ s/[\n\s]+$//; - } - return $self->{why}; -} - -sub when -{ - my $self = shift; - $self->{when} = $_[0] if @_; - return $self->{when}; -} - -sub by -{ - my $self = shift; - $self->{by} = $_[0] if @_; - return $self->{by}; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/StateChange.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Patch.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Patch.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Patch.pm (nonexistent) @@ -1,188 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::Section::Patch; - -use MIME::Base64; # ports/converters/p5-MIME-Base64 -use Convert::UU qw(uudecode uuencode); # ports/converters/p5-Convert-UU - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: $text - Blob of text. -# $filename - Filename of patch, if we have one. -# $type - Patch type string (if known). -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my ($text, $filename, $type) = @_; - - my $self = { - text => '', - filename => 'patch.txt', - binary => 0, - encoded => 0, - type => 'unknown' - }; - - bless $self, $class; - - $self->{text} = $text; - - $self->{filename} = $filename if $filename; - $self->{type} = $type if $type; - - $self->{filename} =~ '(?:\.gz|\.bz2|\.zip|\.tar)$' - and $self->{binary} = 1; - - if ($self->{type} eq 'uuencoded') { - $self->{encoded} = 1; - $self->{decoded_text} = uudecode($self->{text}); - } elsif ($self->{type} eq 'base64') { - $self->{encoded} = 1; - $self->{decoded_text} = decode_base64($self->{text}); - } - - return $self; -} - - -#------------------------------------------------------------------------------ -# Func: string() -# Desc: Return string contained within. -# -# Args: n/a -# -# Retn: $string -#------------------------------------------------------------------------------ - -sub string -{ - my $self = shift; - - return $self->{text}; -} - - -#------------------------------------------------------------------------------ -# Func: size() -# Desc: Return the length of the contained data. -# -# Args: n/a -# -# Retn: $string -#------------------------------------------------------------------------------ - -sub size -{ - my $self = shift; - - return length($self->{encoded} ? $self->{decoded_text} : $self->{text}); -} - - -#------------------------------------------------------------------------------ -# Func: data() -# Desc: Return the raw decoded (if possible/necessary) data. -# -# Args: n/a -# -# Retn: $string -#------------------------------------------------------------------------------ - -sub data -{ - my $self = shift; - - return $self->{encoded} ? $self->{decoded_text} : $self->{text}; -} - - -#------------------------------------------------------------------------------ -# Func: filename() -# Desc: Return the patch's filename. -# -# Args: n/a -# -# Retn: $filename -#------------------------------------------------------------------------------ - -sub filename -{ - my $self = shift; - - return $self->{filename}; -} - - -#------------------------------------------------------------------------------ -# Func: type() -# Desc: Return the patch's type. -# -# Args: n/a -# -# Retn: $type -#------------------------------------------------------------------------------ - -sub type -{ - my $self = shift; - - return $self->{type}; -} - - -#------------------------------------------------------------------------------ -# Func: isbinary() -# Desc: Is patch binary? -# -# Args: n/a -# -# Retn: $type -#------------------------------------------------------------------------------ - -sub isbinary -{ - my $self = shift; - - return $self->{binary}; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Patch.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Text.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Text.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Text.pm (nonexistent) @@ -1,82 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::Section::Text; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: $text - Blob of text. -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my ($text) = @_; - - my $self = { - text => '' - }; - - bless $self, $class; - - $text =~ s/[\s\n]+$//s; # Tidy up trailing whitespace - - $self->{text} = $text; - - return $self; -} - - -#------------------------------------------------------------------------------ -# Func: string() -# Desc: Return string contained within. -# -# Args: n/a -# -# Retn: $string -#------------------------------------------------------------------------------ - -sub string -{ - my $self = shift; - - return $self->{text}; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Text.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/FieldStart.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/FieldStart.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/FieldStart.pm (nonexistent) @@ -1,80 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::Section::FieldStart; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: $name - Field name. -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my ($name) = @_; - - my $self = { - name => '' - }; - - bless $self, $class; - - $self->{name} = $name; - - return $self; -} - - -#------------------------------------------------------------------------------ -# Func: string() -# Desc: Return the field name. -# -# Args: n/a -# -# Retn: $string -#------------------------------------------------------------------------------ - -sub string -{ - my $self = shift; - - return $self->{name}; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/FieldStart.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/MIME.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/MIME.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/MIME.pm (nonexistent) @@ -1,334 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::Section::MIME; - -use MIME::Base64; # ports/converters/p5-MIME-Base64 -use MIME::QuotedPrint; # -use Convert::UU qw(uudecode uuencode); # ports/converters/p5-Convert-UU - -use Encode; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: $blob - Raw MIME part, inc. any headers. -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my ($blob) = @_; - - my $self = { - body => '', - decoded_body => '', - headers => {}, - binary => 0, - encoded => 0, - attachment => 0, - filename => '', - mimeparts => [] # Sub parts (usually empty) - }; - - bless $self, $class; - - $self->{body} = $blob; - - $self->Parse() if ($blob); - - return $self; -} - - -#------------------------------------------------------------------------------ -# Accessors -#------------------------------------------------------------------------------ - -sub body -{ - my $self = shift; - $self->{body} = $_[0] if @_; - return $self->{body}; -} - -sub isbinary -{ - my $self = shift; - return $self->{binary}; -} - -sub isencoded -{ - my $self = shift; - return $self->{encoded}; -} - -sub isattachment -{ - my $self = shift; - return $self->{attachment}; -} - -sub filename -{ - my $self = shift; - return $self->{filename}; -} - -sub data -{ - my $self = shift; - return $self->{encoded} ? $self->{decoded_body} : $self->{body}; -} - -sub size -{ - my $self = shift; - return length($self->{encoded} ? $self->{decoded_body} : $self->{body}); -} - - -#------------------------------------------------------------------------------ -# Func: Parse() -# Desc: Parse and decode raw MIME part. -# -# Args: n/a -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub Parse -{ - my $self = shift; - - my $charset; - - $self->{body} =~ s/^[\n\s]+//; - $self->{body} =~ s/[\n\s]+$/\n/; - - $self->ParseHeader(); - - # Determine if we're a multi-part container - if (lc $self->header('content-type') =~ /multipart/ - and $self->header('content-type:boundary')) { - my $bound = $self->header('content-type:boundary'); - @{$self->{mimeparts}} = - map { - new GnatsPR::Section::MIME($_); - } - grep !/^[\n\s]*$/, - split /^--\Q$bound\E(?:--)?$/m, $self->{body}; - $self->{body} = undef; - return; - } - - if ($self->header('content-type:charset')) { - my $cs = $self->header('content-type:charset'); - - if ($cs =~ /utf.*8/i) { - $cs = 'utf-8'; - } else { - $cs = Encode::resolve_alias($cs); - } - - if ($cs and $cs ne 'ascii') { - $charset = $cs; - } - } - - # Look for Quoted-Printable (explicit or using a silly heuristic) - if (lc $self->header('content-transfer-encoding') eq 'quoted-printable' - or $self->{body} =~ /=[0-9A-Fa-f]{2}=[0-9A-Fa-f]{2}/) { - $self->{body} = decode_qp($self->{body}); - $self->{body} = decode($charset, $self->{body}) - if ($charset); - - # Base64 -- probably better not to decode - } elsif (lc $self->header('content-transfer-encoding') eq 'base64') { - $self->{decoded_body} = decode_base64($self->{body}); - $self->{decoded_body} = decode($charset, $self->{decoded_body}) - if ($charset); - $self->{encoded} = 1; - } - - # Catches too much stuff that we can display - #if ($self->header('content-type') - # && $self->header('content-type') !~ 'text/') { - # $self->{binary} = 1; - #} - - if (lc $self->header('content-disposition') eq 'attachment') { - my $filename = - $self->header('content-disposition:filename') - || $self->header('content-type:name') - || $self->header('x-attachment-id') - || 'attachment'; - - $filename =~ '(?:\.gz|\.bz2|\.zip|\.tar)$' - and $self->{binary} = 1; - - $self->{attachment} = 1; - $self->{filename} = $filename; - } - - if ($self->{body} =~ /^begin \d\d\d (.*)/ && !$self->{encoded}) { - $self->{decoded_body} = uudecode($self->{body}); - $self->{encoded} = 1; - } -} - - -#------------------------------------------------------------------------------ -# Func: ParseHeader() -# Desc: Parse out any MIME header fields. -# -# Args: n/a -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub ParseHeader -{ - my $self = shift; - my $header = ''; - my $key; - - # Start with some defaults - $self->{headers}->{'content-type'} = 'text/plain'; - - # No header? - $self->{body} =~ /^Content-/i - or return; - - # Ensure we have an end-of-header marker. Returning here - # will result in some bodyless headers being dumped as - # text (example in conf/138672) -- but I think this is - # the safe option, in case such a header is in fact the - # body of a malformed message. - $self->{body} =~ /^$/m and $+[0] != length($self->{body}) or return; - - $header = substr($self->{body}, 0, $+[0]+1, ''); - - $self->{body} =~ s/^[\n\s]+//; - - foreach my $line (split /\n/, $header) { - if ($line =~ /^(\S+): (.*)$/) { - $key = lc $1; - $self->{headers}->{$key} = $2; - } elsif ($line =~ /^\s+(.*)$/) { - $key or next; - $self->{headers}->{$key} .= ' ' . $1; - } - } - - # Split up aggregate headers into individual values - - foreach my $key (keys %{$self->{headers}}) { - $self->{headers}->{$key} =~ /;/ or next; - - my @chars = split //, $self->{headers}->{$key}; - my $inquote = 0; - my $gotkey = 0; - my $k = ''; - my $v = ''; - - foreach my $char (@chars) { - if ($char eq '"') { - $inquote = !$inquote; - next; - } elsif ($char eq '=' && !$inquote) { - $gotkey = 1; - next; - } elsif ($char eq ';' && !$inquote) { - if ($k and $v) { - $k = lc $k; - $self->{headers}->{"$key:$k"} = $v; - } - $k = $v = ''; - $gotkey = 0; - next; - } elsif (($char eq ' ' or $char eq '\t') && !$inquote) { - next; - } - - if ($gotkey) { - $v .= $char; - } else { - $k .= $char; - } - } - - if ($k and $v) { - $k = lc $k; - $self->{headers}->{"$key:$k"} = $v; - } - - $self->{headers}->{$key} =~ s/;.*$//; - } - - # Normalise - - $self->{headers}->{'content-type'} = - lc $self->{headers}->{'content-type'}; -} - - -#------------------------------------------------------------------------------ -# Func: header() -# Desc: Return header. -# -# Args: $key -# -# Retn: $val -#------------------------------------------------------------------------------ - -sub header -{ - my $self = shift; - my ($key) = @_; - - $key = lc $key; - - return $self->{headers}->{$key} - if (exists $self->{headers}->{$key}); - - return ''; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/MIME.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Makefile =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Makefile (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Makefile (nonexistent) @@ -1,12 +0,0 @@ -# $FreeBSD$ - -.if exists(../Makefile.conf) -.include "../Makefile.conf" -.endif -.if exists(../Makefile.inc) -.include "../Makefile.inc" -.endif - -DATA= Email.pm FieldStart.pm MIME.pm Patch.pm StateChange.pm Text.pm - -.include "${DOC_PREFIX}/share/mk/web.site.mk" Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Section/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/SectionIterator.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/SectionIterator.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/SectionIterator.pm (nonexistent) @@ -1,114 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR::SectionIterator; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor. -# -# Args: $gnatspr - GnatsPR instance. -# @fields - Which fields we want sections from. The order determines -# the order of the returned sections. Undefined behaviour if -# no no fields specified. -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my $gnatspr = shift; - - my $self = { - gnatspr => $gnatspr, - currfield => -1, - currsection => -1, - wantfields => [] - }; - - bless $self, $class; - - while (my $f = shift) { - push @{$self->{wantfields}}, $f; - } - - return $self; -} - - -#------------------------------------------------------------------------------ -# Func: next() -# Desc: Return next iterator element. -# -# Args: n/a -# -# Retn: $next -#------------------------------------------------------------------------------ - -sub next -{ - my $self = shift; - my ($fieldkey, $maxsection); - - # Next section - $self->{currsection}++; - - # First field? - $self->{currfield} == -1 - and $self->{currfield} = 0; - - $fieldkey = $self->{wantfields}->[$self->{currfield}]; - $maxsection = $#{$self->{gnatspr}->{sections}->{$fieldkey}}; - - # We've passed the last section in this field - while ($self->{currsection} > $maxsection) { - # Next field, first section - $self->{currfield}++; - $self->{currsection} = 0; - - # Run out of fields? - $self->{currfield} > $#{$self->{wantfields}} - and return undef; - - # Update, and go back to check next field - $fieldkey = $self->{wantfields}->[$self->{currfield}]; - $maxsection = $#{$self->{gnatspr}->{sections}->{$fieldkey}}; - } - - return $self->{gnatspr}->{sections}->{$fieldkey}->[$self->{currsection}]; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/SectionIterator.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile (nonexistent) @@ -1,14 +0,0 @@ -# $FreeBSD$ - -.if exists(../Makefile.conf) -.include "../Makefile.conf" -.endif -.if exists(../Makefile.inc) -.include "../Makefile.inc" -.endif - -SUBDIR= Section - -DATA= MIMEIterator.pm Section.pm SectionIterator.pm - -.include "${DOC_PREFIX}/share/mk/web.site.mk" Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/search.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/search.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/search.cgi (nonexistent) @@ -1,267 +0,0 @@ -#!/usr/bin/perl -T -# -# mail-archive.pl -- a CGI interface to a wais indexed maling list archive. -# -# Origin: -# Tony Sanders , Nov 1993 -# -# Hacked beyond recognition by: -# John Fieber , Nov 1994 -# -# Format the mail messages a little nicer. -# Add code to check database status before searching. -# John Fieber , Aug 1996 -# -# Disclaimer: -# This is pretty ugly in places. -# -# $FreeBSD$ - - -$server_root = '/usr/local/www'; -$waisq = "/usr/local/www/bin/waisq"; -$sourcepath = "$server_root/db/index"; -$hints = "/search/searchhints.html"; -$searchpage = '/search/search.html'; -$myurl = $ENV{'SCRIPT_NAME'}; -$ENV{PATH} = "/bin:/usr/bin:/usr/local/bin"; - -use IPC::Open2 'open2'; -require "./cgi-lib.pl"; -require "./cgi-style.pl"; - -@months = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); - -sub escape($) { $_ = $_[0]; s/&/&/g; s//>/g; $_; } - -sub do_wais { - &ReadParse; - - @FORM_words = map { s|"||g; $_ } split(/ /, escape($in{"words"})); - @FORM_source = split(/\0/, escape($in{"source"})); - ($FORM_max) = $in{"max"} =~ m|^(\d+)$|; - $FORM_docnum = $in{"docnum"}; - $FORM_index = $in{"index"}; - - if ($FORM_index =~ /^re[sc]ent$/) { - $sourcepath = "$server_root/db/index-recent"; - } - - if ($#FORM_words < 0) { - print &html_header("Mail Archive Search") . - "

No search term given."; - print "

\nPlease return to the " . - "search page and fill out the 'Search for' field!\n"; - print &html_footer; - exit 0; - } - - @AVAIL_source = &checksource(@FORM_source); - if ($#FORM_source != $#AVAIL_source) { - $j = 0; - $k = 0; - foreach $i (0 .. $#FORM_source) { - if ($FORM_source[$i] ne $AVAIL_source[$j]) { - $badsource[$k] = $FORM_source[$i]; - $k++; - } else { - $j++; - } - } - $badsource = join(", ", @badsource); - $badsource =~ s/,([^,]*)$/ and $1/; - if ($#FORM_source - $#AVAIL_source > 1) { - $availmsg = "

[The $badsource archives are currently unavailable.]

"; - } else { - $availmsg = "

[The $badsource archive is currently unavailable.]

"; - } - } - if ($#AVAIL_source < 0) { - $i = join("
, ", @FORM_source); - $i =~ s/,([^,]*)$/ and $1/; - print &html_header("Mail Archive Search") . - "

None of the archives you requested ($i) are " . - " available at this time.

\n"; - print "

Please try again later, or return to the " . - "search page and select a different archive.

\n"; - print &html_footer; - exit 0; - } - - # Now we formulate the question to ask the server - foreach $i (@AVAIL_source) { - $w_sources .= "(:source-id\n :filename \"$i.src\"\n ) "; - } - $w_question = "\n (:question - :version 2 - :seed-words \"@FORM_words\" - :relevant-documents - ( ) - :sourcepath \"$sourcepath/:\" - :sources - ( $w_sources ) - :maximum-results $FORM_max - :result-documents - ( ) - )\n"; - - - # - # First case, no document number so this is a regular search - # - print &html_header("Search Results"); - print $availmsg; - if ($#AVAIL_source > 0) { - $src = join("
, ", @AVAIL_source); - $src =~ s/,([^,]*)$/ and $1/; - print "

The archives $src contain "; - } - else { - print "The archive @AVAIL_source contains "; - } - print " the following items relevant to \`@FORM_words\':\n"; - print "

    \n"; - - &open2(WAISOUT, WAISIN, $waisq, "-g"); - print WAISIN $w_question; - - local(@mylist) = (); - local($hits, $score, $headline, $lines, $bytes, $docid, $date, $file); - - while () { - /:original-local-id.*#\(\s+([^\)]*)/ && - ($docid = pack("C*", split(/\s+/, $1)), - $docid =~ s/\s+/+/g); - /:score\s+(\d+)/ && ($score = $1); - /:filename "(.*)"/ && ($file = $1); - /:number-of-lines\s+(\d+)/ && ($lines = $1); - /:number-of-bytes\s+(\d+)/ && ($bytes = $1); - /:headline "(.*)"/ && ($headline = $1, - $headline =~ s/[Rr]e://); # XXX - /:date "(\d+)"/ && $docid !~ /\.src$/ && ($date = $1, $hits++, - push(@mylist, join("\t", $date, $headline, $docid, - $bytes, $lines, $file, $score, $hits))); - } - - if ($in{'sort'} eq "date") { - foreach (reverse sort {$a <=> $b} @mylist) { - ($date, $headline, $docid, $bytes, $lines, - $file, $score, $hits) = split("\t"); - &docdone; - } - } elsif ($in{'sort'} eq "subject") { - local(@a, @c, $b, $d); - foreach (@mylist) { - @a = split("\t"); - $b = $a[0]; - # swap date and subject - if ($a[1] =~ /(^[^:]+)(Re:.*)/) { - $a[0] = "$2\t$1"; - } else { - $a[0] = "$a[1]\t."; - } - $a[1] = $b; - push(@c, join("\t", @a)); - } - local($subject, $author); - foreach (sort {$a cmp $b} @c) { - ($subject, $author, $date, $docid, $bytes, - $lines, $file, $score, $hits) = split("\t"); - $headline = $author . $subject; - &docdone; - } - - } elsif ($in{'sort'} eq "author") { - local(@a, @c, $b); - foreach (@mylist) { - @a = split("\t"); - # swap date and subject - $b = $a[0]; $a[0] = $a[1]; $a[1] = $b; - push(@c, join("\t", @a)); - } - foreach (sort {$a cmp $b} @c) { - ($headline, $date, $docid, $bytes, - $lines, $file, $score, $hits) = split("\t"); - &docdone; - } - - } else { - foreach (@mylist) { - ($date, $headline, $docid, $bytes, - $lines, $file, $score, $hits) = split("\t"); - &docdone; - } - } - #print qq[in: $in{'sort'}\n]; - - print "
\n"; - - print "

Didn't get what you expected? "; - print "Look here for searching hints.

"; - - print qq{

Return to the search page

\n}; - - if ($hits == 0) { - print "Nothing found.\n"; - } - - print &html_footer; - close(WAISOUT); - close(WAISIN); - -} - -# Given an array of sources (sans .src extension), this routine -# checks to see if they actually exist, and if they do, if they -# are currently available (ie, not being updated). It returns -# an array of sources that are actually available. - -sub checksource { - local (@sources) = @_; - - $j = 0; - foreach $i (@sources) { - ($i) = $i =~ m|^([-a-z0-9]*)|; - if (stat("$sourcepath/$i.src")) { - if (!stat("$sourcepath/$i.update.lock")) { - $goodsources[$j] = $i; - $j++; - } - } - } - return(@goodsources); -} - -sub docdone { - $file =~ s/\.src$//; - if ($headline =~ /Search produced no result/) { - print "

The archive $file contains no relevant documents.

" - } else { - $headline = escape($headline); - $headline =~ s/\\"/\"/g; - if ($file eq "www" || $file =~ /^www-[a-z][a-z]$/ || $file eq 'pkgdescr' || $file eq "manpages") { - print "
  • $headline\n"; - } else { - print "
  • $headline\n"; - } - print "
    "; -# print ""; - print "Score: $score; "; - $_ = $date; - /^(..?)(..)(..)$/ && ($yr = $1 + ($1 > 69 ? 1900 : 2000), $mo = $months[$2 - 1], $dy = $3); - print "Lines: $lines; "; - print "${dy}-${mo}-${yr}; "; - print "Archive: $file"; - print "

  • \n"; - } - $score = $headline = $lines = $bytes = $docid = $date = $file = ''; - $yr = $mo = $dy = ''; -} - -$| = 1; -open (STDERR,"> /dev/null"); -#open (STDERR,">> /tmp/search"); -eval '&do_wais'; -if ($@) { - warn "eval failed: $@"; -} Property changes on: head/en_US.ISO8859-1/htdocs/cgi/search.cgi ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/confirm-code.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/confirm-code.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/confirm-code.cgi (nonexistent) @@ -1,117 +0,0 @@ -#!/usr/bin/perl -T -# -# $FreeBSD$ -# -# Copyright (c) 2003 Eric Anderson -# Copyright (c) 2005 Ceri Davies - -use DB_File; -use Fcntl qw(:DEFAULT :flock); -use POSIX qw(strftime); -use strict; - -require './cgi-lib.pl'; - -$ENV{"PATH"} = "/bin:/usr/bin"; -$ENV{"TMPDIR"} = "/tmp"; - -my($fd, $db_obj, %db_hash, $currenttime, $randomcode, $pngbindata, $randompick, $pnmlist, $i); -my(%db, $expiretime, $rfc1123_expiry, $pnmcat, $pnmtopng, $pnmdatadir, $dbpath, $FORM_db); -# %in cannot be declared with 'my', or ReadParse fails. -use vars qw/ %in /; - -############################################ -# generate 8 character code from A-Z0-9 (no I,O,0,1 for clarity) -my @availchars = qw(A B C D E F G H J K L M N P Q R S T U V W X Y Z - 2 3 4 5 6 7 8 9); - -$pnmcat = "/usr/local/bin/pnmcat"; -$pnmtopng = "/usr/local/bin/pnmtopng"; -$pnmdatadir = "../gifs/"; -$expiretime = 0; # Default for the Expires: header -############################################ - -# The code databases that we know about. If a query comes in for -# anything else, we return a zero byte "image" (rather than an image -# with a rude word in, which was tempting). - -%db = ( -# The querypr one is not used, but stands as an example. -# querypr => { -# path => '/usr/local/www/var/confirm-code/querypr-code.db', -# lifespan => 2700, -# }, - sendpr => { - path => '/usr/local/www/var/confirm-code/sendpr-code.db', - lifespan => 2700, - }, -); - -&ReadParse(*in); -$FORM_db = $in{"db"}; $FORM_db ||= "junk"; - -$currenttime = time(); -$rfc1123_expiry = strftime "%a, %b %d %H:%M:%S %Y %Z", - gmtime($currenttime + $expiretime); - -if (exists($db{$FORM_db})) { - $dbpath = $db{$FORM_db}->{'path'}; - $expiretime = $db{$FORM_db}->{'lifespan'}; - - # DB stuff here - $db_obj = tie(%db_hash, 'DB_File', $dbpath, O_CREAT|O_RDWR, 0644) - or die "dbcreate $dbpath $!"; - $fd = $db_obj->fd; - open(DB_FH, "+<&=$fd") or die "fdopen $!"; - - unless (flock (DB_FH, LOCK_EX | LOCK_NB)) { - unless (flock (DB_FH, LOCK_EX)) { die "flock: $!" } - } - - &gencode; - - while ($db_hash{$randomcode}) { - # it already exists so: - # we check age (over x seconds old?) - # if it is, override with new date - # if not, generate a new code - if ( ($currenttime - $expiretime) <= $db_hash{$randomcode}) { - &gencode; - } else { - delete $db_hash{"$randomcode"}; - } - } - - $db_hash{$randomcode} = $currenttime; - - $db_obj->sync(); # to flush - flock(DB_FH, LOCK_UN); - undef $db_obj; # removing the last reference to the DB - # closes it. Closing DB_FH is implicit. - untie %db_hash; - - $/ = ""; - - open(BUILDPNG, "$pnmcat -lr $pnmlist | $pnmtopng 2>/dev/null |"); - $pngbindata = ; - close(BUILDPNG); -} else { - $pngbindata = undef; -}; - -print "Pragma: no-cache\n"; -print "Expires: $rfc1123_expiry\n"; -print "Content-type: image/png\n\n"; -print "$pngbindata"; - -############################################ -sub gencode { - srand( time() ^ ($$ + ($$ << 15)) ); - - for ($i = 0; $i < 8; $i++) { - $randompick = $availchars[int(rand(@availchars))]; - $randomcode .= "$randompick"; - $pnmlist .= "$pnmdatadir$randompick\.pnm "; - } -} - Property changes on: head/en_US.ISO8859-1/htdocs/cgi/confirm-code.cgi ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR.pm =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/GnatsPR.pm (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/GnatsPR.pm (nonexistent) @@ -1,641 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# Copyright (C) 2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -#------------------------------------------------------------------------------ - -package GnatsPR; - -#use MIME::Base64; # ports/converters/p5-MIME-Base64 -#use MIME::QuotedPrint; # -#use Convert::UU qw(uudecode uuencode); # ports/converters/p5-Convert-UU - -use GnatsPR::Section::Text; -use GnatsPR::Section::Patch; -use GnatsPR::Section::Email; -use GnatsPR::Section::StateChange; -use GnatsPR::Section::FieldStart; - -use GnatsPR::SectionIterator; - -use strict; - -require 5.006; - - -#------------------------------------------------------------------------------ -# Constants -#------------------------------------------------------------------------------ - -use constant ENCODING_BASE64 => 1; -use constant ENCODING_QP => 2; - -use constant PATCH_ANY => 0x0001; -use constant PATCH_DIFF => 0x0002; -use constant PATCH_UUENC => 0x0004; -use constant PATCH_UUENC_BIN => 0x0008; -use constant PATCH_SHAR => 0x0010; -use constant PATCH_BASE64 => 0x0020; - - -#------------------------------------------------------------------------------ -# Func: new() -# Desc: Constructor - Parses data if provided. -# -# Args: [data] - Raw data (or ref. to) from query-pr (optional) -# -# Retn: $self -#------------------------------------------------------------------------------ - -sub new -{ - my $class = shift; - my ($data) = @_; - - my $self = { - blobs_single => {}, # Raw text, single-line fields - blobs_multi => {}, # Raw text, multi-line fields - header => {}, # E-mail header bits - sections => {}, # Hash of arrayrefs of sections - fromwebform => 0, # PR came from the web form? - numfields => 0 # Number of fields we have - }; - - bless $self, $class; - - if (defined $data) { - ref $data - ? $self->Parse($data) - : $self->Parse(\$data); - } - - return $self; -} - - -#------------------------------------------------------------------------------ -# Func: Header() -# Desc: Return a value from the header hash. -# -# Args: $key - Header name, case insensitive. -# -# Retn: $val - Value. -#------------------------------------------------------------------------------ - -sub Header -{ - my $self = shift; - my ($key) = @_; - - return $self->{header}->{lc $key}; -} - - -#------------------------------------------------------------------------------ -# Func: FieldSingle() -# Desc: Return a single line field value. -# -# Args: $key - Field name. -# -# Retn: $val - Value. -#------------------------------------------------------------------------------ - -sub FieldSingle -{ - my $self = shift; - my ($key) = @_; - - return $self->{blobs_single}->{$key}; -} - - -#------------------------------------------------------------------------------ -# Func: Parse() -# Desc: Parse a blob of text from query-pr into a structured unit for easy -# manipulation. -# -# Args: \$data - Raw data from query-pr (non-ref scalar is acceptable too). -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub Parse -{ - my $self = shift; - my ($data) = @_; - - my $ismulti = 0; - my $pastheader = 0; - - # GNATS ensures that > isn't allowed as the first - # character on a line, except for field headers. - # Any lines beginning with > will be shunted into - # 'Unformatted' - my @fieldblobs = split /\n>(?!\s)/m, $$data; - - # In the rare case the Unformatted field did - # have some debris, be sure to assemble it back - # into a complete section. - while ($fieldblobs[$#fieldblobs] !~ /^Unformatted:/) { - my $last = pop @fieldblobs; - exists $fieldblobs[$#fieldblobs] or last; - $fieldblobs[$#fieldblobs] .= $last; - } - - foreach my $blob (@fieldblobs) { - my $key; - - # Parse e-mail header; we only care about a few - # fields, not the e-mail routing stuff. - if (!$pastheader) { - foreach my $line (split /\n/, $blob) { - if ($line =~ /^(\S+):\s*(.*)$/) { - my $val = $2; - $key = lc $1; - - # Ignore multiple defs (e.g. Received: headers) - exists $self->{header}->{$key} - and next; - - $self->{header}->{$key} = $val; - } elsif ($line =~ /^\s+(.*)$/) { - my $val = $1; - - defined $key - or next; - - # No field to append to - exists $self->{header}->{$key} - or next; - - $self->{header}->{$key} .= "\n$val"; - } - } - - $pastheader = 1; - next; - } - - if ($blob =~ s/^([^:]+):(\n|\s*)//) { - $key = $1; - #$ismulti = ($2 and $2 eq "\n"); - - # It's multi-liners from here on in - $key eq 'Organization' - and $ismulti = 1; - } else { - # Hmm... - next; - } - - # Remove leading/trailing whitespace - $blob =~ s/^[\n\s]+//; - $blob =~ s/[\n\s]+$//; - - if ($ismulti) { - $self->{blobs_multi}->{$key} = $blob; - } else { - $self->{blobs_single}->{$key} = $blob; - } - } - - $self->{numfields} = scalar @fieldblobs; - - $self->{fromwebform} = - $self->{header}->{'x-send-pr-version'} =~ /^www-/; - - $self->ParseBlobs(); -} - - -#------------------------------------------------------------------------------ -# Func: ParseBlobs() -# Desc: Parse all the raw field "blobs" into section objects. -# -# Args: n/a -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub ParseBlobs -{ - my $self = shift; - - foreach my $field (keys %{$self->{blobs_multi}}) { - $self->{sections}->{$field} = []; - - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::FieldStart($field); - - if ($field eq 'Fix') { - $self->ParsePatches($field, \($self->{blobs_multi}->{$field})); - next; - } - - if ($field eq 'Audit-Trail') { - # We'll break up the Audit-Trail field by change events. - # This is the most reliable way to split, although it's far - # from perfect. We'll then look for e-mail responses inside - # each chunk for further splitting later. - # - # Notes/Caveats: - # - If someone happened to paste an audit trail event - # inside another's "Why" field, it'd break this. I haven't - # seen this yet and don't expect to. - # - The From-To field has to come first. No reason it wouldn't - # under normal circumstances. - # - Pasted e-mails in the Why field will be promoted to - # responses, although they often break the GNATS conventions - # we (ab)use to find e-mails (e.g.: leading space on message - # body lines), which makes this more difficult. - my @auditevents = - split /(?=^(?:[A-Za-z_]+)-Changed-From-To: (?:.*?)\s*$)/m, - $self->{blobs_multi}->{$field}; - - foreach my $evt (@auditevents) { - my $sect = new GnatsPR::Section::StateChange; - my $gotwhat = 0; - my $gotsect = 0; - while ($evt =~ s/^([A-Za-z_]+)-Changed-([A-Za-z_-]+?): (.*?)\s*\n//) { - my ($what, $key, $val) = ($1, $2, $3); - - if (!$gotwhat) { - $sect->what($what); - $gotwhat = 1; - } - - $gotsect = 1; - - if ($key eq 'From-To') { - my $fromto = $val; - if ($fromto =~ /^(.*)->(.*)$/) { - $sect->from($1); - $sect->to($2); - } - } elsif ($key eq 'When') { - $sect->when($val); - } elsif ($key eq 'By') { - $sect->by($val); - } elsif ($key eq 'Why') { - # This is the last one; it's a multi-line - # field (remainder of the text.) - last; - } - } - - push @{$self->{sections}->{$field}}, $sect - if ($gotsect); - - # Now look for blocks that appear to be e-mail replies - # Note: these header fields are the only ones we allow - # as the first header; we could feasibly back- - # track to find the start of the block (in case - # we're not there already), but the more headers - # we accept the more likely this will break on - # some unexpected content. - my $next_email = qr/^(From|To|Cc|Subject|Date): (.*)$/m; - my $gotwhy = 0; - - while ($evt =~ /$next_email/) { - my $match_start = $-[0]; - my ($header, $body, $indented); - my $why; - - $match_start > 0 - and $why = substr($evt, 0, $match_start, ''); - - if ($gotsect) { - # We now know where "Why" terminates - $sect->why($why) if $sect; - } elsif ($why) { - # If the first block was a date block, - # we need to use a text section for the - # intermediate text instead. - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Text($why) - unless ($why =~ /^[\n\s]+$/); - } - - $gotwhy = 1; - $sect = undef; - - # Chop leading blank lines - $evt =~ s/^\n+//; - - if ($evt =~ /^$/m) { - # First blank line signals the end of the - # e-mail header - $header = substr($evt, 0, $+[0]+1, ''); - - # Deciding where the body ends is more - # difficult... - - # First, let's see if the message is - # indented (per GNATS standards) - $indented = ($evt =~ /^ /); - - # If, so, find the next blank line, which - # signals the body end. - if ($indented) { - if ($evt =~ /^$/m) { - $body = substr($evt, 0, $-[0], ''); - } else { - $body = $evt; - } - $body =~ s/^ //mg; # Remove indent char - } else { - # Look for another e-mail block - if ($evt =~ /$next_email/) { - $body = substr($evt, 0, $-[0], ''); - } else { - # Otherwise, use the whole section - $body = $evt; - } - } - - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Email($header, $body); - } else { - # No end-of-header marker: no choice but to - # dump the (possible) e-mail into the Why field - - if ($gotsect && $sect) { - $sect->why($evt); - } elsif ($evt) { - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Text($evt); - } - } - } - - # Check for dangling "Why" block - if (!$gotwhy) { - if ($gotsect && $sect) { - $sect->why($evt); - } elsif ($evt) { - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Text($evt); - } - } - } - - next; - } - - # Everything else is just text - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Text($self->{blobs_multi}->{$field}); - } -} - - -#------------------------------------------------------------------------------ -# Func: ParsePatches() -# Desc: Parse the patches out of the given blob of text, emitting Patch and -# Text sections as appropriate. -# -# Args: $field - Field to push new sections to. -# \$text - Raw text -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub ParsePatches -{ - my $self = shift; - my ($field, $text) = @_; - - while (my $pi = $self->FindPatchStart($text)) { - # Everything up to this fragment can be - # promoted to a text section - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Text(substr( - $$text, - 0, - $pi->{start}, - '' - )) - unless $pi->{start} == 0; - - $pi->{start} = 0; - - $self->FindPatchEnd($text, $pi); - - # Try to determine if a web/send-pr attachment - # has another type of patch inside. - if ($pi->{type} eq 'stdattach' or $pi->{type} eq 'webattach') { - if (my $pi2 = $self->FindPatchStart($text)) { - # Upgrade to more specific type - $pi->{type} = $pi2->{type} - if ($pi2->{start} == 0); - } - } - - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Patch(substr( - $$text, - 0, - $pi->{size}, - '' - ), $pi->{name}, $pi->{type}); - - $$text =~ s/^[\n\s]+//; - } - - # Rest of the field is text - push @{$self->{sections}->{$field}}, - new GnatsPR::Section::Text($$text) - if ($$text); - - $text = ''; -} - - -#------------------------------------------------------------------------------ -# Func: FindPatchStart() -# Desc: Find the beginning of the first patch inside the given text blob, -# if there is one. -# -# Args: \$text - Raw text -# -# Retn: \%pi - Hash of patch info (or undef): -# - start - Start offset of patch -# - type - Type of attachment found -# - name - Filename, if available -#------------------------------------------------------------------------------ - -sub FindPatchStart -{ - my $self = shift; - my ($text) = @_; - - # Patch from web CGI script. Characteristics: - # - Only ever one of them. - # - Appended to the end of Fix: - # - Blank line after header line - # - Could contain other types of patch (e.g. shar(1) archive) - if ($$text =~ /^Patch attached with submission follows:$/m && $self->{fromwebform}) { - my $start = $+[0]; # The newline on the above - - # Next non-blank line (i.e. start of patch) - if ($$text =~ /\G^./m) { - $start += $+[0]+1; - return {start => $start, type => 'webattach'}; - } - - return undef; - } - - # Patch from send-pr(1). Characteristics: - # - Has header and footer line. - # - Appended to the end of Fix: - # - User has an opportunity to edit/mangle. - # - Could contain other types of patch (e.g. shar(1) archive) - if ($$text =~ /^---{1,8}\s?([A-Za-z0-9-_.,:%]+) (begins|starts) here\s?---+\n/mi) { - my $r = {start => $-[0], type => 'stdattach', name => $1}; - - # Chop header line - substr($$text, $-[0], $+[0] - $-[0], ''); - - return $r; - } - - # Patch files from diff(1). Characteristics: - # - Easy to find start. - # - Difficult to find the end. - $$text =~ /^((?:(?:---|\*\*\*)\ (?:\S+)\s*(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\ .*) - |(?:(?:---|\*\*\*)\ (?:\S+)\s*(?:\d\d\d\d-\d\d-\d\d\ \d\d:\d\d:\d\d\.\d+)\ .*) - |(diff\ -.*?\ .*?\ .*)|(Index:\ \S+) - |(\*{3}\ \d+,\d+\ \*{4}))$/mx - and return {start => $-[0], type => 'diff'}; - - # Shell archive from shar(1) - $$text =~ /^# This is a shell archive\. Save it in a file, remove anything before/m - and return {start => $-[0], type => 'shar'}; - - # UUencoded file. Characteristics: - # - Has header and footer. - $$text =~ /^begin \d\d\d (.*)/m - and return {start => $-[0], type => 'uuencoded', name => $1}; - - # Base64 encoded file. Characteristics: - # - Has header and footer. - $$text =~ /^begin-base64 \d\d\d (.*)/m - and return {start => $-[0], type => 'base64', name => $1}; - - return undef; -} - - -#------------------------------------------------------------------------------ -# Func: FindPatchEnd() -# Desc: Find the end of the first patch inside the given text blob, if any. -# -# Args: \$text - Raw text -# \%pi - Patch info hash from FindPatchStart(). We'll add more data: -# - size - Length of the patch. -# -# Retn: \%pi - Same as above, except undef will be returned if no actual -# endpoint was found (size in pi would extend to the end of the -# text blob in this case.) -#------------------------------------------------------------------------------ - -sub FindPatchEnd -{ - my $self = shift; - my ($text, $pi) = @_; - - $pi->{size} = 0; - - if ($pi->{type} eq 'webattach') { - $$text =~ /$/ - and $pi->{size} = $+[0]; - } elsif ($pi->{type} eq 'stdattach') { - $$text =~ /^---{1,8}\s?\Q$pi->{name}\E ends here\s?---+/mi - and $pi->{size} = $-[0]-1; - # Chop footer line - substr($$text, $-[0], $+[0] - $-[0], ''); - } elsif ($pi->{type} eq 'diff') { - # XXX: could do better - $$text =~ /^$/m - and $pi->{size} = $-[0]-1; - } elsif ($pi->{type} eq 'shar') { - $$text =~ /^exit$/m - and $pi->{size} = $+[0]; - } elsif ($pi->{type} eq 'uuencoded') { - $$text =~ /^end$/m - and $pi->{size} = $+[0]; - } elsif ($pi->{type} eq 'base64') { - $$text =~ /^====$/m - and $pi->{size} = $+[0]; - } - - if ($pi->{size} == 0) { - $pi->{size} = length $$text; - return undef; - } - - return $pi; -} - - -#------------------------------------------------------------------------------ -# Func: GetAttachment() -# Desc: Recursively search sections for a downloadable attachment. -# -# Args: $num - Attachment index (counts from 1) -# -# Retn: $sec - Attachment section (or undef) -#------------------------------------------------------------------------------ - -sub GetAttachment -{ - my $self = shift; - my ($num) = @_; - my $cur = 1; - - my $iter = GnatsPR::SectionIterator->new($self, 'Fix', 'Audit-Trail'); - - while (my $item = $iter->next()) { - if (ref $item eq 'GnatsPR::Section::Patch') { - # Patch sections - return $item if ($cur++ == $num); - } elsif (ref $item eq 'GnatsPR::Section::Email') { - # Attachments from MIME messages - my $mime_iter = GnatsPR::MIMEIterator->new($item); - while (my $part = $mime_iter->next()) { - if ($part->isattachment) { - return $part if ($cur++ == $num); - } - } - } - } - - return undef; -} - - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/GnatsPR.pm ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/query-pr.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/query-pr.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/query-pr.cgi (nonexistent) @@ -1,858 +0,0 @@ -#!/usr/bin/perl -Tw -#------------------------------------------------------------------------------ -# GNATS query-pr Interface, Generation III -# -# Copyright (C) 2006-2011, Shaun Amott -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ -# -# Useful PRs for testing: -# -# - ports/147261 - RFC 2047 words, attachments, interjected e-mail (inc. -# malformed header) -# - ports/138672 - Lots of attachments, multi-level MIME. -# - ports/132344 - Base64-encoded attachment. -#------------------------------------------------------------------------------ - -BEGIN { push @INC, '.'; } - -use CGI; - -use GnatsPR; -use GnatsPR::SectionIterator; -use GnatsPR::MIMEIterator; - -#use MIME::EncWords (decode_mimewords); # mail/p5-MIME-EncWords -sub decode_mimewords { wantarray ? @_ : join ' ', @_; } # Temp. substitute for the above - -require './cgi-style.pl'; -require './query-pr-lib.pl'; - -use strict; - - -#------------------------------------------------------------------------------ -# Constants -#------------------------------------------------------------------------------ - -use constant EXIT_NOPRS => 1; -use constant EXIT_DBBUSY => 2; -use constant EXIT_NOPATCH => 3; - - -#------------------------------------------------------------------------------ -# Globals -#------------------------------------------------------------------------------ - -our $valid_category = '[a-z0-9][A-Za-z0-9-_]{1,25}'; -our $valid_pr = '\d{1,8}'; - -our $stylesheet = "$main::hsty_base/layout/css/query-pr.css"; - -our $iscgi = defined $ENV{'SCRIPT_NAME'}; - -# Keep this ahead of CGI - -if (!$iscgi && !exists $ENV{'REQUEST_METHOD'}) { - # Makes debugging easier - $ENV{'REQUEST_METHOD'} = 'GET'; -} - -# Stuff from cgi-style.pl - -$main::hsty_base ||= ''; -$main::t_style ||= ''; -$main::hsty_charset ||= ''; - -$main::hsty_charset = 'utf-8'; - -$main::t_style = -qq{ - -}; - -# Global CGI accessor - -our $q = new CGI; - - -#------------------------------------------------------------------------------ -# Environment vars -#------------------------------------------------------------------------------ - -$ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin'; - -$ENV{'SCRIPT_NAME'} ||= $0; - - -#------------------------------------------------------------------------------ -# Begin Code -#------------------------------------------------------------------------------ - -main(); - - -#------------------------------------------------------------------------------ -# Main routine -#------------------------------------------------------------------------------ - -sub main -{ - my ($PR, $category, $rawdata, $gnatspr); - - binmode STDOUT, ':utf8'; - - if ($q->param('pr')) { - $PR = $q->param('pr'); - } elsif ($q->param('q')) { - $PR = $q->param('q'); - } elsif ($q->param('prp')) { - # Legacy param format - my $prp = $q->param('prp'); - - if ($prp =~ /^(\d+)-(\d+)/) { - my $get = $2; - $PR = $1; - - $q->param(-name => 'pr', -value => $PR); - $q->param(-name => 'getpatch', -value => $get); - } else { - ErrorExit(); - } - } else { - ErrorExit(EXIT_NOPRS); - } - - if ($PR =~ /^($valid_category)\/($valid_pr)$/) { - $category = $1; - $PR = $2; - } - - length $PR > 0 - or ErrorExit(); - - # category may be undef - $rawdata = DoQueryPR($PR, $category); - - # Dump the raw PR data if requested - if ($q->param('f') && $q->param('f') eq 'raw') { - print "Content-type: text/plain; charset=UTF-8\r\n\r\n"; - print $$rawdata; - Exit(); - } - - # Run PR text through the parser - $gnatspr = GnatsPR->new($rawdata); - - # User is requesting a patch extraction? - if ($q->param('getpatch')) { - my ($patch, $patchnum); - - $patchnum = $q->param('getpatch'); - $patchnum =~ s/[^0-9]+//g; - - $patch = $gnatspr->GetAttachment($patchnum); - - defined $patch - or ErrorExit(EXIT_NOPATCH); - - printf 'Content-type: %s; charset=UTF-8'."\r\n", - ($patch->isbinary ? 'application/octet-stream' : 'text/plain'); - - printf 'Content-Length: %s'."\r\n" - . 'Content-Disposition: inline; filename="%s"'."\r\n\r\n", - $patch->size, - $patch->filename; - - print $patch->data; - print "\n"; - - Exit(); - } - - # Otherwise, output PR - - PrintPR($gnatspr); - - Exit(); -} - - -#------------------------------------------------------------------------------ -# Func: DoQueryPR() -# Desc: Invoke the query-pr binary and return the results as a blob of text. -# Exits gracefully on failure. -# -# Args: $PR - PR number -# $cat - PR category (optional) -# -# Retn: \$data - Ref. to raw data. -#------------------------------------------------------------------------------ - -sub DoQueryPR -{ - my ($PR, $cat) = @_; - my ($data); - - $PR =~ s/[^0-9]+//g; - $PR = quotemeta $PR; - - # Note: query-pr.web is just an anti DoS wrapper around query-pr which - # makes sure we do not run too many query-pr instances at once. - if (defined $cat) { - $cat =~ s/[^0-9A-Za-z-]+//g; - $cat = quotemeta $cat; - $data = qx(query-pr.web --full --category=${cat} ${PR} 2>&1); - } else { - $data = qx(query-pr.web --full ${PR} 2>&1); - } - - if (!$data or $data =~ /^query-pr(:?\.(:?real|web))?: /) { - ErrorExit(EXIT_NOPRS); - } elsif ($data =~ /^lockf: /) { - ErrorExit(EXIT_DBBUSY); - } - - return \$data; -} - - -#------------------------------------------------------------------------------ -# Func: PrintPR() -# Desc: Output the parsed PR. -# -# Args: $gnatspr - GnatsPR instance. -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub PrintPR -{ - my ($gnatspr) = @_; - - # Page title - - print html_header( - "FreeBSD has migrated to Bugzilla. Please check the current Bugzilla version of this PR." - ); - print "

    The historical version shown below is likely out of date and is for debugging purposes only!

    \n"; - - print "

    " . - $q->escapeHTML( - $gnatspr->FieldSingle('Category') - . '/' - . $gnatspr->FieldSingle('Number') - . ': ' - . $gnatspr->FieldSingle('Synopsis') - ) . "

    \n"; - - # Header stuff of interest - - print $q->start_table({-class => 'headtable'}); - - foreach my $field ('From', 'Date', 'Subject') { - my $val = $q->escapeHTML( - scalar decode_mimewords($gnatspr->Header($field)) - ); - print $q->Tr( - $q->td({-class => 'key'}, $field . ':'), - $q->td({-class => 'val'}, $val) - ) - } - - print $q->Tr( - $q->td({-class => 'key'}, 'Send-pr version:'), - $q->td({-class => 'val'}, $q->escapeHTML($gnatspr->Header('x-send-pr-version'))) - ); - - print $q->end_table; - - # Single fields - - print $q->start_table({-class => 'headtable'}); - - foreach my $field ( - 'Number', - 'Category', - 'Synopsis', - 'Severity', - 'Priority', - 'Responsible', - 'State', - 'Class', - 'Arrival-Date', - 'Closed-Date', - 'Last-Modified', - 'Originator', - 'Release' - ) { - my $val = $q->escapeHTML($gnatspr->FieldSingle($field)); - print $q->Tr( - $q->td({-class => 'key'}, $field . ":"), - $q->td({-class => 'val'}, $val) - ); - } - - print $q->end_table; - - # Sections - - my $iter = GnatsPR::SectionIterator->new( - $gnatspr, - # Fields we want sections from; this also - # dictates the order they will come. - 'Organization', - 'Environment', - 'Description', - 'How-To-Repeat', - 'Fix', - 'Release-Note', - 'Audit-Trail', - 'Unformatted' - ); - - my $replynum = 0; - my $patchnum = 0; - - while (my $item = $iter->next()) { - # Start of new field - if (ref $item eq 'GnatsPR::Section::FieldStart') { - my $text = $item->string(); - $text = $q->escapeHTML($text); - #print $q->h2($text); - print $q->table({-class => 'mfieldtable'}, - $q->Tr($q->td({-class => 'blkhead'}, $text))); - next; - } - - # A chunk of text - if (ref $item eq 'GnatsPR::Section::Text') { - my $text = $item->string(); - $text = $q->escapeHTML($text); - $text = Linkify($text); - $text = AddBreaks($text); - - # Table used to ensure text CSS consistency (evil, I know) - print $q->table($q->tbody($q->Tr($q->td({class => 'mfield'}, $text)))) - if $text; - #print $q->p($text); - - next; - } - - # Patch block - if (ref $item eq 'GnatsPR::Section::Patch') { - my $text = $item->string(); - $text = $q->escapeHTML($text); - $text = ColourPatch($text) - if ($item->type eq 'diff'); - $text = AddBreaks($text); # Unless binary - - print AttachmentHeader($item->{filename}, ++$patchnum); - print $text; - print AttachmentFooter(); - - next; - } - - # Audit-Trail state/responsible change block - if (ref $item eq 'GnatsPR::Section::StateChange') { - # This must be hard-coded - the old value will still - # linger in PRs, even if the script moves. - my $selfurl = "http://www.freebsd.org/cgi/query-pr.cgi?pr=" - . $gnatspr->FieldSingle('Number'); - - # Remove the URL, as it is merely clutter - my $why = $item->why; - $why =~ s/[\n\s]*\Q$selfurl\E[\n\s]*$//i; - $item->why($why); - - print $q->table({-class => 'auditblock', -cellspacing => '1'}, - $q->Tr( - $q->th( - {-colspan => 2, -class => 'info'}, - $q->escapeHTML($item->what) . " Changed" - ) - ), - - $q->Tr( - $q->td({-class => 'key'}, 'From-To:'), - $q->td( - $q->escapeHTML( - $item->from . '->' . $item->to - ) - ) - ), - - $q->Tr( - $q->td({-class => 'key'}, 'By:'), - $q->td($q->escapeHTML($item->by)) - ), - - $q->Tr( - $q->td({-class => 'key'}, 'When:'), - $q->td($q->escapeHTML($item->when)) - ), - - $q->Tr( - $q->td({-class => 'key'}, 'Why:'), - AddBreaks($q->td($q->escapeHTML($item->why))) - ) - ); - - next; - } - - # Reply via E-mail - if (ref $item eq 'GnatsPR::Section::Email') { - print $q->start_table({-class => 'replyblock', - -cellspacing => '1'}); - - $replynum++; - - print $q->Tr($q->th( - {-colspan => 2, -class => 'info'}, - 'Reply via E-mail ' - . $q->a({href => '#reply'.$replynum, - name => 'reply'.$replynum}, '[Link]') - )); - - # Try to determine if sender is submitter - - my $fromtag = FromSubmitter($item, $gnatspr) - ? $q->b(' [submitter]') : ''; - - # Print header - - foreach my $f ('From', 'To', 'Date') { - print $q->Tr( - $q->td({-class => 'key'}, $f . ':'), - $q->td({-class => 'val'}, - $q->escapeHTML( - scalar decode_mimewords($item->Header($f)) - ) - . - (($f eq 'From') ? $fromtag : '') - ) - ); - } - - print $q->start_Tr; - print $q->start_td({-colspan => 2}); - - # MIME parts - - my $mime_iter = GnatsPR::MIMEIterator->new($item); - - while (my $part = $mime_iter->next()) { - my $ctype = $part->header('content-type'); - my $elide = 0; - - print $q->hr({-class => 'mimeboundary'}) - unless ($mime_iter->isfirst); - - $part->isattachment - and ++$patchnum; - - # Skip (inline) HTML parts -- but only if we have - # a plaintext part. We could possibly be a bit more - # rigorous in verifying the existence of the latter, - # but testing for the MIME header or other part will - # suffice, as it is unlikely a HTML-only e-mail will - # have more than that single part. - if ($ctype eq 'text/html' && !$part->isattachment && - !$mime_iter->isfirst) { - $elide = 1; - - # S/MIME signatures - of questionable value here - } elsif ($ctype eq 'application/pkcs7-signature') { - $elide = 1; - } - - if ($elide) { - if ($part->isattachment) { - my $url = $q->url(-full => 1, -query => 1); - - my $dlink = - $q->a({-href => $url . '&getpatch=' . $patchnum}, - '[Download]'); - - print $q->div( - {-class => 'elidemsg'}, - 'Attachment of type "' . $q->escapeHTML($ctype) - . '" ' . $dlink - ); - } else { - print $q->div( - {-class => 'elidemsg'}, - 'MIME part of type "' . $q->escapeHTML($ctype) - . '" elided' - ); - } - - next; - } - - $part->isattachment - and print AttachmentHeader($part->filename, $patchnum); - - if ($part->isbinary) { # Implies isattachment - print $q->escapeHTML($part->body); - } else { - my $text; - - if ($part->header('content-type') eq 'text/plain' - && !$part->isattachment) { - # ColourEmail escapes too - $text = Linkify(ColourEmail($part->data)); - } else { - $text = $q->escapeHTML($part->data); - } - - if ($part->isattachment - && $part->filename =~ /\.(?:diff|patch)\b/i) { - $text = ColourPatch($text); - } - - print AddBreaks($text); - } - - $part->isattachment - and print AttachmentFooter(); - } - - print $q->end_td; - print $q->end_Tr; - } - - print $q->end_table; - } - - print FooterLinks($gnatspr); - - print html_footer(); -} - - -#------------------------------------------------------------------------------ -# Func: AddBreaks() -# Desc: Convert newlines to HTML break elements. -# -# Args: $text - Input -# -# Retn: $text - Output -#------------------------------------------------------------------------------ - -sub AddBreaks -{ - my $text = shift; - - $text =~ s/\n/
    /g; - - return $text; -} - - -#------------------------------------------------------------------------------ -# Func: Linkify() -# Desc: Perform any fancy formatting on the message (e.g. HTML-ify URLs) and -# return the result. -# -# Args: $html - Input string -# -# Retn: $html - Output string -#------------------------------------------------------------------------------ - -sub Linkify -{ - my ($html) = @_; - - # XXX: clean up - - $html or return ''; - - my $iv = 'A-Za-z0-9\-_\/#@\$=\\\\'; - - my $scriptname = $q->escapeHTML($ENV{'SCRIPT_NAME'}); - - # PR references - $html =~ - s/(?$1\/$2<\/a>/g; - - # URLs - $html =~ - s/((?:https?|ftps?):\/\/[^\s\/]+\/[][\w=.,\'\(\)\~\?\!\&\/\%\$\{\}:;@#+-]*)/$1<\/a>/g; - - return $html; -} - - -#------------------------------------------------------------------------------ -# Func: ColourPatch() -# Desc: Apply 'cdiff' style colours to a patch. -# -# Args: $html - Input string -# -# Retn: $html - Output string -#------------------------------------------------------------------------------ - -sub ColourPatch -{ - my ($html) = @_; - my $res = ''; - - # XXX: clean up - - my $plus_s = $q->start_span({-class => 'patch_plusline'}); - my $minus_s = $q->start_span({-class => 'patch_minusline'}); - my $context_s = $q->start_span({-class => 'patch_contextline'}); - my $revinfo_s = $q->start_span({-class => 'patch_revinfo'}); - my $at_s = $q->start_span({-class => 'patch_hunkinfo'}); - my $all_e = $q->end_span; - - # Expand tabs - while ($html =~ s/\t/" " x (8 - ((length($`)-1) % 8))/e) {}; - - foreach my $line (split /\n/, $html) { - $line =~ s/^(\+.*)$/${plus_s}$1${all_e}/o; - $line =~ s/^(-.*)$/${minus_s}$1${all_e}/o - if $line !~ s/^(--- \d+,\d+ ----.*)$/${revinfo_s}$1${all_e}/o; - $line =~ s/^(\*\*\* \d+,\d+ *\*\*\*.*)$/${revinfo_s}$1${all_e}/o; - $line =~ s/^(\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*)$/${revinfo_s}$1${all_e}/o; - $line =~ s/^(!.*)$/${context_s}$1${all_e}/o; - $line =~ s/^(@@.*$)/${at_s}$1${all_e}/o; - $line =~ s/^ / /; - $res .= "$line\n"; - } - - $res =~ s/\n$//; - - return $res; -} - - -#------------------------------------------------------------------------------ -# Func: ColourEmail() -# Desc: Colourise quoting levels in e-mails, and escape. -# -# Args: $email - Input string -# -# Retn: $email - Output string -#------------------------------------------------------------------------------ - -sub ColourEmail -{ - my ($email) = @_; - - my $result = ''; - - foreach my $line (split /\n/, $email) { - if ($line =~ /^\s*((?:>\s*)+)(.*)$/) { - my $levels = $1; - my $text = $2; - my $depth; - - $depth = $levels; - $depth =~ s/[^>]+//g; - $depth = length $depth; - - $levels =~ s/>/>/g; - - # Vim style rather than mutt - - $result .= $q->span({ - -class => 'quote' . ($depth % 2 ? 0 : 1) - }, $levels . $q->escapeHTML($text)); - } else { - $result .= $q->escapeHTML($line); - } - $result .= "\n"; - } - - return $result; -} - - -#------------------------------------------------------------------------------ -# Func: Exit() -# Desc: Exit script. -# -# Args: n/a -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub Exit -{ - # Introduce a short delay, as a DoS protection measure - select undef, undef, undef, 0.35 - unless !$iscgi; - - exit; -} - - -#------------------------------------------------------------------------------ -# Func: ErrorExit() -# Desc: Print an error message and exit. -# -# Args: $code - EXIT_* code -# -# Retn: n/a -#------------------------------------------------------------------------------ - -sub ErrorExit -{ - my ($code) = @_; - - my $url = $q->url(-full => 1, -query => 1); - - if ($code == EXIT_NOPRS) { - print html_header("FreeBSD has migrated to Bugzilla. Try your search there."); - print html_footer(); - } elsif ($code == EXIT_DBBUSY) { - print html_header("PR Database Busy"); - print $q->p( - 'Please ' - . $q->a({-href => $url}, 'try again') - . ' later' - ); - print html_footer(); - } elsif ($code == EXIT_NOPATCH) { - print "Content-type: text/plain; charset=UTF-8\r\n\r\n"; - print "No such patch!\n"; - } - - Exit(); -} - - -#------------------------------------------------------------------------------ -# Func: FromSubmitter() -# Desc: Try determine if the sender of a reply is the sender of the PR. -# -# Args: $item - GnatsPR::Section::Email instance. -# $gnatspr - GnatsPR instance -# -# Retn: $result - Is sender the submitter? -#------------------------------------------------------------------------------ - -sub FromSubmitter -{ - my ($item, $gnatspr) = @_; - - my $from = lc $item->Header('From'); - my $submitter = lc $gnatspr->Header('From'); - - $from =~ s/^.*.*$//; - $from =~ s/\s+//g; - $submitter =~ s/^.*.*$//; - $submitter =~ s/\s+//g; - - return $from eq $submitter; -} - - -#------------------------------------------------------------------------------ -# Func: AttachmentHeader() -# Desc: Construct an attachment block header. -# -# Args: $filename - Name of attachment. -# $patchnum - Patch index. -# -# Retn: $text - Header text. -#------------------------------------------------------------------------------ - -sub AttachmentHeader -{ - my ($filename, $patchnum) = @_; - - my $text = ''; - - my $url = $q->url(-full => 1, -query => 1); - - $text .= $q->start_table({-class => 'patchblock', -cellspacing => '1'}); - $text .= - $q->Tr( - $q->td({-class => 'info'}, $q->b( - 'Download ' . $q->a({-href => $url . '&getpatch=' . $patchnum}, - $filename) - )) - ); - - $text .= $q->start_tbody; - $text .= $q->start_Tr; - $text .= $q->start_td({-class => 'content'}); - $text .= $q->start_pre({-class => 'attachwin'}); - - return $text; -} - - -#------------------------------------------------------------------------------ -# Func: AttachmentFooter() -# Desc: Construct an attachment block footer. -# -# Args: n/a -# -# Retn: $text - Footer text. -#------------------------------------------------------------------------------ - -sub AttachmentFooter -{ - my $text = ''; - - $text .= $q->end_pre; - $text .= $q->end_td; - $text .= $q->end_Tr; - $text .= $q->end_tbody; - $text .= $q->end_table; - - return $text; -} - - -#------------------------------------------------------------------------------ -# Func: FooterLinks() -# Desc: Construct the page footer links (for a valid PR page) -# -# Args: $gnatspr - GnatsPR instance. -# -# Retn: $text - Footer text. -#------------------------------------------------------------------------------ - -sub FooterLinks -{ - my ($gnatspr) = @_; - - my $url = $q->url(-full => 1, -query => 1); - - return $q->div({-class => 'footerlinks'}, - $q->a({-href => $url . '&f=raw'}, 'Raw PR') - ); -} Property changes on: head/en_US.ISO8859-1/htdocs/cgi/query-pr.cgi ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/missing_handler.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/missing_handler.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/missing_handler.cgi (nonexistent) @@ -1,120 +0,0 @@ -#!/usr/bin/perl -T -# Copyright (c) July 1997-2011. Wolfram Schneider -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# missing_handler.cgi - User friendly error response (Apache style) -# -# -# default apache message: -# ---------------------------------------------------------------------- -# File Not found -# The requested URL /~wosch/test/bla was not found on this server. -# ---------------------------------------------------------------------- -# -# -# missing_handler.cgi message: -# ---------------------------------------------------------------------- -# FreeBSD.org - Document not found -# -# The file -# -# http://www.FreeBSD.org/~wosch/test/bla -# -# does not exist at this server. You are coming from -# -# http://www.FreeBSD.org/~wosch/test/error.html. -# -# The closest match to your request is http://www.FreeBSD.org. -# Please contact the server administrator wosch@FreeBSD.org. -# -# Thank you very much! -# -# _________________________________________________________________ -# -# $FreeBSD$ -# ---------------------------------------------------------------------- - -sub escape($) { $_ = $_[0]; s/&/&/g; s//>/g; $_; } -sub escape2($) { $_ = $_[0]; s//>/g; $_; } - -# output title -$title = $ENV{'MISSING_HANDLER_TITLE'} || - 'FreeBSD.org - Document not found'; - -# footer message -$footer = $ENV{'MISSING_HANDLER_FOOT'} || ''; - - -# Server environment variables -$http_referer=escape($ENV{'HTTP_REFERER'}); -$redirect_url=escape($ENV{'REDIRECT_URL'}); -$server_admin=escape($ENV{'SERVER_ADMIN'}); -$http_host=escape($ENV{'HTTP_HOST'}); -$server_name=escape($ENV{'SERVER_NAME'}); - -# rfc1738 says that ";"|"/"|"?"|":"|"@"|"&"|"=" may be reserved. -$http_referer_url = escape2($ENV{'HTTP_REFERER'}); -$http_referer_url =~ s/([^a-zA-Z0-9;\/?:&=\.%])/sprintf("%%%02x",ord($1))/eg; -$redirect_url_save = escape2($ENV{'REDIRECT_URL'}); -$redirect_url_save =~ s/([^a-zA-Z0-9;\/?:&=])/sprintf("%%%02x",ord($1))/eg; - - -$hsty_base = 'http://www.FreeBSD.org'; -require './cgi-style.pl'; -print &html_header($title); - -# HTML body -print qq[

    The file

    -
    -http://$http_host$redirect_url -
    -

    does not exist at this server.

    \n]; - -if ($http_referer) { - print qq{

    You are coming from

    -
    -$http_referer. -
    -\n}; -} - -print qq[

    -The closest match to your request is -http://$server_name. - -Please contact the members of the -FreeBSD Documentation Project <freebsd-doc\@FreeBSD.org> -or the server administrator -$server_admin.

    - -

    Please try our -Site Map or -Search Page -

    - -

    Thank you very much!

    -]; - -print&html_footer; -exit; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/missing_handler.cgi ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/query-pr-lib.pl =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/query-pr-lib.pl (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/query-pr-lib.pl (nonexistent) @@ -1,167 +0,0 @@ -#!/usr/bin/perl -Tw -# $FreeBSD$ - -sub get_categories { - @categories = (); - - open(Q, 'query-pr.web --list-categories 2>/dev/null |') || - die "Cannot get categories\n"; - - while() { - chop; - local ($cat, $desc, $responsible, $notify) = split(/:/); - push(@categories, $cat); - $catdesc{$cat} = $desc; - } -} - -sub get_states { - @states = (); - - open(Q, 'query-pr.web --list-states 2>/dev/null |') || - die "Cannot get states\n"; - - while() { - chop; - local ($state, $type, $desc) = split(/:/); - push(@states, $state); - $statedesc{$state} = $desc; - } -} - -sub get_classes { - @classes = (); - - open(Q, 'query-pr.web --list-classes 2>/dev/null |') || - die "Cannot get classes\n"; - - while() { - chop; - local ($class, $type, $desc) = split(/:/); - push(@classes, $class); - $classdesc{$class} = $desc; - } -} - -sub displayform { -print qq` -

    To query the GNATS Database for specific PR number, please fill in -this form:

    -
    - - - - -
    PR number:
    Category: (optional)
    -
    -
    - -

    Alternatively, it is possible to select items you wish to search for. -Multiple items are AND'ed together.
    -To generate current list of all open PRs in GNATS database, just press -the "Query PRs" button. -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Category:Severity:
    Priority:Class:
    State:Sort by:
    Text in single-line fields:Responsible:
    Text in multi-line fields:Originator:
    Closed reports too:Release:
    -
    -
    -`; -} - -1; Property changes on: head/en_US.ISO8859-1/htdocs/cgi/query-pr-lib.pl ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/cgi/Makefile =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/Makefile (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/Makefile (revision 46874) @@ -1,39 +1,28 @@ # $FreeBSD$ .if exists(../Makefile.conf) .include "../Makefile.conf" .endif .if exists(../Makefile.inc) .include "../Makefile.inc" .endif DATA= -DATA+= Gnats.pm -DATA+= GnatsPR.pm DATA+= cgi-lib.pl DATA+= cgi-style.pl -DATA+= query-pr-lib.pl CGI= -CGI+= confirm-code.cgi -CGI+= dosendpr.cgi CGI+= getmsg.cgi CGI+= mailindex.cgi CGI+= man.cgi CGI+= mid.cgi CGI+= mirror.cgi -CGI+= missing_handler.cgi CGI+= monthly.cgi CGI+= ports.cgi -CGI+= query-pr.cgi -CGI+= query-pr-summary.cgi -CGI+= search.cgi - -SUBDIR= GnatsPR .SUFFIXES: .C .cgi .C.cgi: ${CXX} ${CFLAGS} -o ${.TARGET} ${.IMPSRC} .include "${DOC_PREFIX}/share/mk/web.site.mk" Index: head/en_US.ISO8859-1/htdocs/cgi/cgi-style.pl =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/cgi-style.pl (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/cgi-style.pl (revision 46874) @@ -1,268 +1,268 @@ # $FreeBSD$ # # Perl routines to encapsulate various elements of HTML page style. # For future reference, when is now? ($se,$mn,$hr,$md,$mo,$yr,$wd,$yd,$dst) = localtime(time); $yr += 1900; $mo += 1; $timestamp = "$mo-$md-$yr"; if (!defined($hsty_base)) { # $hsty_base should be relative if possible, so that mirrors # serve their local copy instead of going to the main site. # However, if we aren't running as a cgi, or if we're # running on cgi, hub, docs or people, use the absolute home path. if (!defined($ENV{'HTTP_HOST'}) || - $ENV{'HTTP_HOST'} =~ /(cgi|hub|docs|people).freebsd.org/i) { + $ENV{'HTTP_HOST'} =~ /(cgi|hub|docs|people|mailarchive.ysv).freebsd.org/i) { $hsty_base = '//www.FreeBSD.org' } else { $hsty_base = '..'; } } if (!defined($hsty_email)) { - $hsty_email = 'www@FreeBSD.org'; + $hsty_email = 'Contact'; } if (!defined($hsty_author)) { $hsty_author = "$hsty_email"; } if (!defined($hsty_date)) { $hsty_date = ''; } if (!defined($hsty_charset)) { $hsty_charset = 'iso-8859-1'; } # This can be set to either a string containing an inline CSS stylesheet # or to a element that references an external CSS stylesheet, to # make local modifications to the style of a CGI script's output. $t_style = ""; # Don't allow script to override completely, just # let the script's setting cascade with the master. $i_topbar = qq`
    Skip site navigation (1)Skip section navigation (2)
    `; #XXX does anyone use this? I don't know what it should be in the new style. if (!defined($hsty_home)) { $hsty_home = "FreeBSD Home Page"; } sub html_header { local ($title, $xhtml) = @_; return short_html_header($title, $xhtml) . "

    $title

    \n"; } sub short_html_header { local ($title, $xhtml) = @_; $xhtml = 1 unless defined($xhtml); $doctype = $xhtml ? '' : ''; $html = $xhtml ? '' : ''; $endslash = $xhtml ? '/' : ''; $csshack = (1 || $xhtml) ? '' : q` `; return qq`Content-type: text/html $doctype $html $title $csshack $t_style $i_topbar `; } sub html_footer { return qq`
    `; } sub get_the_source { return if $ENV{'PATH_INFO'} ne '/get_the_source'; open(R, $0) || do { print "Oops! open $0: $!\n"; # should not reached exit; }; print "Content-type: text/plain\n\n"; while() { print } close R; exit; } 1; Index: head/en_US.ISO8859-1/htdocs/cgi/getmsg.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/getmsg.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/getmsg.cgi (revision 46874) @@ -1,245 +1,245 @@ #!/usr/bin/perl -T # # Given a filename, start offset and end offset of a mail message, # read the message and format it nicely using HTML. # # by John Fieber # February 26, 1998 # # $FreeBSD$ # require "./cgi-lib.pl"; require "./cgi-style.pl"; use POSIX qw(strftime); # # Site design includes setting a:visited to the same as a:link, # which isn't good in archived messages, e.g., you want to follow # links in commit messages and know which links you've visited. # Override it inside the
     that is the message.
     $t_style = qq`
     `;
     
     
     #
     # Files MUST be fully qualified and MUST start with this path.
     #
    -$messagepath = "/usr/local/www/db/text/";
    +$messagepath = "/usr/local/www/mailindex/archive/";
     $messagepathcurrent = "/usr/local/www/mid/archive/";
     $ftparchive = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/mailing-lists/archive';
     
     &ReadParse(*formdata);
     &Fetch($formdata{'fetch'});
     exit 0;
     
     sub Fetch
     {
         my ($docid) = @_;
         my ($start, $end, $file, $type) = split(/ /, $docid);
         my ($message, @finfo);
     
         #
         # Check to ensure that (a) the specified file starts
         # with an approved pathname and (b) that it contains no
         # relative components (eg ..).  This is so that arbitrary
         # files cannot be accessed.
         #
     
         $file =~ s/\.\.//g;
         $file =~ s|/+|/|;
         $file =~ s|^archive/|$messagepath/|;
     
         # read the full archive 
         if ($type eq 'archive') {
     	# from the FreeBSD ftp server
     	if ($file =~ s%^$messagepath%%o) {
     	    print "Location: $ftparchive/$file.gz\n";
     	    print "Content-type: text/plain\n\n";     
     	    exit(0);
     	}
     	
     	# from the local mail archive for current mails
     	elsif ($file =~ m%^current/(cvs|svn|freebsd|p4|trustedbsd)-[a-z0-9-]+$% &&
     	       open(DATA, "$messagepathcurrent$file")) {
     	    print "Content-type: text/plain\n\n"; 
     	    while() {
     		print;
     	    }
     	    close(DATA);
     	    exit(0);
     	}
         }
     
         if (($file =~ /^$messagepath/ && -f $file && open(DATA, $file)) ||
     	($file =~ m%^current/(cvs|svn|freebsd|p4|trustedbsd)-[a-z0-9-]+$% &&
     	 open(DATA, "$messagepathcurrent$file")))
         {
     	@finfo = stat DATA;
         	seek DATA, $start, 0;
     	if ($end > $start && $start >= 0) {
     	    read DATA, $message, $end - $start;
     	} else {
     	    # Unknown length, guess the end of the E-Mail
     	    my($newline) = 0;
     	    while() {
     		last if ($newline && /^From .* \d{4}/);
     		if (/^$/) { $newline = 1 } else { $newline = 0; }
     		$message .= $_;
     	    }
     	}
         	close(DATA);
     	print "last-modified: " .
     	    POSIX::strftime("%a, %d %b %Y %T GMT", gmtime($finfo[9])) . "\n";
     
     	# print E-Mail as plain ascii text
     	if ($type eq 'raw') {
                 print "Content-type: text/plain\n\n";
                 print $message;
     	    return;
             }	
     	$message = &MessageToHTML($message, $file);
         }
         else
         {
         	$message = "

    The specified message cannot be accessed.

    \n"; } print &short_html_header("FreeBSD Mail Archives"); print $message; print &html_footer; } sub EscapeHTML { my ($text) = @_; $text =~ s/&/&/g; $text =~ s//>/g; return $text; } sub MessageToHTML { my ($doc, $file) = @_; my ($header, $body) = split(/\n\n/, $doc, 2); my ($i, %hdr, $field, $data, $message); my ($mid) = 'mid.cgi'; my ($mid_full_url) = 'http://docs.FreeBSD.org/cgi/mid.cgi'; my ($tmid,$tirt,$tref); $body = &AddAnchors(&EscapeHTML($body)); $header = &EscapeHTML($header); $header =~ s/\n[ \t]+/ /g; foreach $i (split(/\n/, $header)) { ($field, $data) = split(/ /, $i, 2); $field =~ y/A-Z/a-z/; $hdr{$field} = $data; } $message = "
    \n";
         if (length($hdr{'date:'}) > 0) {
         	$message .= "Date:      $hdr{'date:'}\n";
         }
         if (length($hdr{'from:'}) > 0) {
         	$message .= "From:      $hdr{'from:'}\n";
         }
         if (length($hdr{'to:'}) > 0) {
         	$message .= "To:        $hdr{'to:'}\n";
         }
         if (length($hdr{'cc:'}) > 0) {
         	$message .= "Cc:        $hdr{'cc:'}\n";
         }
     #    if (length($hdr{'sender:'}) > 0) {
     #    	$message .= "Sender:    $hdr{'sender:'}\n";
     #    }
         if (length($hdr{'subject:'}) > 0) {
         	$message .= "Subject:   $hdr{'subject:'}\n";
         }
     
         if ($hdr{'message-id:'}) {
     	$tmid = $hdr{'message-id:'}; 
     	$hdr{'message-id:'} =~ 
     	    s%;([^&]+)&%;$1&%oi;
     	$message .= "Message-ID:  $hdr{'message-id:'}\n";
         }
     
         if ($hdr{'resent-message-id:'}) {
     	$hdr{'resent-message-id:'} =~ 
     	    s%;([^&]+)&%;$1&%oi;
     	$message .= "Resent-Message-ID: $hdr{'resent-message-id:'}\n";
         }
     
         if ($hdr{'in-reply-to:'}) {
     	$tirt = $hdr{'in-reply-to:'};
     	$hdr{'in-reply-to:'} =~
     	    s%;([^&]+)&%;$1&%oi;
     	$message .= "In-Reply-To: $hdr{'in-reply-to:'}\n";
         }
     
         if ($hdr{'references:'}) {
     	$tref = $hdr{'references:'};
     	$hdr{'references:'} =~
     	    s%;([^&\s]+)&%;$1&%goi;
     	$message .= "References:  $hdr{'references:'}\n";
         }
     
     
         $message .= "
    \n"; $message .= "
    \n"; if ($tmid =~ m%;([^&]+)&%) { $message .= qq{Next in thread\n}; } if ($tirt =~ m%;([^&]+)&% || $tref =~ m%;([^&]+)&%) { $message .= qq{| Previous in thread\n}; } $message .= qq{| Raw E-Mail\n}; my $file2 = $file; if ($file2 =~ s%^$messagepath%archive/%oi || $file2 =~ /^current/) { $message .= qq{| Index\n}; } $message .= qq{| Archive\n}; $message .= qq{| Help\n}; my $tid = $tmid; $tid =~ s/^<//; $tid =~ s/\@.*//; $message .= "
    \n"; #$message .= qq{
    \n}; $message .= "
    \n$body\n
    \n"; #$message .= qq{
    \n}; $message .= qq{
    \n

    Want to link to this message? Use this URL: <}; $message .= qq{$mid_full_url} . '?' . $tid . qq{>

    }; return $message; } sub strip_url { my $url = shift; # strip trailing characters $url =~ s/>?$//; $url =~ s/[.,;>\s\)]*$//; return $url; } sub AddAnchors { my ($text) = @_; $text =~ s/(http|https|ftp)(:[\S]*?\/?)(\W?\s)/sprintf("%s<\/a>$3", &strip_url("$1$2"), "$1$2", $3)/egoi; return $text; } Index: head/en_US.ISO8859-1/htdocs/cgi/mailindex.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/mailindex.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/mailindex.cgi (revision 46874) @@ -1,111 +1,111 @@ #!/usr/bin/perl -T # # Copyright (c) Jan 1999-2011 Wolfram Schneider # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ use CGI; use CGI::Carp; require "./cgi-lib.pl"; require "./cgi-style.pl"; $ENV{PATH} = "/bin:/usr/bin:/usr/local/bin"; # no sort my $sortopt = ''; my $up = 0; $| = 1; # mail archive location -$maildir = '/g/mail/archive'; +$maildir = '/home/mail/archive'; # mailindex program -$mailindex = '/usr/local/www/mid/bin/mailindex'; +$mailindex = '/usr/local/www/mailindex/bin/mailindex'; $query = new CGI(); print "Content-type: text/html\n\n"; my $reverse; $sortopt = '--sort-by-subject' if ($query->param('sort') eq 'subject'); $sortopt = '--sort-by-author' if ($query->param('sort') eq 'author'); $sortopt = '' if ($query->param('sort') eq 'date'); $reverse = '--reverse' if ($query->param('reverse')); my $file = $query->param('file'); if (!$file) { print "No file name given\n"; exit; } # forbid link to parent directories $file =~ s%\.\./%%g; if ($file =~ m,^([0-9a-z/-]+|[0-9a-z/-]+\.[0-9a-z-]+)$,) { $file = $1; } else { print "Unknown file name given\n"; exit; } sub file_not_exists { my $file = shift; print "File does not exists: $file\n"; exit; } if ($file =~ s%^archive/%%) { - $maildir = '/g/www/db/text'; + $maildir = '/usr/local/www/mailindex/archive'; &file_not_exists("$maildir/$file") if (! -f "$maildir/$file"); } elsif ($file =~ s%^current/%% && $file =~ /^freebsd-|^cvs-/) { &file_not_exists("$file") if (! -f "$maildir/$file"); $up = 0; } else { &file_not_exists("$file"); } chdir($maildir) or die "chdir $maildir: $!\n"; my @options; push(@options, ("--up=$up", '--outdir=stdout', '--cgilink=1')); push(@options, $sortopt) if $sortopt; push(@options, $reverse) if $reverse; open(M, "-|") || exec "$mailindex", @options, $file || do { print "Cannot open $mailindex: $!\n"; exit; }; #print "cd $maildir; $mailindex @options $file\n"; while() { print; } exit; Index: head/en_US.ISO8859-1/htdocs/cgi/mid.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/mid.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/mid.cgi (revision 46874) @@ -1,162 +1,161 @@ #!/usr/bin/perl -T # # Copyright (c) March 1998-2011 Wolfram Schneider . Berlin. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # Search a mail by Message-ID, References or In-Reply-To field # # $FreeBSD$ require "./cgi-lib.pl"; require "./cgi-style.pl"; $home = '/usr/local/www/mailindex'; -$prefix= "/usr/local/www/db/text"; +$prefix= "/usr/local/www/mailindex/archive"; $lookupdir = "$home/message-id"; # database(s) directory $databaseDefault = 'mid'; # default database -$bindir = "$home/bin"; # where search scripts located $script = $ENV{'SCRIPT_NAME'}; $shortid = 1; $lookCommand = "/usr/bin/look"; $ENV{PATH} = '/bin:/usr/bin'; $main::t_style .= qq{\n\n}; sub escape($) { $_ = $_[0]; s/&/&/g; s//>/g; $_; } sub get_id { local($query, $db) = @_; open(DB, "-|") || exec("$lookCommand", $query, "$lookupdir/mid-current.$db") || do { print &midheader . "

    Cannot connect to Message-ID database.

    \n" . &foot; exit; }; local(@idlist); while() { push(@idlist, $_); } close DB; #warn "$lookCommand $query, $lookupdir/mid.$db"; open(DB, "-|") || exec("$lookCommand", $query, "$lookupdir/mid.$db") || do { print &midheader . "

    Cannot connect to Message-ID database.

    \n" . &foot; exit; }; while() { push(@idlist, $_); } close DB; if ($#idlist < 0) { # nothing found print &midheader; if ($db eq 'mid') { printf "Message-ID: \"%s\" not found\n", escape($query); } else { printf "No answers found for: \"%s\"\n", escape($query); } print &foot; } elsif ($#idlist == 0) { # one hit local($location) = $ENV{'SCRIPT_NAME'}; local($id, $file, $start) = split($", $idlist[0]); $location =~ s%/[^/]+$%%; local($host) = $ENV{'HTTP_HOST'}; - $location = 'http://' . $host . $location; + $location = '//' . $host . $location; $start =~ s/\s+$//; print "Location: $location/getmsg.cgi?fetch=$start+0+" . ($file =~ /^current/ ? '' : "$prefix/") . "$file\n"; print "Content-type: text/plain\n\n"; exit; } else { # more than one hit local($id, $file, $start, $name); print &midheader; print "
    \n

    \n"; print &foot; } } sub midheader { return &short_html_header("FreeBSD Message-ID Mail Archives") . qq{

    Back to the search interface

    \n}; } sub foot { return &html_footer; } ### # Main ### &ReadParse(*input); $messageid = $input{'id'}; $database = $input{'db'}; if (!$messageid) { # for lazy people ;-) # allow the syntax mid.cgi?messageid if ($ENV{'QUERY_STRING'} =~ /\-]+\S+$/) { $messageid = $ENV{'QUERY_STRING'}; $database = $databaseDefault; } # no message-id given else { print &midheader; print "No input given\n"; print &foot; exit; } } $messageid =~ s/^$//; $messageid =~ s/@.*// if $shortid; ($messageid) = $messageid =~ m|^(\S+)$|; # XXX: can be more strict... if ($database =~ m/^(mid|irt)$/) { $database = $1; } else { $database = $databaseDefault; } &get_id($messageid, $database); Index: head/en_US.ISO8859-1/htdocs/cgi/ports.cgi =================================================================== --- head/en_US.ISO8859-1/htdocs/cgi/ports.cgi (revision 46873) +++ head/en_US.ISO8859-1/htdocs/cgi/ports.cgi (revision 46874) @@ -1,651 +1,642 @@ #!/usr/bin/perl -T # # Copyright (c) 1996-2011 Wolfram Schneider # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ # # ports.cgi - search engine for FreeBSD ports # o search for a port by name or description use POSIX qw(strftime); use Time::Local; require "./cgi-style.pl"; $t_style = qq` `; sub init_variables { $localPrefix = '/usr/ports'; # ports prefix # Directory of the up-to-date INDEX* $portsDatabaseHeadDir = "/usr/local/www/ports"; # Ports database file to use if ( -f "$portsDatabaseHeadDir/INDEX-9" ) { $ports_database = 'INDEX-9'; } elsif ( -f "$portsDatabaseHeadDir/INDEX-8" ) { $ports_database = 'INDEX-8'; } else { $ports_database = 'INDEX'; } # URL of ports tree for browsing $remotePrefixFtp = 'ports'; # 'ftp://ftp.FreeBSD.org/pub/FreeBSD/branches/-current/ports'; # where to get -current packages local ($p) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386'; local ($palpha) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha'; local ($pamd64) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/amd64'; local ($pia64) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ia64'; local ($psparc64) = 'ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/sparc64'; $remotePrefixFtpPackagesDefault = '6-STABLE/i386'; # This is currently unused %remotePrefixFtpPackages = ( '7-CURRENT/i386', "$p/packages-7-current/All", '6-STABLE/i386', " $p/packages-6-stable/All", '5-STABLE/i386', " $p/packages-5-stable/All", '4-STABLE/i386', " $p/packages-4-stable/All", '6.0-RELEASE/i386', "$p/packages-6.0-release/All", '5.4-RELEASE/i386', "$p/packages-5.4-release/All", '4.11-RELEASE/i386', "$p/packages-4.11-release/All", '4-STABLE/alpha', "$palpha/packages-4-stable/All", '5.4-RELEASE/alpha', "$palpha/packages-5.4-release/All", '4.11-RELEASE/alpha', "$palpha/packages-4.11-release/All", '7-CURRENT/amd64', "$pamd64/packages-7-current/All", '6-STABLE/amd64', "$pamd64/packages-6-stable/All", '5-STABLE/amd64', "$pamd64/packages-5-stable/All", '6.0-RELEASE/amd64', "$pamd64/packages-6.0-release/All", '5.4-RELEASE/amd64', "$pamd64/packages-5.4-release/All", '7-CURRENT/ia64', "$pia64/packages-7-current/All", '6-STABLE/ia64', "$pia64/packages-6-stable/All", '6.0-RELEASE/ia64', "$pia64/packages-6.0-release/All", '5.4-RELEASE/ia64', "$pia64/packages-5.4-release/All", '7-CURRENT/sparc64', "$psparc64/packages-7-current/All", '6-STABLE/sparc64', "$psparc64/packages-6-stable/All", '5-STABLE/sparc64', "$psparc64/packages-5-stable/All", '6.0-RELEASE/sparc64', "$psparc64/packages-6.0-release/All", '5.4-RELEASE/sparc64', "$psparc64/packages-5.4-release/All", ); $remotePrefixHtml = "$hsty_base/ports"; # CVS Web interface $remotePrefixCvs = 'http://svnweb.FreeBSD.org/ports/head'; # Ports documentation $portsDesc = "$hsty_base/ports/"; # location of the tiny BSD daemon $daemonGif = "Really small BSD Daemon"; # visible E-Mail address, plain text $mailto = 'www@FreeBSD.org'; # Mailinglist for FreeBSD Ports $mailtoList = 'ports@FreeBSD.org'; # use mailto:email?subject $mailtoAdvanced = 'yes'; # the URL if you click at the E-Mail address (see below) $mailtoURL = "mailto:$mailto" if !$mailtoURL; # security $ENV{'PATH'} = '/bin:/usr/bin'; # extension type for packages $packageExt = 'tbz'; local ($packageDB) = '../ports/packages.exists'; &packages_exist( $packageDB, *packages ) if -f $packageDB; } sub packages_exist { local ( $file, *p ) = @_; open( P, $file ) || do { warn "open $file: $!\n"; warn "Cannot create packages links\n"; return 1; }; while (

    ) { chop; $p{$_} = 1; } close P; return 0; } # return the date of the last ports database update sub last_update { local ($file) = "$portsDatabaseHeadDir/$ports_database"; local ( $modtime, $modtimestr ); $modtime = ( stat($file) )[9]; if ( defined($modtime) && $modtime > 0 ) { $modtimestr = strftime( "%G-%m-%d %H:%M:%S UTC", gmtime($modtime) ); } else { $modtimestr = "Unknown"; } return $modtimestr; } sub last_update_message { return "

    Last database update: " . &last_update . "

    \n"; } sub dec { local ($_) = @_; s/\+/ /g; # '+' -> space s/%(..)/pack("c",hex($1))/ge; # '%ab' -> char ab return ($_); } # $indent is a bit of optional data processing I put in for # formatting the data nicely when you are emailing it. # This is derived from code by Denis Howe # and Thomas A Fine sub decode_form { local ( $form, *data, $indent, $key, $_ ) = @_; foreach $_ ( split( /&/, $form ) ) { ( $key, $_ ) = split( /=/, $_, 2 ); $_ =~ s/\+/ /g; # + -> space $key =~ s/\+/ /g; # + -> space $_ =~ s/%([\da-f]{1,2})/pack(C,hex($1))/eig; # undo % escapes $key =~ s/%([\da-f]{1,2})/pack(C,hex($1))/eig; # undo % escapes $_ =~ s/[\r\n]+/\n\t/g if defined($indent); # indent data after \n $data{$key} = $_; } } sub escapeHTML { my $toencode = shift; return "" unless defined($toencode); $toencode =~ s{&}{&}gso; $toencode =~ s{<}{<}gso; $toencode =~ s{>}{>}gso; $toencode =~ s{"}{"}gso; return $toencode; } # encode unknown data for use in a URL sub encode_url { local ($_) = @_; s/([\000-\032\;\/\?\:\@\&\=\%\'\"\`\<\>\177-\377 ])/sprintf('%%%02x',ord($1))/eg; # s/%20/+/g; $_; } sub warn { print "$_[0]" } sub env { defined( $ENV{ $_[0] } ) ? $ENV{ $_[0] } : undef; } sub exit { exit 0 } sub readindex { local ( *var, *msec ) = @_; local ($localportsdb) = "$portsDatabaseHeadDir/$ports_database"; local ( @tmp, @s ); open( C, $localportsdb ) || do { warn "Cannot open ports database $localportsdb: $!\n"; &exit; }; while () { next if $query && !/$query/oi; chop; @tmp = split(/\|/); $var{"$tmp[1]"} = $_; @s = split( /\s+/, $tmp[6] ); foreach (@s) { $msec{"$tmp[1],$_"} = 1; } } close C; } # extract sub collections sub readcoll { local ( @a, @b, %key ); local ($file) = '../ports/categories'; local ($localportsdb) = "$portsDatabaseHeadDir/$ports_database"; if ( -r $file && open( C, $file ) ) { while () { chop; if (/^\s*([^,]+),\s*"([^"]+)",\s*([A-Z]+)/) { @b = split( /\s+/, $1 ); foreach (@b) { if ( !defined( $key{$_} ) ) { $key{$_} = 1; } } } } } else { if ( -r $localportsdb ) { open( C, $localportsdb ) || do { warn "Cannot open ports database $localportsdb: $!\n"; &exit; } } while () { chop; @a = split('\|'); @b = split( /\s+/, $a[6] ); foreach (@b) { if ( !defined( $key{$_} ) ) { $key{$_} = 1; } } } } close C; @a = (); foreach ( sort keys %key ) { push( @a, $_ ); } return @a; } # basic function for HTML output sub out { local ($line) = @_; local ( $version, $path, $local, $comment, $descfile, $email, $sections, $bdepends, $rdepends, @rest ) = split( /\|/, $line ); if ( $path =~ m%^$localPrefix/([^/]+)%o ) { if ( !$out_sec || $1 ne $out_sec ) { print "\n" if $counter > 0; print qq{\n

    } . qq{Category $1} . "

    \n
    \n"; $out_sec = $1; } } $counter++; $pathDownload = $path; $pathB = $path; $pathB =~ s/^$localPrefix/ports/o; $path =~ s/^$localPrefix/$remotePrefixFtp/o; $descfile =~ s/^$localPrefix/$remotePrefixFtp/o; $version = &encode_url($version); #$version =~ s/[\+,]/X/g; local ($l) = $path; $l =~ s%^$remotePrefixFtp%$remotePrefixCvs%o; print qq{
    $version
    \n}; print qq{
    }, &escapeHTML($comment), qq{
    \n}; print qq[Long description :\n]; # Link package in "default" arch/release. Verify it's existence on ftp-master. if ( $packages{"$version.$packageExt"} ) { print qq[Package :\n]; } print qq[Changes
    \n]; print qq{Maintained by: $email
    \n}; local (@s) = split( /\s+/, $sections ); if ( $#s > 0 ) { print qq{Also listed in: }; foreach (@s) { print qq{$_ } if $_ ne $out_sec; } print "
    \n"; } if ( $bdepends || $rdepends ) { local ($flag) = 0; local ($last) = ''; print qq{Requires: }; foreach ( sort split( /\s+/, "$bdepends $rdepends" ) ) { # delete double entries next if $_ eq $last; $last = $_; print ", " if $flag; $flag++; print qq{$_}; } print "
    \n"; } print qq[
    ]; # XXX: should be done in a CSS print qq[
     
    ]; print qq[\n\n]; } # search and output sub search_ports { local (@a) = (); local ( $key, $name, $text ); foreach $key ( sort keys %today ) { next if $today{$key} !~ /$query/oi; @a = split( /\|/, $today{$key} ); $name = $a[0]; #$name =~ s/(\W)/\\$1/g; $text = $a[3]; #$text =~ s/(\W)/\\$1/g; if ( $section ne "all" ) { next if $a[6] !~ /^$section(\s|$)/; } #warn "$stype:$query: $name $text\n"; if ( $stype eq "name" && $name =~ /$query/o ) { &out( $today{$key} ); } elsif ( $stype eq "text" && $text =~ /$query/oi ) { &out( $today{$key} ); } elsif ( $stype eq "all" && ( $text =~ /$query/oi || $name =~ /$query/io ) ) { &out( $today{$key} ); } elsif ( $stype eq 'maintainer' && $a[5] =~ /$query/io ) { &out( $today{$key} ); } elsif ( $stype eq 'requires' && ( $a[7] =~ /$query/io || $a[8] =~ /$query/io ) ) { &out( $today{$key} ); } } } sub forms { print qq{

    FreeBSD Ports [short description followed ...] FAQ

    }; print qq{

    "Package Name" searches for the name of a port or distribution. "Description" searches case-insensitive in a short comment about the port. "All" searches case-insensitive for the package name and in the description about the port.

    Search for:

    }; } sub footer { print qq{ Powered by FreeBSD © 1996-2012 by Wolfram Schneider. All rights reserved.
    }; #print q{$FreeBSD$} . "
    \n"; print qq{Please direct questions about this service to $mailto
    \n}; print qq{General questions about FreeBSD ports should be sent to } . qq{} . qq{$mailtoList
    \n}; print &last_update_message; print qq{
    \n

    \n}; } sub check_input { if ($query) { $stype = "all" if !$stype; if ( !( $stype eq "name" || $stype eq "text" || $stype eq "maintainer" || $stype eq "requires" || $stype eq "all" ) ) { &warn( "unknown search type ``$type'', use `all', `text', `name', 'requires', or `maintainer'\n" ); &exit(0); } else { return; } } } sub faq { print qq{

    FreeBSD Ports Search FAQ

    Keywords

    Description
    A more detailed description.
    Download
    Download the ports directory.
    Package
    Download the pre-compiled software package.
    Changes
    Read the latest changes.
    Sources
    Links to all source files.

    Misc

    Package download links point to the FreeBSD 6-STABLE version and not to the latest releases.

    The script ports.cgi use the file $ports_database as database for it's operations. $ports_database is updated automatically every two hours.

    You may also search the ports manual pages.

    Back to the search engine


    }; } # # Main # &init_variables; $query_string = &env('QUERY_STRING'); $path_info = &env('PATH_INFO'); &decode_form( $query_string, *form ); $section = $form{'sektion'}; $section = 'all' if ( !$section ); $query = $form{'query'}; $stype = $form{'stype'}; $script_name = &env('SCRIPT_NAME'); if ( $path_info eq "/source" ) { # XXX print "Content-type: text/plain\n\n"; open( R, $0 ) || do { print "ick!\n"; &exit; }; while () { print } close R; - &exit; -} - -# Full text search in ports//port>/pkg-descr -if ( $stype eq 'pkgdescr' ) { - local ($url) = - 'http://www.FreeBSD.org/cgi/search.cgi?source=pkgdescr&max=25'; - $query =~ s/\s+/+/g; - print "Location: $url&words=$query\n\n"; &exit; } if ( $stype eq "faq" ) { print &short_html_header( "FreeBSD Ports Search FAQ", 1 ); &faq; &footer; print &html_footer; &exit(0); } print &html_header( "FreeBSD Ports Search", 1 ); # allow `/ports.cgi?netscape' where 'netscape' is the query port to search # this make links to this script shorter if ( !$query && $query_string =~ /^([^=&]+)$/ ) { $query = $1; } # automatically read collections, need only 0.2 sec on a pentium @sec = &readcoll; $query =~ s/"/ /g; $query =~ s/^\s+//; $query =~ s/\s+$//; &forms; if ( $query_string eq "" || !$query ) { &footer; print &html_footer; &exit(0); } &check_input; $counter = 0; # search if ($query) { &readindex( *today, *msec ); $query =~ s/([^\w\^])/\\$1/g; &search_ports; } if ( !$counter ) { print "Sorry, nothing found.\n"; print qq{You may look for other } . qq{FreeBSD Search Services.\n}; } else { print "
    \n"; } print qq{
    \n}; &footer; print &html_footer; Index: head/en_US.ISO8859-1/htdocs/layout/css/query-pr.css =================================================================== --- head/en_US.ISO8859-1/htdocs/layout/css/query-pr.css (revision 46873) +++ head/en_US.ISO8859-1/htdocs/layout/css/query-pr.css (nonexistent) @@ -1,172 +0,0 @@ -/* - * CSS stylesheet for the new query-pr interface. - * - * Copyright (C) 2006-2011, Shaun Amott - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -.attachwin { - font-size: 100%; - margin-top: 0px; - margin-bottom: 0px; - overflow: scroll; - max-height: 600px; - max-width: 655px; - width: 655px; - margin-left: auto; - margin-right: auto; -} - -pre { - font-family: "Courier New", "Courier", monospace; - font-size: 100%; - white-space: pre; -} - -/* Fields */ - -td { - vertical-align: top; -} - -.mfield, p { - padding-left: 1.4em; - padding-right: 1.4em; -} - -.headtable { - border-left: 1px solid #999999; - border-bottom: 1px solid #999999; - width: 100%; - margin-bottom: 16px; -} - -.headtable .key { - font-weight: bold; - width: 12em; -} - -.headtable .val { -} - -.headtable .blkhead { - font-weight: bold; -} - -.mfieldtable { - border-left: 1px solid #999999; - border-bottom: 1px solid #999999; - width: 100%; - margin-bottom: 16px; - margin-top: 16px; - font-weight: bold; -} - -/* Patch block */ - -.patchblock { - border: 1px solid #999999; - background-color: #EFEFBB; - margin-left: auto; - margin-right: auto; - max-width: 675px; - margin-top: 1.4em; -} -.patchblock .info { - background-color: #ACACAA; - text-align: left; -} -.patchblock .content { -} - - -/* Audit block */ - -.auditblock { - margin-left: auto; - margin-right: auto; - border: 1px solid #999999; - background-color: #EFEFEF; - width: 90%; - margin-top: 1.4em; -} -.auditblock .key { - font-weight: bold; - width: 6.0em; -} -.auditblock .info { - background-color: #ACACAA; - text-align: center; -} - - -/* Reply block */ - -.replyblock { - margin-left: auto; - margin-right: auto; - border: 1px solid #999999; - background-color: #EFEFEF; - width: 90%; - margin-top: 1.4em; -} -.replyblock .info { - background-color: #AA9900; - text-align: center; -} -.replyblock .key { - background-color: #CCCCCC; - font-weight: bold; - width: 6.0em; -} -.replyblock .val { - background-color: #CCCCCC; -} - -.quote0 { color: #DD0000; } -.quote1 { color: #0000DD; } - -.patch_plusline { color: #FF0000; } -.patch_minusline { color: #0000FF; } -.patch_contextline { color: #00AA00; } -.patch_revinfo { font-weight: bold; } -.patch_hunkinfo { font-weight: bold; } - -.mimeboundary { border-top: 1px #DD0000 dashed; border-bottom: 0px; } - -.elidemsg { - padding: 4px; - background-color: #C6C6C6; - font-weight: bold; - color: #444444; -} - - -/* Footer */ - -.footerlinks { - margin-top: 40px; -} Property changes on: head/en_US.ISO8859-1/htdocs/layout/css/query-pr.css ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/layout/css/Makefile =================================================================== --- head/en_US.ISO8859-1/htdocs/layout/css/Makefile (revision 46873) +++ head/en_US.ISO8859-1/htdocs/layout/css/Makefile (revision 46874) @@ -1,21 +1,20 @@ # $FreeBSD$ .if exists(../Makefile.conf) .include "../Makefile.conf" .endif .if exists(../Makefile.inc) .include "../Makefile.inc" .endif DATA= DATA+= fixed.css DATA+= fixed_large.css DATA+= global.css DATA+= iefixes.css DATA+= layout.css DATA+= navigation.css -DATA+= query-pr.css DATA+= table.css DATA+= text.css .include "${DOC_PREFIX}/share/mk/web.site.mk" Index: head/en_US.ISO8859-1/htdocs/platforms/ia64/index.xml =================================================================== --- head/en_US.ISO8859-1/htdocs/platforms/ia64/index.xml (revision 46873) +++ head/en_US.ISO8859-1/htdocs/platforms/ia64/index.xml (revision 46874) @@ -1,57 +1,48 @@ ]> &title; $FreeBSD$ McKinley die -

    Search the ia64 mailing list archives:

    - -
    - - - - -
    -

    Table Of Contents

    Introduction

    The FreeBSD/ia64 project pages contain information about the FreeBSD port to Intel's IA-64 architecture; officially known as the Intel Itanium® Processor Family (IPF). As with the port itself, these pages are still mostly a work in progress.

    Current status

    The ia64 port is considered a tier 2 platform through FreeBSD 10. After this it will no longer be supported.

    Index: head/en_US.ISO8859-1/htdocs/search/opensearch/web-all.xml =================================================================== --- head/en_US.ISO8859-1/htdocs/search/opensearch/web-all.xml (revision 46873) +++ head/en_US.ISO8859-1/htdocs/search/opensearch/web-all.xml (nonexistent) @@ -1,17 +0,0 @@ - - - - - - FreeBSD Web All - FreeBSD Web + Man + Ports Pages - FreeBSD Web Pages - - The FreeBSD Project - http://www.freebsd.org/ - http://www.freebsd.org/favicon.ico - en - ISO-8859-1 - - Property changes on: head/en_US.ISO8859-1/htdocs/search/opensearch/web-all.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/xml \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/search/opensearch/query-pr.xml =================================================================== --- head/en_US.ISO8859-1/htdocs/search/opensearch/query-pr.xml (revision 46873) +++ head/en_US.ISO8859-1/htdocs/search/opensearch/query-pr.xml (nonexistent) @@ -1,17 +0,0 @@ - - - - - - FreeBSD Bugs - FreeBSD Problem Reports - FreeBSD Problem Reports - - The FreeBSD Project - http://www.freebsd.org/ - http://www.freebsd.org/favicon.ico - en - ISO-8859-1 - - Property changes on: head/en_US.ISO8859-1/htdocs/search/opensearch/query-pr.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/xml \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/search/opensearch/web.xml =================================================================== --- head/en_US.ISO8859-1/htdocs/search/opensearch/web.xml (revision 46873) +++ head/en_US.ISO8859-1/htdocs/search/opensearch/web.xml (nonexistent) @@ -1,17 +0,0 @@ - - - - - - FreeBSD Web - FreeBSD Web Pages - FreeBSD Web Pages - - The FreeBSD Project - http://www.freebsd.org/ - http://www.freebsd.org/favicon.ico - en - ISO-8859-1 - - Property changes on: head/en_US.ISO8859-1/htdocs/search/opensearch/web.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/xml \ No newline at end of property Index: head/en_US.ISO8859-1/htdocs/search/opensearch/Makefile =================================================================== --- head/en_US.ISO8859-1/htdocs/search/opensearch/Makefile (revision 46873) +++ head/en_US.ISO8859-1/htdocs/search/opensearch/Makefile (revision 46874) @@ -1,29 +1,26 @@ # $FreeBSD$ .if exists(../Makefile.conf) .include "../Makefile.conf" .endif .if exists(../Makefile.inc) .include "../Makefile.inc" .endif DOCS+= opensearch.xml INDEXLINK= opensearch.html DATA= DATA+= opensearch.js DATA+= man.xml DATA+= man-freebsd-release-ports.xml DATA+= ports.xml -DATA+= query-pr.xml -DATA+= web.xml -DATA+= web-all.xml DATA+= message-id.xml # external sites DATA+= markmail.xml DATA+= rambler.xml DATA+= portoverview.xml .include "${DOC_PREFIX}/share/mk/web.site.mk" Index: head/en_US.ISO8859-1/htdocs/search/opensearch/opensearch.xml =================================================================== --- head/en_US.ISO8859-1/htdocs/search/opensearch/opensearch.xml (revision 46873) +++ head/en_US.ISO8859-1/htdocs/search/opensearch/opensearch.xml (revision 46874) @@ -1,66 +1,63 @@ ]> &title; $FreeBSD$

    Firefox put a few popular search sites in the Search Bar in the upper-right corner of Firefox. Click on a item to add the FreeBSD Search Services to your Firefox Search Bar.

    By the FreeBSD.org web site

    External Plugins

    Supported browsers:: Firefox 2.x, 3.x and IE 7.x or later

    External help links: Firefox Search Engines

    Return to the search page


    Index: head/en_US.ISO8859-1/htdocs/search/search.xml =================================================================== --- head/en_US.ISO8859-1/htdocs/search/search.xml (revision 46873) +++ head/en_US.ISO8859-1/htdocs/search/search.xml (revision 46874) @@ -1,706 +1,113 @@ ]> &title; $FreeBSD$

    FreeBSD Search Services

    List of FreeBSD OpenSearch Plugins


    Web pages (including FAQ and Handbook)

    Search within sites:

    - +

    Manual Pages

    Search for:



    Ported applications

    Search for:



    Mailing list archives

    The mailing list archive indexes are now updated weekly!

    An alternative way to read the mailing lists archives is to use the Mailman/Pipermail list archive (note that this archive only carries messages from March 2003 onward).

    The mailing lists (as well as many others) have also been archived by MarkMail.

    -
    - -

    Search for:

    - -

    Note: Use the operators AND or NOT to limit your - search. Look here - for more hints.

    - -


    - Limit the number of results to - - - - sort by - - - - Search - - - -
    - -

    - -

    In archive(s):

    - -

    Note: Searching more than three or four archives at once may - yield inaccurate results.

    - -

    General Archives

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AdvocacyFreeBSD Evangelism
    AnnounceImportant events / milestones
    ChatRandom topics (sometimes) related to FreeBSD
    JobsFreeBSD related job announcements and resumes
    NewbiesNew FreeBSD users activities and discussion
    QuestionsGeneral questions
    Security NotificationsAnnouncements regarding FreeBSD security issues (including, e.g., CERT notices)
    User-GroupsA forum for FreeBSD user groups
    - -

    System Use and Administration

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    BugsReports and discussion of bugs
    ClusterDiscussions related to using FreeBSD in clustered environments
    HardwareDiscussions concerning hardware as it relates to FreeBSD
    ISPDiscussions for ISPs using FreeBSD
    PerformanceDiscussions of the performance of FreeBSD under high load or extreme conditions
    SecurityFreeBSD computer security issues (DES, Kerberos, etc.)
    StableDiscussion of the FreeBSD-stable branch of the development tree
    - -

    Developer

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACPIACPI and power management development
    AfsPorting and using AFS (the Andrew File System) from CMU/Transarc
    AlphaPorting FreeBSD to the DEC Alpha
    AMD64Porting FreeBSD to the AMD64
    ApacheDiscussion about Apache related ports
    ArchArchitecture and design discussions
    ARMPorting FreeBSD to the StrongArm
    ATMUsing ATM networking with FreeBSD
    AuditSource code audit project
    BinupDesign and development of the binary update system
    BluetoothDiscussion about FreeBSD support for Bluetooth
    ChromiumFreeBSD-specific Chromium issues
    BugbustersCoordination of the Problem Report handling effort
    Commit (all)All Changes made to all FreeBSD source trees
    Commit (doc)Changes made to the FreeBSD documents source tree
    Commit (ports)Changes made to the FreeBSD ports source tree
    Commit (projects)Changes made to the FreeBSD projects source tree
    Commit (src)Changes made to the FreeBSD main source tree
    ConfigDevelopment of FreeBSD installation and configuration tools
    CurrentUse of FreeBSD-current sources
    CVSwebTechnical discussions about use, development and maintenance of FreeBSD-CVSweb
    DatabaseDiscussing database use and development under FreeBSD
    DocDiscussions concerning documentation
    DriversWriting device drivers for FreeBSD
    EmbeddedDiscussions about using FreeBSD in embedded systems
    EmulationEmulating other systems on FreeBSD
    FirewireDesign and implementation - of a Firewire (aka IEEE 1394 aka iLink) subsystem for FreeBSD
    FsDiscussions concerning FreeBSD filesystems
    GEOMGEOM-specific discussions and implementations
    GnomeDiscussions concerning the FreeBSD GNOME project
    HackersGeneral technical discussions
    I18nFreeBSD Internationalization
    i386i386-specific issues for FreeBSD
    ia32FreeBSD on the IA32 platform
    ia64Porting FreeBSD to Intel's upcoming IA64 systems
    ipfwTechnical discussion concerning the redesign of the IP firewall code
    ISDNDevelopment of ISDN support for FreeBSD
    &java;JDK porting and application development
    libhThe second generation installation and package system
    MIPSPorting FreeBSD to MIPS
    MultimediaDiscussions about FreeBSD as a multimedia platform
    MobileUsing FreeBSD in a mobile environment
    MozillaPorting mozilla to FreeBSD
    NetNetworking discussion and TCP/IP source code
    New BusTechnical discussions on Bus Architecture
    OfficeOffice applications on FreeBSD
    OpenOfficeDiscussions concerning the FreeBSD OpenOffice and StarOffice ports
    PerlMaintenance of a number of perl-related ports
    PFDiscussion and questions about the packet filter firewall system
    PlatformsCross-platform FreeBSD issues (non-Intel FreeBSD ports)
    PolicyFreeBSD core team policy decisions
    Ports BugsBug reports concerning FreeBSD's ports collection
    PortsDiscussions concerning FreeBSD's ports collection
    PPCPorting FreeBSD to the PowerPC
    PythonFreeBSD-specific Python issues
    QADiscussion of quality assurance issues
    rcDiscussion related to /etc/rc.d design and implementation
    RealtimeDevelopment of realtime extensions to FreeBSD
    SCSIDiscussions about FreeBSD's SCSI support
    SmallUsing FreeBSD in embedded applications
    SMPFreeBSD on multi-processor platforms
    SPARC64Porting FreeBSD to the SPARC64
    StandardsFreeBSD Conformance to the C99 and the &posix; standards
    ThreadsDiscussion about threading models in FreeBSD, including KSE and others
    TileraPorting FreeBSD to the Tilera family of CPUs
    TokenringSupport Token Ring in FreeBSD
    ToolchainMaintenance of FreeBSD's integrated toolchain
    USBDiscussion about FreeBSD support for USB
    VuXMLDiscussion on VuXML infrastructure
    X11Maintenance and support of X11 on FreeBSD
    XFCEXFCE for FreeBSD — porting and maintaining
    - -

    Limited lists

    - - - - - - - - - - - - - - - - - - - - - -
    HubsPeople running mirror sites (infrastructural support)
    InstallInstallation system development
    Wireless802.11 stack, tools, device driver development
    WWWWeb site maintainers
    - -

    -
    - +
    +

    + + + + + + +
    + + +
    Index: head/share/xml/header.ent =================================================================== --- head/share/xml/header.ent (revision 46873) +++ head/share/xml/header.ent (revision 46874) @@ -1,211 +1,211 @@ '> '> Site Map | Legal Notices | © 1995–2015 The FreeBSD Project. All rights reserved.'> home   |   contact   |   legal   |   ©right;'> FreeBSD Home Page'> '> ]]> Header And Logo'> FreeBSD '>
    .
    .
    '>   '> '> Site Navigation'> '> Peripheral Links'>
    '> Skip site navigation (1) Skip section navigation (2) '> &header2.topnav.label; &header2.topnav; '> This document describes how to build and update the FreeBSD Web pages from the Subversion repository by hand.

    '>