[MERGED] docker-playground[master]: Add Dockerfile for gerrit and monkey patch

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 24 16:19:49 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: Add Dockerfile for gerrit and monkey patch
......................................................................


Add Dockerfile for gerrit and monkey patch

The openid support doesn't allow to add custom providers but we like the
convenience of a single click. Take the official docker image and patch
the HTML template. It seems to have changed little over the time, and it
might continue like that...

I have filed https://bugs.chromium.org/p/gerrit/issues/detail?id=8828 so
that we can drop this hack in the future...

Change-Id: I713948fbb93355c2e33e3b92969e2389cb88c938
---
A gerrit/Dockerfile
A gerrit/add_osmocom.diff
2 files changed, 29 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved; Verified



diff --git a/gerrit/Dockerfile b/gerrit/Dockerfile
new file mode 100644
index 0000000..e67c760
--- /dev/null
+++ b/gerrit/Dockerfile
@@ -0,0 +1,18 @@
+FROM gerritcodereview/gerrit
+
+USER root
+RUN yum -y install zip unzip patch
+
+RUN \
+	unzip /var/gerrit/bin/gerrit.war WEB-INF/lib/gerrit-openid-libopenid.jar && \
+	unzip WEB-INF/lib/gerrit-openid-libopenid.jar com/google/gerrit/httpd/auth/openid/LoginForm.html
+
+COPY add_osmocom.diff /tmp
+RUN patch -p0 < /tmp/add_osmocom.diff
+
+RUN \
+	zip -u WEB-INF/lib/gerrit-openid-libopenid.jar com/google/gerrit/httpd/auth/openid/LoginForm.html && \
+	zip -u /var/gerrit/bin/gerrit.war WEB-INF/lib/gerrit-openid-libopenid.jar
+
+USER gerrit
+
diff --git a/gerrit/add_osmocom.diff b/gerrit/add_osmocom.diff
new file mode 100644
index 0000000..f078a96
--- /dev/null
+++ b/gerrit/add_osmocom.diff
@@ -0,0 +1,11 @@
+--- com/google/gerrit/httpd/auth/openid/LoginForm.html.orig	2018-04-24 21:07:24.000000000 +0800
++++ com/google/gerrit/httpd/auth/openid/LoginForm.html	2018-04-24 21:08:26.000000000 +0800
+@@ -70,6 +70,8 @@
+         <div id="providers">
+         </div>
+ 
++        <div id="provider_osmocom"><a href="?id=https://osmocom.org/openid" id="id_osmocom">Sign in with Osmocom</a></div>
++
+         <div id="provider_launchpad">
+           <img height="16" width="16" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAHKSURBVCiRjZI9SFtRGIafc5tiVFCkhUxKBAcLYoPWwE0GEUPBwc0f1MHFoWLBiKABobWtBh2kacFYwUUQRXBoB3EJCVUvyBVrIB1UskTawUGFQOoP5h6H3ki8deg7vuc853zvxyuklORLDUc9QH9nZeAL0AGM+1v0cywSOVANR8uBaaALOOysDLwCYsAp8AaY97fo2RyoqOFooRqOvgUOTMiqJ8AsEA9tuH13IFkcQD1QZHpbQE+bPXEADAK5MSsA1/p+1SMAoTbF9oAh2WYUAcWbz5tThiQE1EsI7VxVzMWvHe2lGWP1RaqgWyKe1g5vjyhAHfBdrCmuWG1zqSHRAS9gFxBQC451/+PdhbqUPSYR00JSAmDLy+IE7ICwZHRkbBQKqMo3lQeW8V/KB5PAMSAtd06Kb7iQf8/vgXuA9/2V9nN7dCKjCNyABlxKmPqx7HQvDjX0HX29bBLIUSlIA4gNT9Bpw/gMtJqPaYD/2evJX5FgTQcwDpQBaeCD8+XZx8aZZFaxYZyYv/4xQS+wFAnWVAOfTAgzRrxxJpkFUHza2IVPG3sHVAMrD+zhFBgAXL0JPZIzhbXkEe+kB+j/nf52V/LexL8lvwVTCpkwGXEEfAAAAABJRU5ErkJggg=="/>
+           <a href="?id=https://login.launchpad.net/%2Bopenid" id="id_launchpad">Sign in with a Launchpad ID</a>

-- 
To view, visit https://gerrit.osmocom.org/7905
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I713948fbb93355c2e33e3b92969e2389cb88c938
Gerrit-PatchSet: 2
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list