Merge ~athos-ribeiro/ubuntu/+source/isc-kea:fix-js into ubuntu/+source/isc-kea:ubuntu/devel

Proposed by Athos Ribeiro
Status: Merged
Merge reported by: Athos Ribeiro
Merged at revision: d5014f6c28321b9b0f955b4281d08b6bb95b2d72
Proposed branch: ~athos-ribeiro/ubuntu/+source/isc-kea:fix-js
Merge into: ubuntu/+source/isc-kea:ubuntu/devel
Diff against target: 46 lines (+16/-0)
3 files modified
debian/changelog (+7/-0)
debian/control (+2/-0)
debian/rules (+7/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Pending
Canonical Server Reporter Pending
Review via email: mp+437520@code.launchpad.net

Description of the change

This change removes a downloaded js file from the kea-doc binary package.

PPA: https://launchpad.net/~athos-ribeiro/+archive/ubuntu/kea-no-js/+packages

Submitted to Debian in https://salsa.debian.org/debian/isc-kea/-/merge_requests/20

This is one of the change requests from the MIR team to promote isc-kea.

To post a comment you must log in.
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Ideally, we want to rebase and merge this after
https://code.launchpad.net/~ahasenack/ubuntu/+source/isc-kea/+git/isc-kea/+merge/437388

is merged, since that MP may be affected by the feature freeze, and this most likely will not.

0b729b7... by Andreas Hasenack

  * d/t/kea-dhcp4: make the test more robust (LP: #2007855):
    - increase dhclient timeout to 60s, and run in verbose mode
    - show logs in the case of failure
    - set +e inside the cleanup handler
    - fix resolv.conf regexp

4a384f9... by Andreas Hasenack

update-maintainer

ee0f85c... by Andreas Hasenack

changelog

e33e562... by Athos Ribeiro

    - d/rules: do not download external JS files in kea-doc.

979ab31... by Athos Ribeiro

    - d/control: add Recommends libjs-mathjax in kea-doc.

d5014f6... by Athos Ribeiro

Update changelog

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

I changed this MP to comply to the changes introduced in
https://salsa.debian.org/debian/isc-kea/-/merge_requests/20

Do note that while we are no longer fetching JS data from the internet in the binary kea-doc package, in default Ubuntu installations, with the snapped version of firefox, the 2 affected html pages will no longer correctly render the formulas that use mathjax. However, the formula is still rendered in a raw TeX format.

This happens because the snapped version of firefox cannot read files under /usr/share/doc. Still, given how simple the affected formulas are, this should not heavily affect readability. The proper solution for the issue lies in the firefox snap, as mentioned by Paride in https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1955325.

For further references on this changes, see the discussions in https://salsa.debian.org/debian/isc-kea/-/merge_requests/20

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

I'll review this as soon as I'm done with another review (landscape-client) that needs to happen before FF hopefully.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

This is present in Debian and a new merge is most likely coming soon. If we do merge 2.2.0-4, this will no longer be needed (it is already included in debian).

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

Jeremy Bicha synced[1] 2.2.0-4, which includes the change from this MP.

1. https://launchpad.net/ubuntu/+source/isc-kea/2.2.0-4

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

2.2.0-4 has migrated, which, as mentioned by Andreas, already includes this fix.

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 bb30f8e..8d4375c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+isc-kea (2.2.0-3ubuntu2) lunar; urgency=medium
7+
8+ * d/rules: do not download external JS files in kea-doc.
9+ * d/control: add Recommends libjs-mathjax in kea-doc.
10+
11+ -- Athos Ribeiro <athos.ribeiro@canonical.com> Wed, 22 Feb 2023 14:17:16 -0300
12+
13 isc-kea (2.2.0-3ubuntu1) lunar; urgency=medium
14
15 * d/t/kea-dhcp4: make the test more robust (LP: #2007855):
16diff --git a/debian/control b/debian/control
17index 7506b58..6113f14 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -157,6 +157,8 @@ Architecture: all
21 Section: doc
22 Depends:
23 ${misc:Depends},
24+Recommends:
25+ libjs-mathjax,
26 Description: Documentation for Kea DHCP server
27 Kea is an IPv4 and IPv6 DHCP server developed by Internet Systems Consortium.
28 .
29diff --git a/debian/rules b/debian/rules
30index 45937db..7982c6e 100755
31--- a/debian/rules
32+++ b/debian/rules
33@@ -29,6 +29,13 @@ override_dh_auto_configure:
34 --without-werror \
35 --with-site-packages=/usr/lib/python3/dist-packages
36
37+execute_after_dh_auto_build-indep:
38+ # Do not download external JS components in binary documentation package
39+ # Inspired by similar removal in python-pyopencl
40+ # Thanks to Andreas Beckmann
41+ find doc/sphinx/_build/html -name '*.html' -exec sed -r -i -e '\,( *)<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>,i \1<script src="/usr/share/javascript/mathjax/MathJax.js"></script>' {} +
42+ find doc/sphinx/_build/html -name '*.html' -exec sed -r -i -e 's,https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js,/usr/share/javascript/mathjax/config/TeX-MML-AM_CHTML.js,' {} +
43+
44 execute_after_dh_install:
45 dh_apparmor -pkea-ctrl-agent --profile-name=usr.sbin.kea-ctrl-agent
46 dh_apparmor -pkea-dhcp4-server --profile-name=usr.sbin.kea-dhcp4

Subscribers

People subscribed via source and target branches