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

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



Control: reopen -1

> On Thu, Feb 10, 2022 at 11:44:24AM -0300, Antonio Terceiro wrote:
> > 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.
> 
> Sorry, I made this update against the version that was then in testing
> instead of the one in stable. I rebased the changes on stable, but it
> seems they are not enough to fix the issue in that case. I'm closing
> this now and will open a new PU request if and when I am able to fix it.

It turns out my backport was broken; now I got it right and was able to
test that the bug is indeed fixed. All the info above in my original bug
report still applies, with the attached patches.
diff --git a/debian/changelog b/debian/changelog
index 6ebc402..53beb21 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+sphinx-bootstrap-theme (0.7.1-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>  Tue, 15 Feb 2022 19:18:53 -0300
+
 sphinx-bootstrap-theme (0.7.1-1) unstable; urgency=low
 
   [ Debian Janitor ]
diff --git a/debian/patches/Fix-search-functionality.patch b/debian/patches/Fix-search-functionality.patch
new file mode 100644
index 0000000..7794c08
--- /dev/null
+++ b/debian/patches/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 c21e441..f6d3bfc 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.11.0.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.11.0.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..92444cc 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('searchindex.js', 1) }}"></script>
++  <script type="text/javascript" src="{{ pathto('_static/language_data.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..134cab0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 privacy_breach.patch
+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 c21e441..f6d3bfc 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.11.0.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.11.0.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..92444cc 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('searchindex.js', 1) }}"></script>
+  <script type="text/javascript" src="{{ pathto('_static/language_data.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: