From owner-svn-ports-all@freebsd.org Sun Jan 10 17:04:49 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 213B3A6B2AB; Sun, 10 Jan 2016 17:04:49 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F05371F1D; Sun, 10 Jan 2016 17:04:48 +0000 (UTC) (envelope-from ohauer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0AH4m5E084935; Sun, 10 Jan 2016 17:04:48 GMT (envelope-from ohauer@FreeBSD.org) Received: (from ohauer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0AH4lq8084932; Sun, 10 Jan 2016 17:04:47 GMT (envelope-from ohauer@FreeBSD.org) Message-Id: <201601101704.u0AH4lq8084932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ohauer set sender to ohauer@FreeBSD.org using -f From: Olli Hauer Date: Sun, 10 Jan 2016 17:04:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r405729 - in head/devel/bugzilla50: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2016 17:04:49 -0000 Author: ohauer Date: Sun Jan 10 17:04:47 2016 New Revision: 405729 URL: https://svnweb.freebsd.org/changeset/ports/405729 Log: - Backport upstream bug #1235395 PR: 206103 Submitted by: Mahdi Mokhtari Obtained from: https://bugzilla.mozilla.org/show_bug.cgi?id=1235395 MFH: 2016Q1 Added: head/devel/bugzilla50/files/patch-PR206103 (contents, props changed) Modified: head/devel/bugzilla50/Makefile Modified: head/devel/bugzilla50/Makefile ============================================================================== --- head/devel/bugzilla50/Makefile Sun Jan 10 17:04:43 2016 (r405728) +++ head/devel/bugzilla50/Makefile Sun Jan 10 17:04:47 2016 (r405729) @@ -2,7 +2,7 @@ PORTNAME= bugzilla PORTVERSION= 5.0.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= MOZILLA/webtools MOZILLA/webtools/archived Added: head/devel/bugzilla50/files/patch-PR206103 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/bugzilla50/files/patch-PR206103 Sun Jan 10 17:04:47 2016 (r405729) @@ -0,0 +1,150 @@ +# PR 206103 +# Upstream PR: https://bugzilla.mozilla.org/show_bug.cgi?id=1235395 +Index: files/patch-Bugzilla_Mailer.pm +=================================================================== +--- files/patch-Bugzilla_Mailer.pm.orig 2016-01-10 16:55:40 UTC ++++ files/patch-Bugzilla_Mailer.pm +@@ -0,0 +1,101 @@ ++# Bug 1235395 - whine.pl broken due to a missing generate_email() routine ++# https://bugzilla.mozilla.org/show_bug.cgi?id=1235395 ++# Status: Upstreamed, pending next release ++ ++--- Bugzilla/Mailer.pm.orig 2015-12-22 21:22:10 UTC +++++ Bugzilla/Mailer.pm ++@@ -12,13 +12,13 @@ use strict; ++ use warnings; ++ ++ use parent qw(Exporter); ++-@Bugzilla::Mailer::EXPORT = qw(MessageToMTA build_thread_marker); ++- +++@Bugzilla::Mailer::EXPORT = qw(MessageToMTA build_thread_marker generate_email); ++ use Bugzilla::Constants; ++ use Bugzilla::Error; ++ use Bugzilla::Hook; ++ use Bugzilla::MIME; ++ use Bugzilla::Util; +++use Bugzilla::User; ++ ++ use Date::Format qw(time2str); ++ ++@@ -161,6 +161,67 @@ sub send_staged_mail { ++ } ++ } ++ +++sub generate_email { +++ my ($vars, $templates) = @_; +++ my ($lang, $email_format, $msg_text, $msg_html, $msg_header); +++ state $use_utf8 = Bugzilla->params->{'utf8'}; +++ +++ if ($vars->{to_user}) { +++ $lang = $vars->{to_user}->setting('lang'); +++ $email_format = $vars->{to_user}->setting('email_format'); +++ } else { +++ # If there are users in the CC list who don't have an account, +++ # use the default language for email notifications. +++ $lang = Bugzilla::User->new()->setting('lang'); +++ # However we cannot fall back to the default email_format, since +++ # it may be HTML, and many of the includes used in the HTML +++ # template require a valid user object. Instead we fall back to +++ # the plaintext template. +++ $email_format = 'text_only'; +++ } +++ +++ my $template = Bugzilla->template_inner($lang); +++ +++ $template->process($templates->{header}, $vars, \$msg_header) +++ || ThrowTemplateError($template->error()); +++ $template->process($templates->{text}, $vars, \$msg_text) +++ || ThrowTemplateError($template->error()); +++ +++ my @parts = ( +++ Bugzilla::MIME->create( +++ attributes => { +++ content_type => 'text/plain', +++ charset => $use_utf8 ? 'UTF-8' : 'iso-8859-1', +++ encoding => 'quoted-printable', +++ }, +++ body_str => $msg_text, +++ ) +++ ); +++ if ($templates->{html} && $email_format eq 'html') { +++ $template->process($templates->{html}, $vars, \$msg_html) +++ || ThrowTemplateError($template->error()); +++ push @parts, Bugzilla::MIME->create( +++ attributes => { +++ content_type => 'text/html', +++ charset => $use_utf8 ? 'UTF-8' : 'iso-8859-1', +++ encoding => 'quoted-printable', +++ }, +++ body_str => $msg_html, +++ ); +++ } +++ +++ my $email = Bugzilla::MIME->new($msg_header); +++ if (scalar(@parts) == 1) { +++ $email->content_type_set($parts[0]->content_type); +++ } else { +++ $email->content_type_set('multipart/alternative'); +++ # Some mail clients need same encoding for each part, even empty ones. +++ $email->charset_set('UTF-8') if $use_utf8; +++ } +++ $email->parts_set(\@parts); +++ return $email; +++} +++ ++ 1; ++ ++ __END__ ++@@ -173,6 +234,10 @@ Bugzilla::Mailer - Provides methods for ++ ++ =over ++ +++=item C +++ +++Generates a multi-part email message, using the supplied list of templates. +++ ++ =item C ++ ++ Sends the passed message to the mail transfer agent. +--- files/patch-Bugzilla_Product.pm.orig 2016-01-10 16:55:40 UTC ++++ files/patch-Bugzilla_Product.pm +@@ -0,0 +1,14 @@ ++# Bug 1235395 - whine.pl broken due to a missing generate_email() routine ++# https://bugzilla.mozilla.org/show_bug.cgi?id=1235395 ++# Status: Upstreamed, pending next release ++ ++--- Bugzilla/Product.pm.orig 2015-12-22 21:22:10 UTC +++++ Bugzilla/Product.pm ++@@ -22,7 +22,6 @@ use Bugzilla::Milestone; ++ use Bugzilla::Field; ++ use Bugzilla::Status; ++ use Bugzilla::Install::Requirements; ++-use Bugzilla::Mailer; ++ use Bugzilla::Series; ++ use Bugzilla::Hook; ++ use Bugzilla::FlagType; +--- files/patch-whine.pl.orig 2016-01-10 16:55:40 UTC ++++ files/patch-whine.pl +@@ -0,0 +1,22 @@ ++# Bug 1235395 - whine.pl broken due to a missing generate_email() routine ++# https://bugzilla.mozilla.org/show_bug.cgi?id=1235395 ++# Status: Upstreamed, pending next release ++ ++--- whine.pl.orig 2015-12-22 21:22:11 UTC +++++ whine.pl ++@@ -13,14 +13,13 @@ ++ use 5.10.1; ++ use strict; ++ use warnings; ++- ++ use lib qw(. lib); ++ ++ use Bugzilla; ++ use Bugzilla::Constants; ++ use Bugzilla::Search; ++ use Bugzilla::User; ++-use Bugzilla::Mailer; +++use Bugzilla::Mailer qw(MessageToMTA generate_email); ++ use Bugzilla::Util; ++ use Bugzilla::Group; ++