diff options
author | Mike Crute <mcrute@gmail.com> | 2017-05-24 02:44:57 +0000 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2017-05-24 02:51:28 +0000 |
commit | 2856d2fc54dc43f84340b06958c946594cae0ff8 (patch) | |
tree | 6cc5fe429feaa7e720fea90dd671a583cf8985be /bugzilla | |
parent | 96c1101ccaacb5ca2021f3a3f1a59c9f1c1c1ff7 (diff) | |
download | dockerfiles-2856d2fc54dc43f84340b06958c946594cae0ff8.tar.bz2 dockerfiles-2856d2fc54dc43f84340b06958c946594cae0ff8.tar.xz dockerfiles-2856d2fc54dc43f84340b06958c946594cae0ff8.zip |
Patch email handler
Diffstat (limited to 'bugzilla')
-rw-r--r-- | bugzilla/Dockerfile | 7 | ||||
-rw-r--r-- | bugzilla/patches/answers.pl (renamed from bugzilla/binaries/answers.pl) | 0 | ||||
-rw-r--r-- | bugzilla/patches/email_in.pl.patch | 11 |
3 files changed, 18 insertions, 0 deletions
diff --git a/bugzilla/Dockerfile b/bugzilla/Dockerfile index c1ac084..065c3f2 100644 --- a/bugzilla/Dockerfile +++ b/bugzilla/Dockerfile | |||
@@ -3,6 +3,7 @@ MAINTAINER Michael Crute <mike@crute.us> | |||
3 | ARG bz_version | 3 | ARG bz_version |
4 | 4 | ||
5 | ADD binaries/ /tmp/ | 5 | ADD binaries/ /tmp/ |
6 | ADD patches/ /tmp/ | ||
6 | 7 | ||
7 | RUN export DEBIAN_FRONTEND=noninteractive && \ | 8 | RUN export DEBIAN_FRONTEND=noninteractive && \ |
8 | echo 'Acquire::http::Proxy "http://genesis.sea1.crute.me:3142";' > /etc/apt/apt.conf && \ | 9 | echo 'Acquire::http::Proxy "http://genesis.sea1.crute.me:3142";' > /etc/apt/apt.conf && \ |
@@ -15,6 +16,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ | |||
15 | apt-get install -y \ | 16 | apt-get install -y \ |
16 | cron \ | 17 | cron \ |
17 | nginx \ | 18 | nginx \ |
19 | patch \ | ||
18 | python-boto3 \ | 20 | python-boto3 \ |
19 | runit \ | 21 | runit \ |
20 | sudo \ | 22 | sudo \ |
@@ -123,6 +125,11 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ | |||
123 | # Enable voting extension | 125 | # Enable voting extension |
124 | rm /var/www/html/bugzilla/extensions/Voting/disabled && \ | 126 | rm /var/www/html/bugzilla/extensions/Voting/disabled && \ |
125 | 127 | ||
128 | # Patch the code | ||
129 | # Update the email_in script to lookup by email instead of assuming that | ||
130 | # usernames are the same as email addresses. | ||
131 | cd / && patch -p1 < /tmp/email_in.pl.patch && \ | ||
132 | |||
126 | # Clean up | 133 | # Clean up |
127 | rm /etc/apt/apt.conf && \ | 134 | rm /etc/apt/apt.conf && \ |
128 | apt-get clean && \ | 135 | apt-get clean && \ |
diff --git a/bugzilla/binaries/answers.pl b/bugzilla/patches/answers.pl index 90b06af..90b06af 100644 --- a/bugzilla/binaries/answers.pl +++ b/bugzilla/patches/answers.pl | |||
diff --git a/bugzilla/patches/email_in.pl.patch b/bugzilla/patches/email_in.pl.patch new file mode 100644 index 0000000..e2e5ba0 --- /dev/null +++ b/bugzilla/patches/email_in.pl.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- a/var/www/html/bugzilla-release-5.1.1//email_in.pl 2016-05-16 18:48:27.000000000 +0000 | ||
2 | +++ b/var/www/html/bugzilla-release-5.1.1//email_in.pl 2017-05-17 03:53:38.978805718 +0000 | ||
3 | @@ -509,7 +509,7 @@ | ||
4 | |||
5 | my $username = $mail_fields->{'reporter'}; | ||
6 | |||
7 | -my $user = Bugzilla::User->check($username); | ||
8 | +my $user = new Bugzilla::User(Bugzilla::User::email_to_id($username, 1)); | ||
9 | Bugzilla->set_user($user); | ||
10 | |||
11 | my ($bug, $comment); | ||