[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1005288: bullseye-pu: package sphinx-bootstrap-theme/0.8.0-1+deb11u1



Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu

[ Reason ]
Version 0.8.0-1 contains a bug caused by extra whitespace in src=""
attributes of <script> tags that search to be broken.

[ Impact ]
Documentation generated with sphinx and this theme has a broken search
functionality.

[ Tests ]
I confirmed the fix against the lava package, which generates
documentation using sphinx-bootstrap-theme.

[ Risks ]
None. The only functional changes are the exact bug fixes, which are
basically deleting 1 extra space in a few lines.

[ Checklist ]
  [*] *all* changes are documented in the d/changelog
  [*] I reviewed all changes and I approve them
  [*] attach debdiff against the package in (old)stable
      (for your convenience I'm also attaching the patch itself, since
      it's easier to read the diff-in-diff in the debdiff)
  [*] the issue is verified as fixed in unstable

[ Changes ]
The fix is simple and consists of removing the extra spaces that were
breaking the reference to the Javascript files.

[ Other info ]
Nothing.
diff --git a/debian/changelog b/debian/changelog
index 450e76e..0b40199 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+sphinx-bootstrap-theme (0.8.0-1+deb11u1) bullseye; urgency=medium
+
+  * Fix search functionality
+    Add a combined backport of 2 upstream commits that remove 1 extra spaces
+    off of a few lines.
+
+ -- Antonio Terceiro <terceiro@debian.org>  Thu, 10 Feb 2022 11:38:38 -0300
+
 sphinx-bootstrap-theme (0.8.0-1) unstable; urgency=medium
 
   [ Ondřej Nový ]
diff --git a/debian/patches/0002-Fix-search-functionality.patch b/debian/patches/0002-Fix-search-functionality.patch
new file mode 100644
index 0000000..d587944
--- /dev/null
+++ b/debian/patches/0002-Fix-search-functionality.patch
@@ -0,0 +1,50 @@
+From: Antonio Terceiro <terceiro@debian.org>
+Date: Thu, 10 Feb 2022 11:36:03 -0300
+Subject: Fix search functionality
+
+The extra spaces at the end of the src="" attibute of those <script>
+tags caused search to be broken on generated documentation. This is a
+combined backport of the following upstream commits
+0d80bffe488da6d5b7b575b964f92adde5026e3e ("BUG: Fix for Sphinx 3.4+
+search") and 19e69c8c46dff011ce24e1718e034decdf319f28 ("Drop spirious
+space in script urls").
+---
+ sphinx_bootstrap_theme/bootstrap/layout.html | 8 ++++----
+ sphinx_bootstrap_theme/bootstrap/search.html | 5 +++--
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/sphinx_bootstrap_theme/bootstrap/layout.html b/sphinx_bootstrap_theme/bootstrap/layout.html
+index 303472d..d29ca4f 100644
+--- a/sphinx_bootstrap_theme/bootstrap/layout.html
++++ b/sphinx_bootstrap_theme/bootstrap/layout.html
+@@ -52,10 +52,10 @@
+ <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
+ <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
+ <meta name="apple-mobile-web-app-capable" content="yes">
+-<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.12.4.min.js', 1) }} "></script>
+-<script type="text/javascript" src="{{ pathto('_static/js/jquery-fix.js', 1) }} "></script>
+-<script type="text/javascript" src="{{ pathto('_static', 1) + '/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js' }} "></script>
+-<script type="text/javascript" src="{{ pathto('_static/bootstrap-sphinx.js', 1) }} "></script>
++<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.12.4.min.js', 1) }}"></script>
++<script type="text/javascript" src="{{ pathto('_static/js/jquery-fix.js', 1) }}"></script>
++<script type="text/javascript" src="{{ pathto('_static', 1) + '/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js' }}"></script>
++<script type="text/javascript" src="{{ pathto('_static/bootstrap-sphinx.js', 1) }}"></script>
+ {% endblock %}
+ 
+ {# Silence the sidebar's, relbar's #}
+diff --git a/sphinx_bootstrap_theme/bootstrap/search.html b/sphinx_bootstrap_theme/bootstrap/search.html
+index 60a6601..cca744a 100644
+--- a/sphinx_bootstrap_theme/bootstrap/search.html
++++ b/sphinx_bootstrap_theme/bootstrap/search.html
+@@ -10,8 +10,9 @@
+ {%- extends "layout.html" %}
+ {% set title = _('Search') %}
+ {% block extrahead %}
+-  <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }} "></script>
+-  <script type="text/javascript" src="{{ pathto('searchindex.js', 1) }} "></script>
++  <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
++  <script type="text/javascript" src="{{ pathto('_static/language_data.js', 1) }}"></script>
++  <script type="text/javascript" src="{{ pathto('searchindex.js', 1) }}"></script>
+   {# this is used when loading the search index using $.ajax fails,
+      such as on Chrome for documents on localhost #}
+   <script type="text/javascript" id="searchindexloader"></script>
diff --git a/debian/patches/series b/debian/patches/series
index 391ae29..30e0b22 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 privacy_breach.patch
+0002-Fix-search-functionality.patch
From: Antonio Terceiro <terceiro@debian.org>
Date: Thu, 10 Feb 2022 11:36:03 -0300
Subject: Fix search functionality

The extra spaces at the end of the src="" attibute of those <script>
tags caused search to be broken on generated documentation. This is a
combined backport of the following upstream commits
0d80bffe488da6d5b7b575b964f92adde5026e3e ("BUG: Fix for Sphinx 3.4+
search") and 19e69c8c46dff011ce24e1718e034decdf319f28 ("Drop spirious
space in script urls").
---
 sphinx_bootstrap_theme/bootstrap/layout.html | 8 ++++----
 sphinx_bootstrap_theme/bootstrap/search.html | 5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/sphinx_bootstrap_theme/bootstrap/layout.html b/sphinx_bootstrap_theme/bootstrap/layout.html
index 303472d..d29ca4f 100644
--- a/sphinx_bootstrap_theme/bootstrap/layout.html
+++ b/sphinx_bootstrap_theme/bootstrap/layout.html
@@ -52,10 +52,10 @@
 <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
 <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
 <meta name="apple-mobile-web-app-capable" content="yes">
-<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.12.4.min.js', 1) }} "></script>
-<script type="text/javascript" src="{{ pathto('_static/js/jquery-fix.js', 1) }} "></script>
-<script type="text/javascript" src="{{ pathto('_static', 1) + '/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js' }} "></script>
-<script type="text/javascript" src="{{ pathto('_static/bootstrap-sphinx.js', 1) }} "></script>
+<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.12.4.min.js', 1) }}"></script>
+<script type="text/javascript" src="{{ pathto('_static/js/jquery-fix.js', 1) }}"></script>
+<script type="text/javascript" src="{{ pathto('_static', 1) + '/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js' }}"></script>
+<script type="text/javascript" src="{{ pathto('_static/bootstrap-sphinx.js', 1) }}"></script>
 {% endblock %}
 
 {# Silence the sidebar's, relbar's #}
diff --git a/sphinx_bootstrap_theme/bootstrap/search.html b/sphinx_bootstrap_theme/bootstrap/search.html
index 60a6601..cca744a 100644
--- a/sphinx_bootstrap_theme/bootstrap/search.html
+++ b/sphinx_bootstrap_theme/bootstrap/search.html
@@ -10,8 +10,9 @@
 {%- extends "layout.html" %}
 {% set title = _('Search') %}
 {% block extrahead %}
-  <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }} "></script>
-  <script type="text/javascript" src="{{ pathto('searchindex.js', 1) }} "></script>
+  <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
+  <script type="text/javascript" src="{{ pathto('_static/language_data.js', 1) }}"></script>
+  <script type="text/javascript" src="{{ pathto('searchindex.js', 1) }}"></script>
   {# this is used when loading the search index using $.ajax fails,
      such as on Chrome for documents on localhost #}
   <script type="text/javascript" id="searchindexloader"></script>

Attachment: signature.asc
Description: PGP signature


Reply to: