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

Bug#965334: buster-pu: package ruby-ronn/0.8.0-2



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

[ Reason ]
It was discovered that ronn fails to process input that contains UTF-8
characters due to a programming error

[ Impact ]
Not having this fix makes it impossible to process input with UTF-8.

[ Tests ]
I have add an autopkgtest that exposes the issue (fails without this
patch, passes with it)

[ Risks ]
Very low

[ 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 (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
The fix is just removing the "s" flag from a regular expression. It was
obtained from upstream at https://github.com/apjanke/ronn-ng/pull/35

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.7.0-1-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE=pt_BR:pt:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff --git a/debian/changelog b/debian/changelog
index 0cf8d08..fd7e234 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ruby-ronn (0.8.0-2+deb10u1) buster; urgency=medium
+
+  * Team upload.
+  * Add an autopkgtest that exposes problem in processing UTF-8 input
+  * Fix handling of UTF-8 content in manpages (Closes: #965294)
+
+ -- Antonio Terceiro <terceiro@debian.org>  Sun, 19 Jul 2020 13:50:53 -0300
+
 ruby-ronn (0.8.0-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/fix-utf8-content.patch b/debian/patches/fix-utf8-content.patch
new file mode 100644
index 0000000..9f62756
--- /dev/null
+++ b/debian/patches/fix-utf8-content.patch
@@ -0,0 +1,24 @@
+From 0dc86b83ee27a20d8a9d7bd85f7022a2db403f2f Mon Sep 17 00:00:00 2001
+From: Matteo Bernardini <mat_teobe@yahoo.it>
+Date: Sun, 6 Oct 2019 19:04:04 +0200
+Subject: [PATCH] Fix regex encoding: don't assume Windows-31J encoding
+
+Source: https://github.com/apjanke/ronn-ng/pull/35
+
+---
+ lib/ronn/roff.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/ronn/roff.rb b/lib/ronn/roff.rb
+index 7c56d2c..f313a95 100644
+--- a/lib/ronn/roff.rb
++++ b/lib/ronn/roff.rb
+@@ -351,7 +351,7 @@ def quote(text)
+     def write(text)
+       return if text.nil? || text.empty?
+       # lines cannot start with a '.'. insert zero-width character before.
+-      text = text.gsub(/\n\\\./s, "\n\\\\&\\.")
++      text = text.gsub(/\n\\\./, "\n\\\\&\\.")
+       buf_ends_in_newline = @buf.last && @buf.last[-1] == "\n"
+       @buf << '\&' if text[0, 2] == '\.' && buf_ends_in_newline
+       @buf << text
diff --git a/debian/patches/series b/debian/patches/series
index 701d377..ae4940f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ relax-dependencies.patch
 rename-to-ronn.patch
 fix-ordered-lists.patch
 fix-url-hyphenation.patch
+fix-utf8-content.patch
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..9f8c752
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: utf8
+Restrictions: superficial, allow-stderr
diff --git a/debian/tests/utf8 b/debian/tests/utf8
new file mode 100644
index 0000000..913cd36
--- /dev/null
+++ b/debian/tests/utf8
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -eu
+
+cd ${AUTOPKGTEST_TMP:-/tmp}
+
+cat >> utf8.7.ronn <<MANPAGE
+utf8(7) -- test manpage with UTF-8 content
+==========================================
+
+## DESCRIPTION
+
+Some UTF-8 data: ©áéíóú
+
+## OPTIONS
+## SYNTAX
+## ENVIRONMENT
+## RETURN VALUES
+## STANDARDS
+## SECURITY CONSIDERATIONS
+## BUGS
+## HISTORY
+## AUTHOR
+## COPYRIGHT
+## SEE ALSO
+
+MANPAGE
+
+ronn utf8.7.ronn

Attachment: signature.asc
Description: PGP signature


Reply to: