Package: man-db
Version: 2.11.2-2
Severity: important
Tags: ftbfs, patch
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-ri...@lists.debian.org

Dear Maintainer,

The package build failed due to like:

```
FAIL: man1/whatis.1
===================

man -E UTF-8 -l ./man1/whatis.1 produced error output:
troff:<standard input>:34: warning [p 1, 3.2i]: cannot break line
troff:<standard input>:50: warning [p 1, 5.8i]: cannot break line
troff:<standard input>:55: warning [p 1, 6.7i]: cannot break line
troff:<standard input>:86: warning [p 2, 0.3i]: cannot break line
FAIL man1/whatis.1 (exit status: 1)

FAIL: man8/mandb.8
==================
...
```

I found the MR has fixed the issue:
https://gitlab.com/man-db/man-db/-/issues/25

This failure may block the official rebootstrap for riscv64. 
So we can cherry-pick your change or upgrade the version of
man-db(if upstream has plan) as soon as possible.



-- 
Regards,
--
  Bo YU

diff -Nru man-db-2.11.2/debian/changelog man-db-2.11.2/debian/changelog
--- man-db-2.11.2/debian/changelog      2023-03-13 06:23:59.000000000 +0800
+++ man-db-2.11.2/debian/changelog      2023-07-24 17:40:58.000000000 +0800
@@ -1,3 +1,10 @@
+man-db (2.11.2-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Cherry-pick commit to fix BTBFS issue in sid.(Closes: #-1)
+
+ -- Bo YU <tsu.y...@gmail.com>  Mon, 24 Jul 2023 17:40:58 +0800
+
 man-db (2.11.2-2) unstable; urgency=medium
 
   * Add debconf translations:
diff -Nru man-db-2.11.2/debian/.gitignore man-db-2.11.2/debian/.gitignore
--- man-db-2.11.2/debian/.gitignore     2023-03-13 06:23:59.000000000 +0800
+++ man-db-2.11.2/debian/.gitignore     1970-01-01 07:30:00.000000000 +0730
@@ -1,6 +0,0 @@
-build
-files
-man-db
-templates
-*.debhelper*
-*.substvars
diff -Nru man-db-2.11.2/debian/patches/fix-sid-ftbfs.patch 
man-db-2.11.2/debian/patches/fix-sid-ftbfs.patch
--- man-db-2.11.2/debian/patches/fix-sid-ftbfs.patch    1970-01-01 
07:30:00.000000000 +0730
+++ man-db-2.11.2/debian/patches/fix-sid-ftbfs.patch    2023-07-24 
17:39:52.000000000 +0800
@@ -0,0 +1,244 @@
+Description: fix ftbfs on sid 
+ Cherry-pick the commit from upstream: 
https://gitlab.com/man-db/man-db/-/issues/25 
+Last-Update: 2023-07-24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure.ac
++++ b/configure.ac
+@@ -420,6 +420,7 @@
+ AM_GNU_GETTEXT_VERSION([0.18.3])
+ AC_SUBST([LINGUAS])
+ AM_ICONV
++AC_SUBST([HAVE_ICONV], [$am_func_iconv])
+ MAN_PO4A
+ MAN_LINGUAS
+ 
+--- a/man/check-man
++++ b/man/check-man
+@@ -31,7 +31,7 @@
+ # Indeed, even for other languages we're going to get "cannot adjust line"
+ # if %manpath_config_file% expands to something long. Hmm. We'll just ignore
+ # this across the board for now.
+-errors="$(echo "$errors" | $EGREP -v "(cannot adjust line|can't break 
line)")" || true
++errors="$(echo "$errors" | $EGREP -v "(cannot adjust line|(can't|cannot break 
line)")" || true
+ 
+ if [ "$code" != 0 ]; then
+       echo "man -E UTF-8 -l $1 failed with exit status $code and error 
output:"
+--- a/src/tests/Makefile.am
++++ b/src/tests/Makefile.am
+@@ -23,7 +23,8 @@
+                   MANDIR_LAYOUT=$(MANDIR_LAYOUT); export MANDIR_LAYOUT; \
+                   abs_top_builddir=$(abs_top_builddir); export 
abs_top_builddir; \
+                   OVERRIDE_DIR="$(override_dir)"; export OVERRIDE_DIR; \
+-                  troff_is_groff=$(troff_is_groff); export troff_is_groff;
++                  troff_is_groff=$(troff_is_groff); export troff_is_groff; \
++                  HAVE_ICONV=$(HAVE_ICONV); export HAVE_ICONV;
+ # Each test must use the configure-detected shell, not necessarily /bin/sh.
+ AM_LOG_FLAGS = $(SHELL)
+ ALL_TESTS = \
+--- a/src/tests/manconv-coding-tags
++++ b/src/tests/manconv-coding-tags
+@@ -19,7 +19,11 @@
+ EOF
+ <"$tmpdir/1.exp" tail -n +2 | iconv -f UTF-8 -t ISO-8859-1 >>"$tmpdir/1.inp"
+ run $MANCONV -f UTF-8 -t UTF-8 <"$tmpdir/1.inp" >"$tmpdir/1.out"
+-expect_files_equal 'simple coding tag' "$tmpdir/1.exp" "$tmpdir/1.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal 'simple coding tag' "$tmpdir/1.exp" "$tmpdir/1.out"
++else
++      report_skip 'simple coding tag'
++fi
+ 
+ cat >"$tmpdir/2.exp" <<'EOF'
+ '\" -*- mode: troff; coding: UTF-8 -*-
+@@ -30,7 +34,12 @@
+ EOF
+ <"$tmpdir/2.exp" tail -n +2 | iconv -f UTF-8 -t ISO-8859-1 >>"$tmpdir/2.inp"
+ run $MANCONV -f UTF-8 -t UTF-8 <"$tmpdir/2.inp" >"$tmpdir/2.out"
+-expect_files_equal 'mode and coding tags' "$tmpdir/2.exp" "$tmpdir/2.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal 'mode and coding tags' "$tmpdir/2.exp" 
"$tmpdir/2.out"
++else
++      report_skip 'mode and coding tags'
++fi
++
+ 
+ cat >"$tmpdir/3.exp" <<'EOF'
+ '\" -*- mode: troff; coding: UTF-8 -*-
+@@ -41,7 +50,12 @@
+ EOF
+ <"$tmpdir/3.exp" tail -n +2 | iconv -f UTF-8 -t ISO-8859-1 >>"$tmpdir/3.inp"
+ run $MANCONV -f UTF-8 -t UTF-8 <"$tmpdir/3.inp" >"$tmpdir/3.out"
+-expect_files_equal 'iso-latin-1 coding alias' "$tmpdir/3.exp" "$tmpdir/3.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal 'iso-latin-1 coding alias' "$tmpdir/3.exp" 
"$tmpdir/3.out"
++else
++      report_skip 'iso-latin-1 coding alias'
++fi
++
+ 
+ cat >"$tmpdir/4.inp" <<'EOF'
+ '\" -*- nroff -*-
+--- a/src/tests/manconv-guess-from-encoding
++++ b/src/tests/manconv-guess-from-encoding
+@@ -11,6 +11,10 @@
+ 
+ init
+ 
++if [ "$HAVE_ICONV" != yes ]; then
++      skip 'encoding conversion requires a working iconv'
++fi
++
+ write_page coding-tag 7 \
+       "$tmpdir/usr/share/man/man7/coding-tag.7" \
+       ISO-8859-1 '' '' 'coding-tag \- é'
+--- a/src/tests/manconv-incomplete-char-at-eof
++++ b/src/tests/manconv-incomplete-char-at-eof
+@@ -10,6 +10,10 @@
+ 
+ init
+ 
++if [ "$HAVE_ICONV" != yes ]; then
++      skip 'encoding conversion requires a working iconv'
++fi
++
+ printf '\314' >"$tmpdir/1.inp"  # 0xCC
+ ! run $MANCONV -f EUC-JP -t UTF-8//IGNORE <"$tmpdir/1.inp" >/dev/null
+ report 'incomplete character at EOF' "$?"
+--- a/src/tests/manconv-odd-combinations
++++ b/src/tests/manconv-odd-combinations
+@@ -17,14 +17,22 @@
+ 
+ iconv -f ISO-8859-1 -t UTF-8 <"$tmpdir/1.inp" >"$tmpdir/1.exp"
+ run $MANCONV -f UTF-8:ISO-8859-1 -t UTF-8 <"$tmpdir/1.inp" >"$tmpdir/1.out"
+-expect_files_equal '-f UTF-8:ISO-8859-1 -t UTF-8 on ISO-8859-1 input' \
+-      "$tmpdir/1.exp" "$tmpdir/1.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal '-f UTF-8:ISO-8859-1 -t UTF-8 on ISO-8859-1 input' \
++              "$tmpdir/1.exp" "$tmpdir/1.out"
++else
++      report_skip '-f UTF-8:ISO-8859-1 -t UTF-8 on ISO-8859-1 input'
++fi
+ 
+ iconv -f ISO-8859-2 -t UTF-8 <"$tmpdir/1.inp" >"$tmpdir/1-latin2.exp"
+ run $MANCONV -f UTF-8:ISO-8859-2 -t UTF-8 \
+       <"$tmpdir/1.inp" >"$tmpdir/1-latin2.out"
+-expect_files_equal '-f UTF-8:ISO-8859-2 -t UTF-8 on ISO-8859-2 input' \
+-      "$tmpdir/1-latin2.exp" "$tmpdir/1-latin2.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal '-f UTF-8:ISO-8859-2 -t UTF-8 on ISO-8859-2 input' \
++              "$tmpdir/1-latin2.exp" "$tmpdir/1-latin2.out"
++else
++      report_skip '-f UTF-8:ISO-8859-2 -t UTF-8 on ISO-8859-2 input'
++fi
+ 
+ (for x in $(seq 1 1000); do
+       printf '‐'
+@@ -33,9 +41,13 @@
+ echo '‐') >"$tmpdir/2.inp"
+ iconv -f KOI8-R -t UTF-8 <"$tmpdir/2.inp" >"$tmpdir/2.exp"
+ run $MANCONV -f UTF-8:KOI8-R -t UTF-8 <"$tmpdir/2.inp" >"$tmpdir/2.out"
+-expect_files_equal \
+-      '-f UTF-8:KOI8-R -t UTF-8 on KOI8-R input with UTF-8 prefix' \
+-      "$tmpdir/2.exp" "$tmpdir/2.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal \
++              '-f UTF-8:KOI8-R -t UTF-8 on KOI8-R input with UTF-8 prefix' \
++              "$tmpdir/2.exp" "$tmpdir/2.out"
++else
++      report_skip '-f UTF-8:KOI8-R -t UTF-8 on KOI8-R input with UTF-8 prefix'
++fi
+ 
+ (for x in $(seq 160 255); do
+       printf %b "\\$(printf %03o "$x")"
+@@ -56,9 +68,13 @@
+ EOF
+ run $MANCONV -f UTF-8:ISO-8859-2 -t ISO-8859-2//IGNORE \
+       <"$tmpdir/4.inp" >"$tmpdir/4.out"
+-expect_files_equal \
+-      'recognises input encoding and omits invalid output character' \
+-      "$tmpdir/4.exp" "$tmpdir/4.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal \
++              'recognises input encoding and omits invalid output character' \
++              "$tmpdir/4.exp" "$tmpdir/4.out"
++else
++      report_skip 'recognises input encoding and omits invalid output 
character'
++fi
+ 
+ # 0xAE does not exist in ISO-8859-7, so manconv won't be able to recode this
+ # to UTF-8 without conversion errors. (In the original case where this was
+@@ -75,7 +91,11 @@
+       >>"$tmpdir/5.exp" 2>/dev/null
+ run $MANCONV -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE \
+       <"$tmpdir/5.inp" >"$tmpdir/5.out"
+-expect_files_equal 'copes with invalid input characters' \
+-      "$tmpdir/5.exp" "$tmpdir/5.out"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal 'copes with invalid input characters' \
++              "$tmpdir/5.exp" "$tmpdir/5.out"
++else
++      report_skip 'copes with invalid input characters'
++fi
+ 
+ finish
+--- a/src/tests/man-recode-in-place
++++ b/src/tests/man-recode-in-place
+@@ -36,11 +36,16 @@
+       "$tmpdir/a.1" "$tmpdir/b.1.gz" "$tmpdir/c.1.gz"
+ expect_files_equal '--in-place with no coding tag' \
+       "$tmpdir/a.1.exp" "$tmpdir/a.1"
+-expect_files_equal '--in-place with gzip and coding tag matching target 
encoding' \
+-      "$tmpdir/b.1.exp" "$tmpdir/b.1"
+-expect_files_equal \
+-      '--in-place with gzip and coding tag not matching target encoding' \
+-      "$tmpdir/c.1.exp" "$tmpdir/c.1"
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal '--in-place with gzip and coding tag matching target 
encoding' \
++              "$tmpdir/b.1.exp" "$tmpdir/b.1"
++      expect_files_equal \
++              '--in-place with gzip and coding tag not matching target 
encoding' \
++              "$tmpdir/c.1.exp" "$tmpdir/c.1"
++else
++      report_skip '--in-place with gzip and coding tag matching target 
encoding'
++      report_skip '--in-place with gzip and coding tag not matching target 
encoding'
++fi
+ test ! -f "$tmpdir/b.1.gz" && test ! -f "$tmpdir/c.1.gz"
+ report '--in-place removes compressed input files' "$?"
+ 
+--- a/src/tests/man-recode-suffix
++++ b/src/tests/man-recode-suffix
+@@ -39,8 +39,11 @@
+ expect_files_equal \
+       '--suffix with gzip and coding tag matching target encoding' \
+       "$tmpdir/b.1.exp" "$tmpdir/b.1.out"
+-expect_files_equal \
+-      '--suffix with gzip and coding tag not matching target encoding' \
+-      "$tmpdir/c.1.exp" "$tmpdir/c.1.out"
+-
++if [ "$HAVE_ICONV" = yes ]; then
++      expect_files_equal \
++              '--suffix with gzip and coding tag not matching target 
encoding' \
++              "$tmpdir/c.1.exp" "$tmpdir/c.1.out"
++else
++      report_skip '--suffix with gzip and coding tag not matching target 
encoding'
++fi
+ finish
+--- a/src/tests/testlib.sh
++++ b/src/tests/testlib.sh
+@@ -93,9 +93,13 @@
+       report "$1" "$ret"
+ }
+ 
+-skip () {
++report_skip () {
+       echo "  SKIP: $1"
+-      rm -rf "$abstmpdir"
++}
++
++skip () {
++      report_skip "$1"
++        rm -rf "$abstmpdir"
+       exit 77
+ }
+ 
diff -Nru man-db-2.11.2/debian/patches/series 
man-db-2.11.2/debian/patches/series
--- man-db-2.11.2/debian/patches/series 1970-01-01 07:30:00.000000000 +0730
+++ man-db-2.11.2/debian/patches/series 2023-07-24 16:29:18.000000000 +0800
@@ -0,0 +1 @@
+fix-sid-ftbfs.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to