Merge ~ahasenack/ubuntu/+source/python-certbot:xenial-certbot-backport-1837673 into ubuntu/+source/python-certbot:ubuntu/cosmic-devel

Proposed by Andreas Hasenack
Status: Merged
Approved by: Andreas Hasenack
Approved revision: 2fbc42e88676f36008134d8bad9b7e27f077ebe0
Merge reported by: Andreas Hasenack
Merged at revision: 2fbc42e88676f36008134d8bad9b7e27f077ebe0
Proposed branch: ~ahasenack/ubuntu/+source/python-certbot:xenial-certbot-backport-1837673
Merge into: ubuntu/+source/python-certbot:ubuntu/cosmic-devel
Diff against target: 298 lines (+107/-87)
9 files modified
debian/changelog (+22/-0)
debian/compat (+1/-1)
debian/control (+30/-29)
debian/patches/0002-revert-sphinx-1.6-requirement.patch (+38/-0)
debian/patches/series (+1/-0)
debian/python-certbot-doc.doc-base (+2/-2)
debian/python-certbot.lintian-overrides (+1/-1)
debian/rules (+12/-13)
dev/null (+0/-41)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Robie Basak Pending
Review via email: mp+374375@code.launchpad.net

This proposal supersedes a proposal from 2019-10-18.

Description of the change

Backport cosmic's python-certbot to xenial.

Bileto with ppa: https://bileto.ubuntu.com/#/ticket/3824

I'm not sure if we can use an MP for this, or if I used it correctly. I grabbed the cosmic package, and added the work to get it to build and function in xenial. That means I can't proposed this against xenial-devel, as there will be conflicts.

For this review, I suggest to view the differences between the current xenial package and this proposed one, and the current cosmic package and this proposed one. That will show what I changed from the cosmic package, and what changed in xenial when compared to what was there before.

This backport required more work, as xenial doesn't have all the python3 build-dependencies needed by this cosmic package. Upstream said it would be fine to have python2 packages only[1], but this means extra care should be taken when reviewing this.

Therefore the big list of changes is:
- drop py3 packages and use py2 only (and associated changes)
- add patch to allow building with sphinx 1.6
- downgrade debhelper from 11 to 9, which is what is available in xenial. That had other consequences, most notably around the systemd debhelpers.

The cosmic package has a lintian override for python3-certbot. I changed that to pyhon-certbot, since we are no longer producing the py3 version. This lintian warning/error doesn't seem to apply to xenial, but I opted to keep it just because it was there in the cosmic version. It is a delta when this package is compared to the one currently in xenial, though, so let me know if you'd rather have me drop that.

1. https://bugs.launchpad.net/ubuntu/+source/python-certbot/+bug/1837673/comments/8

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

rbasak gave a +1 for hash 2fbc42e

<rbasak> ahasenack: +1 for both your acme and certbot branches, both for peer review and also for SRU accept
<rbasak> ahasenack: would you like to upload them? If you're not around, I can "sponsor" them
<ahasenack> rbasak: I'm here
<ahasenack> rbasak: I'll do it in a bit, could you please just confirm the hashes you +1ed?
<ahasenack> maybe in the ~canonical-server mps, for certbot?
<rbasak> ahasenack: actually the MPs for certbot have the wrong target branches, so I was ignoring them.
<rbasak> Let me put the hashes here
<ahasenack> rbasak: I wasn't sure how to target correctly, since these are backports
<ahasenack> I started from, say, cosmic-devel, and added changes for it to build on, say, xenial
<ahasenack> but that won't merge with xenial, there will be conflicts
<rbasak> acme: xenial 0907ce1; bionic 68149a9; disco a928edd
<rbasak> certbot: xenial 2fbc42e; bionic 97de715
<rbasak> I will check that the uploads match those before SRU accept
<rbasak> ("git ubuntu queue sync" makes it easy)
<rbasak> ahasenack: maybe best to avoid upload tags on these then?
<rbasak> I would base on the unapplied import tags of the backport source versions to preserve history.
<rbasak> I thought you did that for certbot at least
<rbasak> IIRC the acme branches are based on Debian VCS which won't be in git-ubuntu
<ahasenack> rbasak: right, acme I didn't start over
<rbasak> I suggest upload tags for certbot then, but not acme
<rbasak> (to be clear, you did exactly what I'd expect)

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This migrated

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index e1c9097..50da3f2 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,25 @@
6+python-certbot (0.27.0-1~ubuntu16.04.1) xenial; urgency=medium
7+
8+ * Backport to xenial (LP: #1837673):
9+ - d/control, d/compat: go back to debhelper 9, and drop R³
10+ - d/p/0002-revert-sphinx-1.6-requirement.patch: revert upstream change
11+ that allows build with sphinx 1.6
12+ - d/control: drop requirement on version 1.6 or higher of sphinx
13+ - d/control, d/rules: go back to python2
14+ - d/python-certbot-doc.doc-base: go back to the py2 package
15+ - d/python-certbot.lintian-overrides: go back to python2
16+ - d/rules: add systemd to debhelper, since it's not automatic on this
17+ dh level
18+ - d/control: build-dep on systemd
19+ - d/rules: no need to explicitly install examples/docs
20+ - d/rules: install certbot.timer as dh-systemd in Xenial doesn't do it
21+ - d/rules: go back to dh_systemd_enable and dh_systemd_start since
22+ dh_installsystemd is only available in debhelper 11 and later
23+ - d/letsencrypt.postrm: purging the transitional package shouldn't
24+ remove the logs (Closes: #921423)
25+
26+ -- Andreas Hasenack <andreas@canonical.com> Thu, 17 Oct 2019 21:03:01 +0000
27+
28 python-certbot (0.27.0-1) unstable; urgency=medium
29
30 * New upstream version 0.27.0
31diff --git a/debian/compat b/debian/compat
32index b4de394..ec63514 100644
33--- a/debian/compat
34+++ b/debian/compat
35@@ -1 +1 @@
36-11
37+9
38diff --git a/debian/control b/debian/control
39index 4ee6e91..ef9c127 100644
40--- a/debian/control
41+++ b/debian/control
42@@ -1,42 +1,43 @@
43 Source: python-certbot
44 Section: python
45 Priority: optional
46-Maintainer: Debian Let's Encrypt <team+letsencrypt@tracker.debian.org>
47+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
48+XSBC-Original-Maintainer: Debian Let's Encrypt <team+letsencrypt@tracker.debian.org>
49 Uploaders: Harlan Lieberman-Berg <hlieberman@debian.org>,
50 Francois Marier <francois@debian.org>
51-Build-Depends: debhelper (>= 11~),
52+Build-Depends: debhelper (>= 9~),
53+ dh-systemd (>= 1.5),
54 dh-python,
55- python3,
56- python3-acme (>= 0.26.0~),
57- python3-configargparse (>= 0.10.0),
58- python3-configobj,
59- python3-cryptography (>= 1.2),
60- python3-distutils | python3 (<< 3.6.5~),
61- python3-josepy,
62- python3-mock,
63- python3-parsedatetime (>= 1.3),
64- python3-repoze.sphinx.autointerface,
65- python3-requests (>= 2.4.3),
66- python3-rfc3339,
67- python3-setuptools (>= 1.0),
68- python3-sphinx (>= 1.6),
69- python3-sphinx-rtd-theme,
70- python3-tz,
71- python3-zope.component,
72- python3-zope.interface
73+ python,
74+ python-acme (>= 0.26.0~),
75+ python-configargparse (>= 0.10.0),
76+ python-configobj,
77+ python-cryptography (>= 1.2),
78+ python-distutils | python (<< 3.6.5~),
79+ python-josepy,
80+ python-mock,
81+ python-parsedatetime (>= 1.3),
82+ python-repoze.sphinx.autointerface,
83+ python-requests (>= 2.4.3),
84+ python-rfc3339,
85+ python-setuptools (>= 1.0),
86+ python-sphinx,
87+ python-sphinx-rtd-theme,
88+ python-tz,
89+ python-zope.component,
90+ python-zope.interface
91 Standards-Version: 4.2.1
92 Homepage: https://certbot.eff.org/
93 Vcs-Git: https://salsa.debian.org/letsencrypt-team/certbot/certbot.git
94 Vcs-Browser: https://salsa.debian.org/letsencrypt-team/certbot/certbot
95 Testsuite: autopkgtest-pkg-python
96-Rules-Requires-Root: no
97
98-Package: python3-certbot
99+Package: python-certbot
100 Architecture: all
101-Depends: python3-acme (>= 0.25.0~),
102- python3-requests (>= 2.4.3),
103+Depends: python-acme (>= 0.25.0~),
104+ python-requests (>= 2.4.3),
105 ${misc:Depends},
106- ${python3:Depends}
107+ ${python:Depends}
108 Recommends: certbot
109 Suggests: python-certbot-doc
110 Breaks: python-certbot-nginx (<< 0.20.0),
111@@ -63,14 +64,14 @@ Description: main library for certbot
112 Package: certbot
113 Section: web
114 Architecture: all
115-Depends: python3-certbot (= ${source:Version}),
116+Depends: python-certbot (= ${source:Version}),
117 ${misc:Depends},
118- ${python3:Depends}
119+ ${python:Depends}
120 Breaks: letsencrypt (<= 0.6.0)
121 Replaces: letsencrypt
122 Provides: letsencrypt
123-Suggests: python3-certbot-apache,
124- python3-certbot-nginx,
125+Suggests: python-certbot-apache,
126+ python-certbot-nginx,
127 python-certbot-doc
128 Description: automatically configure HTTPS using Let's Encrypt
129 The objective of Certbot, Let's Encrypt, and the ACME (Automated
130diff --git a/debian/letsencrypt.postrm b/debian/letsencrypt.postrm
131deleted file mode 100755
132index 42ae566..0000000
133--- a/debian/letsencrypt.postrm
134+++ /dev/null
135@@ -1,41 +0,0 @@
136-#!/bin/sh
137-# postrm script for letsencrypt
138-#
139-# see: dh_installdeb(1)
140-
141-set -e
142-
143-# summary of how this script can be called:
144-# * <postrm> `remove'
145-# * <postrm> `purge'
146-# * <old-postrm> `upgrade' <new-version>
147-# * <new-postrm> `failed-upgrade' <old-version>
148-# * <new-postrm> `abort-install'
149-# * <new-postrm> `abort-install' <old-version>
150-# * <new-postrm> `abort-upgrade' <old-version>
151-# * <disappearer's-postrm> `disappear' <overwriter>
152-# <overwriter-version>
153-# for details, see https://www.debian.org/doc/debian-policy/ or
154-# the debian-policy package
155-
156-
157-case "$1" in
158- purge)
159- rm -rf /var/log/letsencrypt
160- ;;
161-
162- remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
163- ;;
164-
165- *)
166- echo "postrm called with unknown argument \`$1'" >&2
167- exit 1
168- ;;
169-esac
170-
171-# dh_installdeb will replace this with shell code automatically
172-# generated by other debhelper scripts.
173-
174-#DEBHELPER#
175-
176-exit 0
177diff --git a/debian/patches/0002-revert-sphinx-1.6-requirement.patch b/debian/patches/0002-revert-sphinx-1.6-requirement.patch
178new file mode 100644
179index 0000000..0913701
180--- /dev/null
181+++ b/debian/patches/0002-revert-sphinx-1.6-requirement.patch
182@@ -0,0 +1,38 @@
183+Description: revert upstream change that allows build with sphinx 1.6
184+ Upstream added a change so that sphinx 1.6 could be used. Xenial has an
185+ older version of Sphinx, so we need to revert that change.
186+ .
187+ See
188+ https://bugs.launchpad.net/ubuntu/+source/python-certbot/+bug/1837673/comments/6
189+Origin: upstream, https://github.com/certbot/certbot/commit/d8057f0e17dc757fae662dad91a6fedc96ad6a2d
190+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-certbot/+bug/1837673
191+Last-Update: 2019-10-17
192+---
193+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
194+diff --git a/docs/conf.py b/docs/conf.py
195+index 2e6c5a9..09bb442 100644
196+--- a/docs/conf.py
197++++ b/docs/conf.py
198+@@ -40,7 +40,6 @@ needs_sphinx = '1.0'
199+ # ones.
200+ extensions = [
201+ 'sphinx.ext.autodoc',
202+- 'sphinx.ext.imgconverter',
203+ 'sphinx.ext.intersphinx',
204+ 'sphinx.ext.todo',
205+ 'sphinx.ext.coverage',
206+diff --git a/setup.py b/setup.py
207+index a13b7cd..1827c4d 100644
208+--- a/setup.py
209++++ b/setup.py
210+@@ -70,8 +70,8 @@ dev3_extras = [
211+
212+ docs_extras = [
213+ 'repoze.sphinx.autointerface',
214+- # sphinx.ext.imgconverter
215+- 'Sphinx >=1.6',
216++ # autodoc_member_order = 'bysource', autodoc_default_flags, and #4686
217++ 'Sphinx >=1.0,<=1.5.6',
218+ 'sphinx_rtd_theme',
219+ ]
220+
221diff --git a/debian/patches/series b/debian/patches/series
222index f869671..aed7114 100644
223--- a/debian/patches/series
224+++ b/debian/patches/series
225@@ -1 +1,2 @@
226 0001-remove-external-images.patch
227+0002-revert-sphinx-1.6-requirement.patch
228diff --git a/debian/python-certbot-doc.doc-base b/debian/python-certbot-doc.doc-base
229index 7fc1750..9ebba79 100644
230--- a/debian/python-certbot-doc.doc-base
231+++ b/debian/python-certbot-doc.doc-base
232@@ -6,5 +6,5 @@ Abstract: These HTML documentation contain the auto-generated
233 Section: Web Development
234
235 Format: HTML
236-Index: /usr/share/doc/python3-certbot/html/index.html
237-Files: /usr/share/doc/python3-certbot/html/*.html
238+Index: /usr/share/doc/python-certbot-doc/html/index.html
239+Files: /usr/share/doc/python-certbot-doc/html/*.html
240diff --git a/debian/python3-certbot.lintian-overrides b/debian/python-certbot.lintian-overrides
241similarity index 50%
242rename from debian/python3-certbot.lintian-overrides
243rename to debian/python-certbot.lintian-overrides
244index 4fae888..200d5ef 100644
245--- a/debian/python3-certbot.lintian-overrides
246+++ b/debian/python-certbot.lintian-overrides
247@@ -1,3 +1,3 @@
248 # The README file detected in testdata/ is an explanation of how the
249 # testdata keys were generated.
250-python3-certbot binary: package-contains-documentation-outside-usr-share-doc usr/lib/python3/dist-packages/certbot/tests/testdata/README
251\ No newline at end of file
252+python-certbot binary: package-contains-documentation-outside-usr-share-doc usr/lib/python3/dist-packages/certbot/tests/testdata/README
253diff --git a/debian/rules b/debian/rules
254index 8a9a762..6751046 100755
255--- a/debian/rules
256+++ b/debian/rules
257@@ -3,12 +3,12 @@
258 export PYBUILD_NAME = certbot
259
260 %:
261- dh $@ --with python3,sphinxdoc --buildsystem=pybuild
262+ dh $@ --with python2,sphinxdoc,systemd --buildsystem=pybuild
263
264 override_dh_install:
265 mkdir -p debian/certbot/usr/bin debian/certbot/etc/letsencrypt
266- mv debian/python3-certbot/usr/bin/* debian/certbot/usr/bin
267- rm -rf debian/python3-certbot/usr/bin
268+ mv debian/python-certbot/usr/bin/* debian/certbot/usr/bin
269+ rm -rf debian/python-certbot/usr/bin
270 mv debian/cli.ini debian/certbot/etc/letsencrypt/cli.ini
271 http_proxy='127.0.0.1:9' \
272 https_proxy='127.0.0.1:9' \
273@@ -16,16 +16,15 @@ override_dh_install:
274 http_proxy='127.0.0.1:9' \
275 https_proxy='127.0.0.1:8' \
276 sphinx-build -N -bman docs/ build/man
277+ # Install certbot.timer as dh-systemd in Xenial doesn't do it
278+ install -D --mode=644 --target-directory=debian/certbot/lib/systemd/system debian/certbot.timer
279
280-override_dh_installsystemd:
281- dh_installsystemd --no-start --package=certbot
282- dh_installsystemd --package=certbot certbot.timer
283+override_dh_systemd_enable:
284+ dh_systemd_enable -pcertbot certbot.service
285+ dh_systemd_enable -pcertbot certbot.timer
286
287-override_dh_installinit:
288-
289-override_dh_installdocs:
290- dh_installdocs --doc-main-package=python3-certbot -p python-certbot-doc
291- dh_installdocs -p certbot -p python3-certbot -p letsencrypt
292+override_dh_systemd_start:
293+ dh_systemd_start -pcertbot --no-start certbot.service
294+ dh_systemd_start -pcertbot certbot.timer
295
296-override_dh_installexamples:
297- dh_installexamples --doc-main-package=python3-certbot -p python-certbot-doc
298+override_dh_installinit:

Subscribers

People subscribed via source and target branches

to status/vote changes: