Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:remove-focal-refs into ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master

Proposed by Sergio Durigan Junior
Status: Merged
Merged at revision: 5525d5d3ae35fbe4c83dda8e99b5fc2077a8ccf0
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:remove-focal-refs
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master
Diff against target: 48 lines (+6/-4)
3 files modified
templates/HACKING_deb.md (+1/-1)
templates/README_DOCKERHUB.md (+2/-1)
templates/README_DOCKERHUB_LTS.md (+3/-2)
Reviewer Review Type Date Requested Status
Lucas Kanashiro Approve
Bryce Harrington Pending
Valentin Viennot Pending
Review via email: mp+398410@code.launchpad.net

Description of the change

This commit aims to make the templates fully generic, by removing the (few) references to Focal that are still present in them.

I tested it by re-generating Apache2's README.md and HACKING.md and checking that everything works as expected.

Arguably, the "distroversion" manipulation that I've added to the README_DOCKERHUB.md template is a bit fragile in the sense that it requires the "base" parameter to always have the Ubuntu release number there, and not its name, but I don't foresee a situation where we will deviate from this, so I think it's fine.

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

You will see that there is an extra hunk at the end of the diff. My Emacs is configured to always insert a newline at the end of the file, that's why it's there.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

LGTM, +1.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/templates/HACKING_deb.md b/templates/HACKING_deb.md
2index 64678bb..37e3398 100644
3--- a/templates/HACKING_deb.md
4+++ b/templates/HACKING_deb.md
5@@ -1,7 +1,7 @@
6 # Contributing
7
8 In Ubuntu, ${application} is available as a `.deb` package. For this reason,
9-this image was built by installing the ${application} Ubuntu Focal package
10+this image was built by installing the ${application} ${base} package
11 inside a docker container.
12
13 In order to contribute to the ${application} OCI image, do the following:
14diff --git a/templates/README_DOCKERHUB.md b/templates/README_DOCKERHUB.md
15index 6e2a318..c05871a 100644
16--- a/templates/README_DOCKERHUB.md
17+++ b/templates/README_DOCKERHUB.md
18@@ -3,7 +3,8 @@
19 Current ${application} Docker Image from Ubuntu. Receives security updates and rolls to newer ${application} or Ubuntu LTS. This repository is exempted from per-user rate limits. For [LTS Docker Image](https://ubuntu.com/security/docker-images) versions of this image, see `lts/${repo}`.
20 <%
21 baserepo='ubuntu'
22- pretag=version.split(".")[0]+'.'+version.split(".")[1]+'-20.04_'
23+ distroversion=base.strip('Ubuntu').strip('LTS').lstrip().rstrip()
24+ pretag=version.split(".")[0]+'.'+version.split(".")[1]+'-'+distroversion+'_'
25 tag=pretag+'beta'
26 %>
27 <%include file="header.md" args="tag=tag, pretag=pretag, baserepo=baserepo, **locals()['pageargs']"/>
28diff --git a/templates/README_DOCKERHUB_LTS.md b/templates/README_DOCKERHUB_LTS.md
29index 109a888..4ae13f0 100644
30--- a/templates/README_DOCKERHUB_LTS.md
31+++ b/templates/README_DOCKERHUB_LTS.md
32@@ -4,7 +4,8 @@
33 The [LTS Docker Image Portfolio](https://ubuntu.com/security/docker-images) are consistent, compliant, minimal and secure images with Extended Security Maintenance (ESM) commitments from Canonical. This repository is exempted from per-user rate limits.
34 <%
35 baserepo='lts'
36- pretag=version.split(".")[0]+'.'+version.split(".")[1]+'-20.04_'
37+ distroversion=base.strip('Ubuntu').strip('LTS').lstrip().rstrip()
38+ pretag=version.split(".")[0]+'.'+version.split(".")[1]+'-'+distroversion+'_'
39 tag=pretag+'beta'
40 %>
41 <%include file="header.md" args="tag=tag, pretag=pretag, baserepo=baserepo, **locals()['pageargs']"/>
42@@ -21,4 +22,4 @@ The [LTS Docker Image Portfolio](https://ubuntu.com/security/docker-images) are
43 ## Usage
44
45 If your usage includes redistribution, please [contact Canonical](https://ubuntu.com/security/docker-images#get-in-touch).
46-<%include file="common_usage.md" args="tag=tag, pretag=pretag, baserepo=baserepo, **locals()['pageargs']"/>
47\ No newline at end of file
48+<%include file="common_usage.md" args="tag=tag, pretag=pretag, baserepo=baserepo, **locals()['pageargs']"/>

Subscribers

People subscribed via source and target branches

to all changes: