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

Bug#1005868: bullseye-pu: package bible-kjv/4.34



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

Hi,

I think bug 1005856 in bible-kjv warrants a stable update - the search
function is broken (it has an off-by-one error), and the fix is
straightforward (and has been in testing for a while).

[ Reason ]

The bug is that searching gives you the wrong answers - specifically
an off-by-one error in the verse returned. This makes searching (one
of the key functions of bible-kjv) useless.

The bug is a regression from old-stable; it was introduced in version
4.33 but not noticed before stable was released. I fixed it in 4.35,
so testing's 4.37 has the fix. I do now also have autopktests to
prevent such problems in future :-/

[ Impact ]

The search function in bible-kjv doesn't work properly - the results
returned do not contain the search terms, but are rather adjacent to
the correct verse.

[ Tests ]

4.36 and later have autopkgtests to check the search functions
correctly. I have run the autopkgtest tests against 4.34+deb11u1 built
and running on a bullseye system.

[ Risks ]

The fix is trivial (debdiff attached), which I think makes this a very
low risk change.

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in stable
  [X] the issue is verified as fixed in unstable

[ Changes ]

The bible-kjv build system constructs a concordance (using
makeconc.pl) - it runs through the raw text file (which is one verse
per line, plus a header line), and builds (amongst other things) a
"lines" associative array which records which lines (i.e. verses) a
word appears in.

4.33's bug in doing this was to discard the header line but not to
notice that doing so would leave $. (perl's line counter for the raw
text file) 1 higher than it should be. The fix is simply to update
$lines{$word} with $. -1 rather than $.

[ Other info ]
I have a package built in a bullseye chroot (and tested on a bullseye
system) ready to go, but will wait for your OK before uploading.

Thanks,

Matthew
diff -Nru bible-kjv-4.34/debian/changelog bible-kjv-4.34+deb11u1/debian/changelog
--- bible-kjv-4.34/debian/changelog	2021-07-19 12:36:43.000000000 +0100
+++ bible-kjv-4.34+deb11u1/debian/changelog	2022-02-16 11:15:11.000000000 +0000
@@ -1,3 +1,9 @@
+bible-kjv (4.34+deb11u1) bullseye; urgency=medium
+
+  * Fix off-by-one-error in search (Closes: #1005856)
+
+ -- Matthew Vernon <matthew@debian.org>  Wed, 16 Feb 2022 11:15:11 +0000
+
 bible-kjv (4.34) unstable; urgency=medium
 
   * Check for error return value
diff -Nru bible-kjv-4.34/makeconc.pl bible-kjv-4.34+deb11u1/makeconc.pl
--- bible-kjv-4.34/makeconc.pl	2021-07-19 12:36:43.000000000 +0100
+++ bible-kjv-4.34+deb11u1/makeconc.pl	2022-02-16 11:15:11.000000000 +0000
@@ -52,7 +52,8 @@
 	next if $stopword{$word};
 	$count{$word}++;	# Move below next line to count per-line.
 	next if $seenonthisline{$word}++;
-	$lines{$word} .= " " . $.;
+	#the header line discard still leaves $. 1 higher than we want
+	$lines{$word} .= " " . ($. - 1);
     }
 }
 die $! if BIBLE->error();

Reply to: