From 46ceb08f3e14ccc8da1d94f82beb28bdfdc66025 Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Tue, 29 Sep 2020 20:30:16 +0200 Subject: [PATCH 1/2] Remove bytecompilation macro and add upstream mail patch --- bugzilla-1855962-non-html-mail.patch | 19 +++++++++++++++++++ bugzilla.spec | 12 +++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 bugzilla-1855962-non-html-mail.patch diff --git a/bugzilla-1855962-non-html-mail.patch b/bugzilla-1855962-non-html-mail.patch new file mode 100644 index 0000000..0fd0637 --- /dev/null +++ b/bugzilla-1855962-non-html-mail.patch @@ -0,0 +1,19 @@ +diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm +index 18795d735..2075a71e1 100644 +--- a/Bugzilla/BugMail.pm ++++ b/Bugzilla/BugMail.pm +@@ -495,10 +495,10 @@ sub _generate_bugmail { + } + + my $email = Bugzilla::MIME->new($msg_header); +- if (scalar(@parts) == 1) { +- $email->content_type_set($parts[0]->content_type); +- } +- else { ++ ++ # If there's only one part, we don't need to set the overall content type ++ # because Email::MIME will automatically take it from that part (bug 1657496) ++ if (scalar(@parts) > 1) { + $email->content_type_set('multipart/alternative'); + + # Some mail clients need same encoding for each part, even empty ones. diff --git a/bugzilla.spec b/bugzilla.spec index 8883d4c..b620852 100644 --- a/bugzilla.spec +++ b/bugzilla.spec @@ -1,7 +1,3 @@ -# This package depends on automagic byte compilation -# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 -%global _python_bytecompile_extra 1 - %define bzinstallprefix %{_datadir} %define bzdatadir %{_sharedstatedir}/bugzilla @@ -9,7 +5,7 @@ Summary: Bug tracking system URL: https://www.bugzilla.org/ Name: bugzilla Version: 5.0.6 -Release: 3%{?dist} +Release: 4%{?dist} License: MPLv1.1 Source0: https://github.com/bugzilla/bugzilla/archive/release-%{version}.tar.gz Source1: bugzilla-httpd-conf @@ -18,6 +14,8 @@ Source3: bugzilla.cron-daily Patch0: bugzilla-rw-paths.patch Patch1: bugzilla-dnf.patch Patch2: bugzilla-1438957-concatenate-assets.patch +# https://bug1657496.bmoattachments.org/attachment.cgi?id=9169528 +Patch3: bugzilla-1855962-non-html-mail.patch BuildArch: noarch Requires: patchutils @@ -280,6 +278,10 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm %changelog +* Tue Sep 29 2020 Emmanuel Seyman - 5.0.6-4 +- Remove automagic Python bytecompilation macro +- Include upstream patch for text mails (#1855962) + * Wed Jul 24 2019 Fedora Release Engineering - 5.0.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From c9008a7de25f598d06a7f48f334bce19358f3f63 Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman Date: Tue, 20 Oct 2020 21:26:14 +0200 Subject: [PATCH 2/2] Apply patch --- bugzilla.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bugzilla.spec b/bugzilla.spec index b620852..c885948 100644 --- a/bugzilla.spec +++ b/bugzilla.spec @@ -5,7 +5,7 @@ Summary: Bug tracking system URL: https://www.bugzilla.org/ Name: bugzilla Version: 5.0.6 -Release: 4%{?dist} +Release: 5%{?dist} License: MPLv1.1 Source0: https://github.com/bugzilla/bugzilla/archive/release-%{version}.tar.gz Source1: bugzilla-httpd-conf @@ -162,13 +162,14 @@ Contributed scripts and functions for Bugzilla %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # Deal with changing /usr/local paths here instead of via patches -%{__perl} -pi -e 's|/usr/local/bin/python\b|%{__python3}|' contrib/*.py -%{__perl} -pi -e 's|/usr/bin/env python|%{__python3}|' contrib/bugzilla-submit/bugzilla-submit +/usr/bin/perl -pi -e 's|/usr/local/bin/python\b|%{__python3}|' contrib/*.py +/usr/bin/rm -rf contrib/bugzilla-submit grep -rl '/usr/lib/sendmail\b' contrib docs \ -| xargs %{__perl} -pi -e 's|/usr/lib/sendmail\b|%{_sbindir}/sendmail|' +| xargs /usr/bin/perl -pi -e 's|/usr/lib/sendmail\b|%{_sbindir}/sendmail|' %build # Build docs @@ -258,7 +259,6 @@ popd > /dev/null) %defattr(-,root,apache,-) %{bzinstallprefix}/bugzilla/contrib/bugzilla-queue.rhel %{bzinstallprefix}/bugzilla/contrib/bugzilla-queue.suse -%{bzinstallprefix}/bugzilla/contrib/bugzilla-submit %{bzinstallprefix}/bugzilla/contrib/bzdbcopy.pl %{bzinstallprefix}/bugzilla/contrib/bz_webservice_demo.pl %{bzinstallprefix}/bugzilla/contrib/cmdline @@ -278,6 +278,10 @@ popd > /dev/null) %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm %changelog +* Mon Oct 19 2020 Emmanuel Seyman - 5.0.6-5 +- Replace calls to %%{__perl} with /usr/bin/perl +- Remove contrib/bugzilla-submit (no longers works) (#1835451) + * Tue Sep 29 2020 Emmanuel Seyman - 5.0.6-4 - Remove automagic Python bytecompilation macro - Include upstream patch for text mails (#1855962)