From 0d95d6114ac0ce082f6f645b7f2f0309cd867b35 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 4 Jan 2021 14:28:05 -0800 Subject: [PATCH] Update gitea to 1.13.1 This bumps our golang image up to buster-1.15 from buster-1.14 as gitea bumps their minimum to 1.13 and I figure we should keep up to date. The templates are updated to accomodate the new gitea templates. Primary changes here are removal of icon sizes when specified and using imported templates to simplify bits of code we weren't changing anyway. We install openssh-server from buster-backports on our gitea-ssh image. The reason for this is we pull in gitea's sshd_config from gitea itself and the updated gitea wants to set options that older openssh in buster proper doesn't support. Accomodate this with the newer openssh found in backports. We add a new favicon.svg to override the new default gitea svg favicon which is served otherwise. One other thing to call out is that gitea 1.13.0 added support for kanban and similar project management tooling. We have explicitly disabled this along with the wiki, issues and pull requests via app.ini's repository.DISABLE_REPO_UNITS setting. You can find out more about this setting here: https://docs.gitea.io/en-us/config-cheat-sheet/#repository-repository Change-Id: I4c483f90c7495ee1f80eacd2c79c38836aa6f483 --- docker/gitea/Dockerfile | 9 +- docker/gitea/custom/public/img/favicon.svg | 1 + .../custom/templates/base/head_navbar.tmpl | 34 +++---- .../gitea/custom/templates/repo/header.tmpl | 94 +++++++++---------- playbooks/roles/gitea/templates/app.ini.j2 | 1 + 5 files changed, 69 insertions(+), 70 deletions(-) create mode 100644 docker/gitea/custom/public/img/favicon.svg diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index ecddeb9c2b..37e7b5670e 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -22,11 +22,11 @@ ################################### #Build stage -FROM docker.io/library/golang:1.14-buster AS build-env +FROM docker.io/library/golang:1.15-buster AS build-env LABEL maintainer="infra-root@openstack.org" -ARG GITEA_VERSION="v1.12.5" +ARG GITEA_VERSION="v1.13.1" ENV TAGS "bindata $TAGS" #Build deps @@ -104,9 +104,12 @@ USER 1000:1000 # The openssh server image FROM base as gitea-openssh +# We enable backports here to install newer openssh which includes +# support for options that gitea's ssh configuration expects +RUN echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confold" \ - install openssh-server \ + -t buster-backports install openssh-server \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && mkdir /run/sshd diff --git a/docker/gitea/custom/public/img/favicon.svg b/docker/gitea/custom/public/img/favicon.svg new file mode 100644 index 0000000000..6597b83bf2 --- /dev/null +++ b/docker/gitea/custom/public/img/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docker/gitea/custom/templates/base/head_navbar.tmpl b/docker/gitea/custom/templates/base/head_navbar.tmpl index c518df60ae..485da790f1 100644 --- a/docker/gitea/custom/templates/base/head_navbar.tmpl +++ b/docker/gitea/custom/templates/base/head_navbar.tmpl @@ -50,7 +50,7 @@ {{.i18n.Tr "user_profile_and_more"}} {{.SignedUser.Name}} - {{svg "octicon-triangle-down" 16}} + {{svg "octicon-triangle-down"}}