From a3b8de1c1aa78ce44fad3667b564f8b41c2d38e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Sun, 13 Sep 2015 17:24:00 +0200 Subject: [PATCH 1/6] Update to 4.4.10 --- .gitignore | 1 + bugzilla.spec | 11 +++++++++-- sources | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d638e66..b874aa5 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ bugzilla-3.6.1.tar.gz /bugzilla-4.4.5.tar.gz /bugzilla-4.4.6.tar.gz /bugzilla-4.4.8.tar.gz +/bugzilla-4.4.10.tar.gz diff --git a/bugzilla.spec b/bugzilla.spec index 8b75e30..029f517 100644 --- a/bugzilla.spec +++ b/bugzilla.spec @@ -4,9 +4,9 @@ Summary: Bug tracking system URL: http://www.bugzilla.org/ Name: bugzilla -Version: 4.4.8 +Version: 4.4.10 Group: Applications/Publishing -Release: 2%{?dist} +Release: 1%{?dist} License: MPLv1.1 Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-%{version}.tar.gz Source1: bugzilla-httpd-conf @@ -147,6 +147,7 @@ mkdir -p ${RPM_BUILD_ROOT}/%{bzdatadir} mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/bugzilla install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/bugzilla.conf install -m 0755 -D -p %{SOURCE3} ${RPM_BUILD_ROOT}%{bzinstallprefix}/bugzilla/cron.daily +rm ${RPM_BUILD_ROOT}%{bzinstallprefix}/bugzilla/LICENSE %post (pushd %{bzinstallprefix}/bugzilla > /dev/null @@ -159,6 +160,7 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/*.pl %{bzinstallprefix}/bugzilla/Bugzilla.pm %{bzinstallprefix}/bugzilla/robots.txt +%{bzinstallprefix}/bugzilla/taskgraph.json %{bzinstallprefix}/bugzilla/Bugzilla %{bzinstallprefix}/bugzilla/extensions %{bzinstallprefix}/bugzilla/images @@ -175,6 +177,7 @@ popd > /dev/null) %defattr(-,root,root,-) %doc README %doc README.fedora +%license LICENSE %dir %{bzdatadir} %defattr(0750,root,apache,-) %dir %{_sysconfdir}/bugzilla @@ -226,6 +229,10 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm %changelog +* Sun Sep 13 2015 Emmanuel Seyman - 4.4.10-1 +- Update to 4.4.10 +- Use %%license to flag the LICENSE file + * Wed Jun 17 2015 Fedora Release Engineering - 4.4.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index b0f7553..a849a30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -86aed922fc99aee0498f864f18d9be96 bugzilla-4.4.8.tar.gz +c0490b7461a0d6520d118c720e1c3f37 bugzilla-4.4.10.tar.gz From a38e23ecaea3051bb85f787153cc0a46312eb9c2 Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Wed, 23 Dec 2015 16:21:10 +0100 Subject: [PATCH 2/6] Update to 4.4.11 --- .gitignore | 1 + bugzilla.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b874aa5..ec294de 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ bugzilla-3.6.1.tar.gz /bugzilla-4.4.6.tar.gz /bugzilla-4.4.8.tar.gz /bugzilla-4.4.10.tar.gz +/bugzilla-4.4.11.tar.gz diff --git a/bugzilla.spec b/bugzilla.spec index 029f517..0ad0156 100644 --- a/bugzilla.spec +++ b/bugzilla.spec @@ -4,7 +4,7 @@ Summary: Bug tracking system URL: http://www.bugzilla.org/ Name: bugzilla -Version: 4.4.10 +Version: 4.4.11 Group: Applications/Publishing Release: 1%{?dist} License: MPLv1.1 @@ -229,6 +229,9 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm %changelog +* Wed Dec 23 2015 Emmanuel Seyman - 4.4.11-1 +- Update to 4.4.11 + * Sun Sep 13 2015 Emmanuel Seyman - 4.4.10-1 - Update to 4.4.10 - Use %%license to flag the LICENSE file diff --git a/sources b/sources index a849a30..17f0e7a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0490b7461a0d6520d118c720e1c3f37 bugzilla-4.4.10.tar.gz +d3380aba9b4f4b606a804b00f1a56bf1 bugzilla-4.4.11.tar.gz From 5bfd8aefa9138dc7688a4f4fe62a0df52b471e7d Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Sun, 1 May 2016 18:14:04 +0200 Subject: [PATCH 3/6] backport patch to prevent email address encoding --- bugzilla-email-encode.patch | 50 +++++++++++++++++++++++++++++++++++++ bugzilla.spec | 8 +++++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 bugzilla-email-encode.patch diff --git a/bugzilla-email-encode.patch b/bugzilla-email-encode.patch new file mode 100644 index 0000000..70c2953 --- /dev/null +++ b/bugzilla-email-encode.patch @@ -0,0 +1,50 @@ +diff --git a/Bugzilla/MIME.pm b/Bugzilla/MIME.pm +index 7b5843a..8c6c141 100644 +--- a/Bugzilla/MIME.pm ++++ b/Bugzilla/MIME.pm +@@ -13,9 +13,6 @@ use warnings; + + use parent qw(Email::MIME); + +-use Encode qw(encode); +-use Encode::MIME::Header; +- + sub new { + my ($class, $msg) = @_; + state $use_utf8 = Bugzilla->params->{'utf8'}; +@@ -79,20 +76,12 @@ sub as_string { + # MIME-Version must be set otherwise some mailsystems ignore the charset + $self->header_set('MIME-Version', '1.0') if !$self->header('MIME-Version'); + +- # Encode the headers correctly in quoted-printable ++ # Encode the headers correctly. + foreach my $header ($self->header_names) { + my @values = $self->header($header); +- # We don't recode headers that happen multiple times. +- next if scalar(@values) > 1; +- if (my $value = $values[0]) { +- utf8::decode($value) unless $use_utf8 && utf8::is_utf8($value); +- +- # avoid excessive line wrapping done by Encode. +- local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 998; ++ map { utf8::decode($_) if defined($_) && !utf8::is_utf8($_) } @values; + +- my $encoded = encode('MIME-Q', $value); +- $self->header_set($header, $encoded); +- } ++ $self->header_str_set($header, @values); + } + + # Ensure the character-set and encoding is set correctly on single part +diff --git a/attachment.cgi b/attachment.cgi +index 5db8f59..40b0c9d 100755 +--- a/attachment.cgi ++++ b/attachment.cgi +@@ -26,6 +26,7 @@ use Bugzilla::Attachment::PatchReader; + use Bugzilla::Token; + + use Encode qw(encode find_encoding); ++use Encode::MIME::Header; # Required to alter Encode::Encoding{'MIME-Q'}. + + # For most scripts we don't make $cgi and $template global variables. But + # when preparing Bugzilla for mod_perl, this script used these diff --git a/bugzilla.spec b/bugzilla.spec index 0ad0156..3f8c32d 100644 --- a/bugzilla.spec +++ b/bugzilla.spec @@ -6,7 +6,7 @@ URL: http://www.bugzilla.org/ Name: bugzilla Version: 4.4.11 Group: Applications/Publishing -Release: 1%{?dist} +Release: 2%{?dist} License: MPLv1.1 Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-%{version}.tar.gz Source1: bugzilla-httpd-conf @@ -14,6 +14,8 @@ Source2: README.fedora.bugzilla Source3: bugzilla.cron-daily Patch0: bugzilla-rw-paths.patch Patch1: bugzilla-yum.patch +# https://bugzilla.mozilla.org/show_bug.cgi?id=1246228 +Patch2: bugzilla-email-encode.patch BuildArch: noarch Requires: webserver, patchutils, perl(SOAP::Lite), which @@ -104,6 +106,7 @@ Contributed scripts and functions for Bugzilla %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 rm -f Bugzilla/Constants.pm.orig rm -f Bugzilla/Install/Requirements.pm.orig # Remove bundled libs @@ -229,6 +232,9 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm %changelog +* Sun May 01 2016 Emmanuel Seyman - 4.4.11-2 +- backport patch to prevent email address encoding + * Wed Dec 23 2015 Emmanuel Seyman - 4.4.11-1 - Update to 4.4.11 From 63b8ec842039a77ff35ab145969b1c1946e36f2a Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Thu, 12 May 2016 11:56:50 +0200 Subject: [PATCH 4/6] use patch from bmo #1246228 to prevent email address encoding --- bugzilla-email-encode.patch | 43 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/bugzilla-email-encode.patch b/bugzilla-email-encode.patch index 70c2953..21a457f 100644 --- a/bugzilla-email-encode.patch +++ b/bugzilla-email-encode.patch @@ -1,47 +1,48 @@ -diff --git a/Bugzilla/MIME.pm b/Bugzilla/MIME.pm -index 7b5843a..8c6c141 100644 ---- a/Bugzilla/MIME.pm -+++ b/Bugzilla/MIME.pm -@@ -13,9 +13,6 @@ use warnings; +diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm +index 6464015..1149eb0 100644 +--- a/Bugzilla/Mailer.pm ++++ b/Bugzilla/Mailer.pm +@@ -19,8 +19,6 @@ use Bugzilla::Util; - use parent qw(Email::MIME); + use Date::Format qw(time2str); -use Encode qw(encode); -use Encode::MIME::Header; -- - sub new { - my ($class, $msg) = @_; - state $use_utf8 = Bugzilla->params->{'utf8'}; -@@ -79,20 +76,12 @@ sub as_string { + use Email::Address; + use Email::MIME; + # Return::Value 1.666002 pollutes the error log with warnings about this +@@ -71,22 +69,12 @@ sub MessageToMTA { # MIME-Version must be set otherwise some mailsystems ignore the charset - $self->header_set('MIME-Version', '1.0') if !$self->header('MIME-Version'); + $email->header_set('MIME-Version', '1.0') if !$email->header('MIME-Version'); - # Encode the headers correctly in quoted-printable + # Encode the headers correctly. - foreach my $header ($self->header_names) { - my @values = $self->header($header); + foreach my $header ($email->header_names) { + my @values = $email->header($header); - # We don't recode headers that happen multiple times. - next if scalar(@values) > 1; - if (my $value = $values[0]) { -- utf8::decode($value) unless $use_utf8 && utf8::is_utf8($value); +- if (Bugzilla->params->{'utf8'} && !utf8::is_utf8($value)) { +- utf8::decode($value); +- } - - # avoid excessive line wrapping done by Encode. - local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 998; + map { utf8::decode($_) if defined($_) && !utf8::is_utf8($_) } @values; - my $encoded = encode('MIME-Q', $value); -- $self->header_set($header, $encoded); +- $email->header_set($header, $encoded); - } -+ $self->header_str_set($header, @values); ++ $email->header_str_set($header, @values); } - # Ensure the character-set and encoding is set correctly on single part + my $from = $email->header('From'); diff --git a/attachment.cgi b/attachment.cgi -index 5db8f59..40b0c9d 100755 +index e003e1f..319e46f 100755 --- a/attachment.cgi +++ b/attachment.cgi -@@ -26,6 +26,7 @@ use Bugzilla::Attachment::PatchReader; - use Bugzilla::Token; +@@ -31,6 +31,7 @@ use Bugzilla::Token; + use Bugzilla::Keyword; use Encode qw(encode find_encoding); +use Encode::MIME::Header; # Required to alter Encode::Encoding{'MIME-Q'}. From 8cb63c26b1a459e73b16703b4ecb3a61c7ba2ff1 Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Tue, 17 May 2016 23:10:47 +0200 Subject: [PATCH 5/6] Update to 4.4.12, dropping backported patch --- .gitignore | 1 + bugzilla-email-encode.patch | 51 ------------------------------------- bugzilla.spec | 10 ++++---- sources | 2 +- 4 files changed, 7 insertions(+), 57 deletions(-) delete mode 100644 bugzilla-email-encode.patch diff --git a/.gitignore b/.gitignore index ec294de..c624637 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ bugzilla-3.6.1.tar.gz /bugzilla-4.4.8.tar.gz /bugzilla-4.4.10.tar.gz /bugzilla-4.4.11.tar.gz +/bugzilla-4.4.12.tar.gz diff --git a/bugzilla-email-encode.patch b/bugzilla-email-encode.patch deleted file mode 100644 index 21a457f..0000000 --- a/bugzilla-email-encode.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/Bugzilla/Mailer.pm b/Bugzilla/Mailer.pm -index 6464015..1149eb0 100644 ---- a/Bugzilla/Mailer.pm -+++ b/Bugzilla/Mailer.pm -@@ -19,8 +19,6 @@ use Bugzilla::Util; - - use Date::Format qw(time2str); - --use Encode qw(encode); --use Encode::MIME::Header; - use Email::Address; - use Email::MIME; - # Return::Value 1.666002 pollutes the error log with warnings about this -@@ -71,22 +69,12 @@ sub MessageToMTA { - # MIME-Version must be set otherwise some mailsystems ignore the charset - $email->header_set('MIME-Version', '1.0') if !$email->header('MIME-Version'); - -- # Encode the headers correctly in quoted-printable -+ # Encode the headers correctly. - foreach my $header ($email->header_names) { - my @values = $email->header($header); -- # We don't recode headers that happen multiple times. -- next if scalar(@values) > 1; -- if (my $value = $values[0]) { -- if (Bugzilla->params->{'utf8'} && !utf8::is_utf8($value)) { -- utf8::decode($value); -- } -- -- # avoid excessive line wrapping done by Encode. -- local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 998; -+ map { utf8::decode($_) if defined($_) && !utf8::is_utf8($_) } @values; - -- my $encoded = encode('MIME-Q', $value); -- $email->header_set($header, $encoded); -- } -+ $email->header_str_set($header, @values); - } - - my $from = $email->header('From'); -diff --git a/attachment.cgi b/attachment.cgi -index e003e1f..319e46f 100755 ---- a/attachment.cgi -+++ b/attachment.cgi -@@ -31,6 +31,7 @@ use Bugzilla::Token; - use Bugzilla::Keyword; - - use Encode qw(encode find_encoding); -+use Encode::MIME::Header; # Required to alter Encode::Encoding{'MIME-Q'}. - - # For most scripts we don't make $cgi and $template global variables. But - # when preparing Bugzilla for mod_perl, this script used these diff --git a/bugzilla.spec b/bugzilla.spec index 3f8c32d..7dd8074 100644 --- a/bugzilla.spec +++ b/bugzilla.spec @@ -4,9 +4,9 @@ Summary: Bug tracking system URL: http://www.bugzilla.org/ Name: bugzilla -Version: 4.4.11 +Version: 4.4.12 Group: Applications/Publishing -Release: 2%{?dist} +Release: 1%{?dist} License: MPLv1.1 Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-%{version}.tar.gz Source1: bugzilla-httpd-conf @@ -14,8 +14,6 @@ Source2: README.fedora.bugzilla Source3: bugzilla.cron-daily Patch0: bugzilla-rw-paths.patch Patch1: bugzilla-yum.patch -# https://bugzilla.mozilla.org/show_bug.cgi?id=1246228 -Patch2: bugzilla-email-encode.patch BuildArch: noarch Requires: webserver, patchutils, perl(SOAP::Lite), which @@ -106,7 +104,6 @@ Contributed scripts and functions for Bugzilla %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 rm -f Bugzilla/Constants.pm.orig rm -f Bugzilla/Install/Requirements.pm.orig # Remove bundled libs @@ -232,6 +229,9 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm %changelog +* Tue May 17 2016 Emmanuel Seyman - 4.4.12-1 +- Update to 4.4.12, dropping backported patch + * Sun May 01 2016 Emmanuel Seyman - 4.4.11-2 - backport patch to prevent email address encoding diff --git a/sources b/sources index 17f0e7a..2468bde 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d3380aba9b4f4b606a804b00f1a56bf1 bugzilla-4.4.11.tar.gz +32b2ddb6d544e3599043cc58a23a0c5d bugzilla-4.4.12.tar.gz From ed46ff10f2fc3baf8441da4fda7322b5331b358c Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Sun, 27 Nov 2016 11:47:58 +0100 Subject: [PATCH 6/6] Check for perl(JSON::RPC::Legacy::Server::CGI) instead of perl(JSON::RPC) --- bugzilla-yum.patch | 15 ++++++++++++--- bugzilla.spec | 5 ++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/bugzilla-yum.patch b/bugzilla-yum.patch index 9d53205..b73d261 100644 --- a/bugzilla-yum.patch +++ b/bugzilla-yum.patch @@ -1,6 +1,15 @@ ---- bugzilla-4.01/Bugzilla/Install/Requirements.pm 2011-05-01 17:09:35.000000000 +0200 -+++ bugzilla-4.01-yum/Bugzilla/Install/Requirements.pm 2011-05-01 17:11:28.000000000 +0200 -@@ -587,7 +587,7 @@ +--- bugzilla-5.0.3/Bugzilla/Install/Requirements.pm.orig 2016-11-13 11:03:43.977035344 +0100 ++++ bugzilla-5.0.3/Bugzilla/Install/Requirements.pm 2016-11-13 11:16:26.115320528 +0100 +@@ -304,7 +304,7 @@ sub OPTIONAL_MODULES { + }, + { + package => 'JSON-RPC', +- module => 'JSON::RPC', ++ module => 'JSON::RPC::Legacy::Server::CGI', + version => 0, + feature => ['jsonrpc'], + }, +@@ -648,7 +648,7 @@ if ($output && $check_results->{any_missing} && !ON_ACTIVESTATE && !$check_results->{hide_all}) { diff --git a/bugzilla.spec b/bugzilla.spec index 7dd8074..1765e6d 100644 --- a/bugzilla.spec +++ b/bugzilla.spec @@ -6,7 +6,7 @@ URL: http://www.bugzilla.org/ Name: bugzilla Version: 4.4.12 Group: Applications/Publishing -Release: 1%{?dist} +Release: 2%{?dist} License: MPLv1.1 Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-%{version}.tar.gz Source1: bugzilla-httpd-conf @@ -229,6 +229,9 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm %changelog +* Sun Nov 27 2016 Emmanuel Seyman - 4.4.12-2 +- Check for perl(JSON::RPC::Legacy::Server::CGI) instead of perl(JSON::RPC) + * Tue May 17 2016 Emmanuel Seyman - 4.4.12-1 - Update to 4.4.12, dropping backported patch