[Midnightbsd-cvs] mports [23699] trunk/devel/bugzilla50: fix build issues
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jul 25 19:41:35 EDT 2018
Revision: 23699
http://svnweb.midnightbsd.org/mports/?rev=23699
Author: laffer1
Date: 2018-07-25 19:41:35 -0400 (Wed, 25 Jul 2018)
Log Message:
-----------
fix build issues
Modified Paths:
--------------
trunk/devel/bugzilla50/Makefile
trunk/devel/bugzilla50/files/pkg-message.in
Added Paths:
-----------
trunk/devel/bugzilla50/files/patch-PR619847
trunk/devel/bugzilla50/files/patch-whine.pl
Removed Paths:
-------------
trunk/devel/bugzilla50/files/patch-Bugzilla_Attachment.pm
trunk/devel/bugzilla50/files/patch-PR206103
Modified: trunk/devel/bugzilla50/Makefile
===================================================================
--- trunk/devel/bugzilla50/Makefile 2018-07-25 23:38:38 UTC (rev 23698)
+++ trunk/devel/bugzilla50/Makefile 2018-07-25 23:41:35 UTC (rev 23699)
@@ -99,9 +99,9 @@
# The docs_urlbase parameter has been removed. If documentation has not been
# compiled locally, the "Help" links and other documentation links will
# redirect to bugzilla.readthedocs.org automatically.
- ${RM} -r ${WRKSRC}/docs
- ${RM} -r ${WRKSRC}/.git
- ${RM} ${WRKSRC}/.bzrignore ${WRKSRC}/.gitignore ${WRKSRC}/.gitrev \
+ -${RM} -r ${WRKSRC}/docs
+ -${RM} -r ${WRKSRC}/.git
+ -${RM} ${WRKSRC}/.bzrignore ${WRKSRC}/.gitignore ${WRKSRC}/.gitrev \
${WRKSRC}/.travis.yml ${WRKSRC}/Build.PL ${WRKSRC}/MANIFEST.SKIP
post-patch:
@@ -128,16 +128,10 @@
.endfor
${TAR} -C ${WRKSRC} -cf - Bugzilla template | ${TAR} --unlink -C ${STAGEDIR}${WWWDIR} -xf -
@${MKDIR} ${EMPTY_DIRS_LIST:S!^!${STAGEDIR}${WWWDIR}/!}
-
-do-install-CONTRIB-on:
@${MKDIR} ${STAGEDIR}${WWWDIR}/contrib
(cd ${WRKSRC}/contrib && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/contrib)
-
-do-install-MOREBUGURL-on:
@${MKDIR} ${STAGEDIR}${WWWDIR}/extensions/MoreBugUrl
(cd ${WRKSRC}/extensions/MoreBugUrl && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/extensions/MoreBugUrl)
-
-do-install-VOTING-on:
@${MKDIR} ${STAGEDIR}${WWWDIR}/extensions/Voting
(cd ${WRKSRC}/extensions/Voting && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/extensions/Voting)
Deleted: trunk/devel/bugzilla50/files/patch-Bugzilla_Attachment.pm
===================================================================
--- trunk/devel/bugzilla50/files/patch-Bugzilla_Attachment.pm 2018-07-25 23:38:38 UTC (rev 23698)
+++ trunk/devel/bugzilla50/files/patch-Bugzilla_Attachment.pm 2018-07-25 23:41:35 UTC (rev 23699)
@@ -1,23 +0,0 @@
-# Bug 1235270 - Set submitter_id before calling _check_data()
-# https://bugzilla.mozilla.org/show_bug.cgi?id=1235270
-# Status: Upstreamed, pending next release
-
---- Bugzilla/Attachment.pm.orig 2015-12-22 21:22:10 UTC
-+++ Bugzilla/Attachment.pm
-@@ -865,6 +865,8 @@ sub create {
- sub run_create_validators {
- my ($class, $params) = @_;
-
-+ $params->{submitter_id} = Bugzilla->user->id || ThrowUserError('invalid_user');
-+
- # Let's validate the attachment content first as it may
- # alter some other attachment attributes.
- $params->{data} = $class->_check_data($params);
-@@ -872,7 +874,6 @@ sub run_create_validators {
-
- $params->{creation_ts} ||= Bugzilla->dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
- $params->{modification_time} = $params->{creation_ts};
-- $params->{submitter_id} = Bugzilla->user->id || ThrowUserError('invalid_user');
-
- return $params;
- }
Deleted: trunk/devel/bugzilla50/files/patch-PR206103
===================================================================
--- trunk/devel/bugzilla50/files/patch-PR206103 2018-07-25 23:38:38 UTC (rev 23698)
+++ trunk/devel/bugzilla50/files/patch-PR206103 2018-07-25 23:41:35 UTC (rev 23699)
@@ -1,150 +0,0 @@
-# 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);
-+- at Bugzilla::Mailer::EXPORT = qw(MessageToMTA build_thread_marker);
-+-
-++ at 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<generate_email>
-++
-++Generates a multi-part email message, using the supplied list of templates.
-++
-+ =item C<MessageToMTA>
-+
-+ 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;
-+
Added: trunk/devel/bugzilla50/files/patch-PR619847
===================================================================
--- trunk/devel/bugzilla50/files/patch-PR619847 (rev 0)
+++ trunk/devel/bugzilla50/files/patch-PR619847 2018-07-25 23:41:35 UTC (rev 23699)
@@ -0,0 +1,41 @@
+--- attachment.cgi.orig 2018-05-31 17:40:51 UTC
++++ attachment.cgi
+@@ -25,8 +25,8 @@ use Bugzilla::Attachment;
+ use Bugzilla::Attachment::PatchReader;
+ use Bugzilla::Token;
+
+-use Encode qw(encode find_encoding);
+-use Encode::MIME::Header; # Required to alter Encode::Encoding{'MIME-Q'}.
++use Encode qw(find_encoding);
++use URI::Escape qw(uri_escape_utf8);
+
+ # For most scripts we don't make $cgi and $template global variables. But
+ # when preparing Bugzilla for mod_perl, this script used these
+@@ -341,11 +341,8 @@ sub view {
+ # escape quotes and backslashes in the filename, per RFCs 2045/822
+ $filename =~ s/\\/\\\\/g; # escape backslashes
+ $filename =~ s/"/\\"/g; # escape quotes
+-
+- # Avoid line wrapping done by Encode, which we don't need for HTTP
+- # headers. See discussion in bug 328628 for details.
+- local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 10000;
+- $filename = encode('MIME-Q', $filename);
++ # Follow RFC 6266 section 4.1 (which itself points to RFC 5987 section 3.2)
++ $filename = uri_escape_utf8($filename);
+
+ my $disposition = Bugzilla->params->{'allow_attachment_display'} ? 'inline' : 'attachment';
+
+@@ -363,8 +360,11 @@ sub view {
+ }
+ }
+ }
+- print $cgi->header(-type=>"$contenttype; name=\"$filename\"",
+- -content_disposition=> "$disposition; filename=\"$filename\"",
++ # IE8 and older do not support RFC 6266. So for these old browsers
++ # we still pass the old 'filename' attribute. Modern browsers will
++ # automatically pick the new 'filename*' attribute.
++ print $cgi->header(-type=> $contenttype,
++ -content_disposition=> "$disposition; filename=\"$filename\"; filename*=UTF-8''$filename",
+ -content_length => $attachment->datasize);
+ disable_utf8();
+ print $attachment->data;
Property changes on: trunk/devel/bugzilla50/files/patch-PR619847
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/devel/bugzilla50/files/patch-whine.pl
===================================================================
--- trunk/devel/bugzilla50/files/patch-whine.pl (rev 0)
+++ trunk/devel/bugzilla50/files/patch-whine.pl 2018-07-25 23:41:35 UTC (rev 23699)
@@ -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;
+
Property changes on: trunk/devel/bugzilla50/files/patch-whine.pl
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/devel/bugzilla50/files/pkg-message.in
===================================================================
--- trunk/devel/bugzilla50/files/pkg-message.in 2018-07-25 23:38:38 UTC (rev 23698)
+++ trunk/devel/bugzilla50/files/pkg-message.in 2018-07-25 23:41:35 UTC (rev 23699)
@@ -5,8 +5,8 @@
by following mysql commands (for MySQL 4.0 or later):
GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES,
- CREATE TEMPORARY TABLES, DROP, REFERENCES
- ON <database>.* TO <dbuser>@<host>
+ CREATE TEMPORARY TABLES, DROP, REFERENCES
+ ON <database>.* TO <dbuser>@<host>
IDENTIFIED BY '<password>';
FLUSH PRIVILEGES;
More information about the Midnightbsd-cvs
mailing list